@automattic/agenttic-ui 0.1.11 → 0.1.13

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 (346) hide show
  1. package/dist/components/chat/ChatInput.d.ts.map +1 -1
  2. package/dist/components/composable/AgentUISuggestions.d.ts +2 -1
  3. package/dist/components/composable/AgentUISuggestions.d.ts.map +1 -1
  4. package/dist/index.css +1 -1
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2050 -41
  8. package/package.json +2 -5
  9. package/dist/_basePickBy-Co6w2C-t.js +0 -151
  10. package/dist/_baseUniq-BbhifY2s.js +0 -614
  11. package/dist/abap-Y8Dl9g_6.js +0 -6
  12. package/dist/actionscript-3-DZzbMeqX.js +0 -6
  13. package/dist/ada-vP6ak0IW.js +0 -6
  14. package/dist/andromeeda-uXNdzNpk.js +0 -4
  15. package/dist/angular-html-BmadGEgW.js +0 -32
  16. package/dist/angular-ts-D-QQnnGT.js +0 -21
  17. package/dist/apache-BUjz-sD2.js +0 -6
  18. package/dist/apex-D_wPycVx.js +0 -6
  19. package/dist/apl-sitt7C8I.js +0 -16
  20. package/dist/applescript-BPx7YFFu.js +0 -6
  21. package/dist/ara-Z2fSOxSw.js +0 -6
  22. package/dist/arc-DMQNivgh.js +0 -83
  23. package/dist/architecture-O4VJ6CD3-CrsUkgBe.js +0 -5
  24. package/dist/architectureDiagram-KFL7JDKH-BCeU_Tkj.js +0 -4665
  25. package/dist/asciidoc-B-pCoB3G.js +0 -6
  26. package/dist/asm-BTWLY5ym.js +0 -6
  27. package/dist/astro-DHnp0xIo.js +0 -18
  28. package/dist/aurora-x-BwoVEUWZ.js +0 -4
  29. package/dist/awk-Fb0P9dkn.js +0 -6
  30. package/dist/ayu-dark-CxPZkpb2.js +0 -4
  31. package/dist/ballerina-oZK-YekG.js +0 -6
  32. package/dist/bat-0FvbqU9S.js +0 -6
  33. package/dist/beancount-DEfTbbFX.js +0 -6
  34. package/dist/berry-PwsHPR_K.js +0 -6
  35. package/dist/bibtex-EULQRLY5.js +0 -6
  36. package/dist/bicep-DFU2oTl7.js +0 -6
  37. package/dist/blade-OPzGcV14.js +0 -20
  38. package/dist/blockDiagram-ZYB65J3Q-eNfG2owp.js +0 -2265
  39. package/dist/bsl-NkNNwerW.js +0 -8
  40. package/dist/c-eeMepfLm.js +0 -6
  41. package/dist/c4Diagram-AAMF2YG6-CEVcZg_d.js +0 -1581
  42. package/dist/cadence-DMRWHJp4.js +0 -6
  43. package/dist/cairo-DM6WF2e3.js +0 -8
  44. package/dist/catppuccin-frappe-DlGpEc12.js +0 -4
  45. package/dist/catppuccin-latte-DDI4I_Rd.js +0 -4
  46. package/dist/catppuccin-macchiato-BBzuZG5U.js +0 -4
  47. package/dist/catppuccin-mocha-CwrFPXRy.js +0 -4
  48. package/dist/channel-DwkBtswx.js +0 -5
  49. package/dist/chunk-ANTBXLJU-DjsG4Faa.js +0 -9
  50. package/dist/chunk-FHKO5MBM-DvgpKHah.js +0 -15
  51. package/dist/chunk-GLLZNHP4-BS9MWsNn.js +0 -19
  52. package/dist/chunk-JBRWN2VN-BB1oFn95.js +0 -1376
  53. package/dist/chunk-LXBSTHXV-DoWWvL-R.js +0 -1382
  54. package/dist/chunk-NRVI72HA-CN8BG5Yn.js +0 -20
  55. package/dist/chunk-OMD6QJNC-D7UKmZm8.js +0 -64
  56. package/dist/chunk-WVR4S24B-D3bw0yi4.js +0 -8
  57. package/dist/clarity-BseSxcHx.js +0 -6
  58. package/dist/classDiagram-3BZAVTQC-DhpbenB7.js +0 -16
  59. package/dist/classDiagram-v2-QTMF73CY-DhpbenB7.js +0 -16
  60. package/dist/clojure-CXJfHrL3.js +0 -6
  61. package/dist/clone-DmrWxu_i.js +0 -8
  62. package/dist/cmake-BJz8BOTU.js +0 -6
  63. package/dist/cobol-4A8XjHhj.js +0 -10
  64. package/dist/codeowners-Bt9yU6NX.js +0 -6
  65. package/dist/codeql-DHkodjjI.js +0 -6
  66. package/dist/coffee-Dl27lzbd.js +0 -8
  67. package/dist/common-lisp-EVqT9Zhp.js +0 -6
  68. package/dist/coq-B0L9upzn.js +0 -6
  69. package/dist/cpp-Cj177cuW.js +0 -18
  70. package/dist/crystal-ymVvJzbZ.js +0 -18
  71. package/dist/csharp-DmxfTLWR.js +0 -6
  72. package/dist/css-CECN5uSL.js +0 -6
  73. package/dist/csv-CmYOceLb.js +0 -6
  74. package/dist/cue-ZzumE7IT.js +0 -6
  75. package/dist/cypher-jpdmjtA6.js +0 -6
  76. package/dist/cytoscape.esm-ZmItrg9y.js +0 -18731
  77. package/dist/d-CBagWSwH.js +0 -6
  78. package/dist/dagre-2BBEFEWP-DWbEdWsD.js +0 -447
  79. package/dist/dark-plus-pUHDTVV0.js +0 -4
  80. package/dist/dart-6ObCrKr9.js +0 -6
  81. package/dist/dax-CcDT-8dH.js +0 -6
  82. package/dist/defaultLocale-D7EN2tov.js +0 -171
  83. package/dist/desktop-B93p9R9O.js +0 -6
  84. package/dist/diagram-4IRLE6MV-Q8q6qm5n.js +0 -534
  85. package/dist/diagram-GUPCWM2R-B8VhFieT.js +0 -143
  86. package/dist/diagram-RP2FKANI-CYWUKKLB.js +0 -221
  87. package/dist/diff-BxzP2J8R.js +0 -6
  88. package/dist/docker-CsHqm9tx.js +0 -6
  89. package/dist/dotenv-BMjVjUL1.js +0 -6
  90. package/dist/dracula-BtZx2Kac.js +0 -4
  91. package/dist/dracula-soft-BKa-aqBv.js +0 -4
  92. package/dist/dream-maker-PAx17jaB.js +0 -6
  93. package/dist/edge-_LvgTcmu.js +0 -12
  94. package/dist/elixir-BTCUAmQk.js +0 -8
  95. package/dist/elm-BtNbw_Cd.js +0 -8
  96. package/dist/emacs-lisp-Cfxdx5D-.js +0 -6
  97. package/dist/erDiagram-HZWUO2LU-CC0RhTpv.js +0 -842
  98. package/dist/erb-D0PIpZCP.js +0 -10
  99. package/dist/erlang-xM7DPKQj.js +0 -8
  100. package/dist/everforest-dark-DMCBqXCK.js +0 -4
  101. package/dist/everforest-light-BbXl82Em.js +0 -4
  102. package/dist/fennel-N4WcXuKx.js +0 -6
  103. package/dist/fish-B6QqlqeT.js +0 -6
  104. package/dist/flowDiagram-THRYKUMA-B00E_hY6.js +0 -1627
  105. package/dist/fluent-BMXUxfv1.js +0 -6
  106. package/dist/fortran-fixed-form-DUsA-VGo.js +0 -8
  107. package/dist/fortran-free-form-DPIT_jbP.js +0 -6
  108. package/dist/fsharp-BTdsmEUN.js +0 -8
  109. package/dist/ganttDiagram-WV7ZQ7D5-Cv2vsghm.js +0 -2499
  110. package/dist/gdresource-DLfsylRW.js +0 -10
  111. package/dist/gdscript-9lm8qppb.js +0 -6
  112. package/dist/gdshader-Bk8fF6yr.js +0 -6
  113. package/dist/genie-DzUvd7U9.js +0 -6
  114. package/dist/gherkin-DHRaV0YP.js +0 -6
  115. package/dist/git-commit-Bd32YZ0K.js +0 -8
  116. package/dist/git-rebase-ZWUFO_T4.js +0 -8
  117. package/dist/gitGraph-ZV4HHKMB-Bj31zYat.js +0 -5
  118. package/dist/gitGraphDiagram-OJR772UL-BGrYC5q0.js +0 -712
  119. package/dist/github-dark-DenFmJkN.js +0 -4
  120. package/dist/github-dark-default-BJPUVz4H.js +0 -4
  121. package/dist/github-dark-dimmed-DUshB20C.js +0 -4
  122. package/dist/github-dark-high-contrast-D3aGCnF8.js +0 -4
  123. package/dist/github-light-JYsPkUQd.js +0 -4
  124. package/dist/github-light-default-D99KPAby.js +0 -4
  125. package/dist/github-light-high-contrast-BbmZE-Mp.js +0 -4
  126. package/dist/gleam-Bv284lvN.js +0 -6
  127. package/dist/glimmer-js-CkxRszZZ.js +0 -14
  128. package/dist/glimmer-ts-Bi6BYQCn.js +0 -14
  129. package/dist/glsl-CkUcVZNK.js +0 -8
  130. package/dist/gnuplot-yPG9-sE_.js +0 -6
  131. package/dist/go-ChxJuLYK.js +0 -6
  132. package/dist/graph-DaSuptw6.js +0 -247
  133. package/dist/graphql-BLaPX4fU.js +0 -14
  134. package/dist/groovy-CJQTphOW.js +0 -6
  135. package/dist/gruvbox-dark-hard-C2ND4cMr.js +0 -4
  136. package/dist/gruvbox-dark-medium-C8k4c8au.js +0 -4
  137. package/dist/gruvbox-dark-soft-xx9Q6FaG.js +0 -4
  138. package/dist/gruvbox-light-hard-BpUXv5in.js +0 -4
  139. package/dist/gruvbox-light-medium-D3XFCoU1.js +0 -4
  140. package/dist/gruvbox-light-soft-u7hpfz6Z.js +0 -4
  141. package/dist/hack-Bx1jMtBC.js +0 -10
  142. package/dist/haml-6FagfhCM.js +0 -10
  143. package/dist/handlebars-Bd5Y4M6I.js +0 -14
  144. package/dist/haskell-WeIwNIP6.js +0 -6
  145. package/dist/haxe-TztHsm5T.js +0 -6
  146. package/dist/hcl-D438OF-I.js +0 -6
  147. package/dist/hjson-DYBUbqOl.js +0 -6
  148. package/dist/hlsl-Bk8TCZNL.js +0 -6
  149. package/dist/houston-BDYrDoDW.js +0 -4
  150. package/dist/html-7XVNRwN7.js +0 -10
  151. package/dist/html-derivative-BNxZ5Yf6.js +0 -8
  152. package/dist/http-WC357zBG.js +0 -14
  153. package/dist/hxml-GbqSQCLa.js +0 -8
  154. package/dist/hy-Brt5EZ7-.js +0 -6
  155. package/dist/imba-CimUv-Uh.js +0 -6
  156. package/dist/index-DR9mkSeU.js +0 -29474
  157. package/dist/info-63CPKGFF-DnZM8nKQ.js +0 -5
  158. package/dist/infoDiagram-DDUCL6P7-ClQolrbt.js +0 -24
  159. package/dist/ini-BZIuRIvJ.js +0 -6
  160. package/dist/init-DjUOC4st.js +0 -16
  161. package/dist/java-DY6VlHhP.js +0 -6
  162. package/dist/javascript-Dp1Jmi5H.js +0 -6
  163. package/dist/jinja-WEhOU5ES.js +0 -11
  164. package/dist/jison-c2JI40PB.js +0 -8
  165. package/dist/journeyDiagram-FFXJYRFH-P_IVMTj2.js +0 -836
  166. package/dist/json-DxJze_jm.js +0 -6
  167. package/dist/json5-BT4Fjg39.js +0 -6
  168. package/dist/jsonc-CHjZD8gR.js +0 -6
  169. package/dist/jsonl-BGuvDmy9.js +0 -6
  170. package/dist/jsonnet-Bx2cfsXg.js +0 -6
  171. package/dist/jssm-BcADi6EI.js +0 -6
  172. package/dist/jsx-BtKADgXT.js +0 -6
  173. package/dist/julia-DcoDQokW.js +0 -16
  174. package/dist/kanagawa-dragon-CiKur4Hl.js +0 -4
  175. package/dist/kanagawa-lotus-BKu-smKu.js +0 -4
  176. package/dist/kanagawa-wave-CQwozSzG.js +0 -4
  177. package/dist/kanban-definition-KOZQBZVT-Uk8JKe_b.js +0 -720
  178. package/dist/kotlin-ByBMgTeR.js +0 -6
  179. package/dist/kusto-VWFLl2T0.js +0 -6
  180. package/dist/laserwave-6a00oqik.js +0 -4
  181. package/dist/latex-MZCpjnva.js +0 -8
  182. package/dist/layout-BHKAMNdk.js +0 -1324
  183. package/dist/lean-DXqEE_d1.js +0 -6
  184. package/dist/less-B1GLI2Di.js +0 -6
  185. package/dist/light-plus-CZuVqSLX.js +0 -4
  186. package/dist/linear-UAzexi4b.js +0 -255
  187. package/dist/liquid-3HHuHOZ2.js +0 -14
  188. package/dist/llvm-6RQLId6G.js +0 -6
  189. package/dist/log-Al8wyEFV.js +0 -6
  190. package/dist/logo-DBa4JDzV.js +0 -6
  191. package/dist/lua-kX5WP_P5.js +0 -8
  192. package/dist/luau-BeoZWRh5.js +0 -6
  193. package/dist/make-CsMclxtr.js +0 -6
  194. package/dist/markdown-CiI2E98D.js +0 -6
  195. package/dist/marko-L-KhXzqZ.js +0 -14
  196. package/dist/material-theme-D6KBX41T.js +0 -4
  197. package/dist/material-theme-darker-CkRroheE.js +0 -4
  198. package/dist/material-theme-lighter-BUBw43Yz.js +0 -4
  199. package/dist/material-theme-ocean-ClGX14Ja.js +0 -4
  200. package/dist/material-theme-palenight-C1RVm8K1.js +0 -4
  201. package/dist/matlab-BOAaUVP0.js +0 -6
  202. package/dist/mdc-DPBWa7dN.js +0 -12
  203. package/dist/mdx-BOhZZUJ8.js +0 -6
  204. package/dist/mermaid-B0ixDHKN.js +0 -6
  205. package/dist/mermaid-parser.core-FuzJzmL7.js +0 -12921
  206. package/dist/mermaid.core-D7qBd055.js +0 -14002
  207. package/dist/min-dark-C7ak0t6c.js +0 -4
  208. package/dist/min-light-CKFxVcPp.js +0 -4
  209. package/dist/mindmap-definition-LNHGMQRG-D1C2-kkn.js +0 -3229
  210. package/dist/mipsasm-CTx18fBl.js +0 -6
  211. package/dist/mojo-BD611d7o.js +0 -6
  212. package/dist/monokai-C1KBYcO0.js +0 -4
  213. package/dist/move-653S600C.js +0 -6
  214. package/dist/narrat-DmhDCBs-.js +0 -6
  215. package/dist/nextflow-D1Zd9cNl.js +0 -6
  216. package/dist/nginx-5vhPAEw3.js +0 -8
  217. package/dist/night-owl-Bm2rzalh.js +0 -4
  218. package/dist/nim-Fi8wNe6i.js +0 -20
  219. package/dist/nix-ceY58Dty.js +0 -6
  220. package/dist/nord-CC5OiUXg.js +0 -4
  221. package/dist/nushell-Be2rueDv.js +0 -6
  222. package/dist/objective-c-Itk8tzmv.js +0 -6
  223. package/dist/objective-cpp-DGt5UKRO.js +0 -6
  224. package/dist/ocaml-eSVK32Eg.js +0 -6
  225. package/dist/one-dark-pro-DTA3VF0_.js +0 -4
  226. package/dist/one-light-D9sNaUtq.js +0 -4
  227. package/dist/ordinal-DfAQgscy.js +0 -61
  228. package/dist/packet-HUATNLJX-B5EJOyma.js +0 -5
  229. package/dist/pascal-xy8pJNns.js +0 -6
  230. package/dist/perl-BoEn6HmT.js +0 -16
  231. package/dist/php-BRU9zhoN.js +0 -18
  232. package/dist/pie-WTHONI2E-Bl1BKqE7.js +0 -5
  233. package/dist/pieDiagram-DBDJKBY4-BkVTsR1n.js +0 -161
  234. package/dist/plastic-CSTz3KZp.js +0 -4
  235. package/dist/plsql-pVbGZfOv.js +0 -6
  236. package/dist/po-BNfHvqmm.js +0 -6
  237. package/dist/poimandres-C-VADXHD.js +0 -4
  238. package/dist/polar-CAZahv3u.js +0 -6
  239. package/dist/postcss-05aHdL-n.js +0 -6
  240. package/dist/powerquery-DI9HkTvs.js +0 -6
  241. package/dist/powershell-Clc4ydu-.js +0 -6
  242. package/dist/prisma-FZjmVtSl.js +0 -6
  243. package/dist/prolog-C5-yg4TO.js +0 -6
  244. package/dist/proto-MmCPeFAD.js +0 -6
  245. package/dist/pug-CJWI-qSo.js +0 -12
  246. package/dist/puppet-CUJHmnxV.js +0 -6
  247. package/dist/purescript-rUfGld-4.js +0 -6
  248. package/dist/python-BFNSHbwJ.js +0 -6
  249. package/dist/qml-D3ATcgGh.js +0 -8
  250. package/dist/qmldir-BInDYbpo.js +0 -6
  251. package/dist/qss-AeJTysr_.js +0 -6
  252. package/dist/quadrantDiagram-YPSRARAO-D1el8UE7.js +0 -1024
  253. package/dist/r-Bm0uF0U2.js +0 -6
  254. package/dist/racket-B83wSAja.js +0 -6
  255. package/dist/radar-NJJJXTRR-Ba8Estdw.js +0 -5
  256. package/dist/raku-nEQ4ZJJ7.js +0 -6
  257. package/dist/razor-BPFYEoc9.js +0 -10
  258. package/dist/red-7y8PH7HH.js +0 -4
  259. package/dist/reg-m_s_Kiip.js +0 -6
  260. package/dist/regexp-BazyLpPg.js +0 -6
  261. package/dist/rel-BcRfyd6Q.js +0 -6
  262. package/dist/requirementDiagram-EGVEC5DT-DL1bEAjs.js +0 -852
  263. package/dist/riscv-Ce8MAQLP.js +0 -6
  264. package/dist/rose-pine-Cr4kwgAY.js +0 -4
  265. package/dist/rose-pine-dawn-ClRRUdXX.js +0 -4
  266. package/dist/rose-pine-moon-ucNn3Gm8.js +0 -4
  267. package/dist/rst-B6mPMsKo.js +0 -22
  268. package/dist/ruby-DInklMmU.js +0 -30
  269. package/dist/rust-CLzF9zIN.js +0 -6
  270. package/dist/sankeyDiagram-HRAUVNP4-Dyr3TqRu.js +0 -810
  271. package/dist/sas-fpEvgATw.js +0 -8
  272. package/dist/sass-DxHp5rTx.js +0 -6
  273. package/dist/scala-D4grkFkl.js +0 -6
  274. package/dist/scheme-BCRWuEm4.js +0 -6
  275. package/dist/scss-B1FaCqwR.js +0 -8
  276. package/dist/sdbl-B7T8abf4.js +0 -6
  277. package/dist/sequenceDiagram-4MX5Z3NR-CaMVkEvG.js +0 -2283
  278. package/dist/shaderlab-Cr62-Wb4.js +0 -8
  279. package/dist/shellscript-InADTalH.js +0 -6
  280. package/dist/shellsession-DiDJNQdy.js +0 -8
  281. package/dist/slack-dark-i7wN4OET.js +0 -4
  282. package/dist/slack-ochin-ndHf0LoP.js +0 -4
  283. package/dist/smalltalk-BlI1_OkM.js +0 -6
  284. package/dist/snazzy-light-BlSJXAu4.js +0 -4
  285. package/dist/solarized-dark-UTmkh7lw.js +0 -4
  286. package/dist/solarized-light-BheCkDPT.js +0 -4
  287. package/dist/solidity-CneOhxmR.js +0 -6
  288. package/dist/soy-LybuU3Y_.js +0 -8
  289. package/dist/sparql-B0KWFEri.js +0 -8
  290. package/dist/splunk-CRXR8A9s.js +0 -6
  291. package/dist/sql-Cn_v3PB0.js +0 -6
  292. package/dist/ssh-config-DP-hNVbF.js +0 -6
  293. package/dist/stata-B8c5fTjX.js +0 -8
  294. package/dist/stateDiagram-UUKSUZ4H-D-xTiq6H.js +0 -263
  295. package/dist/stateDiagram-v2-EYPG3UTE-BK5bFTpp.js +0 -16
  296. package/dist/stylus-CyKEU1Ej.js +0 -6
  297. package/dist/svelte-BjDUPxZ1.js +0 -14
  298. package/dist/swift-_uF_96_m.js +0 -6
  299. package/dist/synthwave-84-NU3C_KFZ.js +0 -4
  300. package/dist/system-verilog-BCm7smPJ.js +0 -6
  301. package/dist/systemd-C-4qm6XH.js +0 -6
  302. package/dist/talonscript-CFF3LF_O.js +0 -6
  303. package/dist/tasl-Cg_WBUAe.js +0 -6
  304. package/dist/tcl-DN7buRTF.js +0 -6
  305. package/dist/templ-Brj2RH7A.js +0 -12
  306. package/dist/terraform-DGvcn9zM.js +0 -6
  307. package/dist/tex-CmrLTxbG.js +0 -8
  308. package/dist/timeline-definition-3HZDQTIS-DbCuAY-N.js +0 -801
  309. package/dist/tokyo-night-DP4TmcQl.js +0 -4
  310. package/dist/toml-DY62mUL_.js +0 -6
  311. package/dist/treemap-75Q7IDZK-RcudvwLc.js +0 -5
  312. package/dist/ts-tags-CZMzuZh-.js +0 -41
  313. package/dist/tsv-BtvSkaG0.js +0 -6
  314. package/dist/tsx-B8rCNbgL.js +0 -6
  315. package/dist/turtle-_H59FV7D.js +0 -6
  316. package/dist/twig-GjIxYqCX.js +0 -18
  317. package/dist/typescript-mg6ATTE8.js +0 -6
  318. package/dist/typespec-Djmco60m.js +0 -6
  319. package/dist/typst-D_1QKWns.js +0 -6
  320. package/dist/v-BW14IZv7.js +0 -6
  321. package/dist/vala-uxaPR7d1.js +0 -6
  322. package/dist/vb-D8_c5-KN.js +0 -6
  323. package/dist/verilog-B-bybjPF.js +0 -6
  324. package/dist/vesper-BckBta1U.js +0 -4
  325. package/dist/vhdl-CUlNa8ac.js +0 -6
  326. package/dist/viml-DsfA-sWm.js +0 -6
  327. package/dist/vitesse-black-BoGvW84i.js +0 -4
  328. package/dist/vitesse-dark-Cym-eLtO.js +0 -4
  329. package/dist/vitesse-light-CcmG315c.js +0 -4
  330. package/dist/vue-D-ba2-Rx.js +0 -31
  331. package/dist/vue-html-Dn2ZoOSz.js +0 -10
  332. package/dist/vue-vine-Jmfkm6lF.js +0 -20
  333. package/dist/vyper-CPQuu50u.js +0 -6
  334. package/dist/wasm-BBXxrAl7.js +0 -6
  335. package/dist/wasm-DQxwEHae.js +0 -7
  336. package/dist/wenyan-pbVjoM9_.js +0 -6
  337. package/dist/wgsl-DY4iK1q1.js +0 -6
  338. package/dist/wikitext-Z-MoUasO.js +0 -6
  339. package/dist/wit-CQMQOlTg.js +0 -6
  340. package/dist/wolfram-Dz4KXISs.js +0 -6
  341. package/dist/xml-C2J0sS9M.js +0 -8
  342. package/dist/xsl-BmSZphgC.js +0 -8
  343. package/dist/xychartDiagram-FDP5SA34-NGeBTA9Y.js +0 -1340
  344. package/dist/yaml-DaO7k5B1.js +0 -6
  345. package/dist/zenscript-CxBjpf9c.js +0 -6
  346. package/dist/zig-Vm0PO9wB.js +0 -6
