@scalar/agent-chat 0.2.3 → 0.2.5

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 (262) hide show
  1. package/LICENSE +21 -0
  2. package/dist/App.vue.d.ts +3 -2
  3. package/dist/App.vue.d.ts.map +1 -1
  4. package/dist/App.vue.js +32 -0
  5. package/dist/App.vue2.js +4 -0
  6. package/dist/Chat.vue.d.ts.map +1 -1
  7. package/dist/Chat.vue.js +23 -0
  8. package/dist/Chat.vue2.js +4 -0
  9. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  10. package/dist/api.d.ts +50 -0
  11. package/dist/api.d.ts.map +1 -0
  12. package/dist/api.js +68 -0
  13. package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
  14. package/dist/components/ApprovalSection.vue.js +7 -0
  15. package/dist/components/ApprovalSection.vue2.js +42 -0
  16. package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
  17. package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
  18. package/dist/components/AuthenticationProvided.vue.js +13 -0
  19. package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
  20. package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
  21. package/dist/components/AuthenticationRequired.vue.js +13 -0
  22. package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
  23. package/dist/components/AutosendPaused.vue.js +13 -0
  24. package/dist/components/ContextItem.vue.d.ts.map +1 -1
  25. package/dist/components/ContextItem.vue.js +7 -0
  26. package/dist/components/ContextItem.vue2.js +19 -0
  27. package/dist/components/ErrorMessage.vue.d.ts +2 -1
  28. package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
  29. package/dist/components/ErrorMessage.vue.js +7 -0
  30. package/dist/components/ErrorMessage.vue2.js +22 -0
  31. package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
  32. package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
  33. package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
  34. package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
  35. package/dist/components/Logo.vue.d.ts.map +1 -1
  36. package/dist/components/Logo.vue.js +23 -0
  37. package/dist/components/PaymentSection.vue.d.ts.map +1 -1
  38. package/dist/components/PaymentSection.vue.js +7 -0
  39. package/dist/components/PaymentSection.vue2.js +34 -0
  40. package/dist/components/RequestApproved.vue.d.ts.map +1 -1
  41. package/dist/components/RequestApproved.vue.js +13 -0
  42. package/dist/components/RequestFailed.vue.d.ts.map +1 -1
  43. package/dist/components/RequestFailed.vue.js +24 -0
  44. package/dist/components/RequestPreview.vue.d.ts +1 -1
  45. package/dist/components/RequestPreview.vue.d.ts.map +1 -1
  46. package/dist/components/RequestPreview.vue.js +7 -0
  47. package/dist/components/RequestPreview.vue2.js +123 -0
  48. package/dist/components/RequestRejected.vue.d.ts.map +1 -1
  49. package/dist/components/RequestRejected.vue.js +22 -0
  50. package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
  51. package/dist/components/RequestSuccess.vue.js +13 -0
  52. package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
  53. package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
  54. package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
  55. package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
  56. package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
  57. package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
  58. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
  59. package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
  60. package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
  61. package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
  62. package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
  63. package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
  64. package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
  65. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
  66. package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
  67. package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
  68. package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
  69. package/dist/components/ResponseBody/helpers/media-types.js +130 -0
  70. package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
  71. package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
  72. package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
  73. package/dist/components/SearchPopover.vue.d.ts +2 -2
  74. package/dist/components/SearchPopover.vue.d.ts.map +1 -1
  75. package/dist/components/SearchPopover.vue.js +7 -0
  76. package/dist/components/SearchPopover.vue2.js +67 -0
  77. package/dist/components/SendingRequest.vue.d.ts.map +1 -1
  78. package/dist/components/SendingRequest.vue.js +24 -0
  79. package/dist/components/Suggestion.vue.d.ts.map +1 -1
  80. package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
  81. package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
  82. package/dist/components/UploadSection.vue.d.ts.map +1 -0
  83. package/dist/components/UploadSection.vue.js +7 -0
  84. package/dist/components/UploadSection.vue2.js +62 -0
  85. package/dist/entities/prompt/constants.d.ts +2 -0
  86. package/dist/entities/prompt/constants.d.ts.map +1 -0
  87. package/dist/entities/prompt/constants.js +4 -0
  88. package/dist/entities/registry/document.d.ts +21 -0
  89. package/dist/entities/registry/document.d.ts.map +1 -0
  90. package/dist/entities/registry/document.js +12 -0
  91. package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
  92. package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
  93. package/dist/entities/tools/ask-for-authentication.js +8 -0
  94. package/dist/entities/tools/constants.d.ts +2 -0
  95. package/dist/entities/tools/constants.d.ts.map +1 -0
  96. package/dist/entities/tools/constants.js +4 -0
  97. package/dist/entities/tools/execute-request.d.ts +42 -0
  98. package/dist/entities/tools/execute-request.d.ts.map +1 -0
  99. package/dist/entities/tools/execute-request.js +11 -0
  100. package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
  101. package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
  102. package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
  103. package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
  104. package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
  105. package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
  106. package/dist/helpers.d.ts +20 -12
  107. package/dist/helpers.d.ts.map +1 -1
  108. package/dist/helpers.js +115 -0
  109. package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
  110. package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
  111. package/dist/hooks/use-chat-approvals.js +21 -0
  112. package/dist/hooks/use-chat-error.d.ts +14 -0
  113. package/dist/hooks/use-chat-error.d.ts.map +1 -0
  114. package/dist/hooks/use-chat-error.js +23 -0
  115. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
  116. package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
  117. package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
  118. package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
  119. package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
  120. package/dist/hooks/use-chat-scroll.js +16 -0
  121. package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
  122. package/dist/hooks/use-search.d.ts.map +1 -0
  123. package/dist/hooks/use-search.js +25 -0
  124. package/dist/hooks/use-term-and-conditions.d.ts +6 -0
  125. package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
  126. package/dist/hooks/use-term-and-conditions.js +16 -0
  127. package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
  128. package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
  129. package/dist/hooks/use-upload-tmp-document.js +64 -0
  130. package/dist/index.d.ts +2 -1
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +2 -1
  133. package/dist/package.json +35 -23
  134. package/dist/registry/add-documents-to-store.d.ts +6 -6
  135. package/dist/registry/add-documents-to-store.d.ts.map +1 -1
  136. package/dist/registry/add-documents-to-store.js +39 -0
  137. package/dist/registry/create-document-name.d.ts +2 -0
  138. package/dist/registry/create-document-name.d.ts.map +1 -0
  139. package/dist/registry/create-document-name.js +6 -0
  140. package/dist/state/state.d.ts +20 -8
  141. package/dist/state/state.d.ts.map +1 -1
  142. package/dist/state/state.js +110 -0
  143. package/dist/style.css +1 -1
  144. package/dist/types.d.ts +2 -0
  145. package/dist/types.d.ts.map +1 -0
  146. package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
  147. package/dist/views/Chat/Chat.vue.js +7 -0
  148. package/dist/views/Chat/Chat.vue2.js +77 -0
  149. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
  150. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
  151. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
  152. package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +89 -0
  153. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
  154. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
  155. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
  156. package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
  157. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
  158. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
  159. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
  160. package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
  161. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
  162. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
  163. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
  164. package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
  165. package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
  166. package/dist/views/Chat/Messages/Text.vue.js +16 -0
  167. package/dist/views/Chat/Messages/Text.vue2.js +4 -0
  168. package/dist/views/Layout.vue.d.ts.map +1 -1
  169. package/dist/views/Layout.vue.js +7 -0
  170. package/dist/views/Layout.vue2.js +23 -0
  171. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  172. package/dist/views/PromptForm.vue.js +7 -0
  173. package/dist/views/PromptForm.vue2.js +212 -0
  174. package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
  175. package/dist/views/Settings/Auth.vue.js +67 -0
  176. package/dist/views/Settings/Auth.vue2.js +4 -0
  177. package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
  178. package/dist/views/Settings/DocSettings.vue.js +7 -0
  179. package/dist/views/Settings/DocSettings.vue2.js +43 -0
  180. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  181. package/dist/views/Settings/Settings.vue.js +8 -0
  182. package/dist/views/Settings/Settings.vue2.js +67 -0
  183. package/dist/views/Start.vue.d.ts.map +1 -1
  184. package/dist/views/Start.vue.js +7 -0
  185. package/dist/views/Start.vue2.js +41 -0
  186. package/package.json +53 -7
  187. package/dist/Tooltip-Cm82QgNj.js +0 -575
  188. package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
  189. package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
  190. package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
  191. package/dist/_basePickBy-hHD8tMGb.js +0 -151
  192. package/dist/_baseUniq-DTF1wuF6.js +0 -614
  193. package/dist/arc-Dw2RQerU.js +0 -83
  194. package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
  195. package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
  196. package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
  197. package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
  198. package/dist/channel-105myCGU.js +0 -5
  199. package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
  200. package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
  201. package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
  202. package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
  203. package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
  204. package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
  205. package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
  206. package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
  207. package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
  208. package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
  209. package/dist/clone-CIIO71O9.js +0 -8
  210. package/dist/components/Endpoint.vue.d.ts.map +0 -1
  211. package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
  212. package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
  213. package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
  214. package/dist/defaultLocale-BEa-49Qz.js +0 -171
  215. package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
  216. package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
  217. package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
  218. package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
  219. package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
  220. package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
  221. package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
  222. package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
  223. package/dist/graph-Dth4IhEK.js +0 -247
  224. package/dist/hooks/useChatApprovals.d.ts.map +0 -1
  225. package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
  226. package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
  227. package/dist/hooks/useChatScroll.d.ts.map +0 -1
  228. package/dist/hooks/useSearch.d.ts.map +0 -1
  229. package/dist/index-BOvT43H8.js +0 -111780
  230. package/dist/index2-B36B-gt0.js +0 -69
  231. package/dist/index3-CtIyYUnG.js +0 -70
  232. package/dist/index4-Dzz91Ao2.js +0 -537
  233. package/dist/index5-Bmz0gMSP.js +0 -590
  234. package/dist/index6-DMB3qTSV.js +0 -196
  235. package/dist/info-NVLQJR56-azt5obk5.js +0 -27
  236. package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
  237. package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
  238. package/dist/init-DjUOC4st.js +0 -16
  239. package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
  240. package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
  241. package/dist/katex-SsTUIUTC.js +0 -11688
  242. package/dist/layout-7TCY8eA2.js +0 -1332
  243. package/dist/linear-DSm5i91N.js +0 -625
  244. package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
  245. package/dist/mermaid.core-QjuzH7xx.js +0 -14164
  246. package/dist/mhchem-XHl7cef5.js +0 -2306
  247. package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
  248. package/dist/ordinal-DfAQgscy.js +0 -61
  249. package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
  250. package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
  251. package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
  252. package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
  253. package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
  254. package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
  255. package/dist/safeRaf-I3a3-dyJ.js +0 -10
  256. package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
  257. package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
  258. package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
  259. package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
  260. package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
  261. package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
  262. package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
