keating 0.3.6 → 0.3.8

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 (190) hide show
  1. package/dist/src/cli/main.js +3 -0
  2. package/dist/src/core/config.js +4 -1
  3. package/dist/src/core/evolution.js +3 -31
  4. package/dist/src/core/map-elites.js +2 -29
  5. package/dist/src/core/map.js +3 -1
  6. package/dist/src/core/mutation.js +29 -0
  7. package/dist/src/core/policy.js +40 -14
  8. package/dist/src/core/project.js +21 -23
  9. package/dist/src/core/topics.js +6 -1
  10. package/dist/src/pi/hyperteacher-extension.js +1 -1
  11. package/dist/src/runtime/pi.js +6 -1
  12. package/package.json +1 -1
  13. package/web/dist/assets/{anthropic-BT6Vfzb1.js → anthropic-mDOoXVZn.js} +1 -1
  14. package/web/dist/assets/arc-BgYOxBdg.js +1 -0
  15. package/web/dist/assets/architecture-YZFGNWBL-MLoSDt-a.js +1 -0
  16. package/web/dist/assets/architectureDiagram-Q4EWVU46-Yh6i8NsV.js +36 -0
  17. package/web/dist/assets/{azure-openai-responses-CommX3YJ.js → azure-openai-responses-lDjfaDoj.js} +1 -1
  18. package/web/dist/assets/band-mY0qgSES.js +1 -0
  19. package/web/dist/assets/blockDiagram-DXYQGD6D-DUOEnS09.js +132 -0
  20. package/web/dist/assets/{c4Diagram-AHTNJAMY-VFfRZWWA.js → c4Diagram-AHTNJAMY-XzNOUnLt.js} +6 -6
  21. package/web/dist/assets/channel-BumC_1wb.js +1 -0
  22. package/web/dist/assets/{chunk-2KRD3SAO-B-AqvS0u.js → chunk-2KRD3SAO-mLbXjVje.js} +1 -1
  23. package/web/dist/assets/chunk-336JU56O-CQcnUKNW.js +2 -0
  24. package/web/dist/assets/chunk-426QAEUC-AjoT_j_q.js +1 -0
  25. package/web/dist/assets/{chunk-4BX2VUAB-0Z13aFAn.js → chunk-4BX2VUAB-DRZjGMDM.js} +1 -1
  26. package/web/dist/assets/{chunk-4TB4RGXK-DqC0Zwm7.js → chunk-4TB4RGXK-CAwQq2uM.js} +6 -6
  27. package/web/dist/assets/chunk-55IACEB6-C19HKnvd.js +1 -0
  28. package/web/dist/assets/{chunk-5FUZZQ4R-CApli0xX.js → chunk-5FUZZQ4R-Bw3BFJJs.js} +31 -31
  29. package/web/dist/assets/chunk-5PVQY5BW-Ciel-YVc.js +2 -0
  30. package/web/dist/assets/{chunk-67CJDMHE-Cx7uJS4d.js → chunk-67CJDMHE-DNZKE79k.js} +1 -1
  31. package/web/dist/assets/{chunk-7N4EOEYR-CYPNsFus.js → chunk-7N4EOEYR-BGZXIfBD.js} +1 -1
  32. package/web/dist/assets/{chunk-AA7GKIK3-rU0uhR_u.js → chunk-AA7GKIK3-CLWjm_Gk.js} +1 -1
  33. package/web/dist/assets/{chunk-BSJP7CBP-5VmcfR4-.js → chunk-BSJP7CBP-DwT1eVSc.js} +1 -1
  34. package/web/dist/assets/{chunk-CIAEETIT-CHJ-L8H1.js → chunk-CIAEETIT-DaQsGVwH.js} +1 -1
  35. package/web/dist/assets/{chunk-EDXVE4YY-DZHAJjMI.js → chunk-EDXVE4YY-DNeRJTiS.js} +1 -1
  36. package/web/dist/assets/{chunk-ENJZ2VHE-DbUDFa7w.js → chunk-ENJZ2VHE-Crfow0Ab.js} +6 -6
  37. package/web/dist/assets/{chunk-FMBD7UC4-BsYE5e_h.js → chunk-FMBD7UC4-BWSstEYx.js} +1 -1
  38. package/web/dist/assets/{chunk-FOC6F5B3-Cm6aoTv7.js → chunk-FOC6F5B3-BrTsf5ix.js} +1 -1
  39. package/web/dist/assets/{chunk-ICPOFSXX-C5eNZ4L6.js → chunk-ICPOFSXX-C04NFfJk.js} +5 -5
  40. package/web/dist/assets/{chunk-K5T4RW27-R7dAJ4rq.js → chunk-K5T4RW27-C6ErEFB0.js} +1 -1
  41. package/web/dist/assets/{chunk-KGLVRYIC-MO99YZXL.js → chunk-KGLVRYIC-DWgMrjZr.js} +1 -1
  42. package/web/dist/assets/{chunk-LIHQZDEY-DUJ656sT.js → chunk-LIHQZDEY-D3DWGnJT.js} +1 -1
  43. package/web/dist/assets/{chunk-ORNJ4GCN-DXuuEC1n.js → chunk-ORNJ4GCN-D0nhq27e.js} +1 -1
  44. package/web/dist/assets/{chunk-OYMX7WX6-pJlEprWq.js → chunk-OYMX7WX6-CQLx0cU3.js} +5 -5
  45. package/web/dist/assets/chunk-QZHKN3VN-X2zPgEFk.js +1 -0
  46. package/web/dist/assets/{chunk-U2HBQHQK-Mh_l9PLe.js → chunk-U2HBQHQK-FqDOW_Dq.js} +6 -6
  47. package/web/dist/assets/{chunk-X2U36JSP-BOeiJW0w.js → chunk-X2U36JSP-DiSftNGg.js} +1 -1
  48. package/web/dist/assets/{chunk-XPW4576I-fQ9SDvr_.js → chunk-XPW4576I-CTCFDURY.js} +1 -1
  49. package/web/dist/assets/chunk-YZCP3GAM-BhxShnp0.js +1 -0
  50. package/web/dist/assets/chunk-ZZ45TVLE-DMfGJuPz.js +1 -0
  51. package/web/dist/assets/classDiagram-6PBFFD2Q-qESk_xyE.js +1 -0
  52. package/web/dist/assets/classDiagram-v2-HSJHXN6E-BM1nmtfm.js +1 -0
  53. package/web/dist/assets/clone-CVy2b825.js +1 -0
  54. package/web/dist/assets/cose-bilkent-S5V4N54A-BWrDpSLZ.js +1 -0
  55. package/web/dist/assets/custom-tts-DA7XkgNJ.js +1 -0
  56. package/web/dist/assets/dagre-C_Y5Jrtl.js +1 -0
  57. package/web/dist/assets/dagre-KV5264BT-DcrvRRX1.js +4 -0
  58. package/web/dist/assets/diagram-5BDNPKRD-BsChRck6.js +10 -0
  59. package/web/dist/assets/{diagram-G4DWMVQ6-CtICKUFi.js → diagram-G4DWMVQ6-raeAsgoe.js} +12 -12
  60. package/web/dist/assets/diagram-MMDJMWI5-CuKsP84I.js +43 -0
  61. package/web/dist/assets/diagram-TYMM5635-T7ILcS3d.js +24 -0
  62. package/web/dist/assets/dist-DQ41Rxbw.js +1 -0
  63. package/web/dist/assets/dist-oYdMaa1U.js +10 -0
  64. package/web/dist/assets/{erDiagram-SMLLAGMA-uT88sBlT.js → erDiagram-SMLLAGMA-C9z6kYxH.js} +6 -6
  65. package/web/dist/assets/{flatten-C-u5nd5-.js → flatten-n72VCU_F.js} +1 -1
  66. package/web/dist/assets/flowDiagram-DWJPFMVM-BA3HBIvp.js +162 -0
  67. package/web/dist/assets/ganttDiagram-T4ZO3ILL-BXKKRsbk.js +292 -0
  68. package/web/dist/assets/gemini-live-dK40vCc5.js +2 -0
  69. package/web/dist/assets/gitGraph-7Q5UKJZL-Cy0KloCM.js +1 -0
  70. package/web/dist/assets/gitGraphDiagram-UUTBAWPF-CfGAccI8.js +106 -0
  71. package/web/dist/assets/{google-BdYNeCP_.js → google-BdS4iTyC.js} +1 -1
  72. package/web/dist/assets/{google-gemini-cli-DpxAL3K4.js → google-gemini-cli-ECA0sP3z.js} +1 -1
  73. package/web/dist/assets/{google-shared-DyQdgtsI.js → google-shared-DFv4ubOG.js} +1 -1
  74. package/web/dist/assets/{google-vertex-CKRybaXj.js → google-vertex-Duei77qD.js} +1 -1
  75. package/web/dist/assets/graphlib-sK54_wxh.js +1 -0
  76. package/web/dist/assets/index-B_MGHHww.js +3187 -0
  77. package/web/dist/assets/index-C_k9n6xi.css +2 -0
  78. package/web/dist/assets/info-OMHHGYJF-DiTlPM51.js +1 -0
  79. package/web/dist/assets/{infoDiagram-42DDH7IO-BbES7X_c.js → infoDiagram-42DDH7IO-CXoykyfr.js} +1 -1
  80. package/web/dist/assets/init-DugVGdkd.js +1 -0
  81. package/web/dist/assets/{isEmpty-DssUW35f.js → isEmpty-Lz_aOZWI.js} +1 -1
  82. package/web/dist/assets/{ishikawaDiagram-UXIWVN3A-DxQ28rho.js → ishikawaDiagram-UXIWVN3A-BJieXVMt.js} +6 -6
  83. package/web/dist/assets/{journeyDiagram-VCZTEJTY-D0X8qQ0P.js → journeyDiagram-VCZTEJTY-CwCyrnqT.js} +6 -6
  84. package/web/dist/assets/{kanban-definition-6JOO6SKY-DWYfSlpl.js → kanban-definition-6JOO6SKY-8ACmDHsl.js} +1 -1
  85. package/web/dist/assets/line-BqZCcbso.js +1 -0
  86. package/web/dist/assets/linear-CXf5Bx3D.js +1 -0
  87. package/web/dist/assets/math-Csj_9zpx.js +1 -0
  88. package/web/dist/assets/{mermaid-parser.core-Cy4iY_Dy.js → mermaid-parser.core-C8ylgsWV.js} +2 -2
  89. package/web/dist/assets/mermaid.core-BHCT6V24.js +11 -0
  90. package/web/dist/assets/{mindmap-definition-QFDTVHPH-BBnKdtQh.js → mindmap-definition-QFDTVHPH-DrDAZL9Q.js} +1 -1
  91. package/web/dist/assets/{mistral-BWaUMIgd.js → mistral-BCIirCkW.js} +1 -1
  92. package/web/dist/assets/{openai-codex-responses-CHBgKhmb.js → openai-codex-responses-BgRTWVD_.js} +1 -1
  93. package/web/dist/assets/{openai-completions-kcXmmaHI.js → openai-completions-D5AUQEua.js} +1 -1
  94. package/web/dist/assets/openai-realtime-BCZmIToJ.js +1 -0
  95. package/web/dist/assets/{openai-responses-Cqq3H3p3.js → openai-responses-CTlQ1a-G.js} +1 -1
  96. package/web/dist/assets/{openai-responses-shared-CTNuo9ci.js → openai-responses-shared-CLzQyVyy.js} +1 -1
  97. package/web/dist/assets/openai-tts-BRg2goic.js +1 -0
  98. package/web/dist/assets/{ordinal-_K3x1fkz.js → ordinal-CHOvK70a.js} +1 -1
  99. package/web/dist/assets/ort.bundle.min-Drf2fDrC.js +2805 -0
  100. package/web/dist/assets/packet-4T2RLAQJ-EXgAtQjm.js +1 -0
  101. package/web/dist/assets/path-BVVvcbiy.js +1 -0
  102. package/web/dist/assets/pie-ZZUOXDRM-dKU8mzlj.js +1 -0
  103. package/web/dist/assets/pieDiagram-DEJITSTG-CSnulv9o.js +30 -0
  104. package/web/dist/assets/{quadrantDiagram-34T5L4WZ-DfBSEept.js → quadrantDiagram-34T5L4WZ-DiM-1bw4.js} +6 -6
  105. package/web/dist/assets/radar-PYXPWWZC-B4d2wh2H.js +1 -0
  106. package/web/dist/assets/{reduce-836A2NiQ.js → reduce-r7gP4wdg.js} +1 -1
  107. package/web/dist/assets/renderer-BHoCfdWO-BFpsm4dw.js +1 -0
  108. package/web/dist/assets/requirementDiagram-MS252O5E-CunJUnIN.js +84 -0
  109. package/web/dist/assets/{sankeyDiagram-XADWPNL6-He3x9tNT.js → sankeyDiagram-XADWPNL6-DaA_56zq.js} +7 -7
  110. package/web/dist/assets/{sequenceDiagram-FGHM5R23-DfCDpvrT.js → sequenceDiagram-FGHM5R23-CG_SeqVO.js} +13 -13
  111. package/web/dist/assets/speech-ZNExxXBR.js +2 -0
  112. package/web/dist/assets/src-BfaOho0B.js +1 -0
  113. package/web/dist/assets/state-CrA0YVPh-wJ4Rmm6M.js +27 -0
  114. package/web/dist/assets/stateDiagram-FHFEXIEX-CSUigMtP.js +1 -0
  115. package/web/dist/assets/stateDiagram-v2-QKLJ7IA2-CgpYzp7D.js +1 -0
  116. package/web/dist/assets/step-qalMyYGy.js +1 -0
  117. package/web/dist/assets/string-DPssBiak.js +1 -0
  118. package/web/dist/assets/supertonic-hDdNdgtO.js +2 -0
  119. package/web/dist/assets/time-DaCo2z7n.js +1 -0
  120. package/web/dist/assets/{timeline-definition-GMOUNBTQ-BWunHgBC.js → timeline-definition-GMOUNBTQ-DcMiH-gG.js} +7 -7
  121. package/web/dist/assets/transformers.web-R9eWI1xg.js +14 -0
  122. package/web/dist/assets/treeView-SZITEDCU-V29H5f16.js +1 -0
  123. package/web/dist/assets/treemap-W4RFUUIX-DsAU74TP.js +1 -0
  124. package/web/dist/assets/vennDiagram-DHZGUBPP-C6A75Q3q.js +34 -0
  125. package/web/dist/assets/wardley-RL74JXVD-lGAI4Cps.js +1 -0
  126. package/web/dist/assets/{wardleyDiagram-NUSXRM2D-DTcVscPH.js → wardleyDiagram-NUSXRM2D-XmYD0oYm.js} +1 -1
  127. package/web/dist/assets/xychartDiagram-5P7HB3ND-BgSoKcS9.js +7 -0
  128. package/web/dist/index.html +16 -3
  129. package/web/dist/sw.js +647 -1
  130. package/web/dist/workbox-2ae722a1.js +4390 -0
  131. package/web/dist/assets/arc-x2nTilpc.js +0 -1
  132. package/web/dist/assets/architecture-YZFGNWBL-B1hlUWjX.js +0 -1
  133. package/web/dist/assets/architectureDiagram-Q4EWVU46-CMApWFyw.js +0 -36
  134. package/web/dist/assets/blockDiagram-DXYQGD6D-DOQbsNRY.js +0 -132
  135. package/web/dist/assets/channel-KY2Tg8Ba.js +0 -1
  136. package/web/dist/assets/chunk-336JU56O-DlYgPyl6.js +0 -2
  137. package/web/dist/assets/chunk-426QAEUC-CsVoBkfR.js +0 -1
  138. package/web/dist/assets/chunk-55IACEB6-CWE_u-IY.js +0 -1
  139. package/web/dist/assets/chunk-5PVQY5BW-Cbzhfhln.js +0 -2
  140. package/web/dist/assets/chunk-QZHKN3VN-_pQxbbiW.js +0 -1
  141. package/web/dist/assets/chunk-YZCP3GAM-eboO4P5S.js +0 -1
  142. package/web/dist/assets/chunk-ZZ45TVLE-Cky0eqlr.js +0 -1
  143. package/web/dist/assets/classDiagram-6PBFFD2Q-DEPsZSU3.js +0 -1
  144. package/web/dist/assets/classDiagram-v2-HSJHXN6E-DhmIOEpX.js +0 -1
  145. package/web/dist/assets/clone-DeTzYqo8.js +0 -1
  146. package/web/dist/assets/cose-bilkent-S5V4N54A-N4zWUJ7C.js +0 -1
  147. package/web/dist/assets/dagre-IpK1aoMm.js +0 -1
  148. package/web/dist/assets/dagre-KV5264BT-DCytJuju.js +0 -4
  149. package/web/dist/assets/diagram-5BDNPKRD-Cv4miBae.js +0 -10
  150. package/web/dist/assets/diagram-MMDJMWI5-Cn7aGorh.js +0 -43
  151. package/web/dist/assets/diagram-TYMM5635-CCUWDPsC.js +0 -24
  152. package/web/dist/assets/dist-Dm98VvTW.js +0 -1
  153. package/web/dist/assets/flowDiagram-DWJPFMVM-Bl3O7S1m.js +0 -162
  154. package/web/dist/assets/ganttDiagram-T4ZO3ILL-B1FhwV45.js +0 -292
  155. package/web/dist/assets/gitGraph-7Q5UKJZL-Bc_7vzer.js +0 -1
  156. package/web/dist/assets/gitGraphDiagram-UUTBAWPF-DfW6svMS.js +0 -106
  157. package/web/dist/assets/graphlib-CMTVFyOZ.js +0 -1
  158. package/web/dist/assets/index-Bdb7P7gx.css +0 -2
  159. package/web/dist/assets/index-DNxepp8B.js +0 -2891
  160. package/web/dist/assets/info-OMHHGYJF-BGcxeaZt.js +0 -1
  161. package/web/dist/assets/init-DlZdxViB.js +0 -1
  162. package/web/dist/assets/line-CuHce5JG.js +0 -1
  163. package/web/dist/assets/linear-Ca0Vkwuj.js +0 -1
  164. package/web/dist/assets/mermaid.core-6PGkQdYc.js +0 -11
  165. package/web/dist/assets/packet-4T2RLAQJ-D35ZLSBH.js +0 -1
  166. package/web/dist/assets/path-6uRLdFF7.js +0 -1
  167. package/web/dist/assets/pie-ZZUOXDRM-DRoETpJX.js +0 -1
  168. package/web/dist/assets/pieDiagram-DEJITSTG-DfMjfTQz.js +0 -30
  169. package/web/dist/assets/radar-PYXPWWZC-DLKxRJ0V.js +0 -1
  170. package/web/dist/assets/requirementDiagram-MS252O5E-BPkxJQkz.js +0 -84
  171. package/web/dist/assets/src-DdOdIreR.js +0 -1
  172. package/web/dist/assets/stateDiagram-FHFEXIEX-fuww6347.js +0 -1
  173. package/web/dist/assets/stateDiagram-v2-QKLJ7IA2-U6voafO3.js +0 -1
  174. package/web/dist/assets/transformers.web-DKUtmSAi.js +0 -2818
  175. package/web/dist/assets/treeView-SZITEDCU-BCx0xSAm.js +0 -1
  176. package/web/dist/assets/treemap-W4RFUUIX-2CvghWJK.js +0 -1
  177. package/web/dist/assets/vennDiagram-DHZGUBPP-CBXRutSP.js +0 -34
  178. package/web/dist/assets/wardley-RL74JXVD-BkPL_mhd.js +0 -1
  179. package/web/dist/assets/xychartDiagram-5P7HB3ND-CZLgX9Fe.js +0 -7
  180. package/web/dist/workbox-66610c77.js +0 -1
  181. /package/web/dist/assets/{_baseFor-B_cjfMB6.js → _baseFor-2QgQJAzW.js} +0 -0
  182. /package/web/dist/assets/{array-B9UHiPd-.js → array-B4O_ir3H.js} +0 -0
  183. /package/web/dist/assets/{cytoscape.esm-BBMd0vGm.js → cytoscape.esm-CdzdaUMP.js} +0 -0
  184. /package/web/dist/assets/{defaultLocale-5eAKkKJC.js → defaultLocale-Bhb3osZR.js} +0 -0
  185. /package/web/dist/assets/{github-copilot-headers-L39QqneT.js → github-copilot-headers-BuUn5v2j.js} +0 -0
  186. /package/web/dist/assets/{hash-kZ2KD_no.js → hash-CQjDwcjR.js} +0 -0
  187. /package/web/dist/assets/{openai-D4NSaQIs.js → openai-CRGaNv9i.js} +0 -0
  188. /package/web/dist/assets/{rough.esm-Djo4Abte.js → rough.esm-D5NinLFK.js} +0 -0
  189. /package/web/dist/assets/{transform-messages-CqKEdRVp.js → transform-messages-DXDWLrnO.js} +0 -0
  190. /package/web/dist/assets/{web-CMKYLKbT.js → web-jLdm8a1-.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{i as e,n as t,o as n,r,s as i,t as a}from"./chunk-Bj-mKKzh.js";import{a as o,c as s,d as c,n as l,s as u,t as d}from"./reduce-836A2NiQ.js";import{t as f}from"./isEmpty-DssUW35f.js";import{a as p,n as m,t as h}from"./flatten-C-u5nd5-.js";function g(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function _(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function v(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function y(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function b(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var x=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return g(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function S(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function ee(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function C(e){return S(e)&&typeof e.fullText==`string`}var w=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return E})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=T(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?E:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return E})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(te(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return E})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(te(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return E})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?E:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return E})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function T(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function te(e){return!!e&&typeof e[Symbol.iterator]==`function`}var ne=new w(()=>void 0,()=>E),E=Object.freeze({done:!0,value:void 0});function D(...e){if(e.length===1){let t=e[0];if(t instanceof w)return t;if(te(t))return new w(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new w(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:E)}return e.length>1?new w(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];te(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return E}):ne}var O=class extends w{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return E})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},re;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(re||={});function ie(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{g(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&ie(r,t))}):g(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&ie(r,t)))}function ae(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function k(e){let t=oe(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function oe(e){for(;e.$container;)e=e.$container;return e}function A(e){return _(e)?e.ref?[e.ref]:[]:v(e)?e.items.map(e=>e.ref):[]}function j(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(g(i)){if(t.keyIndex++,P(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(g(e)&&P(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return E})}function M(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new O(e,e=>j(e,t))}function N(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!P(e,t.range)?new O(e,()=>[]):new O(e,e=>j(e,t),{includeRoot:!0})}function P(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Gt(n,t):!1}function se(e){return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(_(r)||v(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(_(a)||v(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return E})}function ce(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=le(e.defaultValue))}function le(e){return Array.isArray(e)?[...e.map(le)]:e}var F={$type:`AbstractElement`,cardinality:`cardinality`};function ue(e){return I.isInstance(e,F.$type)}var de={$type:`AbstractParserRule`};function fe(e){return I.isInstance(e,de.$type)}var pe={$type:`AbstractRule`},me={$type:`AbstractType`},he={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function ge(e){return I.isInstance(e,he.$type)}var _e={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function ve(e){return I.isInstance(e,_e.$type)}var ye={$type:`ArrayLiteral`,elements:`elements`},be={$type:`ArrayType`,elementType:`elementType`},xe={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function Se(e){return I.isInstance(e,xe.$type)}var Ce={$type:`BooleanLiteral`,true:`true`};function we(e){return I.isInstance(e,Ce.$type)}var Te={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function Ee(e){return I.isInstance(e,Te.$type)}var De={$type:`Condition`},Oe={$type:`Conjunction`,left:`left`,right:`right`};function ke(e){return I.isInstance(e,Oe.$type)}var Ae={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function je(e){return I.isInstance(e,Ae.$type)}var Me={$type:`Disjunction`,left:`left`,right:`right`};function Ne(e){return I.isInstance(e,Me.$type)}var Pe={$type:`EndOfFile`,cardinality:`cardinality`};function Fe(e){return I.isInstance(e,Pe.$type)}var Ie={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},Le={$type:`GrammarImport`,path:`path`},Re={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function ze(e){return I.isInstance(e,Re.$type)}var Be={$type:`InferredType`,name:`name`};function Ve(e){return I.isInstance(e,Be.$type)}var He={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Ue(e){return I.isInstance(e,He.$type)}var We={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Ge={$type:`InfixRuleOperators`,precedences:`precedences`},Ke={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function qe(e){return I.isInstance(e,Ke.$type)}var Je={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Ye(e){return I.isInstance(e,Je.$type)}var Xe={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Ze={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Qe(e){return I.isInstance(e,Ze.$type)}var $e={$type:`Negation`,value:`value`};function et(e){return I.isInstance(e,$e.$type)}var tt={$type:`NumberLiteral`,value:`value`},nt={$type:`Parameter`,name:`name`},rt={$type:`ParameterReference`,parameter:`parameter`};function it(e){return I.isInstance(e,rt.$type)}var at={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function ot(e){return I.isInstance(e,at.$type)}var st={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},ct={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function lt(e){return I.isInstance(e,ct.$type)}var ut={$type:`ReturnType`,name:`name`};function dt(e){return I.isInstance(e,ut.$type)}var ft={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function pt(e){return I.isInstance(e,ft.$type)}var mt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function ht(e){return I.isInstance(e,mt.$type)}var gt={$type:`StringLiteral`,value:`value`},_t={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function vt(e){return I.isInstance(e,_t.$type)}var yt={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},bt={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function xt(e){return I.isInstance(e,bt.$type)}var St={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function Ct(e){return I.isInstance(e,St.$type)}var wt={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function Tt(e){return I.isInstance(e,wt.$type)}var Et={$type:`Type`,name:`name`,type:`type`};function Dt(e){return I.isInstance(e,Et.$type)}var Ot={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},kt={$type:`TypeDefinition`},At={$type:`UnionType`,types:`types`},jt={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Mt(e){return I.isInstance(e,jt.$type)}var Nt={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Pt(e){return I.isInstance(e,Nt.$type)}var Ft={$type:`ValueLiteral`},It={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Lt(e){return I.isInstance(e,It.$type)}var Rt=class extends x{constructor(){super(...arguments),this.types={AbstractElement:{name:F.$type,properties:{cardinality:{name:F.cardinality}},superTypes:[]},AbstractParserRule:{name:de.$type,properties:{},superTypes:[pe.$type,me.$type]},AbstractRule:{name:pe.$type,properties:{},superTypes:[]},AbstractType:{name:me.$type,properties:{},superTypes:[]},Action:{name:he.$type,properties:{cardinality:{name:he.cardinality},feature:{name:he.feature},inferredType:{name:he.inferredType},operator:{name:he.operator},type:{name:he.type,referenceType:me.$type}},superTypes:[F.$type]},Alternatives:{name:_e.$type,properties:{cardinality:{name:_e.cardinality},elements:{name:_e.elements,defaultValue:[]}},superTypes:[F.$type]},ArrayLiteral:{name:ye.$type,properties:{elements:{name:ye.elements,defaultValue:[]}},superTypes:[Ft.$type]},ArrayType:{name:be.$type,properties:{elementType:{name:be.elementType}},superTypes:[kt.$type]},Assignment:{name:xe.$type,properties:{cardinality:{name:xe.cardinality},feature:{name:xe.feature},operator:{name:xe.operator},predicate:{name:xe.predicate},terminal:{name:xe.terminal}},superTypes:[F.$type]},BooleanLiteral:{name:Ce.$type,properties:{true:{name:Ce.true,defaultValue:!1}},superTypes:[De.$type,Ft.$type]},CharacterRange:{name:Te.$type,properties:{cardinality:{name:Te.cardinality},left:{name:Te.left},lookahead:{name:Te.lookahead},parenthesized:{name:Te.parenthesized,defaultValue:!1},right:{name:Te.right}},superTypes:[yt.$type]},Condition:{name:De.$type,properties:{},superTypes:[]},Conjunction:{name:Oe.$type,properties:{left:{name:Oe.left},right:{name:Oe.right}},superTypes:[De.$type]},CrossReference:{name:Ae.$type,properties:{cardinality:{name:Ae.cardinality},deprecatedSyntax:{name:Ae.deprecatedSyntax,defaultValue:!1},isMulti:{name:Ae.isMulti,defaultValue:!1},terminal:{name:Ae.terminal},type:{name:Ae.type,referenceType:me.$type}},superTypes:[F.$type]},Disjunction:{name:Me.$type,properties:{left:{name:Me.left},right:{name:Me.right}},superTypes:[De.$type]},EndOfFile:{name:Pe.$type,properties:{cardinality:{name:Pe.cardinality}},superTypes:[F.$type]},Grammar:{name:Ie.$type,properties:{imports:{name:Ie.imports,defaultValue:[]},interfaces:{name:Ie.interfaces,defaultValue:[]},isDeclared:{name:Ie.isDeclared,defaultValue:!1},name:{name:Ie.name},rules:{name:Ie.rules,defaultValue:[]},types:{name:Ie.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Le.$type,properties:{path:{name:Le.path}},superTypes:[]},Group:{name:Re.$type,properties:{cardinality:{name:Re.cardinality},elements:{name:Re.elements,defaultValue:[]},guardCondition:{name:Re.guardCondition},predicate:{name:Re.predicate}},superTypes:[F.$type]},InferredType:{name:Be.$type,properties:{name:{name:Be.name}},superTypes:[me.$type]},InfixRule:{name:He.$type,properties:{call:{name:He.call},dataType:{name:He.dataType},inferredType:{name:He.inferredType},name:{name:He.name},operators:{name:He.operators},parameters:{name:He.parameters,defaultValue:[]},returnType:{name:He.returnType,referenceType:me.$type}},superTypes:[de.$type]},InfixRuleOperatorList:{name:We.$type,properties:{associativity:{name:We.associativity},operators:{name:We.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ge.$type,properties:{precedences:{name:Ge.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ke.$type,properties:{attributes:{name:Ke.attributes,defaultValue:[]},name:{name:Ke.name},superTypes:{name:Ke.superTypes,defaultValue:[],referenceType:me.$type}},superTypes:[me.$type]},Keyword:{name:Je.$type,properties:{cardinality:{name:Je.cardinality},predicate:{name:Je.predicate},value:{name:Je.value}},superTypes:[F.$type]},NamedArgument:{name:Xe.$type,properties:{calledByName:{name:Xe.calledByName,defaultValue:!1},parameter:{name:Xe.parameter,referenceType:nt.$type},value:{name:Xe.value}},superTypes:[]},NegatedToken:{name:Ze.$type,properties:{cardinality:{name:Ze.cardinality},lookahead:{name:Ze.lookahead},parenthesized:{name:Ze.parenthesized,defaultValue:!1},terminal:{name:Ze.terminal}},superTypes:[yt.$type]},Negation:{name:$e.$type,properties:{value:{name:$e.value}},superTypes:[De.$type]},NumberLiteral:{name:tt.$type,properties:{value:{name:tt.value}},superTypes:[Ft.$type]},Parameter:{name:nt.$type,properties:{name:{name:nt.name}},superTypes:[]},ParameterReference:{name:rt.$type,properties:{parameter:{name:rt.parameter,referenceType:nt.$type}},superTypes:[De.$type]},ParserRule:{name:at.$type,properties:{dataType:{name:at.dataType},definition:{name:at.definition},entry:{name:at.entry,defaultValue:!1},fragment:{name:at.fragment,defaultValue:!1},inferredType:{name:at.inferredType},name:{name:at.name},parameters:{name:at.parameters,defaultValue:[]},returnType:{name:at.returnType,referenceType:me.$type}},superTypes:[de.$type]},ReferenceType:{name:st.$type,properties:{isMulti:{name:st.isMulti,defaultValue:!1},referenceType:{name:st.referenceType}},superTypes:[kt.$type]},RegexToken:{name:ct.$type,properties:{cardinality:{name:ct.cardinality},lookahead:{name:ct.lookahead},parenthesized:{name:ct.parenthesized,defaultValue:!1},regex:{name:ct.regex}},superTypes:[yt.$type]},ReturnType:{name:ut.$type,properties:{name:{name:ut.name}},superTypes:[]},RuleCall:{name:ft.$type,properties:{arguments:{name:ft.arguments,defaultValue:[]},cardinality:{name:ft.cardinality},predicate:{name:ft.predicate},rule:{name:ft.rule,referenceType:pe.$type}},superTypes:[F.$type]},SimpleType:{name:mt.$type,properties:{primitiveType:{name:mt.primitiveType},stringType:{name:mt.stringType},typeRef:{name:mt.typeRef,referenceType:me.$type}},superTypes:[kt.$type]},StringLiteral:{name:gt.$type,properties:{value:{name:gt.value}},superTypes:[Ft.$type]},TerminalAlternatives:{name:_t.$type,properties:{cardinality:{name:_t.cardinality},elements:{name:_t.elements,defaultValue:[]},lookahead:{name:_t.lookahead},parenthesized:{name:_t.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[F.$type]},TerminalGroup:{name:bt.$type,properties:{cardinality:{name:bt.cardinality},elements:{name:bt.elements,defaultValue:[]},lookahead:{name:bt.lookahead},parenthesized:{name:bt.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:St.$type,properties:{definition:{name:St.definition},fragment:{name:St.fragment,defaultValue:!1},hidden:{name:St.hidden,defaultValue:!1},name:{name:St.name},type:{name:St.type}},superTypes:[pe.$type]},TerminalRuleCall:{name:wt.$type,properties:{cardinality:{name:wt.cardinality},lookahead:{name:wt.lookahead},parenthesized:{name:wt.parenthesized,defaultValue:!1},rule:{name:wt.rule,referenceType:St.$type}},superTypes:[yt.$type]},Type:{name:Et.$type,properties:{name:{name:Et.name},type:{name:Et.type}},superTypes:[me.$type]},TypeAttribute:{name:Ot.$type,properties:{defaultValue:{name:Ot.defaultValue},isOptional:{name:Ot.isOptional,defaultValue:!1},name:{name:Ot.name},type:{name:Ot.type}},superTypes:[]},TypeDefinition:{name:kt.$type,properties:{},superTypes:[]},UnionType:{name:At.$type,properties:{types:{name:At.types,defaultValue:[]}},superTypes:[kt.$type]},UnorderedGroup:{name:jt.$type,properties:{cardinality:{name:jt.cardinality},elements:{name:jt.elements,defaultValue:[]}},superTypes:[F.$type]},UntilToken:{name:Nt.$type,properties:{cardinality:{name:Nt.cardinality},lookahead:{name:Nt.lookahead},parenthesized:{name:Nt.parenthesized,defaultValue:!1},terminal:{name:Nt.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:Ft.$type,properties:{},superTypes:[]},Wildcard:{name:It.$type,properties:{cardinality:{name:It.cardinality},lookahead:{name:It.lookahead},parenthesized:{name:It.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}},I=new Rt;function zt(e){return new O(e,e=>S(e)?e.content:[],{includeRoot:!0})}function Bt(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Vt(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Ht(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Ut;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Ut||={});function Wt(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Ut.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Ut.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Ut.Inside:n?Ut.OverlapBack:r?Ut.OverlapFront:Ut.Outside}function Gt(e,t){return Wt(e,t)>Ut.After}var Kt=/^[\w\p{L}]$/u;function qt(e,t){if(e){let n=Yt(e,!0);if(n&&Jt(n,t))return n;if(C(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Jt(n,t))return n}}}}function Jt(e,t){return ee(e)&&t.includes(e.tokenType.name)}function Yt(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var Xt=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Zt(e,t=`Error: Got unexpected value.`){throw Error(t)}function L(e){return e.charCodeAt(0)}function Qt(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function $t(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function en(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function tn(){throw Error(`Internal Error - Should never get here!`)}function nn(e){return e.type===`Character`}var rn=[];for(let e=L(`0`);e<=L(`9`);e++)rn.push(e);var an=[L(`_`)].concat(rn);for(let e=L(`a`);e<=L(`z`);e++)an.push(e);for(let e=L(`A`);e<=L(`Z`);e++)an.push(e);var on=[L(` `),L(`\f`),L(`
1
+ import{i as e,n as t,o as n,r,s as i,t as a}from"./chunk-Bj-mKKzh.js";import{a as o,c as s,d as c,n as l,s as u,t as d}from"./reduce-r7gP4wdg.js";import{t as f}from"./isEmpty-Lz_aOZWI.js";import{a as p,n as m,t as h}from"./flatten-n72VCU_F.js";function g(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function _(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function v(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function y(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function b(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var x=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return g(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function S(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function ee(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function C(e){return S(e)&&typeof e.fullText==`string`}var w=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return E})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=T(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?E:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return E})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(te(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return E})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(te(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return E})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?E:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return E})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function T(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function te(e){return!!e&&typeof e[Symbol.iterator]==`function`}var ne=new w(()=>void 0,()=>E),E=Object.freeze({done:!0,value:void 0});function D(...e){if(e.length===1){let t=e[0];if(t instanceof w)return t;if(te(t))return new w(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new w(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:E)}return e.length>1?new w(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];te(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return E}):ne}var O=class extends w{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return E})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},re;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(re||={});function ie(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{g(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&ie(r,t))}):g(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&ie(r,t)))}function ae(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function k(e){let t=oe(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function oe(e){for(;e.$container;)e=e.$container;return e}function A(e){return _(e)?e.ref?[e.ref]:[]:v(e)?e.items.map(e=>e.ref):[]}function j(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(g(i)){if(t.keyIndex++,P(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(g(e)&&P(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return E})}function M(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new O(e,e=>j(e,t))}function N(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!P(e,t.range)?new O(e,()=>[]):new O(e,e=>j(e,t),{includeRoot:!0})}function P(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Gt(n,t):!1}function se(e){return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(_(r)||v(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(_(a)||v(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return E})}function ce(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=le(e.defaultValue))}function le(e){return Array.isArray(e)?[...e.map(le)]:e}var F={$type:`AbstractElement`,cardinality:`cardinality`};function ue(e){return I.isInstance(e,F.$type)}var de={$type:`AbstractParserRule`};function fe(e){return I.isInstance(e,de.$type)}var pe={$type:`AbstractRule`},me={$type:`AbstractType`},he={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function ge(e){return I.isInstance(e,he.$type)}var _e={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function ve(e){return I.isInstance(e,_e.$type)}var ye={$type:`ArrayLiteral`,elements:`elements`},be={$type:`ArrayType`,elementType:`elementType`},xe={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function Se(e){return I.isInstance(e,xe.$type)}var Ce={$type:`BooleanLiteral`,true:`true`};function we(e){return I.isInstance(e,Ce.$type)}var Te={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function Ee(e){return I.isInstance(e,Te.$type)}var De={$type:`Condition`},Oe={$type:`Conjunction`,left:`left`,right:`right`};function ke(e){return I.isInstance(e,Oe.$type)}var Ae={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function je(e){return I.isInstance(e,Ae.$type)}var Me={$type:`Disjunction`,left:`left`,right:`right`};function Ne(e){return I.isInstance(e,Me.$type)}var Pe={$type:`EndOfFile`,cardinality:`cardinality`};function Fe(e){return I.isInstance(e,Pe.$type)}var Ie={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},Le={$type:`GrammarImport`,path:`path`},Re={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function ze(e){return I.isInstance(e,Re.$type)}var Be={$type:`InferredType`,name:`name`};function Ve(e){return I.isInstance(e,Be.$type)}var He={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Ue(e){return I.isInstance(e,He.$type)}var We={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Ge={$type:`InfixRuleOperators`,precedences:`precedences`},Ke={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function qe(e){return I.isInstance(e,Ke.$type)}var Je={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Ye(e){return I.isInstance(e,Je.$type)}var Xe={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Ze={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Qe(e){return I.isInstance(e,Ze.$type)}var $e={$type:`Negation`,value:`value`};function et(e){return I.isInstance(e,$e.$type)}var tt={$type:`NumberLiteral`,value:`value`},nt={$type:`Parameter`,name:`name`},rt={$type:`ParameterReference`,parameter:`parameter`};function it(e){return I.isInstance(e,rt.$type)}var at={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function ot(e){return I.isInstance(e,at.$type)}var st={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},ct={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function lt(e){return I.isInstance(e,ct.$type)}var ut={$type:`ReturnType`,name:`name`};function dt(e){return I.isInstance(e,ut.$type)}var ft={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function pt(e){return I.isInstance(e,ft.$type)}var mt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function ht(e){return I.isInstance(e,mt.$type)}var gt={$type:`StringLiteral`,value:`value`},_t={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function vt(e){return I.isInstance(e,_t.$type)}var yt={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},bt={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function xt(e){return I.isInstance(e,bt.$type)}var St={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function Ct(e){return I.isInstance(e,St.$type)}var wt={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function Tt(e){return I.isInstance(e,wt.$type)}var Et={$type:`Type`,name:`name`,type:`type`};function Dt(e){return I.isInstance(e,Et.$type)}var Ot={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},kt={$type:`TypeDefinition`},At={$type:`UnionType`,types:`types`},jt={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Mt(e){return I.isInstance(e,jt.$type)}var Nt={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Pt(e){return I.isInstance(e,Nt.$type)}var Ft={$type:`ValueLiteral`},It={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Lt(e){return I.isInstance(e,It.$type)}var Rt=class extends x{constructor(){super(...arguments),this.types={AbstractElement:{name:F.$type,properties:{cardinality:{name:F.cardinality}},superTypes:[]},AbstractParserRule:{name:de.$type,properties:{},superTypes:[pe.$type,me.$type]},AbstractRule:{name:pe.$type,properties:{},superTypes:[]},AbstractType:{name:me.$type,properties:{},superTypes:[]},Action:{name:he.$type,properties:{cardinality:{name:he.cardinality},feature:{name:he.feature},inferredType:{name:he.inferredType},operator:{name:he.operator},type:{name:he.type,referenceType:me.$type}},superTypes:[F.$type]},Alternatives:{name:_e.$type,properties:{cardinality:{name:_e.cardinality},elements:{name:_e.elements,defaultValue:[]}},superTypes:[F.$type]},ArrayLiteral:{name:ye.$type,properties:{elements:{name:ye.elements,defaultValue:[]}},superTypes:[Ft.$type]},ArrayType:{name:be.$type,properties:{elementType:{name:be.elementType}},superTypes:[kt.$type]},Assignment:{name:xe.$type,properties:{cardinality:{name:xe.cardinality},feature:{name:xe.feature},operator:{name:xe.operator},predicate:{name:xe.predicate},terminal:{name:xe.terminal}},superTypes:[F.$type]},BooleanLiteral:{name:Ce.$type,properties:{true:{name:Ce.true,defaultValue:!1}},superTypes:[De.$type,Ft.$type]},CharacterRange:{name:Te.$type,properties:{cardinality:{name:Te.cardinality},left:{name:Te.left},lookahead:{name:Te.lookahead},parenthesized:{name:Te.parenthesized,defaultValue:!1},right:{name:Te.right}},superTypes:[yt.$type]},Condition:{name:De.$type,properties:{},superTypes:[]},Conjunction:{name:Oe.$type,properties:{left:{name:Oe.left},right:{name:Oe.right}},superTypes:[De.$type]},CrossReference:{name:Ae.$type,properties:{cardinality:{name:Ae.cardinality},deprecatedSyntax:{name:Ae.deprecatedSyntax,defaultValue:!1},isMulti:{name:Ae.isMulti,defaultValue:!1},terminal:{name:Ae.terminal},type:{name:Ae.type,referenceType:me.$type}},superTypes:[F.$type]},Disjunction:{name:Me.$type,properties:{left:{name:Me.left},right:{name:Me.right}},superTypes:[De.$type]},EndOfFile:{name:Pe.$type,properties:{cardinality:{name:Pe.cardinality}},superTypes:[F.$type]},Grammar:{name:Ie.$type,properties:{imports:{name:Ie.imports,defaultValue:[]},interfaces:{name:Ie.interfaces,defaultValue:[]},isDeclared:{name:Ie.isDeclared,defaultValue:!1},name:{name:Ie.name},rules:{name:Ie.rules,defaultValue:[]},types:{name:Ie.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Le.$type,properties:{path:{name:Le.path}},superTypes:[]},Group:{name:Re.$type,properties:{cardinality:{name:Re.cardinality},elements:{name:Re.elements,defaultValue:[]},guardCondition:{name:Re.guardCondition},predicate:{name:Re.predicate}},superTypes:[F.$type]},InferredType:{name:Be.$type,properties:{name:{name:Be.name}},superTypes:[me.$type]},InfixRule:{name:He.$type,properties:{call:{name:He.call},dataType:{name:He.dataType},inferredType:{name:He.inferredType},name:{name:He.name},operators:{name:He.operators},parameters:{name:He.parameters,defaultValue:[]},returnType:{name:He.returnType,referenceType:me.$type}},superTypes:[de.$type]},InfixRuleOperatorList:{name:We.$type,properties:{associativity:{name:We.associativity},operators:{name:We.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ge.$type,properties:{precedences:{name:Ge.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ke.$type,properties:{attributes:{name:Ke.attributes,defaultValue:[]},name:{name:Ke.name},superTypes:{name:Ke.superTypes,defaultValue:[],referenceType:me.$type}},superTypes:[me.$type]},Keyword:{name:Je.$type,properties:{cardinality:{name:Je.cardinality},predicate:{name:Je.predicate},value:{name:Je.value}},superTypes:[F.$type]},NamedArgument:{name:Xe.$type,properties:{calledByName:{name:Xe.calledByName,defaultValue:!1},parameter:{name:Xe.parameter,referenceType:nt.$type},value:{name:Xe.value}},superTypes:[]},NegatedToken:{name:Ze.$type,properties:{cardinality:{name:Ze.cardinality},lookahead:{name:Ze.lookahead},parenthesized:{name:Ze.parenthesized,defaultValue:!1},terminal:{name:Ze.terminal}},superTypes:[yt.$type]},Negation:{name:$e.$type,properties:{value:{name:$e.value}},superTypes:[De.$type]},NumberLiteral:{name:tt.$type,properties:{value:{name:tt.value}},superTypes:[Ft.$type]},Parameter:{name:nt.$type,properties:{name:{name:nt.name}},superTypes:[]},ParameterReference:{name:rt.$type,properties:{parameter:{name:rt.parameter,referenceType:nt.$type}},superTypes:[De.$type]},ParserRule:{name:at.$type,properties:{dataType:{name:at.dataType},definition:{name:at.definition},entry:{name:at.entry,defaultValue:!1},fragment:{name:at.fragment,defaultValue:!1},inferredType:{name:at.inferredType},name:{name:at.name},parameters:{name:at.parameters,defaultValue:[]},returnType:{name:at.returnType,referenceType:me.$type}},superTypes:[de.$type]},ReferenceType:{name:st.$type,properties:{isMulti:{name:st.isMulti,defaultValue:!1},referenceType:{name:st.referenceType}},superTypes:[kt.$type]},RegexToken:{name:ct.$type,properties:{cardinality:{name:ct.cardinality},lookahead:{name:ct.lookahead},parenthesized:{name:ct.parenthesized,defaultValue:!1},regex:{name:ct.regex}},superTypes:[yt.$type]},ReturnType:{name:ut.$type,properties:{name:{name:ut.name}},superTypes:[]},RuleCall:{name:ft.$type,properties:{arguments:{name:ft.arguments,defaultValue:[]},cardinality:{name:ft.cardinality},predicate:{name:ft.predicate},rule:{name:ft.rule,referenceType:pe.$type}},superTypes:[F.$type]},SimpleType:{name:mt.$type,properties:{primitiveType:{name:mt.primitiveType},stringType:{name:mt.stringType},typeRef:{name:mt.typeRef,referenceType:me.$type}},superTypes:[kt.$type]},StringLiteral:{name:gt.$type,properties:{value:{name:gt.value}},superTypes:[Ft.$type]},TerminalAlternatives:{name:_t.$type,properties:{cardinality:{name:_t.cardinality},elements:{name:_t.elements,defaultValue:[]},lookahead:{name:_t.lookahead},parenthesized:{name:_t.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalElement:{name:yt.$type,properties:{cardinality:{name:yt.cardinality},lookahead:{name:yt.lookahead},parenthesized:{name:yt.parenthesized,defaultValue:!1}},superTypes:[F.$type]},TerminalGroup:{name:bt.$type,properties:{cardinality:{name:bt.cardinality},elements:{name:bt.elements,defaultValue:[]},lookahead:{name:bt.lookahead},parenthesized:{name:bt.parenthesized,defaultValue:!1}},superTypes:[yt.$type]},TerminalRule:{name:St.$type,properties:{definition:{name:St.definition},fragment:{name:St.fragment,defaultValue:!1},hidden:{name:St.hidden,defaultValue:!1},name:{name:St.name},type:{name:St.type}},superTypes:[pe.$type]},TerminalRuleCall:{name:wt.$type,properties:{cardinality:{name:wt.cardinality},lookahead:{name:wt.lookahead},parenthesized:{name:wt.parenthesized,defaultValue:!1},rule:{name:wt.rule,referenceType:St.$type}},superTypes:[yt.$type]},Type:{name:Et.$type,properties:{name:{name:Et.name},type:{name:Et.type}},superTypes:[me.$type]},TypeAttribute:{name:Ot.$type,properties:{defaultValue:{name:Ot.defaultValue},isOptional:{name:Ot.isOptional,defaultValue:!1},name:{name:Ot.name},type:{name:Ot.type}},superTypes:[]},TypeDefinition:{name:kt.$type,properties:{},superTypes:[]},UnionType:{name:At.$type,properties:{types:{name:At.types,defaultValue:[]}},superTypes:[kt.$type]},UnorderedGroup:{name:jt.$type,properties:{cardinality:{name:jt.cardinality},elements:{name:jt.elements,defaultValue:[]}},superTypes:[F.$type]},UntilToken:{name:Nt.$type,properties:{cardinality:{name:Nt.cardinality},lookahead:{name:Nt.lookahead},parenthesized:{name:Nt.parenthesized,defaultValue:!1},terminal:{name:Nt.terminal}},superTypes:[yt.$type]},ValueLiteral:{name:Ft.$type,properties:{},superTypes:[]},Wildcard:{name:It.$type,properties:{cardinality:{name:It.cardinality},lookahead:{name:It.lookahead},parenthesized:{name:It.parenthesized,defaultValue:!1}},superTypes:[yt.$type]}}}},I=new Rt;function zt(e){return new O(e,e=>S(e)?e.content:[],{includeRoot:!0})}function Bt(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Vt(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Ht(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Ut;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Ut||={});function Wt(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Ut.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Ut.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Ut.Inside:n?Ut.OverlapBack:r?Ut.OverlapFront:Ut.Outside}function Gt(e,t){return Wt(e,t)>Ut.After}var Kt=/^[\w\p{L}]$/u;function qt(e,t){if(e){let n=Yt(e,!0);if(n&&Jt(n,t))return n;if(C(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Jt(n,t))return n}}}}function Jt(e,t){return ee(e)&&t.includes(e.tokenType.name)}function Yt(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var Xt=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Zt(e,t=`Error: Got unexpected value.`){throw Error(t)}function L(e){return e.charCodeAt(0)}function Qt(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function $t(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function en(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function tn(){throw Error(`Internal Error - Should never get here!`)}function nn(e){return e.type===`Character`}var rn=[];for(let e=L(`0`);e<=L(`9`);e++)rn.push(e);var an=[L(`_`)].concat(rn);for(let e=L(`a`);e<=L(`z`);e++)an.push(e);for(let e=L(`A`);e<=L(`Z`);e++)an.push(e);var on=[L(` `),L(`\f`),L(`
2
2
  `),L(`\r`),L(` `),L(`\v`),L(` `),L(`\xA0`),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(` `),L(`\u2028`),L(`\u2029`),L(` `),L(` `),L(` `),L(``)],sn=/[0-9a-fA-F]/,cn=/[0-9]/,ln=/[1-9]/,un=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:$t(n,`global`);break;case`i`:$t(n,`ignoreCase`);break;case`m`:$t(n,`multiLine`);break;case`u`:$t(n,`unicode`);break;case`y`:$t(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}en(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return tn()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;en(t);break}if(!(e===!0&&t===void 0)&&en(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),en(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):tn()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[L(`
3
3
  `),L(`\r`),L(`\u2028`),L(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=rn;break;case`D`:e=rn,t=!0;break;case`s`:e=on;break;case`S`:e=on,t=!0;break;case`w`:e=an;break;case`W`:e=an,t=!0;break}return en(e)?{type:`Set`,value:e,complement:t}:tn()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=L(`\f`);break;case`n`:e=L(`
4
4
  `);break;case`r`:e=L(`\r`);break;case`t`:e=L(` `);break;case`v`:e=L(`\v`);break}return en(e)?{type:`Character`,value:e}:tn()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:L(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:L(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -1 +1 @@
1
- import{_ as e,g as t,h as n,i as r,m as i,o as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-R7dAJ4rq.js";var l=class extends s{static{i(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},u={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new r,`ValueConverter`)}};function d(r=n){let i=t(c(r),o),s=t(e({shared:i}),a,u);return i.ServiceRegistry.register(s),{shared:i,Info:s}}i(d,`createInfoServices`);export{d as n,u as t};
1
+ import{_ as e,g as t,h as n,i as r,m as i,o as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-C6ErEFB0.js";var l=class extends s{static{i(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},u={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new r,`ValueConverter`)}};function d(r=n){let i=t(c(r),o),s=t(e({shared:i}),a,u);return i.ServiceRegistry.register(s),{shared:i,Info:s}}i(d,`createInfoServices`);export{d as n,u as t};
@@ -1 +1 @@
1
- import{_ as e,f as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-R7dAJ4rq.js";var l=class extends s{static{i(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{i(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}i(f,`registerValidationChecks`);var p=class{static{i(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new d,`ValueConverter`)},validation:{TreemapValidator:i(()=>new p,`TreemapValidator`)}};function h(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,m);return a.ServiceRegistry.register(s),f(s),{shared:a,Treemap:s}}i(h,`createTreemapServices`);export{h as n,m as t};
1
+ import{_ as e,f as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-C6ErEFB0.js";var l=class extends s{static{i(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{i(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}i(f,`registerValidationChecks`);var p=class{static{i(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:i(()=>new l,`TokenBuilder`),ValueConverter:i(()=>new d,`ValueConverter`)},validation:{TreemapValidator:i(()=>new p,`TreemapValidator`)}};function h(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,m);return a.ServiceRegistry.register(s),f(s),{shared:a,Treemap:s}}i(h,`createTreemapServices`);export{h as n,m as t};
@@ -1 +1 @@
1
- import{_ as e,d as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-R7dAJ4rq.js";var l=class extends a{static{i(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`STRING2`)return t.substring(1,t.length-1)}},u=class extends s{static{i(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},d={parser:{TokenBuilder:i(()=>new u,`TokenBuilder`),ValueConverter:i(()=>new l,`ValueConverter`)}};function f(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,d);return a.ServiceRegistry.register(s),{shared:a,TreeView:s}}i(f,`createTreeViewServices`);export{f as n,d as t};
1
+ import{_ as e,d as t,g as n,h as r,m as i,n as a,s as o,t as s,v as c}from"./chunk-K5T4RW27-C6ErEFB0.js";var l=class extends a{static{i(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`STRING2`)return t.substring(1,t.length-1)}},u=class extends s{static{i(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},d={parser:{TokenBuilder:i(()=>new u,`TokenBuilder`),ValueConverter:i(()=>new l,`ValueConverter`)}};function f(i=r){let a=n(c(i),o),s=n(e({shared:a}),t,d);return a.ServiceRegistry.register(s),{shared:a,TreeView:s}}i(f,`createTreeViewServices`);export{f as n,d as t};
@@ -1,9 +1,9 @@
1
- import{g as e,h as t}from"./src-DdOdIreR.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,s as l,v as u}from"./chunk-ICPOFSXX-C5eNZ4L6.js";import{h as d,o as f}from"./chunk-5PVQY5BW-Cbzhfhln.js";import{t as p}from"./chunk-55IACEB6-CWE_u-IY.js";import{t as m}from"./chunk-EDXVE4YY-DZHAJjMI.js";import{r as h}from"./chunk-336JU56O-DlYgPyl6.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[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],j=[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],M=[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:t(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,"-->":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:`-->`,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:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([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],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(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]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{h as e,o as t}from"./chunk-5PVQY5BW-Ciel-YVc.js";import{i as n,r}from"./src-BfaOho0B.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,s as d,v as f}from"./chunk-ICPOFSXX-C04NFfJk.js";import{t as p}from"./chunk-55IACEB6-C19HKnvd.js";import{t as m}from"./chunk-EDXVE4YY-DNeRJTiS.js";import{r as h}from"./chunk-336JU56O-CQcnUKNW.js";var g=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[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],j=[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],M=[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:r(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,"-->":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:`-->`,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:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:t,5:n,6:i},{1:[3]},{3:5,4:t,5:n,6:i},{3:6,4:t,5:n,6:i},e([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],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(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]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
- Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={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:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
- `+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState(`SCALE`),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin(`acc_title`),33;case 19:return this.popState(),`acc_title_value`;case 20:return this.begin(`acc_descr`),35;case 21:return this.popState(),`acc_descr_value`;case 22:this.begin(`acc_descr_multiline`);break;case 23:this.popState();break;case 24:return`acc_descr_multiline_value`;case 25:return this.pushState(`CLASSDEF`),41;case 26:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 27:return this.popState(),this.pushState(`CLASSDEFID`),42;case 28:return this.popState(),43;case 29:return this.pushState(`CLASS`),48;case 30:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 31:return this.popState(),50;case 32:return this.pushState(`STYLE`),45;case 33:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 34:return this.popState(),47;case 35:return this.pushState(`SCALE`),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState(`STATE`);break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState(`STATE_STRING`);break;case 50:return this.pushState(`STATE_ID`),`AS`;case 51:return this.popState(),`ID`;case 52:this.popState();break;case 53:return`STATE_DESCR`;case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState(`struct`),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin(`NOTE`),29;case 61:return this.popState(),this.pushState(`NOTE_ID`),59;case 62:return this.popState(),this.pushState(`NOTE_ID`),60;case 63:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 64:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 65:break;case 66:return`NOTE_TEXT`;case 67:return this.popState(),`ID`;case 68:return this.popState(),this.pushState(`NOTE_TEXT`),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81: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,/^(?:[^\}]%%[^\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,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/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]*?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:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}})();function P(){this.yy={}}return t(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`TB`,y=`TB`,b=`dir`,x=`state`,S=`root`,C=`relation`,w=`classDef`,T=`style`,E=`applyClass`,D=`default`,O=`divider`,k=`fill:none`,A=`fill: #333`,j=`c`,M=`markdown`,N=`normal`,P=`rect`,F=`rectWithTitle`,ee=`stateStart`,te=`stateEnd`,I=`divider`,L=`roundedWithTitle`,ne=`note`,re=`noteGroup`,R=`statediagram`,ie=`${R}-state`,ae=`transition`,oe=`note`,se=`${ae} note-edge`,ce=`${R}-${oe}`,le=`${R}-cluster`,ue=`${R}-cluster-alt`,z=`parent`,B=`note`,de=`state`,V=`----`,fe=`${V}${B}`,H=`${V}${z}`,U=t((e,t=y)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),pe={getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`),draw:t(async function(t,n,r,i){e.info(`REF0:`),e.info(`Drawing state diagram (v2)`,n);let{securityLevel:a,state:o,layout:s}=c();i.db.extract(i.db.getRootDocV2());let l=i.db.getData(),u=p(n,a);l.type=i.type,l.layoutAlgorithm=s,l.nodeSpacing=o?.nodeSpacing||50,l.rankSpacing=o?.rankSpacing||50,c().look===`neo`?l.markers=[`barbNeo`]:l.markers=[`barb`],l.diagramId=n,await h(l,u);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((t,n)=>{let r=typeof n==`string`?n:typeof n?.id==`string`?n.id:``;if(!r){e.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(n));return}let i=u.node()?.querySelectorAll(`g`),a;if(i?.forEach(e=>{e.textContent?.trim()===r&&(a=e)}),!a){e.warn(`⚠️ Could not find node matching text:`,r);return}let o=a.parentNode;if(!o){e.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),c=t.url.replace(/^"+|"+$/g,``);if(s.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,c),s.setAttribute(`target`,`_blank`),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,``);s.setAttribute(`title`,e)}o.replaceChild(s,a),s.appendChild(a),e.info(`🔗 Wrapped node in <a> tag for:`,r,t.url)})}catch(t){e.error(`❌ Error injecting clickable links:`,t)}d.insertTitle(u,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),m(u,8,R,o?.useMaxWidth??!0)},`draw`),getDir:U},W=new Map,G=0;function K(e=``,t=0,n=``,r=V){return`${de}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}t(K,`stateDomId`);var me=t((t,n,r,i,a,o,s,u)=>{e.trace(`items`,n),n.forEach(e=>{switch(e.stmt){case x:X(t,e,r,i,a,o,s,u);break;case D:X(t,e,r,i,a,o,s,u);break;case C:{X(t,e.state1,r,i,a,o,s,u),X(t,e.state2,r,i,a,o,s,u);let n=s===`neo`,d={id:`edge`+G,start:e.state1.id,end:e.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:k,labelStyle:``,label:l.sanitizeText(e.description??``,c()),arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,classes:ae,look:s};a.push(d),G++}break}})},`setupDoc`),q=t((e,t=y)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}t(J,`insertOrUpdateNode`);function Y(e){return e?.classes?.join(` `)??``}t(Y,`getClassesFromDbInfo`);function he(e){return e?.styles??[]}t(he,`getStylesFromDbInfo`);var X=t((t,n,r,i,a,o,s,u)=>{let d=n.id,f=r.get(d),p=Y(f),m=he(f),h=c();if(e.info(`dataFetcher parsedItem`,n,f,m),d!==`root`){let r=P;n.start===!0?r=ee:n.start===!1&&(r=te),n.type!==D&&(r=n.type),W.get(d)||W.set(d,{id:d,shape:r,description:l.sanitizeText(d,h),cssClasses:`${p} ${ie}`,cssStyles:m});let c=W.get(d);n.description&&(Array.isArray(c.description)?(c.shape=F,c.description.push(n.description)):c.description?.length&&c.description.length>0?(c.shape=F,c.description===d?c.description=[n.description]:c.description=[c.description,n.description]):(c.shape=P,c.description=n.description),c.description=l.sanitizeTextOrArray(c.description,h)),c.description?.length===1&&c.shape===F&&(c.type===`group`?c.shape=L:c.shape=P),!c.type&&n.doc&&(e.info(`Setting cluster for XCX`,d,q(n)),c.type=`group`,c.isGroup=!0,c.dir=q(n),c.shape=n.type===O?I:L,c.cssClasses=`${c.cssClasses} ${le} ${o?ue:``}`);let f={labelStyle:``,shape:c.shape,label:c.description,cssClasses:c.cssClasses,cssCompiledStyles:[],cssStyles:c.cssStyles,id:d,dir:c.dir,domId:K(d,G),type:c.type,isGroup:c.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===I&&(f.label=``),t&&t.id!==`root`&&(e.trace(`Setting node `,d,` to be child of its parent `,t.id),f.parentId=t.id),f.centerLabel=!0,n.note){let e={labelStyle:``,shape:ne,label:n.note.text,labelType:`markdown`,cssClasses:ce,cssStyles:[],cssCompiledStyles:[],id:d+fe+`-`+G,domId:K(d,G,B),type:c.type,isGroup:c.type===`group`,padding:h.flowchart?.padding,look:s,position:n.note.position},t=d+H,r={labelStyle:``,shape:re,label:n.note.text,cssClasses:c.cssClasses,cssStyles:[],id:d+H,domId:K(d,G,z),type:`group`,isGroup:!0,padding:16,look:s,position:n.note.position};G++,r.id=t,e.parentId=t,J(i,r,u),J(i,e,u),J(i,f,u);let o=d,l=e.id;n.note.position===`left of`&&(o=e.id,l=d),a.push({id:o+`-`+l,start:o,end:l,arrowhead:`none`,arrowTypeEnd:``,style:k,labelStyle:``,classes:se,arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,look:s})}else J(i,f,u)}n.doc&&(e.trace(`Adding nodes children `),me(n,n.doc,r,i,a,!o,s,u))},`dataFetcher`),ge=t(()=>{W.clear(),G=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},_e=t(()=>new Map,`newClassesList`),Q=t(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=t(e=>JSON.parse(JSON.stringify(e)),`clone`),ve=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=_e(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=u,this.setAccTitle=i,this.getAccDescription=o,this.setAccDescription=n,this.setDiagramTitle=a,this.getDiagramTitle=r,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)}static{t(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case x:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case C:this.addRelation(t.state1,t.state2,t.description);break;case w:this.addStyleClass(t.id.trim(),t.classes);break;case T:this.handleStyleDef(t);break;case E:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=c();ge(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(t){e.info(`Setting root doc`,t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===C){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===x&&(t.id===Z.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==S&&t.stmt!==x||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===O){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:x,id:f(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:S,stmt:S},{id:S,stmt:S,doc:this.rootDoc},!0),{id:S,doc:this.rootDoc}}addState(t,n=D,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0){let d=t?.trim();if(!this.currentDocument.states.has(d))e.info(`Adding state `,d,i),this.currentDocument.states.set(d,{stmt:x,id:d,descriptions:[],type:n,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.doc||=r,e.type||=n}if(i&&(e.info(`Setting state description`,d,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(d,e.trim()))),a){let e=this.currentDocument.states.get(d);if(!e)throw Error(`State not found: ${d}`);e.note=a,e.note.text=l.sanitizeText(e.note.text,c())}o&&(e.info(`Setting state classes`,d,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(d,e.trim()))),s&&(e.info(`Setting state styles`,d,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(d,e.trim()))),u&&(e.info(`Setting state styles`,d,s),(Array.isArray(u)?u:[u]).forEach(e=>this.setTextStyle(d,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=_e(),e||(this.links=new Map,s())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){e.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,n,r){this.links.set(t,{url:n,tooltip:r}),e.warn(`Adding link`,t,n,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=D){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=D){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:l.sanitizeText(n,c())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?l.sanitizeText(n,c()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(l.sanitizeText(r,c()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===b)}getDirection(){return this.getDirectionStatement()?.value??v}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:b,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=c();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:U(this.getRootDocV2())}}getConfig(){return c().state}},ye=t(e=>`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={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:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:r(function(){return this.next()||this.lex()},`lex`),begin:r(function(e){this.conditionStack.push(e)},`begin`),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:r(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:r(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:r(function(e){this.begin(e)},`pushState`),stateStackSize:r(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:r(function(e,t,n,r){switch(n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState(`SCALE`),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin(`acc_title`),33;case 19:return this.popState(),`acc_title_value`;case 20:return this.begin(`acc_descr`),35;case 21:return this.popState(),`acc_descr_value`;case 22:this.begin(`acc_descr_multiline`);break;case 23:this.popState();break;case 24:return`acc_descr_multiline_value`;case 25:return this.pushState(`CLASSDEF`),41;case 26:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 27:return this.popState(),this.pushState(`CLASSDEFID`),42;case 28:return this.popState(),43;case 29:return this.pushState(`CLASS`),48;case 30:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 31:return this.popState(),50;case 32:return this.pushState(`STYLE`),45;case 33:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 34:return this.popState(),47;case 35:return this.pushState(`SCALE`),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState(`STATE`);break;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState(`STATE_STRING`);break;case 50:return this.pushState(`STATE_ID`),`AS`;case 51:return this.popState(),`ID`;case 52:this.popState();break;case 53:return`STATE_DESCR`;case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState(`struct`),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin(`NOTE`),29;case 61:return this.popState(),this.pushState(`NOTE_ID`),59;case 62:return this.popState(),this.pushState(`NOTE_ID`),60;case 63:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 64:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 65:break;case 66:return`NOTE_TEXT`;case 67:return this.popState(),`ID`;case 68:return this.popState(),this.pushState(`NOTE_TEXT`),24;case 69:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 70:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return t.yytext=t.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81: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,/^(?:[^\}]%%[^\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,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/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]*?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:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}})();function P(){this.yy={}}return r(P,`Parser`),P.prototype=N,N.Parser=P,new P})();g.parser=g;var _=g,v=`TB`,y=`TB`,b=`dir`,x=`state`,S=`root`,C=`relation`,w=`classDef`,T=`style`,E=`applyClass`,D=`default`,O=`divider`,k=`fill:none`,A=`fill: #333`,j=`c`,M=`markdown`,N=`normal`,P=`rect`,F=`rectWithTitle`,ee=`stateStart`,te=`stateEnd`,I=`divider`,L=`roundedWithTitle`,ne=`note`,re=`noteGroup`,R=`statediagram`,ie=`${R}-state`,ae=`transition`,oe=`note`,se=`${ae} note-edge`,ce=`${R}-${oe}`,le=`${R}-cluster`,ue=`${R}-cluster-alt`,z=`parent`,B=`note`,de=`state`,V=`----`,fe=`${V}${B}`,H=`${V}${z}`,U=r((e,t=y)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),pe={getClasses:r(function(e,t){return t.db.getClasses()},`getClasses`),draw:r(async function(t,r,i,a){n.info(`REF0:`),n.info(`Drawing state diagram (v2)`,r);let{securityLevel:o,state:s,layout:c}=u();a.db.extract(a.db.getRootDocV2());let l=a.db.getData(),d=p(r,o);l.type=a.type,l.layoutAlgorithm=c,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,u().look===`neo`?l.markers=[`barbNeo`]:l.markers=[`barb`],l.diagramId=r,await h(l,d);try{(typeof a.db.getLinks==`function`?a.db.getLinks():new Map).forEach((e,t)=>{let r=typeof t==`string`?t:typeof t?.id==`string`?t.id:``;if(!r){n.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let i=d.node()?.querySelectorAll(`g`),a;if(i?.forEach(e=>{e.textContent?.trim()===r&&(a=e)}),!a){n.warn(`⚠️ Could not find node matching text:`,r);return}let o=a.parentNode;if(!o){n.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),c=e.url.replace(/^"+|"+$/g,``);if(s.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,c),s.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);s.setAttribute(`title`,t)}o.replaceChild(s,a),s.appendChild(a),n.info(`🔗 Wrapped node in <a> tag for:`,r,e.url)})}catch(e){n.error(`❌ Error injecting clickable links:`,e)}e.insertTitle(d,`statediagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),m(d,8,R,s?.useMaxWidth??!0)},`draw`),getDir:U},W=new Map,G=0;function K(e=``,t=0,n=``,r=V){return`${de}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}r(K,`stateDomId`);var me=r((e,t,r,i,a,o,s,c)=>{n.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case x:X(e,t,r,i,a,o,s,c);break;case D:X(e,t,r,i,a,o,s,c);break;case C:{X(e,t.state1,r,i,a,o,s,c),X(e,t.state2,r,i,a,o,s,c);let n=s===`neo`,l={id:`edge`+G,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:k,labelStyle:``,label:d.sanitizeText(t.description??``,u()),arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,classes:ae,look:s};a.push(l),G++}break}})},`setupDoc`),q=r((e,t=y)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function J(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}r(J,`insertOrUpdateNode`);function Y(e){return e?.classes?.join(` `)??``}r(Y,`getClassesFromDbInfo`);function he(e){return e?.styles??[]}r(he,`getStylesFromDbInfo`);var X=r((e,t,r,i,a,o,s,c)=>{let l=t.id,f=r.get(l),p=Y(f),m=he(f),h=u();if(n.info(`dataFetcher parsedItem`,t,f,m),l!==`root`){let r=P;t.start===!0?r=ee:t.start===!1&&(r=te),t.type!==D&&(r=t.type),W.get(l)||W.set(l,{id:l,shape:r,description:d.sanitizeText(l,h),cssClasses:`${p} ${ie}`,cssStyles:m});let u=W.get(l);t.description&&(Array.isArray(u.description)?(u.shape=F,u.description.push(t.description)):u.description?.length&&u.description.length>0?(u.shape=F,u.description===l?u.description=[t.description]:u.description=[u.description,t.description]):(u.shape=P,u.description=t.description),u.description=d.sanitizeTextOrArray(u.description,h)),u.description?.length===1&&u.shape===F&&(u.type===`group`?u.shape=L:u.shape=P),!u.type&&t.doc&&(n.info(`Setting cluster for XCX`,l,q(t)),u.type=`group`,u.isGroup=!0,u.dir=q(t),u.shape=t.type===O?I:L,u.cssClasses=`${u.cssClasses} ${le} ${o?ue:``}`);let f={labelStyle:``,shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:l,dir:u.dir,domId:K(l,G),type:u.type,isGroup:u.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===I&&(f.label=``),e&&e.id!==`root`&&(n.trace(`Setting node `,l,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,t.note){let e={labelStyle:``,shape:ne,label:t.note.text,labelType:`markdown`,cssClasses:ce,cssStyles:[],cssCompiledStyles:[],id:l+fe+`-`+G,domId:K(l,G,B),type:u.type,isGroup:u.type===`group`,padding:h.flowchart?.padding,look:s,position:t.note.position},n=l+H,r={labelStyle:``,shape:re,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:l+H,domId:K(l,G,z),type:`group`,isGroup:!0,padding:16,look:s,position:t.note.position};G++,r.id=n,e.parentId=n,J(i,r,c),J(i,e,c),J(i,f,c);let o=l,d=e.id;t.note.position===`left of`&&(o=e.id,d=l),a.push({id:o+`-`+d,start:o,end:d,arrowhead:`none`,arrowTypeEnd:``,style:k,labelStyle:``,classes:se,arrowheadStyle:A,labelpos:j,labelType:M,thickness:N,look:s})}else J(i,f,c)}t.doc&&(n.trace(`Adding nodes children `),me(t,t.doc,r,i,a,!o,s,c))},`dataFetcher`),ge=r(()=>{W.clear(),G=0},`reset`),Z={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},_e=r(()=>new Map,`newClassesList`),Q=r(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=r(e=>JSON.parse(JSON.stringify(e)),`clone`),ve=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=_e(),this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=f,this.setAccTitle=o,this.getAccDescription=c,this.setAccDescription=i,this.setDiagramTitle=s,this.getDiagramTitle=a,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)}static{r(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case x:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case C:this.addRelation(t.state1,t.state2,t.description);break;case w:this.addStyleClass(t.id.trim(),t.classes);break;case T:this.handleStyleDef(t);break;case E:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=u();ge(),X(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){n.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,n,r){if(n.stmt===C){this.docTranslator(e,n.state1,!0),this.docTranslator(e,n.state2,!1);return}if(n.stmt===x&&(n.id===Z.START_NODE?(n.id=e.id+(r?`_start`:`_end`),n.start=r):n.id=n.id.trim()),n.stmt!==S&&n.stmt!==x||!n.doc)return;let i=[],a=[];for(let e of n.doc)if(e.type===O){let t=$(e);t.doc=$(a),i.push(t),a=[]}else a.push(e);if(i.length>0&&a.length>0){let e={stmt:x,id:t(),type:`divider`,doc:$(a)};i.push($(e)),n.doc=i}n.doc.forEach(e=>this.docTranslator(n,e,!0))}getRootDocV2(){return this.docTranslator({id:S,stmt:S},{id:S,stmt:S,doc:this.rootDoc},!0),{id:S,doc:this.rootDoc}}addState(e,t=D,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,c=void 0){let l=e?.trim();if(!this.currentDocument.states.has(l))n.info(`Adding state `,l,i),this.currentDocument.states.set(l,{stmt:x,id:l,descriptions:[],type:t,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.doc||=r,e.type||=t}if(i&&(n.info(`Setting state description`,l,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(l,e.trim()))),a){let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.note=a,e.note.text=d.sanitizeText(e.note.text,u())}o&&(n.info(`Setting state classes`,l,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(n.info(`Setting state styles`,l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),c&&(n.info(`Setting state styles`,l,s),(Array.isArray(c)?c:[c]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Q()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=_e(),e||(this.links=new Map,l())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){n.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),n.warn(`Adding link`,e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Z.START_NODE?(this.startEndCount++,`${Z.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=D){return e===Z.START_NODE?Z.START_TYPE:t}endIdIfNeeded(e=``){return e===Z.END_NODE?(this.startEndCount++,`${Z.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=D){return e===Z.END_NODE?Z.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:d.sanitizeText(n,u())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?d.sanitizeText(n,u()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(d.sanitizeText(r,u()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Z.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Z.COLOR_KEYWORD).exec(e)){let e=t.replace(Z.FILL_KEYWORD,Z.BG_FILL).replace(Z.COLOR_KEYWORD,Z.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===b)}getDirection(){return this.getDirectionStatement()?.value??v}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:b,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=u();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:U(this.getRootDocV2())}}getConfig(){return u().state}},ye=r(e=>`
7
7
  defs [id$="-barbEnd"] {
8
8
  fill: ${e.transitionColor};
9
9
  stroke: ${e.transitionColor};
@@ -0,0 +1 @@
1
+ import{r as e}from"./src-BfaOho0B.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./src-DdOdIreR.js";import{L as r,P as i,k as a,s as o,y as s}from"./chunk-ICPOFSXX-C5eNZ4L6.js";import{i as c}from"./chunk-5PVQY5BW-Cbzhfhln.js";var l=Object.freeze({left:0,top:0,width:16,height:16}),u=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),d=Object.freeze({...l,...u}),f=Object.freeze({...d,body:``,hidden:!1}),p=Object.freeze({width:null,height:null}),m=Object.freeze({...p,...u}),h=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!g(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!g(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!g(e,n)?null:e}return null},g=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function ee(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function te(e,t){let n=ee(e,t);for(let r in f)r in u?r in e&&!(r in n)&&(n[r]=u[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ne(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function re(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=te(r[e]||i[e],a)}return o(t),n.forEach(o),te(e,a)}function ie(e,t){if(e.icons[t])return re(e,t,[]);let n=ne(e,[t])[t];return n?re(e,t,n):null}var ae=/(-?[0-9.]*[0-9]+[0-9.]*)/g,oe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function se(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(ae);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=oe.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function ce(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function le(e,t){return e?`<defs>`+e+`</defs>`+t:t}function ue(e,t,n){let r=ce(e);return le(r.defs,t+r.content+n)}var de=e=>e===`unset`||e===`undefined`||e===`none`;function fe(e,t){let n={...d,...e},r={...m,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=ue(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,f;o===null?(f=s===null?`1em`:s===`auto`?l:s,u=se(f,c/l)):(u=o===`auto`?c:o,f=s===null?se(u,l/c):s===`auto`?l:s);let p={},h=(e,t)=>{de(t)||(p[e]=t.toString())};h(`width`,u),h(`height`,f);let g=[i.left,i.top,c,l];return p.viewBox=g.join(` `),{attributes:p,viewBox:g,body:a}}var pe=/\sid="(\S+)"/g,me=new Map;function he(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=me.get(e)||0;return me.set(e,t+1),t?`${e}${t}`:e}function ge(e){let t=[],n;for(;n=pe.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=he(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function _e(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function _(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v=_();function ve(e){v=e}var y={exec:()=>null};function b(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(x.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ye=(()=>{try{return!0}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},be=/^(?:[ \t]*(?:\n|$))+/,xe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Se=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ce=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,C=/(?:[*+-]|\d{1,9}[.)])/,we=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Te=b(we).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ee=b(we).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),w=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,De=/^[^\n]+/,T=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Oe=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,T).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ke=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C).getRegex(),E=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,D=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ae=b(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,D).replace(`tag`,E).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),je=b(w).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex(),O={blockquote:b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,je).getRegex(),code:xe,def:Oe,fences:Se,heading:Ce,hr:S,html:Ae,lheading:Te,list:ke,newline:be,paragraph:je,table:y,text:De},Me=b(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex(),Ne={...O,lheading:Ee,table:Me,paragraph:b(w).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Me).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex()},Pe={...O,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,D).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:y,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(w).replace(`hr`,S).replace(`heading`,` *#{1,6} *[^
1
+ import{i as e}from"./chunk-5PVQY5BW-Ciel-YVc.js";import{i as t,r as n,t as r}from"./src-BfaOho0B.js";import{L as i,P as a,k as o,s,y as c}from"./chunk-ICPOFSXX-C04NFfJk.js";var l=Object.freeze({left:0,top:0,width:16,height:16}),u=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),d=Object.freeze({...l,...u}),f=Object.freeze({...d,body:``,hidden:!1}),p=Object.freeze({width:null,height:null}),m=Object.freeze({...p,...u}),h=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!g(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!g(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!g(e,n)?null:e}return null},g=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function ee(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function te(e,t){let n=ee(e,t);for(let r in f)r in u?r in e&&!(r in n)&&(n[r]=u[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ne(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function re(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=te(r[e]||i[e],a)}return o(t),n.forEach(o),te(e,a)}function ie(e,t){if(e.icons[t])return re(e,t,[]);let n=ne(e,[t])[t];return n?re(e,t,n):null}var ae=/(-?[0-9.]*[0-9]+[0-9.]*)/g,oe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function se(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(ae);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=oe.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function ce(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function le(e,t){return e?`<defs>`+e+`</defs>`+t:t}function ue(e,t,n){let r=ce(e);return le(r.defs,t+r.content+n)}var de=e=>e===`unset`||e===`undefined`||e===`none`;function fe(e,t){let n={...d,...e},r={...m,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=ue(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,f;o===null?(f=s===null?`1em`:s===`auto`?l:s,u=se(f,c/l)):(u=o===`auto`?c:o,f=s===null?se(u,l/c):s===`auto`?l:s);let p={},h=(e,t)=>{de(t)||(p[e]=t.toString())};h(`width`,u),h(`height`,f);let g=[i.left,i.top,c,l];return p.viewBox=g.join(` `),{attributes:p,viewBox:g,body:a}}var pe=/\sid="(\S+)"/g,me=new Map;function he(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=me.get(e)||0;return me.set(e,t+1),t?`${e}${t}`:e}function ge(e){let t=[],n;for(;n=pe.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=he(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function _e(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function _(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v=_();function ve(e){v=e}var y={exec:()=>null};function b(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(x.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ye=(()=>{try{return!0}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},be=/^(?:[ \t]*(?:\n|$))+/,xe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Se=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ce=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,C=/(?:[*+-]|\d{1,9}[.)])/,we=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Te=b(we).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ee=b(we).replace(/bull/g,C).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),w=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,De=/^[^\n]+/,T=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Oe=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,T).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ke=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C).getRegex(),E=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,D=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ae=b(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,D).replace(`tag`,E).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),je=b(w).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex(),O={blockquote:b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,je).getRegex(),code:xe,def:Oe,fences:Se,heading:Ce,hr:S,html:Ae,lheading:Te,list:ke,newline:be,paragraph:je,table:y,text:De},Me=b(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex(),Ne={...O,lheading:Ee,table:Me,paragraph:b(w).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Me).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,E).getRegex()},Pe={...O,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,D).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:y,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(w).replace(`hr`,S).replace(`heading`,` *#{1,6} *[^
2
2
  ]`).replace(`lheading`,Te).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Fe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ie=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Le=/^( {2,}|\\)\n(?!\s*$)/,Re=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,k=/[\p{P}\p{S}]/u,A=/[\s\p{P}\p{S}]/u,ze=/[^\s\p{P}\p{S}]/u,Be=b(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,A).getRegex(),Ve=/(?!~)[\p{P}\p{S}]/u,He=/(?!~)[\s\p{P}\p{S}]/u,Ue=/(?:[^\s\p{P}\p{S}]|~)/u,We=b(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ye?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Ge=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ke=b(Ge,`u`).replace(/punct/g,k).getRegex(),qe=b(Ge,`u`).replace(/punct/g,Ve).getRegex(),Je=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ye=b(Je,`gu`).replace(/notPunctSpace/g,ze).replace(/punctSpace/g,A).replace(/punct/g,k).getRegex(),Xe=b(Je,`gu`).replace(/notPunctSpace/g,Ue).replace(/punctSpace/g,He).replace(/punct/g,Ve).getRegex(),Ze=b(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ze).replace(/punctSpace/g,A).replace(/punct/g,k).getRegex(),Qe=b(/\\(punct)/,`gu`).replace(/punct/g,k).getRegex(),$e=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),et=b(D).replace(`(?:-->|$)`,`-->`).getRegex(),tt=b(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,et).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,nt=b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,j).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rt=b(/^!?\[(label)\]\[(ref)\]/).replace(`label`,j).replace(`ref`,T).getRegex(),it=b(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,T).getRegex(),at=b(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,rt).replace(`nolink`,it).getRegex(),ot=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,M={_backpedal:y,anyPunctuation:Qe,autolink:$e,blockSkip:We,br:Le,code:Ie,del:y,emStrongLDelim:Ke,emStrongRDelimAst:Ye,emStrongRDelimUnd:Ze,escape:Fe,link:nt,nolink:it,punctuation:Be,reflink:rt,reflinkSearch:at,tag:tt,text:Re,url:y},st={...M,link:b(/^!?\[(label)\]\((.*?)\)/).replace(`label`,j).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,j).getRegex()},N={...M,emStrongRDelimAst:Xe,emStrongLDelim:qe,url:b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,ot).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,ot).getRegex()},ct={...N,br:b(Le).replace(`{2,}`,`*`).getRegex(),text:b(N.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},P={normal:O,gfm:Ne,pedantic:Pe},F={normal:M,gfm:N,breaks:ct,pedantic:st},lt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},ut=e=>lt[e];function I(e,t){if(t){if(x.escapeTest.test(e))return e.replace(x.escapeReplace,ut)}else if(x.escapeTestNoEncode.test(e))return e.replace(x.escapeReplaceNoEncode,ut);return e}function dt(e){try{e=encodeURI(e).replace(x.percentDecode,`%`)}catch{return null}return e}function ft(e,t){let n=e.replace(x.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(x.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(x.slashPipe,`|`);return n}function L(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function pt(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function mt(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function ht(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
3
3
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
4
4
  `)}var R=class{options;rules;lexer;constructor(e){this.options=e||v}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:L(e,`
@@ -62,9 +62,9 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
62
62
  `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
63
63
  `)&&(o=String(e).split(`
64
64
  `).map(function(e,t){return t===0?e:``+i+e}).join(`
65
- `)),a+=o+n[t+1]}),a}var _t={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},K=new Map,vt=new Map,yt=t(t=>{for(let n of t){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(e.debug(`Registering icon pack:`,n.name),`loader`in n)vt.set(n.name,n.loader);else if(`icons`in n)K.set(n.name,n.icons);else throw e.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),bt=t(async(t,n)=>{let r=h(t,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${t}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let a=K.get(i);if(!a){let t=vt.get(i);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},K.set(i,a)}catch(t){throw e.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let o=ie(a,r.name);if(!o)throw Error(`Icon not found: ${t}`);return o},`getRegisteredIconData`),xt=t(async e=>{try{return await bt(e),!0}catch{return!1}},`isIconAvailable`),St=t(async(t,n,i)=>{let a;try{a=await bt(t,n?.fallbackPrefix)}catch(t){e.error(t),a=_t}let o=fe(a,n);return r(_e(ge(o.body),{...o.attributes,...i}),s())},`getIconSVG`);function Ct(e,{markdownAutoWrap:t}){return gt(e.replace(/<br\/>/g,`
65
+ `)),a+=o+n[t+1]}),a}var _t={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},K=new Map,vt=new Map,yt=n(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)vt.set(n.name,n.loader);else if(`icons`in n)K.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),bt=n(async(e,n)=>{let r=h(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=K.get(i);if(!a){let e=vt.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},K.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=ie(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),xt=n(async e=>{try{return await bt(e),!0}catch{return!1}},`isIconAvailable`),St=n(async(e,n,r)=>{let a;try{a=await bt(e,n?.fallbackPrefix)}catch(e){t.error(e),a=_t}let o=fe(a,n);return i(_e(ge(o.body),{...o.attributes,...r}),c())},`getIconSVG`);function Ct(e,{markdownAutoWrap:t}){return gt(e.replace(/<br\/>/g,`
66
66
  `).replace(/\n{2,}/g,`
67
- `))}t(Ct,`preprocessMarkdown`);function wt(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}t(wt,`nonMarkdownToLines`);function Tt(e,n={}){let r=Ct(e,n),i=G.lexer(r),a=[[]],o=0;function s(e,t=`normal`){e.type===`text`?e.text.split(`
68
- `).forEach((e,n)=>{n!==0&&(o++,a.push([])),e.split(` `).forEach(e=>{e=e.replace(/&#39;/g,`'`),e&&a[o].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{s(t,e.type)}):e.type===`html`&&a[o].push({content:e.text,type:`normal`})}return t(s,`processNode`),i.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{s(e)}):e.type===`html`?a[o].push({content:e.text,type:`normal`}):a[o].push({content:e.raw,type:`normal`})}),a}t(Tt,`markdownToLines`);function Et(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}t(Et,`nonMarkdownToHTML`);function Dt(n,{markdownAutoWrap:r}={}){let i=G.lexer(n);function a(t){return t.type===`text`?r===!1?t.text.replace(/\n */g,`<br/>`).replace(/ /g,`&nbsp;`):t.text.replace(/\n */g,`<br/>`):t.type===`strong`?`<strong>${t.tokens?.map(a).join(``)}</strong>`:t.type===`em`?`<em>${t.tokens?.map(a).join(``)}</em>`:t.type===`paragraph`?`<p>${t.tokens?.map(a).join(``)}</p>`:t.type===`space`?``:t.type===`html`?`${t.text}`:t.type===`escape`?t.text:(e.warn(`Unsupported markdown: ${t.type}`),t.raw)}return t(a,`output`),i.map(a).join(``)}t(Dt,`markdownToHTML`);function Ot(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}t(Ot,`splitTextToChars`);function kt(e,t){return q(e,[],Ot(t.content),t.type)}t(kt,`splitWordToFitWidth`);function q(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?q(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}t(q,`splitWordToFitWidthRecursion`);function At(e,t){if(e.some(({content:e})=>e.includes(`
69
- `)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return J(e,t)}t(At,`splitLineToFitWidth`);function J(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return J(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=kt(t,a);n.push([r]),i.content&&e.unshift(i)}return J(e,t,n)}t(J,`splitLineToFitWidthRecursion`);function Y(e,t){t&&e.attr(`style`,t)}t(Y,`applyStyle`);var jt=16384;async function Mt(e,t,n,c,l=!1,u=s()){let d=e.append(`foreignObject`);d.attr(`width`,`${Math.min(10*n,jt)}px`),d.attr(`height`,`${Math.min(10*n,jt)}px`);let f=d.append(`xhtml:div`),p=a(t.label)?await i(t.label.replace(o.lineBreakRegex,`
70
- `),u):r(t.label,u),m=t.isNode?`nodeLabel`:`edgeLabel`,h=f.append(`span`);h.html(p),Y(h,t.labelStyle),h.attr(`class`,`${m} ${c}`),Y(f,t.labelStyle),f.style(`display`,`table-cell`),f.style(`white-space`,`nowrap`),f.style(`line-height`,`1.5`),n!==1/0&&(f.style(`max-width`,n+`px`),f.style(`text-align`,`center`)),f.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),l&&f.attr(`class`,`labelBkg`);let g=f.node().getBoundingClientRect();return g.width===n&&(f.style(`display`,`table`),f.style(`white-space`,`break-spaces`),f.style(`width`,n+`px`),g=f.node().getBoundingClientRect()),d.node()}t(Mt,`addHtmlSpan`);function X(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}t(X,`createTspan`);function Nt(e,t,n){let r=e.append(`text`),i=X(r,1,t);$(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}t(Nt,`computeWidthOfText`);function Pt(e,t,n){let r=e.append(`text`),i=X(r,1,t);$(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}t(Pt,`computeDimensionOfText`);function Z(e,n,r,i=!1,a=!1){let o=1.1,s=n.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let n of r){let r=t(t=>Nt(s,o,t)<=e,`checkWidth`),i=r(n)?[n]:At(n,r);for(let e of i)$(X(l,u,o,a),e),u++}if(i){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}else return l.node()}t(Z,`createFormattedText`);function Q(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}t(Q,`decodeHTMLEntities`);function $(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Q(t.content)):r.text(` `+Q(t.content))})}t($,`updateTextContentAndStyles`);async function Ft(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,i,a)=>(n.push((async()=>{let n=`${i}:${a}`;return await xt(n)?await St(n,void 0,{class:`label-icon`}):`<i class='${r(e,t).replace(`:`,` `)}'></i>`})()),e));let i=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??``)}t(Ft,`replaceIconSubstring`);var It=t(async(t,r=``,{style:i=``,isTitle:o=!1,classes:s=``,useHtmlLabels:l=!0,markdown:u=!0,isNode:d=!0,width:f=200,addSvgBackground:p=!1}={},m)=>{if(e.debug(`XYZ createText`,r,i,o,s,l,d,`addSvgBackground: `,p),l){let e=await Ft(c(u?Dt(r,m):Et(r)),m),n=r.replace(/\\\\/g,`\\`);return await Mt(t,{isNode:d,label:a(r)?n:e,labelStyle:i.replace(`fill:`,`color:`)},f,s,p,m)}else{let e=c(r.replace(/<br\s*\/?>/g,`<br/>`)),a=Z(f,t,u?Tt(e.replace(`<br>`,`<br/>`),m):wt(e),r?p:!1,!d);if(d){/stroke:/.exec(i)&&(i=i.replace(`stroke:`,`lineColor:`));let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);n(a).attr(`style`,e)}else{let e=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);n(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=i.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);n(a).select(`text`).attr(`style`,t)}return o?n(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):n(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`);export{_t as a,yt as i,It as n,gt as o,St as r,Pt as t};
67
+ `))}n(Ct,`preprocessMarkdown`);function wt(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}n(wt,`nonMarkdownToLines`);function Tt(e,t={}){let r=Ct(e,t),i=G.lexer(r),a=[[]],o=0;function s(e,t=`normal`){e.type===`text`?e.text.split(`
68
+ `).forEach((e,n)=>{n!==0&&(o++,a.push([])),e.split(` `).forEach(e=>{e=e.replace(/&#39;/g,`'`),e&&a[o].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{s(t,e.type)}):e.type===`html`&&a[o].push({content:e.text,type:`normal`})}return n(s,`processNode`),i.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{s(e)}):e.type===`html`?a[o].push({content:e.text,type:`normal`}):a[o].push({content:e.raw,type:`normal`})}),a}n(Tt,`markdownToLines`);function Et(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}n(Et,`nonMarkdownToHTML`);function Dt(e,{markdownAutoWrap:r}={}){let i=G.lexer(e);function a(e){return e.type===`text`?r===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,`&nbsp;`):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(a).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(a).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(a).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(t.warn(`Unsupported markdown: ${e.type}`),e.raw)}return n(a,`output`),i.map(a).join(``)}n(Dt,`markdownToHTML`);function Ot(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}n(Ot,`splitTextToChars`);function kt(e,t){return q(e,[],Ot(t.content),t.type)}n(kt,`splitWordToFitWidth`);function q(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?q(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}n(q,`splitWordToFitWidthRecursion`);function At(e,t){if(e.some(({content:e})=>e.includes(`
69
+ `)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return J(e,t)}n(At,`splitLineToFitWidth`);function J(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return J(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=kt(t,a);n.push([r]),i.content&&e.unshift(i)}return J(e,t,n)}n(J,`splitLineToFitWidthRecursion`);function Y(e,t){t&&e.attr(`style`,t)}n(Y,`applyStyle`);var jt=16384;async function Mt(e,t,n,r,l=!1,u=c()){let d=e.append(`foreignObject`);d.attr(`width`,`${Math.min(10*n,jt)}px`),d.attr(`height`,`${Math.min(10*n,jt)}px`);let f=d.append(`xhtml:div`),p=o(t.label)?await a(t.label.replace(s.lineBreakRegex,`
70
+ `),u):i(t.label,u),m=t.isNode?`nodeLabel`:`edgeLabel`,h=f.append(`span`);h.html(p),Y(h,t.labelStyle),h.attr(`class`,`${m} ${r}`),Y(f,t.labelStyle),f.style(`display`,`table-cell`),f.style(`white-space`,`nowrap`),f.style(`line-height`,`1.5`),n!==1/0&&(f.style(`max-width`,n+`px`),f.style(`text-align`,`center`)),f.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),l&&f.attr(`class`,`labelBkg`);let g=f.node().getBoundingClientRect();return g.width===n&&(f.style(`display`,`table`),f.style(`white-space`,`break-spaces`),f.style(`width`,n+`px`),g=f.node().getBoundingClientRect()),d.node()}n(Mt,`addHtmlSpan`);function X(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}n(X,`createTspan`);function Nt(e,t,n){let r=e.append(`text`),i=X(r,1,t);$(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}n(Nt,`computeWidthOfText`);function Pt(e,t,n){let r=e.append(`text`),i=X(r,1,t);$(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}n(Pt,`computeDimensionOfText`);function Z(e,t,r,i=!1,a=!1){let o=1.1,s=t.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of r){let r=n(t=>Nt(s,o,t)<=e,`checkWidth`),i=r(t)?[t]:At(t,r);for(let e of i)$(X(l,u,o,a),e),u++}if(i){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}else return l.node()}n(Z,`createFormattedText`);function Q(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}n(Q,`decodeHTMLEntities`);function $(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Q(t.content)):r.text(` `+Q(t.content))})}n($,`updateTextContentAndStyles`);async function Ft(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,a)=>(n.push((async()=>{let n=`${r}:${a}`;return await xt(n)?await St(n,void 0,{class:`label-icon`}):`<i class='${i(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}n(Ft,`replaceIconSubstring`);var It=n(async(n,i=``,{style:a=``,isTitle:s=!1,classes:c=``,useHtmlLabels:l=!0,markdown:u=!0,isNode:d=!0,width:f=200,addSvgBackground:p=!1}={},m)=>{if(t.debug(`XYZ createText`,i,a,s,c,l,d,`addSvgBackground: `,p),l){let t=await Ft(e(u?Dt(i,m):Et(i)),m),r=i.replace(/\\\\/g,`\\`);return await Mt(n,{isNode:d,label:o(i)?r:t,labelStyle:a.replace(`fill:`,`color:`)},f,c,p,m)}else{let t=e(i.replace(/<br\s*\/?>/g,`<br/>`)),o=Z(f,n,u?Tt(t.replace(`<br>`,`<br/>`),m):wt(t),i?p:!1,!d);if(d){/stroke:/.exec(a)&&(a=a.replace(`stroke:`,`lineColor:`));let e=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);r(o).attr(`style`,e)}else{let e=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);r(o).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);r(o).select(`text`).attr(`style`,t)}return s?r(o).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):r(o).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),o}},`createText`);export{_t as a,yt as i,It as n,gt as o,St as r,Pt as t};
@@ -1 +1 @@
1
- import{h as e}from"./src-DdOdIreR.js";import{b as t}from"./chunk-ICPOFSXX-C5eNZ4L6.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t};
1
+ import{r as e}from"./src-BfaOho0B.js";import{b as t}from"./chunk-ICPOFSXX-C04NFfJk.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t};
@@ -1,4 +1,4 @@
1
- import{h as e}from"./src-DdOdIreR.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
1
+ import{r as e}from"./src-BfaOho0B.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
2
2
 
3
3
  `+e.mark.snippet),r+` `+n):r}e(c,`formatError`);function l(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=c(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}e(l,`YAMLException$1`),l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.toString=e(function(e){return this.name+`: `+c(this,e)},`toString`);var u=l;function d(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}e(d,`getLine`);function f(e,t){return s.repeat(` `,t-e.length)+e}e(f,`padStart`);function p(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c=``,l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)u=d(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),m),c=s.repeat(` `,t.indent)+f((e.line-l+1).toString(),p)+` | `+u.str+`
4
4
  `+c;for(u=d(e.buffer,r[o],i[o],e.position,m),c+=s.repeat(` `,t.indent)+f((e.line+1).toString(),p)+` | `+u.str+`
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./src-BfaOho0B.js";import{A as n}from"./chunk-ICPOFSXX-C04NFfJk.js";import{t as r}from"./dist-DQ41Rxbw.js";var i=r(),a=e((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=e((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=e((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=e((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=e((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=e(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=e(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=e(()=>{let e=t(`.mermaidTooltip`);return e.empty()&&(e=t(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t};
@@ -0,0 +1 @@
1
+ import{f as e}from"./chunk-5PVQY5BW-Ciel-YVc.js";import{r as t}from"./src-BfaOho0B.js";import{b as n,d as r}from"./chunk-ICPOFSXX-C04NFfJk.js";var i=t(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function a(i,a){let o=i.getElementsByTagName(`img`);if(!o||o.length===0)return;let s=a.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...o].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,s){let[t=r.fontSize]=e(n().fontSize?n().fontSize:window.getComputedStyle(document.body).fontSize),a=t*5+`px`;i.style.minWidth=a,i.style.maxWidth=a}else i.style.width=`100%`;a(i)}t(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}t(a,`configureLabelImages`);export{i as n,a as t};
@@ -0,0 +1 @@
1
+ import"./chunk-5PVQY5BW-Ciel-YVc.js";import{r as e}from"./src-BfaOho0B.js";import"./chunk-ICPOFSXX-C04NFfJk.js";import"./chunk-U2HBQHQK-FqDOW_Dq.js";import"./chunk-FMBD7UC4-BWSstEYx.js";import"./chunk-BSJP7CBP-DwT1eVSc.js";import"./chunk-ZZ45TVLE-DMfGJuPz.js";import"./chunk-YZCP3GAM-BhxShnp0.js";import"./chunk-55IACEB6-C19HKnvd.js";import"./chunk-EDXVE4YY-DNeRJTiS.js";import"./chunk-X2U36JSP-DiSftNGg.js";import"./chunk-5FUZZQ4R-Bw3BFJJs.js";import"./chunk-ENJZ2VHE-Crfow0Ab.js";import"./chunk-336JU56O-CQcnUKNW.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CAwQq2uM.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1 @@
1
+ import"./chunk-5PVQY5BW-Ciel-YVc.js";import{r as e}from"./src-BfaOho0B.js";import"./chunk-ICPOFSXX-C04NFfJk.js";import"./chunk-U2HBQHQK-FqDOW_Dq.js";import"./chunk-FMBD7UC4-BWSstEYx.js";import"./chunk-BSJP7CBP-DwT1eVSc.js";import"./chunk-ZZ45TVLE-DMfGJuPz.js";import"./chunk-YZCP3GAM-BhxShnp0.js";import"./chunk-55IACEB6-C19HKnvd.js";import"./chunk-EDXVE4YY-DNeRJTiS.js";import"./chunk-X2U36JSP-DiSftNGg.js";import"./chunk-5FUZZQ4R-Bw3BFJJs.js";import"./chunk-ENJZ2VHE-Crfow0Ab.js";import"./chunk-336JU56O-CQcnUKNW.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CAwQq2uM.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1 @@
1
+ import{i as e}from"./graphlib-sK54_wxh.js";var t=4;function n(n){return e(n,t)}export{n as t};