@kingsoftcloud/ksadk-web 0.3.0 → 0.3.2

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 (276) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/RELEASE_PROVENANCE.json +7 -0
  3. package/dist-ksadk/assets/{ArtifactsPanel-Cjnqt-8W.js → ArtifactsPanel-DSU1sWD_.js} +1 -1
  4. package/dist-ksadk/assets/{CodeBlock-BqyqZfuB.js → CodeBlock-DOH6MVcn.js} +4 -4
  5. package/dist-ksadk/assets/{MathMessageMarkdown-BpH7jiFM.js → MathMessageMarkdown-BL8my1R2.js} +4 -4
  6. package/dist-ksadk/assets/MathMessageMarkdown-BorAY7qD.css +1 -0
  7. package/dist-ksadk/assets/MermaidBlock-Dz4IP-Tx.js +312 -0
  8. package/dist-ksadk/assets/NativeTerminalPanel-DUrK0JpZ.js +1 -0
  9. package/dist-ksadk/assets/abnfDiagram-VCTEODGH-g20pFzNV.js +1 -0
  10. package/dist-ksadk/assets/arc-C4FzinUA.js +1 -0
  11. package/dist-ksadk/assets/architecture-7GRP2DOG-DjKratdf.js +1 -0
  12. package/dist-ksadk/assets/architectureDiagram-5GKGNRK7-DpIqL5h4.js +36 -0
  13. package/dist-ksadk/assets/blockDiagram-NRAW4CY4-BjkljTNz.js +129 -0
  14. package/dist-ksadk/assets/c4Diagram-UCG6FXSJ-Dk_ieq2X.js +38 -0
  15. package/dist-ksadk/assets/channel-4cQHKtx1.js +1 -0
  16. package/dist-ksadk/assets/chunk-2Q5K7J3B-DmgWkESh.js +1 -0
  17. package/dist-ksadk/assets/{chunk-FMBD7UC4-BGhvzDYt.js → chunk-5VM5RSS4-BVHAchFb.js} +1 -1
  18. package/dist-ksadk/assets/{chunk-ND2GUHAM-D98vPd-E.js → chunk-F27PBJKO-C-ipQzuS.js} +1 -1
  19. package/dist-ksadk/assets/chunk-G27WJ6UU-C2EyJbIK.js +231 -0
  20. package/dist-ksadk/assets/{chunk-4BX2VUAB-CsWIQRhc.js → chunk-JWPE2WC7-vYvVJb_M.js} +1 -1
  21. package/dist-ksadk/assets/chunk-LCL6LL3I-BcI6ysPT.js +206 -0
  22. package/dist-ksadk/assets/chunk-POPQ4Y6H-C030x_Z1.js +1 -0
  23. package/dist-ksadk/assets/chunk-RHFEMEQ7-yyGpsz4n.js +168 -0
  24. package/dist-ksadk/assets/chunk-SVP7TREG-BLTlmMU7.js +88 -0
  25. package/dist-ksadk/assets/chunk-XXDRQBXY-C_32ArgP.js +1 -0
  26. package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DLFd9Xi0.js +1 -0
  27. package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DLFd9Xi0.js +1 -0
  28. package/dist-ksadk/assets/{cose-bilkent-S5V4N54A-CX3yotHq.js → cose-bilkent-JH36ORCC-9YQYwdl0.js} +1 -1
  29. package/dist-ksadk/assets/cynefin-OW5HDTMX-DjEM48Qp.js +1 -0
  30. package/dist-ksadk/assets/cynefinDiagram-5FMLGOSQ-ErLF5N13.js +62 -0
  31. package/dist-ksadk/assets/cytoscape.esm-CyCl8rPi.js +321 -0
  32. package/dist-ksadk/assets/dagre-3AP2YEHR-DFiQF-6f.js +4 -0
  33. package/dist-ksadk/assets/dagre-BuhGnRI1.js +1 -0
  34. package/dist-ksadk/assets/diagram-S7CK7UJ4-Bt1v8-GC.js +30 -0
  35. package/dist-ksadk/assets/diagram-UQ7AKVKN-DSCxJdBK.js +41 -0
  36. package/dist-ksadk/assets/diagram-VSXAHHWV-DHfYwp_9.js +3 -0
  37. package/dist-ksadk/assets/diagram-VX7I27RA-DdzD-4Le.js +24 -0
  38. package/dist-ksadk/assets/diagram-Z3DM3KII-Du-nAJ9F.js +24 -0
  39. package/dist-ksadk/assets/{dist-D82mtD2s.js → dist-8hqcx0sU.js} +1 -1
  40. package/dist-ksadk/assets/dist-B7seoj3d.js +1 -0
  41. package/dist-ksadk/assets/{dist-DHn6nBzr.js → dist-BE7bu-DL.js} +1 -1
  42. package/dist-ksadk/assets/{dist-eoW6tZXA.js → dist-BVDffZ0U.js} +1 -1
  43. package/dist-ksadk/assets/{dist-C2xjE7cO.js → dist-BX8z72IC.js} +1 -1
  44. package/dist-ksadk/assets/{dist-CgF3fj15.js → dist-Bf2M8m3N.js} +1 -1
  45. package/dist-ksadk/assets/{dist-Bs-jQcRX.js → dist-BjU6y-A2.js} +1 -1
  46. package/dist-ksadk/assets/{dist-Djgl2wVZ.js → dist-BytlxIDT.js} +1 -1
  47. package/dist-ksadk/assets/{dist-CVQRZjPu.js → dist-CSh_DE14.js} +1 -1
  48. package/dist-ksadk/assets/{dist-6CVKuTAe.js → dist-CXYYBw3_.js} +1 -1
  49. package/dist-ksadk/assets/{dist-DlzCRy0S.js → dist-C_wsv-Qd.js} +1 -1
  50. package/dist-ksadk/assets/{dist-DF06ORQo.js → dist-ClxGviKw.js} +1 -1
  51. package/dist-ksadk/assets/{dist-Cf23NY4L.js → dist-CttYUqzS.js} +1 -1
  52. package/dist-ksadk/assets/{dist-ivOya1LD.js → dist-DNp6rLRA.js} +1 -1
  53. package/dist-ksadk/assets/{dist-BibcG1V9.js → dist-DUX-id_F.js} +1 -1
  54. package/dist-ksadk/assets/{dist-BUHRxvDG.js → dist-DmldrHd_.js} +1 -1
  55. package/dist-ksadk/assets/{dist-BZ9n9AjO.js → dist-DnfXs8Vn.js} +2 -2
  56. package/dist-ksadk/assets/{dist-DqNnNFrw.js → dist-Dq9gLD7L.js} +1 -1
  57. package/dist-ksadk/assets/{dist-CGcp2ex8.js → dist-W-TIVntx.js} +1 -1
  58. package/dist-ksadk/assets/{dist-Cwt7koer.js → dist-dDdADKFA.js} +1 -1
  59. package/dist-ksadk/assets/{dist-C7-3jInC.js → dist-dydu68Fl.js} +1 -1
  60. package/dist-ksadk/assets/{dist-C99THtIA.js → dist-ngtN0DJB.js} +1 -1
  61. package/dist-ksadk/assets/ebnfDiagram-PWID7BFC-Da9C9NO1.js +1 -0
  62. package/dist-ksadk/assets/erDiagram-SSCWMZ5O-EAGqqR79.js +99 -0
  63. package/dist-ksadk/assets/eventmodeling-NTZA5JFV-CMgMaJrC.js +1 -0
  64. package/dist-ksadk/assets/flowDiagram-A5DVABFB-BBKL0x3P.js +1 -0
  65. package/dist-ksadk/assets/ganttDiagram-EL5Y4UJY-DqJsKb59.js +292 -0
  66. package/dist-ksadk/assets/gitGraph-4MIJSDKK-Dw63mrhw.js +1 -0
  67. package/dist-ksadk/assets/gitGraphDiagram-WWUBYQGX-B6g4dtDi.js +106 -0
  68. package/dist-ksadk/assets/index-8ipRcQ-M.js +240 -0
  69. package/dist-ksadk/assets/index-ByFCqjlh.css +2 -0
  70. package/dist-ksadk/assets/info-A6RAGUB7-B6iAblII.js +1 -0
  71. package/dist-ksadk/assets/infoDiagram-RXCK75RN-Djm_nbd5.js +2 -0
  72. package/dist-ksadk/assets/{ishikawaDiagram-YF4QCWOH-DLOHGvWw.js → ishikawaDiagram-5VMMS53U-DWya9SG2.js} +6 -6
  73. package/dist-ksadk/assets/{journeyDiagram-JHISSGLW-BIzKeejT.js → journeyDiagram-EYS64GPL-DutxhSNI.js} +6 -6
  74. package/dist-ksadk/assets/{kanban-definition-UN3LZRKU-BWHoFSw2.js → kanban-definition-3QL26DDD-DJdOF8Fm.js} +10 -10
  75. package/dist-ksadk/assets/katex-vFWytM5c.js +257 -0
  76. package/dist-ksadk/assets/{linear-CvMBw9cA.js → linear-BHjG8b-J.js} +1 -1
  77. package/dist-ksadk/assets/mermaid-parser.core-KGSy4jWT.js +166 -0
  78. package/dist-ksadk/assets/{mindmap-definition-RKZ34NQL-CSAQxEAe.js → mindmap-definition-FBJOCRG2-9-HC88D4.js} +29 -29
  79. package/dist-ksadk/assets/packet-AYTQ26CC-BOYAipuq.js +1 -0
  80. package/dist-ksadk/assets/pegDiagram-XKGWAZYB-DrEZd4fD.js +1 -0
  81. package/dist-ksadk/assets/pie-WAS4IAKB-Ctq0Kbku.js +1 -0
  82. package/dist-ksadk/assets/pieDiagram-E7YTZNPT-DpjqOFFp.js +39 -0
  83. package/dist-ksadk/assets/{quadrantDiagram-W4KKPZXB-CxIR4JXI.js → quadrantDiagram-AXDQQJYC-BiNhgOXX.js} +6 -6
  84. package/dist-ksadk/assets/radar-RG4KPBEZ-DN0-ul_0.js +1 -0
  85. package/dist-ksadk/assets/railroad-74A4TZTK-C6cC_to0.js +1 -0
  86. package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-BimjIuRc.js +1 -0
  87. package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-CvY65ABq.js +1 -0
  88. package/dist-ksadk/assets/railroad-peg-WCYAUIDC-D72Iq_Tv.js +1 -0
  89. package/dist-ksadk/assets/railroadDiagram-O6MQD6OU-_Y3Ojg6G.js +1 -0
  90. package/dist-ksadk/assets/requirementDiagram-EFPCY7ZU-DeCFdg9K.js +84 -0
  91. package/dist-ksadk/assets/{sankeyDiagram-5OEKKPKP-DpGa6EAV.js → sankeyDiagram-P5KCCOFB-CPH75rhw.js} +7 -7
  92. package/dist-ksadk/assets/{sequenceDiagram-3UESZ5HK-NTKNGGe5.js → sequenceDiagram-WJ2MYXX4-OEpQQdr4.js} +10 -10
  93. package/dist-ksadk/assets/sizeCapture-X5ZJPWSS-heUErzhI.js +1 -0
  94. package/dist-ksadk/assets/stateDiagram-HBIQ2CUA-DvA3jSMB.js +1 -0
  95. package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-BgQY03nz.js +1 -0
  96. package/dist-ksadk/assets/swimlanes-XN3QIQJK-CR-dfN_t.js +1 -0
  97. package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js +8 -0
  98. package/dist-ksadk/assets/{timeline-definition-PNZ67QCA-jqoYs3jQ.js → timeline-definition-24CTP7MA-DAVJf1TX.js} +7 -7
  99. package/dist-ksadk/assets/treeView-Q6P3EWNA-BMpO0wsB.js +1 -0
  100. package/dist-ksadk/assets/treemap-WGGIJYW6-Et0aqzU3.js +1 -0
  101. package/dist-ksadk/assets/vennDiagram-4TSXK5OY-DwM8eDkh.js +34 -0
  102. package/dist-ksadk/assets/wardley-WFR3VGLG-CbY0mhpl.js +1 -0
  103. package/dist-ksadk/assets/wardleyDiagram-VM6X3IG4-DZL-Zz2t.js +78 -0
  104. package/dist-ksadk/assets/xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js +7 -0
  105. package/dist-ksadk/index.html +2 -2
  106. package/dist-lib/App.d.ts.map +1 -1
  107. package/dist-lib/{ArtifactsPanel-BAfHt4bC.js → ArtifactsPanel-DDCKcvaL.js} +1 -1
  108. package/dist-lib/{CodeBlock-Cbl6cxYC.js → CodeBlock-BS9DcS5a.js} +3 -3
  109. package/dist-lib/{MathMessageMarkdown-DbMSeHQa.js → MathMessageMarkdown-CpCcJFjZ.js} +2 -2
  110. package/dist-lib/{NativeTerminalPanel-BTPHqbvY.js → NativeTerminalPanel-CDqCdIly.js} +14 -6
  111. package/dist-lib/{WorkspacePanelContainer-Iy0LhhgG.js → WorkspacePanelContainer-DzbAkIfx.js} +1746 -913
  112. package/dist-lib/api/client.d.ts.map +1 -1
  113. package/dist-lib/api/events.d.ts +7 -0
  114. package/dist-lib/api/events.d.ts.map +1 -1
  115. package/dist-lib/api/run.d.ts +32 -0
  116. package/dist-lib/api/run.d.ts.map +1 -1
  117. package/dist-lib/api/session.d.ts +10 -1
  118. package/dist-lib/api/session.d.ts.map +1 -1
  119. package/dist-lib/capabilities-njdklP3r.js +200 -0
  120. package/dist-lib/capabilities.js +1 -1
  121. package/dist-lib/components/chat/ChatComposer.d.ts +9 -1
  122. package/dist-lib/components/chat/ChatComposer.d.ts.map +1 -1
  123. package/dist-lib/components/chat/ChatMessageList.d.ts +4 -1
  124. package/dist-lib/components/chat/ChatMessageList.d.ts.map +1 -1
  125. package/dist-lib/components/chat/ChatSidebar.d.ts.map +1 -1
  126. package/dist-lib/components/chat/ConnectedComposer.d.ts +13 -2
  127. package/dist-lib/components/chat/ConnectedComposer.d.ts.map +1 -1
  128. package/dist-lib/components/chat/ConnectedMessageList.d.ts +2 -1
  129. package/dist-lib/components/chat/ConnectedMessageList.d.ts.map +1 -1
  130. package/dist-lib/components/chat/ExecutionModeMenu.d.ts +12 -0
  131. package/dist-lib/components/chat/ExecutionModeMenu.d.ts.map +1 -0
  132. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts +14 -0
  133. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts.map +1 -0
  134. package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts +12 -0
  135. package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts.map +1 -0
  136. package/dist-lib/components/chat/InteractionSchemaForm.d.ts +14 -0
  137. package/dist-lib/components/chat/InteractionSchemaForm.d.ts.map +1 -0
  138. package/dist-lib/components/chat/InteractionTray.d.ts +23 -0
  139. package/dist-lib/components/chat/InteractionTray.d.ts.map +1 -0
  140. package/dist-lib/components/chat/ModelSettingsMenu.d.ts +13 -0
  141. package/dist-lib/components/chat/ModelSettingsMenu.d.ts.map +1 -0
  142. package/dist-lib/components/chat/PermissionMenu.d.ts.map +1 -1
  143. package/dist-lib/components/chat/ProcessingBlocksView.d.ts +4 -1
  144. package/dist-lib/components/chat/ProcessingBlocksView.d.ts.map +1 -1
  145. package/dist-lib/components/chat/schema-fields.d.ts +13 -0
  146. package/dist-lib/components/chat/schema-fields.d.ts.map +1 -0
  147. package/dist-lib/components/chat/types.d.ts +8 -0
  148. package/dist-lib/components/chat/types.d.ts.map +1 -1
  149. package/dist-lib/components/native/NativeTerminalPanel.d.ts.map +1 -1
  150. package/dist-lib/components.js +3 -3
  151. package/dist-lib/core/api/facade.d.ts +26 -1
  152. package/dist-lib/core/api/facade.d.ts.map +1 -1
  153. package/dist-lib/core/api/types.d.ts +29 -1
  154. package/dist-lib/core/api/types.d.ts.map +1 -1
  155. package/dist-lib/core/interaction/a2ui-validate.d.ts +21 -0
  156. package/dist-lib/core/interaction/a2ui-validate.d.ts.map +1 -0
  157. package/dist-lib/core/interaction/adapters/agui.d.ts +23 -0
  158. package/dist-lib/core/interaction/adapters/agui.d.ts.map +1 -0
  159. package/dist-lib/core/interaction/adapters/normalize.d.ts +29 -0
  160. package/dist-lib/core/interaction/adapters/normalize.d.ts.map +1 -0
  161. package/dist-lib/core/interaction/adapters/responses.d.ts +25 -0
  162. package/dist-lib/core/interaction/adapters/responses.d.ts.map +1 -0
  163. package/dist-lib/core/interaction/adapters/session-events.d.ts +17 -0
  164. package/dist-lib/core/interaction/adapters/session-events.d.ts.map +1 -0
  165. package/dist-lib/core/interaction/client.d.ts +63 -0
  166. package/dist-lib/core/interaction/client.d.ts.map +1 -0
  167. package/dist-lib/core/interaction/index.d.ts +41 -0
  168. package/dist-lib/core/interaction/index.d.ts.map +1 -0
  169. package/dist-lib/core/interaction/store.d.ts +0 -0
  170. package/dist-lib/core/interaction/store.d.ts.map +1 -0
  171. package/dist-lib/core/interaction/types.d.ts +91 -0
  172. package/dist-lib/core/interaction/types.d.ts.map +1 -0
  173. package/dist-lib/core/run/dispatcher.d.ts.map +1 -1
  174. package/dist-lib/core/run/engine.d.ts +24 -1
  175. package/dist-lib/core/run/engine.d.ts.map +1 -1
  176. package/dist-lib/core/run/types.d.ts +32 -0
  177. package/dist-lib/core/run/types.d.ts.map +1 -1
  178. package/dist-lib/core/stream/index.d.ts +2 -0
  179. package/dist-lib/core/stream/index.d.ts.map +1 -1
  180. package/dist-lib/core/stream/kernel-events.d.ts +56 -0
  181. package/dist-lib/core/stream/kernel-events.d.ts.map +1 -0
  182. package/dist-lib/core/stream/responses-protocol.d.ts +7 -0
  183. package/dist-lib/core/stream/responses-protocol.d.ts.map +1 -1
  184. package/dist-lib/core/stream/runtime-items.d.ts +174 -0
  185. package/dist-lib/core/stream/runtime-items.d.ts.map +1 -0
  186. package/dist-lib/core/stream/types.d.ts +4 -0
  187. package/dist-lib/core/stream/types.d.ts.map +1 -1
  188. package/dist-lib/hooks/useBootstrap.d.ts +1 -0
  189. package/dist-lib/hooks/useBootstrap.d.ts.map +1 -1
  190. package/dist-lib/hooks/useInteractions.d.ts +34 -0
  191. package/dist-lib/hooks/useInteractions.d.ts.map +1 -0
  192. package/dist-lib/hooks/useRunAgent.d.ts +8 -6
  193. package/dist-lib/hooks/useRunAgent.d.ts.map +1 -1
  194. package/dist-lib/hooks/useSessionLifecycle.d.ts.map +1 -1
  195. package/dist-lib/public/runtime.d.ts +7 -0
  196. package/dist-lib/public/runtime.d.ts.map +1 -1
  197. package/dist-lib/runtime.js +2393 -1157
  198. package/dist-lib/stores/bootstrap.d.ts +4 -0
  199. package/dist-lib/stores/bootstrap.d.ts.map +1 -1
  200. package/dist-lib/stores/streaming.d.ts +8 -0
  201. package/dist-lib/stores/streaming.d.ts.map +1 -1
  202. package/dist-lib/stores/ui.d.ts +8 -14
  203. package/dist-lib/stores/ui.d.ts.map +1 -1
  204. package/dist-lib/styles.css +1 -1
  205. package/dist-lib/types/agent-control.d.ts +93 -0
  206. package/dist-lib/types/agent-control.d.ts.map +1 -0
  207. package/dist-lib/types/capabilities.d.ts +7 -0
  208. package/dist-lib/types/capabilities.d.ts.map +1 -1
  209. package/dist-lib/types/runtime-capability-matrix.d.ts +15 -0
  210. package/dist-lib/types/runtime-capability-matrix.d.ts.map +1 -0
  211. package/dist-lib/utils/capabilities.d.ts.map +1 -1
  212. package/dist-lib/utils/feedback.d.ts +0 -1
  213. package/dist-lib/utils/feedback.d.ts.map +1 -1
  214. package/dist-lib/utils/responses-stream.d.ts +2 -1
  215. package/dist-lib/utils/responses-stream.d.ts.map +1 -1
  216. package/dist-lib/utils/session-event-history.d.ts +54 -0
  217. package/dist-lib/utils/session-event-history.d.ts.map +1 -0
  218. package/dist-lib/utils/session-events.d.ts +8 -0
  219. package/dist-lib/utils/session-events.d.ts.map +1 -1
  220. package/dist-lib/utils/session-list.d.ts +1 -0
  221. package/dist-lib/utils/session-list.d.ts.map +1 -1
  222. package/package.json +4 -1
  223. package/dist-ksadk/assets/MathMessageMarkdown-DeYh8QPr.css +0 -1
  224. package/dist-ksadk/assets/MermaidBlock-DWuxETaJ.js +0 -303
  225. package/dist-ksadk/assets/NativeTerminalPanel-MDTopWMO.js +0 -1
  226. package/dist-ksadk/assets/arc-CFKwSk_B.js +0 -1
  227. package/dist-ksadk/assets/architecture-7EHR7CIX-CynqOWjZ.js +0 -1
  228. package/dist-ksadk/assets/architectureDiagram-3BPJPVTR-Dej8jX8c.js +0 -36
  229. package/dist-ksadk/assets/blockDiagram-GPEHLZMM-1F64jqvy.js +0 -132
  230. package/dist-ksadk/assets/c4Diagram-AAUBKEIU-9q7AUAKb.js +0 -10
  231. package/dist-ksadk/assets/channel-iUGv2N24.js +0 -1
  232. package/dist-ksadk/assets/chunk-2J33WTMH-6qgwJm7Q.js +0 -1
  233. package/dist-ksadk/assets/chunk-55IACEB6-BK8paA20.js +0 -1
  234. package/dist-ksadk/assets/chunk-727SXJPM-B-JEhy7h.js +0 -206
  235. package/dist-ksadk/assets/chunk-AQP2D5EJ-DYBvMHAa.js +0 -231
  236. package/dist-ksadk/assets/chunk-QZHKN3VN-YQIEXeF6.js +0 -1
  237. package/dist-ksadk/assets/classDiagram-4FO5ZUOK-CDAUuoXK.js +0 -1
  238. package/dist-ksadk/assets/classDiagram-v2-Q7XG4LA2-CDAUuoXK.js +0 -1
  239. package/dist-ksadk/assets/cytoscape.esm-DelgaX4f.js +0 -321
  240. package/dist-ksadk/assets/dagre-BM42HDAG-C7TguAWo.js +0 -4
  241. package/dist-ksadk/assets/dagre-Bx709z4p.js +0 -1
  242. package/dist-ksadk/assets/diagram-2AECGRRQ-Dd17_kws.js +0 -43
  243. package/dist-ksadk/assets/diagram-5GNKFQAL-DVIClIil.js +0 -10
  244. package/dist-ksadk/assets/diagram-KO2AKTUF-Df_3gYQa.js +0 -3
  245. package/dist-ksadk/assets/diagram-LMA3HP47-BhLk6ZtA.js +0 -24
  246. package/dist-ksadk/assets/diagram-OG6HWLK6-D4GNGvuu.js +0 -24
  247. package/dist-ksadk/assets/dist-DyvYLMW9.js +0 -1
  248. package/dist-ksadk/assets/erDiagram-TEJ5UH35-CnfRcY2M.js +0 -85
  249. package/dist-ksadk/assets/eventmodeling-FCH6USID-ChYO-ijM.js +0 -1
  250. package/dist-ksadk/assets/flowDiagram-I6XJVG4X-DGaJjGNJ.js +0 -162
  251. package/dist-ksadk/assets/ganttDiagram-6RSMTGT7-DpCoB2g9.js +0 -292
  252. package/dist-ksadk/assets/gitGraph-WXDBUCRP-BN_0Fk-j.js +0 -1
  253. package/dist-ksadk/assets/gitGraphDiagram-PVQCEYII-9IKVFBVT.js +0 -106
  254. package/dist-ksadk/assets/graphlib-B8gBHxth.js +0 -1
  255. package/dist-ksadk/assets/index-QSwCHuB8.js +0 -177
  256. package/dist-ksadk/assets/index-jOPmTOZH.css +0 -2
  257. package/dist-ksadk/assets/info-J43DQDTF-Cp6o3vId.js +0 -1
  258. package/dist-ksadk/assets/infoDiagram-5YYISTIA-CYIIsb8y.js +0 -2
  259. package/dist-ksadk/assets/katex-DATssjp1.js +0 -265
  260. package/dist-ksadk/assets/mermaid-parser.core-mGAcEwcq.js +0 -161
  261. package/dist-ksadk/assets/packet-YPE3B663-wQzct3cT.js +0 -1
  262. package/dist-ksadk/assets/pie-LRSECV5Y-BgTQiv-9.js +0 -1
  263. package/dist-ksadk/assets/pieDiagram-4H26LBE5-By-ra07M.js +0 -30
  264. package/dist-ksadk/assets/radar-GUYGQ44K-BIq5fXsn.js +0 -1
  265. package/dist-ksadk/assets/requirementDiagram-4Y6WPE33-DpW90iu3.js +0 -84
  266. package/dist-ksadk/assets/stateDiagram-AJRCARHV-DGpd9yFG.js +0 -1
  267. package/dist-ksadk/assets/stateDiagram-v2-BHNVJYJU-B3o579IQ.js +0 -1
  268. package/dist-ksadk/assets/treeView-BLDUP644-Dqi-E0EM.js +0 -1
  269. package/dist-ksadk/assets/treemap-LRROVOQU-ClQP9CJ9.js +0 -1
  270. package/dist-ksadk/assets/vennDiagram-CIIHVFJN-l3Z7-wbP.js +0 -34
  271. package/dist-ksadk/assets/wardley-L42UT6IY-8XLvnNIs.js +0 -1
  272. package/dist-ksadk/assets/wardleyDiagram-YWT4CUSO-BR54GPmr.js +0 -78
  273. package/dist-ksadk/assets/xychartDiagram-2RQKCTM6-SkiH8GsK.js +0 -7
  274. package/dist-lib/capabilities-CxHZ869f.js +0 -133
  275. package/dist-lib/components/chat/MenuChip.d.ts +0 -19
  276. package/dist-lib/components/chat/MenuChip.d.ts.map +0 -1