@@ -1,1579 +0,0 @@
1
- import { g as Re, d as Se } from "./chunk-TZMSLE5B-BUiROKNR.js";
2
- import { _ as y, s as De, g as Pe, a as Be, b as Ie, c as Pt, d as Yt, l as ue, e as Me, f as Le, h as wt, i as ye, j as Ne, w as Ye, k as Zt, m as de } from "./mermaid.core-QjuzH7xx.js";
3
- var Ut = (function() {
4
- var e = /* @__PURE__ */ y(function(bt, _, x, m) {
5
- for (x = x || {}, m = bt.length; m--; x[bt[m]] = _) ;
6
- return x;
7
- }, "o"), t = [1, 24], s = [1, 25], o = [1, 26], l = [1, 27], a = [1, 28], r = [1, 63], n = [1, 64], i = [1, 65], h = [1, 66], u = [1, 67], p = [1, 68], f = [1, 69], v = [1, 29], T = [1, 30], R = [1, 31], D = [1, 32], I = [1, 33], j = [1, 34], Q = [1, 35], H = [1, 36], q = [1, 37], G = [1, 38], K = [1, 39], J = [1, 40], Z = [1, 41], $ = [1, 42], tt = [1, 43], et = [1, 44], at = [1, 45], it = [1, 46], nt = [1, 47], rt = [1, 48], st = [1, 50], lt = [1, 51], ot = [1, 52], ct = [1, 53], ht = [1, 54], ut = [1, 55], dt = [1, 56], ft = [1, 57], pt = [1, 58], yt = [1, 59], gt = [1, 60], At = [14, 42], Wt = [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], Rt = [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], E = [1, 82], k = [1, 83], A = [1, 84], C = [1, 85], w = [12, 14, 42], se = [12, 14, 33, 42], It = [12, 14, 33, 42, 76, 77, 79, 80], mt = [12, 33], Qt = [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], Ht = {
8
- trace: /* @__PURE__ */ y(function() {
9
- }, "trace"),
10
- yy: {},
11
- 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 },
12
- 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" },
13
- 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]],
14
- performAction: /* @__PURE__ */ y(function(_, x, m, g, O, c, St) {
15
- var d = c.length - 1;
16
- switch (O) {
17
- case 3:
18
- g.setDirection("TB");
19
- break;
20
- case 4:
21
- g.setDirection("BT");
22
- break;
23
- case 5:
24
- g.setDirection("RL");
25
- break;
26
- case 6:
27
- g.setDirection("LR");
28
- break;
29
- case 8:
30
- case 9:
31
- case 10:
32
- case 11:
33
- case 12:
34
- g.setC4Type(c[d - 3]);
35
- break;
36
- case 19:
37
- g.setTitle(c[d].substring(6)), this.$ = c[d].substring(6);
38
- break;
39
- case 20:
40
- g.setAccDescription(c[d].substring(15)), this.$ = c[d].substring(15);
41
- break;
42
- case 21:
43
- this.$ = c[d].trim(), g.setTitle(this.$);
44
- break;
45
- case 22:
46
- case 23:
47
- this.$ = c[d].trim(), g.setAccDescription(this.$);
48
- break;
49
- case 28:
50
- c[d].splice(2, 0, "ENTERPRISE"), g.addPersonOrSystemBoundary(...c[d]), this.$ = c[d];
51
- break;
52
- case 29:
53
- c[d].splice(2, 0, "SYSTEM"), g.addPersonOrSystemBoundary(...c[d]), this.$ = c[d];
54
- break;
55
- case 30:
56
- g.addPersonOrSystemBoundary(...c[d]), this.$ = c[d];
57
- break;
58
- case 31:
59
- c[d].splice(2, 0, "CONTAINER"), g.addContainerBoundary(...c[d]), this.$ = c[d];
60
- break;
61
- case 32:
62
- g.addDeploymentNode("node", ...c[d]), this.$ = c[d];
63
- break;
64
- case 33:
65
- g.addDeploymentNode("nodeL", ...c[d]), this.$ = c[d];
66
- break;
67
- case 34:
68
- g.addDeploymentNode("nodeR", ...c[d]), this.$ = c[d];
69
- break;
70
- case 35:
71
- g.popBoundaryParseStack();
72
- break;
73
- case 39:
74
- g.addPersonOrSystem("person", ...c[d]), this.$ = c[d];
75
- break;
76
- case 40:
77
- g.addPersonOrSystem("external_person", ...c[d]), this.$ = c[d];
78
- break;
79
- case 41:
80
- g.addPersonOrSystem("system", ...c[d]), this.$ = c[d];
81
- break;
82
- case 42:
83
- g.addPersonOrSystem("system_db", ...c[d]), this.$ = c[d];
84
- break;
85
- case 43:
86
- g.addPersonOrSystem("system_queue", ...c[d]), this.$ = c[d];
87
- break;
88
- case 44:
89
- g.addPersonOrSystem("external_system", ...c[d]), this.$ = c[d];
90
- break;
91
- case 45:
92
- g.addPersonOrSystem("external_system_db", ...c[d]), this.$ = c[d];
93
- break;
94
- case 46:
95
- g.addPersonOrSystem("external_system_queue", ...c[d]), this.$ = c[d];
96
- break;
97
- case 47:
98
- g.addContainer("container", ...c[d]), this.$ = c[d];
99
- break;
100
- case 48:
101
- g.addContainer("container_db", ...c[d]), this.$ = c[d];
102
- break;
103
- case 49:
104
- g.addContainer("container_queue", ...c[d]), this.$ = c[d];
105
- break;
106
- case 50:
107
- g.addContainer("external_container", ...c[d]), this.$ = c[d];
108
- break;
109
- case 51:
110
- g.addContainer("external_container_db", ...c[d]), this.$ = c[d];
111
- break;
112
- case 52:
113
- g.addContainer("external_container_queue", ...c[d]), this.$ = c[d];
114
- break;
115
- case 53:
116
- g.addComponent("component", ...c[d]), this.$ = c[d];
117
- break;
118
- case 54:
119
- g.addComponent("component_db", ...c[d]), this.$ = c[d];
120
- break;
121
- case 55:
122
- g.addComponent("component_queue", ...c[d]), this.$ = c[d];
123
- break;
124
- case 56:
125
- g.addComponent("external_component", ...c[d]), this.$ = c[d];
126
- break;
127
- case 57:
128
- g.addComponent("external_component_db", ...c[d]), this.$ = c[d];
129
- break;
130
- case 58:
131
- g.addComponent("external_component_queue", ...c[d]), this.$ = c[d];
132
- break;
133
- case 60:
134
- g.addRel("rel", ...c[d]), this.$ = c[d];
135
- break;
136
- case 61:
137
- g.addRel("birel", ...c[d]), this.$ = c[d];
138
- break;
139
- case 62:
140
- g.addRel("rel_u", ...c[d]), this.$ = c[d];
141
- break;
142
- case 63:
143
- g.addRel("rel_d", ...c[d]), this.$ = c[d];
144
- break;
145
- case 64:
146
- g.addRel("rel_l", ...c[d]), this.$ = c[d];
147
- break;
148
- case 65:
149
- g.addRel("rel_r", ...c[d]), this.$ = c[d];
150
- break;
151
- case 66:
152
- g.addRel("rel_b", ...c[d]), this.$ = c[d];
153
- break;
154
- case 67:
155
- c[d].splice(0, 1), g.addRel("rel", ...c[d]), this.$ = c[d];
156
- break;
157
- case 68:
158
- g.updateElStyle("update_el_style", ...c[d]), this.$ = c[d];
159
- break;
160
- case 69:
161
- g.updateRelStyle("update_rel_style", ...c[d]), this.$ = c[d];
162
- break;
163
- case 70:
164
- g.updateLayoutConfig("update_layout_config", ...c[d]), this.$ = c[d];
165
- break;
166
- case 71:
167
- this.$ = [c[d]];
168
- break;
169
- case 72:
170
- c[d].unshift(c[d - 1]), this.$ = c[d];
171
- break;
172
- case 73:
173
- case 75:
174
- this.$ = c[d].trim();
175
- break;
176
- case 74:
177
- let vt = {};
178
- vt[c[d - 1].trim()] = c[d].trim(), this.$ = vt;
179
- break;
180
- case 76:
181
- this.$ = "";
182
- break;
183
- }
184
- }, "anonymous"),
185
- 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: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 14: [1, 74] }, e(At, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }), e(At, [2, 14]), e(Wt, [2, 16], { 12: [1, 76] }), e(At, [2, 36], { 12: [1, 77] }), e(Rt, [2, 19]), e(Rt, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(Rt, [2, 23]), { 35: 80, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 86, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 87, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 88, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 89, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 90, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 91, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 92, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 93, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 94, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 95, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 96, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 97, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 98, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 99, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 100, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 101, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 102, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 103, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 104, 75: 81, 76: E, 77: k, 79: A, 80: C }, e(w, [2, 59]), { 35: 105, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 106, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 107, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 108, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 109, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 110, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 111, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 112, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 113, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 114, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 115, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 43: 23, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 120, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 121, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 122, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 123, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 124, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 35: 125, 75: 81, 76: E, 77: k, 79: A, 80: C }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(At, [2, 15]), e(Wt, [2, 17], { 21: 22, 19: 130, 22: t, 23: s, 24: o, 26: l, 28: a }), e(At, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: s, 24: o, 26: l, 28: a, 34: r, 36: n, 37: i, 38: h, 39: u, 40: p, 41: f, 44: v, 45: T, 46: R, 47: D, 48: I, 49: j, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: at, 61: it, 62: nt, 63: rt, 64: st, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }), e(Rt, [2, 21]), e(Rt, [2, 22]), e(w, [2, 39]), e(se, [2, 71], { 75: 81, 35: 132, 76: E, 77: k, 79: A, 80: C }), e(It, [2, 73]), { 78: [1, 133] }, e(It, [2, 75]), e(It, [2, 76]), e(w, [2, 40]), e(w, [2, 41]), e(w, [2, 42]), e(w, [2, 43]), e(w, [2, 44]), e(w, [2, 45]), e(w, [2, 46]), e(w, [2, 47]), e(w, [2, 48]), e(w, [2, 49]), e(w, [2, 50]), e(w, [2, 51]), e(w, [2, 52]), e(w, [2, 53]), e(w, [2, 54]), e(w, [2, 55]), e(w, [2, 56]), e(w, [2, 57]), e(w, [2, 58]), e(w, [2, 60]), e(w, [2, 61]), e(w, [2, 62]), e(w, [2, 63]), e(w, [2, 64]), e(w, [2, 65]), e(w, [2, 66]), e(w, [2, 67]), e(w, [2, 68]), e(w, [2, 69]), e(w, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(mt, [2, 28]), e(mt, [2, 29]), e(mt, [2, 30]), e(mt, [2, 31]), e(mt, [2, 32]), e(mt, [2, 33]), e(mt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Wt, [2, 18]), e(At, [2, 38]), e(se, [2, 72]), e(It, [2, 74]), e(w, [2, 24]), e(w, [2, 35]), e(Qt, [2, 25]), e(Qt, [2, 26], { 12: [1, 138] }), e(Qt, [2, 27])],
186
- 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] },
187
- parseError: /* @__PURE__ */ y(function(_, x) {
188
- if (x.recoverable)
189
- this.trace(_);
190
- else {
191
- var m = new Error(_);
192
- throw m.hash = x, m;
193
- }
194
- }, "parseError"),
195
- parse: /* @__PURE__ */ y(function(_) {
196
- var x = this, m = [0], g = [], O = [null], c = [], St = this.table, d = "", vt = 0, le = 0, Ce = 2, oe = 1, we = c.slice.call(arguments, 1), S = Object.create(this.lexer), Et = { yy: {} };
197
- for (var qt in this.yy)
198
- Object.prototype.hasOwnProperty.call(this.yy, qt) && (Et.yy[qt] = this.yy[qt]);
199
- S.setInput(_, Et.yy), Et.yy.lexer = S, Et.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
200
- var Gt = S.yylloc;
201
- c.push(Gt);
202
- var Te = S.options && S.options.ranges;
203
- typeof Et.yy.parseError == "function" ? this.parseError = Et.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
204
- function Oe(M) {
205
- m.length = m.length - 2 * M, O.length = O.length - M, c.length = c.length - M;
206
- }
207
- y(Oe, "popStack");
208
- function ce() {
209
- var M;
210
- return M = g.pop() || S.lex() || oe, typeof M != "number" && (M instanceof Array && (g = M, M = g.pop()), M = x.symbols_[M] || M), M;
211
- }
212
- y(ce, "lex");
213
- for (var B, kt, L, Kt, Ct = {}, Lt, X, he, Nt; ; ) {
214
- if (kt = m[m.length - 1], this.defaultActions[kt] ? L = this.defaultActions[kt] : ((B === null || typeof B > "u") && (B = ce()), L = St[kt] && St[kt][B]), typeof L > "u" || !L.length || !L[0]) {
215
- var Jt = "";
216
- Nt = [];
217
- for (Lt in St[kt])
218
- this.terminals_[Lt] && Lt > Ce && Nt.push("'" + this.terminals_[Lt] + "'");
219
- S.showPosition ? Jt = "Parse error on line " + (vt + 1) + `:
220
- ` + S.showPosition() + `
221
- Expecting ` + Nt.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : Jt = "Parse error on line " + (vt + 1) + ": Unexpected " + (B == oe ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(Jt, {
222
- text: S.match,
223
- token: this.terminals_[B] || B,
224
- line: S.yylineno,
225
- loc: Gt,
226
- expected: Nt
227
- });
228
- }
229
- if (L[0] instanceof Array && L.length > 1)
230
- throw new Error("Parse Error: multiple actions possible at state: " + kt + ", token: " + B);
231
- switch (L[0]) {
232
- case 1:
233
- m.push(B), O.push(S.yytext), c.push(S.yylloc), m.push(L[1]), B = null, le = S.yyleng, d = S.yytext, vt = S.yylineno, Gt = S.yylloc;
234
- break;
235
- case 2:
236
- if (X = this.productions_[L[1]][1], Ct.$ = O[O.length - X], Ct._$ = {
237
- first_line: c[c.length - (X || 1)].first_line,
238
- last_line: c[c.length - 1].last_line,
239
- first_column: c[c.length - (X || 1)].first_column,
240
- last_column: c[c.length - 1].last_column
241
- }, Te && (Ct._$.range = [
242
- c[c.length - (X || 1)].range[0],
243
- c[c.length - 1].range[1]
244
- ]), Kt = this.performAction.apply(Ct, [
245
- d,
246
- le,
247
- vt,
248
- Et.yy,
249
- L[1],
250
- O,
251
- c
252
- ].concat(we)), typeof Kt < "u")
253
- return Kt;
254
- X && (m = m.slice(0, -1 * X * 2), O = O.slice(0, -1 * X), c = c.slice(0, -1 * X)), m.push(this.productions_[L[1]][0]), O.push(Ct.$), c.push(Ct._$), he = St[m[m.length - 2]][m[m.length - 1]], m.push(he);
255
- break;
256
- case 3:
257
- return !0;
258
- }
259
- }
260
- return !0;
261
- }, "parse")
262
- }, Ae = /* @__PURE__ */ (function() {
263
- var bt = {
264
- EOF: 1,
265
- parseError: /* @__PURE__ */ y(function(x, m) {
266
- if (this.yy.parser)
267
- this.yy.parser.parseError(x, m);
268
- else
269
- throw new Error(x);
270
- }, "parseError"),
271
- // resets the lexer, sets new input
272
- setInput: /* @__PURE__ */ y(function(_, x) {
273
- return this.yy = x || this.yy || {}, this._input = _, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
274
- first_line: 1,
275
- first_column: 0,
276
- last_line: 1,
277
- last_column: 0
278
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
279
- }, "setInput"),
280
- // consumes and returns one char from the input
281
- input: /* @__PURE__ */ y(function() {
282
- var _ = this._input[0];
283
- this.yytext += _, this.yyleng++, this.offset++, this.match += _, this.matched += _;
284
- var x = _.match(/(?:\r\n?|\n).*/g);
285
- return x ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), _;
286
- }, "input"),
287
- // unshifts one char (or a string) into the input
288
- unput: /* @__PURE__ */ y(function(_) {
289
- var x = _.length, m = _.split(/(?:\r\n?|\n)/g);
290
- this._input = _ + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - x), this.offset -= x;
291
- var g = this.match.split(/(?:\r\n?|\n)/g);
292
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), m.length - 1 && (this.yylineno -= m.length - 1);
293
- var O = this.yylloc.range;
294
- return this.yylloc = {
295
- first_line: this.yylloc.first_line,
296
- last_line: this.yylineno + 1,
297
- first_column: this.yylloc.first_column,
298
- last_column: m ? (m.length === g.length ? this.yylloc.first_column : 0) + g[g.length - m.length].length - m[0].length : this.yylloc.first_column - x
299
- }, this.options.ranges && (this.yylloc.range = [O[0], O[0] + this.yyleng - x]), this.yyleng = this.yytext.length, this;
300
- }, "unput"),
301
- // When called from action, caches matched text and appends it on next action
302
- more: /* @__PURE__ */ y(function() {
303
- return this._more = !0, this;
304
- }, "more"),
305
- // 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.
306
- reject: /* @__PURE__ */ y(function() {
307
- if (this.options.backtrack_lexer)
308
- this._backtrack = !0;
309
- else
310
- 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).
311
- ` + this.showPosition(), {
312
- text: "",
313
- token: null,
314
- line: this.yylineno
315
- });
316
- return this;
317
- }, "reject"),
318
- // retain first n characters of the match
319
- less: /* @__PURE__ */ y(function(_) {
320
- this.unput(this.match.slice(_));
321
- }, "less"),
322
- // displays already matched input, i.e. for error messages
323
- pastInput: /* @__PURE__ */ y(function() {
324
- var _ = this.matched.substr(0, this.matched.length - this.match.length);
325
- return (_.length > 20 ? "..." : "") + _.substr(-20).replace(/\n/g, "");
326
- }, "pastInput"),
327
- // displays upcoming input, i.e. for error messages
328
- upcomingInput: /* @__PURE__ */ y(function() {
329
- var _ = this.match;
330
- return _.length < 20 && (_ += this._input.substr(0, 20 - _.length)), (_.substr(0, 20) + (_.length > 20 ? "..." : "")).replace(/\n/g, "");
331
- }, "upcomingInput"),
332
- // displays the character position where the lexing error occurred, i.e. for error messages
333
- showPosition: /* @__PURE__ */ y(function() {
334
- var _ = this.pastInput(), x = new Array(_.length + 1).join("-");
335
- return _ + this.upcomingInput() + `
336
- ` + x + "^";
337
- }, "showPosition"),
338
- // test the lexed token: return FALSE when not a match, otherwise return token
339
- test_match: /* @__PURE__ */ y(function(_, x) {
340
- var m, g, O;
341
- if (this.options.backtrack_lexer && (O = {
342
- yylineno: this.yylineno,
343
- yylloc: {
344
- first_line: this.yylloc.first_line,
345
- last_line: this.last_line,
346
- first_column: this.yylloc.first_column,
347
- last_column: this.yylloc.last_column
348
- },
349
- yytext: this.yytext,
350
- match: this.match,
351
- matches: this.matches,
352
- matched: this.matched,
353
- yyleng: this.yyleng,
354
- offset: this.offset,
355
- _more: this._more,
356
- _input: this._input,
357
- yy: this.yy,
358
- conditionStack: this.conditionStack.slice(0),
359
- done: this.done
360
- }, this.options.ranges && (O.yylloc.range = this.yylloc.range.slice(0))), g = _[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
361
- first_line: this.yylloc.last_line,
362
- last_line: this.yylineno + 1,
363
- first_column: this.yylloc.last_column,
364
- last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + _[0].length
365
- }, this.yytext += _[0], this.match += _[0], this.matches = _, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(_[0].length), this.matched += _[0], m = this.performAction.call(this, this.yy, this, x, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), m)
366
- return m;
367
- if (this._backtrack) {
368
- for (var c in O)
369
- this[c] = O[c];
370
- return !1;
371
- }
372
- return !1;
373
- }, "test_match"),
374
- // return next match in input
375
- next: /* @__PURE__ */ y(function() {
376
- if (this.done)
377
- return this.EOF;
378
- this._input || (this.done = !0);
379
- var _, x, m, g;
380
- this._more || (this.yytext = "", this.match = "");
381
- for (var O = this._currentRules(), c = 0; c < O.length; c++)
382
- if (m = this._input.match(this.rules[O[c]]), m && (!x || m[0].length > x[0].length)) {
383
- if (x = m, g = c, this.options.backtrack_lexer) {
384
- if (_ = this.test_match(m, O[c]), _ !== !1)
385
- return _;
386
- if (this._backtrack) {
387
- x = !1;
388
- continue;
389
- } else
390
- return !1;
391
- } else if (!this.options.flex)
392
- break;
393
- }
394
- return x ? (_ = this.test_match(x, O[g]), _ !== !1 ? _ : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
395
- ` + this.showPosition(), {
396
- text: "",
397
- token: null,
398
- line: this.yylineno
399
- });
400
- }, "next"),
401
- // return next match that has a token
402
- lex: /* @__PURE__ */ y(function() {
403
- var x = this.next();
404
- return x || this.lex();
405
- }, "lex"),
406
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
407
- begin: /* @__PURE__ */ y(function(x) {
408
- this.conditionStack.push(x);
409
- }, "begin"),
410
- // pop the previously active lexer condition state off the condition stack
411
- popState: /* @__PURE__ */ y(function() {
412
- var x = this.conditionStack.length - 1;
413
- return x > 0 ? this.conditionStack.pop() : this.conditionStack[0];
414
- }, "popState"),
415
- // produce the lexer rule set which is active for the currently active lexer condition state
416
- _currentRules: /* @__PURE__ */ y(function() {
417
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
418
- }, "_currentRules"),
419
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
420
- topState: /* @__PURE__ */ y(function(x) {
421
- return x = this.conditionStack.length - 1 - Math.abs(x || 0), x >= 0 ? this.conditionStack[x] : "INITIAL";
422
- }, "topState"),
423
- // alias for begin(condition)
424
- pushState: /* @__PURE__ */ y(function(x) {
425
- this.begin(x);
426
- }, "pushState"),
427
- // return the number of states currently on the stack
428
- stateStackSize: /* @__PURE__ */ y(function() {
429
- return this.conditionStack.length;
430
- }, "stateStackSize"),
431
- options: {},
432
- performAction: /* @__PURE__ */ y(function(x, m, g, O) {
433
- switch (g) {
434
- case 0:
435
- return 6;
436
- case 1:
437
- return 7;
438
- case 2:
439
- return 8;
440
- case 3:
441
- return 9;
442
- case 4:
443
- return 22;
444
- case 5:
445
- return 23;
446
- case 6:
447
- return this.begin("acc_title"), 24;
448
- case 7:
449
- return this.popState(), "acc_title_value";
450
- case 8:
451
- return this.begin("acc_descr"), 26;
452
- case 9:
453
- return this.popState(), "acc_descr_value";
454
- case 10:
455
- this.begin("acc_descr_multiline");
456
- break;
457
- case 11:
458
- this.popState();
459
- break;
460
- case 12:
461
- return "acc_descr_multiline_value";
462
- case 13:
463
- break;
464
- case 14:
465
- break;
466
- case 15:
467
- return 12;
468
- case 16:
469
- break;
470
- case 17:
471
- return 11;
472
- case 18:
473
- return 15;
474
- case 19:
475
- return 16;
476
- case 20:
477
- return 17;
478
- case 21:
479
- return 18;
480
- case 22:
481
- return this.begin("person_ext"), 45;
482
- case 23:
483
- return this.begin("person"), 44;
484
- case 24:
485
- return this.begin("system_ext_queue"), 51;
486
- case 25:
487
- return this.begin("system_ext_db"), 50;
488
- case 26:
489
- return this.begin("system_ext"), 49;
490
- case 27:
491
- return this.begin("system_queue"), 48;
492
- case 28:
493
- return this.begin("system_db"), 47;
494
- case 29:
495
- return this.begin("system"), 46;
496
- case 30:
497
- return this.begin("boundary"), 37;
498
- case 31:
499
- return this.begin("enterprise_boundary"), 34;
500
- case 32:
501
- return this.begin("system_boundary"), 36;
502
- case 33:
503
- return this.begin("container_ext_queue"), 57;
504
- case 34:
505
- return this.begin("container_ext_db"), 56;
506
- case 35:
507
- return this.begin("container_ext"), 55;
508
- case 36:
509
- return this.begin("container_queue"), 54;
510
- case 37:
511
- return this.begin("container_db"), 53;
512
- case 38:
513
- return this.begin("container"), 52;
514
- case 39:
515
- return this.begin("container_boundary"), 38;
516
- case 40:
517
- return this.begin("component_ext_queue"), 63;
518
- case 41:
519
- return this.begin("component_ext_db"), 62;
520
- case 42:
521
- return this.begin("component_ext"), 61;
522
- case 43:
523
- return this.begin("component_queue"), 60;
524
- case 44:
525
- return this.begin("component_db"), 59;
526
- case 45:
527
- return this.begin("component"), 58;
528
- case 46:
529
- return this.begin("node"), 39;
530
- case 47:
531
- return this.begin("node"), 39;
532
- case 48:
533
- return this.begin("node_l"), 40;
534
- case 49:
535
- return this.begin("node_r"), 41;
536
- case 50:
537
- return this.begin("rel"), 64;
538
- case 51:
539
- return this.begin("birel"), 65;
540
- case 52:
541
- return this.begin("rel_u"), 66;
542
- case 53:
543
- return this.begin("rel_u"), 66;
544
- case 54:
545
- return this.begin("rel_d"), 67;
546
- case 55:
547
- return this.begin("rel_d"), 67;
548
- case 56:
549
- return this.begin("rel_l"), 68;
550
- case 57:
551
- return this.begin("rel_l"), 68;
552
- case 58:
553
- return this.begin("rel_r"), 69;
554
- case 59:
555
- return this.begin("rel_r"), 69;
556
- case 60:
557
- return this.begin("rel_b"), 70;
558
- case 61:
559
- return this.begin("rel_index"), 71;
560
- case 62:
561
- return this.begin("update_el_style"), 72;
562
- case 63:
563
- return this.begin("update_rel_style"), 73;
564
- case 64:
565
- return this.begin("update_layout_config"), 74;
566
- case 65:
567
- return "EOF_IN_STRUCT";
568
- case 66:
569
- return this.begin("attribute"), "ATTRIBUTE_EMPTY";
570
- case 67:
571
- this.begin("attribute");
572
- break;
573
- case 68:
574
- this.popState(), this.popState();
575
- break;
576
- case 69:
577
- return 80;
578
- case 70:
579
- break;
580
- case 71:
581
- return 80;
582
- case 72:
583
- this.begin("string");
584
- break;
585
- case 73:
586
- this.popState();
587
- break;
588
- case 74:
589
- return "STR";
590
- case 75:
591
- this.begin("string_kv");
592
- break;
593
- case 76:
594
- return this.begin("string_kv_key"), "STR_KEY";
595
- case 77:
596
- this.popState(), this.begin("string_kv_value");
597
- break;
598
- case 78:
599
- return "STR_VALUE";
600
- case 79:
601
- this.popState(), this.popState();
602
- break;
603
- case 80:
604
- return "STR";
605
- case 81:
606
- return "LBRACE";
607
- case 82:
608
- return "RBRACE";
609
- case 83:
610
- return "SPACE";
611
- case 84:
612
- return "EOL";
613
- case 85:
614
- return 14;
615
- }
616
- }, "anonymous"),
617
- 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]+)/, /^(?:$)/],
618
- conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, 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: !0 } }
619
- };
620
- return bt;
621
- })();
622
- Ht.lexer = Ae;
623
- function Mt() {
624
- this.yy = {};
625
- }
626
- return y(Mt, "Parser"), Mt.prototype = Ht, Ht.Parser = Mt, new Mt();
627
- })();
628
- Ut.parser = Ut;
629
- var je = Ut, F = [], _t = [""], P = "global", U = "", z = [
630
- {
631
- alias: "global",
632
- label: { text: "global" },
633
- type: { text: "global" },
634
- tags: null,
635
- link: null,
636
- parentBoundary: ""
637
- }
638
- ], Bt = [], ae = "", ie = !1, Ft = 4, Vt = 2, ge, Ue = /* @__PURE__ */ y(function() {
639
- return ge;
640
- }, "getC4Type"), Fe = /* @__PURE__ */ y(function(e) {
641
- ge = ye(e, Pt());
642
- }, "setC4Type"), Ve = /* @__PURE__ */ y(function(e, t, s, o, l, a, r, n, i) {
643
- if (e == null || t === void 0 || t === null || s === void 0 || s === null || o === void 0 || o === null)
644
- return;
645
- let h = {};
646
- const u = Bt.find((p) => p.from === t && p.to === s);
647
- if (u ? h = u : Bt.push(h), h.type = e, h.from = t, h.to = s, h.label = { text: o }, l == null)
648
- h.techn = { text: "" };
649
- else if (typeof l == "object") {
650
- let [p, f] = Object.entries(l)[0];
651
- h[p] = { text: f };
652
- } else
653
- h.techn = { text: l };
654
- if (a == null)
655
- h.descr = { text: "" };
656
- else if (typeof a == "object") {
657
- let [p, f] = Object.entries(a)[0];
658
- h[p] = { text: f };
659
- } else
660
- h.descr = { text: a };
661
- if (typeof r == "object") {
662
- let [p, f] = Object.entries(r)[0];
663
- h[p] = f;
664
- } else
665
- h.sprite = r;
666
- if (typeof n == "object") {
667
- let [p, f] = Object.entries(n)[0];
668
- h[p] = f;
669
- } else
670
- h.tags = n;
671
- if (typeof i == "object") {
672
- let [p, f] = Object.entries(i)[0];
673
- h[p] = f;
674
- } else
675
- h.link = i;
676
- h.wrap = xt();
677
- }, "addRel"), ze = /* @__PURE__ */ y(function(e, t, s, o, l, a, r) {
678
- if (t === null || s === null)
679
- return;
680
- let n = {};
681
- const i = F.find((h) => h.alias === t);
682
- if (i && t === i.alias ? n = i : (n.alias = t, F.push(n)), s == null ? n.label = { text: "" } : n.label = { text: s }, o == null)
683
- n.descr = { text: "" };
684
- else if (typeof o == "object") {
685
- let [h, u] = Object.entries(o)[0];
686
- n[h] = { text: u };
687
- } else
688
- n.descr = { text: o };
689
- if (typeof l == "object") {
690
- let [h, u] = Object.entries(l)[0];
691
- n[h] = u;
692
- } else
693
- n.sprite = l;
694
- if (typeof a == "object") {
695
- let [h, u] = Object.entries(a)[0];
696
- n[h] = u;
697
- } else
698
- n.tags = a;
699
- if (typeof r == "object") {
700
- let [h, u] = Object.entries(r)[0];
701
- n[h] = u;
702
- } else
703
- n.link = r;
704
- n.typeC4Shape = { text: e }, n.parentBoundary = P, n.wrap = xt();
705
- }, "addPersonOrSystem"), Xe = /* @__PURE__ */ y(function(e, t, s, o, l, a, r, n) {
706
- if (t === null || s === null)
707
- return;
708
- let i = {};
709
- const h = F.find((u) => u.alias === t);
710
- if (h && t === h.alias ? i = h : (i.alias = t, F.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
711
- i.techn = { text: "" };
712
- else if (typeof o == "object") {
713
- let [u, p] = Object.entries(o)[0];
714
- i[u] = { text: p };
715
- } else
716
- i.techn = { text: o };
717
- if (l == null)
718
- i.descr = { text: "" };
719
- else if (typeof l == "object") {
720
- let [u, p] = Object.entries(l)[0];
721
- i[u] = { text: p };
722
- } else
723
- i.descr = { text: l };
724
- if (typeof a == "object") {
725
- let [u, p] = Object.entries(a)[0];
726
- i[u] = p;
727
- } else
728
- i.sprite = a;
729
- if (typeof r == "object") {
730
- let [u, p] = Object.entries(r)[0];
731
- i[u] = p;
732
- } else
733
- i.tags = r;
734
- if (typeof n == "object") {
735
- let [u, p] = Object.entries(n)[0];
736
- i[u] = p;
737
- } else
738
- i.link = n;
739
- i.wrap = xt(), i.typeC4Shape = { text: e }, i.parentBoundary = P;
740
- }, "addContainer"), We = /* @__PURE__ */ y(function(e, t, s, o, l, a, r, n) {
741
- if (t === null || s === null)
742
- return;
743
- let i = {};
744
- const h = F.find((u) => u.alias === t);
745
- if (h && t === h.alias ? i = h : (i.alias = t, F.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
746
- i.techn = { text: "" };
747
- else if (typeof o == "object") {
748
- let [u, p] = Object.entries(o)[0];
749
- i[u] = { text: p };
750
- } else
751
- i.techn = { text: o };
752
- if (l == null)
753
- i.descr = { text: "" };
754
- else if (typeof l == "object") {
755
- let [u, p] = Object.entries(l)[0];
756
- i[u] = { text: p };
757
- } else
758
- i.descr = { text: l };
759
- if (typeof a == "object") {
760
- let [u, p] = Object.entries(a)[0];
761
- i[u] = p;
762
- } else
763
- i.sprite = a;
764
- if (typeof r == "object") {
765
- let [u, p] = Object.entries(r)[0];
766
- i[u] = p;
767
- } else
768
- i.tags = r;
769
- if (typeof n == "object") {
770
- let [u, p] = Object.entries(n)[0];
771
- i[u] = p;
772
- } else
773
- i.link = n;
774
- i.wrap = xt(), i.typeC4Shape = { text: e }, i.parentBoundary = P;
775
- }, "addComponent"), Qe = /* @__PURE__ */ y(function(e, t, s, o, l) {
776
- if (e === null || t === null)
777
- return;
778
- let a = {};
779
- const r = z.find((n) => n.alias === e);
780
- if (r && e === r.alias ? a = r : (a.alias = e, z.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
781
- a.type = { text: "system" };
782
- else if (typeof s == "object") {
783
- let [n, i] = Object.entries(s)[0];
784
- a[n] = { text: i };
785
- } else
786
- a.type = { text: s };
787
- if (typeof o == "object") {
788
- let [n, i] = Object.entries(o)[0];
789
- a[n] = i;
790
- } else
791
- a.tags = o;
792
- if (typeof l == "object") {
793
- let [n, i] = Object.entries(l)[0];
794
- a[n] = i;
795
- } else
796
- a.link = l;
797
- a.parentBoundary = P, a.wrap = xt(), U = P, P = e, _t.push(U);
798
- }, "addPersonOrSystemBoundary"), He = /* @__PURE__ */ y(function(e, t, s, o, l) {
799
- if (e === null || t === null)
800
- return;
801
- let a = {};
802
- const r = z.find((n) => n.alias === e);
803
- if (r && e === r.alias ? a = r : (a.alias = e, z.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
804
- a.type = { text: "container" };
805
- else if (typeof s == "object") {
806
- let [n, i] = Object.entries(s)[0];
807
- a[n] = { text: i };
808
- } else
809
- a.type = { text: s };
810
- if (typeof o == "object") {
811
- let [n, i] = Object.entries(o)[0];
812
- a[n] = i;
813
- } else
814
- a.tags = o;
815
- if (typeof l == "object") {
816
- let [n, i] = Object.entries(l)[0];
817
- a[n] = i;
818
- } else
819
- a.link = l;
820
- a.parentBoundary = P, a.wrap = xt(), U = P, P = e, _t.push(U);
821
- }, "addContainerBoundary"), qe = /* @__PURE__ */ y(function(e, t, s, o, l, a, r, n) {
822
- if (t === null || s === null)
823
- return;
824
- let i = {};
825
- const h = z.find((u) => u.alias === t);
826
- if (h && t === h.alias ? i = h : (i.alias = t, z.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
827
- i.type = { text: "node" };
828
- else if (typeof o == "object") {
829
- let [u, p] = Object.entries(o)[0];
830
- i[u] = { text: p };
831
- } else
832
- i.type = { text: o };
833
- if (l == null)
834
- i.descr = { text: "" };
835
- else if (typeof l == "object") {
836
- let [u, p] = Object.entries(l)[0];
837
- i[u] = { text: p };
838
- } else
839
- i.descr = { text: l };
840
- if (typeof r == "object") {
841
- let [u, p] = Object.entries(r)[0];
842
- i[u] = p;
843
- } else
844
- i.tags = r;
845
- if (typeof n == "object") {
846
- let [u, p] = Object.entries(n)[0];
847
- i[u] = p;
848
- } else
849
- i.link = n;
850
- i.nodeType = e, i.parentBoundary = P, i.wrap = xt(), U = P, P = t, _t.push(U);
851
- }, "addDeploymentNode"), Ge = /* @__PURE__ */ y(function() {
852
- P = U, _t.pop(), U = _t.pop(), _t.push(U);
853
- }, "popBoundaryParseStack"), Ke = /* @__PURE__ */ y(function(e, t, s, o, l, a, r, n, i, h, u) {
854
- let p = F.find((f) => f.alias === t);
855
- if (!(p === void 0 && (p = z.find((f) => f.alias === t), p === void 0))) {
856
- if (s != null)
857
- if (typeof s == "object") {
858
- let [f, v] = Object.entries(s)[0];
859
- p[f] = v;
860
- } else
861
- p.bgColor = s;
862
- if (o != null)
863
- if (typeof o == "object") {
864
- let [f, v] = Object.entries(o)[0];
865
- p[f] = v;
866
- } else
867
- p.fontColor = o;
868
- if (l != null)
869
- if (typeof l == "object") {
870
- let [f, v] = Object.entries(l)[0];
871
- p[f] = v;
872
- } else
873
- p.borderColor = l;
874
- if (a != null)
875
- if (typeof a == "object") {
876
- let [f, v] = Object.entries(a)[0];
877
- p[f] = v;
878
- } else
879
- p.shadowing = a;
880
- if (r != null)
881
- if (typeof r == "object") {
882
- let [f, v] = Object.entries(r)[0];
883
- p[f] = v;
884
- } else
885
- p.shape = r;
886
- if (n != null)
887
- if (typeof n == "object") {
888
- let [f, v] = Object.entries(n)[0];
889
- p[f] = v;
890
- } else
891
- p.sprite = n;
892
- if (i != null)
893
- if (typeof i == "object") {
894
- let [f, v] = Object.entries(i)[0];
895
- p[f] = v;
896
- } else
897
- p.techn = i;
898
- if (h != null)
899
- if (typeof h == "object") {
900
- let [f, v] = Object.entries(h)[0];
901
- p[f] = v;
902
- } else
903
- p.legendText = h;
904
- if (u != null)
905
- if (typeof u == "object") {
906
- let [f, v] = Object.entries(u)[0];
907
- p[f] = v;
908
- } else
909
- p.legendSprite = u;
910
- }
911
- }, "updateElStyle"), Je = /* @__PURE__ */ y(function(e, t, s, o, l, a, r) {
912
- const n = Bt.find((i) => i.from === t && i.to === s);
913
- if (n !== void 0) {
914
- if (o != null)
915
- if (typeof o == "object") {
916
- let [i, h] = Object.entries(o)[0];
917
- n[i] = h;
918
- } else
919
- n.textColor = o;
920
- if (l != null)
921
- if (typeof l == "object") {
922
- let [i, h] = Object.entries(l)[0];
923
- n[i] = h;
924
- } else
925
- n.lineColor = l;
926
- if (a != null)
927
- if (typeof a == "object") {
928
- let [i, h] = Object.entries(a)[0];
929
- n[i] = parseInt(h);
930
- } else
931
- n.offsetX = parseInt(a);
932
- if (r != null)
933
- if (typeof r == "object") {
934
- let [i, h] = Object.entries(r)[0];
935
- n[i] = parseInt(h);
936
- } else
937
- n.offsetY = parseInt(r);
938
- }
939
- }, "updateRelStyle"), Ze = /* @__PURE__ */ y(function(e, t, s) {
940
- let o = Ft, l = Vt;
941
- if (typeof t == "object") {
942
- const a = Object.values(t)[0];
943
- o = parseInt(a);
944
- } else
945
- o = parseInt(t);
946
- if (typeof s == "object") {
947
- const a = Object.values(s)[0];
948
- l = parseInt(a);
949
- } else
950
- l = parseInt(s);
951
- o >= 1 && (Ft = o), l >= 1 && (Vt = l);
952
- }, "updateLayoutConfig"), $e = /* @__PURE__ */ y(function() {
953
- return Ft;
954
- }, "getC4ShapeInRow"), t0 = /* @__PURE__ */ y(function() {
955
- return Vt;
956
- }, "getC4BoundaryInRow"), e0 = /* @__PURE__ */ y(function() {
957
- return P;
958
- }, "getCurrentBoundaryParse"), a0 = /* @__PURE__ */ y(function() {
959
- return U;
960
- }, "getParentBoundaryParse"), be = /* @__PURE__ */ y(function(e) {
961
- return e == null ? F : F.filter((t) => t.parentBoundary === e);
962
- }, "getC4ShapeArray"), i0 = /* @__PURE__ */ y(function(e) {
963
- return F.find((t) => t.alias === e);
964
- }, "getC4Shape"), n0 = /* @__PURE__ */ y(function(e) {
965
- return Object.keys(be(e));
966
- }, "getC4ShapeKeys"), _e = /* @__PURE__ */ y(function(e) {
967
- return e == null ? z : z.filter((t) => t.parentBoundary === e);
968
- }, "getBoundaries"), r0 = _e, s0 = /* @__PURE__ */ y(function() {
969
- return Bt;
970
- }, "getRels"), l0 = /* @__PURE__ */ y(function() {
971
- return ae;
972
- }, "getTitle"), o0 = /* @__PURE__ */ y(function(e) {
973
- ie = e;
974
- }, "setWrap"), xt = /* @__PURE__ */ y(function() {
975
- return ie;
976
- }, "autoWrap"), c0 = /* @__PURE__ */ y(function() {
977
- F = [], z = [
978
- {
979
- alias: "global",
980
- label: { text: "global" },
981
- type: { text: "global" },
982
- tags: null,
983
- link: null,
984
- parentBoundary: ""
985
- }
986
- ], U = "", P = "global", _t = [""], Bt = [], _t = [""], ae = "", ie = !1, Ft = 4, Vt = 2;
987
- }, "clear"), h0 = {
988
- SOLID: 0,
989
- DOTTED: 1,
990
- NOTE: 2,
991
- SOLID_CROSS: 3,
992
- DOTTED_CROSS: 4,
993
- SOLID_OPEN: 5,
994
- DOTTED_OPEN: 6,
995
- LOOP_START: 10,
996
- LOOP_END: 11,
997
- ALT_START: 12,
998
- ALT_ELSE: 13,
999
- ALT_END: 14,
1000
- OPT_START: 15,
1001
- OPT_END: 16,
1002
- ACTIVE_START: 17,
1003
- ACTIVE_END: 18,
1004
- PAR_START: 19,
1005
- PAR_AND: 20,
1006
- PAR_END: 21,
1007
- RECT_START: 22,
1008
- RECT_END: 23,
1009
- SOLID_POINT: 24,
1010
- DOTTED_POINT: 25
1011
- }, u0 = {
1012
- FILLED: 0,
1013
- OPEN: 1
1014
- }, d0 = {
1015
- LEFTOF: 0,
1016
- RIGHTOF: 1,
1017
- OVER: 2
1018
- }, f0 = /* @__PURE__ */ y(function(e) {
1019
- ae = ye(e, Pt());
1020
- }, "setTitle"), $t = {
1021
- addPersonOrSystem: ze,
1022
- addPersonOrSystemBoundary: Qe,
1023
- addContainer: Xe,
1024
- addContainerBoundary: He,
1025
- addComponent: We,
1026
- addDeploymentNode: qe,
1027
- popBoundaryParseStack: Ge,
1028
- addRel: Ve,
1029
- updateElStyle: Ke,
1030
- updateRelStyle: Je,
1031
- updateLayoutConfig: Ze,
1032
- autoWrap: xt,
1033
- setWrap: o0,
1034
- getC4ShapeArray: be,
1035
- getC4Shape: i0,
1036
- getC4ShapeKeys: n0,
1037
- getBoundaries: _e,
1038
- getBoundarys: r0,
1039
- getCurrentBoundaryParse: e0,
1040
- getParentBoundaryParse: a0,
1041
- getRels: s0,
1042
- getTitle: l0,
1043
- getC4Type: Ue,
1044
- getC4ShapeInRow: $e,
1045
- getC4BoundaryInRow: t0,
1046
- setAccTitle: Ie,
1047
- getAccTitle: Be,
1048
- getAccDescription: Pe,
1049
- setAccDescription: De,
1050
- getConfig: /* @__PURE__ */ y(() => Pt().c4, "getConfig"),
1051
- clear: c0,
1052
- LINETYPE: h0,
1053
- ARROWTYPE: u0,
1054
- PLACEMENT: d0,
1055
- setTitle: f0,
1056
- setC4Type: Fe
1057
- // apply,
1058
- }, ne = /* @__PURE__ */ y(function(e, t) {
1059
- return Se(e, t);
1060
- }, "drawRect"), xe = /* @__PURE__ */ y(function(e, t, s, o, l, a) {
1061
- const r = e.append("image");
1062
- r.attr("width", t), r.attr("height", s), r.attr("x", o), r.attr("y", l);
1063
- let n = a.startsWith("data:image/png;base64") ? a : Ne.sanitizeUrl(a);
1064
- r.attr("xlink:href", n);
1065
- }, "drawImage"), p0 = /* @__PURE__ */ y((e, t, s) => {
1066
- const o = e.append("g");
1067
- let l = 0;
1068
- for (let a of t) {
1069
- let r = a.textColor ? a.textColor : "#444444", n = a.lineColor ? a.lineColor : "#444444", i = a.offsetX ? parseInt(a.offsetX) : 0, h = a.offsetY ? parseInt(a.offsetY) : 0, u = "";
1070
- if (l === 0) {
1071
- let f = o.append("line");
1072
- f.attr("x1", a.startPoint.x), f.attr("y1", a.startPoint.y), f.attr("x2", a.endPoint.x), f.attr("y2", a.endPoint.y), f.attr("stroke-width", "1"), f.attr("stroke", n), f.style("fill", "none"), a.type !== "rel_b" && f.attr("marker-end", "url(" + u + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + u + "#arrowend)"), l = -1;
1073
- } else {
1074
- let f = o.append("path");
1075
- f.attr("fill", "none").attr("stroke-width", "1").attr("stroke", n).attr(
1076
- "d",
1077
- "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
1078
- "controlx",
1079
- a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
1080
- ).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
1081
- ), a.type !== "rel_b" && f.attr("marker-end", "url(" + u + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + u + "#arrowend)");
1082
- }
1083
- let p = s.messageFont();
1084
- W(s)(
1085
- a.label.text,
1086
- o,
1087
- Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1088
- Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + h,
1089
- a.label.width,
1090
- a.label.height,
1091
- { fill: r },
1092
- p
1093
- ), a.techn && a.techn.text !== "" && (p = s.messageFont(), W(s)(
1094
- "[" + a.techn.text + "]",
1095
- o,
1096
- Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
1097
- Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + s.messageFontSize + 5 + h,
1098
- Math.max(a.label.width, a.techn.width),
1099
- a.techn.height,
1100
- { fill: r, "font-style": "italic" },
1101
- p
1102
- ));
1103
- }
1104
- }, "drawRels"), y0 = /* @__PURE__ */ y(function(e, t, s) {
1105
- const o = e.append("g");
1106
- let l = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", r = t.fontColor ? t.fontColor : "black", n = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1107
- t.nodeType && (n = { "stroke-width": 1 });
1108
- let i = {
1109
- x: t.x,
1110
- y: t.y,
1111
- fill: l,
1112
- stroke: a,
1113
- width: t.width,
1114
- height: t.height,
1115
- rx: 2.5,
1116
- ry: 2.5,
1117
- attrs: n
1118
- };
1119
- ne(o, i);
1120
- let h = s.boundaryFont();
1121
- h.fontWeight = "bold", h.fontSize = h.fontSize + 2, h.fontColor = r, W(s)(
1122
- t.label.text,
1123
- o,
1124
- t.x,
1125
- t.y + t.label.Y,
1126
- t.width,
1127
- t.height,
1128
- { fill: "#444444" },
1129
- h
1130
- ), t.type && t.type.text !== "" && (h = s.boundaryFont(), h.fontColor = r, W(s)(
1131
- t.type.text,
1132
- o,
1133
- t.x,
1134
- t.y + t.type.Y,
1135
- t.width,
1136
- t.height,
1137
- { fill: "#444444" },
1138
- h
1139
- )), t.descr && t.descr.text !== "" && (h = s.boundaryFont(), h.fontSize = h.fontSize - 2, h.fontColor = r, W(s)(
1140
- t.descr.text,
1141
- o,
1142
- t.x,
1143
- t.y + t.descr.Y,
1144
- t.width,
1145
- t.height,
1146
- { fill: "#444444" },
1147
- h
1148
- ));
1149
- }, "drawBoundary"), g0 = /* @__PURE__ */ y(function(e, t, s) {
1150
- let o = t.bgColor ? t.bgColor : s[t.typeC4Shape.text + "_bg_color"], l = t.borderColor ? t.borderColor : s[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1151
- switch (t.typeC4Shape.text) {
1152
- case "person":
1153
- r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1154
- break;
1155
- case "external_person":
1156
- r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1157
- break;
1158
- }
1159
- const n = e.append("g");
1160
- n.attr("class", "person-man");
1161
- const i = Re();
1162
- switch (t.typeC4Shape.text) {
1163
- case "person":
1164
- case "external_person":
1165
- case "system":
1166
- case "external_system":
1167
- case "container":
1168
- case "external_container":
1169
- case "component":
1170
- case "external_component":
1171
- i.x = t.x, i.y = t.y, i.fill = o, i.width = t.width, i.height = t.height, i.stroke = l, i.rx = 2.5, i.ry = 2.5, i.attrs = { "stroke-width": 0.5 }, ne(n, i);
1172
- break;
1173
- case "system_db":
1174
- case "external_system_db":
1175
- case "container_db":
1176
- case "external_container_db":
1177
- case "component_db":
1178
- case "external_component_db":
1179
- n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1180
- "d",
1181
- "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", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)
1182
- ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1183
- "d",
1184
- "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2)
1185
- );
1186
- break;
1187
- case "system_queue":
1188
- case "external_system_queue":
1189
- case "container_queue":
1190
- case "external_container_queue":
1191
- case "component_queue":
1192
- case "external_component_queue":
1193
- n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
1194
- "d",
1195
- "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", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)
1196
- ), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
1197
- "d",
1198
- "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2)
1199
- );
1200
- break;
1201
- }
1202
- let h = C0(s, t.typeC4Shape.text);
1203
- switch (n.append("text").attr("fill", a).attr("font-family", h.fontFamily).attr("font-size", h.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
1204
- case "person":
1205
- case "external_person":
1206
- xe(
1207
- n,
1208
- 48,
1209
- 48,
1210
- t.x + t.width / 2 - 24,
1211
- t.y + t.image.Y,
1212
- r
1213
- );
1214
- break;
1215
- }
1216
- let u = s[t.typeC4Shape.text + "Font"]();
1217
- return u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = a, W(s)(
1218
- t.label.text,
1219
- n,
1220
- t.x,
1221
- t.y + t.label.Y,
1222
- t.width,
1223
- t.height,
1224
- { fill: a },
1225
- u
1226
- ), u = s[t.typeC4Shape.text + "Font"](), u.fontColor = a, t.techn && t.techn?.text !== "" ? W(s)(
1227
- t.techn.text,
1228
- n,
1229
- t.x,
1230
- t.y + t.techn.Y,
1231
- t.width,
1232
- t.height,
1233
- { fill: a, "font-style": "italic" },
1234
- u
1235
- ) : t.type && t.type.text !== "" && W(s)(
1236
- t.type.text,
1237
- n,
1238
- t.x,
1239
- t.y + t.type.Y,
1240
- t.width,
1241
- t.height,
1242
- { fill: a, "font-style": "italic" },
1243
- u
1244
- ), t.descr && t.descr.text !== "" && (u = s.personFont(), u.fontColor = a, W(s)(
1245
- t.descr.text,
1246
- n,
1247
- t.x,
1248
- t.y + t.descr.Y,
1249
- t.width,
1250
- t.height,
1251
- { fill: a },
1252
- u
1253
- )), t.height;
1254
- }, "drawC4Shape"), b0 = /* @__PURE__ */ y(function(e) {
1255
- e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1256
- "d",
1257
- "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"
1258
- );
1259
- }, "insertDatabaseIcon"), _0 = /* @__PURE__ */ y(function(e) {
1260
- e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1261
- "d",
1262
- "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"
1263
- );
1264
- }, "insertComputerIcon"), x0 = /* @__PURE__ */ y(function(e) {
1265
- e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1266
- "d",
1267
- "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"
1268
- );
1269
- }, "insertClockIcon"), m0 = /* @__PURE__ */ y(function(e) {
1270
- e.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");
1271
- }, "insertArrowHead"), v0 = /* @__PURE__ */ y(function(e) {
1272
- e.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");
1273
- }, "insertArrowEnd"), E0 = /* @__PURE__ */ y(function(e) {
1274
- e.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");
1275
- }, "insertArrowFilledHead"), k0 = /* @__PURE__ */ y(function(e) {
1276
- e.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
1277
- }, "insertDynamicNumber"), A0 = /* @__PURE__ */ y(function(e) {
1278
- const s = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
1279
- s.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"), s.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");
1280
- }, "insertArrowCrossHead"), C0 = /* @__PURE__ */ y((e, t) => ({
1281
- fontFamily: e[t + "FontFamily"],
1282
- fontSize: e[t + "FontSize"],
1283
- fontWeight: e[t + "FontWeight"]
1284
- }), "getC4ShapeFont"), W = /* @__PURE__ */ (function() {
1285
- function e(l, a, r, n, i, h, u) {
1286
- const p = a.append("text").attr("x", r + i / 2).attr("y", n + h / 2 + 5).style("text-anchor", "middle").text(l);
1287
- o(p, u);
1288
- }
1289
- y(e, "byText");
1290
- function t(l, a, r, n, i, h, u, p) {
1291
- const { fontSize: f, fontFamily: v, fontWeight: T } = p, R = l.split(Zt.lineBreakRegex);
1292
- for (let D = 0; D < R.length; D++) {
1293
- const I = D * f - f * (R.length - 1) / 2, j = a.append("text").attr("x", r + i / 2).attr("y", n).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", f).style("font-weight", T).style("font-family", v);
1294
- j.append("tspan").attr("dy", I).text(R[D]).attr("alignment-baseline", "mathematical"), o(j, u);
1295
- }
1296
- }
1297
- y(t, "byTspan");
1298
- function s(l, a, r, n, i, h, u, p) {
1299
- const f = a.append("switch"), T = f.append("foreignObject").attr("x", r).attr("y", n).attr("width", i).attr("height", h).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1300
- T.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, f, r, n, i, h, u, p), o(T, u);
1301
- }
1302
- y(s, "byFo");
1303
- function o(l, a) {
1304
- for (const r in a)
1305
- a.hasOwnProperty(r) && l.attr(r, a[r]);
1306
- }
1307
- return y(o, "_setTextAttrs"), function(l) {
1308
- return l.textPlacement === "fo" ? s : l.textPlacement === "old" ? e : t;
1309
- };
1310
- })(), V = {
1311
- drawRect: ne,
1312
- drawBoundary: y0,
1313
- drawC4Shape: g0,
1314
- drawRels: p0,
1315
- drawImage: xe,
1316
- insertArrowHead: m0,
1317
- insertArrowEnd: v0,
1318
- insertArrowFilledHead: E0,
1319
- insertDynamicNumber: k0,
1320
- insertArrowCrossHead: A0,
1321
- insertDatabaseIcon: b0,
1322
- insertComputerIcon: _0,
1323
- insertClockIcon: x0
1324
- }, zt = 0, Xt = 0, me = 4, te = 2;
1325
- Ut.yy = $t;
1326
- var b = {}, Tt, ve = (Tt = class {
1327
- constructor(t) {
1328
- this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, ee(t.db.getConfig());
1329
- }
1330
- setData(t, s, o, l) {
1331
- this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = s, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l;
1332
- }
1333
- updateVal(t, s, o, l) {
1334
- t[s] === void 0 ? t[s] = o : t[s] = l(o, t[s]);
1335
- }
1336
- insert(t) {
1337
- this.nextData.cnt = this.nextData.cnt + 1;
1338
- let s = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = s + t.width, l = this.nextData.starty + t.margin * 2, a = l + t.height;
1339
- (s >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > me) && (s = this.nextData.startx + t.margin + b.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = s + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = l + t.height, this.nextData.cnt = 1), t.x = s, t.y = l, this.updateVal(this.data, "startx", s, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", s, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
1340
- }
1341
- init(t) {
1342
- this.name = "", this.data = {
1343
- startx: void 0,
1344
- stopx: void 0,
1345
- starty: void 0,
1346
- stopy: void 0,
1347
- widthLimit: void 0
1348
- }, this.nextData = {
1349
- startx: void 0,
1350
- stopx: void 0,
1351
- starty: void 0,
1352
- stopy: void 0,
1353
- cnt: 0
1354
- }, ee(t.db.getConfig());
1355
- }
1356
- bumpLastMargin(t) {
1357
- this.data.stopx += t, this.data.stopy += t;
1358
- }
1359
- }, y(Tt, "Bounds"), Tt), ee = /* @__PURE__ */ y(function(e) {
1360
- Le(b, e), e.fontFamily && (b.personFontFamily = b.systemFontFamily = b.messageFontFamily = e.fontFamily), e.fontSize && (b.personFontSize = b.systemFontSize = b.messageFontSize = e.fontSize), e.fontWeight && (b.personFontWeight = b.systemFontWeight = b.messageFontWeight = e.fontWeight);
1361
- }, "setConf"), Dt = /* @__PURE__ */ y((e, t) => ({
1362
- fontFamily: e[t + "FontFamily"],
1363
- fontSize: e[t + "FontSize"],
1364
- fontWeight: e[t + "FontWeight"]
1365
- }), "c4ShapeFont"), jt = /* @__PURE__ */ y((e) => ({
1366
- fontFamily: e.boundaryFontFamily,
1367
- fontSize: e.boundaryFontSize,
1368
- fontWeight: e.boundaryFontWeight
1369
- }), "boundaryFont"), w0 = /* @__PURE__ */ y((e) => ({
1370
- fontFamily: e.messageFontFamily,
1371
- fontSize: e.messageFontSize,
1372
- fontWeight: e.messageFontWeight
1373
- }), "messageFont");
1374
- function Y(e, t, s, o, l) {
1375
- if (!t[e].width)
1376
- if (s)
1377
- t[e].text = Ye(t[e].text, l, o), t[e].textLines = t[e].text.split(Zt.lineBreakRegex).length, t[e].width = l, t[e].height = de(t[e].text, o);
1378
- else {
1379
- let a = t[e].text.split(Zt.lineBreakRegex);
1380
- t[e].textLines = a.length;
1381
- let r = 0;
1382
- t[e].height = 0, t[e].width = 0;
1383
- for (const n of a)
1384
- t[e].width = Math.max(
1385
- wt(n, o),
1386
- t[e].width
1387
- ), r = de(n, o), t[e].height = t[e].height + r;
1388
- }
1389
- }
1390
- y(Y, "calcC4ShapeTextWH");
1391
- var Ee = /* @__PURE__ */ y(function(e, t, s) {
1392
- t.x = s.data.startx, t.y = s.data.starty, t.width = s.data.stopx - s.data.startx, t.height = s.data.stopy - s.data.starty, t.label.y = b.c4ShapeMargin - 35;
1393
- let o = t.wrap && b.wrap, l = jt(b);
1394
- l.fontSize = l.fontSize + 2, l.fontWeight = "bold";
1395
- let a = wt(t.label.text, l);
1396
- Y("label", t, o, l, a), V.drawBoundary(e, t, b);
1397
- }, "drawBoundary"), ke = /* @__PURE__ */ y(function(e, t, s, o) {
1398
- let l = 0;
1399
- for (const a of o) {
1400
- l = 0;
1401
- const r = s[a];
1402
- let n = Dt(b, r.typeC4Shape.text);
1403
- switch (n.fontSize = n.fontSize - 2, r.typeC4Shape.width = wt(
1404
- "«" + r.typeC4Shape.text + "»",
1405
- n
1406
- ), r.typeC4Shape.height = n.fontSize + 2, r.typeC4Shape.Y = b.c4ShapePadding, l = r.typeC4Shape.Y + r.typeC4Shape.height - 4, r.image = { width: 0, height: 0, Y: 0 }, r.typeC4Shape.text) {
1407
- case "person":
1408
- case "external_person":
1409
- r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height;
1410
- break;
1411
- }
1412
- r.sprite && (r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height);
1413
- let i = r.wrap && b.wrap, h = b.width - b.c4ShapePadding * 2, u = Dt(b, r.typeC4Shape.text);
1414
- if (u.fontSize = u.fontSize + 2, u.fontWeight = "bold", Y("label", r, i, u, h), r.label.Y = l + 8, l = r.label.Y + r.label.height, r.type && r.type.text !== "") {
1415
- r.type.text = "[" + r.type.text + "]";
1416
- let v = Dt(b, r.typeC4Shape.text);
1417
- Y("type", r, i, v, h), r.type.Y = l + 5, l = r.type.Y + r.type.height;
1418
- } else if (r.techn && r.techn.text !== "") {
1419
- r.techn.text = "[" + r.techn.text + "]";
1420
- let v = Dt(b, r.techn.text);
1421
- Y("techn", r, i, v, h), r.techn.Y = l + 5, l = r.techn.Y + r.techn.height;
1422
- }
1423
- let p = l, f = r.label.width;
1424
- if (r.descr && r.descr.text !== "") {
1425
- let v = Dt(b, r.typeC4Shape.text);
1426
- Y("descr", r, i, v, h), r.descr.Y = l + 20, l = r.descr.Y + r.descr.height, f = Math.max(r.label.width, r.descr.width), p = l - r.descr.textLines * 5;
1427
- }
1428
- f = f + b.c4ShapePadding, r.width = Math.max(r.width || b.width, f, b.width), r.height = Math.max(r.height || b.height, p, b.height), r.margin = r.margin || b.c4ShapeMargin, e.insert(r), V.drawC4Shape(t, r, b);
1429
- }
1430
- e.bumpLastMargin(b.c4ShapeMargin);
1431
- }, "drawC4ShapeArray"), Ot, N = (Ot = class {
1432
- constructor(t, s) {
1433
- this.x = t, this.y = s;
1434
- }
1435
- }, y(Ot, "Point"), Ot), fe = /* @__PURE__ */ y(function(e, t) {
1436
- let s = e.x, o = e.y, l = t.x, a = t.y, r = s + e.width / 2, n = o + e.height / 2, i = Math.abs(s - l), h = Math.abs(o - a), u = h / i, p = e.height / e.width, f = null;
1437
- return o == a && s < l ? f = new N(s + e.width, n) : o == a && s > l ? f = new N(s, n) : s == l && o < a ? f = new N(r, o + e.height) : s == l && o > a && (f = new N(r, o)), s > l && o < a ? p >= u ? f = new N(s, n + u * e.width / 2) : f = new N(
1438
- r - i / h * e.height / 2,
1439
- o + e.height
1440
- ) : s < l && o < a ? p >= u ? f = new N(s + e.width, n + u * e.width / 2) : f = new N(
1441
- r + i / h * e.height / 2,
1442
- o + e.height
1443
- ) : s < l && o > a ? p >= u ? f = new N(s + e.width, n - u * e.width / 2) : f = new N(r + e.height / 2 * i / h, o) : s > l && o > a && (p >= u ? f = new N(s, n - e.width / 2 * u) : f = new N(r - e.height / 2 * i / h, o)), f;
1444
- }, "getIntersectPoint"), T0 = /* @__PURE__ */ y(function(e, t) {
1445
- let s = { x: 0, y: 0 };
1446
- s.x = t.x + t.width / 2, s.y = t.y + t.height / 2;
1447
- let o = fe(e, s);
1448
- s.x = e.x + e.width / 2, s.y = e.y + e.height / 2;
1449
- let l = fe(t, s);
1450
- return { startPoint: o, endPoint: l };
1451
- }, "getIntersectPoints"), O0 = /* @__PURE__ */ y(function(e, t, s, o) {
1452
- let l = 0;
1453
- for (let a of t) {
1454
- l = l + 1;
1455
- let r = a.wrap && b.wrap, n = w0(b);
1456
- o.db.getC4Type() === "C4Dynamic" && (a.label.text = l + ": " + a.label.text);
1457
- let h = wt(a.label.text, n);
1458
- Y("label", a, r, n, h), a.techn && a.techn.text !== "" && (h = wt(a.techn.text, n), Y("techn", a, r, n, h)), a.descr && a.descr.text !== "" && (h = wt(a.descr.text, n), Y("descr", a, r, n, h));
1459
- let u = s(a.from), p = s(a.to), f = T0(u, p);
1460
- a.startPoint = f.startPoint, a.endPoint = f.endPoint;
1461
- }
1462
- V.drawRels(e, t, b);
1463
- }, "drawRels");
1464
- function re(e, t, s, o, l) {
1465
- let a = new ve(l);
1466
- a.data.widthLimit = s.data.widthLimit / Math.min(te, o.length);
1467
- for (let [r, n] of o.entries()) {
1468
- let i = 0;
1469
- n.image = { width: 0, height: 0, Y: 0 }, n.sprite && (n.image.width = 48, n.image.height = 48, n.image.Y = i, i = n.image.Y + n.image.height);
1470
- let h = n.wrap && b.wrap, u = jt(b);
1471
- if (u.fontSize = u.fontSize + 2, u.fontWeight = "bold", Y(
1472
- "label",
1473
- n,
1474
- h,
1475
- u,
1476
- a.data.widthLimit
1477
- ), n.label.Y = i + 8, i = n.label.Y + n.label.height, n.type && n.type.text !== "") {
1478
- n.type.text = "[" + n.type.text + "]";
1479
- let T = jt(b);
1480
- Y(
1481
- "type",
1482
- n,
1483
- h,
1484
- T,
1485
- a.data.widthLimit
1486
- ), n.type.Y = i + 5, i = n.type.Y + n.type.height;
1487
- }
1488
- if (n.descr && n.descr.text !== "") {
1489
- let T = jt(b);
1490
- T.fontSize = T.fontSize - 2, Y(
1491
- "descr",
1492
- n,
1493
- h,
1494
- T,
1495
- a.data.widthLimit
1496
- ), n.descr.Y = i + 20, i = n.descr.Y + n.descr.height;
1497
- }
1498
- if (r == 0 || r % te === 0) {
1499
- let T = s.data.startx + b.diagramMarginX, R = s.data.stopy + b.diagramMarginY + i;
1500
- a.setData(T, T, R, R);
1501
- } else {
1502
- let T = a.data.stopx !== a.data.startx ? a.data.stopx + b.diagramMarginX : a.data.startx, R = a.data.starty;
1503
- a.setData(T, T, R, R);
1504
- }
1505
- a.name = n.alias;
1506
- let p = l.db.getC4ShapeArray(n.alias), f = l.db.getC4ShapeKeys(n.alias);
1507
- f.length > 0 && ke(
1508
- a,
1509
- e,
1510
- p,
1511
- f
1512
- ), t = n.alias;
1513
- let v = l.db.getBoundaries(t);
1514
- v.length > 0 && re(
1515
- e,
1516
- t,
1517
- a,
1518
- v,
1519
- l
1520
- ), n.alias !== "global" && Ee(e, n, a), s.data.stopy = Math.max(
1521
- a.data.stopy + b.c4ShapeMargin,
1522
- s.data.stopy
1523
- ), s.data.stopx = Math.max(
1524
- a.data.stopx + b.c4ShapeMargin,
1525
- s.data.stopx
1526
- ), zt = Math.max(zt, s.data.stopx), Xt = Math.max(Xt, s.data.stopy);
1527
- }
1528
- }
1529
- y(re, "drawInsideBoundary");
1530
- var R0 = /* @__PURE__ */ y(function(e, t, s, o) {
1531
- b = Pt().c4;
1532
- const l = Pt().securityLevel;
1533
- let a;
1534
- l === "sandbox" && (a = Yt("#i" + t));
1535
- const r = l === "sandbox" ? Yt(a.nodes()[0].contentDocument.body) : Yt("body");
1536
- let n = o.db;
1537
- o.db.setWrap(b.wrap), me = n.getC4ShapeInRow(), te = n.getC4BoundaryInRow(), ue.debug(`C:${JSON.stringify(b, null, 2)}`);
1538
- const i = l === "sandbox" ? r.select(`[id="${t}"]`) : Yt(`[id="${t}"]`);
1539
- V.insertComputerIcon(i), V.insertDatabaseIcon(i), V.insertClockIcon(i);
1540
- let h = new ve(o);
1541
- h.setData(
1542
- b.diagramMarginX,
1543
- b.diagramMarginX,
1544
- b.diagramMarginY,
1545
- b.diagramMarginY
1546
- ), h.data.widthLimit = screen.availWidth, zt = b.diagramMarginX, Xt = b.diagramMarginY;
1547
- const u = o.db.getTitle();
1548
- let p = o.db.getBoundaries("");
1549
- re(i, "", h, p, o), V.insertArrowHead(i), V.insertArrowEnd(i), V.insertArrowCrossHead(i), V.insertArrowFilledHead(i), O0(i, o.db.getRels(), o.db.getC4Shape, o), h.data.stopx = zt, h.data.stopy = Xt;
1550
- const f = h.data;
1551
- let T = f.stopy - f.starty + 2 * b.diagramMarginY;
1552
- const D = f.stopx - f.startx + 2 * b.diagramMarginX;
1553
- u && i.append("text").text(u).attr("x", (f.stopx - f.startx) / 2 - 4 * b.diagramMarginX).attr("y", f.starty + b.diagramMarginY), Me(i, T, D, b.useMaxWidth);
1554
- const I = u ? 60 : 0;
1555
- i.attr(
1556
- "viewBox",
1557
- f.startx - b.diagramMarginX + " -" + (b.diagramMarginY + I) + " " + D + " " + (T + I)
1558
- ), ue.debug("models:", f);
1559
- }, "draw"), pe = {
1560
- drawPersonOrSystemArray: ke,
1561
- drawBoundary: Ee,
1562
- setConf: ee,
1563
- draw: R0
1564
- }, S0 = /* @__PURE__ */ y((e) => `.person {
1565
- stroke: ${e.personBorder};
1566
- fill: ${e.personBkg};
1567
- }
1568
- `, "getStyles"), D0 = S0, I0 = {
1569
- parser: je,
1570
- db: $t,
1571
- renderer: pe,
1572
- styles: D0,
1573
- init: /* @__PURE__ */ y(({ c4: e, wrap: t }) => {
1574
- pe.setConf(e), $t.setWrap(t);
1575
- }, "init")
1576
- };
1577
- export {
1578
- I0 as diagram
1579
- };