research-copilot 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +190 -0
  3. package/app/build/icon.icns +0 -0
  4. package/app/build/icon.ico +0 -0
  5. package/app/build/icon.png +0 -0
  6. package/app/out/main/index.mjs +6719 -0
  7. package/app/out/preload/index.js +141 -0
  8. package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
  9. package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
  10. package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
  70. package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
  71. package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
  72. package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
  73. package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
  74. package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
  75. package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  76. package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
  77. package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
  78. package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
  79. package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  80. package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
  81. package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
  82. package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
  83. package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
  84. package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
  85. package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
  86. package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
  87. package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
  88. package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
  89. package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  90. package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  91. package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
  92. package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
  93. package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
  94. package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  95. package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
  96. package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
  97. package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  98. package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
  99. package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
  100. package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
  101. package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
  102. package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
  103. package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  104. package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
  105. package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
  106. package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
  107. package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
  108. package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
  109. package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
  110. package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
  111. package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
  112. package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
  113. package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
  114. package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
  115. package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
  116. package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
  117. package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  118. package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
  119. package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
  120. package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
  121. package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
  122. package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
  123. package/app/out/renderer/assets/http-BqypyemW.js +79 -0
  124. package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
  125. package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
  126. package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
  127. package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
  128. package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
  129. package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
  130. package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
  131. package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
  132. package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
  133. package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
  134. package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
  135. package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
  136. package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
  137. package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
  138. package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
  139. package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
  140. package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
  141. package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
  142. package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
  143. package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
  144. package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
  145. package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
  146. package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
  147. package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
  148. package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
  149. package/app/out/renderer/assets/index-fx307_f1.js +643 -0
  150. package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
  151. package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
  152. package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
  153. package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
  154. package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
  155. package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
  156. package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
  157. package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
  158. package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  159. package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
  160. package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  161. package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  162. package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
  163. package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
  164. package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
  165. package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
  166. package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
  167. package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
  168. package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
  169. package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
  170. package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  171. package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
  172. package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  173. package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
  174. package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
  175. package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
  176. package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
  177. package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
  178. package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
  179. package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
  180. package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
  181. package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  182. package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
  183. package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
  184. package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
  185. package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
  186. package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
  187. package/app/out/renderer/assets/r-V7nswm59.js +170 -0
  188. package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
  189. package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
  190. package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
  191. package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
  192. package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
  193. package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
  194. package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
  195. package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
  196. package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
  197. package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  198. package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  199. package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
  200. package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
  201. package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  202. package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
  203. package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
  204. package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
  205. package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
  206. package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
  207. package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
  208. package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
  209. package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
  210. package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
  211. package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
  212. package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
  213. package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
  214. package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  215. package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
  216. package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
  217. package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
  218. package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
  219. package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  220. package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  221. package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  222. package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
  223. package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  224. package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
  225. package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
  226. package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  227. package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
  228. package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
  229. package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
  230. package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
  231. package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
  232. package/app/out/renderer/index.html +13 -0
  233. package/app/out/skills/community-builtin/README.md +29 -0
  234. package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
  235. package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
  236. package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
  237. package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
  238. package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
  239. package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
  240. package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
  241. package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
  242. package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
  243. package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
  244. package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
  245. package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
  246. package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
  247. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
  248. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
  249. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
  250. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
  251. package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
  252. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
  253. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
  254. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
  255. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
  256. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
  257. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
  258. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
  259. package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
  260. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
  261. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
  262. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
  263. package/app/package.json +77 -0
  264. package/bin/cli.mjs +56 -0
  265. package/lib/README.md +145 -0
  266. package/lib/skills/_generated.ts +13 -0
  267. package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
  268. package/lib/skills/builtin/coding/SKILL.md +114 -0
  269. package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
  270. package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
  271. package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
  272. package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
  273. package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
  274. package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
  275. package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
  276. package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
  277. package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
  278. package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
  279. package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
  280. package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
  281. package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
  282. package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
  283. package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
  284. package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
  285. package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
  286. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  287. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  288. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  289. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  290. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  291. package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
  292. package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
  293. package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
  294. package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
  295. package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
  296. package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
  297. package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
  298. package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
  299. package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
  300. package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
  301. package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
  302. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  303. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  304. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  305. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  306. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  307. package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  308. package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
  309. package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
  310. package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  311. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  312. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  313. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  314. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  315. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  316. package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
  317. package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
  318. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
  319. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
  320. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
  321. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
  322. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
  323. package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  324. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
  325. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
  326. package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  327. package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
  328. package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  329. package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
  330. package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
  331. package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
  332. package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
  333. package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
  334. package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
  335. package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
  336. package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
  337. package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
  338. package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
  339. package/lib/skills/builtin/research-grants/SKILL.md +958 -0
  340. package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
  341. package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
  342. package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
  343. package/lib/skills/builtin/research-grants/references/README.md +285 -0
  344. package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
  345. package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
  346. package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
  347. package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
  348. package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
  349. package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
  350. package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
  351. package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
  352. package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
  353. package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
  354. package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
  355. package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
  356. package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
  357. package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
  358. package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
  359. package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
  360. package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
  361. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
  362. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
  363. package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
  364. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
  365. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
  366. package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
  367. package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
  368. package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
  369. package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
  370. package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
  371. package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
  372. package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
  373. package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
  374. package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
  375. package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
  376. package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
  377. package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
  378. package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
  379. package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
  380. package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
  381. package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
  382. package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
  383. package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
  384. package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
  385. package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
  386. package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
  387. package/lib/skills/builtin/seaborn/SKILL.md +674 -0
  388. package/lib/skills/builtin/seaborn/references/examples.md +822 -0
  389. package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
  390. package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
  391. package/lib/skills/data-analysis/SKILL.md +285 -0
  392. package/lib/skills/generate-skill-content.mjs +58 -0
  393. package/lib/skills/index.ts +34 -0
  394. package/lib/skills/loader.ts +452 -0
  395. package/package.json +62 -0