@@ -1,13 +1,13 @@
1
- import{a as e,c as t,i as n,n as r,r as i,s as a}from"./chunk-ND2GUHAM-D98vPd-E.js";import{t as o}from"./chunk-QZHKN3VN-YQIEXeF6.js";import{An as s,B as c,Gt as l,Jt as u,Kt as d,R as f,Xt as p,Zt as m,_n as h,en as g,fn as _,gn as v,hn as y,in as b,kn as x,ln as S,mn as C,n as w,nn as T,pn as E,pt as D,qt as O,rn as k,sn as A,t as j,tn as M}from"./MermaidBlock-DWuxETaJ.js";var N=D(),P=(function(){var e=x(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],c=[1,14],l=[1,15],u=[1,17],d=[1,18],f=[1,19],p=[1,25],m=[1,26],h=[1,27],g=[1,28],_=[1,29],v=[1,30],y=[1,31],b=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],L=[1,74],ee=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:x(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:c,15:l,18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:L},{23:75,55:76,73:L},{23:77,73:F},{69:78,72:[1,79],78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,i,{7:120}),e(ye,i,{7:121}),e(ye,i,{7:122}),e(be,i,{41:123,7:124}),e(xe,i,{43:125,7:126}),e(xe,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(ye,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:ee,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[1,161],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[1,162],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[1,163],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[2,47],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[2,45],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[2,43],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:l,17:[1,171],18:16,19:u,22:d,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:p,31:m,32:h,34:g,36:_,37:v,38:y,39:b,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,i,{7:124,41:201}),e(xe,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:x(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var v=m.options&&m.options.ranges;typeof h.yy.parseError==`function`?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function y(e){n.length-=2*e,i.length-=e,a.length-=e}x(y,`popStack`);function b(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}x(b,`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??=b(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>d&&j.push(`'`+this.terminals_[O]+`'`);M=m.showPosition?`Parse error on line `+(c+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(S==f?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:_,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),i.push(m.yytext),a.push(m.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(l=m.yyleng,s=m.yytext,c=m.yylineno,_=m.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},v&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,l,c,h.yy,T[1],i,a].concat(p)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:x(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:x(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:x(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:x(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:x(function(){return this._more=!0,this},`more`),reject:x(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:x(function(e){this.unput(this.match.slice(e))},`less`),pastInput:x(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:x(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:x(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
- `+t+`^`},`showPosition`),test_match:x(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:x(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:x(function(){return this.next()||this.lex()},`lex`),begin:x(function(e){this.conditionStack.push(e)},`begin`),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:x(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:x(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:x(function(e){this.begin(e)},`pushState`),stateStackSize:x(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:x(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Te(){this.yy={}}return x(Te,`Parser`),Te.prototype=we,we.Parser=Te,new Te})();P.parser=P;var F=P,I={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},L={FILLED:0,OPEN:1},ee={LEFTOF:0,RIGHTOF:1,OVER:2},R={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},te=class{constructor(){this.state=new o(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=y,this.setAccDescription=C,this.setDiagramTitle=h,this.getAccTitle=M,this.getAccDescription=g,this.getDiagramTitle=b,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(k().wrap),this.LINETYPE=I,this.ARROWTYPE=L,this.PLACEMENT=ee}static{x(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(`
1
+ import{a as e,c as t,i as n,n as r,r as i,s as a}from"./chunk-F27PBJKO-C-ipQzuS.js";import{t as o}from"./chunk-2Q5K7J3B-DmgWkESh.js";import{$n as s,Ir as c,Nr as l,Qn as u,Sr as d,Ut as f,Vt as p,Zn as m,_r as h,br as g,cr as _,er as v,fr as y,gn as b,lr as x,mr as S,n as C,nr as w,or as T,rr as E,sr as D,t as O,ur as k,vr as A,xr as j,yr as M}from"./MermaidBlock-Dz4IP-Tx.js";var N=b(),P=(function(){var e=c(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:c(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:c(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,i,{7:120}),e(ye,i,{7:121}),e(ye,i,{7:122}),e(be,i,{41:123,7:124}),e(xe,i,{43:125,7:126}),e(xe,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(ye,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,i,{7:124,41:201}),e(xe,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:c(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:c(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.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;a.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,i.length-=e,a.length-=e}c(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}c(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=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
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:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:c(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:c(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:c(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:c(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:c(function(){return this._more=!0,this},`more`),reject:c(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:c(function(e){this.unput(this.match.slice(e))},`less`),pastInput:c(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:c(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:c(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:c(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:c(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:c(function(){return this.next()||this.lex()},`lex`),begin:c(function(e){this.conditionStack.push(e)},`begin`),popState:c(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:c(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:c(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:c(function(e){this.begin(e)},`pushState`),stateStackSize:c(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:c(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Te(){this.yy={}}return c(Te,`Parser`),Te.prototype=we,we.Parser=Te,new Te})();P.parser=P;var F=P,I={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},ee={FILLED:0,OPEN:1},L={LEFTOF:0,RIGHTOF:1,OVER:2},R={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},te=class{constructor(){this.state=new o(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=g,this.setAccDescription=M,this.setDiagramTitle=d,this.getAccTitle=D,this.getAccDescription=T,this.getDiagramTitle=k,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(x().wrap),this.LINETYPE=I,this.ARROWTYPE=ee,this.PLACEMENT=L}static{c(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(`
7
7
  `)?i+`
8
8
  `:`{
9
9
  `+i+`
10
- }`,o=w(e,{schema:j})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&n++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&n--;return n}addMessage(e,t,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(e,t,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??``)<1){let t=Error(`Trying to inactivate an inactive participant (`+e+`)`);throw t.hash={text:`->>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)===null?/^:?nowrap:/.exec(e)===null?void 0:!1:!0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?k().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),u()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:n};return s.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?E(a,k()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=E(t.text,k());e=e.replace(/&equals;/g,`=`),e=e.replace(/&amp;/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){s.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=E(t.text,k()),i=r.indexOf(`@`);r=r.replace(/&equals;/g,`=`),r=r.replace(/&amp;/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){s.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=E(t.text,k()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){s.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),r=document.getElementById(t.text);try{let e=r.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){s.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:y(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return k().sequence}},ne=x(e=>{let t=e.dropShadow??`none`,{look:n}=k();return`.actor {
10
+ }`,o=C(e,{schema:O})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&n++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&n--;return n}addMessage(e,t,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(e,t,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??``)<1){let t=Error(`Trying to inactivate an inactive participant (`+e+`)`);throw t.hash={text:`->>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)===null?/^:?nowrap:/.exec(e)===null?void 0:!1:!0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?x().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),v()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:n};return l.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?A(a,x()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=A(t.text,x());e=e.replace(/&equals;/g,`=`),e=e.replace(/&amp;/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){l.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=A(t.text,x()),i=r.indexOf(`@`);r=r.replace(/&equals;/g,`=`),r=r.replace(/&amp;/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){l.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=A(t.text,x()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){l.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),r=document.getElementById(t.text);try{let e=r.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){l.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:g(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return x().sequence}},ne=c(e=>{let t=e.dropShadow??`none`,{look:n}=x();return`.actor {
11
11
  stroke: ${e.actorBorder};
12
12
  fill: ${e.actorBkg};
13
13
  stroke-width: ${e.strokeWidth??1};
@@ -146,17 +146,17 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
146
146
  filter: ${t};
147
147
  stroke: ${e.nodeBorder};
148
148
  }
149
- `},`getStyles`),z=36,B=`actor-top`,V=`actor-bottom`,re=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=x(function(t,n){let r=e(t,n);return T().look===`neo`&&r.attr(`data-look`,`neo`),r},`drawRect`),ie=x(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),je(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ae=x(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),oe=x(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await _(t.text,T()),a=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(a.height)).attr(`width`,Math.round(a.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,a.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-a.width/2)).attr(`y`,Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:e,stopx:i,starty:o}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-a.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(o)):r.attr(`y`,Math.round(o-a.height))}return[r]},`drawKatex`),G=x(function(e,t){let n=0,r=0,i=t.text.split(p.lineBreakRegex),[a,o]=f(t.fontSize),s=[],c=0,l=x(()=>t.y,`yfunc`);if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case`top`:case`start`:l=x(()=>Math.round(t.y+t.textMargin),`yfunc`);break;case`middle`:case`center`:l=x(()=>Math.round(t.y+(n+r+t.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:l=x(()=>Math.round(t.y+(n+r+2*t.textMargin)-t.textMargin),`yfunc`);break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case`left`:case`start`:t.x=Math.round(t.x+t.textMargin),t.anchor=`start`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`middle`:case`center`:t.x=Math.round(t.x+t.width/2),t.anchor=`middle`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`right`:case`end`:t.x=Math.round(t.x+t.width-t.textMargin),t.anchor=`end`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break}for(let[u,d]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(c=u*a);let i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,l()),t.anchor!==void 0&&i.attr(`text-anchor`,t.anchor).attr(`dominant-baseline`,t.dominantBaseline).attr(`alignment-baseline`,t.alignmentBaseline),t.fontFamily!==void 0&&i.style(`font-family`,t.fontFamily),o!==void 0&&i.style(`font-size`,o),t.fontWeight!==void 0&&i.style(`font-weight`,t.fontWeight),t.fill!==void 0&&i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class),t.dy===void 0?c!==0&&i.attr(`dy`,c):i.attr(`dy`,t.dy);let f=d||`​`;if(t.tspan){let e=i.append(`tspan`);e.attr(`x`,t.x),t.fill!==void 0&&e.attr(`fill`,t.fill),e.text(f)}else i.text(f);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),s.push(i)}return s},`drawText`),se=x(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}x(n,`genPoints`);let r=e.append(`polygon`);return r.attr(`points`,n(t.x,t.y,t.width,t.height,7)),r.attr(`class`,`labelBox`),t.y+=t.height/2,G(e,t),r},`drawLabel`),K=-1,ce=x((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),le=x(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a();var y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.class=y,v.rx=3,v.ry=3,v.name=t.name,d===`neo`&&(v.rx=6,v.ry=6);let b=W(_,v),x=s.get(t.name)??0;if(U.has(f)&&(b.style(`stroke`,h[x%h.length]),b.style(`fill`,m[x%h.length])),d===`neo`&&b.attr(`filter`,`url(#drop-shadow)`),t.rectData=v,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?i(_,v.x+v.width-20,v.y+10,e.substr(1)):n(_,v.x+v.width-20,v.y+10,e)}o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`participant`),_.attr(`data-id`,t.name)),Y(r,S(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${re}`},r);let C=t.height;if(b.node){let e=b.node().getBBox();t.height=e.height,C=e.height}return C},`drawActorTypeParticipant`),ue=x(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a();var y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.class=y,v.name=t.name;let b={...v,x:v.x+-6,y:v.y+6,class:`actor`},x=W(_,v),C=W(_,b);t.rectData=v,d===`neo`&&_.attr(`filter`,`url(#drop-shadow)`);let w=s.get(t.name)??0;if(U.has(f)&&(x.style(`stroke`,h[w%h.length]),x.style(`fill`,m[w%h.length]),C.style(`stroke`,h[w%h.length]),C.style(`fill`,m[w%h.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?i(_,v.x+v.width-20,v.y+10,e.substr(1)):n(_,v.x+v.width-20,v.y+10,e)}Y(r,S(t.description))(t.description,_,v.x-6,v.y+6,v.width,v.height,{class:`actor ${re}`},r);let T=t.height;if(x.node){let e=x.node().getBBox();t.height=e.height,T=e.height}return o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`collections`),_.attr(`data-id`,t.name)),T},`drawActorTypeCollections`),de=x(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower(),_=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a(),y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,_.attr(`class`,y),v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.name=t.name;let b=v.height/2,x=b/(2.5+v.height/50),C=_.append(`g`),w=_.append(`g`),T=`M ${v.x},${v.y+b}
149
+ `},`getStyles`),z=36,B=`actor-top`,V=`actor-bottom`,re=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=c(function(t,n){let r=e(t,n);return _().look===`neo`&&r.attr(`data-look`,`neo`),r},`drawRect`),ie=c(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),je(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ae=c(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),oe=c(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await h(t.text,_()),a=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(a.height)).attr(`width`,Math.round(a.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,a.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-a.width/2)).attr(`y`,Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:e,stopx:i,starty:o}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-a.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(o)):r.attr(`y`,Math.round(o-a.height))}return[r]},`drawKatex`),G=c(function(e,t){let n=0,r=0,i=t.text.split(w.lineBreakRegex),[a,o]=p(t.fontSize),s=[],l=0,u=c(()=>t.y,`yfunc`);if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case`top`:case`start`:u=c(()=>Math.round(t.y+t.textMargin),`yfunc`);break;case`middle`:case`center`:u=c(()=>Math.round(t.y+(n+r+t.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=c(()=>Math.round(t.y+(n+r+2*t.textMargin)-t.textMargin),`yfunc`);break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case`left`:case`start`:t.x=Math.round(t.x+t.textMargin),t.anchor=`start`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`middle`:case`center`:t.x=Math.round(t.x+t.width/2),t.anchor=`middle`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`right`:case`end`:t.x=Math.round(t.x+t.width-t.textMargin),t.anchor=`end`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break}for(let[c,d]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(l=c*a);let i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,u()),t.anchor!==void 0&&i.attr(`text-anchor`,t.anchor).attr(`dominant-baseline`,t.dominantBaseline).attr(`alignment-baseline`,t.alignmentBaseline),t.fontFamily!==void 0&&i.style(`font-family`,t.fontFamily),o!==void 0&&i.style(`font-size`,o),t.fontWeight!==void 0&&i.style(`font-weight`,t.fontWeight),t.fill!==void 0&&i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class),t.dy===void 0?l!==0&&i.attr(`dy`,l):i.attr(`dy`,t.dy);let f=d||`​`;if(t.tspan){let e=i.append(`tspan`);e.attr(`x`,t.x),t.fill!==void 0&&e.attr(`fill`,t.fill),e.text(f)}else i.text(f);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),s.push(i)}return s},`drawText`),se=c(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}c(n,`genPoints`);let r=e.append(`polygon`);return r.attr(`points`,n(t.x,t.y,t.width,t.height,7)),r.attr(`class`,`labelBox`),t.y+=t.height/2,G(e,t),r},`drawLabel`),K=-1,ce=c((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),le=c(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a();var y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.class=y,v.rx=3,v.ry=3,v.name=t.name,d===`neo`&&(v.rx=6,v.ry=6);let b=W(_,v),x=s.get(t.name)??0;if(U.has(f)&&(b.style(`stroke`,h[x%h.length]),b.style(`fill`,m[x%h.length])),d===`neo`&&b.attr(`filter`,`url(#drop-shadow)`),t.rectData=v,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?i(_,v.x+v.width-20,v.y+10,e.substr(1)):n(_,v.x+v.width-20,v.y+10,e)}o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`participant`),_.attr(`data-id`,t.name)),Y(r,S(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${re}`},r);let C=t.height;if(b.node){let e=b.node().getBBox();t.height=e.height,C=e.height}return C},`drawActorTypeParticipant`),ue=c(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a();var y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.class=y,v.name=t.name;let b={...v,x:v.x+-6,y:v.y+6,class:`actor`},x=W(_,v),C=W(_,b);t.rectData=v,d===`neo`&&_.attr(`filter`,`url(#drop-shadow)`);let w=s.get(t.name)??0;if(U.has(f)&&(x.style(`stroke`,h[w%h.length]),x.style(`fill`,m[w%h.length]),C.style(`stroke`,h[w%h.length]),C.style(`fill`,m[w%h.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?i(_,v.x+v.width-20,v.y+10,e.substr(1)):n(_,v.x+v.width-20,v.y+10,e)}Y(r,S(t.description))(t.description,_,v.x-6,v.y+6,v.width,v.height,{class:`actor ${re}`},r);let T=t.height;if(x.node){let e=x.node().getBBox();t.height=e.height,T=e.height}return o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`collections`),_.attr(`data-id`,t.name)),T},`drawActorTypeCollections`),de=c(function(e,t,r,o,s){let c=o?t.stopy:t.starty,l=t.x+t.width/2,u=c+t.height,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower(),_=g;o||(K++,Object.keys(t.links||{}).length&&!r.forceMenus&&_.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=K,t.links!=null&&_.attr(`id`,`root-`+K),d===`neo`&&_.attr(`data-look`,`neo`));let v=a(),y=`actor`;t.properties?.class?y=t.properties.class:v.fill=`#eaeaea`,o?y+=` ${V}`:y+=` ${B}`,_.attr(`class`,y),v.x=t.x,v.y=c,v.width=t.width,v.height=t.height,v.name=t.name;let b=v.height/2,x=b/(2.5+v.height/50),C=_.append(`g`),w=_.append(`g`),T=`M ${v.x},${v.y+b}
150
150
  a ${x},${b} 0 0 0 0,${v.height}
151
151
  h ${v.width-2*x}
152
152
  a ${x},${b} 0 0 0 0,-${v.height}
153
153
  Z
154
154
  `;C.append(`path`).attr(`d`,T),w.append(`path`).attr(`d`,`M ${v.x},${v.y+b}
155
- a ${x},${b} 0 0 0 0,${v.height}`),C.attr(`transform`,`translate(${x}, ${-(v.height/2)})`),w.attr(`transform`,`translate(${v.width-x}, ${-v.height/2})`),t.rectData=v,d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let E=s.get(t.name)??0;if(U.has(f)&&(C.style(`stroke`,h[E%h.length]),C.style(`fill`,m[E%h.length]),w.style(`stroke`,h[E%h.length]),w.style(`fill`,m[E%h.length])),t.properties?.icon){let e=t.properties.icon.trim(),r=v.x+v.width-20,a=v.y+10;e.charAt(0)===`@`?i(_,r,a,e.substr(1)):n(_,r,a,e)}Y(r,S(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${re}`},r);let D=t.height,O=C.select(`path:last-child`);if(O.node()){let e=O.node().getBBox();t.height=e.height,D=e.height}return o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`queue`),_.attr(`data-id`,t.name)),D},`drawActorTypeQueue`),fe=x(function(e,t,n,r,i,o){let s=r?t.stopy:t.starty,c=t.x+t.width/2,l=s+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();r||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;r?y+=` ${V}`:y+=` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=a();b.x=t.x,b.y=s,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,C=s+32;v.append(`defs`).append(`marker`).attr(`id`,i+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,C).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+i+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${C-22})`);let w=o.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[w%m.length]),v.style(`fill`,p[w%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),Y(n,S(t.description))(t.description,v,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${H}`},n),r||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),pe=x(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;r?g+=` ${V}`:g+=` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=a();_.x=t.x,_.y=o,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=o+(r?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=i.get(t.name)??0;return U.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),r||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(n,S(t.description))(t.description,h,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${H}`},n),r?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, ${22/2-5})`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),me=x(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height+2*n.boxTextMargin,{theme:l,themeVariables:u,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=K,t.links!=null&&g.attr(`id`,`root-`+K),d===`neo`&&g.attr(`data-look`,`neo`));let _=a(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,r?v+=` ${V}`:v+=` ${B}`,_.x=t.x,_.y=o,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=o;let y=_.width/3,b=_.width/3,x=y/2,C=x/(2.5+y/50),w=g.append(`g`);w.attr(`class`,v);let T=`
155
+ a ${x},${b} 0 0 0 0,${v.height}`),C.attr(`transform`,`translate(${x}, ${-(v.height/2)})`),w.attr(`transform`,`translate(${v.width-x}, ${-v.height/2})`),t.rectData=v,d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let E=s.get(t.name)??0;if(U.has(f)&&(C.style(`stroke`,h[E%h.length]),C.style(`fill`,m[E%h.length]),w.style(`stroke`,h[E%h.length]),w.style(`fill`,m[E%h.length])),t.properties?.icon){let e=t.properties.icon.trim(),r=v.x+v.width-20,a=v.y+10;e.charAt(0)===`@`?i(_,r,a,e.substr(1)):n(_,r,a,e)}Y(r,S(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${re}`},r);let D=t.height,O=C.select(`path:last-child`);if(O.node()){let e=O.node().getBBox();t.height=e.height,D=e.height}return o||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`queue`),_.attr(`data-id`,t.name)),D},`drawActorTypeQueue`),fe=c(function(e,t,n,r,i,o){let s=r?t.stopy:t.starty,c=t.x+t.width/2,l=s+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();r||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;r?y+=` ${V}`:y+=` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=a();b.x=t.x,b.y=s,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,C=s+32;v.append(`defs`).append(`marker`).attr(`id`,i+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,C).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+i+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${C-22})`);let w=o.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[w%m.length]),v.style(`fill`,p[w%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),Y(n,S(t.description))(t.description,v,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${H}`},n),r||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),pe=c(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;r?g+=` ${V}`:g+=` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=a();_.x=t.x,_.y=o,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=o+(r?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=i.get(t.name)??0;return U.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),r||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(n,S(t.description))(t.description,h,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${H}`},n),r?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, ${22/2-5})`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),me=c(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height+2*n.boxTextMargin,{theme:l,themeVariables:u,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;r||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=K,t.links!=null&&g.attr(`id`,`root-`+K),d===`neo`&&g.attr(`data-look`,`neo`));let _=a(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,r?v+=` ${V}`:v+=` ${B}`,_.x=t.x,_.y=o,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=o;let y=_.width/3,b=_.width/3,x=y/2,C=x/(2.5+y/50),w=g.append(`g`);w.attr(`class`,v);let T=`
156
156
  M ${_.x},${_.y+C}
157
157
  a ${x},${C} 0 0 0 ${y},0
158
158
  a ${x},${C} 0 0 0 -${y},0
159
159
  l 0,${b-2*C}
160
160
  a ${x},${C} 0 0 0 ${y},0
161
161
  l 0,-${b-2*C}
162
- `;w.append(`path`).attr(`d`,T),d===`neo`&&w.attr(`filter`,`url(#drop-shadow)`);let E=i.get(t.name)??0;U.has(l)?(w.style(`stroke`,p[E%p.length]),w.style(`fill`,f[E%p.length])):w.style(`stroke`,m),w.attr(`transform`,`translate(${y}, ${C})`),t.rectData=_,Y(n,S(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${re}`},n);let D=w.select(`path:last-child`);return D.node()&&(t.height=D.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),he=x(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(K++,l.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=a();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,o+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,o+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,o+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,S(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),ge=x(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?o+(1-v)*30:o;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,s).attr(`y1`,y+25*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,s-z/2*v).attr(`y1`,y+33*v).attr(`x2`,s+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,s-z/2*v).attr(`y1`,y+60*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,s).attr(`y1`,y+45*v).attr(`x2`,s+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=a();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let C=i.get(t.name)??0;return U.has(u)?(g.style(`stroke`,p[C%p.length]),g.style(`fill`,f[C%p.length])):g.style(`stroke`,m),Y(n,S(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),_e=x(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await ge(e,t,n,r,s);case`participant`:return await le(e,t,n,r,s);case`boundary`:return await he(e,t,n,r,s);case`control`:return await fe(e,t,n,r,i,s);case`entity`:return await pe(e,t,n,r,s);case`database`:return await me(e,t,n,r,s);case`collections`:return await ue(e,t,n,r,s);case`queue`:return await de(e,t,n,r,s)}},`drawActor`),ve=x(function(e,t,n){let r=e.append(`g`);Se(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),ye=x(function(e){return e.append(`g`)},`anchorElement`),be=x(function(e,t,n,r,i,o,s){let{theme:c,themeVariables:l}=r,{bkgColorArray:u,borderColorArray:d,mainBkg:f}=l,p=a(),m=t.anchored,h=t.actor;p.x=t.startx,p.y=t.starty,p.class=`activation`+i%3,p.width=t.stopx-t.startx,p.height=n-t.starty;let g=W(m,p),_=(s??new Map([...o.db.getActors().values()].map((e,t)=>[e.name,t]))).get(h)??0;U.has(c)&&(g.style(`stroke`,d[_%d.length]),g.style(`fill`,u[_%d.length]??f))},`drawActivation`),xe=x(async function(e,n,r,i,a){let{boxMargin:o,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:u,messageFontSize:d,messageFontWeight:f}=i,p=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+a.id),m=x(function(e,t,n,r){return p.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);m(n.startx,n.starty,n.stopx,n.starty),m(n.stopx,n.starty,n.stopx,n.stopy),m(n.startx,n.stopy,n.stopx,n.stopy),m(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){m(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let h=t();h.text=r,h.x=n.startx,h.y=n.starty,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.width=Math.max(l??0,50),h.height=c+(i.look===`neo`?15:0)||20,h.textMargin=s,h.class=`labelText`,se(p,h),h=ke(),h.text=n.title,h.x=n.startx+l/2+(n.stopx-n.startx)/2,h.y=n.starty+o+s,h.anchor=`middle`,h.valign=`middle`,h.textMargin=s,h.class=`loopText`,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=!0;let g=S(h.text)?await oe(p,h,n):G(p,h);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){h.text=t.message,h.x=n.startx+(n.stopx-n.startx)/2,h.y=n.sections[e].y+o+s,h.class=`sectionTitle`,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=n.wrap,S(h.text)?(n.starty=n.sections[e].y,await oe(p,h,n)):G(p,h);let r=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=r-(o+s)}}return n.height=Math.round(n.stopy-n.starty),p},`drawLoop`),Se=x(function(e,t){r(e,t)},`drawBackgroundRect`),Ce=x(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),q=x(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),J=x(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),we=x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Te=x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Ee=x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),De=x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Oe=x(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),ke=x(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Ae=x(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}x(e,`byText`);function t(e,t,n,r,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[m,h]=f(l),g=e.split(p.lineBreakRegex);for(let e=0;e<g.length;e++){let c=e*m-m*(g.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).style(`text-anchor`,`middle`).style(`font-size`,h).style(`font-weight`,d).style(`font-family`,u);l.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(g[e]),l.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(l,s)}}x(t,`byTspan`);function n(e,n,r,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,r,a,o,s,c,l),i(d,c)}x(n,`byFo`);async function r(e,n,r,a,o,s,c,l){let u=await O(e,T()),d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,r+o/2-u.width/2).attr(`y`,a+s/2-u.height/2).attr(`width`,u.width).attr(`height`,u.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await _(e,T())),t(e,d,r,a,o,s,c,l),i(f,c)}x(r,`byKatex`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return x(i,`_setTextAttrs`),function(i,a=!1){return a?r:i.textPlacement===`fo`?n:i.textPlacement===`old`?e:t}})(),je=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).text(e),s)}x(e,`byText`);function t(e,t,n,i,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,f=e.split(p.lineBreakRegex);for(let e=0;e<f.length;e++){let a=e*l-l*(f.length-1)/2,c=t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).style(`font-size`,l).style(`font-weight`,d).style(`font-family`,u);c.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(f[e]),c.attr(`y`,i+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),r(c,s)}}x(t,`byTspan`);function n(e,n,i,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,i,a,o,s,c,l),r(d,c)}x(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return x(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),X={drawRect:W,drawText:G,drawLabel:se,drawActor:_e,drawBox:ve,drawPopup:ie,anchorElement:ye,drawActivation:be,drawLoop:xe,drawBackgroundRect:Se,insertArrowHead:we,insertArrowFilledHead:Te,insertSequenceNumber:Ee,insertArrowCrossHead:De,insertDatabaseIcon:Ce,insertComputerIcon:q,insertClockIcon:J,getTextObj:ke,getNoteRect:Ae,fixLifeLineHeights:ce,sanitizeUrl:N.sanitizeUrl,insertDropShadow:Oe,insertSolidTopArrowHead:x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidTopArrowHead`).attr(`refX`,7.9).attr(`refY`,7.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 8 L 0 8 z`)},`insertSolidTopArrowHead`),insertSolidBottomArrowHead:x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidBottomArrowHead`).attr(`refX`,7.9).attr(`refY`,.75).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 0 L 0 8 z`)},`insertSolidBottomArrowHead`),insertStickTopArrowHead:x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickTopArrowHead`).attr(`refX`,7.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 7 7`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickTopArrowHead`),insertStickBottomArrowHead:x(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickBottomArrowHead`).attr(`refX`,7.5).attr(`refY`,0).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 7 L 7 0`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickBottomArrowHead`)},Z={},Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:x(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:x(function(e){this.boxes.push(e)},`addBox`),addActor:x(function(e){this.actors.push(e)},`addActor`),addLoop:x(function(e){this.loops.push(e)},`addLoop`),addMessage:x(function(e){this.messages.push(e)},`addMessage`),addNote:x(function(e){this.notes.push(e)},`addNote`),lastActor:x(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:x(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:x(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:x(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,He(k())},`init`),updateVal:x(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:x(function(e,t,n,r){let i=this,a=0;function o(o){return x(function(s){a++;let c=i.sequenceItems.length-a+1;i.updateVal(s,`starty`,t-c*Z.boxMargin,Math.min),i.updateVal(s,`stopy`,r+c*Z.boxMargin,Math.max),i.updateVal(Q.data,`startx`,e-c*Z.boxMargin,Math.min),i.updateVal(Q.data,`stopx`,n+c*Z.boxMargin,Math.max),o!==`activation`&&(i.updateVal(s,`startx`,e-c*Z.boxMargin,Math.min),i.updateVal(s,`stopx`,n+c*Z.boxMargin,Math.max),i.updateVal(Q.data,`starty`,t-c*Z.boxMargin,Math.min),i.updateVal(Q.data,`stopy`,r+c*Z.boxMargin,Math.max))},`updateItemBounds`)}x(o,`updateFn`),this.sequenceItems.forEach(o()),this.activations.forEach(o(`activation`))},`updateBounds`),insert:x(function(e,t,n,r){let i=p.getMin(e,n),a=p.getMax(e,n),o=p.getMin(t,r),s=p.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:x(function(e,t,n){let r=n.get(e.from),i=Ue(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:x(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:x(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:x(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:x(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:x(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:x(function(e){this.verticalPos+=e,this.data.stopy=p.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:x(function(){return this.verticalPos},`getVerticalPos`),getBounds:x(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Me=x(async function(e,n,r){Q.bumpVerticalPos(Z.boxMargin),n.height=Z.boxMargin,n.starty=Q.getVerticalPos();let i=a();i.x=n.startx,i.y=n.starty,i.width=n.width||Z.width,i.class=`note`;let o=e.append(`g`);o.attr(`data-et`,`note`),o.attr(`data-id`,`i`+r);let s=X.drawRect(o,i),c=t();c.x=n.startx,c.y=n.starty,c.width=i.width,c.dy=`1em`,c.text=n.message,c.class=`noteText`,c.fontFamily=Z.noteFontFamily,c.fontSize=Z.noteFontSize,c.fontWeight=Z.noteFontWeight,c.anchor=Z.noteAlign,c.textMargin=Z.noteMargin,c.valign=`center`;let l=S(c.text)?await oe(o,c):G(o,c),u=Math.round(l.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));s.attr(`height`,u+2*Z.noteMargin),n.height+=u+2*Z.noteMargin,Q.bumpVerticalPos(u+2*Z.noteMargin),n.stopy=n.starty+u+2*Z.noteMargin,n.stopx=n.startx+i.width,Q.insert(n.startx,n.starty,n.stopx,n.stopy),Q.models.addNote(n)},`drawNote`),Ne=x(function(e,t,n,r,i,a,o){let s=r.db.getActors(),c=s.get(t.from),l=s.get(t.to),u=n.sequenceVisible,d=c.x+c.width/2,f=l.x+l.width/2,p=d<=f,m=tt(t,r),h=e.append(`g`),g=x((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),_=x(e=>{h.append(`circle`).attr(`cx`,e).attr(`cy`,o).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:v,CENTRAL_CONNECTION_REVERSE:y,CENTRAL_CONNECTION_DUAL:b}=r.db.LINETYPE;if(u)switch(t.centralConnection){case v:m&&(f+=g(p,!0));break;case y:m||(d+=g(p,!1));break;case b:m?f+=g(p,!0):d+=g(p,!1);break}switch(t.centralConnection){case v:_(f);break;case y:_(d);break;case b:_(d),_(f);break}},`drawCentralConnection`),Pe=x(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Fe=x(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ie=x(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Le(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=p.splitBreaks(i).length,o=S(i),s=o?await O(i,k()):c.calculateTextDimensions(i,Pe(Z));if(!o){let e=s.height/a;t.height+=e,Q.bumpVerticalPos(e)}let l,u=s.height-10,d=s.width;if(n===r){l=Q.getVerticalPos()+u,Z.rightAngles||(u+=Z.boxMargin,l=Q.getVerticalPos()+u),u+=30;let e=p.getMax(d/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+u,r+e,Q.getVerticalPos()+30+u)}else u+=Z.boxMargin,l=Q.getVerticalPos()+u,Q.insert(n,l-10,r,l);return Q.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}x(Le,`boundMessage`);var Re=x(async function(e,n,r,i,a,o){let{startx:s,stopx:l,starty:u,message:d,type:f,sequenceIndex:m,sequenceVisible:h}=n,g=c.calculateTextDimensions(d,Pe(Z)),_=t();_.x=Math.min(s,l),_.y=u+10,_.width=Math.abs(l-s),_.class=`messageText`,_.dy=`1em`,_.text=d,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,S(_.text)?await oe(e,_,{startx:s,stopx:l,starty:r}):G(e,_);let v=g.width,y;if(s===l){let t=h||Z.showSequenceNumbers,o=tt(a,i),c=nt(a,i),u=s+(t&&(o||c)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${r} H ${s+p.getMax(Z.width/2,v/2)} V ${r+25} H ${s}`):e.append(`path`).attr(`d`,`M `+u+`,`+r+` C `+(u+60)+`,`+(r-10)+` `+(s+60)+`,`+(r+30)+` `+s+`,`+(r+20)),$e(a,i)&&Ne(e,a,n,i,s,l,r)}else y=e.append(`line`),y.attr(`x1`,s),y.attr(`y1`,r),y.attr(`x2`,l),y.attr(`y2`,r),$e(a,i)&&Ne(e,a,n,i,s,l,r);f===i.db.LINETYPE.DOTTED||f===i.db.LINETYPE.DOTTED_CROSS||f===i.db.LINETYPE.DOTTED_POINT||f===i.db.LINETYPE.DOTTED_OPEN||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===i.db.LINETYPE.SOLID_TOP_DOTTED||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===i.db.LINETYPE.STICK_TOP_DOTTED||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+n.id),y.attr(`data-from`,n.from),y.attr(`data-to`,n.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=A(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(f===i.db.LINETYPE.SOLID_TOP||f===i.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.SOLID_BOTTOM||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.STICK_TOP||f===i.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.STICK_BOTTOM||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.SOLID||f===i.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(f===i.db.LINETYPE.SOLID_POINT||f===i.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(f===i.db.LINETYPE.SOLID_CROSS||f===i.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),h||Z.showSequenceNumbers){let t=f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,c=f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=$e(a,i),d=s,p=l;t?(s<l?d=s+12:(d=s-6+(u?-5:0),d+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),y.attr(`x1`,d)):c?(l>s?p=l-12:(p=l-6,d+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),p+=u?15:0,y.attr(`x2`,p),y.attr(`x1`,d)):y.attr(`x1`,s+6);let h=0,g=s===l,_=s<=l;h=g?n.fromBounds+1:c?_?n.toBounds-1:n.fromBounds+1:_?n.fromBounds+1:n.toBounds-1;let v=`12px`,x=m.toString().length;x>5?v=`7px`:x>3&&(v=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,r).attr(`x2`,h).attr(`y2`,r).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,r+4).attr(`font-family`,`sans-serif`).attr(`font-size`,v).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(m)}},`drawMessage`),ze=x(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=p.getMax(r.width||Z.width,Z.width),r.height=p.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=p.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),Be=x(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=p.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ve=x(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Je(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),He=x(function(e){d(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ue=x(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),We=x(function(e,t){let n=t.get(e),r=Ue(e);return[r.reduce(function(e,t){return p.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return p.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,t,n,r,i){Q.bumpVerticalPos(n);let a=r;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,i=Pe(Z);t.message=c.wrapLabel(`[${t.message}]`,n-2*Z.wrapPadding,i),t.width=n,t.wrap=!0;let o=c.calculateTextDimensions(t.message,i),l=p.getMax(o.height,Z.labelBoxHeight);a=r+l,s.debug(`${l} - ${t.message}`)}i(t),Q.bumpVerticalPos(a)}x($,`adjustLoopHeightForWrap`);function Ge(e,t,n,r,i,a,o){function s(n,r){n.x<i.get(e.from).x?(Q.insert(t.stopx-r,t.starty,t.startx,t.stopy+n.height/2+Z.noteMargin),t.stopx+=r):(Q.insert(t.startx,t.starty,t.stopx+r,t.stopy+n.height/2+Z.noteMargin),t.stopx-=r)}x(s,`receiverAdjustment`);function c(n,r){n.x<i.get(e.to).x?(Q.insert(t.startx-r,t.starty,t.stopx,t.stopy+n.height/2+Z.noteMargin),t.startx+=r):(Q.insert(t.stopx,t.starty,t.startx+r,t.stopy+n.height/2+Z.noteMargin),t.startx-=r)}x(c,`senderAdjustment`);let l=[R.ACTOR,R.CONTROL,R.ENTITY,R.DATABASE];if(a.get(e.to)==r){let t=i.get(e.to);s(t,l.includes(t.type)?z/2+3:t.width/2+3),t.starty=n-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(o.get(e.from)==r){let t=i.get(e.from);Z.mirrorActors&&c(t,l.includes(t.type)?z/2:t.width/2),t.stopy=n-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(o.get(e.to)==r){let t=i.get(e.to);Z.mirrorActors&&s(t,l.includes(t.type)?z/2+3:t.width/2+3),t.stopy=n-t.height/2,Q.bumpVerticalPos(t.height/2)}}x(Ge,`adjustCreatedDestroyedData`);var Ke=x(async function(e,t,n,r){let{securityLevel:i,sequence:a,look:o}=k();Z=a;let c;i===`sandbox`&&(c=l(`#i`+t));let u=l(i===`sandbox`?c.nodes()[0].contentDocument.body:`body`),d=i===`sandbox`?c.nodes()[0].contentDocument:document;Q.init(),s.debug(r.db);let f=i===`sandbox`?u.select(`[id="${t}"]`):l(`[id="${t}"]`),p=r.db.getActors(),h=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),_=r.db.getBoxes(),v=r.db.getActorKeys(),y=r.db.getMessages(),b=r.db.getDiagramTitle(),S=r.db.hasAtLeastOneBox(),C=r.db.hasAtLeastOneBoxWithTitle(),w=await qe(p,y,r);if(Z.height=await Ye(p,w,_),X.insertComputerIcon(f,t),X.insertDatabaseIcon(f,t),X.insertClockIcon(f,t),S&&(Q.bumpVerticalPos(Z.boxMargin),C&&Q.bumpVerticalPos(_[0].textMaxHeight)),Z.hideUnusedParticipants===!0){let e=new Set;y.forEach(t=>{e.add(t.from),e.add(t.to)}),v=v.filter(t=>e.has(t))}let T=new Map(v.map((e,t)=>[p.get(e)?.name??e,t]));ze(f,p,h,v,0,y,!1);let E=await it(y,p,w,r);X.insertArrowHead(f,t),X.insertArrowCrossHead(f,t),X.insertArrowFilledHead(f,t),X.insertSequenceNumber(f,t),X.insertSolidTopArrowHead(f,t),X.insertSolidBottomArrowHead(f,t),X.insertStickTopArrowHead(f,t),X.insertStickBottomArrowHead(f,t),o===`neo`&&X.insertDropShadow(f,Z);function D(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(f,n,t,Z,Ue(e.from).length,r,T),Q.insert(n.startx,t-10,n.stopx,t)}x(D,`activeEnd`);let O=1,A=1,j=[],M=[],N=0;for(let e of y){let t,n,i;switch(e.type){case r.db.LINETYPE.NOTE:Q.resetVerticalPos(),n=e.noteModel,await Me(f,n,e.id);break;case r.db.LINETYPE.ACTIVE_START:Q.newActivation(e,f,p);break;case r.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,f,p);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,f,p);break;case r.db.LINETYPE.ACTIVE_END:D(e,Q.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.LOOP_END:t=Q.endLoop(),await X.drawLoop(f,t,`loop`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:$(E,e,Z.boxMargin,Z.boxMargin,e=>Q.newLoop(void 0,e.message));break;case r.db.LINETYPE.RECT_END:t=Q.endLoop(),M.push(t),Q.models.addLoop(t),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos());break;case r.db.LINETYPE.OPT_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.OPT_END:t=Q.endLoop(),await X.drawLoop(f,t,`opt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.ALT_ELSE:$(E,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.ALT_END:t=Q.endLoop(),await X.drawLoop(f,t,`alt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:$(E,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.PAR_END:t=Q.endLoop(),await X.drawLoop(f,t,`par`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:O=e.message.start||O,A=e.message.step||A,e.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.CRITICAL_OPTION:$(E,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.CRITICAL_END:t=Q.endLoop(),await X.drawLoop(f,t,`critical`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:$(E,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.BREAK_END:t=Q.endLoop(),await X.drawLoop(f,t,`break`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=O,i.sequenceVisible=r.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await Le(f,i);Ge(e,i,t,N,p,h,g),j.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){s.error(`error while drawing message`,e)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(O=Math.round((O+A)*100)/100),N++}s.debug(`createdActors`,h),s.debug(`destroyedActors`,g),await Be(f,p,v,!1,t,r,T);for(let e of j)await Re(f,e.messageModel,e.lineStartY,r,e.msg,t);Z.mirrorActors&&await Be(f,p,v,!0,t,r,T),M.forEach(e=>X.drawBackgroundRect(f,e)),ce(f,p,v,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(f,e,Z)}S&&Q.bumpVerticalPos(Z.boxMargin);let P=Ve(f,p,v,d),{bounds:F}=Q.getBounds();F.startx===void 0&&(F.startx=0),F.starty===void 0&&(F.starty=0),F.stopx===void 0&&(F.stopx=0),F.stopy===void 0&&(F.stopy=0);let I=F.stopy-F.starty;I<P.maxHeight&&(I=P.maxHeight);let L=I+2*Z.diagramMarginY;Z.mirrorActors&&(L=L-Z.boxMargin+Z.bottomMarginAdj);let ee=F.stopx-F.startx;ee<P.maxWidth&&(ee=P.maxWidth);let R=ee+2*Z.diagramMarginX;b&&f.append(`text`).text(b).attr(`x`,(F.stopx-F.startx)/2-2*Z.diagramMarginX).attr(`y`,-25),m(f,L,R,Z.useMaxWidth);let te=b?40:0,ne=p.size&&o===`neo`?30:0;f.attr(`viewBox`,F.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+te)+` `+R+` `+(L+te+ne)),s.debug(`models:`,Q.models)},`draw`);async function qe(e,t,n){let r={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let t=e.get(i.to);if(i.placement===n.db.PLACEMENT.LEFTOF&&!t.prevActor||i.placement===n.db.PLACEMENT.RIGHTOF&&!t.nextActor)continue;let a=i.placement!==void 0,o=!a,s=a?Fe(Z):Pe(Z),l=i.wrap?c.wrapLabel(i.message,Z.width-2*Z.wrapPadding,s):i.message,u=(S(l)?await O(i.message,k()):c.calculateTextDimensions(l,s)).width+2*Z.wrapPadding;o&&i.from===t.nextActor?r[i.to]=p.getMax(r[i.to]||0,u):o&&i.from===t.prevActor?r[i.from]=p.getMax(r[i.from]||0,u):o&&i.from===i.to?(r[i.from]=p.getMax(r[i.from]||0,u/2),r[i.to]=p.getMax(r[i.to]||0,u/2)):i.placement===n.db.PLACEMENT.RIGHTOF?r[i.from]=p.getMax(r[i.from]||0,u):i.placement===n.db.PLACEMENT.LEFTOF?r[t.prevActor]=p.getMax(r[t.prevActor]||0,u):i.placement===n.db.PLACEMENT.OVER&&(t.prevActor&&(r[t.prevActor]=p.getMax(r[t.prevActor]||0,u/2)),t.nextActor&&(r[i.from]=p.getMax(r[i.from]||0,u/2)))}return s.debug(`maxMessageWidthPerActor:`,r),r}x(qe,`getMaxMessageWidthPerActor`);var Je=x(function(e){let t=0,n=Ie(Z);for(let r in e.links){let e=c.calculateTextDimensions(r,n).width+2*Z.wrapPadding+2*Z.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`);async function Ye(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=c.wrapLabel(n.description,Z.width-2*Z.wrapPadding,Ie(Z)));let i=S(n.description)?await O(n.description,k()):c.calculateTextDimensions(n.description,Ie(Z));n.width=n.wrap?Z.width:p.getMax(Z.width,i.width+2*Z.wrapPadding),n.height=n.wrap?p.getMax(i.height,Z.height):Z.height,r=p.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+Z.actorMargin-r.width/2;r.margin=p.getMax(e,Z.actorMargin);continue}let a=t[n]+Z.actorMargin-r.width/2-i.width/2;r.margin=p.getMax(a,Z.actorMargin)}let i=0;return n.forEach(t=>{let n=Pe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=Z.boxMargin*8;r+=a,r-=2*Z.boxTextMargin,t.wrap&&(t.name=c.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=c.calculateTextDimensions(t.name,n);i=p.getMax(o.height,i);let s=p.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,r<s){let e=(s-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=i),p.getMax(r,Z.height)}x(Ye,`calculateActorMargins`);var Xe=x(async function(e,t,n){let r=t.get(e.from),i=t.get(e.to),a=r.x,o=i.x,l=e.wrap&&e.message,u=S(e.message)?await O(e.message,k()):c.calculateTextDimensions(l?c.wrapLabel(e.message,Z.width,Fe(Z)):e.message,Fe(Z)),d={width:l?Z.width:p.getMax(Z.width,u.width+2*Z.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(d.width=l?p.getMax(Z.width,u.width):p.getMax(r.width/2+i.width/2,u.width+2*Z.noteMargin),d.startx=a+(r.width+Z.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(d.width=l?p.getMax(Z.width,u.width+2*Z.noteMargin):p.getMax(r.width/2+i.width/2,u.width+2*Z.noteMargin),d.startx=a-d.width+(r.width-Z.actorMargin)/2):e.to===e.from?(u=c.calculateTextDimensions(l?c.wrapLabel(e.message,p.getMax(Z.width,r.width),Fe(Z)):e.message,Fe(Z)),d.width=l?p.getMax(Z.width,r.width):p.getMax(r.width,Z.width,u.width+2*Z.noteMargin),d.startx=a+(r.width-d.width)/2):(d.width=Math.abs(a+r.width/2-(o+i.width/2))+Z.actorMargin,d.startx=a<o?a+r.width/2-Z.actorMargin/2:o+i.width/2-Z.actorMargin/2),l&&(d.message=c.wrapLabel(e.message,d.width-2*Z.wrapPadding,Fe(Z))),s.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},`buildNoteModel`),Ze=4,Qe=6,$e=x(function(e,t){let{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[n,r,i].includes(e.centralConnection)},`hasCentralConnection`),et=x(function(e,t,n){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=t.db.LINETYPE,s=0;return(e.centralConnection===r||e.centralConnection===i)&&(s+=Ze),(e.centralConnection===r||e.centralConnection===i)&&(e.type===a||e.type===o)&&(s+=n?0:-Qe),s},`calculateCentralConnectionOffset`),tt=x(function(e,t){let{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=t.db.LINETYPE;return[n,r,i,a,o,s,c,l].includes(e.type)},`isReverseArrowType`),nt=x(function(e,t){let{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[n,r].includes(e.type)},`isBidirectionalArrowType`),rt=x(function(e,t,n){let{look:r}=k();if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,a]=We(e.from,t),[o,s]=We(e.to,t),l=i<=o,u=l?a:i,d=l?o:s;r===`neo`&&(e.type!==n.db.LINETYPE.SOLID_OPEN&&(d+=l?-3:3),(e.type===n.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(u+=l?3:-3)),u+=et(e,n,l);let f=Math.abs(o-s)>2,m=x(e=>l?-e:e,`adjustValue`);e.from===e.to?d=u:(e.activate&&!f&&(d+=m(Z.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=m(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=m(3)));let h=[i,a,o,s],g=Math.abs(u-d);e.wrap&&e.message&&(e.message=c.wrapLabel(e.message,p.getMax(g+2*Z.wrapPadding,Z.width),Pe(Z)));let _=c.calculateTextDimensions(e.message,Pe(Z));return{width:p.getMax(e.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},`buildMessageModel`),it=x(async function(e,t,n,r){let i={},a=[],o,c,l;for(let n of e){switch(n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(o=a.pop(),i[o.id]=o,i[n.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=Ue(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:n.from,enabled:!0};Q.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(n.from);Q.activations.splice(e,1).splice(0,1)}break}n.placement===void 0?(l=rt(n,t,r),n.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(e=>{if(o=e,l.startx===l.stopx){let e=t.get(n.from),r=t.get(n.to);o.from=p.getMin(e.x-l.width/2,e.x-e.width/2,o.from),o.to=p.getMax(r.x+l.width/2,r.x+e.width/2,o.to),o.width=p.getMax(o.width,Math.abs(o.to-o.from))-Z.labelBoxWidth}else o.from=p.getMin(l.startx,o.from),o.to=p.getMax(l.stopx,o.to),o.width=p.getMax(o.width,l.width)-Z.labelBoxWidth})):(c=await Xe(n,t,r),n.noteModel=c,a.forEach(e=>{o=e,o.from=p.getMin(o.from,c.startx),o.to=p.getMax(o.to,c.startx+c.width),o.width=p.getMax(o.width,Math.abs(o.from-o.to))-Z.labelBoxWidth}))}return Q.activations=[],s.debug(`Loop type widths:`,i),i},`calculateLoopBounds`),at={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Be,drawActorsPopup:Ve,setConf:He,draw:Ke},styles:ne,init:x(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,v({sequence:{wrap:e.wrap}}))},`init`)};export{at as diagram};
162
+ `;w.append(`path`).attr(`d`,T),d===`neo`&&w.attr(`filter`,`url(#drop-shadow)`);let E=i.get(t.name)??0;U.has(l)?(w.style(`stroke`,p[E%p.length]),w.style(`fill`,f[E%p.length])):w.style(`stroke`,m),w.attr(`transform`,`translate(${y}, ${C})`),t.rectData=_,Y(n,S(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${re}`},n);let D=w.select(`path:last-child`);return D.node()&&(t.height=D.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),he=c(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(K++,l.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=a();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,o+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,o+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,o+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,S(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),ge=c(function(e,t,n,r,i){let o=r?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;r?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?o+(1-v)*30:o;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,s).attr(`y1`,y+25*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,s-z/2*v).attr(`y1`,y+33*v).attr(`x2`,s+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,s-z/2*v).attr(`y1`,y+60*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,s).attr(`y1`,y+45*v).attr(`x2`,s+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=a();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let C=i.get(t.name)??0;return U.has(u)?(g.style(`stroke`,p[C%p.length]),g.style(`fill`,f[C%p.length])):g.style(`stroke`,m),Y(n,S(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),_e=c(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await ge(e,t,n,r,s);case`participant`:return await le(e,t,n,r,s);case`boundary`:return await he(e,t,n,r,s);case`control`:return await fe(e,t,n,r,i,s);case`entity`:return await pe(e,t,n,r,s);case`database`:return await me(e,t,n,r,s);case`collections`:return await ue(e,t,n,r,s);case`queue`:return await de(e,t,n,r,s)}},`drawActor`),ve=c(function(e,t,n){let r=e.append(`g`);Se(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),ye=c(function(e){return e.append(`g`)},`anchorElement`),be=c(function(e,t,n,r,i,o,s){let{theme:c,themeVariables:l}=r,{bkgColorArray:u,borderColorArray:d,mainBkg:f}=l,p=a(),m=t.anchored,h=t.actor;p.x=t.startx,p.y=t.starty,p.class=`activation`+i%3,p.width=t.stopx-t.startx,p.height=n-t.starty;let g=W(m,p),_=(s??new Map([...o.db.getActors().values()].map((e,t)=>[e.name,t]))).get(h)??0;U.has(c)&&(g.style(`stroke`,d[_%d.length]),g.style(`fill`,u[_%d.length]??f))},`drawActivation`),xe=c(async function(e,n,r,i,a){let{boxMargin:o,boxTextMargin:s,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=i,m=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+a.id),h=c(function(e,t,n,r){return m.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);h(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=t();g.text=r,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(i.look===`neo`?15:0)||20,g.textMargin=s,g.class=`labelText`,se(m,g),g=ke(),g.text=n.title,g.x=n.startx+u/2+(n.stopx-n.startx)/2,g.y=n.starty+o+s,g.anchor=`middle`,g.valign=`middle`,g.textMargin=s,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=S(g.text)?await oe(m,g,n):G(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+o+s,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,S(g.text)?(n.starty=n.sections[e].y,await oe(m,g,n)):G(m,g);let r=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=r-(o+s)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Se=c(function(e,t){r(e,t)},`drawBackgroundRect`),Ce=c(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),q=c(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),J=c(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),we=c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Te=c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Ee=c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),De=c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Oe=c(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),ke=c(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Ae=c(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}c(e,`byText`);function t(e,t,n,r,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,m]=p(l),h=e.split(w.lineBreakRegex);for(let e=0;e<h.length;e++){let c=e*f-f*(h.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).style(`text-anchor`,`middle`).style(`font-size`,m).style(`font-weight`,d).style(`font-family`,u);l.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(h[e]),l.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(l,s)}}c(t,`byTspan`);function n(e,n,r,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,r,a,o,s,c,l),i(d,c)}c(n,`byFo`);async function r(e,n,r,a,o,c,l,u){let d=await s(e,_()),f=n.append(`switch`),p=f.append(`foreignObject`).attr(`x`,r+o/2-d.width/2).attr(`y`,a+c/2-d.height/2).attr(`width`,d.width).attr(`height`,d.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);p.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await h(e,_())),t(e,f,r,a,o,c,l,u),i(p,l)}c(r,`byKatex`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return c(i,`_setTextAttrs`),function(i,a=!1){return a?r:i.textPlacement===`fo`?n:i.textPlacement===`old`?e:t}})(),je=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).text(e),s)}c(e,`byText`);function t(e,t,n,i,a,o,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,f=e.split(w.lineBreakRegex);for(let e=0;e<f.length;e++){let a=e*l-l*(f.length-1)/2,c=t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).style(`font-size`,l).style(`font-weight`,d).style(`font-family`,u);c.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(f[e]),c.attr(`y`,i+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),r(c,s)}}c(t,`byTspan`);function n(e,n,i,a,o,s,c,l){let u=n.append(`switch`),d=u.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,u,i,a,o,s,c,l),r(d,c)}c(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return c(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),X={drawRect:W,drawText:G,drawLabel:se,drawActor:_e,drawBox:ve,drawPopup:ie,anchorElement:ye,drawActivation:be,drawLoop:xe,drawBackgroundRect:Se,insertArrowHead:we,insertArrowFilledHead:Te,insertSequenceNumber:Ee,insertArrowCrossHead:De,insertDatabaseIcon:Ce,insertComputerIcon:q,insertClockIcon:J,getTextObj:ke,getNoteRect:Ae,fixLifeLineHeights:ce,sanitizeUrl:N.sanitizeUrl,insertDropShadow:Oe,insertSolidTopArrowHead:c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidTopArrowHead`).attr(`refX`,7.9).attr(`refY`,7.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 8 L 0 8 z`)},`insertSolidTopArrowHead`),insertSolidBottomArrowHead:c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidBottomArrowHead`).attr(`refX`,7.9).attr(`refY`,.75).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 0 L 0 8 z`)},`insertSolidBottomArrowHead`),insertStickTopArrowHead:c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickTopArrowHead`).attr(`refX`,7.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 7 7`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickTopArrowHead`),insertStickBottomArrowHead:c(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickBottomArrowHead`).attr(`refX`,7.5).attr(`refY`,0).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 7 L 7 0`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickBottomArrowHead`)},Z={},Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:c(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:c(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:c(function(e){this.boxes.push(e)},`addBox`),addActor:c(function(e){this.actors.push(e)},`addActor`),addLoop:c(function(e){this.loops.push(e)},`addLoop`),addMessage:c(function(e){this.messages.push(e)},`addMessage`),addNote:c(function(e){this.notes.push(e)},`addNote`),lastActor:c(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:c(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:c(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:c(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:c(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,He(x())},`init`),updateVal:c(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:c(function(e,t,n,r){let i=this,a=0;function o(o){return c(function(s){a++;let c=i.sequenceItems.length-a+1;i.updateVal(s,`starty`,t-c*Z.boxMargin,Math.min),i.updateVal(s,`stopy`,r+c*Z.boxMargin,Math.max),i.updateVal(Q.data,`startx`,e-c*Z.boxMargin,Math.min),i.updateVal(Q.data,`stopx`,n+c*Z.boxMargin,Math.max),o!==`activation`&&(i.updateVal(s,`startx`,e-c*Z.boxMargin,Math.min),i.updateVal(s,`stopx`,n+c*Z.boxMargin,Math.max),i.updateVal(Q.data,`starty`,t-c*Z.boxMargin,Math.min),i.updateVal(Q.data,`stopy`,r+c*Z.boxMargin,Math.max))},`updateItemBounds`)}c(o,`updateFn`),this.sequenceItems.forEach(o()),this.activations.forEach(o(`activation`))},`updateBounds`),insert:c(function(e,t,n,r){let i=w.getMin(e,n),a=w.getMax(e,n),o=w.getMin(t,r),s=w.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:c(function(e,t,n){let r=n.get(e.from),i=Ue(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:c(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:c(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:c(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:c(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:c(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:c(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:c(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:c(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:c(function(e){this.verticalPos+=e,this.data.stopy=w.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:c(function(){return this.verticalPos},`getVerticalPos`),getBounds:c(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Me=c(async function(e,n,r){Q.bumpVerticalPos(Z.boxMargin),n.height=Z.boxMargin,n.starty=Q.getVerticalPos();let i=a();i.x=n.startx,i.y=n.starty,i.width=n.width||Z.width,i.class=`note`;let o=e.append(`g`);o.attr(`data-et`,`note`),o.attr(`data-id`,`i`+r);let s=X.drawRect(o,i),c=t();c.x=n.startx,c.y=n.starty,c.width=i.width,c.dy=`1em`,c.text=n.message,c.class=`noteText`,c.fontFamily=Z.noteFontFamily,c.fontSize=Z.noteFontSize,c.fontWeight=Z.noteFontWeight,c.anchor=Z.noteAlign,c.textMargin=Z.noteMargin,c.valign=`center`;let l=S(c.text)?await oe(o,c):G(o,c),u=Math.round(l.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));s.attr(`height`,u+2*Z.noteMargin),n.height+=u+2*Z.noteMargin,Q.bumpVerticalPos(u+2*Z.noteMargin),n.stopy=n.starty+u+2*Z.noteMargin,n.stopx=n.startx+i.width,Q.insert(n.startx,n.starty,n.stopx,n.stopy),Q.models.addNote(n)},`drawNote`),Ne=c(function(e,t,n,r,i,a,o){let s=r.db.getActors(),l=s.get(t.from),u=s.get(t.to),d=n.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=tt(t,r),g=e.append(`g`),_=c((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=c(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,o).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=r.db.LINETYPE;if(d)switch(t.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1);break}switch(t.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p);break}},`drawCentralConnection`),Pe=c(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Fe=c(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ie=c(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Le(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=w.splitBreaks(i).length,o=S(i),c=o?await s(i,x()):f.calculateTextDimensions(i,Pe(Z));if(!o){let e=c.height/a;t.height+=e,Q.bumpVerticalPos(e)}let l,u=c.height-10,d=c.width;if(n===r){l=Q.getVerticalPos()+u,Z.rightAngles||(u+=Z.boxMargin,l=Q.getVerticalPos()+u),u+=30;let e=w.getMax(d/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+u,r+e,Q.getVerticalPos()+30+u)}else u+=Z.boxMargin,l=Q.getVerticalPos()+u,Q.insert(n,l-10,r,l);return Q.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}c(Le,`boundMessage`);var Re=c(async function(e,n,r,i,a,o){let{startx:s,stopx:c,starty:l,message:u,type:d,sequenceIndex:p,sequenceVisible:m}=n,h=f.calculateTextDimensions(u,Pe(Z)),g=t();g.x=Math.min(s,c),g.y=l+10,g.width=Math.abs(c-s),g.class=`messageText`,g.dy=`1em`,g.text=u,g.fontFamily=Z.messageFontFamily,g.fontSize=Z.messageFontSize,g.fontWeight=Z.messageFontWeight,g.anchor=Z.messageAlign,g.valign=`center`,g.textMargin=Z.wrapPadding,g.tspan=!1,S(g.text)?await oe(e,g,{startx:s,stopx:c,starty:r}):G(e,g);let _=h.width,v;if(s===c){let t=m||Z.showSequenceNumbers,o=tt(a,i),l=nt(a,i),u=s+(t&&(o||l)?10:0);v=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${r} H ${s+w.getMax(Z.width/2,_/2)} V ${r+25} H ${s}`):e.append(`path`).attr(`d`,`M `+u+`,`+r+` C `+(u+60)+`,`+(r-10)+` `+(s+60)+`,`+(r+30)+` `+s+`,`+(r+20)),$e(a,i)&&Ne(e,a,n,i,s,c,r)}else v=e.append(`line`),v.attr(`x1`,s),v.attr(`y1`,r),v.attr(`x2`,c),v.attr(`y2`,r),$e(a,i)&&Ne(e,a,n,i,s,c,r);d===i.db.LINETYPE.DOTTED||d===i.db.LINETYPE.DOTTED_CROSS||d===i.db.LINETYPE.DOTTED_POINT||d===i.db.LINETYPE.DOTTED_OPEN||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===i.db.LINETYPE.SOLID_TOP_DOTTED||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===i.db.LINETYPE.STICK_TOP_DOTTED||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(v.style(`stroke-dasharray`,`3, 3`),v.attr(`class`,`messageLine1`)):v.attr(`class`,`messageLine0`),v.attr(`data-et`,`message`),v.attr(`data-id`,`i`+n.id),v.attr(`data-from`,n.from),v.attr(`data-to`,n.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=y(!0)),v.attr(`stroke-width`,2),v.attr(`stroke`,`none`),v.style(`fill`,`none`),(d===i.db.LINETYPE.SOLID_TOP||d===i.db.LINETYPE.SOLID_TOP_DOTTED)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(d===i.db.LINETYPE.SOLID_BOTTOM||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(d===i.db.LINETYPE.STICK_TOP||d===i.db.LINETYPE.STICK_TOP_DOTTED)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(d===i.db.LINETYPE.STICK_BOTTOM||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&v.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&v.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(d===i.db.LINETYPE.SOLID||d===i.db.LINETYPE.DOTTED)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(v.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),v.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(d===i.db.LINETYPE.SOLID_POINT||d===i.db.LINETYPE.DOTTED_POINT)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(d===i.db.LINETYPE.SOLID_CROSS||d===i.db.LINETYPE.DOTTED_CROSS)&&v.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),m||Z.showSequenceNumbers){let t=d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,l=d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=$e(a,i),f=s,m=c;t?(s<c?f=s+12:(f=s-6+(u?-5:0),f+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),v.attr(`x1`,f)):l?(c>s?m=c-12:(m=c-6,f+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,v.attr(`x2`,m),v.attr(`x1`,f)):v.attr(`x1`,s+6);let h=0,g=s===c,_=s<=c;h=g?n.fromBounds+1:l?_?n.toBounds-1:n.fromBounds+1:_?n.fromBounds+1:n.toBounds-1;let y=`12px`,x=p.toString().length;x>5?y=`7px`:x>3&&(y=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,r).attr(`x2`,h).attr(`y2`,r).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,r+4).attr(`font-family`,`sans-serif`).attr(`font-size`,y).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(p)}},`drawMessage`),ze=c(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=w.getMax(r.width||Z.width,Z.width),r.height=w.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=w.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),Be=c(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=w.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ve=c(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Je(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),He=c(function(e){u(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ue=c(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),We=c(function(e,t){let n=t.get(e),r=Ue(e);return[r.reduce(function(e,t){return w.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return w.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,t,n,r,i){Q.bumpVerticalPos(n);let a=r;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,i=Pe(Z);t.message=f.wrapLabel(`[${t.message}]`,n-2*Z.wrapPadding,i),t.width=n,t.wrap=!0;let o=f.calculateTextDimensions(t.message,i),s=w.getMax(o.height,Z.labelBoxHeight);a=r+s,l.debug(`${s} - ${t.message}`)}i(t),Q.bumpVerticalPos(a)}c($,`adjustLoopHeightForWrap`);function Ge(e,t,n,r,i,a,o){function s(n,r){n.x<i.get(e.from).x?(Q.insert(t.stopx-r,t.starty,t.startx,t.stopy+n.height/2+Z.noteMargin),t.stopx+=r):(Q.insert(t.startx,t.starty,t.stopx+r,t.stopy+n.height/2+Z.noteMargin),t.stopx-=r)}c(s,`receiverAdjustment`);function l(n,r){n.x<i.get(e.to).x?(Q.insert(t.startx-r,t.starty,t.stopx,t.stopy+n.height/2+Z.noteMargin),t.startx+=r):(Q.insert(t.stopx,t.starty,t.startx+r,t.stopy+n.height/2+Z.noteMargin),t.startx-=r)}c(l,`senderAdjustment`);let u=[R.ACTOR,R.CONTROL,R.ENTITY,R.DATABASE];if(a.get(e.to)==r){let t=i.get(e.to);s(t,u.includes(t.type)?z/2+3:t.width/2+3),t.starty=n-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(o.get(e.from)==r){let t=i.get(e.from);Z.mirrorActors&&l(t,u.includes(t.type)?z/2:t.width/2),t.stopy=n-t.height/2,Q.bumpVerticalPos(t.height/2)}else if(o.get(e.to)==r){let t=i.get(e.to);Z.mirrorActors&&s(t,u.includes(t.type)?z/2+3:t.width/2+3),t.stopy=n-t.height/2,Q.bumpVerticalPos(t.height/2)}}c(Ge,`adjustCreatedDestroyedData`);var Ke=c(async function(e,t,n,r){let{securityLevel:i,sequence:a,look:o,themeVariables:s}=x();Z=a;let u;i===`sandbox`&&(u=m(`#i`+t));let d=m(i===`sandbox`?u.nodes()[0].contentDocument.body:`body`),f=i===`sandbox`?u.nodes()[0].contentDocument:document;Q.init(),l.debug(r.db);let p=i===`sandbox`?d.select(`[id="${t}"]`):m(`[id="${t}"]`),h=r.db.getActors(),g=r.db.getCreatedActors(),_=r.db.getDestroyedActors(),v=r.db.getBoxes(),y=r.db.getActorKeys(),b=r.db.getMessages(),S=r.db.getDiagramTitle(),C=r.db.hasAtLeastOneBox(),w=r.db.hasAtLeastOneBoxWithTitle(),T=await qe(h,b,r);if(Z.height=await Ye(h,T,v),X.insertComputerIcon(p,t),X.insertDatabaseIcon(p,t),X.insertClockIcon(p,t),C&&(Q.bumpVerticalPos(Z.boxMargin),w&&Q.bumpVerticalPos(v[0].textMaxHeight)),Z.hideUnusedParticipants===!0){let e=new Set;b.forEach(t=>{e.add(t.from),e.add(t.to)}),y=y.filter(t=>e.has(t))}let D=new Map(y.map((e,t)=>[h.get(e)?.name??e,t]));ze(p,h,g,y,0,b,!1);let O=await it(b,h,T,r);X.insertArrowHead(p,t),X.insertArrowCrossHead(p,t),X.insertArrowFilledHead(p,t),X.insertSequenceNumber(p,t),X.insertSolidTopArrowHead(p,t),X.insertSolidBottomArrowHead(p,t),X.insertStickTopArrowHead(p,t),X.insertStickBottomArrowHead(p,t),o===`neo`&&X.insertDropShadow(p,Z);function k(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(p,n,t,Z,Ue(e.from).length,r,D),Q.insert(n.startx,t-10,n.stopx,t)}c(k,`activeEnd`);let A=1,j=1,M=[],N=[],P=0;for(let e of b){let t,n,i;switch(e.type){case r.db.LINETYPE.NOTE:Q.resetVerticalPos(),n=e.noteModel,await Me(p,n,e.id);break;case r.db.LINETYPE.ACTIVE_START:Q.newActivation(e,p,h);break;case r.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,p,h);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,p,h);break;case r.db.LINETYPE.ACTIVE_END:k(e,Q.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.LOOP_END:t=Q.endLoop(),await X.drawLoop(p,t,`loop`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:$(O,e,Z.boxMargin,Z.boxMargin,e=>{let t=e.message;t||=s?.rectBkgColor||s?.actorBkg||`rgba(128, 128, 128, 0.5)`,Q.newLoop(void 0,t)});break;case r.db.LINETYPE.RECT_END:t=Q.endLoop(),N.push(t),Q.models.addLoop(t),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos());break;case r.db.LINETYPE.OPT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.OPT_END:t=Q.endLoop(),await X.drawLoop(p,t,`opt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.ALT_ELSE:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.ALT_END:t=Q.endLoop(),await X.drawLoop(p,t,`alt`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.PAR_END:t=Q.endLoop(),await X.drawLoop(p,t,`par`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:A=e.message.start||A,j=e.message.step||j,e.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.CRITICAL_OPTION:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case r.db.LINETYPE.CRITICAL_END:t=Q.endLoop(),await X.drawLoop(p,t,`critical`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case r.db.LINETYPE.BREAK_END:t=Q.endLoop(),await X.drawLoop(p,t,`break`,Z,e),Q.bumpVerticalPos(t.stopy-Q.getVerticalPos()),Q.models.addLoop(t);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=A,i.sequenceVisible=r.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await Le(p,i);Ge(e,i,t,P,h,g,_),M.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){l.error(`error while drawing message`,e)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(A=Math.round((A+j)*100)/100),P++}l.debug(`createdActors`,g),l.debug(`destroyedActors`,_),await Be(p,h,y,!1,t,r,D);for(let e of M)await Re(p,e.messageModel,e.lineStartY,r,e.msg,t);Z.mirrorActors&&await Be(p,h,y,!0,t,r,D),N.forEach(e=>X.drawBackgroundRect(p,e)),ce(p,h,y,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(p,e,Z)}C&&Q.bumpVerticalPos(Z.boxMargin);let F=Ve(p,h,y,f),{bounds:I}=Q.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let ee=I.stopy-I.starty;ee<F.maxHeight&&(ee=F.maxHeight);let L=ee+2*Z.diagramMarginY;Z.mirrorActors&&(L=L-Z.boxMargin+Z.bottomMarginAdj);let R=I.stopx-I.startx;R<F.maxWidth&&(R=F.maxWidth);let te=R+2*Z.diagramMarginX;S&&p.append(`text`).text(S).attr(`x`,(I.stopx-I.startx)/2-2*Z.diagramMarginX).attr(`y`,-25),E(p,L,te,Z.useMaxWidth);let ne=S?40:0,z=h.size&&o===`neo`?30:0;p.attr(`viewBox`,I.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+ne)+` `+te+` `+(L+ne+z)),l.debug(`models:`,Q.models)},`draw`);async function qe(e,t,n){let r={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let t=e.get(i.to);if(i.placement===n.db.PLACEMENT.LEFTOF&&!t.prevActor||i.placement===n.db.PLACEMENT.RIGHTOF&&!t.nextActor)continue;let a=i.placement!==void 0,o=!a,c=a?Fe(Z):Pe(Z),l=i.wrap?f.wrapLabel(i.message,Z.width-2*Z.wrapPadding,c):i.message,u=(S(l)?await s(i.message,x()):f.calculateTextDimensions(l,c)).width+2*Z.wrapPadding;o&&i.from===t.nextActor?r[i.to]=w.getMax(r[i.to]||0,u):o&&i.from===t.prevActor?r[i.from]=w.getMax(r[i.from]||0,u):o&&i.from===i.to?(r[i.from]=w.getMax(r[i.from]||0,u/2),r[i.to]=w.getMax(r[i.to]||0,u/2)):i.placement===n.db.PLACEMENT.RIGHTOF?r[i.from]=w.getMax(r[i.from]||0,u):i.placement===n.db.PLACEMENT.LEFTOF?r[t.prevActor]=w.getMax(r[t.prevActor]||0,u):i.placement===n.db.PLACEMENT.OVER&&(t.prevActor&&(r[t.prevActor]=w.getMax(r[t.prevActor]||0,u/2)),t.nextActor&&(r[i.from]=w.getMax(r[i.from]||0,u/2)))}return l.debug(`maxMessageWidthPerActor:`,r),r}c(qe,`getMaxMessageWidthPerActor`);var Je=c(function(e){let t=0,n=Ie(Z);for(let r in e.links){let e=f.calculateTextDimensions(r,n).width+2*Z.wrapPadding+2*Z.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`);async function Ye(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=f.wrapLabel(n.description,Z.width-2*Z.wrapPadding,Ie(Z)));let i=S(n.description)?await s(n.description,x()):f.calculateTextDimensions(n.description,Ie(Z));n.width=n.wrap?Z.width:w.getMax(Z.width,i.width+2*Z.wrapPadding),n.height=n.wrap?w.getMax(i.height,Z.height):Z.height,r=w.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+Z.actorMargin-r.width/2;r.margin=w.getMax(e,Z.actorMargin);continue}let a=t[n]+Z.actorMargin-r.width/2-i.width/2;r.margin=w.getMax(a,Z.actorMargin)}let i=0;return n.forEach(t=>{let n=Pe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=Z.boxMargin*8;r+=a,r-=2*Z.boxTextMargin,t.wrap&&(t.name=f.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=f.calculateTextDimensions(t.name,n);i=w.getMax(o.height,i);let s=w.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,r<s){let e=(s-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=i),w.getMax(r,Z.height)}c(Ye,`calculateActorMargins`);var Xe=c(async function(e,t,n){let r=t.get(e.from),i=t.get(e.to),a=r.x,o=i.x,c=e.wrap&&e.message,u=S(e.message)?await s(e.message,x()):f.calculateTextDimensions(c?f.wrapLabel(e.message,Z.width,Fe(Z)):e.message,Fe(Z)),d={width:c?Z.width:w.getMax(Z.width,u.width+2*Z.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(d.width=c?w.getMax(Z.width,u.width):w.getMax(r.width/2+i.width/2,u.width+2*Z.noteMargin),d.startx=a+(r.width+Z.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(d.width=c?w.getMax(Z.width,u.width+2*Z.noteMargin):w.getMax(r.width/2+i.width/2,u.width+2*Z.noteMargin),d.startx=a-d.width+(r.width-Z.actorMargin)/2):e.to===e.from?(u=f.calculateTextDimensions(c?f.wrapLabel(e.message,w.getMax(Z.width,r.width),Fe(Z)):e.message,Fe(Z)),d.width=c?w.getMax(Z.width,r.width):w.getMax(r.width,Z.width,u.width+2*Z.noteMargin),d.startx=a+(r.width-d.width)/2):(d.width=Math.abs(a+r.width/2-(o+i.width/2))+Z.actorMargin,d.startx=a<o?a+r.width/2-Z.actorMargin/2:o+i.width/2-Z.actorMargin/2),c&&(d.message=f.wrapLabel(e.message,d.width-2*Z.wrapPadding,Fe(Z))),l.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${e.message}]`),d},`buildNoteModel`),Ze=4,Qe=6,$e=c(function(e,t){let{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[n,r,i].includes(e.centralConnection)},`hasCentralConnection`),et=c(function(e,t,n){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=t.db.LINETYPE,s=0;return(e.centralConnection===r||e.centralConnection===i)&&(s+=Ze),(e.centralConnection===r||e.centralConnection===i)&&(e.type===a||e.type===o)&&(s+=n?0:-Qe),s},`calculateCentralConnectionOffset`),tt=c(function(e,t){let{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:l}=t.db.LINETYPE;return[n,r,i,a,o,s,c,l].includes(e.type)},`isReverseArrowType`),nt=c(function(e,t){let{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[n,r].includes(e.type)},`isBidirectionalArrowType`),rt=c(function(e,t,n){let{look:r}=x();if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,a]=We(e.from,t),[o,s]=We(e.to,t),l=i<=o,u=l?a:i,d=l?o:s;r===`neo`&&(e.type!==n.db.LINETYPE.SOLID_OPEN&&(d+=l?-3:3),(e.type===n.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(u+=l?3:-3)),u+=et(e,n,l);let p=Math.abs(o-s)>2,m=c(e=>l?-e:e,`adjustValue`);e.from===e.to?d=u:(e.activate&&!p&&(d+=m(Z.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=m(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=m(3)));let h=[i,a,o,s],g=Math.abs(u-d);e.wrap&&e.message&&(e.message=f.wrapLabel(e.message,w.getMax(g+2*Z.wrapPadding,Z.width),Pe(Z)));let _=f.calculateTextDimensions(e.message,Pe(Z));return{width:w.getMax(e.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},`buildMessageModel`),it=c(async function(e,t,n,r){let i={},a=[],o,s,c;for(let n of e){switch(n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(o=a.pop(),i[o.id]=o,i[n.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=Ue(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:n.from,enabled:!0};Q.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(n.from);Q.activations.splice(e,1).splice(0,1)}break}n.placement===void 0?(c=rt(n,t,r),n.msgModel=c,c.startx&&c.stopx&&a.length>0&&a.forEach(e=>{if(o=e,c.startx===c.stopx){let e=t.get(n.from),r=t.get(n.to);o.from=w.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=w.getMax(r.x+c.width/2,r.x+e.width/2,o.to),o.width=w.getMax(o.width,Math.abs(o.to-o.from))-Z.labelBoxWidth}else o.from=w.getMin(c.startx,o.from),o.to=w.getMax(c.stopx,o.to),o.width=w.getMax(o.width,c.width)-Z.labelBoxWidth})):(s=await Xe(n,t,r),n.noteModel=s,a.forEach(e=>{o=e,o.from=w.getMin(o.from,s.startx),o.to=w.getMax(o.to,s.startx+s.width),o.width=w.getMax(o.width,Math.abs(o.from-o.to))-Z.labelBoxWidth}))}return Q.activations=[],l.debug(`Loop type widths:`,i),i},`calculateLoopBounds`),at={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Be,drawActorsPopup:Ve,setConf:He,draw:Ke},styles:ne,init:c(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,j({sequence:{wrap:e.wrap}}))},`init`)};export{at as diagram};
@@ -0,0 +1 @@
1
+ import{Ir as e}from"./MermaidBlock-Dz4IP-Tx.js";var t=1;function n(){if(!(typeof globalThis>`u`))return globalThis}e(n,`getCaptureGlobal`);function r(){return!!n()?.mermaidCaptureSizes}e(r,`shouldCaptureSizes`);function i(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}e(i,`capturedFromLocation`);function a(e,t){let r=n();if(!r)return;let i=t.node(),a=((i&&`ownerSVGElement`in i?i.ownerSVGElement:null)??i)?.id??`(unknown)`;r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}e(a,`emitCapturedSizes`);function o(e,n){let r=[];for(let e of n.nodes)e.isGroup||r.push({id:e.id,width:e.width??0,height:e.height??0});r.length!==0&&a({metadata:{captureVersion:t,capturedAt:new Date().toISOString(),capturedFrom:i()},nodes:r},e)}e(o,`captureNodeSizes`);export{o as captureNodeSizes};