@@ -1,2283 +0,0 @@
1
- import { a as xe, b as Yt, g as At, d as Te, c as Ee, e as ye } from "./chunk-OMD6QJNC-D7UKmZm8.js";
2
- import { I as be } from "./chunk-FHKO5MBM-DvgpKHah.js";
3
- import { _ as u, o as me, c as $, d as Lt, l as G, j as Qt, e as we, f as ve, k as I, b as Gt, s as Ie, q as Le, a as _e, g as Pe, t as Ae, z as ke, i as _t, u as Y, a2 as ot, a3 as bt, a4 as Zt, a5 as Ne, a6 as Se, a7 as jt, G as Ct } from "./mermaid.core-D7qBd055.js";
4
- var Ot = function() {
5
- var e = /* @__PURE__ */ u(function(ht, w, L, P) {
6
- for (L = L || {}, P = ht.length; P--; L[ht[P]] = w) ;
7
- return L;
8
- }, "o"), t = [1, 2], o = [1, 3], s = [1, 4], a = [2, 4], i = [1, 9], n = [1, 11], h = [1, 13], d = [1, 14], r = [1, 16], f = [1, 17], y = [1, 18], g = [1, 24], T = [1, 25], m = [1, 26], v = [1, 27], A = [1, 28], C = [1, 29], S = [1, 30], B = [1, 31], D = [1, 32], F = [1, 33], q = [1, 34], X = [1, 35], tt = [1, 36], z = [1, 37], H = [1, 38], W = [1, 39], M = [1, 41], J = [1, 42], U = [1, 43], Q = [1, 44], et = [1, 45], N = [1, 46], E = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], _ = [4, 5, 16, 50, 52, 53], Z = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], at = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], k = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], qt = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], it = [68, 69, 70], ct = [1, 122], Nt = {
9
- trace: /* @__PURE__ */ u(function() {
10
- }, "trace"),
11
- yy: {},
12
- symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, BIDIRECTIONAL_SOLID_ARROW: 74, DOTTED_ARROW: 75, BIDIRECTIONAL_DOTTED_ARROW: 76, SOLID_CROSS: 77, DOTTED_CROSS: 78, SOLID_POINT: 79, DOTTED_POINT: 80, TXT: 81, $accept: 0, $end: 1 },
13
- terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 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", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "BIDIRECTIONAL_SOLID_ARROW", 75: "DOTTED_ARROW", 76: "BIDIRECTIONAL_DOTTED_ARROW", 77: "SOLID_CROSS", 78: "DOTTED_CROSS", 79: "SOLID_POINT", 80: "DOTTED_POINT", 81: "TXT" },
14
- productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 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], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
15
- performAction: /* @__PURE__ */ u(function(w, L, P, b, R, l, yt) {
16
- var p = l.length - 1;
17
- switch (R) {
18
- case 3:
19
- return b.apply(l[p]), l[p];
20
- case 4:
21
- case 9:
22
- this.$ = [];
23
- break;
24
- case 5:
25
- case 10:
26
- l[p - 1].push(l[p]), this.$ = l[p - 1];
27
- break;
28
- case 6:
29
- case 7:
30
- case 11:
31
- case 12:
32
- this.$ = l[p];
33
- break;
34
- case 8:
35
- case 13:
36
- this.$ = [];
37
- break;
38
- case 15:
39
- l[p].type = "createParticipant", this.$ = l[p];
40
- break;
41
- case 16:
42
- l[p - 1].unshift({ type: "boxStart", boxData: b.parseBoxData(l[p - 2]) }), l[p - 1].push({ type: "boxEnd", boxText: l[p - 2] }), this.$ = l[p - 1];
43
- break;
44
- case 18:
45
- this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 2]), sequenceIndexStep: Number(l[p - 1]), sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
46
- break;
47
- case 19:
48
- this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[p - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
49
- break;
50
- case 20:
51
- this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: b.LINETYPE.AUTONUMBER };
52
- break;
53
- case 21:
54
- this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: b.LINETYPE.AUTONUMBER };
55
- break;
56
- case 22:
57
- this.$ = { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: l[p - 1].actor };
58
- break;
59
- case 23:
60
- this.$ = { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: l[p - 1].actor };
61
- break;
62
- case 29:
63
- b.setDiagramTitle(l[p].substring(6)), this.$ = l[p].substring(6);
64
- break;
65
- case 30:
66
- b.setDiagramTitle(l[p].substring(7)), this.$ = l[p].substring(7);
67
- break;
68
- case 31:
69
- this.$ = l[p].trim(), b.setAccTitle(this.$);
70
- break;
71
- case 32:
72
- case 33:
73
- this.$ = l[p].trim(), b.setAccDescription(this.$);
74
- break;
75
- case 34:
76
- l[p - 1].unshift({ type: "loopStart", loopText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.LOOP_START }), l[p - 1].push({ type: "loopEnd", loopText: l[p - 2], signalType: b.LINETYPE.LOOP_END }), this.$ = l[p - 1];
77
- break;
78
- case 35:
79
- l[p - 1].unshift({ type: "rectStart", color: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.RECT_START }), l[p - 1].push({ type: "rectEnd", color: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.RECT_END }), this.$ = l[p - 1];
80
- break;
81
- case 36:
82
- l[p - 1].unshift({ type: "optStart", optText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.OPT_START }), l[p - 1].push({ type: "optEnd", optText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.OPT_END }), this.$ = l[p - 1];
83
- break;
84
- case 37:
85
- l[p - 1].unshift({ type: "altStart", altText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.ALT_START }), l[p - 1].push({ type: "altEnd", signalType: b.LINETYPE.ALT_END }), this.$ = l[p - 1];
86
- break;
87
- case 38:
88
- l[p - 1].unshift({ type: "parStart", parText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.PAR_START }), l[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = l[p - 1];
89
- break;
90
- case 39:
91
- l[p - 1].unshift({ type: "parStart", parText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.PAR_OVER_START }), l[p - 1].push({ type: "parEnd", signalType: b.LINETYPE.PAR_END }), this.$ = l[p - 1];
92
- break;
93
- case 40:
94
- l[p - 1].unshift({ type: "criticalStart", criticalText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.CRITICAL_START }), l[p - 1].push({ type: "criticalEnd", signalType: b.LINETYPE.CRITICAL_END }), this.$ = l[p - 1];
95
- break;
96
- case 41:
97
- l[p - 1].unshift({ type: "breakStart", breakText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.BREAK_START }), l[p - 1].push({ type: "breakEnd", optText: b.parseMessage(l[p - 2]), signalType: b.LINETYPE.BREAK_END }), this.$ = l[p - 1];
98
- break;
99
- case 43:
100
- this.$ = l[p - 3].concat([{ type: "option", optionText: b.parseMessage(l[p - 1]), signalType: b.LINETYPE.CRITICAL_OPTION }, l[p]]);
101
- break;
102
- case 45:
103
- this.$ = l[p - 3].concat([{ type: "and", parText: b.parseMessage(l[p - 1]), signalType: b.LINETYPE.PAR_AND }, l[p]]);
104
- break;
105
- case 47:
106
- this.$ = l[p - 3].concat([{ type: "else", altText: b.parseMessage(l[p - 1]), signalType: b.LINETYPE.ALT_ELSE }, l[p]]);
107
- break;
108
- case 48:
109
- l[p - 3].draw = "participant", l[p - 3].type = "addParticipant", l[p - 3].description = b.parseMessage(l[p - 1]), this.$ = l[p - 3];
110
- break;
111
- case 49:
112
- l[p - 1].draw = "participant", l[p - 1].type = "addParticipant", this.$ = l[p - 1];
113
- break;
114
- case 50:
115
- l[p - 3].draw = "actor", l[p - 3].type = "addParticipant", l[p - 3].description = b.parseMessage(l[p - 1]), this.$ = l[p - 3];
116
- break;
117
- case 51:
118
- l[p - 1].draw = "actor", l[p - 1].type = "addParticipant", this.$ = l[p - 1];
119
- break;
120
- case 52:
121
- l[p - 1].type = "destroyParticipant", this.$ = l[p - 1];
122
- break;
123
- case 53:
124
- this.$ = [l[p - 1], { type: "addNote", placement: l[p - 2], actor: l[p - 1].actor, text: l[p] }];
125
- break;
126
- case 54:
127
- l[p - 2] = [].concat(l[p - 1], l[p - 1]).slice(0, 2), l[p - 2][0] = l[p - 2][0].actor, l[p - 2][1] = l[p - 2][1].actor, this.$ = [l[p - 1], { type: "addNote", placement: b.PLACEMENT.OVER, actor: l[p - 2].slice(0, 2), text: l[p] }];
128
- break;
129
- case 55:
130
- this.$ = [l[p - 1], { type: "addLinks", actor: l[p - 1].actor, text: l[p] }];
131
- break;
132
- case 56:
133
- this.$ = [l[p - 1], { type: "addALink", actor: l[p - 1].actor, text: l[p] }];
134
- break;
135
- case 57:
136
- this.$ = [l[p - 1], { type: "addProperties", actor: l[p - 1].actor, text: l[p] }];
137
- break;
138
- case 58:
139
- this.$ = [l[p - 1], { type: "addDetails", actor: l[p - 1].actor, text: l[p] }];
140
- break;
141
- case 61:
142
- this.$ = [l[p - 2], l[p]];
143
- break;
144
- case 62:
145
- this.$ = l[p];
146
- break;
147
- case 63:
148
- this.$ = b.PLACEMENT.LEFTOF;
149
- break;
150
- case 64:
151
- this.$ = b.PLACEMENT.RIGHTOF;
152
- break;
153
- case 65:
154
- this.$ = [
155
- l[p - 4],
156
- l[p - 1],
157
- { type: "addMessage", from: l[p - 4].actor, to: l[p - 1].actor, signalType: l[p - 3], msg: l[p], activate: !0 },
158
- { type: "activeStart", signalType: b.LINETYPE.ACTIVE_START, actor: l[p - 1].actor }
159
- ];
160
- break;
161
- case 66:
162
- this.$ = [
163
- l[p - 4],
164
- l[p - 1],
165
- { type: "addMessage", from: l[p - 4].actor, to: l[p - 1].actor, signalType: l[p - 3], msg: l[p] },
166
- { type: "activeEnd", signalType: b.LINETYPE.ACTIVE_END, actor: l[p - 4].actor }
167
- ];
168
- break;
169
- case 67:
170
- this.$ = [l[p - 3], l[p - 1], { type: "addMessage", from: l[p - 3].actor, to: l[p - 1].actor, signalType: l[p - 2], msg: l[p] }];
171
- break;
172
- case 68:
173
- this.$ = { type: "addParticipant", actor: l[p] };
174
- break;
175
- case 69:
176
- this.$ = b.LINETYPE.SOLID_OPEN;
177
- break;
178
- case 70:
179
- this.$ = b.LINETYPE.DOTTED_OPEN;
180
- break;
181
- case 71:
182
- this.$ = b.LINETYPE.SOLID;
183
- break;
184
- case 72:
185
- this.$ = b.LINETYPE.BIDIRECTIONAL_SOLID;
186
- break;
187
- case 73:
188
- this.$ = b.LINETYPE.DOTTED;
189
- break;
190
- case 74:
191
- this.$ = b.LINETYPE.BIDIRECTIONAL_DOTTED;
192
- break;
193
- case 75:
194
- this.$ = b.LINETYPE.SOLID_CROSS;
195
- break;
196
- case 76:
197
- this.$ = b.LINETYPE.DOTTED_CROSS;
198
- break;
199
- case 77:
200
- this.$ = b.LINETYPE.SOLID_POINT;
201
- break;
202
- case 78:
203
- this.$ = b.LINETYPE.DOTTED_POINT;
204
- break;
205
- case 79:
206
- this.$ = b.parseMessage(l[p].trim().substring(1));
207
- break;
208
- }
209
- }, "anonymous"),
210
- table: [{ 3: 1, 4: t, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: t, 5: o, 6: s }, { 3: 6, 4: t, 5: o, 6: s }, e([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], a, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, e(E, [2, 5]), { 9: 47, 12: 12, 13: h, 14: d, 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, e(E, [2, 7]), e(E, [2, 8]), e(E, [2, 14]), { 12: 48, 50: z, 52: H, 53: W }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: N }, { 22: 55, 70: N }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, e(E, [2, 29]), e(E, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, e(E, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: N }, { 22: 72, 70: N }, { 22: 73, 70: N }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82], 79: [1, 83], 80: [1, 84] }, { 55: 85, 57: [1, 86], 65: [1, 87], 66: [1, 88] }, { 22: 89, 70: N }, { 22: 90, 70: N }, { 22: 91, 70: N }, { 22: 92, 70: N }, e([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81], [2, 68]), e(E, [2, 6]), e(E, [2, 15]), e(_, [2, 9], { 10: 93 }), e(E, [2, 17]), { 5: [1, 95], 19: [1, 94] }, { 5: [1, 96] }, e(E, [2, 21]), { 5: [1, 97] }, { 5: [1, 98] }, e(E, [2, 24]), e(E, [2, 25]), e(E, [2, 26]), e(E, [2, 27]), e(E, [2, 28]), e(E, [2, 31]), e(E, [2, 32]), e(Z, a, { 7: 99 }), e(Z, a, { 7: 100 }), e(Z, a, { 7: 101 }), e(at, a, { 40: 102, 7: 103 }), e(k, a, { 42: 104, 7: 105 }), e(k, a, { 7: 105, 42: 106 }), e(qt, a, { 45: 107, 7: 108 }), e(Z, a, { 7: 109 }), { 5: [1, 111], 51: [1, 110] }, { 5: [1, 113], 51: [1, 112] }, { 5: [1, 114] }, { 22: 117, 68: [1, 115], 69: [1, 116], 70: N }, e(it, [2, 69]), e(it, [2, 70]), e(it, [2, 71]), e(it, [2, 72]), e(it, [2, 73]), e(it, [2, 74]), e(it, [2, 75]), e(it, [2, 76]), e(it, [2, 77]), e(it, [2, 78]), { 22: 118, 70: N }, { 22: 120, 58: 119, 70: N }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 121, 81: ct }, { 56: 123, 81: ct }, { 56: 124, 81: ct }, { 56: 125, 81: ct }, { 4: [1, 128], 5: [1, 130], 11: 127, 12: 129, 16: [1, 126], 50: z, 52: H, 53: W }, { 5: [1, 131] }, e(E, [2, 19]), e(E, [2, 20]), e(E, [2, 22]), e(E, [2, 23]), { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 132], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 133], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 134], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 16: [1, 135] }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 46], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 49: [1, 136], 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 16: [1, 137] }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 44], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 48: [1, 138], 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 16: [1, 139] }, { 16: [1, 140] }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [2, 42], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 47: [1, 141], 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 4: i, 5: n, 8: 8, 9: 10, 12: 12, 13: h, 14: d, 16: [1, 142], 17: 15, 18: r, 21: f, 22: 40, 23: y, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: g, 30: T, 31: m, 33: v, 35: A, 36: C, 37: S, 38: B, 39: D, 41: F, 43: q, 44: X, 46: tt, 50: z, 52: H, 53: W, 54: M, 59: J, 60: U, 61: Q, 62: et, 70: N }, { 15: [1, 143] }, e(E, [2, 49]), { 15: [1, 144] }, e(E, [2, 51]), e(E, [2, 52]), { 22: 145, 70: N }, { 22: 146, 70: N }, { 56: 147, 81: ct }, { 56: 148, 81: ct }, { 56: 149, 81: ct }, { 64: [1, 150], 81: [2, 62] }, { 5: [2, 55] }, { 5: [2, 79] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, e(E, [2, 16]), e(_, [2, 10]), { 12: 151, 50: z, 52: H, 53: W }, e(_, [2, 12]), e(_, [2, 13]), e(E, [2, 18]), e(E, [2, 34]), e(E, [2, 35]), e(E, [2, 36]), e(E, [2, 37]), { 15: [1, 152] }, e(E, [2, 38]), { 15: [1, 153] }, e(E, [2, 39]), e(E, [2, 40]), { 15: [1, 154] }, e(E, [2, 41]), { 5: [1, 155] }, { 5: [1, 156] }, { 56: 157, 81: ct }, { 56: 158, 81: ct }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 159, 70: N }, e(_, [2, 11]), e(at, a, { 7: 103, 40: 160 }), e(k, a, { 7: 105, 42: 161 }), e(qt, a, { 7: 108, 45: 162 }), e(E, [2, 48]), e(E, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 81: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
211
- defaultActions: { 5: [2, 1], 6: [2, 2], 87: [2, 63], 88: [2, 64], 121: [2, 55], 122: [2, 79], 123: [2, 56], 124: [2, 57], 125: [2, 58], 147: [2, 67], 148: [2, 53], 149: [2, 54], 157: [2, 65], 158: [2, 66], 159: [2, 61], 160: [2, 47], 161: [2, 45], 162: [2, 43] },
212
- parseError: /* @__PURE__ */ u(function(w, L) {
213
- if (L.recoverable)
214
- this.trace(w);
215
- else {
216
- var P = new Error(w);
217
- throw P.hash = L, P;
218
- }
219
- }, "parseError"),
220
- parse: /* @__PURE__ */ u(function(w) {
221
- var L = this, P = [0], b = [], R = [null], l = [], yt = this.table, p = "", wt = 0, zt = 0, pe = 2, Ht = 1, ue = l.slice.call(arguments, 1), V = Object.create(this.lexer), dt = { yy: {} };
222
- for (var St in this.yy)
223
- Object.prototype.hasOwnProperty.call(this.yy, St) && (dt.yy[St] = this.yy[St]);
224
- V.setInput(w, dt.yy), dt.yy.lexer = V, dt.yy.parser = this, typeof V.yylloc > "u" && (V.yylloc = {});
225
- var Mt = V.yylloc;
226
- l.push(Mt);
227
- var ge = V.options && V.options.ranges;
228
- typeof dt.yy.parseError == "function" ? this.parseError = dt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
229
- function fe(j) {
230
- P.length = P.length - 2 * j, R.length = R.length - j, l.length = l.length - j;
231
- }
232
- u(fe, "popStack");
233
- function Ut() {
234
- var j;
235
- return j = b.pop() || V.lex() || Ht, typeof j != "number" && (j instanceof Array && (b = j, j = b.pop()), j = L.symbols_[j] || j), j;
236
- }
237
- u(Ut, "lex");
238
- for (var K, pt, st, Rt, ft = {}, vt, lt, Kt, It; ; ) {
239
- if (pt = P[P.length - 1], this.defaultActions[pt] ? st = this.defaultActions[pt] : ((K === null || typeof K > "u") && (K = Ut()), st = yt[pt] && yt[pt][K]), typeof st > "u" || !st.length || !st[0]) {
240
- var Dt = "";
241
- It = [];
242
- for (vt in yt[pt])
243
- this.terminals_[vt] && vt > pe && It.push("'" + this.terminals_[vt] + "'");
244
- V.showPosition ? Dt = "Parse error on line " + (wt + 1) + `:
245
- ` + V.showPosition() + `
246
- Expecting ` + It.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : Dt = "Parse error on line " + (wt + 1) + ": Unexpected " + (K == Ht ? "end of input" : "'" + (this.terminals_[K] || K) + "'"), this.parseError(Dt, {
247
- text: V.match,
248
- token: this.terminals_[K] || K,
249
- line: V.yylineno,
250
- loc: Mt,
251
- expected: It
252
- });
253
- }
254
- if (st[0] instanceof Array && st.length > 1)
255
- throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + K);
256
- switch (st[0]) {
257
- case 1:
258
- P.push(K), R.push(V.yytext), l.push(V.yylloc), P.push(st[1]), K = null, zt = V.yyleng, p = V.yytext, wt = V.yylineno, Mt = V.yylloc;
259
- break;
260
- case 2:
261
- if (lt = this.productions_[st[1]][1], ft.$ = R[R.length - lt], ft._$ = {
262
- first_line: l[l.length - (lt || 1)].first_line,
263
- last_line: l[l.length - 1].last_line,
264
- first_column: l[l.length - (lt || 1)].first_column,
265
- last_column: l[l.length - 1].last_column
266
- }, ge && (ft._$.range = [
267
- l[l.length - (lt || 1)].range[0],
268
- l[l.length - 1].range[1]
269
- ]), Rt = this.performAction.apply(ft, [
270
- p,
271
- zt,
272
- wt,
273
- dt.yy,
274
- st[1],
275
- R,
276
- l
277
- ].concat(ue)), typeof Rt < "u")
278
- return Rt;
279
- lt && (P = P.slice(0, -1 * lt * 2), R = R.slice(0, -1 * lt), l = l.slice(0, -1 * lt)), P.push(this.productions_[st[1]][0]), R.push(ft.$), l.push(ft._$), Kt = yt[P[P.length - 2]][P[P.length - 1]], P.push(Kt);
280
- break;
281
- case 3:
282
- return !0;
283
- }
284
- }
285
- return !0;
286
- }, "parse")
287
- }, de = /* @__PURE__ */ function() {
288
- var ht = {
289
- EOF: 1,
290
- parseError: /* @__PURE__ */ u(function(L, P) {
291
- if (this.yy.parser)
292
- this.yy.parser.parseError(L, P);
293
- else
294
- throw new Error(L);
295
- }, "parseError"),
296
- // resets the lexer, sets new input
297
- setInput: /* @__PURE__ */ u(function(w, L) {
298
- return this.yy = L || this.yy || {}, this._input = w, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
299
- first_line: 1,
300
- first_column: 0,
301
- last_line: 1,
302
- last_column: 0
303
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
304
- }, "setInput"),
305
- // consumes and returns one char from the input
306
- input: /* @__PURE__ */ u(function() {
307
- var w = this._input[0];
308
- this.yytext += w, this.yyleng++, this.offset++, this.match += w, this.matched += w;
309
- var L = w.match(/(?:\r\n?|\n).*/g);
310
- return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), w;
311
- }, "input"),
312
- // unshifts one char (or a string) into the input
313
- unput: /* @__PURE__ */ u(function(w) {
314
- var L = w.length, P = w.split(/(?:\r\n?|\n)/g);
315
- this._input = w + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - L), this.offset -= L;
316
- var b = this.match.split(/(?:\r\n?|\n)/g);
317
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), P.length - 1 && (this.yylineno -= P.length - 1);
318
- var R = this.yylloc.range;
319
- return this.yylloc = {
320
- first_line: this.yylloc.first_line,
321
- last_line: this.yylineno + 1,
322
- first_column: this.yylloc.first_column,
323
- last_column: P ? (P.length === b.length ? this.yylloc.first_column : 0) + b[b.length - P.length].length - P[0].length : this.yylloc.first_column - L
324
- }, this.options.ranges && (this.yylloc.range = [R[0], R[0] + this.yyleng - L]), this.yyleng = this.yytext.length, this;
325
- }, "unput"),
326
- // When called from action, caches matched text and appends it on next action
327
- more: /* @__PURE__ */ u(function() {
328
- return this._more = !0, this;
329
- }, "more"),
330
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
331
- reject: /* @__PURE__ */ u(function() {
332
- if (this.options.backtrack_lexer)
333
- this._backtrack = !0;
334
- else
335
- 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).
336
- ` + this.showPosition(), {
337
- text: "",
338
- token: null,
339
- line: this.yylineno
340
- });
341
- return this;
342
- }, "reject"),
343
- // retain first n characters of the match
344
- less: /* @__PURE__ */ u(function(w) {
345
- this.unput(this.match.slice(w));
346
- }, "less"),
347
- // displays already matched input, i.e. for error messages
348
- pastInput: /* @__PURE__ */ u(function() {
349
- var w = this.matched.substr(0, this.matched.length - this.match.length);
350
- return (w.length > 20 ? "..." : "") + w.substr(-20).replace(/\n/g, "");
351
- }, "pastInput"),
352
- // displays upcoming input, i.e. for error messages
353
- upcomingInput: /* @__PURE__ */ u(function() {
354
- var w = this.match;
355
- return w.length < 20 && (w += this._input.substr(0, 20 - w.length)), (w.substr(0, 20) + (w.length > 20 ? "..." : "")).replace(/\n/g, "");
356
- }, "upcomingInput"),
357
- // displays the character position where the lexing error occurred, i.e. for error messages
358
- showPosition: /* @__PURE__ */ u(function() {
359
- var w = this.pastInput(), L = new Array(w.length + 1).join("-");
360
- return w + this.upcomingInput() + `
361
- ` + L + "^";
362
- }, "showPosition"),
363
- // test the lexed token: return FALSE when not a match, otherwise return token
364
- test_match: /* @__PURE__ */ u(function(w, L) {
365
- var P, b, R;
366
- if (this.options.backtrack_lexer && (R = {
367
- yylineno: this.yylineno,
368
- yylloc: {
369
- first_line: this.yylloc.first_line,
370
- last_line: this.last_line,
371
- first_column: this.yylloc.first_column,
372
- last_column: this.yylloc.last_column
373
- },
374
- yytext: this.yytext,
375
- match: this.match,
376
- matches: this.matches,
377
- matched: this.matched,
378
- yyleng: this.yyleng,
379
- offset: this.offset,
380
- _more: this._more,
381
- _input: this._input,
382
- yy: this.yy,
383
- conditionStack: this.conditionStack.slice(0),
384
- done: this.done
385
- }, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b = w[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
386
- first_line: this.yylloc.last_line,
387
- last_line: this.yylineno + 1,
388
- first_column: this.yylloc.last_column,
389
- last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + w[0].length
390
- }, this.yytext += w[0], this.match += w[0], this.matches = w, 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(w[0].length), this.matched += w[0], P = this.performAction.call(this, this.yy, this, L, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), P)
391
- return P;
392
- if (this._backtrack) {
393
- for (var l in R)
394
- this[l] = R[l];
395
- return !1;
396
- }
397
- return !1;
398
- }, "test_match"),
399
- // return next match in input
400
- next: /* @__PURE__ */ u(function() {
401
- if (this.done)
402
- return this.EOF;
403
- this._input || (this.done = !0);
404
- var w, L, P, b;
405
- this._more || (this.yytext = "", this.match = "");
406
- for (var R = this._currentRules(), l = 0; l < R.length; l++)
407
- if (P = this._input.match(this.rules[R[l]]), P && (!L || P[0].length > L[0].length)) {
408
- if (L = P, b = l, this.options.backtrack_lexer) {
409
- if (w = this.test_match(P, R[l]), w !== !1)
410
- return w;
411
- if (this._backtrack) {
412
- L = !1;
413
- continue;
414
- } else
415
- return !1;
416
- } else if (!this.options.flex)
417
- break;
418
- }
419
- return L ? (w = this.test_match(L, R[b]), w !== !1 ? w : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
420
- ` + this.showPosition(), {
421
- text: "",
422
- token: null,
423
- line: this.yylineno
424
- });
425
- }, "next"),
426
- // return next match that has a token
427
- lex: /* @__PURE__ */ u(function() {
428
- var L = this.next();
429
- return L || this.lex();
430
- }, "lex"),
431
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
432
- begin: /* @__PURE__ */ u(function(L) {
433
- this.conditionStack.push(L);
434
- }, "begin"),
435
- // pop the previously active lexer condition state off the condition stack
436
- popState: /* @__PURE__ */ u(function() {
437
- var L = this.conditionStack.length - 1;
438
- return L > 0 ? this.conditionStack.pop() : this.conditionStack[0];
439
- }, "popState"),
440
- // produce the lexer rule set which is active for the currently active lexer condition state
441
- _currentRules: /* @__PURE__ */ u(function() {
442
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
443
- }, "_currentRules"),
444
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
445
- topState: /* @__PURE__ */ u(function(L) {
446
- return L = this.conditionStack.length - 1 - Math.abs(L || 0), L >= 0 ? this.conditionStack[L] : "INITIAL";
447
- }, "topState"),
448
- // alias for begin(condition)
449
- pushState: /* @__PURE__ */ u(function(L) {
450
- this.begin(L);
451
- }, "pushState"),
452
- // return the number of states currently on the stack
453
- stateStackSize: /* @__PURE__ */ u(function() {
454
- return this.conditionStack.length;
455
- }, "stateStackSize"),
456
- options: { "case-insensitive": !0 },
457
- performAction: /* @__PURE__ */ u(function(L, P, b, R) {
458
- switch (b) {
459
- case 0:
460
- return 5;
461
- case 1:
462
- break;
463
- case 2:
464
- break;
465
- case 3:
466
- break;
467
- case 4:
468
- break;
469
- case 5:
470
- break;
471
- case 6:
472
- return 19;
473
- case 7:
474
- return this.begin("LINE"), 14;
475
- case 8:
476
- return this.begin("ID"), 50;
477
- case 9:
478
- return this.begin("ID"), 52;
479
- case 10:
480
- return 13;
481
- case 11:
482
- return this.begin("ID"), 53;
483
- case 12:
484
- return P.yytext = P.yytext.trim(), this.begin("ALIAS"), 70;
485
- case 13:
486
- return this.popState(), this.popState(), this.begin("LINE"), 51;
487
- case 14:
488
- return this.popState(), this.popState(), 5;
489
- case 15:
490
- return this.begin("LINE"), 36;
491
- case 16:
492
- return this.begin("LINE"), 37;
493
- case 17:
494
- return this.begin("LINE"), 38;
495
- case 18:
496
- return this.begin("LINE"), 39;
497
- case 19:
498
- return this.begin("LINE"), 49;
499
- case 20:
500
- return this.begin("LINE"), 41;
501
- case 21:
502
- return this.begin("LINE"), 43;
503
- case 22:
504
- return this.begin("LINE"), 48;
505
- case 23:
506
- return this.begin("LINE"), 44;
507
- case 24:
508
- return this.begin("LINE"), 47;
509
- case 25:
510
- return this.begin("LINE"), 46;
511
- case 26:
512
- return this.popState(), 15;
513
- case 27:
514
- return 16;
515
- case 28:
516
- return 65;
517
- case 29:
518
- return 66;
519
- case 30:
520
- return 59;
521
- case 31:
522
- return 60;
523
- case 32:
524
- return 61;
525
- case 33:
526
- return 62;
527
- case 34:
528
- return 57;
529
- case 35:
530
- return 54;
531
- case 36:
532
- return this.begin("ID"), 21;
533
- case 37:
534
- return this.begin("ID"), 23;
535
- case 38:
536
- return 29;
537
- case 39:
538
- return 30;
539
- case 40:
540
- return this.begin("acc_title"), 31;
541
- case 41:
542
- return this.popState(), "acc_title_value";
543
- case 42:
544
- return this.begin("acc_descr"), 33;
545
- case 43:
546
- return this.popState(), "acc_descr_value";
547
- case 44:
548
- this.begin("acc_descr_multiline");
549
- break;
550
- case 45:
551
- this.popState();
552
- break;
553
- case 46:
554
- return "acc_descr_multiline_value";
555
- case 47:
556
- return 6;
557
- case 48:
558
- return 18;
559
- case 49:
560
- return 20;
561
- case 50:
562
- return 64;
563
- case 51:
564
- return 5;
565
- case 52:
566
- return P.yytext = P.yytext.trim(), 70;
567
- case 53:
568
- return 73;
569
- case 54:
570
- return 74;
571
- case 55:
572
- return 75;
573
- case 56:
574
- return 76;
575
- case 57:
576
- return 71;
577
- case 58:
578
- return 72;
579
- case 59:
580
- return 77;
581
- case 60:
582
- return 78;
583
- case 61:
584
- return 79;
585
- case 62:
586
- return 80;
587
- case 63:
588
- return 81;
589
- case 64:
590
- return 81;
591
- case 65:
592
- return 68;
593
- case 66:
594
- return 69;
595
- case 67:
596
- return 5;
597
- case 68:
598
- return "INVALID";
599
- }
600
- }, "anonymous"),
601
- rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/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, /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i, /^(?::)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
602
- conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: !1 }, acc_descr: { rules: [43], inclusive: !1 }, acc_title: { rules: [41], inclusive: !1 }, ID: { rules: [2, 3, 12], inclusive: !1 }, ALIAS: { rules: [2, 3, 13, 14], inclusive: !1 }, LINE: { rules: [2, 3, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68], inclusive: !0 } }
603
- };
604
- return ht;
605
- }();
606
- Nt.lexer = de;
607
- function mt() {
608
- this.yy = {};
609
- }
610
- return u(mt, "Parser"), mt.prototype = Nt, Nt.Parser = mt, new mt();
611
- }();
612
- Ot.parser = Ot;
613
- var Me = Ot, Re = {
614
- SOLID: 0,
615
- DOTTED: 1,
616
- NOTE: 2,
617
- SOLID_CROSS: 3,
618
- DOTTED_CROSS: 4,
619
- SOLID_OPEN: 5,
620
- DOTTED_OPEN: 6,
621
- LOOP_START: 10,
622
- LOOP_END: 11,
623
- ALT_START: 12,
624
- ALT_ELSE: 13,
625
- ALT_END: 14,
626
- OPT_START: 15,
627
- OPT_END: 16,
628
- ACTIVE_START: 17,
629
- ACTIVE_END: 18,
630
- PAR_START: 19,
631
- PAR_AND: 20,
632
- PAR_END: 21,
633
- RECT_START: 22,
634
- RECT_END: 23,
635
- SOLID_POINT: 24,
636
- DOTTED_POINT: 25,
637
- AUTONUMBER: 26,
638
- CRITICAL_START: 27,
639
- CRITICAL_OPTION: 28,
640
- CRITICAL_END: 29,
641
- BREAK_START: 30,
642
- BREAK_END: 31,
643
- PAR_OVER_START: 32,
644
- BIDIRECTIONAL_SOLID: 33,
645
- BIDIRECTIONAL_DOTTED: 34
646
- }, De = {
647
- FILLED: 0,
648
- OPEN: 1
649
- }, Ce = {
650
- LEFTOF: 0,
651
- RIGHTOF: 1,
652
- OVER: 2
653
- }, Tt, Oe = (Tt = class {
654
- constructor() {
655
- this.state = new be(() => ({
656
- prevActor: void 0,
657
- actors: /* @__PURE__ */ new Map(),
658
- createdActors: /* @__PURE__ */ new Map(),
659
- destroyedActors: /* @__PURE__ */ new Map(),
660
- boxes: [],
661
- messages: [],
662
- notes: [],
663
- sequenceNumbersEnabled: !1,
664
- wrapEnabled: void 0,
665
- currentBox: void 0,
666
- lastCreated: void 0,
667
- lastDestroyed: void 0
668
- })), this.setAccTitle = Gt, this.setAccDescription = Ie, this.setDiagramTitle = Le, this.getAccTitle = _e, this.getAccDescription = Pe, this.getDiagramTitle = Ae, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap($().wrap), this.LINETYPE = Re, this.ARROWTYPE = De, this.PLACEMENT = Ce;
669
- }
670
- addBox(t) {
671
- this.state.records.boxes.push({
672
- name: t.text,
673
- wrap: t.wrap ?? this.autoWrap(),
674
- fill: t.color,
675
- actorKeys: []
676
- }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
677
- }
678
- addActor(t, o, s, a) {
679
- let i = this.state.records.currentBox;
680
- const n = this.state.records.actors.get(t);
681
- if (n) {
682
- if (this.state.records.currentBox && n.box && this.state.records.currentBox !== n.box)
683
- throw new Error(
684
- `A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`
685
- );
686
- if (i = n.box ? n.box : this.state.records.currentBox, n.box = i, n && o === n.name && s == null)
687
- return;
688
- }
689
- if ((s == null ? void 0 : s.text) == null && (s = { text: o, type: a }), (a == null || s.text == null) && (s = { text: o, type: a }), this.state.records.actors.set(t, {
690
- box: i,
691
- name: o,
692
- description: s.text,
693
- wrap: s.wrap ?? this.autoWrap(),
694
- prevActor: this.state.records.prevActor,
695
- links: {},
696
- properties: {},
697
- actorCnt: null,
698
- rectData: null,
699
- type: a ?? "participant"
700
- }), this.state.records.prevActor) {
701
- const h = this.state.records.actors.get(this.state.records.prevActor);
702
- h && (h.nextActor = t);
703
- }
704
- this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(t), this.state.records.prevActor = t;
705
- }
706
- activationCount(t) {
707
- let o, s = 0;
708
- if (!t)
709
- return 0;
710
- for (o = 0; o < this.state.records.messages.length; o++)
711
- this.state.records.messages[o].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[o].from === t && s++, this.state.records.messages[o].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[o].from === t && s--;
712
- return s;
713
- }
714
- addMessage(t, o, s, a) {
715
- this.state.records.messages.push({
716
- id: this.state.records.messages.length.toString(),
717
- from: t,
718
- to: o,
719
- message: s.text,
720
- wrap: s.wrap ?? this.autoWrap(),
721
- answer: a
722
- });
723
- }
724
- addSignal(t, o, s, a, i = !1) {
725
- if (a === this.LINETYPE.ACTIVE_END && this.activationCount(t ?? "") < 1) {
726
- const h = new Error("Trying to inactivate an inactive participant (" + t + ")");
727
- throw h.hash = {
728
- text: "->>-",
729
- token: "->>-",
730
- line: "1",
731
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
732
- expected: ["'ACTIVE_PARTICIPANT'"]
733
- }, h;
734
- }
735
- return this.state.records.messages.push({
736
- id: this.state.records.messages.length.toString(),
737
- from: t,
738
- to: o,
739
- message: (s == null ? void 0 : s.text) ?? "",
740
- wrap: (s == null ? void 0 : s.wrap) ?? this.autoWrap(),
741
- type: a,
742
- activate: i
743
- }), !0;
744
- }
745
- hasAtLeastOneBox() {
746
- return this.state.records.boxes.length > 0;
747
- }
748
- hasAtLeastOneBoxWithTitle() {
749
- return this.state.records.boxes.some((t) => t.name);
750
- }
751
- getMessages() {
752
- return this.state.records.messages;
753
- }
754
- getBoxes() {
755
- return this.state.records.boxes;
756
- }
757
- getActors() {
758
- return this.state.records.actors;
759
- }
760
- getCreatedActors() {
761
- return this.state.records.createdActors;
762
- }
763
- getDestroyedActors() {
764
- return this.state.records.destroyedActors;
765
- }
766
- getActor(t) {
767
- return this.state.records.actors.get(t);
768
- }
769
- getActorKeys() {
770
- return [...this.state.records.actors.keys()];
771
- }
772
- enableSequenceNumbers() {
773
- this.state.records.sequenceNumbersEnabled = !0;
774
- }
775
- disableSequenceNumbers() {
776
- this.state.records.sequenceNumbersEnabled = !1;
777
- }
778
- showSequenceNumbers() {
779
- return this.state.records.sequenceNumbersEnabled;
780
- }
781
- setWrap(t) {
782
- this.state.records.wrapEnabled = t;
783
- }
784
- extractWrap(t) {
785
- if (t === void 0)
786
- return {};
787
- t = t.trim();
788
- const o = /^:?wrap:/.exec(t) !== null ? !0 : /^:?nowrap:/.exec(t) !== null ? !1 : void 0;
789
- return { cleanedText: (o === void 0 ? t : t.replace(/^:?(?:no)?wrap:/, "")).trim(), wrap: o };
790
- }
791
- autoWrap() {
792
- var t;
793
- return this.state.records.wrapEnabled !== void 0 ? this.state.records.wrapEnabled : ((t = $().sequence) == null ? void 0 : t.wrap) ?? !1;
794
- }
795
- clear() {
796
- this.state.reset(), ke();
797
- }
798
- parseMessage(t) {
799
- const o = t.trim(), { wrap: s, cleanedText: a } = this.extractWrap(o), i = {
800
- text: a,
801
- wrap: s
802
- };
803
- return G.debug(`parseMessage: ${JSON.stringify(i)}`), i;
804
- }
805
- // We expect the box statement to be color first then description
806
- // The color can be rgb,rgba,hsl,hsla, or css code names #hex codes are not supported for now because of the way the char # is handled
807
- // We extract first segment as color, the rest of the line is considered as text
808
- parseBoxData(t) {
809
- const o = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);
810
- let s = o != null && o[1] ? o[1].trim() : "transparent", a = o != null && o[2] ? o[2].trim() : void 0;
811
- if (window != null && window.CSS)
812
- window.CSS.supports("color", s) || (s = "transparent", a = t.trim());
813
- else {
814
- const h = new Option().style;
815
- h.color = s, h.color !== s && (s = "transparent", a = t.trim());
816
- }
817
- const { wrap: i, cleanedText: n } = this.extractWrap(a);
818
- return {
819
- text: n ? _t(n, $()) : void 0,
820
- color: s,
821
- wrap: i
822
- };
823
- }
824
- addNote(t, o, s) {
825
- const a = {
826
- actor: t,
827
- placement: o,
828
- message: s.text,
829
- wrap: s.wrap ?? this.autoWrap()
830
- }, i = [].concat(t, t);
831
- this.state.records.notes.push(a), this.state.records.messages.push({
832
- id: this.state.records.messages.length.toString(),
833
- from: i[0],
834
- to: i[1],
835
- message: s.text,
836
- wrap: s.wrap ?? this.autoWrap(),
837
- type: this.LINETYPE.NOTE,
838
- placement: o
839
- });
840
- }
841
- addLinks(t, o) {
842
- const s = this.getActor(t);
843
- try {
844
- let a = _t(o.text, $());
845
- a = a.replace(/&equals;/g, "="), a = a.replace(/&amp;/g, "&");
846
- const i = JSON.parse(a);
847
- this.insertLinks(s, i);
848
- } catch (a) {
849
- G.error("error while parsing actor link text", a);
850
- }
851
- }
852
- addALink(t, o) {
853
- const s = this.getActor(t);
854
- try {
855
- const a = {};
856
- let i = _t(o.text, $());
857
- const n = i.indexOf("@");
858
- i = i.replace(/&equals;/g, "="), i = i.replace(/&amp;/g, "&");
859
- const h = i.slice(0, n - 1).trim(), d = i.slice(n + 1).trim();
860
- a[h] = d, this.insertLinks(s, a);
861
- } catch (a) {
862
- G.error("error while parsing actor link text", a);
863
- }
864
- }
865
- insertLinks(t, o) {
866
- if (t.links == null)
867
- t.links = o;
868
- else
869
- for (const s in o)
870
- t.links[s] = o[s];
871
- }
872
- addProperties(t, o) {
873
- const s = this.getActor(t);
874
- try {
875
- const a = _t(o.text, $()), i = JSON.parse(a);
876
- this.insertProperties(s, i);
877
- } catch (a) {
878
- G.error("error while parsing actor properties text", a);
879
- }
880
- }
881
- insertProperties(t, o) {
882
- if (t.properties == null)
883
- t.properties = o;
884
- else
885
- for (const s in o)
886
- t.properties[s] = o[s];
887
- }
888
- boxEnd() {
889
- this.state.records.currentBox = void 0;
890
- }
891
- addDetails(t, o) {
892
- const s = this.getActor(t), a = document.getElementById(o.text);
893
- try {
894
- const i = a.innerHTML, n = JSON.parse(i);
895
- n.properties && this.insertProperties(s, n.properties), n.links && this.insertLinks(s, n.links);
896
- } catch (i) {
897
- G.error("error while parsing actor details text", i);
898
- }
899
- }
900
- getActorProperty(t, o) {
901
- if ((t == null ? void 0 : t.properties) !== void 0)
902
- return t.properties[o];
903
- }
904
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
905
- apply(t) {
906
- if (Array.isArray(t))
907
- t.forEach((o) => {
908
- this.apply(o);
909
- });
910
- else
911
- switch (t.type) {
912
- case "sequenceIndex":
913
- this.state.records.messages.push({
914
- id: this.state.records.messages.length.toString(),
915
- from: void 0,
916
- to: void 0,
917
- message: {
918
- start: t.sequenceIndex,
919
- step: t.sequenceIndexStep,
920
- visible: t.sequenceVisible
921
- },
922
- wrap: !1,
923
- type: t.signalType
924
- });
925
- break;
926
- case "addParticipant":
927
- this.addActor(t.actor, t.actor, t.description, t.draw);
928
- break;
929
- case "createParticipant":
930
- if (this.state.records.actors.has(t.actor))
931
- throw new Error(
932
- "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"
933
- );
934
- this.state.records.lastCreated = t.actor, this.addActor(t.actor, t.actor, t.description, t.draw), this.state.records.createdActors.set(t.actor, this.state.records.messages.length);
935
- break;
936
- case "destroyParticipant":
937
- this.state.records.lastDestroyed = t.actor, this.state.records.destroyedActors.set(t.actor, this.state.records.messages.length);
938
- break;
939
- case "activeStart":
940
- this.addSignal(t.actor, void 0, void 0, t.signalType);
941
- break;
942
- case "activeEnd":
943
- this.addSignal(t.actor, void 0, void 0, t.signalType);
944
- break;
945
- case "addNote":
946
- this.addNote(t.actor, t.placement, t.text);
947
- break;
948
- case "addLinks":
949
- this.addLinks(t.actor, t.text);
950
- break;
951
- case "addALink":
952
- this.addALink(t.actor, t.text);
953
- break;
954
- case "addProperties":
955
- this.addProperties(t.actor, t.text);
956
- break;
957
- case "addDetails":
958
- this.addDetails(t.actor, t.text);
959
- break;
960
- case "addMessage":
961
- if (this.state.records.lastCreated) {
962
- if (t.to !== this.state.records.lastCreated)
963
- throw new Error(
964
- "The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram."
965
- );
966
- this.state.records.lastCreated = void 0;
967
- } else if (this.state.records.lastDestroyed) {
968
- if (t.to !== this.state.records.lastDestroyed && t.from !== this.state.records.lastDestroyed)
969
- throw new Error(
970
- "The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
971
- );
972
- this.state.records.lastDestroyed = void 0;
973
- }
974
- this.addSignal(t.from, t.to, t.msg, t.signalType, t.activate);
975
- break;
976
- case "boxStart":
977
- this.addBox(t.boxData);
978
- break;
979
- case "boxEnd":
980
- this.boxEnd();
981
- break;
982
- case "loopStart":
983
- this.addSignal(void 0, void 0, t.loopText, t.signalType);
984
- break;
985
- case "loopEnd":
986
- this.addSignal(void 0, void 0, void 0, t.signalType);
987
- break;
988
- case "rectStart":
989
- this.addSignal(void 0, void 0, t.color, t.signalType);
990
- break;
991
- case "rectEnd":
992
- this.addSignal(void 0, void 0, void 0, t.signalType);
993
- break;
994
- case "optStart":
995
- this.addSignal(void 0, void 0, t.optText, t.signalType);
996
- break;
997
- case "optEnd":
998
- this.addSignal(void 0, void 0, void 0, t.signalType);
999
- break;
1000
- case "altStart":
1001
- this.addSignal(void 0, void 0, t.altText, t.signalType);
1002
- break;
1003
- case "else":
1004
- this.addSignal(void 0, void 0, t.altText, t.signalType);
1005
- break;
1006
- case "altEnd":
1007
- this.addSignal(void 0, void 0, void 0, t.signalType);
1008
- break;
1009
- case "setAccTitle":
1010
- Gt(t.text);
1011
- break;
1012
- case "parStart":
1013
- this.addSignal(void 0, void 0, t.parText, t.signalType);
1014
- break;
1015
- case "and":
1016
- this.addSignal(void 0, void 0, t.parText, t.signalType);
1017
- break;
1018
- case "parEnd":
1019
- this.addSignal(void 0, void 0, void 0, t.signalType);
1020
- break;
1021
- case "criticalStart":
1022
- this.addSignal(void 0, void 0, t.criticalText, t.signalType);
1023
- break;
1024
- case "option":
1025
- this.addSignal(void 0, void 0, t.optionText, t.signalType);
1026
- break;
1027
- case "criticalEnd":
1028
- this.addSignal(void 0, void 0, void 0, t.signalType);
1029
- break;
1030
- case "breakStart":
1031
- this.addSignal(void 0, void 0, t.breakText, t.signalType);
1032
- break;
1033
- case "breakEnd":
1034
- this.addSignal(void 0, void 0, void 0, t.signalType);
1035
- break;
1036
- }
1037
- }
1038
- getConfig() {
1039
- return $().sequence;
1040
- }
1041
- }, u(Tt, "SequenceDB"), Tt), Be = /* @__PURE__ */ u((e) => `.actor {
1042
- stroke: ${e.actorBorder};
1043
- fill: ${e.actorBkg};
1044
- }
1045
-
1046
- text.actor > tspan {
1047
- fill: ${e.actorTextColor};
1048
- stroke: none;
1049
- }
1050
-
1051
- .actor-line {
1052
- stroke: ${e.actorLineColor};
1053
- }
1054
-
1055
- .messageLine0 {
1056
- stroke-width: 1.5;
1057
- stroke-dasharray: none;
1058
- stroke: ${e.signalColor};
1059
- }
1060
-
1061
- .messageLine1 {
1062
- stroke-width: 1.5;
1063
- stroke-dasharray: 2, 2;
1064
- stroke: ${e.signalColor};
1065
- }
1066
-
1067
- #arrowhead path {
1068
- fill: ${e.signalColor};
1069
- stroke: ${e.signalColor};
1070
- }
1071
-
1072
- .sequenceNumber {
1073
- fill: ${e.sequenceNumberColor};
1074
- }
1075
-
1076
- #sequencenumber {
1077
- fill: ${e.signalColor};
1078
- }
1079
-
1080
- #crosshead path {
1081
- fill: ${e.signalColor};
1082
- stroke: ${e.signalColor};
1083
- }
1084
-
1085
- .messageText {
1086
- fill: ${e.signalTextColor};
1087
- stroke: none;
1088
- }
1089
-
1090
- .labelBox {
1091
- stroke: ${e.labelBoxBorderColor};
1092
- fill: ${e.labelBoxBkgColor};
1093
- }
1094
-
1095
- .labelText, .labelText > tspan {
1096
- fill: ${e.labelTextColor};
1097
- stroke: none;
1098
- }
1099
-
1100
- .loopText, .loopText > tspan {
1101
- fill: ${e.loopTextColor};
1102
- stroke: none;
1103
- }
1104
-
1105
- .loopLine {
1106
- stroke-width: 2px;
1107
- stroke-dasharray: 2, 2;
1108
- stroke: ${e.labelBoxBorderColor};
1109
- fill: ${e.labelBoxBorderColor};
1110
- }
1111
-
1112
- .note {
1113
- //stroke: #decc93;
1114
- stroke: ${e.noteBorderColor};
1115
- fill: ${e.noteBkgColor};
1116
- }
1117
-
1118
- .noteText, .noteText > tspan {
1119
- fill: ${e.noteTextColor};
1120
- stroke: none;
1121
- }
1122
-
1123
- .activation0 {
1124
- fill: ${e.activationBkgColor};
1125
- stroke: ${e.activationBorderColor};
1126
- }
1127
-
1128
- .activation1 {
1129
- fill: ${e.activationBkgColor};
1130
- stroke: ${e.activationBorderColor};
1131
- }
1132
-
1133
- .activation2 {
1134
- fill: ${e.activationBkgColor};
1135
- stroke: ${e.activationBorderColor};
1136
- }
1137
-
1138
- .actorPopupMenu {
1139
- position: absolute;
1140
- }
1141
-
1142
- .actorPopupMenuPanel {
1143
- position: absolute;
1144
- fill: ${e.actorBkg};
1145
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
1146
- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
1147
- }
1148
- .actor-man line {
1149
- stroke: ${e.actorBorder};
1150
- fill: ${e.actorBkg};
1151
- }
1152
- .actor-man circle, line {
1153
- stroke: ${e.actorBorder};
1154
- fill: ${e.actorBkg};
1155
- stroke-width: 2px;
1156
- }
1157
- `, "getStyles"), Ve = Be, ut = 18 * 2, $t = "actor-top", te = "actor-bottom", Ye = "actor-box", Xt = "actor-man", Wt = /* @__PURE__ */ u(function(e, t) {
1158
- return Te(e, t);
1159
- }, "drawRect"), We = /* @__PURE__ */ u(function(e, t, o, s, a) {
1160
- if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0)
1161
- return { height: 0, width: 0 };
1162
- const i = t.links, n = t.actorCnt, h = t.rectData;
1163
- var d = "none";
1164
- a && (d = "block !important");
1165
- const r = e.append("g");
1166
- r.attr("id", "actor" + n + "_popup"), r.attr("class", "actorPopupMenu"), r.attr("display", d);
1167
- var f = "";
1168
- h.class !== void 0 && (f = " " + h.class);
1169
- let y = h.width > o ? h.width : o;
1170
- const g = r.append("rect");
1171
- if (g.attr("class", "actorPopupMenuPanel" + f), g.attr("x", h.x), g.attr("y", h.height), g.attr("fill", h.fill), g.attr("stroke", h.stroke), g.attr("width", y), g.attr("height", h.height), g.attr("rx", h.rx), g.attr("ry", h.ry), i != null) {
1172
- var T = 20;
1173
- for (let A in i) {
1174
- var m = r.append("a"), v = Qt(i[A]);
1175
- m.attr("xlink:href", v), m.attr("target", "_blank"), as(s)(
1176
- A,
1177
- m,
1178
- h.x + 10,
1179
- h.height + T,
1180
- y,
1181
- 20,
1182
- { class: "actor" },
1183
- s
1184
- ), T += 30;
1185
- }
1186
- }
1187
- return g.attr("height", T), { height: h.height + T, width: y };
1188
- }, "drawPopup"), Fe = /* @__PURE__ */ u(function(e) {
1189
- return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
1190
- }, "popupMenuToggle"), Pt = /* @__PURE__ */ u(async function(e, t, o = null) {
1191
- let s = e.append("foreignObject");
1192
- const a = await jt(t.text, Ct()), n = s.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();
1193
- if (s.attr("height", Math.round(n.height)).attr("width", Math.round(n.width)), t.class === "noteText") {
1194
- const h = e.node().firstChild;
1195
- h.setAttribute("height", n.height + 2 * t.textMargin);
1196
- const d = h.getBBox();
1197
- s.attr("x", Math.round(d.x + d.width / 2 - n.width / 2)).attr("y", Math.round(d.y + d.height / 2 - n.height / 2));
1198
- } else if (o) {
1199
- let { startx: h, stopx: d, starty: r } = o;
1200
- if (h > d) {
1201
- const f = h;
1202
- h = d, d = f;
1203
- }
1204
- s.attr("x", Math.round(h + Math.abs(h - d) / 2 - n.width / 2)), t.class === "loopText" ? s.attr("y", Math.round(r)) : s.attr("y", Math.round(r - n.height));
1205
- }
1206
- return [s];
1207
- }, "drawKatex"), Et = /* @__PURE__ */ u(function(e, t) {
1208
- let o = 0, s = 0;
1209
- const a = t.text.split(I.lineBreakRegex), [i, n] = Zt(t.fontSize);
1210
- let h = [], d = 0, r = /* @__PURE__ */ u(() => t.y, "yfunc");
1211
- if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0)
1212
- switch (t.valign) {
1213
- case "top":
1214
- case "start":
1215
- r = /* @__PURE__ */ u(() => Math.round(t.y + t.textMargin), "yfunc");
1216
- break;
1217
- case "middle":
1218
- case "center":
1219
- r = /* @__PURE__ */ u(() => Math.round(t.y + (o + s + t.textMargin) / 2), "yfunc");
1220
- break;
1221
- case "bottom":
1222
- case "end":
1223
- r = /* @__PURE__ */ u(() => Math.round(
1224
- t.y + (o + s + 2 * t.textMargin) - t.textMargin
1225
- ), "yfunc");
1226
- break;
1227
- }
1228
- if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0)
1229
- switch (t.anchor) {
1230
- case "left":
1231
- case "start":
1232
- t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
1233
- break;
1234
- case "middle":
1235
- case "center":
1236
- t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
1237
- break;
1238
- case "right":
1239
- case "end":
1240
- t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
1241
- break;
1242
- }
1243
- for (let [f, y] of a.entries()) {
1244
- t.textMargin !== void 0 && t.textMargin === 0 && i !== void 0 && (d = f * i);
1245
- const g = e.append("text");
1246
- g.attr("x", t.x), g.attr("y", r()), t.anchor !== void 0 && g.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && g.style("font-family", t.fontFamily), n !== void 0 && g.style("font-size", n), t.fontWeight !== void 0 && g.style("font-weight", t.fontWeight), t.fill !== void 0 && g.attr("fill", t.fill), t.class !== void 0 && g.attr("class", t.class), t.dy !== void 0 ? g.attr("dy", t.dy) : d !== 0 && g.attr("dy", d);
1247
- const T = y || Ne;
1248
- if (t.tspan) {
1249
- const m = g.append("tspan");
1250
- m.attr("x", t.x), t.fill !== void 0 && m.attr("fill", t.fill), m.text(T);
1251
- } else
1252
- g.text(T);
1253
- t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (s += (g._groups || g)[0][0].getBBox().height, o = s), h.push(g);
1254
- }
1255
- return h;
1256
- }, "drawText"), ee = /* @__PURE__ */ u(function(e, t) {
1257
- function o(a, i, n, h, d) {
1258
- return a + "," + i + " " + (a + n) + "," + i + " " + (a + n) + "," + (i + h - d) + " " + (a + n - d * 1.2) + "," + (i + h) + " " + a + "," + (i + h);
1259
- }
1260
- u(o, "genPoints");
1261
- const s = e.append("polygon");
1262
- return s.attr("points", o(t.x, t.y, t.width, t.height, 7)), s.attr("class", "labelBox"), t.y = t.y + t.height / 2, Et(e, t), s;
1263
- }, "drawLabel"), nt = -1, se = /* @__PURE__ */ u((e, t, o, s) => {
1264
- e.select && o.forEach((a) => {
1265
- const i = t.get(a), n = e.select("#actor" + i.actorCnt);
1266
- !s.mirrorActors && i.stopy ? n.attr("y2", i.stopy + i.height / 2) : s.mirrorActors && n.attr("y2", i.stopy);
1267
- });
1268
- }, "fixLifeLineHeights"), qe = /* @__PURE__ */ u(function(e, t, o, s) {
1269
- var T, m;
1270
- const a = s ? t.stopy : t.starty, i = t.x + t.width / 2, n = a + t.height, h = e.append("g").lower();
1271
- var d = h;
1272
- s || (nt++, Object.keys(t.links || {}).length && !o.forceMenus && d.attr("onclick", Fe(`actor${nt}_popup`)).attr("cursor", "pointer"), d.append("line").attr("id", "actor" + nt).attr("x1", i).attr("y1", n).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), d = h.append("g"), t.actorCnt = nt, t.links != null && d.attr("id", "root-" + nt));
1273
- const r = At();
1274
- var f = "actor";
1275
- (T = t.properties) != null && T.class ? f = t.properties.class : r.fill = "#eaeaea", s ? f += ` ${te}` : f += ` ${$t}`, r.x = t.x, r.y = a, r.width = t.width, r.height = t.height, r.class = f, r.rx = 3, r.ry = 3, r.name = t.name;
1276
- const y = Wt(d, r);
1277
- if (t.rectData = r, (m = t.properties) != null && m.icon) {
1278
- const v = t.properties.icon.trim();
1279
- v.charAt(0) === "@" ? Ee(d, r.x + r.width - 20, r.y + 10, v.substr(1)) : ye(d, r.x + r.width - 20, r.y + 10, v);
1280
- }
1281
- Ft(o, ot(t.description))(
1282
- t.description,
1283
- d,
1284
- r.x,
1285
- r.y,
1286
- r.width,
1287
- r.height,
1288
- { class: `actor ${Ye}` },
1289
- o
1290
- );
1291
- let g = t.height;
1292
- if (y.node) {
1293
- const v = y.node().getBBox();
1294
- t.height = v.height, g = v.height;
1295
- }
1296
- return g;
1297
- }, "drawActorTypeParticipant"), ze = /* @__PURE__ */ u(function(e, t, o, s) {
1298
- const a = s ? t.stopy : t.starty, i = t.x + t.width / 2, n = a + 80, h = e.append("g").lower();
1299
- s || (nt++, h.append("line").attr("id", "actor" + nt).attr("x1", i).attr("y1", n).attr("x2", i).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name), t.actorCnt = nt);
1300
- const d = e.append("g");
1301
- let r = Xt;
1302
- s ? r += ` ${te}` : r += ` ${$t}`, d.attr("class", r), d.attr("name", t.name);
1303
- const f = At();
1304
- f.x = t.x, f.y = a, f.fill = "#eaeaea", f.width = t.width, f.height = t.height, f.class = "actor", f.rx = 3, f.ry = 3, d.append("line").attr("id", "actor-man-torso" + nt).attr("x1", i).attr("y1", a + 25).attr("x2", i).attr("y2", a + 45), d.append("line").attr("id", "actor-man-arms" + nt).attr("x1", i - ut / 2).attr("y1", a + 33).attr("x2", i + ut / 2).attr("y2", a + 33), d.append("line").attr("x1", i - ut / 2).attr("y1", a + 60).attr("x2", i).attr("y2", a + 45), d.append("line").attr("x1", i).attr("y1", a + 45).attr("x2", i + ut / 2 - 2).attr("y2", a + 60);
1305
- const y = d.append("circle");
1306
- y.attr("cx", t.x + t.width / 2), y.attr("cy", a + 10), y.attr("r", 15), y.attr("width", t.width), y.attr("height", t.height);
1307
- const g = d.node().getBBox();
1308
- return t.height = g.height, Ft(o, ot(t.description))(
1309
- t.description,
1310
- d,
1311
- f.x,
1312
- f.y + 35,
1313
- f.width,
1314
- f.height,
1315
- { class: `actor ${Xt}` },
1316
- o
1317
- ), t.height;
1318
- }, "drawActorTypeActor"), He = /* @__PURE__ */ u(async function(e, t, o, s) {
1319
- switch (t.type) {
1320
- case "actor":
1321
- return await ze(e, t, o, s);
1322
- case "participant":
1323
- return await qe(e, t, o, s);
1324
- }
1325
- }, "drawActor"), Ue = /* @__PURE__ */ u(function(e, t, o) {
1326
- const a = e.append("g");
1327
- ae(a, t), t.name && Ft(o)(
1328
- t.name,
1329
- a,
1330
- t.x,
1331
- t.y + o.boxTextMargin + (t.textMaxHeight || 0) / 2,
1332
- t.width,
1333
- 0,
1334
- { class: "text" },
1335
- o
1336
- ), a.lower();
1337
- }, "drawBox"), Ke = /* @__PURE__ */ u(function(e) {
1338
- return e.append("g");
1339
- }, "anchorElement"), Ge = /* @__PURE__ */ u(function(e, t, o, s, a) {
1340
- const i = At(), n = t.anchored;
1341
- i.x = t.startx, i.y = t.starty, i.class = "activation" + a % 3, i.width = t.stopx - t.startx, i.height = o - t.starty, Wt(n, i);
1342
- }, "drawActivation"), Xe = /* @__PURE__ */ u(async function(e, t, o, s) {
1343
- const {
1344
- boxMargin: a,
1345
- boxTextMargin: i,
1346
- labelBoxHeight: n,
1347
- labelBoxWidth: h,
1348
- messageFontFamily: d,
1349
- messageFontSize: r,
1350
- messageFontWeight: f
1351
- } = s, y = e.append("g"), g = /* @__PURE__ */ u(function(v, A, C, S) {
1352
- return y.append("line").attr("x1", v).attr("y1", A).attr("x2", C).attr("y2", S).attr("class", "loopLine");
1353
- }, "drawLoopLine");
1354
- g(t.startx, t.starty, t.stopx, t.starty), g(t.stopx, t.starty, t.stopx, t.stopy), g(t.startx, t.stopy, t.stopx, t.stopy), g(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(v) {
1355
- g(t.startx, v.y, t.stopx, v.y).style(
1356
- "stroke-dasharray",
1357
- "3, 3"
1358
- );
1359
- });
1360
- let T = Yt();
1361
- T.text = o, T.x = t.startx, T.y = t.starty, T.fontFamily = d, T.fontSize = r, T.fontWeight = f, T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.width = h || 50, T.height = n || 20, T.textMargin = i, T.class = "labelText", ee(y, T), T = re(), T.text = t.title, T.x = t.startx + h / 2 + (t.stopx - t.startx) / 2, T.y = t.starty + a + i, T.anchor = "middle", T.valign = "middle", T.textMargin = i, T.class = "loopText", T.fontFamily = d, T.fontSize = r, T.fontWeight = f, T.wrap = !0;
1362
- let m = ot(T.text) ? await Pt(y, T, t) : Et(y, T);
1363
- if (t.sectionTitles !== void 0) {
1364
- for (const [v, A] of Object.entries(t.sectionTitles))
1365
- if (A.message) {
1366
- T.text = A.message, T.x = t.startx + (t.stopx - t.startx) / 2, T.y = t.sections[v].y + a + i, T.class = "loopText", T.anchor = "middle", T.valign = "middle", T.tspan = !1, T.fontFamily = d, T.fontSize = r, T.fontWeight = f, T.wrap = t.wrap, ot(T.text) ? (t.starty = t.sections[v].y, await Pt(y, T, t)) : Et(y, T);
1367
- let C = Math.round(
1368
- m.map((S) => (S._groups || S)[0][0].getBBox().height).reduce((S, B) => S + B)
1369
- );
1370
- t.sections[v].height += C - (a + i);
1371
- }
1372
- }
1373
- return t.height = Math.round(t.stopy - t.starty), y;
1374
- }, "drawLoop"), ae = /* @__PURE__ */ u(function(e, t) {
1375
- xe(e, t);
1376
- }, "drawBackgroundRect"), Je = /* @__PURE__ */ u(function(e) {
1377
- e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1378
- "d",
1379
- "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"
1380
- );
1381
- }, "insertDatabaseIcon"), Qe = /* @__PURE__ */ u(function(e) {
1382
- e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1383
- "d",
1384
- "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"
1385
- );
1386
- }, "insertComputerIcon"), Ze = /* @__PURE__ */ u(function(e) {
1387
- e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1388
- "d",
1389
- "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"
1390
- );
1391
- }, "insertClockIcon"), je = /* @__PURE__ */ u(function(e) {
1392
- e.append("defs").append("marker").attr("id", "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");
1393
- }, "insertArrowHead"), $e = /* @__PURE__ */ u(function(e) {
1394
- e.append("defs").append("marker").attr("id", "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");
1395
- }, "insertArrowFilledHead"), ts = /* @__PURE__ */ u(function(e) {
1396
- e.append("defs").append("marker").attr("id", "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);
1397
- }, "insertSequenceNumber"), es = /* @__PURE__ */ u(function(e) {
1398
- e.append("defs").append("marker").attr("id", "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");
1399
- }, "insertArrowCrossHead"), re = /* @__PURE__ */ u(function() {
1400
- return {
1401
- x: 0,
1402
- y: 0,
1403
- fill: void 0,
1404
- anchor: void 0,
1405
- style: "#666",
1406
- width: void 0,
1407
- height: void 0,
1408
- textMargin: 0,
1409
- rx: 0,
1410
- ry: 0,
1411
- tspan: !0,
1412
- valign: void 0
1413
- };
1414
- }, "getTextObj"), ss = /* @__PURE__ */ u(function() {
1415
- return {
1416
- x: 0,
1417
- y: 0,
1418
- fill: "#EDF2AE",
1419
- stroke: "#666",
1420
- width: 100,
1421
- anchor: "start",
1422
- height: 100,
1423
- rx: 0,
1424
- ry: 0
1425
- };
1426
- }, "getNoteRect"), Ft = /* @__PURE__ */ function() {
1427
- function e(i, n, h, d, r, f, y) {
1428
- const g = n.append("text").attr("x", h + r / 2).attr("y", d + f / 2 + 5).style("text-anchor", "middle").text(i);
1429
- a(g, y);
1430
- }
1431
- u(e, "byText");
1432
- function t(i, n, h, d, r, f, y, g) {
1433
- const { actorFontSize: T, actorFontFamily: m, actorFontWeight: v } = g, [A, C] = Zt(T), S = i.split(I.lineBreakRegex);
1434
- for (let B = 0; B < S.length; B++) {
1435
- const D = B * A - A * (S.length - 1) / 2, F = n.append("text").attr("x", h + r / 2).attr("y", d).style("text-anchor", "middle").style("font-size", C).style("font-weight", v).style("font-family", m);
1436
- F.append("tspan").attr("x", h + r / 2).attr("dy", D).text(S[B]), F.attr("y", d + f / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(F, y);
1437
- }
1438
- }
1439
- u(t, "byTspan");
1440
- function o(i, n, h, d, r, f, y, g) {
1441
- const T = n.append("switch"), v = T.append("foreignObject").attr("x", h).attr("y", d).attr("width", r).attr("height", f).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1442
- v.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, T, h, d, r, f, y, g), a(v, y);
1443
- }
1444
- u(o, "byFo");
1445
- async function s(i, n, h, d, r, f, y, g) {
1446
- const T = await bt(i, Ct()), m = n.append("switch"), A = m.append("foreignObject").attr("x", h + r / 2 - T.width / 2).attr("y", d + f / 2 - T.height / 2).attr("width", T.width).attr("height", T.height).append("xhtml:div").style("height", "100%").style("width", "100%");
1447
- A.append("div").style("text-align", "center").style("vertical-align", "middle").html(await jt(i, Ct())), t(i, m, h, d, r, f, y, g), a(A, y);
1448
- }
1449
- u(s, "byKatex");
1450
- function a(i, n) {
1451
- for (const h in n)
1452
- n.hasOwnProperty(h) && i.attr(h, n[h]);
1453
- }
1454
- return u(a, "_setTextAttrs"), function(i, n = !1) {
1455
- return n ? s : i.textPlacement === "fo" ? o : i.textPlacement === "old" ? e : t;
1456
- };
1457
- }(), as = /* @__PURE__ */ function() {
1458
- function e(a, i, n, h, d, r, f) {
1459
- const y = i.append("text").attr("x", n).attr("y", h).style("text-anchor", "start").text(a);
1460
- s(y, f);
1461
- }
1462
- u(e, "byText");
1463
- function t(a, i, n, h, d, r, f, y) {
1464
- const { actorFontSize: g, actorFontFamily: T, actorFontWeight: m } = y, v = a.split(I.lineBreakRegex);
1465
- for (let A = 0; A < v.length; A++) {
1466
- const C = A * g - g * (v.length - 1) / 2, S = i.append("text").attr("x", n).attr("y", h).style("text-anchor", "start").style("font-size", g).style("font-weight", m).style("font-family", T);
1467
- S.append("tspan").attr("x", n).attr("dy", C).text(v[A]), S.attr("y", h + r / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(S, f);
1468
- }
1469
- }
1470
- u(t, "byTspan");
1471
- function o(a, i, n, h, d, r, f, y) {
1472
- const g = i.append("switch"), m = g.append("foreignObject").attr("x", n).attr("y", h).attr("width", d).attr("height", r).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1473
- m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(a), t(a, g, n, h, d, r, f, y), s(m, f);
1474
- }
1475
- u(o, "byFo");
1476
- function s(a, i) {
1477
- for (const n in i)
1478
- i.hasOwnProperty(n) && a.attr(n, i[n]);
1479
- }
1480
- return u(s, "_setTextAttrs"), function(a) {
1481
- return a.textPlacement === "fo" ? o : a.textPlacement === "old" ? e : t;
1482
- };
1483
- }(), O = {
1484
- drawRect: Wt,
1485
- drawText: Et,
1486
- drawLabel: ee,
1487
- drawActor: He,
1488
- drawBox: Ue,
1489
- drawPopup: We,
1490
- anchorElement: Ke,
1491
- drawActivation: Ge,
1492
- drawLoop: Xe,
1493
- drawBackgroundRect: ae,
1494
- insertArrowHead: je,
1495
- insertArrowFilledHead: $e,
1496
- insertSequenceNumber: ts,
1497
- insertArrowCrossHead: es,
1498
- insertDatabaseIcon: Je,
1499
- insertComputerIcon: Qe,
1500
- insertClockIcon: Ze,
1501
- getTextObj: re,
1502
- getNoteRect: ss,
1503
- fixLifeLineHeights: se,
1504
- sanitizeUrl: Qt
1505
- }, c = {}, x = {
1506
- data: {
1507
- startx: void 0,
1508
- stopx: void 0,
1509
- starty: void 0,
1510
- stopy: void 0
1511
- },
1512
- verticalPos: 0,
1513
- sequenceItems: [],
1514
- activations: [],
1515
- models: {
1516
- getHeight: /* @__PURE__ */ u(function() {
1517
- return Math.max.apply(
1518
- null,
1519
- this.actors.length === 0 ? [0] : this.actors.map((e) => e.height || 0)
1520
- ) + (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));
1521
- }, "getHeight"),
1522
- clear: /* @__PURE__ */ u(function() {
1523
- this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
1524
- }, "clear"),
1525
- addBox: /* @__PURE__ */ u(function(e) {
1526
- this.boxes.push(e);
1527
- }, "addBox"),
1528
- addActor: /* @__PURE__ */ u(function(e) {
1529
- this.actors.push(e);
1530
- }, "addActor"),
1531
- addLoop: /* @__PURE__ */ u(function(e) {
1532
- this.loops.push(e);
1533
- }, "addLoop"),
1534
- addMessage: /* @__PURE__ */ u(function(e) {
1535
- this.messages.push(e);
1536
- }, "addMessage"),
1537
- addNote: /* @__PURE__ */ u(function(e) {
1538
- this.notes.push(e);
1539
- }, "addNote"),
1540
- lastActor: /* @__PURE__ */ u(function() {
1541
- return this.actors[this.actors.length - 1];
1542
- }, "lastActor"),
1543
- lastLoop: /* @__PURE__ */ u(function() {
1544
- return this.loops[this.loops.length - 1];
1545
- }, "lastLoop"),
1546
- lastMessage: /* @__PURE__ */ u(function() {
1547
- return this.messages[this.messages.length - 1];
1548
- }, "lastMessage"),
1549
- lastNote: /* @__PURE__ */ u(function() {
1550
- return this.notes[this.notes.length - 1];
1551
- }, "lastNote"),
1552
- actors: [],
1553
- boxes: [],
1554
- loops: [],
1555
- messages: [],
1556
- notes: []
1557
- },
1558
- init: /* @__PURE__ */ u(function() {
1559
- this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
1560
- startx: void 0,
1561
- stopx: void 0,
1562
- starty: void 0,
1563
- stopy: void 0
1564
- }, this.verticalPos = 0, oe($());
1565
- }, "init"),
1566
- updateVal: /* @__PURE__ */ u(function(e, t, o, s) {
1567
- e[t] === void 0 ? e[t] = o : e[t] = s(o, e[t]);
1568
- }, "updateVal"),
1569
- updateBounds: /* @__PURE__ */ u(function(e, t, o, s) {
1570
- const a = this;
1571
- let i = 0;
1572
- function n(h) {
1573
- return /* @__PURE__ */ u(function(r) {
1574
- i++;
1575
- const f = a.sequenceItems.length - i + 1;
1576
- a.updateVal(r, "starty", t - f * c.boxMargin, Math.min), a.updateVal(r, "stopy", s + f * c.boxMargin, Math.max), a.updateVal(x.data, "startx", e - f * c.boxMargin, Math.min), a.updateVal(x.data, "stopx", o + f * c.boxMargin, Math.max), h !== "activation" && (a.updateVal(r, "startx", e - f * c.boxMargin, Math.min), a.updateVal(r, "stopx", o + f * c.boxMargin, Math.max), a.updateVal(x.data, "starty", t - f * c.boxMargin, Math.min), a.updateVal(x.data, "stopy", s + f * c.boxMargin, Math.max));
1577
- }, "updateItemBounds");
1578
- }
1579
- u(n, "updateFn"), this.sequenceItems.forEach(n()), this.activations.forEach(n("activation"));
1580
- }, "updateBounds"),
1581
- insert: /* @__PURE__ */ u(function(e, t, o, s) {
1582
- const a = I.getMin(e, o), i = I.getMax(e, o), n = I.getMin(t, s), h = I.getMax(t, s);
1583
- this.updateVal(x.data, "startx", a, Math.min), this.updateVal(x.data, "starty", n, Math.min), this.updateVal(x.data, "stopx", i, Math.max), this.updateVal(x.data, "stopy", h, Math.max), this.updateBounds(a, n, i, h);
1584
- }, "insert"),
1585
- newActivation: /* @__PURE__ */ u(function(e, t, o) {
1586
- const s = o.get(e.from), a = kt(e.from).length || 0, i = s.x + s.width / 2 + (a - 1) * c.activationWidth / 2;
1587
- this.activations.push({
1588
- startx: i,
1589
- starty: this.verticalPos + 2,
1590
- stopx: i + c.activationWidth,
1591
- stopy: void 0,
1592
- actor: e.from,
1593
- anchored: O.anchorElement(t)
1594
- });
1595
- }, "newActivation"),
1596
- endActivation: /* @__PURE__ */ u(function(e) {
1597
- const t = this.activations.map(function(o) {
1598
- return o.actor;
1599
- }).lastIndexOf(e.from);
1600
- return this.activations.splice(t, 1)[0];
1601
- }, "endActivation"),
1602
- createLoop: /* @__PURE__ */ u(function(e = { message: void 0, wrap: !1, width: void 0 }, t) {
1603
- return {
1604
- startx: void 0,
1605
- starty: this.verticalPos,
1606
- stopx: void 0,
1607
- stopy: void 0,
1608
- title: e.message,
1609
- wrap: e.wrap,
1610
- width: e.width,
1611
- height: 0,
1612
- fill: t
1613
- };
1614
- }, "createLoop"),
1615
- newLoop: /* @__PURE__ */ u(function(e = { message: void 0, wrap: !1, width: void 0 }, t) {
1616
- this.sequenceItems.push(this.createLoop(e, t));
1617
- }, "newLoop"),
1618
- endLoop: /* @__PURE__ */ u(function() {
1619
- return this.sequenceItems.pop();
1620
- }, "endLoop"),
1621
- isLoopOverlap: /* @__PURE__ */ u(function() {
1622
- return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
1623
- }, "isLoopOverlap"),
1624
- addSectionToLoop: /* @__PURE__ */ u(function(e) {
1625
- const t = this.sequenceItems.pop();
1626
- t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({ y: x.getVerticalPos(), height: 0 }), t.sectionTitles.push(e), this.sequenceItems.push(t);
1627
- }, "addSectionToLoop"),
1628
- saveVerticalPos: /* @__PURE__ */ u(function() {
1629
- this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
1630
- }, "saveVerticalPos"),
1631
- resetVerticalPos: /* @__PURE__ */ u(function() {
1632
- this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
1633
- }, "resetVerticalPos"),
1634
- bumpVerticalPos: /* @__PURE__ */ u(function(e) {
1635
- this.verticalPos = this.verticalPos + e, this.data.stopy = I.getMax(this.data.stopy, this.verticalPos);
1636
- }, "bumpVerticalPos"),
1637
- getVerticalPos: /* @__PURE__ */ u(function() {
1638
- return this.verticalPos;
1639
- }, "getVerticalPos"),
1640
- getBounds: /* @__PURE__ */ u(function() {
1641
- return { bounds: this.data, models: this.models };
1642
- }, "getBounds")
1643
- }, rs = /* @__PURE__ */ u(async function(e, t) {
1644
- x.bumpVerticalPos(c.boxMargin), t.height = c.boxMargin, t.starty = x.getVerticalPos();
1645
- const o = At();
1646
- o.x = t.startx, o.y = t.starty, o.width = t.width || c.width, o.class = "note";
1647
- const s = e.append("g"), a = O.drawRect(s, o), i = Yt();
1648
- i.x = t.startx, i.y = t.starty, i.width = o.width, i.dy = "1em", i.text = t.message, i.class = "noteText", i.fontFamily = c.noteFontFamily, i.fontSize = c.noteFontSize, i.fontWeight = c.noteFontWeight, i.anchor = c.noteAlign, i.textMargin = c.noteMargin, i.valign = "center";
1649
- const n = ot(i.text) ? await Pt(s, i) : Et(s, i), h = Math.round(
1650
- n.map((d) => (d._groups || d)[0][0].getBBox().height).reduce((d, r) => d + r)
1651
- );
1652
- a.attr("height", h + 2 * c.noteMargin), t.height += h + 2 * c.noteMargin, x.bumpVerticalPos(h + 2 * c.noteMargin), t.stopy = t.starty + h + 2 * c.noteMargin, t.stopx = t.startx + o.width, x.insert(t.startx, t.starty, t.stopx, t.stopy), x.models.addNote(t);
1653
- }, "drawNote"), gt = /* @__PURE__ */ u((e) => ({
1654
- fontFamily: e.messageFontFamily,
1655
- fontSize: e.messageFontSize,
1656
- fontWeight: e.messageFontWeight
1657
- }), "messageFont"), xt = /* @__PURE__ */ u((e) => ({
1658
- fontFamily: e.noteFontFamily,
1659
- fontSize: e.noteFontSize,
1660
- fontWeight: e.noteFontWeight
1661
- }), "noteFont"), Bt = /* @__PURE__ */ u((e) => ({
1662
- fontFamily: e.actorFontFamily,
1663
- fontSize: e.actorFontSize,
1664
- fontWeight: e.actorFontWeight
1665
- }), "actorFont");
1666
- async function ie(e, t) {
1667
- x.bumpVerticalPos(10);
1668
- const { startx: o, stopx: s, message: a } = t, i = I.splitBreaks(a).length, n = ot(a), h = n ? await bt(a, $()) : Y.calculateTextDimensions(a, gt(c));
1669
- if (!n) {
1670
- const y = h.height / i;
1671
- t.height += y, x.bumpVerticalPos(y);
1672
- }
1673
- let d, r = h.height - 10;
1674
- const f = h.width;
1675
- if (o === s) {
1676
- d = x.getVerticalPos() + r, c.rightAngles || (r += c.boxMargin, d = x.getVerticalPos() + r), r += 30;
1677
- const y = I.getMax(f / 2, c.width / 2);
1678
- x.insert(
1679
- o - y,
1680
- x.getVerticalPos() - 10 + r,
1681
- s + y,
1682
- x.getVerticalPos() + 30 + r
1683
- );
1684
- } else
1685
- r += c.boxMargin, d = x.getVerticalPos() + r, x.insert(o, d - 10, s, d);
1686
- return x.bumpVerticalPos(r), t.height += r, t.stopy = t.starty + t.height, x.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), d;
1687
- }
1688
- u(ie, "boundMessage");
1689
- var is = /* @__PURE__ */ u(async function(e, t, o, s) {
1690
- const { startx: a, stopx: i, starty: n, message: h, type: d, sequenceIndex: r, sequenceVisible: f } = t, y = Y.calculateTextDimensions(h, gt(c)), g = Yt();
1691
- g.x = a, g.y = n + 10, g.width = i - a, g.class = "messageText", g.dy = "1em", g.text = h, g.fontFamily = c.messageFontFamily, g.fontSize = c.messageFontSize, g.fontWeight = c.messageFontWeight, g.anchor = c.messageAlign, g.valign = "center", g.textMargin = c.wrapPadding, g.tspan = !1, ot(g.text) ? await Pt(e, g, { startx: a, stopx: i, starty: o }) : Et(e, g);
1692
- const T = y.width;
1693
- let m;
1694
- a === i ? c.rightAngles ? m = e.append("path").attr(
1695
- "d",
1696
- `M ${a},${o} H ${a + I.getMax(c.width / 2, T / 2)} V ${o + 25} H ${a}`
1697
- ) : m = e.append("path").attr(
1698
- "d",
1699
- "M " + a + "," + o + " C " + (a + 60) + "," + (o - 10) + " " + (a + 60) + "," + (o + 30) + " " + a + "," + (o + 20)
1700
- ) : (m = e.append("line"), m.attr("x1", a), m.attr("y1", o), m.attr("x2", i), m.attr("y2", o)), d === s.db.LINETYPE.DOTTED || d === s.db.LINETYPE.DOTTED_CROSS || d === s.db.LINETYPE.DOTTED_POINT || d === s.db.LINETYPE.DOTTED_OPEN || d === s.db.LINETYPE.BIDIRECTIONAL_DOTTED ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
1701
- let v = "";
1702
- c.arrowMarkerAbsolute && (v = Se(!0)), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (d === s.db.LINETYPE.SOLID || d === s.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + v + "#arrowhead)"), (d === s.db.LINETYPE.BIDIRECTIONAL_SOLID || d === s.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (m.attr("marker-start", "url(" + v + "#arrowhead)"), m.attr("marker-end", "url(" + v + "#arrowhead)")), (d === s.db.LINETYPE.SOLID_POINT || d === s.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + v + "#filled-head)"), (d === s.db.LINETYPE.SOLID_CROSS || d === s.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + v + "#crosshead)"), (f || c.showSequenceNumbers) && ((d === s.db.LINETYPE.BIDIRECTIONAL_SOLID || d === s.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (a < i ? m.attr("x1", a + 2 * 6) : m.attr("x1", a + 6)), e.append("line").attr("x1", a).attr("y1", o).attr("x2", a).attr("y2", o).attr("stroke-width", 0).attr("marker-start", "url(" + v + "#sequencenumber)"), e.append("text").attr("x", a).attr("y", o + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(r));
1703
- }, "drawMessage"), ns = /* @__PURE__ */ u(function(e, t, o, s, a, i, n) {
1704
- let h = 0, d = 0, r, f = 0;
1705
- for (const y of s) {
1706
- const g = t.get(y), T = g.box;
1707
- r && r != T && (n || x.models.addBox(r), d += c.boxMargin + r.margin), T && T != r && (n || (T.x = h + d, T.y = a), d += T.margin), g.width = g.width || c.width, g.height = I.getMax(g.height || c.height, c.height), g.margin = g.margin || c.actorMargin, f = I.getMax(f, g.height), o.get(g.name) && (d += g.width / 2), g.x = h + d, g.starty = x.getVerticalPos(), x.insert(g.x, a, g.x + g.width, g.height), h += g.width + d, g.box && (g.box.width = h + T.margin - g.box.x), d = g.margin, r = g.box, x.models.addActor(g);
1708
- }
1709
- r && !n && x.models.addBox(r), x.bumpVerticalPos(f);
1710
- }, "addActorRenderingData"), Vt = /* @__PURE__ */ u(async function(e, t, o, s) {
1711
- if (s) {
1712
- let a = 0;
1713
- x.bumpVerticalPos(c.boxMargin * 2);
1714
- for (const i of o) {
1715
- const n = t.get(i);
1716
- n.stopy || (n.stopy = x.getVerticalPos());
1717
- const h = await O.drawActor(e, n, c, !0);
1718
- a = I.getMax(a, h);
1719
- }
1720
- x.bumpVerticalPos(a + c.boxMargin);
1721
- } else
1722
- for (const a of o) {
1723
- const i = t.get(a);
1724
- await O.drawActor(e, i, c, !1);
1725
- }
1726
- }, "drawActors"), ne = /* @__PURE__ */ u(function(e, t, o, s) {
1727
- let a = 0, i = 0;
1728
- for (const n of o) {
1729
- const h = t.get(n), d = cs(h), r = O.drawPopup(
1730
- e,
1731
- h,
1732
- d,
1733
- c,
1734
- c.forceMenus,
1735
- s
1736
- );
1737
- r.height > a && (a = r.height), r.width + h.x > i && (i = r.width + h.x);
1738
- }
1739
- return { maxHeight: a, maxWidth: i };
1740
- }, "drawActorsPopup"), oe = /* @__PURE__ */ u(function(e) {
1741
- ve(c, e), e.fontFamily && (c.actorFontFamily = c.noteFontFamily = c.messageFontFamily = e.fontFamily), e.fontSize && (c.actorFontSize = c.noteFontSize = c.messageFontSize = e.fontSize), e.fontWeight && (c.actorFontWeight = c.noteFontWeight = c.messageFontWeight = e.fontWeight);
1742
- }, "setConf"), kt = /* @__PURE__ */ u(function(e) {
1743
- return x.activations.filter(function(t) {
1744
- return t.actor === e;
1745
- });
1746
- }, "actorActivations"), Jt = /* @__PURE__ */ u(function(e, t) {
1747
- const o = t.get(e), s = kt(e), a = s.reduce(
1748
- function(n, h) {
1749
- return I.getMin(n, h.startx);
1750
- },
1751
- o.x + o.width / 2 - 1
1752
- ), i = s.reduce(
1753
- function(n, h) {
1754
- return I.getMax(n, h.stopx);
1755
- },
1756
- o.x + o.width / 2 + 1
1757
- );
1758
- return [a, i];
1759
- }, "activationBounds");
1760
- function rt(e, t, o, s, a) {
1761
- x.bumpVerticalPos(o);
1762
- let i = s;
1763
- if (t.id && t.message && e[t.id]) {
1764
- const n = e[t.id].width, h = gt(c);
1765
- t.message = Y.wrapLabel(`[${t.message}]`, n - 2 * c.wrapPadding, h), t.width = n, t.wrap = !0;
1766
- const d = Y.calculateTextDimensions(t.message, h), r = I.getMax(d.height, c.labelBoxHeight);
1767
- i = s + r, G.debug(`${r} - ${t.message}`);
1768
- }
1769
- a(t), x.bumpVerticalPos(i);
1770
- }
1771
- u(rt, "adjustLoopHeightForWrap");
1772
- function ce(e, t, o, s, a, i, n) {
1773
- function h(r, f) {
1774
- r.x < a.get(e.from).x ? (x.insert(
1775
- t.stopx - f,
1776
- t.starty,
1777
- t.startx,
1778
- t.stopy + r.height / 2 + c.noteMargin
1779
- ), t.stopx = t.stopx + f) : (x.insert(
1780
- t.startx,
1781
- t.starty,
1782
- t.stopx + f,
1783
- t.stopy + r.height / 2 + c.noteMargin
1784
- ), t.stopx = t.stopx - f);
1785
- }
1786
- u(h, "receiverAdjustment");
1787
- function d(r, f) {
1788
- r.x < a.get(e.to).x ? (x.insert(
1789
- t.startx - f,
1790
- t.starty,
1791
- t.stopx,
1792
- t.stopy + r.height / 2 + c.noteMargin
1793
- ), t.startx = t.startx + f) : (x.insert(
1794
- t.stopx,
1795
- t.starty,
1796
- t.startx + f,
1797
- t.stopy + r.height / 2 + c.noteMargin
1798
- ), t.startx = t.startx - f);
1799
- }
1800
- if (u(d, "senderAdjustment"), i.get(e.to) == s) {
1801
- const r = a.get(e.to), f = r.type == "actor" ? ut / 2 + 3 : r.width / 2 + 3;
1802
- h(r, f), r.starty = o - r.height / 2, x.bumpVerticalPos(r.height / 2);
1803
- } else if (n.get(e.from) == s) {
1804
- const r = a.get(e.from);
1805
- if (c.mirrorActors) {
1806
- const f = r.type == "actor" ? ut / 2 : r.width / 2;
1807
- d(r, f);
1808
- }
1809
- r.stopy = o - r.height / 2, x.bumpVerticalPos(r.height / 2);
1810
- } else if (n.get(e.to) == s) {
1811
- const r = a.get(e.to);
1812
- if (c.mirrorActors) {
1813
- const f = r.type == "actor" ? ut / 2 + 3 : r.width / 2 + 3;
1814
- h(r, f);
1815
- }
1816
- r.stopy = o - r.height / 2, x.bumpVerticalPos(r.height / 2);
1817
- }
1818
- }
1819
- u(ce, "adjustCreatedDestroyedData");
1820
- var os = /* @__PURE__ */ u(async function(e, t, o, s) {
1821
- const { securityLevel: a, sequence: i } = $();
1822
- c = i;
1823
- let n;
1824
- a === "sandbox" && (n = Lt("#i" + t));
1825
- const h = a === "sandbox" ? Lt(n.nodes()[0].contentDocument.body) : Lt("body"), d = a === "sandbox" ? n.nodes()[0].contentDocument : document;
1826
- x.init(), G.debug(s.db);
1827
- const r = a === "sandbox" ? h.select(`[id="${t}"]`) : Lt(`[id="${t}"]`), f = s.db.getActors(), y = s.db.getCreatedActors(), g = s.db.getDestroyedActors(), T = s.db.getBoxes();
1828
- let m = s.db.getActorKeys();
1829
- const v = s.db.getMessages(), A = s.db.getDiagramTitle(), C = s.db.hasAtLeastOneBox(), S = s.db.hasAtLeastOneBoxWithTitle(), B = await le(f, v, s);
1830
- if (c.height = await he(f, B, T), O.insertComputerIcon(r), O.insertDatabaseIcon(r), O.insertClockIcon(r), C && (x.bumpVerticalPos(c.boxMargin), S && x.bumpVerticalPos(T[0].textMaxHeight)), c.hideUnusedParticipants === !0) {
1831
- const E = /* @__PURE__ */ new Set();
1832
- v.forEach((_) => {
1833
- E.add(_.from), E.add(_.to);
1834
- }), m = m.filter((_) => E.has(_));
1835
- }
1836
- ns(r, f, y, m, 0, v, !1);
1837
- const D = await ds(v, f, B, s);
1838
- O.insertArrowHead(r), O.insertArrowCrossHead(r), O.insertArrowFilledHead(r), O.insertSequenceNumber(r);
1839
- function F(E, _) {
1840
- const Z = x.endActivation(E);
1841
- Z.starty + 18 > _ && (Z.starty = _ - 6, _ += 12), O.drawActivation(
1842
- r,
1843
- Z,
1844
- _,
1845
- c,
1846
- kt(E.from).length
1847
- ), x.insert(Z.startx, _ - 10, Z.stopx, _);
1848
- }
1849
- u(F, "activeEnd");
1850
- let q = 1, X = 1;
1851
- const tt = [], z = [];
1852
- let H = 0;
1853
- for (const E of v) {
1854
- let _, Z, at;
1855
- switch (E.type) {
1856
- case s.db.LINETYPE.NOTE:
1857
- x.resetVerticalPos(), Z = E.noteModel, await rs(r, Z);
1858
- break;
1859
- case s.db.LINETYPE.ACTIVE_START:
1860
- x.newActivation(E, r, f);
1861
- break;
1862
- case s.db.LINETYPE.ACTIVE_END:
1863
- F(E, x.getVerticalPos());
1864
- break;
1865
- case s.db.LINETYPE.LOOP_START:
1866
- rt(
1867
- D,
1868
- E,
1869
- c.boxMargin,
1870
- c.boxMargin + c.boxTextMargin,
1871
- (k) => x.newLoop(k)
1872
- );
1873
- break;
1874
- case s.db.LINETYPE.LOOP_END:
1875
- _ = x.endLoop(), await O.drawLoop(r, _, "loop", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1876
- break;
1877
- case s.db.LINETYPE.RECT_START:
1878
- rt(
1879
- D,
1880
- E,
1881
- c.boxMargin,
1882
- c.boxMargin,
1883
- (k) => x.newLoop(void 0, k.message)
1884
- );
1885
- break;
1886
- case s.db.LINETYPE.RECT_END:
1887
- _ = x.endLoop(), z.push(_), x.models.addLoop(_), x.bumpVerticalPos(_.stopy - x.getVerticalPos());
1888
- break;
1889
- case s.db.LINETYPE.OPT_START:
1890
- rt(
1891
- D,
1892
- E,
1893
- c.boxMargin,
1894
- c.boxMargin + c.boxTextMargin,
1895
- (k) => x.newLoop(k)
1896
- );
1897
- break;
1898
- case s.db.LINETYPE.OPT_END:
1899
- _ = x.endLoop(), await O.drawLoop(r, _, "opt", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1900
- break;
1901
- case s.db.LINETYPE.ALT_START:
1902
- rt(
1903
- D,
1904
- E,
1905
- c.boxMargin,
1906
- c.boxMargin + c.boxTextMargin,
1907
- (k) => x.newLoop(k)
1908
- );
1909
- break;
1910
- case s.db.LINETYPE.ALT_ELSE:
1911
- rt(
1912
- D,
1913
- E,
1914
- c.boxMargin + c.boxTextMargin,
1915
- c.boxMargin,
1916
- (k) => x.addSectionToLoop(k)
1917
- );
1918
- break;
1919
- case s.db.LINETYPE.ALT_END:
1920
- _ = x.endLoop(), await O.drawLoop(r, _, "alt", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1921
- break;
1922
- case s.db.LINETYPE.PAR_START:
1923
- case s.db.LINETYPE.PAR_OVER_START:
1924
- rt(
1925
- D,
1926
- E,
1927
- c.boxMargin,
1928
- c.boxMargin + c.boxTextMargin,
1929
- (k) => x.newLoop(k)
1930
- ), x.saveVerticalPos();
1931
- break;
1932
- case s.db.LINETYPE.PAR_AND:
1933
- rt(
1934
- D,
1935
- E,
1936
- c.boxMargin + c.boxTextMargin,
1937
- c.boxMargin,
1938
- (k) => x.addSectionToLoop(k)
1939
- );
1940
- break;
1941
- case s.db.LINETYPE.PAR_END:
1942
- _ = x.endLoop(), await O.drawLoop(r, _, "par", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1943
- break;
1944
- case s.db.LINETYPE.AUTONUMBER:
1945
- q = E.message.start || q, X = E.message.step || X, E.message.visible ? s.db.enableSequenceNumbers() : s.db.disableSequenceNumbers();
1946
- break;
1947
- case s.db.LINETYPE.CRITICAL_START:
1948
- rt(
1949
- D,
1950
- E,
1951
- c.boxMargin,
1952
- c.boxMargin + c.boxTextMargin,
1953
- (k) => x.newLoop(k)
1954
- );
1955
- break;
1956
- case s.db.LINETYPE.CRITICAL_OPTION:
1957
- rt(
1958
- D,
1959
- E,
1960
- c.boxMargin + c.boxTextMargin,
1961
- c.boxMargin,
1962
- (k) => x.addSectionToLoop(k)
1963
- );
1964
- break;
1965
- case s.db.LINETYPE.CRITICAL_END:
1966
- _ = x.endLoop(), await O.drawLoop(r, _, "critical", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1967
- break;
1968
- case s.db.LINETYPE.BREAK_START:
1969
- rt(
1970
- D,
1971
- E,
1972
- c.boxMargin,
1973
- c.boxMargin + c.boxTextMargin,
1974
- (k) => x.newLoop(k)
1975
- );
1976
- break;
1977
- case s.db.LINETYPE.BREAK_END:
1978
- _ = x.endLoop(), await O.drawLoop(r, _, "break", c), x.bumpVerticalPos(_.stopy - x.getVerticalPos()), x.models.addLoop(_);
1979
- break;
1980
- default:
1981
- try {
1982
- at = E.msgModel, at.starty = x.getVerticalPos(), at.sequenceIndex = q, at.sequenceVisible = s.db.showSequenceNumbers();
1983
- const k = await ie(r, at);
1984
- ce(
1985
- E,
1986
- at,
1987
- k,
1988
- H,
1989
- f,
1990
- y,
1991
- g
1992
- ), tt.push({ messageModel: at, lineStartY: k }), x.models.addMessage(at);
1993
- } catch (k) {
1994
- G.error("error while drawing message", k);
1995
- }
1996
- }
1997
- [
1998
- s.db.LINETYPE.SOLID_OPEN,
1999
- s.db.LINETYPE.DOTTED_OPEN,
2000
- s.db.LINETYPE.SOLID,
2001
- s.db.LINETYPE.DOTTED,
2002
- s.db.LINETYPE.SOLID_CROSS,
2003
- s.db.LINETYPE.DOTTED_CROSS,
2004
- s.db.LINETYPE.SOLID_POINT,
2005
- s.db.LINETYPE.DOTTED_POINT,
2006
- s.db.LINETYPE.BIDIRECTIONAL_SOLID,
2007
- s.db.LINETYPE.BIDIRECTIONAL_DOTTED
2008
- ].includes(E.type) && (q = q + X), H++;
2009
- }
2010
- G.debug("createdActors", y), G.debug("destroyedActors", g), await Vt(r, f, m, !1);
2011
- for (const E of tt)
2012
- await is(r, E.messageModel, E.lineStartY, s);
2013
- c.mirrorActors && await Vt(r, f, m, !0), z.forEach((E) => O.drawBackgroundRect(r, E)), se(r, f, m, c);
2014
- for (const E of x.models.boxes)
2015
- E.height = x.getVerticalPos() - E.y, x.insert(E.x, E.y, E.x + E.width, E.height), E.startx = E.x, E.starty = E.y, E.stopx = E.startx + E.width, E.stopy = E.starty + E.height, E.stroke = "rgb(0,0,0, 0.5)", O.drawBox(r, E, c);
2016
- C && x.bumpVerticalPos(c.boxMargin);
2017
- const W = ne(r, f, m, d), { bounds: M } = x.getBounds();
2018
- M.startx === void 0 && (M.startx = 0), M.starty === void 0 && (M.starty = 0), M.stopx === void 0 && (M.stopx = 0), M.stopy === void 0 && (M.stopy = 0);
2019
- let J = M.stopy - M.starty;
2020
- J < W.maxHeight && (J = W.maxHeight);
2021
- let U = J + 2 * c.diagramMarginY;
2022
- c.mirrorActors && (U = U - c.boxMargin + c.bottomMarginAdj);
2023
- let Q = M.stopx - M.startx;
2024
- Q < W.maxWidth && (Q = W.maxWidth);
2025
- const et = Q + 2 * c.diagramMarginX;
2026
- A && r.append("text").text(A).attr("x", (M.stopx - M.startx) / 2 - 2 * c.diagramMarginX).attr("y", -25), we(r, U, et, c.useMaxWidth);
2027
- const N = A ? 40 : 0;
2028
- r.attr(
2029
- "viewBox",
2030
- M.startx - c.diagramMarginX + " -" + (c.diagramMarginY + N) + " " + et + " " + (U + N)
2031
- ), G.debug("models:", x.models);
2032
- }, "draw");
2033
- async function le(e, t, o) {
2034
- const s = {};
2035
- for (const a of t)
2036
- if (e.get(a.to) && e.get(a.from)) {
2037
- const i = e.get(a.to);
2038
- if (a.placement === o.db.PLACEMENT.LEFTOF && !i.prevActor || a.placement === o.db.PLACEMENT.RIGHTOF && !i.nextActor)
2039
- continue;
2040
- const n = a.placement !== void 0, h = !n, d = n ? xt(c) : gt(c), r = a.wrap ? Y.wrapLabel(a.message, c.width - 2 * c.wrapPadding, d) : a.message, y = (ot(r) ? await bt(a.message, $()) : Y.calculateTextDimensions(r, d)).width + 2 * c.wrapPadding;
2041
- h && a.from === i.nextActor ? s[a.to] = I.getMax(
2042
- s[a.to] || 0,
2043
- y
2044
- ) : h && a.from === i.prevActor ? s[a.from] = I.getMax(
2045
- s[a.from] || 0,
2046
- y
2047
- ) : h && a.from === a.to ? (s[a.from] = I.getMax(
2048
- s[a.from] || 0,
2049
- y / 2
2050
- ), s[a.to] = I.getMax(
2051
- s[a.to] || 0,
2052
- y / 2
2053
- )) : a.placement === o.db.PLACEMENT.RIGHTOF ? s[a.from] = I.getMax(
2054
- s[a.from] || 0,
2055
- y
2056
- ) : a.placement === o.db.PLACEMENT.LEFTOF ? s[i.prevActor] = I.getMax(
2057
- s[i.prevActor] || 0,
2058
- y
2059
- ) : a.placement === o.db.PLACEMENT.OVER && (i.prevActor && (s[i.prevActor] = I.getMax(
2060
- s[i.prevActor] || 0,
2061
- y / 2
2062
- )), i.nextActor && (s[a.from] = I.getMax(
2063
- s[a.from] || 0,
2064
- y / 2
2065
- )));
2066
- }
2067
- return G.debug("maxMessageWidthPerActor:", s), s;
2068
- }
2069
- u(le, "getMaxMessageWidthPerActor");
2070
- var cs = /* @__PURE__ */ u(function(e) {
2071
- let t = 0;
2072
- const o = Bt(c);
2073
- for (const s in e.links) {
2074
- const i = Y.calculateTextDimensions(s, o).width + 2 * c.wrapPadding + 2 * c.boxMargin;
2075
- t < i && (t = i);
2076
- }
2077
- return t;
2078
- }, "getRequiredPopupWidth");
2079
- async function he(e, t, o) {
2080
- let s = 0;
2081
- for (const i of e.keys()) {
2082
- const n = e.get(i);
2083
- n.wrap && (n.description = Y.wrapLabel(
2084
- n.description,
2085
- c.width - 2 * c.wrapPadding,
2086
- Bt(c)
2087
- ));
2088
- const h = ot(n.description) ? await bt(n.description, $()) : Y.calculateTextDimensions(n.description, Bt(c));
2089
- n.width = n.wrap ? c.width : I.getMax(c.width, h.width + 2 * c.wrapPadding), n.height = n.wrap ? I.getMax(h.height, c.height) : c.height, s = I.getMax(s, n.height);
2090
- }
2091
- for (const i in t) {
2092
- const n = e.get(i);
2093
- if (!n)
2094
- continue;
2095
- const h = e.get(n.nextActor);
2096
- if (!h) {
2097
- const y = t[i] + c.actorMargin - n.width / 2;
2098
- n.margin = I.getMax(y, c.actorMargin);
2099
- continue;
2100
- }
2101
- const r = t[i] + c.actorMargin - n.width / 2 - h.width / 2;
2102
- n.margin = I.getMax(r, c.actorMargin);
2103
- }
2104
- let a = 0;
2105
- return o.forEach((i) => {
2106
- const n = gt(c);
2107
- let h = i.actorKeys.reduce((f, y) => f += e.get(y).width + (e.get(y).margin || 0), 0);
2108
- h -= 2 * c.boxTextMargin, i.wrap && (i.name = Y.wrapLabel(i.name, h - 2 * c.wrapPadding, n));
2109
- const d = Y.calculateTextDimensions(i.name, n);
2110
- a = I.getMax(d.height, a);
2111
- const r = I.getMax(h, d.width + 2 * c.wrapPadding);
2112
- if (i.margin = c.boxTextMargin, h < r) {
2113
- const f = (r - h) / 2;
2114
- i.margin += f;
2115
- }
2116
- }), o.forEach((i) => i.textMaxHeight = a), I.getMax(s, c.height);
2117
- }
2118
- u(he, "calculateActorMargins");
2119
- var ls = /* @__PURE__ */ u(async function(e, t, o) {
2120
- const s = t.get(e.from), a = t.get(e.to), i = s.x, n = a.x, h = e.wrap && e.message;
2121
- let d = ot(e.message) ? await bt(e.message, $()) : Y.calculateTextDimensions(
2122
- h ? Y.wrapLabel(e.message, c.width, xt(c)) : e.message,
2123
- xt(c)
2124
- );
2125
- const r = {
2126
- width: h ? c.width : I.getMax(c.width, d.width + 2 * c.noteMargin),
2127
- height: 0,
2128
- startx: s.x,
2129
- stopx: 0,
2130
- starty: 0,
2131
- stopy: 0,
2132
- message: e.message
2133
- };
2134
- return e.placement === o.db.PLACEMENT.RIGHTOF ? (r.width = h ? I.getMax(c.width, d.width) : I.getMax(
2135
- s.width / 2 + a.width / 2,
2136
- d.width + 2 * c.noteMargin
2137
- ), r.startx = i + (s.width + c.actorMargin) / 2) : e.placement === o.db.PLACEMENT.LEFTOF ? (r.width = h ? I.getMax(c.width, d.width + 2 * c.noteMargin) : I.getMax(
2138
- s.width / 2 + a.width / 2,
2139
- d.width + 2 * c.noteMargin
2140
- ), r.startx = i - r.width + (s.width - c.actorMargin) / 2) : e.to === e.from ? (d = Y.calculateTextDimensions(
2141
- h ? Y.wrapLabel(e.message, I.getMax(c.width, s.width), xt(c)) : e.message,
2142
- xt(c)
2143
- ), r.width = h ? I.getMax(c.width, s.width) : I.getMax(s.width, c.width, d.width + 2 * c.noteMargin), r.startx = i + (s.width - r.width) / 2) : (r.width = Math.abs(i + s.width / 2 - (n + a.width / 2)) + c.actorMargin, r.startx = i < n ? i + s.width / 2 - c.actorMargin / 2 : n + a.width / 2 - c.actorMargin / 2), h && (r.message = Y.wrapLabel(
2144
- e.message,
2145
- r.width - 2 * c.wrapPadding,
2146
- xt(c)
2147
- )), G.debug(
2148
- `NM:[${r.startx},${r.stopx},${r.starty},${r.stopy}:${r.width},${r.height}=${e.message}]`
2149
- ), r;
2150
- }, "buildNoteModel"), hs = /* @__PURE__ */ u(function(e, t, o) {
2151
- if (![
2152
- o.db.LINETYPE.SOLID_OPEN,
2153
- o.db.LINETYPE.DOTTED_OPEN,
2154
- o.db.LINETYPE.SOLID,
2155
- o.db.LINETYPE.DOTTED,
2156
- o.db.LINETYPE.SOLID_CROSS,
2157
- o.db.LINETYPE.DOTTED_CROSS,
2158
- o.db.LINETYPE.SOLID_POINT,
2159
- o.db.LINETYPE.DOTTED_POINT,
2160
- o.db.LINETYPE.BIDIRECTIONAL_SOLID,
2161
- o.db.LINETYPE.BIDIRECTIONAL_DOTTED
2162
- ].includes(e.type))
2163
- return {};
2164
- const [s, a] = Jt(e.from, t), [i, n] = Jt(e.to, t), h = s <= i;
2165
- let d = h ? a : s, r = h ? i : n;
2166
- const f = Math.abs(i - n) > 2, y = /* @__PURE__ */ u((v) => h ? -v : v, "adjustValue");
2167
- e.from === e.to ? r = d : (e.activate && !f && (r += y(c.activationWidth / 2 - 1)), [o.db.LINETYPE.SOLID_OPEN, o.db.LINETYPE.DOTTED_OPEN].includes(e.type) || (r += y(3)), [o.db.LINETYPE.BIDIRECTIONAL_SOLID, o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(
2168
- e.type
2169
- ) && (d -= y(3)));
2170
- const g = [s, a, i, n], T = Math.abs(d - r);
2171
- e.wrap && e.message && (e.message = Y.wrapLabel(
2172
- e.message,
2173
- I.getMax(T + 2 * c.wrapPadding, c.width),
2174
- gt(c)
2175
- ));
2176
- const m = Y.calculateTextDimensions(e.message, gt(c));
2177
- return {
2178
- width: I.getMax(
2179
- e.wrap ? 0 : m.width + 2 * c.wrapPadding,
2180
- T + 2 * c.wrapPadding,
2181
- c.width
2182
- ),
2183
- height: 0,
2184
- startx: d,
2185
- stopx: r,
2186
- starty: 0,
2187
- stopy: 0,
2188
- message: e.message,
2189
- type: e.type,
2190
- wrap: e.wrap,
2191
- fromBounds: Math.min.apply(null, g),
2192
- toBounds: Math.max.apply(null, g)
2193
- };
2194
- }, "buildMessageModel"), ds = /* @__PURE__ */ u(async function(e, t, o, s) {
2195
- const a = {}, i = [];
2196
- let n, h, d;
2197
- for (const r of e) {
2198
- switch (r.type) {
2199
- case s.db.LINETYPE.LOOP_START:
2200
- case s.db.LINETYPE.ALT_START:
2201
- case s.db.LINETYPE.OPT_START:
2202
- case s.db.LINETYPE.PAR_START:
2203
- case s.db.LINETYPE.PAR_OVER_START:
2204
- case s.db.LINETYPE.CRITICAL_START:
2205
- case s.db.LINETYPE.BREAK_START:
2206
- i.push({
2207
- id: r.id,
2208
- msg: r.message,
2209
- from: Number.MAX_SAFE_INTEGER,
2210
- to: Number.MIN_SAFE_INTEGER,
2211
- width: 0
2212
- });
2213
- break;
2214
- case s.db.LINETYPE.ALT_ELSE:
2215
- case s.db.LINETYPE.PAR_AND:
2216
- case s.db.LINETYPE.CRITICAL_OPTION:
2217
- r.message && (n = i.pop(), a[n.id] = n, a[r.id] = n, i.push(n));
2218
- break;
2219
- case s.db.LINETYPE.LOOP_END:
2220
- case s.db.LINETYPE.ALT_END:
2221
- case s.db.LINETYPE.OPT_END:
2222
- case s.db.LINETYPE.PAR_END:
2223
- case s.db.LINETYPE.CRITICAL_END:
2224
- case s.db.LINETYPE.BREAK_END:
2225
- n = i.pop(), a[n.id] = n;
2226
- break;
2227
- case s.db.LINETYPE.ACTIVE_START:
2228
- {
2229
- const y = t.get(r.from ? r.from : r.to.actor), g = kt(r.from ? r.from : r.to.actor).length, T = y.x + y.width / 2 + (g - 1) * c.activationWidth / 2, m = {
2230
- startx: T,
2231
- stopx: T + c.activationWidth,
2232
- actor: r.from,
2233
- enabled: !0
2234
- };
2235
- x.activations.push(m);
2236
- }
2237
- break;
2238
- case s.db.LINETYPE.ACTIVE_END:
2239
- {
2240
- const y = x.activations.map((g) => g.actor).lastIndexOf(r.from);
2241
- x.activations.splice(y, 1).splice(0, 1);
2242
- }
2243
- break;
2244
- }
2245
- r.placement !== void 0 ? (h = await ls(r, t, s), r.noteModel = h, i.forEach((y) => {
2246
- n = y, n.from = I.getMin(n.from, h.startx), n.to = I.getMax(n.to, h.startx + h.width), n.width = I.getMax(n.width, Math.abs(n.from - n.to)) - c.labelBoxWidth;
2247
- })) : (d = hs(r, t, s), r.msgModel = d, d.startx && d.stopx && i.length > 0 && i.forEach((y) => {
2248
- if (n = y, d.startx === d.stopx) {
2249
- const g = t.get(r.from), T = t.get(r.to);
2250
- n.from = I.getMin(
2251
- g.x - d.width / 2,
2252
- g.x - g.width / 2,
2253
- n.from
2254
- ), n.to = I.getMax(
2255
- T.x + d.width / 2,
2256
- T.x + g.width / 2,
2257
- n.to
2258
- ), n.width = I.getMax(n.width, Math.abs(n.to - n.from)) - c.labelBoxWidth;
2259
- } else
2260
- n.from = I.getMin(d.startx, n.from), n.to = I.getMax(d.stopx, n.to), n.width = I.getMax(n.width, d.width) - c.labelBoxWidth;
2261
- }));
2262
- }
2263
- return x.activations = [], G.debug("Loop type widths:", a), a;
2264
- }, "calculateLoopBounds"), ps = {
2265
- bounds: x,
2266
- drawActors: Vt,
2267
- drawActorsPopup: ne,
2268
- setConf: oe,
2269
- draw: os
2270
- }, xs = {
2271
- parser: Me,
2272
- get db() {
2273
- return new Oe();
2274
- },
2275
- renderer: ps,
2276
- styles: Ve,
2277
- init: /* @__PURE__ */ u((e) => {
2278
- e.sequence || (e.sequence = {}), e.wrap && (e.sequence.wrap = e.wrap, me({ sequence: { wrap: e.wrap } }));
2279
- }, "init")
2280
- };
2281
- export {
2282
- xs as diagram
2283
- };