@@ -0,0 +1,2464 @@
1
+ import { m as setAccDescription, n as getAccDescription, o as getAccTitle, q as setAccTitle, r as getConfig, u as select, v as log$1, w as configureSvgSize, x as assignWithDepth$1, y as calculateTextWidth, z as sanitizeText$2, A as dist, B as wrapLabel, C as common$1, F as calculateTextHeight } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
+ import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-b86b1483-Bein03PD.js";
3
+ import "./index-BqDyyRCx.js";
4
+ var parser = function() {
5
+ var o = function(k, v, o2, l) {
6
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
7
+ ;
8
+ return o2;
9
+ }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74];
10
+ var parser2 = {
11
+ trace: function trace() {
12
+ },
13
+ yy: {},
14
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 },
15
+ terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
16
+ productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
17
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
18
+ var $0 = $$.length - 1;
19
+ switch (yystate) {
20
+ case 3:
21
+ yy.setDirection("TB");
22
+ break;
23
+ case 4:
24
+ yy.setDirection("BT");
25
+ break;
26
+ case 5:
27
+ yy.setDirection("RL");
28
+ break;
29
+ case 6:
30
+ yy.setDirection("LR");
31
+ break;
32
+ case 8:
33
+ case 9:
34
+ case 10:
35
+ case 11:
36
+ case 12:
37
+ yy.setC4Type($$[$0 - 3]);
38
+ break;
39
+ case 19:
40
+ yy.setTitle($$[$0].substring(6));
41
+ this.$ = $$[$0].substring(6);
42
+ break;
43
+ case 20:
44
+ yy.setAccDescription($$[$0].substring(15));
45
+ this.$ = $$[$0].substring(15);
46
+ break;
47
+ case 21:
48
+ this.$ = $$[$0].trim();
49
+ yy.setTitle(this.$);
50
+ break;
51
+ case 22:
52
+ case 23:
53
+ this.$ = $$[$0].trim();
54
+ yy.setAccDescription(this.$);
55
+ break;
56
+ case 28:
57
+ case 29:
58
+ $$[$0].splice(2, 0, "ENTERPRISE");
59
+ yy.addPersonOrSystemBoundary(...$$[$0]);
60
+ this.$ = $$[$0];
61
+ break;
62
+ case 30:
63
+ yy.addPersonOrSystemBoundary(...$$[$0]);
64
+ this.$ = $$[$0];
65
+ break;
66
+ case 31:
67
+ $$[$0].splice(2, 0, "CONTAINER");
68
+ yy.addContainerBoundary(...$$[$0]);
69
+ this.$ = $$[$0];
70
+ break;
71
+ case 32:
72
+ yy.addDeploymentNode("node", ...$$[$0]);
73
+ this.$ = $$[$0];
74
+ break;
75
+ case 33:
76
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
77
+ this.$ = $$[$0];
78
+ break;
79
+ case 34:
80
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
81
+ this.$ = $$[$0];
82
+ break;
83
+ case 35:
84
+ yy.popBoundaryParseStack();
85
+ break;
86
+ case 39:
87
+ yy.addPersonOrSystem("person", ...$$[$0]);
88
+ this.$ = $$[$0];
89
+ break;
90
+ case 40:
91
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
92
+ this.$ = $$[$0];
93
+ break;
94
+ case 41:
95
+ yy.addPersonOrSystem("system", ...$$[$0]);
96
+ this.$ = $$[$0];
97
+ break;
98
+ case 42:
99
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
100
+ this.$ = $$[$0];
101
+ break;
102
+ case 43:
103
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
104
+ this.$ = $$[$0];
105
+ break;
106
+ case 44:
107
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
108
+ this.$ = $$[$0];
109
+ break;
110
+ case 45:
111
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
112
+ this.$ = $$[$0];
113
+ break;
114
+ case 46:
115
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
116
+ this.$ = $$[$0];
117
+ break;
118
+ case 47:
119
+ yy.addContainer("container", ...$$[$0]);
120
+ this.$ = $$[$0];
121
+ break;
122
+ case 48:
123
+ yy.addContainer("container_db", ...$$[$0]);
124
+ this.$ = $$[$0];
125
+ break;
126
+ case 49:
127
+ yy.addContainer("container_queue", ...$$[$0]);
128
+ this.$ = $$[$0];
129
+ break;
130
+ case 50:
131
+ yy.addContainer("external_container", ...$$[$0]);
132
+ this.$ = $$[$0];
133
+ break;
134
+ case 51:
135
+ yy.addContainer("external_container_db", ...$$[$0]);
136
+ this.$ = $$[$0];
137
+ break;
138
+ case 52:
139
+ yy.addContainer("external_container_queue", ...$$[$0]);
140
+ this.$ = $$[$0];
141
+ break;
142
+ case 53:
143
+ yy.addComponent("component", ...$$[$0]);
144
+ this.$ = $$[$0];
145
+ break;
146
+ case 54:
147
+ yy.addComponent("component_db", ...$$[$0]);
148
+ this.$ = $$[$0];
149
+ break;
150
+ case 55:
151
+ yy.addComponent("component_queue", ...$$[$0]);
152
+ this.$ = $$[$0];
153
+ break;
154
+ case 56:
155
+ yy.addComponent("external_component", ...$$[$0]);
156
+ this.$ = $$[$0];
157
+ break;
158
+ case 57:
159
+ yy.addComponent("external_component_db", ...$$[$0]);
160
+ this.$ = $$[$0];
161
+ break;
162
+ case 58:
163
+ yy.addComponent("external_component_queue", ...$$[$0]);
164
+ this.$ = $$[$0];
165
+ break;
166
+ case 60:
167
+ yy.addRel("rel", ...$$[$0]);
168
+ this.$ = $$[$0];
169
+ break;
170
+ case 61:
171
+ yy.addRel("birel", ...$$[$0]);
172
+ this.$ = $$[$0];
173
+ break;
174
+ case 62:
175
+ yy.addRel("rel_u", ...$$[$0]);
176
+ this.$ = $$[$0];
177
+ break;
178
+ case 63:
179
+ yy.addRel("rel_d", ...$$[$0]);
180
+ this.$ = $$[$0];
181
+ break;
182
+ case 64:
183
+ yy.addRel("rel_l", ...$$[$0]);
184
+ this.$ = $$[$0];
185
+ break;
186
+ case 65:
187
+ yy.addRel("rel_r", ...$$[$0]);
188
+ this.$ = $$[$0];
189
+ break;
190
+ case 66:
191
+ yy.addRel("rel_b", ...$$[$0]);
192
+ this.$ = $$[$0];
193
+ break;
194
+ case 67:
195
+ $$[$0].splice(0, 1);
196
+ yy.addRel("rel", ...$$[$0]);
197
+ this.$ = $$[$0];
198
+ break;
199
+ case 68:
200
+ yy.updateElStyle("update_el_style", ...$$[$0]);
201
+ this.$ = $$[$0];
202
+ break;
203
+ case 69:
204
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
205
+ this.$ = $$[$0];
206
+ break;
207
+ case 70:
208
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
209
+ this.$ = $$[$0];
210
+ break;
211
+ case 71:
212
+ this.$ = [$$[$0]];
213
+ break;
214
+ case 72:
215
+ $$[$0].unshift($$[$0 - 1]);
216
+ this.$ = $$[$0];
217
+ break;
218
+ case 73:
219
+ case 75:
220
+ this.$ = $$[$0].trim();
221
+ break;
222
+ case 74:
223
+ let kv = {};
224
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
225
+ this.$ = kv;
226
+ break;
227
+ case 76:
228
+ this.$ = "";
229
+ break;
230
+ }
231
+ },
232
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])],
233
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
234
+ parseError: function parseError(str, hash) {
235
+ if (hash.recoverable) {
236
+ this.trace(str);
237
+ } else {
238
+ var error = new Error(str);
239
+ error.hash = hash;
240
+ throw error;
241
+ }
242
+ },
243
+ parse: function parse(input) {
244
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
245
+ var args = lstack.slice.call(arguments, 1);
246
+ var lexer2 = Object.create(this.lexer);
247
+ var sharedState = { yy: {} };
248
+ for (var k in this.yy) {
249
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
250
+ sharedState.yy[k] = this.yy[k];
251
+ }
252
+ }
253
+ lexer2.setInput(input, sharedState.yy);
254
+ sharedState.yy.lexer = lexer2;
255
+ sharedState.yy.parser = this;
256
+ if (typeof lexer2.yylloc == "undefined") {
257
+ lexer2.yylloc = {};
258
+ }
259
+ var yyloc = lexer2.yylloc;
260
+ lstack.push(yyloc);
261
+ var ranges = lexer2.options && lexer2.options.ranges;
262
+ if (typeof sharedState.yy.parseError === "function") {
263
+ this.parseError = sharedState.yy.parseError;
264
+ } else {
265
+ this.parseError = Object.getPrototypeOf(this).parseError;
266
+ }
267
+ function lex() {
268
+ var token;
269
+ token = tstack.pop() || lexer2.lex() || EOF;
270
+ if (typeof token !== "number") {
271
+ if (token instanceof Array) {
272
+ tstack = token;
273
+ token = tstack.pop();
274
+ }
275
+ token = self.symbols_[token] || token;
276
+ }
277
+ return token;
278
+ }
279
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
280
+ while (true) {
281
+ state = stack[stack.length - 1];
282
+ if (this.defaultActions[state]) {
283
+ action = this.defaultActions[state];
284
+ } else {
285
+ if (symbol === null || typeof symbol == "undefined") {
286
+ symbol = lex();
287
+ }
288
+ action = table[state] && table[state][symbol];
289
+ }
290
+ if (typeof action === "undefined" || !action.length || !action[0]) {
291
+ var errStr = "";
292
+ expected = [];
293
+ for (p in table[state]) {
294
+ if (this.terminals_[p] && p > TERROR) {
295
+ expected.push("'" + this.terminals_[p] + "'");
296
+ }
297
+ }
298
+ if (lexer2.showPosition) {
299
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
300
+ } else {
301
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
302
+ }
303
+ this.parseError(errStr, {
304
+ text: lexer2.match,
305
+ token: this.terminals_[symbol] || symbol,
306
+ line: lexer2.yylineno,
307
+ loc: yyloc,
308
+ expected
309
+ });
310
+ }
311
+ if (action[0] instanceof Array && action.length > 1) {
312
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
313
+ }
314
+ switch (action[0]) {
315
+ case 1:
316
+ stack.push(symbol);
317
+ vstack.push(lexer2.yytext);
318
+ lstack.push(lexer2.yylloc);
319
+ stack.push(action[1]);
320
+ symbol = null;
321
+ {
322
+ yyleng = lexer2.yyleng;
323
+ yytext = lexer2.yytext;
324
+ yylineno = lexer2.yylineno;
325
+ yyloc = lexer2.yylloc;
326
+ }
327
+ break;
328
+ case 2:
329
+ len = this.productions_[action[1]][1];
330
+ yyval.$ = vstack[vstack.length - len];
331
+ yyval._$ = {
332
+ first_line: lstack[lstack.length - (len || 1)].first_line,
333
+ last_line: lstack[lstack.length - 1].last_line,
334
+ first_column: lstack[lstack.length - (len || 1)].first_column,
335
+ last_column: lstack[lstack.length - 1].last_column
336
+ };
337
+ if (ranges) {
338
+ yyval._$.range = [
339
+ lstack[lstack.length - (len || 1)].range[0],
340
+ lstack[lstack.length - 1].range[1]
341
+ ];
342
+ }
343
+ r = this.performAction.apply(yyval, [
344
+ yytext,
345
+ yyleng,
346
+ yylineno,
347
+ sharedState.yy,
348
+ action[1],
349
+ vstack,
350
+ lstack
351
+ ].concat(args));
352
+ if (typeof r !== "undefined") {
353
+ return r;
354
+ }
355
+ if (len) {
356
+ stack = stack.slice(0, -1 * len * 2);
357
+ vstack = vstack.slice(0, -1 * len);
358
+ lstack = lstack.slice(0, -1 * len);
359
+ }
360
+ stack.push(this.productions_[action[1]][0]);
361
+ vstack.push(yyval.$);
362
+ lstack.push(yyval._$);
363
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
364
+ stack.push(newState);
365
+ break;
366
+ case 3:
367
+ return true;
368
+ }
369
+ }
370
+ return true;
371
+ }
372
+ };
373
+ var lexer = /* @__PURE__ */ function() {
374
+ var lexer2 = {
375
+ EOF: 1,
376
+ parseError: function parseError(str, hash) {
377
+ if (this.yy.parser) {
378
+ this.yy.parser.parseError(str, hash);
379
+ } else {
380
+ throw new Error(str);
381
+ }
382
+ },
383
+ // resets the lexer, sets new input
384
+ setInput: function(input, yy) {
385
+ this.yy = yy || this.yy || {};
386
+ this._input = input;
387
+ this._more = this._backtrack = this.done = false;
388
+ this.yylineno = this.yyleng = 0;
389
+ this.yytext = this.matched = this.match = "";
390
+ this.conditionStack = ["INITIAL"];
391
+ this.yylloc = {
392
+ first_line: 1,
393
+ first_column: 0,
394
+ last_line: 1,
395
+ last_column: 0
396
+ };
397
+ if (this.options.ranges) {
398
+ this.yylloc.range = [0, 0];
399
+ }
400
+ this.offset = 0;
401
+ return this;
402
+ },
403
+ // consumes and returns one char from the input
404
+ input: function() {
405
+ var ch = this._input[0];
406
+ this.yytext += ch;
407
+ this.yyleng++;
408
+ this.offset++;
409
+ this.match += ch;
410
+ this.matched += ch;
411
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
412
+ if (lines) {
413
+ this.yylineno++;
414
+ this.yylloc.last_line++;
415
+ } else {
416
+ this.yylloc.last_column++;
417
+ }
418
+ if (this.options.ranges) {
419
+ this.yylloc.range[1]++;
420
+ }
421
+ this._input = this._input.slice(1);
422
+ return ch;
423
+ },
424
+ // unshifts one char (or a string) into the input
425
+ unput: function(ch) {
426
+ var len = ch.length;
427
+ var lines = ch.split(/(?:\r\n?|\n)/g);
428
+ this._input = ch + this._input;
429
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
430
+ this.offset -= len;
431
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
432
+ this.match = this.match.substr(0, this.match.length - 1);
433
+ this.matched = this.matched.substr(0, this.matched.length - 1);
434
+ if (lines.length - 1) {
435
+ this.yylineno -= lines.length - 1;
436
+ }
437
+ var r = this.yylloc.range;
438
+ this.yylloc = {
439
+ first_line: this.yylloc.first_line,
440
+ last_line: this.yylineno + 1,
441
+ first_column: this.yylloc.first_column,
442
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
443
+ };
444
+ if (this.options.ranges) {
445
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
446
+ }
447
+ this.yyleng = this.yytext.length;
448
+ return this;
449
+ },
450
+ // When called from action, caches matched text and appends it on next action
451
+ more: function() {
452
+ this._more = true;
453
+ return this;
454
+ },
455
+ // 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.
456
+ reject: function() {
457
+ if (this.options.backtrack_lexer) {
458
+ this._backtrack = true;
459
+ } else {
460
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
461
+ text: "",
462
+ token: null,
463
+ line: this.yylineno
464
+ });
465
+ }
466
+ return this;
467
+ },
468
+ // retain first n characters of the match
469
+ less: function(n) {
470
+ this.unput(this.match.slice(n));
471
+ },
472
+ // displays already matched input, i.e. for error messages
473
+ pastInput: function() {
474
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
475
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
476
+ },
477
+ // displays upcoming input, i.e. for error messages
478
+ upcomingInput: function() {
479
+ var next = this.match;
480
+ if (next.length < 20) {
481
+ next += this._input.substr(0, 20 - next.length);
482
+ }
483
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
484
+ },
485
+ // displays the character position where the lexing error occurred, i.e. for error messages
486
+ showPosition: function() {
487
+ var pre = this.pastInput();
488
+ var c2 = new Array(pre.length + 1).join("-");
489
+ return pre + this.upcomingInput() + "\n" + c2 + "^";
490
+ },
491
+ // test the lexed token: return FALSE when not a match, otherwise return token
492
+ test_match: function(match, indexed_rule) {
493
+ var token, lines, backup;
494
+ if (this.options.backtrack_lexer) {
495
+ backup = {
496
+ yylineno: this.yylineno,
497
+ yylloc: {
498
+ first_line: this.yylloc.first_line,
499
+ last_line: this.last_line,
500
+ first_column: this.yylloc.first_column,
501
+ last_column: this.yylloc.last_column
502
+ },
503
+ yytext: this.yytext,
504
+ match: this.match,
505
+ matches: this.matches,
506
+ matched: this.matched,
507
+ yyleng: this.yyleng,
508
+ offset: this.offset,
509
+ _more: this._more,
510
+ _input: this._input,
511
+ yy: this.yy,
512
+ conditionStack: this.conditionStack.slice(0),
513
+ done: this.done
514
+ };
515
+ if (this.options.ranges) {
516
+ backup.yylloc.range = this.yylloc.range.slice(0);
517
+ }
518
+ }
519
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
520
+ if (lines) {
521
+ this.yylineno += lines.length;
522
+ }
523
+ this.yylloc = {
524
+ first_line: this.yylloc.last_line,
525
+ last_line: this.yylineno + 1,
526
+ first_column: this.yylloc.last_column,
527
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
528
+ };
529
+ this.yytext += match[0];
530
+ this.match += match[0];
531
+ this.matches = match;
532
+ this.yyleng = this.yytext.length;
533
+ if (this.options.ranges) {
534
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
535
+ }
536
+ this._more = false;
537
+ this._backtrack = false;
538
+ this._input = this._input.slice(match[0].length);
539
+ this.matched += match[0];
540
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
541
+ if (this.done && this._input) {
542
+ this.done = false;
543
+ }
544
+ if (token) {
545
+ return token;
546
+ } else if (this._backtrack) {
547
+ for (var k in backup) {
548
+ this[k] = backup[k];
549
+ }
550
+ return false;
551
+ }
552
+ return false;
553
+ },
554
+ // return next match in input
555
+ next: function() {
556
+ if (this.done) {
557
+ return this.EOF;
558
+ }
559
+ if (!this._input) {
560
+ this.done = true;
561
+ }
562
+ var token, match, tempMatch, index;
563
+ if (!this._more) {
564
+ this.yytext = "";
565
+ this.match = "";
566
+ }
567
+ var rules = this._currentRules();
568
+ for (var i = 0; i < rules.length; i++) {
569
+ tempMatch = this._input.match(this.rules[rules[i]]);
570
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
571
+ match = tempMatch;
572
+ index = i;
573
+ if (this.options.backtrack_lexer) {
574
+ token = this.test_match(tempMatch, rules[i]);
575
+ if (token !== false) {
576
+ return token;
577
+ } else if (this._backtrack) {
578
+ match = false;
579
+ continue;
580
+ } else {
581
+ return false;
582
+ }
583
+ } else if (!this.options.flex) {
584
+ break;
585
+ }
586
+ }
587
+ }
588
+ if (match) {
589
+ token = this.test_match(match, rules[index]);
590
+ if (token !== false) {
591
+ return token;
592
+ }
593
+ return false;
594
+ }
595
+ if (this._input === "") {
596
+ return this.EOF;
597
+ } else {
598
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
599
+ text: "",
600
+ token: null,
601
+ line: this.yylineno
602
+ });
603
+ }
604
+ },
605
+ // return next match that has a token
606
+ lex: function lex() {
607
+ var r = this.next();
608
+ if (r) {
609
+ return r;
610
+ } else {
611
+ return this.lex();
612
+ }
613
+ },
614
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
615
+ begin: function begin(condition) {
616
+ this.conditionStack.push(condition);
617
+ },
618
+ // pop the previously active lexer condition state off the condition stack
619
+ popState: function popState() {
620
+ var n = this.conditionStack.length - 1;
621
+ if (n > 0) {
622
+ return this.conditionStack.pop();
623
+ } else {
624
+ return this.conditionStack[0];
625
+ }
626
+ },
627
+ // produce the lexer rule set which is active for the currently active lexer condition state
628
+ _currentRules: function _currentRules() {
629
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
630
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
631
+ } else {
632
+ return this.conditions["INITIAL"].rules;
633
+ }
634
+ },
635
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
636
+ topState: function topState(n) {
637
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
638
+ if (n >= 0) {
639
+ return this.conditionStack[n];
640
+ } else {
641
+ return "INITIAL";
642
+ }
643
+ },
644
+ // alias for begin(condition)
645
+ pushState: function pushState(condition) {
646
+ this.begin(condition);
647
+ },
648
+ // return the number of states currently on the stack
649
+ stateStackSize: function stateStackSize() {
650
+ return this.conditionStack.length;
651
+ },
652
+ options: {},
653
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
654
+ switch ($avoiding_name_collisions) {
655
+ case 0:
656
+ return 6;
657
+ case 1:
658
+ return 7;
659
+ case 2:
660
+ return 8;
661
+ case 3:
662
+ return 9;
663
+ case 4:
664
+ return 22;
665
+ case 5:
666
+ return 23;
667
+ case 6:
668
+ this.begin("acc_title");
669
+ return 24;
670
+ case 7:
671
+ this.popState();
672
+ return "acc_title_value";
673
+ case 8:
674
+ this.begin("acc_descr");
675
+ return 26;
676
+ case 9:
677
+ this.popState();
678
+ return "acc_descr_value";
679
+ case 10:
680
+ this.begin("acc_descr_multiline");
681
+ break;
682
+ case 11:
683
+ this.popState();
684
+ break;
685
+ case 12:
686
+ return "acc_descr_multiline_value";
687
+ case 13:
688
+ break;
689
+ case 14:
690
+ c;
691
+ break;
692
+ case 15:
693
+ return 12;
694
+ case 16:
695
+ break;
696
+ case 17:
697
+ return 11;
698
+ case 18:
699
+ return 15;
700
+ case 19:
701
+ return 16;
702
+ case 20:
703
+ return 17;
704
+ case 21:
705
+ return 18;
706
+ case 22:
707
+ this.begin("person_ext");
708
+ return 45;
709
+ case 23:
710
+ this.begin("person");
711
+ return 44;
712
+ case 24:
713
+ this.begin("system_ext_queue");
714
+ return 51;
715
+ case 25:
716
+ this.begin("system_ext_db");
717
+ return 50;
718
+ case 26:
719
+ this.begin("system_ext");
720
+ return 49;
721
+ case 27:
722
+ this.begin("system_queue");
723
+ return 48;
724
+ case 28:
725
+ this.begin("system_db");
726
+ return 47;
727
+ case 29:
728
+ this.begin("system");
729
+ return 46;
730
+ case 30:
731
+ this.begin("boundary");
732
+ return 37;
733
+ case 31:
734
+ this.begin("enterprise_boundary");
735
+ return 34;
736
+ case 32:
737
+ this.begin("system_boundary");
738
+ return 36;
739
+ case 33:
740
+ this.begin("container_ext_queue");
741
+ return 57;
742
+ case 34:
743
+ this.begin("container_ext_db");
744
+ return 56;
745
+ case 35:
746
+ this.begin("container_ext");
747
+ return 55;
748
+ case 36:
749
+ this.begin("container_queue");
750
+ return 54;
751
+ case 37:
752
+ this.begin("container_db");
753
+ return 53;
754
+ case 38:
755
+ this.begin("container");
756
+ return 52;
757
+ case 39:
758
+ this.begin("container_boundary");
759
+ return 38;
760
+ case 40:
761
+ this.begin("component_ext_queue");
762
+ return 63;
763
+ case 41:
764
+ this.begin("component_ext_db");
765
+ return 62;
766
+ case 42:
767
+ this.begin("component_ext");
768
+ return 61;
769
+ case 43:
770
+ this.begin("component_queue");
771
+ return 60;
772
+ case 44:
773
+ this.begin("component_db");
774
+ return 59;
775
+ case 45:
776
+ this.begin("component");
777
+ return 58;
778
+ case 46:
779
+ this.begin("node");
780
+ return 39;
781
+ case 47:
782
+ this.begin("node");
783
+ return 39;
784
+ case 48:
785
+ this.begin("node_l");
786
+ return 40;
787
+ case 49:
788
+ this.begin("node_r");
789
+ return 41;
790
+ case 50:
791
+ this.begin("rel");
792
+ return 64;
793
+ case 51:
794
+ this.begin("birel");
795
+ return 65;
796
+ case 52:
797
+ this.begin("rel_u");
798
+ return 66;
799
+ case 53:
800
+ this.begin("rel_u");
801
+ return 66;
802
+ case 54:
803
+ this.begin("rel_d");
804
+ return 67;
805
+ case 55:
806
+ this.begin("rel_d");
807
+ return 67;
808
+ case 56:
809
+ this.begin("rel_l");
810
+ return 68;
811
+ case 57:
812
+ this.begin("rel_l");
813
+ return 68;
814
+ case 58:
815
+ this.begin("rel_r");
816
+ return 69;
817
+ case 59:
818
+ this.begin("rel_r");
819
+ return 69;
820
+ case 60:
821
+ this.begin("rel_b");
822
+ return 70;
823
+ case 61:
824
+ this.begin("rel_index");
825
+ return 71;
826
+ case 62:
827
+ this.begin("update_el_style");
828
+ return 72;
829
+ case 63:
830
+ this.begin("update_rel_style");
831
+ return 73;
832
+ case 64:
833
+ this.begin("update_layout_config");
834
+ return 74;
835
+ case 65:
836
+ return "EOF_IN_STRUCT";
837
+ case 66:
838
+ this.begin("attribute");
839
+ return "ATTRIBUTE_EMPTY";
840
+ case 67:
841
+ this.begin("attribute");
842
+ break;
843
+ case 68:
844
+ this.popState();
845
+ this.popState();
846
+ break;
847
+ case 69:
848
+ return 80;
849
+ case 70:
850
+ break;
851
+ case 71:
852
+ return 80;
853
+ case 72:
854
+ this.begin("string");
855
+ break;
856
+ case 73:
857
+ this.popState();
858
+ break;
859
+ case 74:
860
+ return "STR";
861
+ case 75:
862
+ this.begin("string_kv");
863
+ break;
864
+ case 76:
865
+ this.begin("string_kv_key");
866
+ return "STR_KEY";
867
+ case 77:
868
+ this.popState();
869
+ this.begin("string_kv_value");
870
+ break;
871
+ case 78:
872
+ return "STR_VALUE";
873
+ case 79:
874
+ this.popState();
875
+ this.popState();
876
+ break;
877
+ case 80:
878
+ return "STR";
879
+ case 81:
880
+ return "LBRACE";
881
+ case 82:
882
+ return "RBRACE";
883
+ case 83:
884
+ return "SPACE";
885
+ case 84:
886
+ return "EOL";
887
+ case 85:
888
+ return 14;
889
+ }
890
+ },
891
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
892
+ conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } }
893
+ };
894
+ return lexer2;
895
+ }();
896
+ parser2.lexer = lexer;
897
+ function Parser() {
898
+ this.yy = {};
899
+ }
900
+ Parser.prototype = parser2;
901
+ parser2.Parser = Parser;
902
+ return new Parser();
903
+ }();
904
+ parser.parser = parser;
905
+ const parser$1 = parser;
906
+ let c4ShapeArray = [];
907
+ let boundaryParseStack = [""];
908
+ let currentBoundaryParse = "global";
909
+ let parentBoundaryParse = "";
910
+ let boundaries = [
911
+ {
912
+ alias: "global",
913
+ label: { text: "global" },
914
+ type: { text: "global" },
915
+ tags: null,
916
+ link: null,
917
+ parentBoundary: ""
918
+ }
919
+ ];
920
+ let rels = [];
921
+ let title = "";
922
+ let wrapEnabled = false;
923
+ let c4ShapeInRow$1 = 4;
924
+ let c4BoundaryInRow$1 = 2;
925
+ var c4Type;
926
+ const getC4Type = function() {
927
+ return c4Type;
928
+ };
929
+ const setC4Type = function(c4TypeParam) {
930
+ let sanitizedText = sanitizeText$2(c4TypeParam, getConfig());
931
+ c4Type = sanitizedText;
932
+ };
933
+ const addRel = function(type, from, to, label, techn, descr, sprite, tags, link) {
934
+ if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {
935
+ return;
936
+ }
937
+ let rel = {};
938
+ const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
939
+ if (old) {
940
+ rel = old;
941
+ } else {
942
+ rels.push(rel);
943
+ }
944
+ rel.type = type;
945
+ rel.from = from;
946
+ rel.to = to;
947
+ rel.label = { text: label };
948
+ if (techn === void 0 || techn === null) {
949
+ rel.techn = { text: "" };
950
+ } else {
951
+ if (typeof techn === "object") {
952
+ let [key, value] = Object.entries(techn)[0];
953
+ rel[key] = { text: value };
954
+ } else {
955
+ rel.techn = { text: techn };
956
+ }
957
+ }
958
+ if (descr === void 0 || descr === null) {
959
+ rel.descr = { text: "" };
960
+ } else {
961
+ if (typeof descr === "object") {
962
+ let [key, value] = Object.entries(descr)[0];
963
+ rel[key] = { text: value };
964
+ } else {
965
+ rel.descr = { text: descr };
966
+ }
967
+ }
968
+ if (typeof sprite === "object") {
969
+ let [key, value] = Object.entries(sprite)[0];
970
+ rel[key] = value;
971
+ } else {
972
+ rel.sprite = sprite;
973
+ }
974
+ if (typeof tags === "object") {
975
+ let [key, value] = Object.entries(tags)[0];
976
+ rel[key] = value;
977
+ } else {
978
+ rel.tags = tags;
979
+ }
980
+ if (typeof link === "object") {
981
+ let [key, value] = Object.entries(link)[0];
982
+ rel[key] = value;
983
+ } else {
984
+ rel.link = link;
985
+ }
986
+ rel.wrap = autoWrap();
987
+ };
988
+ const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) {
989
+ if (alias === null || label === null) {
990
+ return;
991
+ }
992
+ let personOrSystem = {};
993
+ const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
994
+ if (old && alias === old.alias) {
995
+ personOrSystem = old;
996
+ } else {
997
+ personOrSystem.alias = alias;
998
+ c4ShapeArray.push(personOrSystem);
999
+ }
1000
+ if (label === void 0 || label === null) {
1001
+ personOrSystem.label = { text: "" };
1002
+ } else {
1003
+ personOrSystem.label = { text: label };
1004
+ }
1005
+ if (descr === void 0 || descr === null) {
1006
+ personOrSystem.descr = { text: "" };
1007
+ } else {
1008
+ if (typeof descr === "object") {
1009
+ let [key, value] = Object.entries(descr)[0];
1010
+ personOrSystem[key] = { text: value };
1011
+ } else {
1012
+ personOrSystem.descr = { text: descr };
1013
+ }
1014
+ }
1015
+ if (typeof sprite === "object") {
1016
+ let [key, value] = Object.entries(sprite)[0];
1017
+ personOrSystem[key] = value;
1018
+ } else {
1019
+ personOrSystem.sprite = sprite;
1020
+ }
1021
+ if (typeof tags === "object") {
1022
+ let [key, value] = Object.entries(tags)[0];
1023
+ personOrSystem[key] = value;
1024
+ } else {
1025
+ personOrSystem.tags = tags;
1026
+ }
1027
+ if (typeof link === "object") {
1028
+ let [key, value] = Object.entries(link)[0];
1029
+ personOrSystem[key] = value;
1030
+ } else {
1031
+ personOrSystem.link = link;
1032
+ }
1033
+ personOrSystem.typeC4Shape = { text: typeC4Shape };
1034
+ personOrSystem.parentBoundary = currentBoundaryParse;
1035
+ personOrSystem.wrap = autoWrap();
1036
+ };
1037
+ const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1038
+ if (alias === null || label === null) {
1039
+ return;
1040
+ }
1041
+ let container = {};
1042
+ const old = c4ShapeArray.find((container2) => container2.alias === alias);
1043
+ if (old && alias === old.alias) {
1044
+ container = old;
1045
+ } else {
1046
+ container.alias = alias;
1047
+ c4ShapeArray.push(container);
1048
+ }
1049
+ if (label === void 0 || label === null) {
1050
+ container.label = { text: "" };
1051
+ } else {
1052
+ container.label = { text: label };
1053
+ }
1054
+ if (techn === void 0 || techn === null) {
1055
+ container.techn = { text: "" };
1056
+ } else {
1057
+ if (typeof techn === "object") {
1058
+ let [key, value] = Object.entries(techn)[0];
1059
+ container[key] = { text: value };
1060
+ } else {
1061
+ container.techn = { text: techn };
1062
+ }
1063
+ }
1064
+ if (descr === void 0 || descr === null) {
1065
+ container.descr = { text: "" };
1066
+ } else {
1067
+ if (typeof descr === "object") {
1068
+ let [key, value] = Object.entries(descr)[0];
1069
+ container[key] = { text: value };
1070
+ } else {
1071
+ container.descr = { text: descr };
1072
+ }
1073
+ }
1074
+ if (typeof sprite === "object") {
1075
+ let [key, value] = Object.entries(sprite)[0];
1076
+ container[key] = value;
1077
+ } else {
1078
+ container.sprite = sprite;
1079
+ }
1080
+ if (typeof tags === "object") {
1081
+ let [key, value] = Object.entries(tags)[0];
1082
+ container[key] = value;
1083
+ } else {
1084
+ container.tags = tags;
1085
+ }
1086
+ if (typeof link === "object") {
1087
+ let [key, value] = Object.entries(link)[0];
1088
+ container[key] = value;
1089
+ } else {
1090
+ container.link = link;
1091
+ }
1092
+ container.wrap = autoWrap();
1093
+ container.typeC4Shape = { text: typeC4Shape };
1094
+ container.parentBoundary = currentBoundaryParse;
1095
+ };
1096
+ const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1097
+ if (alias === null || label === null) {
1098
+ return;
1099
+ }
1100
+ let component = {};
1101
+ const old = c4ShapeArray.find((component2) => component2.alias === alias);
1102
+ if (old && alias === old.alias) {
1103
+ component = old;
1104
+ } else {
1105
+ component.alias = alias;
1106
+ c4ShapeArray.push(component);
1107
+ }
1108
+ if (label === void 0 || label === null) {
1109
+ component.label = { text: "" };
1110
+ } else {
1111
+ component.label = { text: label };
1112
+ }
1113
+ if (techn === void 0 || techn === null) {
1114
+ component.techn = { text: "" };
1115
+ } else {
1116
+ if (typeof techn === "object") {
1117
+ let [key, value] = Object.entries(techn)[0];
1118
+ component[key] = { text: value };
1119
+ } else {
1120
+ component.techn = { text: techn };
1121
+ }
1122
+ }
1123
+ if (descr === void 0 || descr === null) {
1124
+ component.descr = { text: "" };
1125
+ } else {
1126
+ if (typeof descr === "object") {
1127
+ let [key, value] = Object.entries(descr)[0];
1128
+ component[key] = { text: value };
1129
+ } else {
1130
+ component.descr = { text: descr };
1131
+ }
1132
+ }
1133
+ if (typeof sprite === "object") {
1134
+ let [key, value] = Object.entries(sprite)[0];
1135
+ component[key] = value;
1136
+ } else {
1137
+ component.sprite = sprite;
1138
+ }
1139
+ if (typeof tags === "object") {
1140
+ let [key, value] = Object.entries(tags)[0];
1141
+ component[key] = value;
1142
+ } else {
1143
+ component.tags = tags;
1144
+ }
1145
+ if (typeof link === "object") {
1146
+ let [key, value] = Object.entries(link)[0];
1147
+ component[key] = value;
1148
+ } else {
1149
+ component.link = link;
1150
+ }
1151
+ component.wrap = autoWrap();
1152
+ component.typeC4Shape = { text: typeC4Shape };
1153
+ component.parentBoundary = currentBoundaryParse;
1154
+ };
1155
+ const addPersonOrSystemBoundary = function(alias, label, type, tags, link) {
1156
+ if (alias === null || label === null) {
1157
+ return;
1158
+ }
1159
+ let boundary = {};
1160
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1161
+ if (old && alias === old.alias) {
1162
+ boundary = old;
1163
+ } else {
1164
+ boundary.alias = alias;
1165
+ boundaries.push(boundary);
1166
+ }
1167
+ if (label === void 0 || label === null) {
1168
+ boundary.label = { text: "" };
1169
+ } else {
1170
+ boundary.label = { text: label };
1171
+ }
1172
+ if (type === void 0 || type === null) {
1173
+ boundary.type = { text: "system" };
1174
+ } else {
1175
+ if (typeof type === "object") {
1176
+ let [key, value] = Object.entries(type)[0];
1177
+ boundary[key] = { text: value };
1178
+ } else {
1179
+ boundary.type = { text: type };
1180
+ }
1181
+ }
1182
+ if (typeof tags === "object") {
1183
+ let [key, value] = Object.entries(tags)[0];
1184
+ boundary[key] = value;
1185
+ } else {
1186
+ boundary.tags = tags;
1187
+ }
1188
+ if (typeof link === "object") {
1189
+ let [key, value] = Object.entries(link)[0];
1190
+ boundary[key] = value;
1191
+ } else {
1192
+ boundary.link = link;
1193
+ }
1194
+ boundary.parentBoundary = currentBoundaryParse;
1195
+ boundary.wrap = autoWrap();
1196
+ parentBoundaryParse = currentBoundaryParse;
1197
+ currentBoundaryParse = alias;
1198
+ boundaryParseStack.push(parentBoundaryParse);
1199
+ };
1200
+ const addContainerBoundary = function(alias, label, type, tags, link) {
1201
+ if (alias === null || label === null) {
1202
+ return;
1203
+ }
1204
+ let boundary = {};
1205
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1206
+ if (old && alias === old.alias) {
1207
+ boundary = old;
1208
+ } else {
1209
+ boundary.alias = alias;
1210
+ boundaries.push(boundary);
1211
+ }
1212
+ if (label === void 0 || label === null) {
1213
+ boundary.label = { text: "" };
1214
+ } else {
1215
+ boundary.label = { text: label };
1216
+ }
1217
+ if (type === void 0 || type === null) {
1218
+ boundary.type = { text: "container" };
1219
+ } else {
1220
+ if (typeof type === "object") {
1221
+ let [key, value] = Object.entries(type)[0];
1222
+ boundary[key] = { text: value };
1223
+ } else {
1224
+ boundary.type = { text: type };
1225
+ }
1226
+ }
1227
+ if (typeof tags === "object") {
1228
+ let [key, value] = Object.entries(tags)[0];
1229
+ boundary[key] = value;
1230
+ } else {
1231
+ boundary.tags = tags;
1232
+ }
1233
+ if (typeof link === "object") {
1234
+ let [key, value] = Object.entries(link)[0];
1235
+ boundary[key] = value;
1236
+ } else {
1237
+ boundary.link = link;
1238
+ }
1239
+ boundary.parentBoundary = currentBoundaryParse;
1240
+ boundary.wrap = autoWrap();
1241
+ parentBoundaryParse = currentBoundaryParse;
1242
+ currentBoundaryParse = alias;
1243
+ boundaryParseStack.push(parentBoundaryParse);
1244
+ };
1245
+ const addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) {
1246
+ if (alias === null || label === null) {
1247
+ return;
1248
+ }
1249
+ let boundary = {};
1250
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1251
+ if (old && alias === old.alias) {
1252
+ boundary = old;
1253
+ } else {
1254
+ boundary.alias = alias;
1255
+ boundaries.push(boundary);
1256
+ }
1257
+ if (label === void 0 || label === null) {
1258
+ boundary.label = { text: "" };
1259
+ } else {
1260
+ boundary.label = { text: label };
1261
+ }
1262
+ if (type === void 0 || type === null) {
1263
+ boundary.type = { text: "node" };
1264
+ } else {
1265
+ if (typeof type === "object") {
1266
+ let [key, value] = Object.entries(type)[0];
1267
+ boundary[key] = { text: value };
1268
+ } else {
1269
+ boundary.type = { text: type };
1270
+ }
1271
+ }
1272
+ if (descr === void 0 || descr === null) {
1273
+ boundary.descr = { text: "" };
1274
+ } else {
1275
+ if (typeof descr === "object") {
1276
+ let [key, value] = Object.entries(descr)[0];
1277
+ boundary[key] = { text: value };
1278
+ } else {
1279
+ boundary.descr = { text: descr };
1280
+ }
1281
+ }
1282
+ if (typeof tags === "object") {
1283
+ let [key, value] = Object.entries(tags)[0];
1284
+ boundary[key] = value;
1285
+ } else {
1286
+ boundary.tags = tags;
1287
+ }
1288
+ if (typeof link === "object") {
1289
+ let [key, value] = Object.entries(link)[0];
1290
+ boundary[key] = value;
1291
+ } else {
1292
+ boundary.link = link;
1293
+ }
1294
+ boundary.nodeType = nodeType;
1295
+ boundary.parentBoundary = currentBoundaryParse;
1296
+ boundary.wrap = autoWrap();
1297
+ parentBoundaryParse = currentBoundaryParse;
1298
+ currentBoundaryParse = alias;
1299
+ boundaryParseStack.push(parentBoundaryParse);
1300
+ };
1301
+ const popBoundaryParseStack = function() {
1302
+ currentBoundaryParse = parentBoundaryParse;
1303
+ boundaryParseStack.pop();
1304
+ parentBoundaryParse = boundaryParseStack.pop();
1305
+ boundaryParseStack.push(parentBoundaryParse);
1306
+ };
1307
+ const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
1308
+ let old = c4ShapeArray.find((element) => element.alias === elementName);
1309
+ if (old === void 0) {
1310
+ old = boundaries.find((element) => element.alias === elementName);
1311
+ if (old === void 0) {
1312
+ return;
1313
+ }
1314
+ }
1315
+ if (bgColor !== void 0 && bgColor !== null) {
1316
+ if (typeof bgColor === "object") {
1317
+ let [key, value] = Object.entries(bgColor)[0];
1318
+ old[key] = value;
1319
+ } else {
1320
+ old.bgColor = bgColor;
1321
+ }
1322
+ }
1323
+ if (fontColor !== void 0 && fontColor !== null) {
1324
+ if (typeof fontColor === "object") {
1325
+ let [key, value] = Object.entries(fontColor)[0];
1326
+ old[key] = value;
1327
+ } else {
1328
+ old.fontColor = fontColor;
1329
+ }
1330
+ }
1331
+ if (borderColor !== void 0 && borderColor !== null) {
1332
+ if (typeof borderColor === "object") {
1333
+ let [key, value] = Object.entries(borderColor)[0];
1334
+ old[key] = value;
1335
+ } else {
1336
+ old.borderColor = borderColor;
1337
+ }
1338
+ }
1339
+ if (shadowing !== void 0 && shadowing !== null) {
1340
+ if (typeof shadowing === "object") {
1341
+ let [key, value] = Object.entries(shadowing)[0];
1342
+ old[key] = value;
1343
+ } else {
1344
+ old.shadowing = shadowing;
1345
+ }
1346
+ }
1347
+ if (shape !== void 0 && shape !== null) {
1348
+ if (typeof shape === "object") {
1349
+ let [key, value] = Object.entries(shape)[0];
1350
+ old[key] = value;
1351
+ } else {
1352
+ old.shape = shape;
1353
+ }
1354
+ }
1355
+ if (sprite !== void 0 && sprite !== null) {
1356
+ if (typeof sprite === "object") {
1357
+ let [key, value] = Object.entries(sprite)[0];
1358
+ old[key] = value;
1359
+ } else {
1360
+ old.sprite = sprite;
1361
+ }
1362
+ }
1363
+ if (techn !== void 0 && techn !== null) {
1364
+ if (typeof techn === "object") {
1365
+ let [key, value] = Object.entries(techn)[0];
1366
+ old[key] = value;
1367
+ } else {
1368
+ old.techn = techn;
1369
+ }
1370
+ }
1371
+ if (legendText !== void 0 && legendText !== null) {
1372
+ if (typeof legendText === "object") {
1373
+ let [key, value] = Object.entries(legendText)[0];
1374
+ old[key] = value;
1375
+ } else {
1376
+ old.legendText = legendText;
1377
+ }
1378
+ }
1379
+ if (legendSprite !== void 0 && legendSprite !== null) {
1380
+ if (typeof legendSprite === "object") {
1381
+ let [key, value] = Object.entries(legendSprite)[0];
1382
+ old[key] = value;
1383
+ } else {
1384
+ old.legendSprite = legendSprite;
1385
+ }
1386
+ }
1387
+ };
1388
+ const updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
1389
+ const old = rels.find((rel) => rel.from === from && rel.to === to);
1390
+ if (old === void 0) {
1391
+ return;
1392
+ }
1393
+ if (textColor !== void 0 && textColor !== null) {
1394
+ if (typeof textColor === "object") {
1395
+ let [key, value] = Object.entries(textColor)[0];
1396
+ old[key] = value;
1397
+ } else {
1398
+ old.textColor = textColor;
1399
+ }
1400
+ }
1401
+ if (lineColor !== void 0 && lineColor !== null) {
1402
+ if (typeof lineColor === "object") {
1403
+ let [key, value] = Object.entries(lineColor)[0];
1404
+ old[key] = value;
1405
+ } else {
1406
+ old.lineColor = lineColor;
1407
+ }
1408
+ }
1409
+ if (offsetX !== void 0 && offsetX !== null) {
1410
+ if (typeof offsetX === "object") {
1411
+ let [key, value] = Object.entries(offsetX)[0];
1412
+ old[key] = parseInt(value);
1413
+ } else {
1414
+ old.offsetX = parseInt(offsetX);
1415
+ }
1416
+ }
1417
+ if (offsetY !== void 0 && offsetY !== null) {
1418
+ if (typeof offsetY === "object") {
1419
+ let [key, value] = Object.entries(offsetY)[0];
1420
+ old[key] = parseInt(value);
1421
+ } else {
1422
+ old.offsetY = parseInt(offsetY);
1423
+ }
1424
+ }
1425
+ };
1426
+ const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
1427
+ let c4ShapeInRowValue = c4ShapeInRow$1;
1428
+ let c4BoundaryInRowValue = c4BoundaryInRow$1;
1429
+ if (typeof c4ShapeInRowParam === "object") {
1430
+ const value = Object.values(c4ShapeInRowParam)[0];
1431
+ c4ShapeInRowValue = parseInt(value);
1432
+ } else {
1433
+ c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
1434
+ }
1435
+ if (typeof c4BoundaryInRowParam === "object") {
1436
+ const value = Object.values(c4BoundaryInRowParam)[0];
1437
+ c4BoundaryInRowValue = parseInt(value);
1438
+ } else {
1439
+ c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
1440
+ }
1441
+ if (c4ShapeInRowValue >= 1) {
1442
+ c4ShapeInRow$1 = c4ShapeInRowValue;
1443
+ }
1444
+ if (c4BoundaryInRowValue >= 1) {
1445
+ c4BoundaryInRow$1 = c4BoundaryInRowValue;
1446
+ }
1447
+ };
1448
+ const getC4ShapeInRow = function() {
1449
+ return c4ShapeInRow$1;
1450
+ };
1451
+ const getC4BoundaryInRow = function() {
1452
+ return c4BoundaryInRow$1;
1453
+ };
1454
+ const getCurrentBoundaryParse = function() {
1455
+ return currentBoundaryParse;
1456
+ };
1457
+ const getParentBoundaryParse = function() {
1458
+ return parentBoundaryParse;
1459
+ };
1460
+ const getC4ShapeArray = function(parentBoundary) {
1461
+ if (parentBoundary === void 0 || parentBoundary === null) {
1462
+ return c4ShapeArray;
1463
+ } else {
1464
+ return c4ShapeArray.filter((personOrSystem) => {
1465
+ return personOrSystem.parentBoundary === parentBoundary;
1466
+ });
1467
+ }
1468
+ };
1469
+ const getC4Shape = function(alias) {
1470
+ return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
1471
+ };
1472
+ const getC4ShapeKeys = function(parentBoundary) {
1473
+ return Object.keys(getC4ShapeArray(parentBoundary));
1474
+ };
1475
+ const getBoundaries = function(parentBoundary) {
1476
+ if (parentBoundary === void 0 || parentBoundary === null) {
1477
+ return boundaries;
1478
+ } else {
1479
+ return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);
1480
+ }
1481
+ };
1482
+ const getBoundarys = getBoundaries;
1483
+ const getRels = function() {
1484
+ return rels;
1485
+ };
1486
+ const getTitle = function() {
1487
+ return title;
1488
+ };
1489
+ const setWrap = function(wrapSetting) {
1490
+ wrapEnabled = wrapSetting;
1491
+ };
1492
+ const autoWrap = function() {
1493
+ return wrapEnabled;
1494
+ };
1495
+ const clear = function() {
1496
+ c4ShapeArray = [];
1497
+ boundaries = [
1498
+ {
1499
+ alias: "global",
1500
+ label: { text: "global" },
1501
+ type: { text: "global" },
1502
+ tags: null,
1503
+ link: null,
1504
+ parentBoundary: ""
1505
+ }
1506
+ ];
1507
+ parentBoundaryParse = "";
1508
+ currentBoundaryParse = "global";
1509
+ boundaryParseStack = [""];
1510
+ rels = [];
1511
+ boundaryParseStack = [""];
1512
+ title = "";
1513
+ wrapEnabled = false;
1514
+ c4ShapeInRow$1 = 4;
1515
+ c4BoundaryInRow$1 = 2;
1516
+ };
1517
+ const LINETYPE = {
1518
+ SOLID: 0,
1519
+ DOTTED: 1,
1520
+ NOTE: 2,
1521
+ SOLID_CROSS: 3,
1522
+ DOTTED_CROSS: 4,
1523
+ SOLID_OPEN: 5,
1524
+ DOTTED_OPEN: 6,
1525
+ LOOP_START: 10,
1526
+ LOOP_END: 11,
1527
+ ALT_START: 12,
1528
+ ALT_ELSE: 13,
1529
+ ALT_END: 14,
1530
+ OPT_START: 15,
1531
+ OPT_END: 16,
1532
+ ACTIVE_START: 17,
1533
+ ACTIVE_END: 18,
1534
+ PAR_START: 19,
1535
+ PAR_AND: 20,
1536
+ PAR_END: 21,
1537
+ RECT_START: 22,
1538
+ RECT_END: 23,
1539
+ SOLID_POINT: 24,
1540
+ DOTTED_POINT: 25
1541
+ };
1542
+ const ARROWTYPE = {
1543
+ FILLED: 0,
1544
+ OPEN: 1
1545
+ };
1546
+ const PLACEMENT = {
1547
+ LEFTOF: 0,
1548
+ RIGHTOF: 1,
1549
+ OVER: 2
1550
+ };
1551
+ const setTitle = function(txt) {
1552
+ let sanitizedText = sanitizeText$2(txt, getConfig());
1553
+ title = sanitizedText;
1554
+ };
1555
+ const db = {
1556
+ addPersonOrSystem,
1557
+ addPersonOrSystemBoundary,
1558
+ addContainer,
1559
+ addContainerBoundary,
1560
+ addComponent,
1561
+ addDeploymentNode,
1562
+ popBoundaryParseStack,
1563
+ addRel,
1564
+ updateElStyle,
1565
+ updateRelStyle,
1566
+ updateLayoutConfig,
1567
+ autoWrap,
1568
+ setWrap,
1569
+ getC4ShapeArray,
1570
+ getC4Shape,
1571
+ getC4ShapeKeys,
1572
+ getBoundaries,
1573
+ getBoundarys,
1574
+ getCurrentBoundaryParse,
1575
+ getParentBoundaryParse,
1576
+ getRels,
1577
+ getTitle,
1578
+ getC4Type,
1579
+ getC4ShapeInRow,
1580
+ getC4BoundaryInRow,
1581
+ setAccTitle,
1582
+ getAccTitle,
1583
+ getAccDescription,
1584
+ setAccDescription,
1585
+ getConfig: () => getConfig().c4,
1586
+ clear,
1587
+ LINETYPE,
1588
+ ARROWTYPE,
1589
+ PLACEMENT,
1590
+ setTitle,
1591
+ setC4Type
1592
+ // apply,
1593
+ };
1594
+ const drawRect = function(elem, rectData) {
1595
+ return drawRect$1(elem, rectData);
1596
+ };
1597
+ const drawImage = function(elem, width, height, x, y, link) {
1598
+ const imageElem = elem.append("image");
1599
+ imageElem.attr("width", width);
1600
+ imageElem.attr("height", height);
1601
+ imageElem.attr("x", x);
1602
+ imageElem.attr("y", y);
1603
+ let sanitizedLink = link.startsWith("data:image/png;base64") ? link : dist.sanitizeUrl(link);
1604
+ imageElem.attr("xlink:href", sanitizedLink);
1605
+ };
1606
+ const drawRels$1 = (elem, rels2, conf2) => {
1607
+ const relsElem = elem.append("g");
1608
+ let i = 0;
1609
+ for (let rel of rels2) {
1610
+ let textColor = rel.textColor ? rel.textColor : "#444444";
1611
+ let strokeColor = rel.lineColor ? rel.lineColor : "#444444";
1612
+ let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;
1613
+ let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;
1614
+ let url = "";
1615
+ if (i === 0) {
1616
+ let line = relsElem.append("line");
1617
+ line.attr("x1", rel.startPoint.x);
1618
+ line.attr("y1", rel.startPoint.y);
1619
+ line.attr("x2", rel.endPoint.x);
1620
+ line.attr("y2", rel.endPoint.y);
1621
+ line.attr("stroke-width", "1");
1622
+ line.attr("stroke", strokeColor);
1623
+ line.style("fill", "none");
1624
+ if (rel.type !== "rel_b") {
1625
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1626
+ }
1627
+ if (rel.type === "birel" || rel.type === "rel_b") {
1628
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1629
+ }
1630
+ i = -1;
1631
+ } else {
1632
+ let line = relsElem.append("path");
1633
+ line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr(
1634
+ "d",
1635
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll(
1636
+ "controlx",
1637
+ rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4
1638
+ ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)
1639
+ );
1640
+ if (rel.type !== "rel_b") {
1641
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1642
+ }
1643
+ if (rel.type === "birel" || rel.type === "rel_b") {
1644
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1645
+ }
1646
+ }
1647
+ let messageConf = conf2.messageFont();
1648
+ _drawTextCandidateFunc(conf2)(
1649
+ rel.label.text,
1650
+ relsElem,
1651
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1652
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,
1653
+ rel.label.width,
1654
+ rel.label.height,
1655
+ { fill: textColor },
1656
+ messageConf
1657
+ );
1658
+ if (rel.techn && rel.techn.text !== "") {
1659
+ messageConf = conf2.messageFont();
1660
+ _drawTextCandidateFunc(conf2)(
1661
+ "[" + rel.techn.text + "]",
1662
+ relsElem,
1663
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1664
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,
1665
+ Math.max(rel.label.width, rel.techn.width),
1666
+ rel.techn.height,
1667
+ { fill: textColor, "font-style": "italic" },
1668
+ messageConf
1669
+ );
1670
+ }
1671
+ }
1672
+ };
1673
+ const drawBoundary$1 = function(elem, boundary, conf2) {
1674
+ const boundaryElem = elem.append("g");
1675
+ let fillColor = boundary.bgColor ? boundary.bgColor : "none";
1676
+ let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
1677
+ let fontColor = boundary.fontColor ? boundary.fontColor : "black";
1678
+ let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1679
+ if (boundary.nodeType) {
1680
+ attrsValue = { "stroke-width": 1 };
1681
+ }
1682
+ let rectData = {
1683
+ x: boundary.x,
1684
+ y: boundary.y,
1685
+ fill: fillColor,
1686
+ stroke: strokeColor,
1687
+ width: boundary.width,
1688
+ height: boundary.height,
1689
+ rx: 2.5,
1690
+ ry: 2.5,
1691
+ attrs: attrsValue
1692
+ };
1693
+ drawRect(boundaryElem, rectData);
1694
+ let boundaryConf = conf2.boundaryFont();
1695
+ boundaryConf.fontWeight = "bold";
1696
+ boundaryConf.fontSize = boundaryConf.fontSize + 2;
1697
+ boundaryConf.fontColor = fontColor;
1698
+ _drawTextCandidateFunc(conf2)(
1699
+ boundary.label.text,
1700
+ boundaryElem,
1701
+ boundary.x,
1702
+ boundary.y + boundary.label.Y,
1703
+ boundary.width,
1704
+ boundary.height,
1705
+ { fill: "#444444" },
1706
+ boundaryConf
1707
+ );
1708
+ if (boundary.type && boundary.type.text !== "") {
1709
+ boundaryConf = conf2.boundaryFont();
1710
+ boundaryConf.fontColor = fontColor;
1711
+ _drawTextCandidateFunc(conf2)(
1712
+ boundary.type.text,
1713
+ boundaryElem,
1714
+ boundary.x,
1715
+ boundary.y + boundary.type.Y,
1716
+ boundary.width,
1717
+ boundary.height,
1718
+ { fill: "#444444" },
1719
+ boundaryConf
1720
+ );
1721
+ }
1722
+ if (boundary.descr && boundary.descr.text !== "") {
1723
+ boundaryConf = conf2.boundaryFont();
1724
+ boundaryConf.fontSize = boundaryConf.fontSize - 2;
1725
+ boundaryConf.fontColor = fontColor;
1726
+ _drawTextCandidateFunc(conf2)(
1727
+ boundary.descr.text,
1728
+ boundaryElem,
1729
+ boundary.x,
1730
+ boundary.y + boundary.descr.Y,
1731
+ boundary.width,
1732
+ boundary.height,
1733
+ { fill: "#444444" },
1734
+ boundaryConf
1735
+ );
1736
+ }
1737
+ };
1738
+ const drawC4Shape = function(elem, c4Shape, conf2) {
1739
+ var _a;
1740
+ let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"];
1741
+ let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"];
1742
+ let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF";
1743
+ let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1744
+ switch (c4Shape.typeC4Shape.text) {
1745
+ case "person":
1746
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1747
+ break;
1748
+ case "external_person":
1749
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1750
+ break;
1751
+ }
1752
+ const c4ShapeElem = elem.append("g");
1753
+ c4ShapeElem.attr("class", "person-man");
1754
+ const rect = getNoteRect();
1755
+ switch (c4Shape.typeC4Shape.text) {
1756
+ case "person":
1757
+ case "external_person":
1758
+ case "system":
1759
+ case "external_system":
1760
+ case "container":
1761
+ case "external_container":
1762
+ case "component":
1763
+ case "external_component":
1764
+ rect.x = c4Shape.x;
1765
+ rect.y = c4Shape.y;
1766
+ rect.fill = fillColor;
1767
+ rect.width = c4Shape.width;
1768
+ rect.height = c4Shape.height;
1769
+ rect.stroke = strokeColor;
1770
+ rect.rx = 2.5;
1771
+ rect.ry = 2.5;
1772
+ rect.attrs = { "stroke-width": 0.5 };
1773
+ drawRect(c4ShapeElem, rect);
1774
+ break;
1775
+ case "system_db":
1776
+ case "external_system_db":
1777
+ case "container_db":
1778
+ case "external_container_db":
1779
+ case "component_db":
1780
+ case "external_component_db":
1781
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1782
+ "d",
1783
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height)
1784
+ );
1785
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1786
+ "d",
1787
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2)
1788
+ );
1789
+ break;
1790
+ case "system_queue":
1791
+ case "external_system_queue":
1792
+ case "container_queue":
1793
+ case "external_container_queue":
1794
+ case "component_queue":
1795
+ case "external_component_queue":
1796
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1797
+ "d",
1798
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2)
1799
+ );
1800
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1801
+ "d",
1802
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2)
1803
+ );
1804
+ break;
1805
+ }
1806
+ let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);
1807
+ c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>");
1808
+ switch (c4Shape.typeC4Shape.text) {
1809
+ case "person":
1810
+ case "external_person":
1811
+ drawImage(
1812
+ c4ShapeElem,
1813
+ 48,
1814
+ 48,
1815
+ c4Shape.x + c4Shape.width / 2 - 24,
1816
+ c4Shape.y + c4Shape.image.Y,
1817
+ personImg
1818
+ );
1819
+ break;
1820
+ }
1821
+ let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1822
+ textFontConf.fontWeight = "bold";
1823
+ textFontConf.fontSize = textFontConf.fontSize + 2;
1824
+ textFontConf.fontColor = fontColor;
1825
+ _drawTextCandidateFunc(conf2)(
1826
+ c4Shape.label.text,
1827
+ c4ShapeElem,
1828
+ c4Shape.x,
1829
+ c4Shape.y + c4Shape.label.Y,
1830
+ c4Shape.width,
1831
+ c4Shape.height,
1832
+ { fill: fontColor },
1833
+ textFontConf
1834
+ );
1835
+ textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1836
+ textFontConf.fontColor = fontColor;
1837
+ if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") {
1838
+ _drawTextCandidateFunc(conf2)(
1839
+ c4Shape.techn.text,
1840
+ c4ShapeElem,
1841
+ c4Shape.x,
1842
+ c4Shape.y + c4Shape.techn.Y,
1843
+ c4Shape.width,
1844
+ c4Shape.height,
1845
+ { fill: fontColor, "font-style": "italic" },
1846
+ textFontConf
1847
+ );
1848
+ } else if (c4Shape.type && c4Shape.type.text !== "") {
1849
+ _drawTextCandidateFunc(conf2)(
1850
+ c4Shape.type.text,
1851
+ c4ShapeElem,
1852
+ c4Shape.x,
1853
+ c4Shape.y + c4Shape.type.Y,
1854
+ c4Shape.width,
1855
+ c4Shape.height,
1856
+ { fill: fontColor, "font-style": "italic" },
1857
+ textFontConf
1858
+ );
1859
+ }
1860
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
1861
+ textFontConf = conf2.personFont();
1862
+ textFontConf.fontColor = fontColor;
1863
+ _drawTextCandidateFunc(conf2)(
1864
+ c4Shape.descr.text,
1865
+ c4ShapeElem,
1866
+ c4Shape.x,
1867
+ c4Shape.y + c4Shape.descr.Y,
1868
+ c4Shape.width,
1869
+ c4Shape.height,
1870
+ { fill: fontColor },
1871
+ textFontConf
1872
+ );
1873
+ }
1874
+ return c4Shape.height;
1875
+ };
1876
+ const insertDatabaseIcon = function(elem) {
1877
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1878
+ "d",
1879
+ "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"
1880
+ );
1881
+ };
1882
+ const insertComputerIcon = function(elem) {
1883
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1884
+ "d",
1885
+ "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"
1886
+ );
1887
+ };
1888
+ const insertClockIcon = function(elem) {
1889
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1890
+ "d",
1891
+ "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"
1892
+ );
1893
+ };
1894
+ const insertArrowHead = function(elem) {
1895
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
1896
+ };
1897
+ const insertArrowEnd = function(elem) {
1898
+ elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
1899
+ };
1900
+ const insertArrowFilledHead = function(elem) {
1901
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).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");
1902
+ };
1903
+ const insertDynamicNumber = function(elem) {
1904
+ elem.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);
1905
+ };
1906
+ const insertArrowCrossHead = function(elem) {
1907
+ const defs = elem.append("defs");
1908
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
1909
+ marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z");
1910
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
1911
+ };
1912
+ const getC4ShapeFont = (cnf, typeC4Shape) => {
1913
+ return {
1914
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
1915
+ fontSize: cnf[typeC4Shape + "FontSize"],
1916
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
1917
+ };
1918
+ };
1919
+ const _drawTextCandidateFunc = /* @__PURE__ */ function() {
1920
+ function byText(content, g, x, y, width, height, textAttrs) {
1921
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
1922
+ _setTextAttrs(text, textAttrs);
1923
+ }
1924
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
1925
+ const { fontSize, fontFamily, fontWeight } = conf2;
1926
+ const lines = content.split(common$1.lineBreakRegex);
1927
+ for (let i = 0; i < lines.length; i++) {
1928
+ const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
1929
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily);
1930
+ text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
1931
+ _setTextAttrs(text, textAttrs);
1932
+ }
1933
+ }
1934
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
1935
+ const s = g.append("switch");
1936
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
1937
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1938
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
1939
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
1940
+ _setTextAttrs(text, textAttrs);
1941
+ }
1942
+ function _setTextAttrs(toText, fromTextAttrsDict) {
1943
+ for (const key in fromTextAttrsDict) {
1944
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
1945
+ toText.attr(key, fromTextAttrsDict[key]);
1946
+ }
1947
+ }
1948
+ }
1949
+ return function(conf2) {
1950
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
1951
+ };
1952
+ }();
1953
+ const svgDraw = {
1954
+ drawRect,
1955
+ drawBoundary: drawBoundary$1,
1956
+ drawC4Shape,
1957
+ drawRels: drawRels$1,
1958
+ drawImage,
1959
+ insertArrowHead,
1960
+ insertArrowEnd,
1961
+ insertArrowFilledHead,
1962
+ insertDynamicNumber,
1963
+ insertArrowCrossHead,
1964
+ insertDatabaseIcon,
1965
+ insertComputerIcon,
1966
+ insertClockIcon
1967
+ };
1968
+ let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0;
1969
+ let c4ShapeInRow = 4;
1970
+ let c4BoundaryInRow = 2;
1971
+ parser.yy = db;
1972
+ let conf = {};
1973
+ class Bounds {
1974
+ constructor(diagObj) {
1975
+ this.name = "";
1976
+ this.data = {};
1977
+ this.data.startx = void 0;
1978
+ this.data.stopx = void 0;
1979
+ this.data.starty = void 0;
1980
+ this.data.stopy = void 0;
1981
+ this.data.widthLimit = void 0;
1982
+ this.nextData = {};
1983
+ this.nextData.startx = void 0;
1984
+ this.nextData.stopx = void 0;
1985
+ this.nextData.starty = void 0;
1986
+ this.nextData.stopy = void 0;
1987
+ this.nextData.cnt = 0;
1988
+ setConf(diagObj.db.getConfig());
1989
+ }
1990
+ setData(startx, stopx, starty, stopy) {
1991
+ this.nextData.startx = this.data.startx = startx;
1992
+ this.nextData.stopx = this.data.stopx = stopx;
1993
+ this.nextData.starty = this.data.starty = starty;
1994
+ this.nextData.stopy = this.data.stopy = stopy;
1995
+ }
1996
+ updateVal(obj, key, val, fun) {
1997
+ if (obj[key] === void 0) {
1998
+ obj[key] = val;
1999
+ } else {
2000
+ obj[key] = fun(val, obj[key]);
2001
+ }
2002
+ }
2003
+ insert(c4Shape) {
2004
+ this.nextData.cnt = this.nextData.cnt + 1;
2005
+ let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;
2006
+ let _stopx = _startx + c4Shape.width;
2007
+ let _starty = this.nextData.starty + c4Shape.margin * 2;
2008
+ let _stopy = _starty + c4Shape.height;
2009
+ if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) {
2010
+ _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
2011
+ _starty = this.nextData.stopy + c4Shape.margin * 2;
2012
+ this.nextData.stopx = _stopx = _startx + c4Shape.width;
2013
+ this.nextData.starty = this.nextData.stopy;
2014
+ this.nextData.stopy = _stopy = _starty + c4Shape.height;
2015
+ this.nextData.cnt = 1;
2016
+ }
2017
+ c4Shape.x = _startx;
2018
+ c4Shape.y = _starty;
2019
+ this.updateVal(this.data, "startx", _startx, Math.min);
2020
+ this.updateVal(this.data, "starty", _starty, Math.min);
2021
+ this.updateVal(this.data, "stopx", _stopx, Math.max);
2022
+ this.updateVal(this.data, "stopy", _stopy, Math.max);
2023
+ this.updateVal(this.nextData, "startx", _startx, Math.min);
2024
+ this.updateVal(this.nextData, "starty", _starty, Math.min);
2025
+ this.updateVal(this.nextData, "stopx", _stopx, Math.max);
2026
+ this.updateVal(this.nextData, "stopy", _stopy, Math.max);
2027
+ }
2028
+ init(diagObj) {
2029
+ this.name = "";
2030
+ this.data = {
2031
+ startx: void 0,
2032
+ stopx: void 0,
2033
+ starty: void 0,
2034
+ stopy: void 0,
2035
+ widthLimit: void 0
2036
+ };
2037
+ this.nextData = {
2038
+ startx: void 0,
2039
+ stopx: void 0,
2040
+ starty: void 0,
2041
+ stopy: void 0,
2042
+ cnt: 0
2043
+ };
2044
+ setConf(diagObj.db.getConfig());
2045
+ }
2046
+ bumpLastMargin(margin) {
2047
+ this.data.stopx += margin;
2048
+ this.data.stopy += margin;
2049
+ }
2050
+ }
2051
+ const setConf = function(cnf) {
2052
+ assignWithDepth$1(conf, cnf);
2053
+ if (cnf.fontFamily) {
2054
+ conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
2055
+ }
2056
+ if (cnf.fontSize) {
2057
+ conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
2058
+ }
2059
+ if (cnf.fontWeight) {
2060
+ conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
2061
+ }
2062
+ };
2063
+ const c4ShapeFont = (cnf, typeC4Shape) => {
2064
+ return {
2065
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
2066
+ fontSize: cnf[typeC4Shape + "FontSize"],
2067
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
2068
+ };
2069
+ };
2070
+ const boundaryFont = (cnf) => {
2071
+ return {
2072
+ fontFamily: cnf.boundaryFontFamily,
2073
+ fontSize: cnf.boundaryFontSize,
2074
+ fontWeight: cnf.boundaryFontWeight
2075
+ };
2076
+ };
2077
+ const messageFont = (cnf) => {
2078
+ return {
2079
+ fontFamily: cnf.messageFontFamily,
2080
+ fontSize: cnf.messageFontSize,
2081
+ fontWeight: cnf.messageFontWeight
2082
+ };
2083
+ };
2084
+ function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
2085
+ if (!c4Shape[textType].width) {
2086
+ if (c4ShapeTextWrap) {
2087
+ c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);
2088
+ c4Shape[textType].textLines = c4Shape[textType].text.split(common$1.lineBreakRegex).length;
2089
+ c4Shape[textType].width = textLimitWidth;
2090
+ c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);
2091
+ } else {
2092
+ let lines = c4Shape[textType].text.split(common$1.lineBreakRegex);
2093
+ c4Shape[textType].textLines = lines.length;
2094
+ let lineHeight = 0;
2095
+ c4Shape[textType].height = 0;
2096
+ c4Shape[textType].width = 0;
2097
+ for (const line of lines) {
2098
+ c4Shape[textType].width = Math.max(
2099
+ calculateTextWidth(line, textConf),
2100
+ c4Shape[textType].width
2101
+ );
2102
+ lineHeight = calculateTextHeight(line, textConf);
2103
+ c4Shape[textType].height = c4Shape[textType].height + lineHeight;
2104
+ }
2105
+ }
2106
+ }
2107
+ }
2108
+ const drawBoundary = function(diagram2, boundary, bounds) {
2109
+ boundary.x = bounds.data.startx;
2110
+ boundary.y = bounds.data.starty;
2111
+ boundary.width = bounds.data.stopx - bounds.data.startx;
2112
+ boundary.height = bounds.data.stopy - bounds.data.starty;
2113
+ boundary.label.y = conf.c4ShapeMargin - 35;
2114
+ let boundaryTextWrap = boundary.wrap && conf.wrap;
2115
+ let boundaryLabelConf = boundaryFont(conf);
2116
+ boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
2117
+ boundaryLabelConf.fontWeight = "bold";
2118
+ let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);
2119
+ calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);
2120
+ svgDraw.drawBoundary(diagram2, boundary, conf);
2121
+ };
2122
+ const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
2123
+ let Y = 0;
2124
+ for (const c4ShapeKey of c4ShapeKeys) {
2125
+ Y = 0;
2126
+ const c4Shape = c4ShapeArray2[c4ShapeKey];
2127
+ let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2128
+ c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;
2129
+ c4Shape.typeC4Shape.width = calculateTextWidth(
2130
+ "«" + c4Shape.typeC4Shape.text + "»",
2131
+ c4ShapeTypeConf
2132
+ );
2133
+ c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;
2134
+ c4Shape.typeC4Shape.Y = conf.c4ShapePadding;
2135
+ Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;
2136
+ c4Shape.image = { width: 0, height: 0, Y: 0 };
2137
+ switch (c4Shape.typeC4Shape.text) {
2138
+ case "person":
2139
+ case "external_person":
2140
+ c4Shape.image.width = 48;
2141
+ c4Shape.image.height = 48;
2142
+ c4Shape.image.Y = Y;
2143
+ Y = c4Shape.image.Y + c4Shape.image.height;
2144
+ break;
2145
+ }
2146
+ if (c4Shape.sprite) {
2147
+ c4Shape.image.width = 48;
2148
+ c4Shape.image.height = 48;
2149
+ c4Shape.image.Y = Y;
2150
+ Y = c4Shape.image.Y + c4Shape.image.height;
2151
+ }
2152
+ let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;
2153
+ let textLimitWidth = conf.width - conf.c4ShapePadding * 2;
2154
+ let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2155
+ c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;
2156
+ c4ShapeLabelConf.fontWeight = "bold";
2157
+ calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);
2158
+ c4Shape["label"].Y = Y + 8;
2159
+ Y = c4Shape["label"].Y + c4Shape["label"].height;
2160
+ if (c4Shape.type && c4Shape.type.text !== "") {
2161
+ c4Shape.type.text = "[" + c4Shape.type.text + "]";
2162
+ let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2163
+ calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);
2164
+ c4Shape["type"].Y = Y + 5;
2165
+ Y = c4Shape["type"].Y + c4Shape["type"].height;
2166
+ } else if (c4Shape.techn && c4Shape.techn.text !== "") {
2167
+ c4Shape.techn.text = "[" + c4Shape.techn.text + "]";
2168
+ let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);
2169
+ calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);
2170
+ c4Shape["techn"].Y = Y + 5;
2171
+ Y = c4Shape["techn"].Y + c4Shape["techn"].height;
2172
+ }
2173
+ let rectHeight = Y;
2174
+ let rectWidth = c4Shape.label.width;
2175
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
2176
+ let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2177
+ calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);
2178
+ c4Shape["descr"].Y = Y + 20;
2179
+ Y = c4Shape["descr"].Y + c4Shape["descr"].height;
2180
+ rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);
2181
+ rectHeight = Y - c4Shape["descr"].textLines * 5;
2182
+ }
2183
+ rectWidth = rectWidth + conf.c4ShapePadding;
2184
+ c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);
2185
+ c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);
2186
+ c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;
2187
+ currentBounds.insert(c4Shape);
2188
+ svgDraw.drawC4Shape(diagram2, c4Shape, conf);
2189
+ }
2190
+ currentBounds.bumpLastMargin(conf.c4ShapeMargin);
2191
+ };
2192
+ class Point {
2193
+ constructor(x, y) {
2194
+ this.x = x;
2195
+ this.y = y;
2196
+ }
2197
+ }
2198
+ let getIntersectPoint = function(fromNode, endPoint) {
2199
+ let x1 = fromNode.x;
2200
+ let y1 = fromNode.y;
2201
+ let x2 = endPoint.x;
2202
+ let y2 = endPoint.y;
2203
+ let fromCenterX = x1 + fromNode.width / 2;
2204
+ let fromCenterY = y1 + fromNode.height / 2;
2205
+ let dx = Math.abs(x1 - x2);
2206
+ let dy = Math.abs(y1 - y2);
2207
+ let tanDYX = dy / dx;
2208
+ let fromDYX = fromNode.height / fromNode.width;
2209
+ let returnPoint = null;
2210
+ if (y1 == y2 && x1 < x2) {
2211
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY);
2212
+ } else if (y1 == y2 && x1 > x2) {
2213
+ returnPoint = new Point(x1, fromCenterY);
2214
+ } else if (x1 == x2 && y1 < y2) {
2215
+ returnPoint = new Point(fromCenterX, y1 + fromNode.height);
2216
+ } else if (x1 == x2 && y1 > y2) {
2217
+ returnPoint = new Point(fromCenterX, y1);
2218
+ }
2219
+ if (x1 > x2 && y1 < y2) {
2220
+ if (fromDYX >= tanDYX) {
2221
+ returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);
2222
+ } else {
2223
+ returnPoint = new Point(
2224
+ fromCenterX - dx / dy * fromNode.height / 2,
2225
+ y1 + fromNode.height
2226
+ );
2227
+ }
2228
+ } else if (x1 < x2 && y1 < y2) {
2229
+ if (fromDYX >= tanDYX) {
2230
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);
2231
+ } else {
2232
+ returnPoint = new Point(
2233
+ fromCenterX + dx / dy * fromNode.height / 2,
2234
+ y1 + fromNode.height
2235
+ );
2236
+ }
2237
+ } else if (x1 < x2 && y1 > y2) {
2238
+ if (fromDYX >= tanDYX) {
2239
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);
2240
+ } else {
2241
+ returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);
2242
+ }
2243
+ } else if (x1 > x2 && y1 > y2) {
2244
+ if (fromDYX >= tanDYX) {
2245
+ returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);
2246
+ } else {
2247
+ returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);
2248
+ }
2249
+ }
2250
+ return returnPoint;
2251
+ };
2252
+ let getIntersectPoints = function(fromNode, endNode) {
2253
+ let endIntersectPoint = { x: 0, y: 0 };
2254
+ endIntersectPoint.x = endNode.x + endNode.width / 2;
2255
+ endIntersectPoint.y = endNode.y + endNode.height / 2;
2256
+ let startPoint = getIntersectPoint(fromNode, endIntersectPoint);
2257
+ endIntersectPoint.x = fromNode.x + fromNode.width / 2;
2258
+ endIntersectPoint.y = fromNode.y + fromNode.height / 2;
2259
+ let endPoint = getIntersectPoint(endNode, endIntersectPoint);
2260
+ return { startPoint, endPoint };
2261
+ };
2262
+ const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) {
2263
+ let i = 0;
2264
+ for (let rel of rels2) {
2265
+ i = i + 1;
2266
+ let relTextWrap = rel.wrap && conf.wrap;
2267
+ let relConf = messageFont(conf);
2268
+ let diagramType = diagObj.db.getC4Type();
2269
+ if (diagramType === "C4Dynamic") {
2270
+ rel.label.text = i + ": " + rel.label.text;
2271
+ }
2272
+ let textLimitWidth = calculateTextWidth(rel.label.text, relConf);
2273
+ calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
2274
+ if (rel.techn && rel.techn.text !== "") {
2275
+ textLimitWidth = calculateTextWidth(rel.techn.text, relConf);
2276
+ calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
2277
+ }
2278
+ if (rel.descr && rel.descr.text !== "") {
2279
+ textLimitWidth = calculateTextWidth(rel.descr.text, relConf);
2280
+ calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
2281
+ }
2282
+ let fromNode = getC4ShapeObj(rel.from);
2283
+ let endNode = getC4ShapeObj(rel.to);
2284
+ let points = getIntersectPoints(fromNode, endNode);
2285
+ rel.startPoint = points.startPoint;
2286
+ rel.endPoint = points.endPoint;
2287
+ }
2288
+ svgDraw.drawRels(diagram2, rels2, conf);
2289
+ };
2290
+ function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
2291
+ let currentBounds = new Bounds(diagObj);
2292
+ currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);
2293
+ for (let [i, currentBoundary] of currentBoundaries.entries()) {
2294
+ let Y = 0;
2295
+ currentBoundary.image = { width: 0, height: 0, Y: 0 };
2296
+ if (currentBoundary.sprite) {
2297
+ currentBoundary.image.width = 48;
2298
+ currentBoundary.image.height = 48;
2299
+ currentBoundary.image.Y = Y;
2300
+ Y = currentBoundary.image.Y + currentBoundary.image.height;
2301
+ }
2302
+ let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
2303
+ let currentBoundaryLabelConf = boundaryFont(conf);
2304
+ currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
2305
+ currentBoundaryLabelConf.fontWeight = "bold";
2306
+ calcC4ShapeTextWH(
2307
+ "label",
2308
+ currentBoundary,
2309
+ currentBoundaryTextWrap,
2310
+ currentBoundaryLabelConf,
2311
+ currentBounds.data.widthLimit
2312
+ );
2313
+ currentBoundary["label"].Y = Y + 8;
2314
+ Y = currentBoundary["label"].Y + currentBoundary["label"].height;
2315
+ if (currentBoundary.type && currentBoundary.type.text !== "") {
2316
+ currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
2317
+ let currentBoundaryTypeConf = boundaryFont(conf);
2318
+ calcC4ShapeTextWH(
2319
+ "type",
2320
+ currentBoundary,
2321
+ currentBoundaryTextWrap,
2322
+ currentBoundaryTypeConf,
2323
+ currentBounds.data.widthLimit
2324
+ );
2325
+ currentBoundary["type"].Y = Y + 5;
2326
+ Y = currentBoundary["type"].Y + currentBoundary["type"].height;
2327
+ }
2328
+ if (currentBoundary.descr && currentBoundary.descr.text !== "") {
2329
+ let currentBoundaryDescrConf = boundaryFont(conf);
2330
+ currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
2331
+ calcC4ShapeTextWH(
2332
+ "descr",
2333
+ currentBoundary,
2334
+ currentBoundaryTextWrap,
2335
+ currentBoundaryDescrConf,
2336
+ currentBounds.data.widthLimit
2337
+ );
2338
+ currentBoundary["descr"].Y = Y + 20;
2339
+ Y = currentBoundary["descr"].Y + currentBoundary["descr"].height;
2340
+ }
2341
+ if (i == 0 || i % c4BoundaryInRow === 0) {
2342
+ let _x = parentBounds.data.startx + conf.diagramMarginX;
2343
+ let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
2344
+ currentBounds.setData(_x, _x, _y, _y);
2345
+ } else {
2346
+ let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
2347
+ let _y = currentBounds.data.starty;
2348
+ currentBounds.setData(_x, _x, _y, _y);
2349
+ }
2350
+ currentBounds.name = currentBoundary.alias;
2351
+ let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);
2352
+ let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);
2353
+ if (currentPersonOrSystemKeys.length > 0) {
2354
+ drawC4ShapeArray(
2355
+ currentBounds,
2356
+ diagram2,
2357
+ currentPersonOrSystemArray,
2358
+ currentPersonOrSystemKeys
2359
+ );
2360
+ }
2361
+ parentBoundaryAlias = currentBoundary.alias;
2362
+ let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias);
2363
+ if (nextCurrentBoundaries.length > 0) {
2364
+ drawInsideBoundary(
2365
+ diagram2,
2366
+ parentBoundaryAlias,
2367
+ currentBounds,
2368
+ nextCurrentBoundaries,
2369
+ diagObj
2370
+ );
2371
+ }
2372
+ if (currentBoundary.alias !== "global") {
2373
+ drawBoundary(diagram2, currentBoundary, currentBounds);
2374
+ }
2375
+ parentBounds.data.stopy = Math.max(
2376
+ currentBounds.data.stopy + conf.c4ShapeMargin,
2377
+ parentBounds.data.stopy
2378
+ );
2379
+ parentBounds.data.stopx = Math.max(
2380
+ currentBounds.data.stopx + conf.c4ShapeMargin,
2381
+ parentBounds.data.stopx
2382
+ );
2383
+ globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
2384
+ globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
2385
+ }
2386
+ }
2387
+ const draw = function(_text, id, _version, diagObj) {
2388
+ conf = getConfig().c4;
2389
+ const securityLevel = getConfig().securityLevel;
2390
+ let sandboxElement;
2391
+ if (securityLevel === "sandbox") {
2392
+ sandboxElement = select("#i" + id);
2393
+ }
2394
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
2395
+ let db2 = diagObj.db;
2396
+ diagObj.db.setWrap(conf.wrap);
2397
+ c4ShapeInRow = db2.getC4ShapeInRow();
2398
+ c4BoundaryInRow = db2.getC4BoundaryInRow();
2399
+ log$1.debug(`C:${JSON.stringify(conf, null, 2)}`);
2400
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`);
2401
+ svgDraw.insertComputerIcon(diagram2);
2402
+ svgDraw.insertDatabaseIcon(diagram2);
2403
+ svgDraw.insertClockIcon(diagram2);
2404
+ let screenBounds = new Bounds(diagObj);
2405
+ screenBounds.setData(
2406
+ conf.diagramMarginX,
2407
+ conf.diagramMarginX,
2408
+ conf.diagramMarginY,
2409
+ conf.diagramMarginY
2410
+ );
2411
+ screenBounds.data.widthLimit = screen.availWidth;
2412
+ globalBoundaryMaxX = conf.diagramMarginX;
2413
+ globalBoundaryMaxY = conf.diagramMarginY;
2414
+ const title2 = diagObj.db.getTitle();
2415
+ let currentBoundaries = diagObj.db.getBoundarys("");
2416
+ drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj);
2417
+ svgDraw.insertArrowHead(diagram2);
2418
+ svgDraw.insertArrowEnd(diagram2);
2419
+ svgDraw.insertArrowCrossHead(diagram2);
2420
+ svgDraw.insertArrowFilledHead(diagram2);
2421
+ drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);
2422
+ screenBounds.data.stopx = globalBoundaryMaxX;
2423
+ screenBounds.data.stopy = globalBoundaryMaxY;
2424
+ const box = screenBounds.data;
2425
+ let boxHeight = box.stopy - box.starty;
2426
+ let height = boxHeight + 2 * conf.diagramMarginY;
2427
+ let boxWidth = box.stopx - box.startx;
2428
+ const width = boxWidth + 2 * conf.diagramMarginX;
2429
+ if (title2) {
2430
+ diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY);
2431
+ }
2432
+ configureSvgSize(diagram2, height, width, conf.useMaxWidth);
2433
+ const extraVertForTitle = title2 ? 60 : 0;
2434
+ diagram2.attr(
2435
+ "viewBox",
2436
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
2437
+ );
2438
+ log$1.debug(`models:`, box);
2439
+ };
2440
+ const renderer = {
2441
+ drawPersonOrSystemArray: drawC4ShapeArray,
2442
+ drawBoundary,
2443
+ setConf,
2444
+ draw
2445
+ };
2446
+ const getStyles = (options) => `.person {
2447
+ stroke: ${options.personBorder};
2448
+ fill: ${options.personBkg};
2449
+ }
2450
+ `;
2451
+ const styles = getStyles;
2452
+ const diagram = {
2453
+ parser: parser$1,
2454
+ db,
2455
+ renderer,
2456
+ styles,
2457
+ init: ({ c4, wrap }) => {
2458
+ renderer.setConf(c4);
2459
+ db.setWrap(wrap);
2460
+ }
2461
+ };
2462
+ export {
2463
+ diagram
2464
+ };