@kingsoftcloud/ksadk-web 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/RELEASE_PROVENANCE.json +7 -0
  3. package/dist-ksadk/assets/{ArtifactsPanel-Cjnqt-8W.js → ArtifactsPanel-DSU1sWD_.js} +1 -1
  4. package/dist-ksadk/assets/{CodeBlock-BqyqZfuB.js → CodeBlock-DOH6MVcn.js} +4 -4
  5. package/dist-ksadk/assets/{MathMessageMarkdown-BpH7jiFM.js → MathMessageMarkdown-BL8my1R2.js} +4 -4
  6. package/dist-ksadk/assets/MathMessageMarkdown-BorAY7qD.css +1 -0
  7. package/dist-ksadk/assets/MermaidBlock-Dz4IP-Tx.js +312 -0
  8. package/dist-ksadk/assets/NativeTerminalPanel-DUrK0JpZ.js +1 -0
  9. package/dist-ksadk/assets/abnfDiagram-VCTEODGH-g20pFzNV.js +1 -0
  10. package/dist-ksadk/assets/arc-C4FzinUA.js +1 -0
  11. package/dist-ksadk/assets/architecture-7GRP2DOG-DjKratdf.js +1 -0
  12. package/dist-ksadk/assets/architectureDiagram-5GKGNRK7-DpIqL5h4.js +36 -0
  13. package/dist-ksadk/assets/blockDiagram-NRAW4CY4-BjkljTNz.js +129 -0
  14. package/dist-ksadk/assets/c4Diagram-UCG6FXSJ-Dk_ieq2X.js +38 -0
  15. package/dist-ksadk/assets/channel-4cQHKtx1.js +1 -0
  16. package/dist-ksadk/assets/chunk-2Q5K7J3B-DmgWkESh.js +1 -0
  17. package/dist-ksadk/assets/{chunk-FMBD7UC4-BGhvzDYt.js → chunk-5VM5RSS4-BVHAchFb.js} +1 -1
  18. package/dist-ksadk/assets/{chunk-ND2GUHAM-D98vPd-E.js → chunk-F27PBJKO-C-ipQzuS.js} +1 -1
  19. package/dist-ksadk/assets/chunk-G27WJ6UU-C2EyJbIK.js +231 -0
  20. package/dist-ksadk/assets/{chunk-4BX2VUAB-CsWIQRhc.js → chunk-JWPE2WC7-vYvVJb_M.js} +1 -1
  21. package/dist-ksadk/assets/chunk-LCL6LL3I-BcI6ysPT.js +206 -0
  22. package/dist-ksadk/assets/chunk-POPQ4Y6H-C030x_Z1.js +1 -0
  23. package/dist-ksadk/assets/chunk-RHFEMEQ7-yyGpsz4n.js +168 -0
  24. package/dist-ksadk/assets/chunk-SVP7TREG-BLTlmMU7.js +88 -0
  25. package/dist-ksadk/assets/chunk-XXDRQBXY-C_32ArgP.js +1 -0
  26. package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DLFd9Xi0.js +1 -0
  27. package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DLFd9Xi0.js +1 -0
  28. package/dist-ksadk/assets/{cose-bilkent-S5V4N54A-CX3yotHq.js → cose-bilkent-JH36ORCC-9YQYwdl0.js} +1 -1
  29. package/dist-ksadk/assets/cynefin-OW5HDTMX-DjEM48Qp.js +1 -0
  30. package/dist-ksadk/assets/cynefinDiagram-5FMLGOSQ-ErLF5N13.js +62 -0
  31. package/dist-ksadk/assets/cytoscape.esm-CyCl8rPi.js +321 -0
  32. package/dist-ksadk/assets/dagre-3AP2YEHR-DFiQF-6f.js +4 -0
  33. package/dist-ksadk/assets/dagre-BuhGnRI1.js +1 -0
  34. package/dist-ksadk/assets/diagram-S7CK7UJ4-Bt1v8-GC.js +30 -0
  35. package/dist-ksadk/assets/diagram-UQ7AKVKN-DSCxJdBK.js +41 -0
  36. package/dist-ksadk/assets/diagram-VSXAHHWV-DHfYwp_9.js +3 -0
  37. package/dist-ksadk/assets/diagram-VX7I27RA-DdzD-4Le.js +24 -0
  38. package/dist-ksadk/assets/diagram-Z3DM3KII-Du-nAJ9F.js +24 -0
  39. package/dist-ksadk/assets/{dist-D82mtD2s.js → dist-8hqcx0sU.js} +1 -1
  40. package/dist-ksadk/assets/dist-B7seoj3d.js +1 -0
  41. package/dist-ksadk/assets/{dist-DHn6nBzr.js → dist-BE7bu-DL.js} +1 -1
  42. package/dist-ksadk/assets/{dist-eoW6tZXA.js → dist-BVDffZ0U.js} +1 -1
  43. package/dist-ksadk/assets/{dist-C2xjE7cO.js → dist-BX8z72IC.js} +1 -1
  44. package/dist-ksadk/assets/{dist-CgF3fj15.js → dist-Bf2M8m3N.js} +1 -1
  45. package/dist-ksadk/assets/{dist-Bs-jQcRX.js → dist-BjU6y-A2.js} +1 -1
  46. package/dist-ksadk/assets/{dist-Djgl2wVZ.js → dist-BytlxIDT.js} +1 -1
  47. package/dist-ksadk/assets/{dist-CVQRZjPu.js → dist-CSh_DE14.js} +1 -1
  48. package/dist-ksadk/assets/{dist-6CVKuTAe.js → dist-CXYYBw3_.js} +1 -1
  49. package/dist-ksadk/assets/{dist-DlzCRy0S.js → dist-C_wsv-Qd.js} +1 -1
  50. package/dist-ksadk/assets/{dist-DF06ORQo.js → dist-ClxGviKw.js} +1 -1
  51. package/dist-ksadk/assets/{dist-Cf23NY4L.js → dist-CttYUqzS.js} +1 -1
  52. package/dist-ksadk/assets/{dist-ivOya1LD.js → dist-DNp6rLRA.js} +1 -1
  53. package/dist-ksadk/assets/{dist-BibcG1V9.js → dist-DUX-id_F.js} +1 -1
  54. package/dist-ksadk/assets/{dist-BUHRxvDG.js → dist-DmldrHd_.js} +1 -1
  55. package/dist-ksadk/assets/{dist-BZ9n9AjO.js → dist-DnfXs8Vn.js} +2 -2
  56. package/dist-ksadk/assets/{dist-DqNnNFrw.js → dist-Dq9gLD7L.js} +1 -1
  57. package/dist-ksadk/assets/{dist-CGcp2ex8.js → dist-W-TIVntx.js} +1 -1
  58. package/dist-ksadk/assets/{dist-Cwt7koer.js → dist-dDdADKFA.js} +1 -1
  59. package/dist-ksadk/assets/{dist-C7-3jInC.js → dist-dydu68Fl.js} +1 -1
  60. package/dist-ksadk/assets/{dist-C99THtIA.js → dist-ngtN0DJB.js} +1 -1
  61. package/dist-ksadk/assets/ebnfDiagram-PWID7BFC-Da9C9NO1.js +1 -0
  62. package/dist-ksadk/assets/erDiagram-SSCWMZ5O-EAGqqR79.js +99 -0
  63. package/dist-ksadk/assets/eventmodeling-NTZA5JFV-CMgMaJrC.js +1 -0
  64. package/dist-ksadk/assets/flowDiagram-A5DVABFB-BBKL0x3P.js +1 -0
  65. package/dist-ksadk/assets/ganttDiagram-EL5Y4UJY-DqJsKb59.js +292 -0
  66. package/dist-ksadk/assets/gitGraph-4MIJSDKK-Dw63mrhw.js +1 -0
  67. package/dist-ksadk/assets/gitGraphDiagram-WWUBYQGX-B6g4dtDi.js +106 -0
  68. package/dist-ksadk/assets/index-8ipRcQ-M.js +240 -0
  69. package/dist-ksadk/assets/index-ByFCqjlh.css +2 -0
  70. package/dist-ksadk/assets/info-A6RAGUB7-B6iAblII.js +1 -0
  71. package/dist-ksadk/assets/infoDiagram-RXCK75RN-Djm_nbd5.js +2 -0
  72. package/dist-ksadk/assets/{ishikawaDiagram-YF4QCWOH-DLOHGvWw.js → ishikawaDiagram-5VMMS53U-DWya9SG2.js} +6 -6
  73. package/dist-ksadk/assets/{journeyDiagram-JHISSGLW-BIzKeejT.js → journeyDiagram-EYS64GPL-DutxhSNI.js} +6 -6
  74. package/dist-ksadk/assets/{kanban-definition-UN3LZRKU-BWHoFSw2.js → kanban-definition-3QL26DDD-DJdOF8Fm.js} +10 -10
  75. package/dist-ksadk/assets/katex-vFWytM5c.js +257 -0
  76. package/dist-ksadk/assets/{linear-CvMBw9cA.js → linear-BHjG8b-J.js} +1 -1
  77. package/dist-ksadk/assets/mermaid-parser.core-KGSy4jWT.js +166 -0
  78. package/dist-ksadk/assets/{mindmap-definition-RKZ34NQL-CSAQxEAe.js → mindmap-definition-FBJOCRG2-9-HC88D4.js} +29 -29
  79. package/dist-ksadk/assets/packet-AYTQ26CC-BOYAipuq.js +1 -0
  80. package/dist-ksadk/assets/pegDiagram-XKGWAZYB-DrEZd4fD.js +1 -0
  81. package/dist-ksadk/assets/pie-WAS4IAKB-Ctq0Kbku.js +1 -0
  82. package/dist-ksadk/assets/pieDiagram-E7YTZNPT-DpjqOFFp.js +39 -0
  83. package/dist-ksadk/assets/{quadrantDiagram-W4KKPZXB-CxIR4JXI.js → quadrantDiagram-AXDQQJYC-BiNhgOXX.js} +6 -6
  84. package/dist-ksadk/assets/radar-RG4KPBEZ-DN0-ul_0.js +1 -0
  85. package/dist-ksadk/assets/railroad-74A4TZTK-C6cC_to0.js +1 -0
  86. package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-BimjIuRc.js +1 -0
  87. package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-CvY65ABq.js +1 -0
  88. package/dist-ksadk/assets/railroad-peg-WCYAUIDC-D72Iq_Tv.js +1 -0
  89. package/dist-ksadk/assets/railroadDiagram-O6MQD6OU-_Y3Ojg6G.js +1 -0
  90. package/dist-ksadk/assets/requirementDiagram-EFPCY7ZU-DeCFdg9K.js +84 -0
  91. package/dist-ksadk/assets/{sankeyDiagram-5OEKKPKP-DpGa6EAV.js → sankeyDiagram-P5KCCOFB-CPH75rhw.js} +7 -7
  92. package/dist-ksadk/assets/{sequenceDiagram-3UESZ5HK-NTKNGGe5.js → sequenceDiagram-WJ2MYXX4-OEpQQdr4.js} +10 -10
  93. package/dist-ksadk/assets/sizeCapture-X5ZJPWSS-heUErzhI.js +1 -0
  94. package/dist-ksadk/assets/stateDiagram-HBIQ2CUA-DvA3jSMB.js +1 -0
  95. package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-BgQY03nz.js +1 -0
  96. package/dist-ksadk/assets/swimlanes-XN3QIQJK-CR-dfN_t.js +1 -0
  97. package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js +8 -0
  98. package/dist-ksadk/assets/{timeline-definition-PNZ67QCA-jqoYs3jQ.js → timeline-definition-24CTP7MA-DAVJf1TX.js} +7 -7
  99. package/dist-ksadk/assets/treeView-Q6P3EWNA-BMpO0wsB.js +1 -0
  100. package/dist-ksadk/assets/treemap-WGGIJYW6-Et0aqzU3.js +1 -0
  101. package/dist-ksadk/assets/vennDiagram-4TSXK5OY-DwM8eDkh.js +34 -0
  102. package/dist-ksadk/assets/wardley-WFR3VGLG-CbY0mhpl.js +1 -0
  103. package/dist-ksadk/assets/wardleyDiagram-VM6X3IG4-DZL-Zz2t.js +78 -0
  104. package/dist-ksadk/assets/xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js +7 -0
  105. package/dist-ksadk/index.html +2 -2
  106. package/dist-lib/App.d.ts.map +1 -1
  107. package/dist-lib/{ArtifactsPanel-BAfHt4bC.js → ArtifactsPanel-DDCKcvaL.js} +1 -1
  108. package/dist-lib/{CodeBlock-Cbl6cxYC.js → CodeBlock-BS9DcS5a.js} +3 -3
  109. package/dist-lib/{MathMessageMarkdown-DbMSeHQa.js → MathMessageMarkdown-CpCcJFjZ.js} +2 -2
  110. package/dist-lib/{NativeTerminalPanel-BTPHqbvY.js → NativeTerminalPanel-CDqCdIly.js} +14 -6
  111. package/dist-lib/{WorkspacePanelContainer-Iy0LhhgG.js → WorkspacePanelContainer-DzbAkIfx.js} +1746 -913
  112. package/dist-lib/api/client.d.ts.map +1 -1
  113. package/dist-lib/api/events.d.ts +7 -0
  114. package/dist-lib/api/events.d.ts.map +1 -1
  115. package/dist-lib/api/run.d.ts +32 -0
  116. package/dist-lib/api/run.d.ts.map +1 -1
  117. package/dist-lib/api/session.d.ts +10 -1
  118. package/dist-lib/api/session.d.ts.map +1 -1
  119. package/dist-lib/capabilities-njdklP3r.js +200 -0
  120. package/dist-lib/capabilities.js +1 -1
  121. package/dist-lib/components/chat/ChatComposer.d.ts +9 -1
  122. package/dist-lib/components/chat/ChatComposer.d.ts.map +1 -1
  123. package/dist-lib/components/chat/ChatMessageList.d.ts +4 -1
  124. package/dist-lib/components/chat/ChatMessageList.d.ts.map +1 -1
  125. package/dist-lib/components/chat/ChatSidebar.d.ts.map +1 -1
  126. package/dist-lib/components/chat/ConnectedComposer.d.ts +13 -2
  127. package/dist-lib/components/chat/ConnectedComposer.d.ts.map +1 -1
  128. package/dist-lib/components/chat/ConnectedMessageList.d.ts +2 -1
  129. package/dist-lib/components/chat/ConnectedMessageList.d.ts.map +1 -1
  130. package/dist-lib/components/chat/ExecutionModeMenu.d.ts +12 -0
  131. package/dist-lib/components/chat/ExecutionModeMenu.d.ts.map +1 -0
  132. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts +14 -0
  133. package/dist-lib/components/chat/InteractionA2uiSurface.d.ts.map +1 -0
  134. package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts +12 -0
  135. package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts.map +1 -0
  136. package/dist-lib/components/chat/InteractionSchemaForm.d.ts +14 -0
  137. package/dist-lib/components/chat/InteractionSchemaForm.d.ts.map +1 -0
  138. package/dist-lib/components/chat/InteractionTray.d.ts +23 -0
  139. package/dist-lib/components/chat/InteractionTray.d.ts.map +1 -0
  140. package/dist-lib/components/chat/ModelSettingsMenu.d.ts +13 -0
  141. package/dist-lib/components/chat/ModelSettingsMenu.d.ts.map +1 -0
  142. package/dist-lib/components/chat/PermissionMenu.d.ts.map +1 -1
  143. package/dist-lib/components/chat/ProcessingBlocksView.d.ts +4 -1
  144. package/dist-lib/components/chat/ProcessingBlocksView.d.ts.map +1 -1
  145. package/dist-lib/components/chat/schema-fields.d.ts +13 -0
  146. package/dist-lib/components/chat/schema-fields.d.ts.map +1 -0
  147. package/dist-lib/components/chat/types.d.ts +8 -0
  148. package/dist-lib/components/chat/types.d.ts.map +1 -1
  149. package/dist-lib/components/native/NativeTerminalPanel.d.ts.map +1 -1
  150. package/dist-lib/components.js +3 -3
  151. package/dist-lib/core/api/facade.d.ts +26 -1
  152. package/dist-lib/core/api/facade.d.ts.map +1 -1
  153. package/dist-lib/core/api/types.d.ts +29 -1
  154. package/dist-lib/core/api/types.d.ts.map +1 -1
  155. package/dist-lib/core/interaction/a2ui-validate.d.ts +21 -0
  156. package/dist-lib/core/interaction/a2ui-validate.d.ts.map +1 -0
  157. package/dist-lib/core/interaction/adapters/agui.d.ts +23 -0
  158. package/dist-lib/core/interaction/adapters/agui.d.ts.map +1 -0
  159. package/dist-lib/core/interaction/adapters/normalize.d.ts +29 -0
  160. package/dist-lib/core/interaction/adapters/normalize.d.ts.map +1 -0
  161. package/dist-lib/core/interaction/adapters/responses.d.ts +25 -0
  162. package/dist-lib/core/interaction/adapters/responses.d.ts.map +1 -0
  163. package/dist-lib/core/interaction/adapters/session-events.d.ts +17 -0
  164. package/dist-lib/core/interaction/adapters/session-events.d.ts.map +1 -0
  165. package/dist-lib/core/interaction/client.d.ts +63 -0
  166. package/dist-lib/core/interaction/client.d.ts.map +1 -0
  167. package/dist-lib/core/interaction/index.d.ts +41 -0
  168. package/dist-lib/core/interaction/index.d.ts.map +1 -0
  169. package/dist-lib/core/interaction/store.d.ts +0 -0
  170. package/dist-lib/core/interaction/store.d.ts.map +1 -0
  171. package/dist-lib/core/interaction/types.d.ts +91 -0
  172. package/dist-lib/core/interaction/types.d.ts.map +1 -0
  173. package/dist-lib/core/run/dispatcher.d.ts.map +1 -1
  174. package/dist-lib/core/run/engine.d.ts +24 -1
  175. package/dist-lib/core/run/engine.d.ts.map +1 -1
  176. package/dist-lib/core/run/types.d.ts +32 -0
  177. package/dist-lib/core/run/types.d.ts.map +1 -1
  178. package/dist-lib/core/stream/index.d.ts +2 -0
  179. package/dist-lib/core/stream/index.d.ts.map +1 -1
  180. package/dist-lib/core/stream/kernel-events.d.ts +56 -0
  181. package/dist-lib/core/stream/kernel-events.d.ts.map +1 -0
  182. package/dist-lib/core/stream/responses-protocol.d.ts +7 -0
  183. package/dist-lib/core/stream/responses-protocol.d.ts.map +1 -1
  184. package/dist-lib/core/stream/runtime-items.d.ts +174 -0
  185. package/dist-lib/core/stream/runtime-items.d.ts.map +1 -0
  186. package/dist-lib/core/stream/types.d.ts +4 -0
  187. package/dist-lib/core/stream/types.d.ts.map +1 -1
  188. package/dist-lib/hooks/useBootstrap.d.ts +1 -0
  189. package/dist-lib/hooks/useBootstrap.d.ts.map +1 -1
  190. package/dist-lib/hooks/useInteractions.d.ts +34 -0
  191. package/dist-lib/hooks/useInteractions.d.ts.map +1 -0
  192. package/dist-lib/hooks/useRunAgent.d.ts +8 -6
  193. package/dist-lib/hooks/useRunAgent.d.ts.map +1 -1
  194. package/dist-lib/hooks/useSessionLifecycle.d.ts.map +1 -1
  195. package/dist-lib/public/runtime.d.ts +7 -0
  196. package/dist-lib/public/runtime.d.ts.map +1 -1
  197. package/dist-lib/runtime.js +2393 -1157
  198. package/dist-lib/stores/bootstrap.d.ts +4 -0
  199. package/dist-lib/stores/bootstrap.d.ts.map +1 -1
  200. package/dist-lib/stores/streaming.d.ts +8 -0
  201. package/dist-lib/stores/streaming.d.ts.map +1 -1
  202. package/dist-lib/stores/ui.d.ts +8 -14
  203. package/dist-lib/stores/ui.d.ts.map +1 -1
  204. package/dist-lib/styles.css +1 -1
  205. package/dist-lib/types/agent-control.d.ts +93 -0
  206. package/dist-lib/types/agent-control.d.ts.map +1 -0
  207. package/dist-lib/types/capabilities.d.ts +7 -0
  208. package/dist-lib/types/capabilities.d.ts.map +1 -1
  209. package/dist-lib/types/runtime-capability-matrix.d.ts +15 -0
  210. package/dist-lib/types/runtime-capability-matrix.d.ts.map +1 -0
  211. package/dist-lib/utils/capabilities.d.ts.map +1 -1
  212. package/dist-lib/utils/feedback.d.ts +0 -1
  213. package/dist-lib/utils/feedback.d.ts.map +1 -1
  214. package/dist-lib/utils/responses-stream.d.ts +2 -1
  215. package/dist-lib/utils/responses-stream.d.ts.map +1 -1
  216. package/dist-lib/utils/session-event-history.d.ts +54 -0
  217. package/dist-lib/utils/session-event-history.d.ts.map +1 -0
  218. package/dist-lib/utils/session-events.d.ts +8 -0
  219. package/dist-lib/utils/session-events.d.ts.map +1 -1
  220. package/dist-lib/utils/session-list.d.ts +1 -0
  221. package/dist-lib/utils/session-list.d.ts.map +1 -1
  222. package/package.json +4 -1
  223. package/dist-ksadk/assets/MathMessageMarkdown-DeYh8QPr.css +0 -1
  224. package/dist-ksadk/assets/MermaidBlock-DWuxETaJ.js +0 -303
  225. package/dist-ksadk/assets/NativeTerminalPanel-MDTopWMO.js +0 -1
  226. package/dist-ksadk/assets/arc-CFKwSk_B.js +0 -1
  227. package/dist-ksadk/assets/architecture-7EHR7CIX-CynqOWjZ.js +0 -1
  228. package/dist-ksadk/assets/architectureDiagram-3BPJPVTR-Dej8jX8c.js +0 -36
  229. package/dist-ksadk/assets/blockDiagram-GPEHLZMM-1F64jqvy.js +0 -132
  230. package/dist-ksadk/assets/c4Diagram-AAUBKEIU-9q7AUAKb.js +0 -10
  231. package/dist-ksadk/assets/channel-iUGv2N24.js +0 -1
  232. package/dist-ksadk/assets/chunk-2J33WTMH-6qgwJm7Q.js +0 -1
  233. package/dist-ksadk/assets/chunk-55IACEB6-BK8paA20.js +0 -1
  234. package/dist-ksadk/assets/chunk-727SXJPM-B-JEhy7h.js +0 -206
  235. package/dist-ksadk/assets/chunk-AQP2D5EJ-DYBvMHAa.js +0 -231
  236. package/dist-ksadk/assets/chunk-QZHKN3VN-YQIEXeF6.js +0 -1
  237. package/dist-ksadk/assets/classDiagram-4FO5ZUOK-CDAUuoXK.js +0 -1
  238. package/dist-ksadk/assets/classDiagram-v2-Q7XG4LA2-CDAUuoXK.js +0 -1
  239. package/dist-ksadk/assets/cytoscape.esm-DelgaX4f.js +0 -321
  240. package/dist-ksadk/assets/dagre-BM42HDAG-C7TguAWo.js +0 -4
  241. package/dist-ksadk/assets/dagre-Bx709z4p.js +0 -1
  242. package/dist-ksadk/assets/diagram-2AECGRRQ-Dd17_kws.js +0 -43
  243. package/dist-ksadk/assets/diagram-5GNKFQAL-DVIClIil.js +0 -10
  244. package/dist-ksadk/assets/diagram-KO2AKTUF-Df_3gYQa.js +0 -3
  245. package/dist-ksadk/assets/diagram-LMA3HP47-BhLk6ZtA.js +0 -24
  246. package/dist-ksadk/assets/diagram-OG6HWLK6-D4GNGvuu.js +0 -24
  247. package/dist-ksadk/assets/dist-DyvYLMW9.js +0 -1
  248. package/dist-ksadk/assets/erDiagram-TEJ5UH35-CnfRcY2M.js +0 -85
  249. package/dist-ksadk/assets/eventmodeling-FCH6USID-ChYO-ijM.js +0 -1
  250. package/dist-ksadk/assets/flowDiagram-I6XJVG4X-DGaJjGNJ.js +0 -162
  251. package/dist-ksadk/assets/ganttDiagram-6RSMTGT7-DpCoB2g9.js +0 -292
  252. package/dist-ksadk/assets/gitGraph-WXDBUCRP-BN_0Fk-j.js +0 -1
  253. package/dist-ksadk/assets/gitGraphDiagram-PVQCEYII-9IKVFBVT.js +0 -106
  254. package/dist-ksadk/assets/graphlib-B8gBHxth.js +0 -1
  255. package/dist-ksadk/assets/index-QSwCHuB8.js +0 -177
  256. package/dist-ksadk/assets/index-jOPmTOZH.css +0 -2
  257. package/dist-ksadk/assets/info-J43DQDTF-Cp6o3vId.js +0 -1
  258. package/dist-ksadk/assets/infoDiagram-5YYISTIA-CYIIsb8y.js +0 -2
  259. package/dist-ksadk/assets/katex-DATssjp1.js +0 -265
  260. package/dist-ksadk/assets/mermaid-parser.core-mGAcEwcq.js +0 -161
  261. package/dist-ksadk/assets/packet-YPE3B663-wQzct3cT.js +0 -1
  262. package/dist-ksadk/assets/pie-LRSECV5Y-BgTQiv-9.js +0 -1
  263. package/dist-ksadk/assets/pieDiagram-4H26LBE5-By-ra07M.js +0 -30
  264. package/dist-ksadk/assets/radar-GUYGQ44K-BIq5fXsn.js +0 -1
  265. package/dist-ksadk/assets/requirementDiagram-4Y6WPE33-DpW90iu3.js +0 -84
  266. package/dist-ksadk/assets/stateDiagram-AJRCARHV-DGpd9yFG.js +0 -1
  267. package/dist-ksadk/assets/stateDiagram-v2-BHNVJYJU-B3o579IQ.js +0 -1
  268. package/dist-ksadk/assets/treeView-BLDUP644-Dqi-E0EM.js +0 -1
  269. package/dist-ksadk/assets/treemap-LRROVOQU-ClQP9CJ9.js +0 -1
  270. package/dist-ksadk/assets/vennDiagram-CIIHVFJN-l3Z7-wbP.js +0 -34
  271. package/dist-ksadk/assets/wardley-L42UT6IY-8XLvnNIs.js +0 -1
  272. package/dist-ksadk/assets/wardleyDiagram-YWT4CUSO-BR54GPmr.js +0 -78
  273. package/dist-ksadk/assets/xychartDiagram-2RQKCTM6-SkiH8GsK.js +0 -7
  274. package/dist-lib/capabilities-CxHZ869f.js +0 -133
  275. package/dist-lib/components/chat/MenuChip.d.ts +0 -19
  276. package/dist-lib/components/chat/MenuChip.d.ts.map +0 -1
@@ -0,0 +1,312 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./katex-vFWytM5c.js","./index-8ipRcQ-M.js","./index-ByFCqjlh.css","./dagre-3AP2YEHR-DFiQF-6f.js","./dagre-BuhGnRI1.js","./cose-bilkent-JH36ORCC-9YQYwdl0.js","./cytoscape.esm-CyCl8rPi.js","./c4Diagram-UCG6FXSJ-Dk_ieq2X.js","./chunk-F27PBJKO-C-ipQzuS.js","./flowDiagram-A5DVABFB-BBKL0x3P.js","./chunk-POPQ4Y6H-C030x_Z1.js","./chunk-RHFEMEQ7-yyGpsz4n.js","./channel-4cQHKtx1.js","./chunk-5VM5RSS4-BVHAchFb.js","./chunk-XXDRQBXY-C_32ArgP.js","./swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js","./erDiagram-SSCWMZ5O-EAGqqR79.js","./gitGraphDiagram-WWUBYQGX-B6g4dtDi.js","./mermaid-parser.core-KGSy4jWT.js","./chunk-2Q5K7J3B-DmgWkESh.js","./chunk-JWPE2WC7-vYvVJb_M.js","./ganttDiagram-EL5Y4UJY-DqJsKb59.js","./linear-BHjG8b-J.js","./defaultLocale-C8Fc0cco.js","./init-D6jRqBbL.js","./infoDiagram-RXCK75RN-Djm_nbd5.js","./pieDiagram-E7YTZNPT-DpjqOFFp.js","./ordinal-hYBb2elL.js","./arc-C4FzinUA.js","./quadrantDiagram-AXDQQJYC-BiNhgOXX.js","./xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js","./requirementDiagram-EFPCY7ZU-DeCFdg9K.js","./sequenceDiagram-WJ2MYXX4-OEpQQdr4.js","./classDiagram-DTDB5LWJ-DLFd9Xi0.js","./chunk-LCL6LL3I-BcI6ysPT.js","./classDiagram-v2-JRS7N3AN-DLFd9Xi0.js","./stateDiagram-HBIQ2CUA-DvA3jSMB.js","./chunk-G27WJ6UU-C2EyJbIK.js","./stateDiagram-v2-4QOOHH4V-BgQY03nz.js","./journeyDiagram-EYS64GPL-DutxhSNI.js","./timeline-definition-24CTP7MA-DAVJf1TX.js","./mindmap-definition-FBJOCRG2-9-HC88D4.js","./kanban-definition-3QL26DDD-DJdOF8Fm.js","./sankeyDiagram-P5KCCOFB-CPH75rhw.js","./diagram-Z3DM3KII-Du-nAJ9F.js","./diagram-UQ7AKVKN-DSCxJdBK.js","./blockDiagram-NRAW4CY4-BjkljTNz.js","./diagram-S7CK7UJ4-Bt1v8-GC.js","./architectureDiagram-5GKGNRK7-DpIqL5h4.js","./diagram-VSXAHHWV-DHfYwp_9.js","./diagram-VX7I27RA-DdzD-4Le.js","./wardleyDiagram-VM6X3IG4-DZL-Zz2t.js","./cynefinDiagram-5FMLGOSQ-ErLF5N13.js","./railroadDiagram-O6MQD6OU-_Y3Ojg6G.js","./chunk-SVP7TREG-BLTlmMU7.js","./ebnfDiagram-PWID7BFC-Da9C9NO1.js","./abnfDiagram-VCTEODGH-g20pFzNV.js","./pegDiagram-XKGWAZYB-DrEZd4fD.js"])))=>i.map(i=>d[i]);
2
+ import{Ct as e,St as t,Tt as n,W as r,bt as i}from"./index-8ipRcQ-M.js";var a=n(t(),1),o=Object.defineProperty,s=(e,t)=>o(e,`name`,{value:t,configurable:!0}),c=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},l=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),u=n(l(),1),d={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},f={trace:s((...e)=>{},`trace`),debug:s((...e)=>{},`debug`),info:s((...e)=>{},`info`),warn:s((...e)=>{},`warn`),error:s((...e)=>{},`error`),fatal:s((...e)=>{},`fatal`)},p=s(function(e=`fatal`){let t=d.fatal;typeof e==`string`?e.toLowerCase()in d&&(t=d[e]):typeof e==`number`&&(t=e),f.trace=()=>{},f.debug=()=>{},f.info=()=>{},f.warn=()=>{},f.error=()=>{},f.fatal=()=>{},t<=d.fatal&&(f.fatal=console.error?console.error.bind(console,m(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,m(`FATAL`))),t<=d.error&&(f.error=console.error?console.error.bind(console,m(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,m(`ERROR`))),t<=d.warn&&(f.warn=console.warn?console.warn.bind(console,m(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,m(`WARN`))),t<=d.info&&(f.info=console.info?console.info.bind(console,m(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,m(`INFO`))),t<=d.debug&&(f.debug=console.debug?console.debug.bind(console,m(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,m(`DEBUG`))),t<=d.trace&&(f.trace=console.debug?console.debug.bind(console,m(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,m(`TRACE`)))},`setLogLevel`),m=s(e=>`%c${(0,u.default)().format(`ss.SSS`)} : ${e} : `,`format`),h={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return h.hue2rgb(a,i,e+1/3)*255;case`g`:return h.hue2rgb(a,i,e)*255;case`b`:return h.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}},g={channel:h,lang:{clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},_={};for(let e=0;e<=255;e++)_[e]=g.unit.dec2hex(e);var v={ALL:0,RGB:1,HSL:2},y=class{constructor(){this.type=v.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=v.ALL}is(e){return this.type===e}},b=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new y}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=v.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=g.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=g.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=g.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=g.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=g.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=g.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(v.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(v.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(v.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(v.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(v.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(v.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),x={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(x.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return b.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${_[Math.round(t)]}${_[Math.round(n)]}${_[Math.round(r)]}${_[Math.round(i*255)]}`:`#${_[Math.round(t)]}${_[Math.round(n)]}${_[Math.round(r)]}`}},S={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(S.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return g.channel.clamp.h(parseFloat(e)*.9);case`rad`:return g.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return g.channel.clamp.h(parseFloat(e)*360)}}return g.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(S.re);if(!n)return;let[,r,i,a,o,s]=n;return b.set({h:S._hue2deg(r),s:g.channel.clamp.s(parseFloat(i)),l:g.channel.clamp.l(parseFloat(a)),a:o?g.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${g.lang.round(t)}, ${g.lang.round(n)}%, ${g.lang.round(r)}%, ${i})`:`hsl(${g.lang.round(t)}, ${g.lang.round(n)}%, ${g.lang.round(r)}%)`}},C={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=C.colors[e];if(t)return x.parse(t)},stringify:e=>{let t=x.stringify(e);for(let e in C.colors)if(C.colors[e]===t)return e}},w={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(w.re);if(!n)return;let[,r,i,a,o,s,c,l,u]=n;return b.set({r:g.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:g.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:g.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?g.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${g.lang.round(t)}, ${g.lang.round(n)}, ${g.lang.round(r)}, ${g.lang.round(i)})`:`rgb(${g.lang.round(t)}, ${g.lang.round(n)}, ${g.lang.round(r)})`}},T={format:{keyword:C,hex:x,rgb:w,rgba:w,hsl:S,hsla:S},parse:e=>{if(typeof e!=`string`)return e;let t=x.parse(e)||w.parse(e)||S.parse(e)||C.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(v.HSL)||e.data.r===void 0?S.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?w.stringify(e):x.stringify(e)},E=(e,t)=>{let n=T.parse(e);for(let e in t)n[e]=g.channel.clamp[e](t[e]);return T.stringify(n)},D=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return E(e,{a:t});let i=b.set({r:g.channel.clamp.r(e),g:g.channel.clamp.g(t),b:g.channel.clamp.b(n),a:g.channel.clamp.a(r)});return T.stringify(i)},O=e=>{let{r:t,g:n,b:r}=T.parse(e),i=.2126*g.channel.toLinear(t)+.7152*g.channel.toLinear(n)+.0722*g.channel.toLinear(r);return g.lang.round(i)},ee=e=>O(e)>=.5,k=e=>!ee(e),te=(e,t,n)=>{let r=T.parse(e),i=r[t],a=g.channel.clamp[t](i+n);return i!==a&&(r[t]=a),T.stringify(r)},A=(e,t)=>te(e,`l`,t),j=(e,t)=>te(e,`l`,-t),M=(e,t)=>{let n=T.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return E(e,r)},ne=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=T.parse(e),{r:s,g:c,b:l,a:u}=T.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return D(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},N=(e,t=100)=>{let n=T.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ne(n,e,t)};function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ie(e){if(Array.isArray(e))return e}function P(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ae(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oe(e,t){return ie(e)||P(e,t)||se(e,t)||ae()}function se(e,t){if(e){if(typeof e==`string`)return re(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}var ce=Object.entries,le=Object.setPrototypeOf,ue=Object.isFrozen,de=Object.getPrototypeOf,fe=Object.getOwnPropertyDescriptor,pe=Object.freeze,me=Object.seal,he=Object.create,ge=typeof Reflect<`u`&&Reflect,_e=ge.apply,F=ge.construct;pe||=function(e){return e},me||=function(e){return e},_e||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},F||=function(e){return new e(...[...arguments].slice(1))};var ve=Re(Array.prototype.forEach),ye=Re(Array.prototype.lastIndexOf),be=Re(Array.prototype.pop),xe=Re(Array.prototype.push),Se=Re(Array.prototype.splice),Ce=Array.isArray,we=Re(String.prototype.toLowerCase),Te=Re(String.prototype.toString),Ee=Re(String.prototype.match),De=Re(String.prototype.replace),Oe=Re(String.prototype.indexOf),ke=Re(String.prototype.trim),Ae=Re(Number.prototype.toString),je=Re(Boolean.prototype.toString),Me=typeof BigInt>`u`?null:Re(BigInt.prototype.toString),Ne=typeof Symbol>`u`?null:Re(Symbol.prototype.toString),Pe=Re(Object.prototype.hasOwnProperty),Fe=Re(Object.prototype.toString),Ie=Re(RegExp.prototype.test),Le=ze(TypeError);function Re(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return _e(e,t,n)}}function ze(e){return function(){return F(e,[...arguments])}}function I(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:we;if(le&&le(e,null),!Ce(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Be(e){for(let t=0;t<e.length;t++)Pe(e,t)||(e[t]=null);return e}function Ve(e){let t=he(null);for(let r of ce(e)){var n=oe(r,2);let i=n[0],a=n[1];Pe(e,i)&&(Ce(a)?t[i]=Be(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=Ve(a):t[i]=a)}return t}function He(e){switch(typeof e){case`string`:return e;case`number`:return Ae(e);case`boolean`:return je(e);case`bigint`:return Me?Me(e):`0`;case`symbol`:return Ne?Ne(e):`Symbol()`;case`undefined`:return Fe(e);case`function`:case`object`:{if(e===null)return Fe(e);let t=e,n=Ue(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Fe(e)}return Fe(e)}default:return Fe(e)}}function Ue(e,t){for(;e!==null;){let n=fe(e,t);if(n){if(n.get)return Re(n.get);if(typeof n.value==`function`)return Re(n.value)}e=de(e)}function n(){return null}return n}function We(e){try{return Ie(e,``),!0}catch{return!1}}var Ge=pe(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ke=pe(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),qe=pe([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Je=pe([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ye=pe(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Xe=pe([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ze=pe([`#text`]),Qe=pe(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),$e=pe(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),et=pe(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),tt=pe([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),nt=me(/{{[\w\W]*|^[\w\W]*}}/g),rt=me(/<%[\w\W]*|^[\w\W]*%>/g),it=me(/\${[\w\W]*/g),at=me(/^data-[\-\w.\u00B7-\uFFFF]+$/),ot=me(/^aria-[\-\w]+$/),st=me(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ct=me(/^(?:\w+script|data):/i),lt=me(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ut=me(/^html$/i),dt=me(/^[a-z][.\w]*(-[.\w]+)+$/i),ft=me(/<[/\w!]/g),pt=me(/<[/\w]/g),mt=me(/<\/no(script|embed|frames)/i),ht=me(/\/>/i),gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_t=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],vt=pe(I({},_t)),yt=function(){let e={};return ve(_t,t=>{e[t]=me(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),pe(e)}(),bt=function(){return typeof window>`u`?null:window},xt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},St=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ct=function(e,t,n,r){return Pe(e,t)&&Ce(e[t])?I(r.base?Ve(r.base):{},e[t],r.transform):n},wt=function(e,t,n){let r=Pe(e,t)?e[t]:void 0;return r&&typeof r==`object`?Ve(r):n()};function Tt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bt(),t=e=>Tt(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==gt.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ue(d,`cloneNode`),p=Ue(d,`remove`),m=Ue(d,`nextSibling`),h=Ue(d,`childNodes`),g=Ue(d,`parentNode`),_=Ue(d,`shadowRoot`),v=Ue(d,`attributes`),y=o&&o.prototype?Ue(o.prototype,`nodeType`):null,b=o&&o.prototype?Ue(o.prototype,`nodeName`):null,x=o&&o.prototype?Ue(o.prototype,`ownerDocument`):null,S=function(e){return y?y(e):e.nodeType},C=function(e){return b?b(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,T=``,E,D=!1,O=0,ee=function(){if(O>0)throw Le(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},k=function(e){ee(),O++;try{return w.createHTML(e)}finally{O--}},te=function(e){ee(),O++;try{return w.createScriptURL(e)}finally{O--}},A=function(){return D||=(E=xt(u,i),!0),E},j=n,M=j.implementation,ne=j.createNodeIterator,N=j.createDocumentFragment,re=j.getElementsByTagName,ie=r.importNode,P=St();t.isSupported=typeof ce==`function`&&typeof g==`function`&&M&&M.createHTMLDocument!==void 0;let ae=nt,oe=rt,se=it,le=at,ue=ot,de=ct,fe=lt,ge=dt,_e=st,F=null,Ae=I({},[...Ge,...Ke,...qe,...Ye,...Ze]),je=null,Me=I({},[...Qe,...$e,...et,...tt]),Ne=Object.seal(he(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Fe=null,Re=null,ze=Object.seal(he(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Be=!0,_t=!0,Et=!1,Dt=!0,Ot=!1,kt=!0,At=!1,L=!1,jt=null,Mt=null,Nt=!1,Pt=!1,Ft=!1,It=!1,Lt=!0,Rt=!1,zt=`user-content-`,Bt=!0,Vt=!1,Ht={},Ut=null,Wt=I({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Gt=null,Kt=I({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qt=null,Jt=I({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Yt=`http://www.w3.org/1998/Math/MathML`,Xt=`http://www.w3.org/2000/svg`,Zt=`http://www.w3.org/1999/xhtml`,Qt=Zt,$t=!1,en=null,tn=I({},[Yt,Xt,Zt],Te),nn=pe([`mi`,`mo`,`mn`,`ms`,`mtext`]),rn=I({},nn),an=pe([`annotation-xml`]),on=I({},an),sn=I({},[`title`,`style`,`font`,`a`,`script`]),cn=null,ln=[`application/xhtml+xml`,`text/html`],R=null,un=null,dn=n.createElement(`form`),fn=function(e){return e instanceof RegExp||e instanceof Function},pn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(un&&un===e)return;(!e||typeof e!=`object`)&&(e={}),e=Ve(e),cn=ln.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,R=cn===`application/xhtml+xml`?Te:we,F=Ct(e,`ALLOWED_TAGS`,Ae,{transform:R}),je=Ct(e,`ALLOWED_ATTR`,Me,{transform:R}),en=Ct(e,`ALLOWED_NAMESPACES`,tn,{transform:Te}),qt=Ct(e,`ADD_URI_SAFE_ATTR`,Jt,{transform:R,base:Jt}),Gt=Ct(e,`ADD_DATA_URI_TAGS`,Kt,{transform:R,base:Kt}),Ut=Ct(e,`FORBID_CONTENTS`,Wt,{transform:R}),Fe=Ct(e,`FORBID_TAGS`,Ve({}),{transform:R}),Re=Ct(e,`FORBID_ATTR`,Ve({}),{transform:R}),Ht=Pe(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Ve(e.USE_PROFILES):e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,_t=e.ALLOW_DATA_ATTR!==!1,Et=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ot=e.SAFE_FOR_TEMPLATES||!1,kt=e.SAFE_FOR_XML!==!1,At=e.WHOLE_DOCUMENT||!1,Pt=e.RETURN_DOM||!1,Ft=e.RETURN_DOM_FRAGMENT||!1,It=e.RETURN_TRUSTED_TYPE||!1,Nt=e.FORCE_BODY||!1,Lt=e.SANITIZE_DOM!==!1,Rt=e.SANITIZE_NAMED_PROPS||!1,Bt=e.KEEP_CONTENT!==!1,Vt=e.IN_PLACE||!1,_e=We(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:st,Qt=typeof e.NAMESPACE==`string`?e.NAMESPACE:Zt,rn=wt(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>I({},nn)),on=wt(e,`HTML_INTEGRATION_POINTS`,()=>I({},an));let t=wt(e,`CUSTOM_ELEMENT_HANDLING`,()=>he(null));if(Ne=he(null),Pe(t,`tagNameCheck`)&&fn(t.tagNameCheck)&&(Ne.tagNameCheck=t.tagNameCheck),Pe(t,`attributeNameCheck`)&&fn(t.attributeNameCheck)&&(Ne.attributeNameCheck=t.attributeNameCheck),Pe(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Ne.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),me(Ne),Ot&&(_t=!1),Ft&&(Pt=!0),Ht&&(F=I({},Ze),je=he(null),Ht.html===!0&&(I(F,Ge),I(je,Qe)),Ht.svg===!0&&(I(F,Ke),I(je,$e),I(je,tt)),Ht.svgFilters===!0&&(I(F,qe),I(je,$e),I(je,tt)),Ht.mathMl===!0&&(I(F,Ye),I(je,et),I(je,tt))),ze.tagCheck=null,ze.attributeCheck=null,Pe(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?ze.tagCheck=e.ADD_TAGS:Ce(e.ADD_TAGS)&&(F===Ae&&(F=Ve(F)),I(F,e.ADD_TAGS,R))),Pe(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?ze.attributeCheck=e.ADD_ATTR:Ce(e.ADD_ATTR)&&(je===Me&&(je=Ve(je)),I(je,e.ADD_ATTR,R))),Pe(e,`ADD_FORBID_CONTENTS`)&&Ce(e.ADD_FORBID_CONTENTS)&&(Ut===Wt&&(Ut=Ve(Ut)),I(Ut,e.ADD_FORBID_CONTENTS,R)),Bt&&(F[`#text`]=!0),At&&I(F,[`html`,`head`,`body`]),F.table&&(I(F,[`tbody`]),delete Fe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Le(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Le(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=w;w=e.TRUSTED_TYPES_POLICY;try{T=k(``)}catch(e){throw w=t,e}}else e.TRUSTED_TYPES_POLICY===null?(w=void 0,T=``):(w===void 0&&(w=A()),w&&typeof T==`string`&&(T=k(``)));pe&&pe(e),un=e},mn=I({},[...Ke,...qe,...Je]),hn=I({},[...Ye,...Xe]),gn=function(e,t,n){return t.namespaceURI===Zt?e===`svg`:t.namespaceURI===Yt?e===`svg`&&(n===`annotation-xml`||rn[n]):!!mn[e]},_n=function(e,t,n){return t.namespaceURI===Zt?e===`math`:t.namespaceURI===Xt?e===`math`&&on[n]:!!hn[e]},vn=function(e,t,n){return t.namespaceURI===Xt&&!on[n]||t.namespaceURI===Yt&&!rn[n]?!1:!hn[e]&&(sn[e]||!mn[e])},yn=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Qt,tagName:`template`});let n=we(e.tagName),r=we(t.tagName);return en[e.namespaceURI]?e.namespaceURI===Xt?gn(n,t,r):e.namespaceURI===Yt?_n(n,t,r):e.namespaceURI===Zt?vn(n,t,r):!!(cn===`application/xhtml+xml`&&en[e.namespaceURI]):!1},z=function(e){xe(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Le(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},bn=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},xn=function(e){wn(e);let t=h(e);if(t){let e=[];ve(t,t=>{xe(e,t)}),ve(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&bn(e,r,i)}},Sn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}xe(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Pt||Ft)try{z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Cn=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||je[R(i)]||bn(e,r,i)}},wn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();S(e)===gt.element&&Cn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Tn=function(e,t){return kt?e===`patchsrc`?!0:e===`for`&&t!==`label`&&t!==`output`:!1},En=function(e){if(!kt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=S(e);if(n===gt.processingInstruction||n===gt.comment&&Ie(pt,e.data)){try{p(e)}catch{}continue}if(n===gt.element){let t=e,n=R(C(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Tn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Dn=function(e){let t=null,r=null;if(Nt)e=`<remove></remove>`+e;else{let t=Ee(e,/^[\r\n\t ]+/);r=t&&t[0]}cn===`application/xhtml+xml`&&Qt===Zt&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=w?k(e):e;if(Qt===Zt)try{t=new l().parseFromString(i,cn)}catch{}if(!t||!t.documentElement){t=M.createDocument(Qt,`template`,null);try{t.documentElement.innerHTML=$t?T:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Qt===Zt?re.call(t,At?`html`:`body`)[0]:At?t.documentElement:a},On=function(e){let t=x?x(e):e.ownerDocument;return ne.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},kn=function(e){return e=De(e,ae,` `),e=De(e,oe,` `),e=De(e,se,` `),e},An=function(e){e.normalize();let t=x?x(e):e.ownerDocument,n=ne.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=kn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ve(i,e=>{Mn(e.content)&&An(e.content)})},jn=function(e){let t=b?b(e):null;return typeof t!=`string`||R(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Mn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===gt.documentFragment}catch{return!1}},Nn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Pn(e,n,r){e.length!==0&&ve(e,e=>{e.call(t,n,r,un)})}let Fn=function(e,t){return!!(kt&&e.hasChildNodes()&&!Nn(e.firstElementChild)&&Ie(ft,e.textContent)&&Ie(ft,e.innerHTML)||kt&&e.namespaceURI===Zt&&vt[t]&&(Nn(e.firstElementChild)||typeof e.textContent==`string`&&Ie(yt[t],e.textContent))||e.nodeType===gt.processingInstruction||kt&&e.nodeType===gt.comment&&Ie(pt,e.data))},In=function(e,t){return e instanceof RegExp?Ie(e,t):e instanceof Function?!!e(t,...[...arguments].slice(2)):!1},Ln=function(e,t,n){if(!Fe[t]&&Un(t)&&In(Ne.tagNameCheck,t))return!1;if(Bt&&!Ut[t]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,m(e))}}}return z(e),!0},Rn=function(e,t,n,r){return e.length===0?t:t===n||t===r?Ve(t):t},zn=function(e,t){return e===t||g(e)!==null?!1:(Vt&&wn(e),!0)},Bn=function(e,n){if(Pn(P.beforeSanitizeElements,e,null),zn(e,n))return!0;if(jn(e))return z(e),!0;let r=R(C(e));if(F=Rn(P.uponSanitizeElement,F,Ae,jt),Pn(P.uponSanitizeElement,e,{tagName:r,allowedTags:F}),zn(e,n))return!0;if(Fn(e,r))return z(e),!0;if(Fe[r]||!(ze.tagCheck instanceof Function&&ze.tagCheck(r))&&!F[r]){let t=Ln(e,r,n);return t===!1&&Pn(P.afterSanitizeElements,e,null),t}if(S(e)===gt.element&&!yn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Ie(mt,e.innerHTML))return z(e),!0;if(Ot&&e.nodeType===gt.text){let n=kn(e.textContent);e.textContent!==n&&(xe(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Pn(P.afterSanitizeElements,e,null),!1},Vn=function(e,t,r){if(Re[t]||Tn(t,e)||Lt&&(t===`id`||t===`name`)&&(r in n||r in dn))return!1;let i=je[t]||ze.attributeCheck instanceof Function&&ze.attributeCheck(t,e);return _t&&Ie(le,t)||Be&&Ie(ue,t)?!0:i?qt[t]||Ie(_e,De(r,fe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Oe(r,`data:`)===0&&Gt[e]||Et&&!Ie(de,De(r,fe,``))?!0:!r:Un(e)&&In(Ne.tagNameCheck,e)&&In(Ne.attributeNameCheck,t,e)||t===`is`&&Ne.allowCustomizedBuiltInElements&&In(Ne.tagNameCheck,r)},Hn=I({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Un=function(e){return!Hn[we(e)]&&Ie(ge,e)},Wn=function(e,t,n,r){if(w&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return te(r)}return r},Gn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),jn(e)?z(e):be(t.removed)}catch{Sn(n,e)}},Kn=function(e){Pn(P.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||jn(e))return;je=Rn(P.uponSanitizeAttribute,je,Me,Mt);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:je,forceKeepAttr:void 0},r=t.length,i=R(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=R(o),u=c,d=o===`value`?u:ke(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Pn(P.uponSanitizeAttribute,e,n),d=n.attrValue,Rt&&(l===`id`||l===`name`)&&Oe(d,zt)!==0&&(Sn(o,e,a),d=zt+d),kt&&Ie(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Sn(o,e,a);continue}if(l===`attributename`&&Ee(d,`href`)){Sn(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Sn(o,e,a);continue}if(!Dt&&Ie(ht,d)){Sn(o,e,a);continue}if(Ot&&(d=kn(d)),!Vn(i,l,d)){Sn(o,e,a);continue}d=Wn(i,l,s,d),d!==u&&Gn(e,o,s,d)}}Pn(P.afterSanitizeAttributes,e,null)},qn=function(e){let t=null,n=On(e);for(Pn(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Pn(P.uponSanitizeShadowNode,t,null),Bn(t,e),Kn(t),Mn(t.content)&&qn(t.content),S(t)===gt.element){let e=_(t);Mn(e)&&(Jn(e),qn(e))}Pn(P.afterSanitizeShadowDOM,e,null)},Jn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){qn(e.shadow);continue}let n=e.node,r=S(n)===gt.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&R(e)===`template`){let e=n.content;Mn(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Mn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if($t=!e,$t&&(e=`<!-->`),typeof e!=`string`&&!Nn(e)&&(e=He(e),typeof e!=`string`))throw Le(`dirty is not a string, aborting`);if(!t.isSupported)return e;L?(F=jt,je=Mt):pn(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(F=Ve(F)),P.uponSanitizeAttribute.length>0&&(je=Ve(je)),t.removed=[];let c=Vt&&typeof e!=`string`&&Nn(e);if(c){En(e);let t=C(e);if(typeof t==`string`){let n=R(t);if(!F[n]||Fe[n])throw xn(e),Le(`root node is forbidden and cannot be sanitized in-place`)}if(jn(e))throw xn(e),Le(`root node is clobbered and cannot be sanitized in-place`);try{Jn(e)}catch(t){throw xn(e),t}}else if(Nn(e))i=Dn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===gt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Jn(a);else{if(!Pt&&!Ot&&!At&&e.indexOf(`<`)===-1)return w&&It?k(e):e;if(i=Dn(e),!i)return Pt?null:It?T:``}i&&Nt&&z(i.firstChild);let l=c?e:i;try{let e=On(l);for(;o=e.nextNode();)Bn(o,l),Kn(o),Mn(o.content)&&qn(o.content)}catch(n){throw c&&(xn(e),ve(t.removed,e=>{e.element&&wn(e.element)})),n}if(c)return ve(t.removed,e=>{e.element&&wn(e.element)}),Ot&&An(e),e;if(Pt){if(Ot&&An(i),Ft)for(s=N.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(je.shadowroot||je.shadowrootmode)&&(s=ie.call(r,s,!0)),s}let u=At?i.outerHTML:i.innerHTML;return At&&F[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ie(ut,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
4
+ `+u),Ot&&(u=kn(u)),w&&It?k(u):u},t.setConfig=function(){pn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),L=!0,jt=F,Mt=je},t.clearConfig=function(){un=null,L=!1,jt=null,Mt=null,w=E,T=``},t.isValidAttribute=function(e,t,n){return un||pn({}),Vn(R(e),R(t),n)},t.addHook=function(e,t){typeof t==`function`&&Pe(P,e)&&xe(P[e],t)},t.removeHook=function(e,t){if(Pe(P,e)){if(t!==void 0){let n=ye(P[e],t);return n===-1?void 0:Se(P[e],n,1)[0]}return be(P[e])}},t.removeHooks=function(e){Pe(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=St()},t}var Et=Tt(),Dt=s((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>Dt(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=Dt(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),Ot=Dt,kt=`#ffffff`,At=`#f2f2f2`,L=s((e,t)=>t?M(e,{s:-40,l:10}):M(e,{s:-40,l:-10}),`mkBorder`),jt=class{static{s(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||j(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||j(this.mainBkg,10)):(this.rowOdd=this.rowOdd||A(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||A(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||`#777`,this.archEdgeArrowColor=this.archEdgeArrowColor||`#777`,this.archEdgeWidth=this.archEdgeWidth||`3`,this.archGroupBorderColor=this.archGroupBorderColor||`#000`,this.archGroupBorderWidth=this.archGroupBorderWidth||`2px`,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Mt=s(e=>{let t=new jt;return t.calculate(e),t},`getThemeVariables`),Nt=class{static{s(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=A(N(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=j(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=j(this.sectionBkgColor,10),this.taskBorderColor=D(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=D(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||A(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||j(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=A(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=A(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=A(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=N(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??A(this[`cScale`+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#FF6B6B`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#1B5E20`,complicatedBg:this.cynefin?.complicatedBg||`#0D47A1`,chaoticBg:this.cynefin?.chaoticBg||`#BF360C`,clearBg:this.cynefin?.clearBg||`#F57F17`,confusionBg:this.cynefin?.confusionBg||`#4A148C`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22`},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#ff6b6b`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.secondaryColor,20),this.git1=A(this.pie2||this.secondaryColor,20),this.git2=A(this.pie3||this.tertiaryColor,20),this.git3=A(this.pie4||M(this.primaryColor,{h:-30}),20),this.git4=A(this.pie5||M(this.primaryColor,{h:-60}),20),this.git5=A(this.pie6||M(this.primaryColor,{h:-90}),10),this.git6=A(this.pie7||M(this.primaryColor,{h:60}),10),this.git7=A(this.pie8||M(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`#2d2d2d`,this.emUiStroke=this.emUiStroke||`#555`,this.emProcessorFill=this.emProcessorFill||A(`#5a3d5c`,10),this.emProcessorStroke=this.emProcessorStroke||`#8a6d8c`,this.emReadModelFill=this.emReadModelFill||A(`#3d5a2d`,10),this.emReadModelStroke=this.emReadModelStroke||`#6d8c5c`,this.emCommandFill=this.emCommandFill||A(`#2d3d5a`,10),this.emCommandStroke=this.emCommandStroke||`#5c6d8c`,this.emEventFill=this.emEventFill||A(`#5a452d`,10),this.emEventStroke=this.emEventStroke||`#8c755c`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||A(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||A(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||A(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Pt=s(e=>{let t=new Nt;return t.calculate(e),t},`getThemeVariables`),Ft=class{static{s(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=M(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=D(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||A(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||A(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||M(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||M(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||j(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},It=s(e=>{let t=new Ft;return t.calculate(e),t},`getThemeVariables`),Lt=class{static{s(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=A(`#cde498`,10),this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=j(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||A(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||A(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||M(this.primaryColor,{l:-30}),this.pie5=this.pie5||M(this.secondaryColor,{l:-30}),this.pie6=this.pie6||M(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??M(this.primaryColor,{l:-30}),this.venn2=this.venn2??M(this.secondaryColor,{l:-30}),this.venn3=this.venn3??M(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??M(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??M(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??M(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??M(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??M(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B4513`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#C8E6C9`,complicatedBg:this.cynefin?.complicatedBg||`#DCEDC8`,chaoticBg:this.cynefin?.chaoticBg||`#FFE0B2`,clearBg:this.cynefin?.clearBg||`#FFF9C4`,confusionBg:this.cynefin?.confusionBg||`#D7CCC8`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Rt=s(e=>{let t=new Lt;return t.calculate(e),t},`getThemeVariables`),zt=class{static{s(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=A(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||A(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=A(this.contrast,55),this.border2=this.contrast,this.actorBorder=A(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=A(this.contrast,30),this.sectionBkgColor2=A(this.contrast,30),this.taskBorderColor=j(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=A(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=j(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||`#000`,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f4f4f4`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||`#000`,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#222`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0`},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||M(this.primaryColor,{h:-30}),this.git4=this.pie5||M(this.primaryColor,{h:-60}),this.git5=this.pie6||M(this.primaryColor,{h:-90}),this.git6=this.pie7||M(this.primaryColor,{h:60}),this.git7=this.pie8||M(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1=`white`,this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3=`white`,this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Bt=s(e=>{let t=new zt;return t.calculate(e),t},`getThemeVariables`),Vt=class{static{s(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=M(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||A(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||M(e,{h:30}),this.cScale4=this.cScale4||M(e,{h:60}),this.cScale5=this.cScale5||M(e,{h:90}),this.cScale6=this.cScale6||M(e,{h:120}),this.cScale7=this.cScale7||M(e,{h:150}),this.cScale8=this.cScale8||M(e,{h:210,l:150}),this.cScale9=this.cScale9||M(e,{h:270}),this.cScale10=this.cScale10||M(e,{h:300}),this.cScale11=this.cScale11||M(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||M(e,{h:64}),this.fillType3=this.fillType3||M(t,{h:64}),this.fillType4=this.fillType4||M(e,{h:-64}),this.fillType5=this.fillType5||M(t,{h:-64}),this.fillType6=this.fillType6||M(e,{h:128}),this.fillType7=this.fillType7||M(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||M(e,{l:-10}),this.pie5=this.pie5||M(t,{l:-10}),this.pie6=this.pie6||M(n,{l:-10}),this.pie7=this.pie7||M(e,{h:60,l:-10}),this.pie8=this.pie8||M(e,{h:-60,l:-10}),this.pie9=this.pie9||M(e,{h:120,l:0}),this.pie10=this.pie10||M(e,{h:60,l:-20}),this.pie11=this.pie11||M(e,{h:-60,l:-20}),this.pie12=this.pie12||M(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||M(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||M(e,{h:-30}),this.git4=this.git4||M(e,{h:-60}),this.git5=this.git5||M(e,{h:-90}),this.git6=this.git6||M(e,{h:60}),this.git7=this.git7||M(e,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ht=s(e=>{let t=new Vt;return t.calculate(e),t},`getThemeVariables`),Ut=class{static{s(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=A(N(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=N(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||`#0b0000`,this.git1=this.git1||`#4d1037`,this.git2=this.git2||`#3f5258`,this.git3=this.git3||`#4f2f1b`,this.git4=this.git4||`#6e0a0a`,this.git5=this.git5||`#3b0048`,this.git6=this.git6||`#995a01`,this.git7=this.git7||`#154706`,this.gitDarkMode=!0,this.gitDarkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Wt=s(e=>{let t=new Ut;return t.calculate(e),t},`getThemeVariables`),Gt=class{static{s(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=L(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=M(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||A(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||M(e,{h:64}),this.fillType3=this.fillType3||M(t,{h:64}),this.fillType4=this.fillType4||M(e,{h:-64}),this.fillType5=this.fillType5||M(t,{h:-64}),this.fillType6=this.fillType6||M(e,{h:128}),this.fillType7=this.fillType7||M(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||M(e,{l:-10}),this.pie5=this.pie5||M(t,{l:-10}),this.pie6=this.pie6||M(n,{l:-10}),this.pie7=this.pie7||M(e,{h:60,l:-10}),this.pie8=this.pie8||M(e,{h:-60,l:-10}),this.pie9=this.pie9||M(e,{h:120,l:0}),this.pie10=this.pie10||M(e,{h:60,l:-20}),this.pie11=this.pie11||M(e,{h:-60,l:-20}),this.pie12=this.pie12||M(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||M(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||M(e,{h:-30}),this.git4=this.git4||M(e,{h:-60}),this.git5=this.git5||M(e,{h:-90}),this.git6=this.git6||M(e,{h:60}),this.git7=this.git7||M(e,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Kt=s(e=>{let t=new Gt;return t.calculate(e),t},`getThemeVariables`),qt=class{static{s(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=A(N(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=N(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=j(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#16141F`,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Jt=s(e=>{let t=new qt;return t.calculate(e),t},`getThemeVariables`),Yt=class{static{s(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=L(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=M(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||A(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||M(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||M(e,{h:64}),this.fillType3=this.fillType3||M(t,{h:64}),this.fillType4=this.fillType4||M(e,{h:-64}),this.fillType5=this.fillType5||M(t,{h:-64}),this.fillType6=this.fillType6||M(e,{h:128}),this.fillType7=this.fillType7||M(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||M(e,{l:-10}),this.pie5=this.pie5||M(t,{l:-10}),this.pie6=this.pie6||M(n,{l:-10}),this.pie7=this.pie7||M(e,{h:60,l:-10}),this.pie8=this.pie8||M(e,{h:-60,l:-10}),this.pie9=this.pie9||M(e,{h:120,l:0}),this.pie10=this.pie10||M(e,{h:60,l:-20}),this.pie11=this.pie11||M(e,{h:-60,l:-20}),this.pie12=this.pie12||M(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||M(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||M(e,{h:-30}),this.git4=this.git4||M(e,{h:-60}),this.git5=this.git5||M(e,{h:-90}),this.git6=this.git6||M(e,{h:60}),this.git7=this.git7||M(e,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.fontWeight=600,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Xt=s(e=>{let t=new Yt;return t.calculate(e),t},`getThemeVariables`),Zt=class{static{s(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=L(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=A(N(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=N(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||L(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||L(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||L(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||L(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||N(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||j(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=j(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||M(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||M(this.primaryColor,{h:64}),this.fillType3=this.fillType3||M(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||M(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||M(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||M(this.primaryColor,{h:128}),this.fillType7=this.fillType7||M(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||M(this.primaryColor,{l:-10}),this.pie5=this.pie5||M(this.secondaryColor,{l:-10}),this.pie6=this.pie6||M(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||M(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||M(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||M(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||M(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||M(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||M(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||M(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||M(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||M(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||M(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||M(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||M(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||k(this.quadrant1Fill)?A(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||M(this.primaryColor,{h:-30}),this.git4=this.git4||M(this.primaryColor,{h:-60}),this.git5=this.git5||M(this.primaryColor,{h:-90}),this.git6=this.git6||M(this.primaryColor,{h:60}),this.git7=this.git7||M(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.fontWeight=600,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||kt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||At}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Qt={base:{getThemeVariables:Mt},dark:{getThemeVariables:Pt},default:{getThemeVariables:It},forest:{getThemeVariables:Rt},neutral:{getThemeVariables:Bt},neo:{getThemeVariables:Ht},"neo-dark":{getThemeVariables:Wt},redux:{getThemeVariables:Kt},"redux-dark":{getThemeVariables:Jt},"redux-color":{getThemeVariables:Xt},"redux-dark-color":{getThemeVariables:s(e=>{let t=new Zt;return t.calculate(e),t},`getThemeVariables`)}},$t={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},en={...$t,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Qt.default.getThemeVariables(),sequence:{...$t.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...$t.gantt,tickInterval:void 0,useWidth:void 0},c4:{...$t.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...$t.flowchart,inheritDir:!1},external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...$t.pie,useWidth:984},xyChart:{...$t.xyChart,useWidth:void 0},requirement:{...$t.requirement,useWidth:void 0},packet:{...$t.packet},eventmodeling:{...$t.eventmodeling},treeView:{...$t.treeView,useWidth:void 0},radar:{...$t.radar},railroad:{...$t.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...$t.ishikawa},sankey:{...$t.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...$t.venn},cynefin:{...$t.cynefin}},tn=s((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...tn(e[r],``)]:[...n,t+r],[]),`keyify`),nn=new Set(tn(en,``)),rn=en,an={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},on=s((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(f.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),sn=s(e=>{if(f.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>sn(e));return}for(let t of Object.keys(e)){if(f.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!nn.has(t)||e[t]==null){f.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=an[t];n?on(e[t],n):(f.debug(`sanitizing object`,t),sn(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(f.debug(`sanitizing css option`,t),e[t]=cn(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}f.debug(`After sanitization`,e)}},`sanitizeDirective`),cn=s(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),ln=Object.freeze(rn),R=s(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),un=Ot({},ln),dn,fn=[],pn=Ot({},ln),mn=s((e,t)=>{let n=Ot({},e),r={};for(let e of t)bn(e),r=Ot(r,e);if(n=Ot(n,r),r.theme&&r.theme in Qt){let e=Ot(Ot({},dn).themeVariables||{},r.themeVariables);n.theme&&n.theme in Qt&&(n.themeVariables=Qt[n.theme].getThemeVariables(e))}return pn=n,En(pn),pn},`updateCurrentConfig`),hn=s(e=>(un=Ot({},ln),un=Ot(un,e),e.theme&&Qt[e.theme]&&(un.themeVariables=Qt[e.theme].getThemeVariables(e.themeVariables)),mn(un,fn),un),`setSiteConfig`),gn=s(e=>{dn=Ot({},e)},`saveConfigFromInitialize`),_n=s(e=>(un=Ot(un,e),mn(un,fn),un),`updateSiteConfig`),vn=s(()=>Ot({},un),`getSiteConfig`),yn=s(e=>(mn(pn,[e]),z()),`setConfig`),z=s(()=>Ot({},pn),`getConfig`),bn=s(e=>{e&&([`secure`,...un.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(f.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&bn(e[t])}))},`sanitize`),xn=s(e=>{sn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fn.push(e),mn(un,fn)},`addDirective`),Sn=s((e=un)=>{fn=[],mn(e,fn)},`reset`),Cn={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},wn={},Tn=s(e=>{wn[e]||(f.warn(Cn[e]),wn[e]=!0)},`issueWarning`),En=s(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Tn(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),Dn=s(()=>{let e={};dn&&(e=Ot(e,dn));for(let t of fn)e=Ot(e,t);return e},`getUserDefinedConfig`),On=s(e=>(e.flowchart?.htmlLabels!=null&&Tn(`FLOWCHART_HTML_LABELS_DEPRECATED`),R(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),kn=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,An=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,jn=/\s*%%.*\n/gm,Mn=class extends Error{static{s(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},Nn={},Pn=s(function(e,t){e=e.replace(kn,``).replace(An,``).replace(jn,`
5
+ `);for(let[n,{detector:r}]of Object.entries(Nn))if(r(e,t))return n;throw new Mn(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Fn=s((...e)=>{for(let{id:t,detector:n,loader:r}of e)In(t,n,r)},`registerLazyLoadedDiagrams`),In=s((e,t,n)=>{Nn[e]&&f.warn(`Detector with key ${e} already exists. Overwriting.`),Nn[e]={detector:t,loader:n},f.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),Ln=s(e=>Nn[e].loader,`getDiagramLoader`),Rn=/<br\s*\/?>/gi,zn=s(e=>e?Yn(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),Bn=(()=>{let e=!1;return()=>{e||=(Vn(),!0)}})();function Vn(){let e=`data-temp-href-target`;Et.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),Et.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}s(Vn,`setupDompurifyHooks`);var Hn=s(e=>(Bn(),Et.sanitize(e)),`removeScript`),Un=s((e,t)=>{if(On(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=Hn(e):n!==`loose`&&(e=Yn(e),e=e.replace(/</g,`&lt;`).replace(/>/g,`&gt;`),e=e.replace(/=/g,`&equals;`),e=Jn(e))}return e},`sanitizeMore`),Wn=s((e,t)=>e&&(e=t.dompurifyConfig?Et.sanitize(Un(e,t),t.dompurifyConfig).toString():Et.sanitize(Un(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),Gn=s((e,t)=>typeof e==`string`?Wn(e,t):e.flat().map(e=>Wn(e,t)),`sanitizeTextOrArray`),Kn=s(e=>Rn.test(e),`hasBreaks`),qn=s(e=>e.split(Rn),`splitBreaks`),Jn=s(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),Yn=s(e=>e.replace(Rn,`#br#`),`breakToPlaceholder`),Xn=s(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Zn=s(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),Qn=s(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),$n=s(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];tr(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(nr(r))}return n.join(``)},`parseGenericTypes`),er=s((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),tr=s((e,t)=>{let n=er(e,`~`),r=er(t,`~`);return n===1&&r===1},`shouldCombineSets`),nr=s(e=>{let t=er(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),rr=s(()=>window.MathMLElement!==void 0,`isMathMLSupported`),ir=/\$\$(.*?)\$\$/g,ar=s(e=>(e.match(ir)?.length??0)>0,`hasKatex`),or=s(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await cr(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),sr=s(async(e,t)=>{if(!ar(e))return e;if(!(rr()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ir,`MathML is unsupported in this environment.`);{let{default:n}=await r(async()=>{let{default:e}=await import(`./katex-vFWytM5c.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1,2]),import.meta.url),i=t.forceLegacyMathML||!rr()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Rn).map(e=>ar(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(ir,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}return e.replace(ir,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),cr=s(async(e,t)=>Wn(await sr(e,t),t),`renderKatexSanitized`),lr={getRows:zn,sanitizeText:Wn,sanitizeTextOrArray:Gn,hasBreaks:Kn,splitBreaks:qn,lineBreakRegex:Rn,removeScript:Hn,getUrl:Xn,evaluate:R,getMax:Zn,getMin:Qn},ur=s(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),dr=s(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),fr=s(function(e,t,n,r){ur(e,dr(t,n,r))},`configureSvgSize`),pr=s(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;f.info(`SVG bounds: ${a}x${o}`,i);let s=0,c=0;f.info(`Graph bounds: ${s}x${c}`,e),s=a+n*2,c=o+n*2,f.info(`Calculated bounds: ${s}x${c}`),fr(t,c,s,r);let l=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,l)},`setupGraphViewbox`),mr={};function hr(e){return[...e.cssRules].map(e=>e.cssText).join(`
6
+ `)}s(hr,`cssStyleSheetToString`);var gr=s((e,t,n,r)=>{let i=``;return e in mr&&mr[e]?i=mr[e]({...n,svgId:r}):f.warn(`No theme found for ${e}`),`& {
7
+ font-family: ${n.fontFamily};
8
+ font-size: ${n.fontSize};
9
+ fill: ${n.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${n.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${n.errorTextColor};
40
+ stroke: ${n.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${n.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${n.lineColor};
65
+ stroke: ${n.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${n.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${n.fontFamily};
73
+ font-size: ${n.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${i}
80
+ .node .neo-node {
81
+ stroke: ${n.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
86
+ filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
87
+ }
88
+ [data-look="neo"].swimlane.cluster rect {
89
+ filter: none;
90
+ }
91
+
92
+
93
+ [data-look="neo"].node path {
94
+ stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
95
+ stroke-width: ${n.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${n.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
109
+ filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
110
+ }
111
+
112
+ [data-look="neo"].node circle .state-start{
113
+ fill: #000000;
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon {
117
+ fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
118
+ filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
123
+ filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
124
+ }
125
+
126
+ ${t}
127
+ `},`getStyles`),_r=s((e,t)=>{t!==void 0&&(mr[e]=t)},`addStylesForDiagram`),vr=gr,yr={};c(yr,{clear:()=>wr,getAccDescription:()=>Or,getAccTitle:()=>Er,getDiagramTitle:()=>Ar,setAccDescription:()=>Dr,setAccTitle:()=>Tr,setDiagramTitle:()=>kr});var br=``,xr=``,Sr=``,Cr=s(e=>Wn(e,z()),`sanitizeText`),wr=s(()=>{br=``,Sr=``,xr=``},`clear`),Tr=s(e=>{br=Cr(e).replace(/^\s+/g,``)},`setAccTitle`),Er=s(()=>br,`getAccTitle`),Dr=s(e=>{Sr=Cr(e).replace(/\n\s+/g,`
128
+ `)},`setAccDescription`),Or=s(()=>Sr,`getAccDescription`),kr=s(e=>{xr=Cr(e)},`setDiagramTitle`),Ar=s(()=>xr,`getDiagramTitle`),jr=f,Mr=p,B=z,Nr=yn,Pr=ln,Fr=s(e=>Wn(e,B()),`sanitizeText`),Ir=pr,Lr=s(()=>yr,`getCommonDb`),Rr={},zr=s((e,t,n)=>{Rr[e]&&jr.warn(`Diagram with id ${e} already registered. Overwriting.`),Rr[e]=t,n&&In(e,n),_r(e,t.styles),t.injectUtils?.(jr,Mr,B,Fr,Ir,Lr(),()=>{})},`registerDiagram`),Br=s(e=>{if(e in Rr)return Rr[e];throw new Vr(e)},`getDiagram`),Vr=class extends Error{static{s(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}},Hr={value:()=>{}};function Ur(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Wr(n)}function Wr(e){this._=e}function Gr(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Wr.prototype=Ur.prototype={constructor:Wr,on:function(e,t){var n=this._,r=Gr(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Kr(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=qr(n[i],e.name,t);else if(t==null)for(i in n)n[i]=qr(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Wr(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Kr(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function qr(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Hr,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Jr={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Yr(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Jr.hasOwnProperty(t)?{space:Jr[t],local:e}:e}function Xr(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Zr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qr(e){var t=Yr(e);return(t.local?Zr:Xr)(t)}function $r(){}function ei(e){return e==null?$r:function(){return this.querySelector(e)}}function ti(e){typeof e!=`function`&&(e=ei(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Ua(r,this._parents)}function ni(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ri(){return[]}function ii(e){return e==null?ri:function(){return this.querySelectorAll(e)}}function ai(e){return function(){return ni(e.apply(this,arguments))}}function oi(e){e=typeof e==`function`?ai(e):ii(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Ua(r,i)}function si(e){return function(){return this.matches(e)}}function ci(e){return function(t){return t.matches(e)}}var li=Array.prototype.find;function ui(e){return function(){return li.call(this.children,e)}}function di(){return this.firstElementChild}function fi(e){return this.select(e==null?di:ui(typeof e==`function`?e:ci(e)))}var pi=Array.prototype.filter;function mi(){return Array.from(this.children)}function hi(e){return function(){return pi.call(this.children,e)}}function gi(e){return this.selectAll(e==null?mi:hi(typeof e==`function`?e:ci(e)))}function _i(e){typeof e!=`function`&&(e=si(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Ua(r,this._parents)}function vi(e){return Array(e.length)}function yi(){return new Ua(this._enter||this._groups.map(vi),this._parents)}function bi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bi.prototype={constructor:bi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function xi(e){return function(){return e}}function Si(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new bi(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function Ci(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new bi(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function wi(e){return e.__data__}function Ti(e,t){if(!arguments.length)return Array.from(this,wi);var n=t?Ci:Si,r=this._parents,i=this._groups;typeof e!=`function`&&(e=xi(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Ei(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Ua(o,r),o._enter=s,o._exit=c,o}function Ei(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Di(){return new Ua(this._exit||this._groups.map(vi),this._parents)}function Oi(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ki(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Ua(s,this._parents)}function Ai(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ji(e){e||=Mi;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Ua(i,this._parents).order()}function Mi(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ni(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Pi(){return Array.from(this)}function Fi(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Ii(){let e=0;for(let t of this)++e;return e}function Li(){return!this.node()}function Ri(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function zi(e){return function(){this.removeAttribute(e)}}function Bi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vi(e,t){return function(){this.setAttribute(e,t)}}function Hi(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ui(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Wi(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Gi(e,t){var n=Yr(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Bi:zi:typeof t==`function`?n.local?Wi:Ui:n.local?Hi:Vi)(n,t))}function Ki(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qi(e){return function(){this.style.removeProperty(e)}}function Ji(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Yi(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Xi(e,t,n){return arguments.length>1?this.each((t==null?qi:typeof t==`function`?Yi:Ji)(e,t,n??``)):Zi(this.node(),e)}function Zi(e,t){return e.style.getPropertyValue(t)||Ki(e).getComputedStyle(e,null).getPropertyValue(t)}function Qi(e){return function(){delete this[e]}}function $i(e,t){return function(){this[e]=t}}function ea(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ta(e,t){return arguments.length>1?this.each((t==null?Qi:typeof t==`function`?ea:$i)(e,t)):this.node()[e]}function na(e){return e.trim().split(/^|\s+/)}function ra(e){return e.classList||new ia(e)}function ia(e){this._node=e,this._names=na(e.getAttribute(`class`)||``)}ia.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function aa(e,t){for(var n=ra(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function oa(e,t){for(var n=ra(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function sa(e){return function(){aa(this,e)}}function ca(e){return function(){oa(this,e)}}function la(e,t){return function(){(t.apply(this,arguments)?aa:oa)(this,e)}}function ua(e,t){var n=na(e+``);if(arguments.length<2){for(var r=ra(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?la:t?sa:ca)(n,t))}function da(){this.textContent=``}function fa(e){return function(){this.textContent=e}}function pa(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function ma(e){return arguments.length?this.each(e==null?da:(typeof e==`function`?pa:fa)(e)):this.node().textContent}function ha(){this.innerHTML=``}function ga(e){return function(){this.innerHTML=e}}function _a(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function va(e){return arguments.length?this.each(e==null?ha:(typeof e==`function`?_a:ga)(e)):this.node().innerHTML}function ya(){this.nextSibling&&this.parentNode.appendChild(this)}function ba(){return this.each(ya)}function xa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Sa(){return this.each(xa)}function Ca(e){var t=typeof e==`function`?e:Qr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wa(){return null}function Ta(e,t){var n=typeof e==`function`?e:Qr(e),r=t==null?wa:typeof t==`function`?t:ei(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ea(){var e=this.parentNode;e&&e.removeChild(this)}function Da(){return this.each(Ea)}function Oa(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ka(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Aa(e){return this.select(e?ka:Oa)}function ja(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Ma(e){return function(t){e.call(this,t,this.__data__)}}function Na(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Pa(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Fa(e,t,n){return function(){var r=this.__on,i,a=Ma(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Ia(e,t,n){var r=Na(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Fa:Pa,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function La(e,t,n){var r=Ki(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Ra(e,t){return function(){return La(this,e,t)}}function za(e,t){return function(){return La(this,e,t.apply(this,arguments))}}function Ba(e,t){return this.each((typeof t==`function`?za:Ra)(e,t))}function*Va(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Ha=[null];function Ua(e,t){this._groups=e,this._parents=t}function Wa(){return new Ua([[document.documentElement]],Ha)}function Ga(){return this}Ua.prototype=Wa.prototype={constructor:Ua,select:ti,selectAll:oi,selectChild:fi,selectChildren:gi,filter:_i,data:Ti,enter:yi,exit:Di,join:Oi,merge:ki,selection:Ga,order:Ai,sort:ji,call:Ni,nodes:Pi,node:Fi,size:Ii,empty:Li,each:Ri,attr:Gi,style:Xi,property:ta,classed:ua,text:ma,html:va,raise:ba,lower:Sa,append:Ca,insert:Ta,remove:Da,clone:Aa,datum:ja,on:Ia,dispatch:Ba,[Symbol.iterator]:Va};function V(e){return typeof e==`string`?new Ua([[document.querySelector(e)]],[document.documentElement]):new Ua([[e]],Ha)}function Ka(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qa(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ja(){}var Ya=.7,Xa=1/Ya,Za=`\\s*([+-]?\\d+)\\s*`,Qa=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,$a=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,eo=/^#([0-9a-f]{3,8})$/,to=RegExp(`^rgb\\(${Za},${Za},${Za}\\)$`),no=RegExp(`^rgb\\(${$a},${$a},${$a}\\)$`),ro=RegExp(`^rgba\\(${Za},${Za},${Za},${Qa}\\)$`),io=RegExp(`^rgba\\(${$a},${$a},${$a},${Qa}\\)$`),ao=RegExp(`^hsl\\(${Qa},${$a},${$a}\\)$`),oo=RegExp(`^hsla\\(${Qa},${$a},${$a},${Qa}\\)$`),so={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ka(Ja,po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:co,formatHex:co,formatHex8:lo,formatHsl:uo,formatRgb:fo,toString:fo});function co(){return this.rgb().formatHex()}function lo(){return this.rgb().formatHex8()}function uo(){return Eo(this).formatHsl()}function fo(){return this.rgb().formatRgb()}function po(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=eo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mo(t):n===3?new vo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ho(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ho(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=to.exec(e))?new vo(t[1],t[2],t[3],1):(t=no.exec(e))?new vo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ro.exec(e))?ho(t[1],t[2],t[3],t[4]):(t=io.exec(e))?ho(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ao.exec(e))?To(t[1],t[2]/100,t[3]/100,1):(t=oo.exec(e))?To(t[1],t[2]/100,t[3]/100,t[4]):so.hasOwnProperty(e)?mo(so[e]):e===`transparent`?new vo(NaN,NaN,NaN,0):null}function mo(e){return new vo(e>>16&255,e>>8&255,e&255,1)}function ho(e,t,n,r){return r<=0&&(e=t=n=NaN),new vo(e,t,n,r)}function go(e){return e instanceof Ja||(e=po(e)),e?(e=e.rgb(),new vo(e.r,e.g,e.b,e.opacity)):new vo}function _o(e,t,n,r){return arguments.length===1?go(e):new vo(e,t,n,r??1)}function vo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ka(vo,_o,qa(Ja,{brighter(e){return e=e==null?Xa:Xa**+e,new vo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ya:Ya**+e,new vo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vo(Co(this.r),Co(this.g),Co(this.b),So(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yo,formatHex:yo,formatHex8:bo,formatRgb:xo,toString:xo}));function yo(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}`}function bo(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}${wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function xo(){let e=So(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Co(this.r)}, ${Co(this.g)}, ${Co(this.b)}${e===1?`)`:`, ${e})`}`}function So(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wo(e){return e=Co(e),(e<16?`0`:``)+e.toString(16)}function To(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Oo(e,t,n,r)}function Eo(e){if(e instanceof Oo)return new Oo(e.h,e.s,e.l,e.opacity);if(e instanceof Ja||(e=po(e)),!e)return new Oo;if(e instanceof Oo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Oo(o,s,c,e.opacity)}function Do(e,t,n,r){return arguments.length===1?Eo(e):new Oo(e,t,n,r??1)}function Oo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ka(Oo,Do,qa(Ja,{brighter(e){return e=e==null?Xa:Xa**+e,new Oo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ya:Ya**+e,new Oo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vo(jo(e>=240?e-240:e+120,i,r),jo(e,i,r),jo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Oo(ko(this.h),Ao(this.s),Ao(this.l),So(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=So(this.opacity);return`${e===1?`hsl(`:`hsla(`}${ko(this.h)}, ${Ao(this.s)*100}%, ${Ao(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function ko(e){return e=(e||0)%360,e<0?e+360:e}function Ao(e){return Math.max(0,Math.min(1,e||0))}function jo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Mo=e=>()=>e;function No(e,t){return function(n){return e+n*t}}function Po(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Fo(e,t){var n=t-e;return n?No(e,n>180||n<-180?n-360*Math.round(n/360):n):Mo(isNaN(e)?t:e)}function Io(e){return(e=+e)==1?Lo:function(t,n){return n-t?Po(t,n,e):Mo(isNaN(t)?n:t)}}function Lo(e,t){var n=t-e;return n?No(e,n):Mo(isNaN(e)?t:e)}var Ro=(function e(t){var n=Io(t);function r(e,t){var r=n((e=_o(e)).r,(t=_o(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Lo(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function zo(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Bo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vo=new RegExp(Bo.source,`g`);function Ho(e){return function(){return e}}function Uo(e){return function(t){return e(t)+``}}function Wo(e,t){var n=Bo.lastIndex=Vo.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Bo.exec(e))&&(i=Vo.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:zo(r,i)})),n=Vo.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Uo(c[0].x):Ho(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var Go=180/Math.PI,Ko={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qo(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Go,skewX:Math.atan(c)*Go,scaleX:o,scaleY:s}}var Jo;function Yo(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Ko:qo(t.a,t.b,t.c,t.d,t.e,t.f)}function Xo(e){return e==null||(Jo||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Jo.setAttribute(`transform`,e),!(e=Jo.transform.baseVal.consolidate()))?Ko:(e=e.matrix,qo(e.a,e.b,e.c,e.d,e.e,e.f))}function Zo(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:zo(e,i)},{i:c-2,x:zo(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:zo(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:zo(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:zo(e,n)},{i:s-2,x:zo(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Qo=Zo(Yo,`px, `,`px)`,`deg)`),$o=Zo(Xo,`, `,`)`,`)`),es=0,ts=0,ns=0,rs=1e3,is,as,os=0,ss=0,cs=0,ls=typeof performance==`object`&&performance.now?performance:Date,us=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ds(){return ss||=(us(fs),ls.now()+cs)}function fs(){ss=0}function ps(){this._call=this._time=this._next=null}ps.prototype=ms.prototype={constructor:ps,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?ds():+n)+(t==null?0:+t),!this._next&&as!==this&&(as?as._next=this:is=this,as=this),this._call=e,this._time=n,ys()},stop:function(){this._call&&(this._call=null,this._time=1/0,ys())}};function ms(e,t,n){var r=new ps;return r.restart(e,t,n),r}function hs(){ds(),++es;for(var e=is,t;e;)(t=ss-e._time)>=0&&e._call.call(void 0,t),e=e._next;--es}function gs(){ss=(os=ls.now())+cs,es=ts=0;try{hs()}finally{es=0,vs(),ss=0}}function _s(){var e=ls.now(),t=e-os;t>rs&&(cs-=t,os=e)}function vs(){for(var e,t=is,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:is=n);as=e,ys(r)}function ys(e){es||(ts&&=clearTimeout(ts),e-ss>24?(e<1/0&&(ts=setTimeout(gs,e-ls.now()-cs)),ns&&=clearInterval(ns)):(ns||=(os=ls.now(),setInterval(_s,rs)),es=1,us(gs)))}function bs(e,t,n){var r=new ps;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var xs=Ur(`start`,`end`,`cancel`,`interrupt`),Ss=[];function Cs(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ds(e,n,{name:t,index:r,group:i,on:xs,tween:Ss,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ws(e,t){var n=Es(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Ts(e,t){var n=Es(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Es(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Ds(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ms(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return bs(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(bs(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Os(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function ks(e){return this.each(function(){Os(this,e)})}function As(e,t){var n,r;return function(){var i=Ts(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function js(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Ts(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Ms(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Es(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?As:js)(n,e,t))}function Ns(e,t,n){var r=e._id;return e.each(function(){var e=Ts(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Es(e,r).value[t]}}function Ps(e,t){var n;return(typeof t==`number`?zo:t instanceof po?Ro:(n=po(t))?(t=n,Ro):Wo)(e,t)}function Fs(e){return function(){this.removeAttribute(e)}}function Is(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ls(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Rs(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function zs(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Bs(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Vs(e,t){var n=Yr(e),r=n===`transform`?$o:Ps;return this.attrTween(e,typeof t==`function`?(n.local?Bs:zs)(n,r,Ns(this,`attr.`+e,t)):t==null?(n.local?Is:Fs)(n):(n.local?Rs:Ls)(n,r,t))}function Hs(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Us(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ws(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Us(e,i)),n}return i._value=t,i}function Gs(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Hs(e,i)),n}return i._value=t,i}function Ks(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Yr(e);return this.tween(n,(r.local?Ws:Gs)(r,t))}function qs(e,t){return function(){ws(this,e).delay=+t.apply(this,arguments)}}function Js(e,t){return t=+t,function(){ws(this,e).delay=t}}function Ys(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qs:Js)(t,e)):Es(this.node(),t).delay}function Xs(e,t){return function(){Ts(this,e).duration=+t.apply(this,arguments)}}function Zs(e,t){return t=+t,function(){Ts(this,e).duration=t}}function Qs(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Xs:Zs)(t,e)):Es(this.node(),t).duration}function $s(e,t){if(typeof t!=`function`)throw Error();return function(){Ts(this,e).ease=t}}function ec(e){var t=this._id;return arguments.length?this.each($s(t,e)):Es(this.node(),t).ease}function tc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Ts(this,e).ease=n}}function nc(e){if(typeof e!=`function`)throw Error();return this.each(tc(this._id,e))}function rc(e){typeof e!=`function`&&(e=si(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Mc(r,this._parents,this._name,this._id)}function ic(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Mc(o,this._parents,this._name,this._id)}function ac(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function oc(e,t,n){var r,i,a=ac(t)?ws:Ts;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function sc(e,t){var n=this._id;return arguments.length<2?Es(this.node(),n).on.on(e):this.each(oc(n,e,t))}function cc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function lc(){return this.on(`end.remove`,cc(this._id))}function uc(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ei(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Cs(l[f],t,n,f,l,Es(u,n)));return new Mc(a,this._parents,t,n)}function dc(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ii(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Es(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Cs(p,t,n,h,f,m);a.push(f),o.push(u)}return new Mc(a,o,t,n)}var fc=Wa.prototype.constructor;function pc(){return new fc(this._groups,this._parents)}function mc(e,t){var n,r,i;return function(){var a=Zi(this,e),o=(this.style.removeProperty(e),Zi(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function hc(e){return function(){this.style.removeProperty(e)}}function gc(e,t,n){var r,i=n+``,a;return function(){var o=Zi(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function _c(e,t,n){var r,i,a;return function(){var o=Zi(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Zi(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function vc(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Ts(this,e),l=c.on,u=c.value[a]==null?s||=hc(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function yc(e,t,n){var r=(e+=``)==`transform`?Qo:Ps;return t==null?this.styleTween(e,mc(e,r)).on(`end.style.`+e,hc(e)):typeof t==`function`?this.styleTween(e,_c(e,r,Ns(this,`style.`+e,t))).each(vc(this._id,e)):this.styleTween(e,gc(e,r,t),n).on(`end.style.`+e,null)}function bc(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function xc(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&bc(e,a,n)),r}return a._value=t,a}function Sc(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,xc(e,t,n??``))}function Cc(e){return function(){this.textContent=e}}function wc(e){return function(){var t=e(this);this.textContent=t??``}}function Tc(e){return this.tween(`text`,typeof e==`function`?wc(Ns(this,`text`,e)):Cc(e==null?``:e+``))}function Ec(e){return function(t){this.textContent=e.call(this,t)}}function Dc(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ec(r)),t}return r._value=e,r}function Oc(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Dc(e))}function kc(){for(var e=this._name,t=this._id,n=Pc(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Es(c,t);Cs(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Mc(r,this._parents,e,n)}function Ac(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Ts(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var jc=0;function Mc(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Nc(e){return Wa().transition(e)}function Pc(){return++jc}var Fc=Wa.prototype;Mc.prototype=Nc.prototype={constructor:Mc,select:uc,selectAll:dc,selectChild:Fc.selectChild,selectChildren:Fc.selectChildren,filter:rc,merge:ic,selection:pc,transition:kc,call:Fc.call,nodes:Fc.nodes,node:Fc.node,size:Fc.size,empty:Fc.empty,each:Fc.each,on:sc,attr:Vs,attrTween:Ks,style:yc,styleTween:Sc,text:Tc,textTween:Oc,remove:lc,tween:Ms,delay:Ys,duration:Qs,ease:ec,easeVarying:nc,end:Ac,[Symbol.iterator]:Fc[Symbol.iterator]};function Ic(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Lc={time:null,delay:0,duration:250,ease:Ic};function Rc(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function zc(e){var t,n;e instanceof Mc?(t=e._id,e=e._name):(t=Pc(),(n=Lc).time=ds(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Cs(c,e,t,l,o,n||Rc(c,t));return new Mc(r,this._parents,e,t)}Wa.prototype.interrupt=ks,Wa.prototype.transition=zc;var{abs:Bc,max:Vc,min:Hc}=Math;[`w`,`e`].map(Uc),[`n`,`s`].map(Uc),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Uc);function Uc(e){return{type:e}}var Wc=Math.PI,Gc=2*Wc,Kc=1e-6,qc=Gc-Kc;function Jc(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Yc(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Jc;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Xc=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Jc:Yc(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Kc)if(!(Math.abs(u*s-c*l)>Kc)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Wc-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Kc&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Kc||Math.abs(this._y1-l)>Kc)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Gc+Gc),d>qc?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Kc&&this._append`A${n},${n},0,${+(d>=Wc)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Zc(){return new Xc}Zc.prototype=Xc.prototype;function Qc(e){return function(){return e}}var $c=Math.abs,el=Math.atan2,tl=Math.cos,nl=Math.max,rl=Math.min,il=Math.sin,al=Math.sqrt,ol=1e-12,sl=Math.PI,cl=sl/2,ll=2*sl;function ul(e){return e>1?0:e<-1?sl:Math.acos(e)}function dl(e){return e>=1?cl:e<=-1?-cl:Math.asin(e)}function fl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Xc(t)}Array.prototype.slice;function pl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ml(e){this._context=e}ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function hl(e){return new ml(e)}function gl(e){return e[0]}function _l(e){return e[1]}function vl(e,t){var n=Qc(!0),r=null,i=hl,a=null,o=fl(s);e=typeof e==`function`?e:e===void 0?gl:Qc(e),t=typeof t==`function`?t:t===void 0?_l:Qc(t);function s(s){var c,l=(s=pl(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Qc(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Qc(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Qc(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}var yl=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function bl(e){return new yl(e,!0)}function xl(e){return new yl(e,!1)}function Sl(){}function Cl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wl(e){this._context=e}wl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Cl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Cl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tl(e){return new wl(e)}function El(e){this._context=e}El.prototype={areaStart:Sl,areaEnd:Sl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Cl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dl(e){return new El(e)}function Ol(e){this._context=e}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Cl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kl(e){return new Ol(e)}function Al(e,t){this._basis=new wl(e),this._beta=t}Al.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var jl=(function e(t){function n(e){return t===1?new wl(e):new Al(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Ml(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Nl(e,t){this._context=e,this._k=(1-t)/6}Nl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ml(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ml(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Pl=(function e(t){function n(e){return new Nl(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Fl(e,t){this._context=e,this._k=(1-t)/6}Fl.prototype={areaStart:Sl,areaEnd:Sl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ml(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Il=(function e(t){function n(e){return new Fl(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Ll(e,t){this._context=e,this._k=(1-t)/6}Ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ml(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Rl=(function e(t){function n(e){return new Ll(e,t)}return n.tension=function(t){return e(+t)},n})(0);function zl(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Bl(e,t){this._context=e,this._alpha=t}Bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:zl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Vl=(function e(t){function n(e){return t?new Bl(e,t):new Nl(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Hl(e,t){this._context=e,this._alpha=t}Hl.prototype={areaStart:Sl,areaEnd:Sl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ul=(function e(t){function n(e){return t?new Hl(e,t):new Fl(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Wl(e,t){this._context=e,this._alpha=t}Wl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Gl=(function e(t){function n(e){return t?new Wl(e,t):new Ll(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Kl(e){this._context=e}Kl.prototype={areaStart:Sl,areaEnd:Sl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ql(e){return new Kl(e)}function Jl(e){return e<0?-1:1}function Yl(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Jl(a)+Jl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Xl(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Zl(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Ql(e){this._context=e}Ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Zl(this,this._t0,Xl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Zl(this,Xl(this,n=Yl(this,e,t)),n);break;default:Zl(this,this._t0,n=Yl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function $l(e){this._context=new eu(e)}($l.prototype=Object.create(Ql.prototype)).point=function(e,t){Ql.prototype.point.call(this,t,e)};function eu(e){this._context=e}eu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function tu(e){return new Ql(e)}function nu(e){return new $l(e)}function ru(e){this._context=e}ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=iu(e),i=iu(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function iu(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function au(e){return new ru(e)}function ou(e,t){this._context=e,this._t=t}ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function su(e){return new ou(e,.5)}function cu(e){return new ou(e,0)}function lu(e){return new ou(e,1)}function uu(e,t,n){this.k=e,this.x=t,this.y=n}uu.prototype={constructor:uu,scale:function(e){return e===1?this:new uu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new uu(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var du=new uu(1,0,0);fu.prototype=uu.prototype;function fu(e){for(;!e.__zoom;)if(!(e=e.parentNode))return du;return e.__zoom}var pu=s(e=>{let{securityLevel:t}=B(),n=V(`body`);return t===`sandbox`&&(n=V((V(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`),mu=Object.freeze({left:0,top:0,width:16,height:16}),hu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gu=Object.freeze({...mu,...hu}),_u=Object.freeze({...gu,body:``,hidden:!1}),vu=Object.freeze({width:null,height:null}),yu=Object.freeze({...vu,...hu}),bu=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!xu(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!xu(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!xu(e,n)?null:e}return null},xu=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Su(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Cu(e,t){let n=Su(e,t);for(let r in _u)r in hu?r in e&&!(r in n)&&(n[r]=hu[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function wu(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function Tu(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Cu(r[e]||i[e],a)}return o(t),n.forEach(o),Cu(e,a)}function Eu(e,t){if(e.icons[t])return Tu(e,t,[]);let n=wu(e,[t])[t];return n?Tu(e,t,n):null}var Du=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ou=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ku(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(Du);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Ou.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function Au(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function ju(e,t){return e?`<defs>`+e+`</defs>`+t:t}function Mu(e,t,n){let r=Au(e);return ju(r.defs,t+r.content+n)}var Nu=e=>e===`unset`||e===`undefined`||e===`none`;function Pu(e,t){let n={...gu,...e},r={...yu,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Mu(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=ku(d,c/l)):(u=o===`auto`?c:o,d=s===null?ku(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Nu(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var Fu=/\sid="(\S+)"/g,Iu=new Map;function Lu(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=Iu.get(e)||0;return Iu.set(e,t+1),t?`${e}${t}`:e}function Ru(e){let t=[],n;for(;n=Fu.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=Lu(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function zu(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var Bu={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},Vu=new Map,Hu=new Map,Uu=s(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(f.debug(`Registering icon pack:`,t.name),`loader`in t)Hu.set(t.name,t.loader);else if(`icons`in t)Vu.set(t.name,t.icons);else throw f.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),Wu=s(async(e,t)=>{let n=bu(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=Vu.get(r);if(!i){let e=Hu.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},Vu.set(r,i)}catch(e){throw f.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=Eu(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),Gu=s(async e=>{try{return await Wu(e),!0}catch{return!1}},`isIconAvailable`),Ku=s(async(e,t,n)=>{let r;try{r=await Wu(e,t?.fallbackPrefix)}catch(e){f.error(e),r=Bu}let i=Pu(r,t);return Wn(zu(Ru(i.body),{...i.attributes,...n}),z())},`getIconSVG`),qu=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),Ju=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=qu();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}}));function Yu(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xu(){}function Zu(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Qu(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var $u=`[object RegExp]`,ed=`[object String]`,td=`[object Number]`,nd=`[object Boolean]`,rd=`[object Arguments]`,id=`[object Symbol]`,ad=`[object Date]`,od=`[object Map]`,sd=`[object Set]`,cd=`[object Array]`,ld=`[object ArrayBuffer]`,ud=`[object Object]`,dd=`[object DataView]`,fd=`[object Uint8Array]`,pd=`[object Uint8ClampedArray]`,md=`[object Uint16Array]`,hd=`[object Uint32Array]`,gd=`[object Int8Array]`,_d=`[object Int16Array]`,vd=`[object Int32Array]`,yd=`[object Float32Array]`,bd=`[object Float64Array]`,xd=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function Sd(e){return xd.Buffer!==void 0&&xd.Buffer.isBuffer(e)}function Cd(e){return Number.isSafeInteger(e)&&e>=0}function wd(e){return e!=null&&typeof e!=`function`&&Cd(e.length)}function Td(e){return e===`__proto__`}function Ed(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Dd(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Od(e,t){return kd(e,void 0,e,new Map,t)}function kd(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Ed(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=kd(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,kd(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(kd(a,void 0,n,r,i));return t}if(Sd(e))return e.subarray();if(Dd(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=kd(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Ad(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Ad(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Ad(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Ad(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Ad(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Ad(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Ad(t,e,n,r,i),t}if(typeof e==`object`&&jd(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Ad(t,e,n,r,i),t}return e}function Ad(e,t,n=e,r,i){let a=[...Object.keys(t),...Zu(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=kd(t[s],s,n,r,i))}}function jd(e){switch(Qu(e)){case rd:case cd:case ld:case dd:case nd:case ad:case yd:case bd:case gd:case _d:case vd:case od:case td:case ud:case $u:case sd:case ed:case id:case fd:case pd:case md:case hd:return!0;default:return!1}}function Md(e,t){return Od(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Qu(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Ad(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case td:case ed:case nd:{let t=new e.constructor(e?.valueOf());return Ad(t,e),t}case rd:{let t={};return Ad(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Nd(e){return Md(e)}function Pd(e){return typeof e==`object`&&!!e&&Qu(e)===`[object Arguments]`}function Fd(e){return typeof e==`object`&&!!e}function Id(e){return Fd(e)&&wd(e)}function Ld(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ld.Cache||Map),n}Ld.Cache=Map;function Rd(e){return Dd(e)}function zd(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Bd(e){if(Ed(e))return e;if(Array.isArray(e)||Dd(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Vd(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Hd(i,t,r,new Map)}return i}function Hd(e,t,n,r){if(Ed(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return Bd(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...Zu(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Td(o))continue;let s=t[o],c=e[o];if(Pd(s)&&(s={...s}),Pd(c)&&(c={...c}),Sd(s)&&(s=Nd(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Id(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||Fd(c)&&Fd(s)&&(Yu(c)||Yu(s)||Rd(c)||Rd(s))?e[o]=Hd(c,s,n,r):c==null&&Yu(s)?e[o]=Hd({},s,n,r):c==null&&Rd(s)?e[o]=Nd(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Ud(e,...t){return Vd(e,...t,Xu)}function Wd(e){if(e==null)return!0;if(wd(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!Sd(e)&&!Rd(e)&&!Pd(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return zd(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Gd=Ju(),Kd={curveBasis:Tl,curveBasisClosed:Dl,curveBasisOpen:kl,curveBumpX:bl,curveBumpY:xl,curveBundle:jl,curveCardinalClosed:Il,curveCardinalOpen:Rl,curveCardinal:Pl,curveCatmullRomClosed:Ul,curveCatmullRomOpen:Gl,curveCatmullRom:Vl,curveLinear:hl,curveLinearClosed:ql,curveMonotoneX:tu,curveMonotoneY:nu,curveNatural:au,curveStep:su,curveStepAfter:lu,curveStepBefore:cu},qd=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Jd=s(function(e,t){let n=Yd(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);sn(e),r=Ot(r,[...e])}else r=n.args;if(!r)return;let i=Pn(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),Yd=s(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${qd.source})(?=[}][%]{2}).*
129
+ `,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),f.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=An.exec(e))!==null;)if(r.index===An.lastIndex&&An.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return f.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),Xd=s(function(e){return e.replace(An,``)},`removeDirectives`),Zd=s(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function Qd(e,t){return e?Kd[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}s(Qd,`interpolateToCurve`);function $d(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Gd.sanitizeUrl)(n)}s($d,`formatUrl`);var ef=s((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){f.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function tf(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}s(tf,`distance`);function nf(e){let t,n=0;return e.forEach(e=>{n+=tf(e,t),t=e}),of(e,n/2)}s(nf,`traverseEdge`);function rf(e){return e.length===1?e[0]:nf(e)}s(rf,`calcLabelPosition`);var af=s((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),of=s((e,t)=>{let n,r=t;for(let t of e){if(n){let e=tf(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:af((1-i)*n.x+i*t.x,5),y:af((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),sf=s((e,t,n)=>{f.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=of(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function cf(e,t,n){let r=structuredClone(n);f.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=of(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}s(cf,`calcTerminalLabelPosition`);function lf(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}s(lf,`getStylesFromArray`);var uf=0,df=s(()=>(uf++,`id-`+Math.random().toString(36).substr(2,12)+`-`+uf),`generateId`);function ff(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}s(ff,`makeRandomHex`);var pf=s(e=>ff(e.length),`random`),mf=s(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),hf=s(function(e,t){let n=t.text.replace(lr.lineBreakRegex,` `),[,r]=Ef(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),gf=Ld((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),lr.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=yf(`${e} `,n),c=yf(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=_f(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),_f=Ld((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(yf(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function vf(e,t){return bf(e,t).height}s(vf,`calculateTextHeight`);function yf(e,t){return bf(e,t).width}s(yf,`calculateTextWidth`);var bf=Ld((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Ef(n),o=[`sans-serif`,r],s=e.split(lr.lineBreakRegex),c=[],l=V(`body`);if(!l.remove)return{width:0,height:0,lineHeight:0};let u=l.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=mf();o.text=r||`​`;let s=hf(u,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),xf=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{s(this,`InitIDGenerator`)}},Sf,Cf=s(function(e){return Sf||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Sf.innerHTML=e,unescape(Sf.textContent)},`entityDecode`);function wf(e){return`str`in e}s(wf,`isDetailedError`);var Tf=s((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Ef=s(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Df(e,t){return Ud({},e,t)}s(Df,`cleanAndMerge`);var Of={assignWithDepth:Ot,wrapLabel:gf,calculateTextHeight:vf,calculateTextWidth:yf,calculateTextDimensions:bf,cleanAndMerge:Df,detectInit:Jd,detectDirective:Yd,isSubstringInArray:Zd,interpolateToCurve:Qd,calcLabelPosition:rf,calcCardinalityPosition:sf,calcTerminalLabelPosition:cf,formatUrl:$d,getStylesFromArray:lf,generateId:df,random:pf,runFunc:ef,entityDecode:Cf,insertTitle:Tf,isLabelCoordinateInPath:Nf,parseFontSize:Ef,InitIDGenerator:xf},kf=s(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Af=s(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),jf=s((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Mf(e){return e??null}s(Mf,`handleUndefinedAttr`);function Nf(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}s(Nf,`isLabelCoordinateInPath`);var Pf=e(((e,t)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r)if(r.message,e.catch)e.catch(r);else throw r}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:e===void 0?globalThis:e)})),Ff=e(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),If=n(Pf(),1),Lf=n(Ff(),1);function Rf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zf=Rf();function Bf(e){zf=e}var Vf={exec:()=>null};function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Uf.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Hf=(()=>{try{return!0}catch{return!1}})(),Uf={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Wf=/^(?:[ \t]*(?:\n|$))+/,Gf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yf=/(?:[*+-]|\d{1,9}[.)])/,Xf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zf=H(Xf).replace(/bull/g,Yf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Qf=H(Xf).replace(/bull/g,Yf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$f=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ep=/^[^\n]+/,tp=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,np=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,tp).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rp=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yf).getRegex(),ip=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,ap=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,op=H(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ap).replace(`tag`,ip).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sp=H($f).replace(`hr`,qf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ip).getRegex(),cp={blockquote:H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,sp).getRegex(),code:Gf,def:np,fences:Kf,heading:Jf,hr:qf,html:op,lheading:Zf,list:rp,newline:Wf,paragraph:sp,table:Vf,text:ep},lp=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,qf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ip).getRegex(),up={...cp,lheading:Qf,table:lp,paragraph:H($f).replace(`hr`,qf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,lp).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ip).getRegex()},dp={...cp,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,ap).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Vf,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H($f).replace(`hr`,qf).replace(`heading`,` *#{1,6} *[^
130
+ ]`).replace(`lheading`,Zf).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},fp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mp=/^( {2,}|\\)\n(?!\s*$)/,hp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,gp=/[\p{P}\p{S}]/u,_p=/[\s\p{P}\p{S}]/u,vp=/[^\s\p{P}\p{S}]/u,yp=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,_p).getRegex(),bp=/(?!~)[\p{P}\p{S}]/u,xp=/(?!~)[\s\p{P}\p{S}]/u,Sp=/(?:[^\s\p{P}\p{S}]|~)/u,Cp=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Hf?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),wp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Tp=H(wp,`u`).replace(/punct/g,gp).getRegex(),Ep=H(wp,`u`).replace(/punct/g,bp).getRegex(),Dp=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Op=H(Dp,`gu`).replace(/notPunctSpace/g,vp).replace(/punctSpace/g,_p).replace(/punct/g,gp).getRegex(),kp=H(Dp,`gu`).replace(/notPunctSpace/g,Sp).replace(/punctSpace/g,xp).replace(/punct/g,bp).getRegex(),Ap=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,vp).replace(/punctSpace/g,_p).replace(/punct/g,gp).getRegex(),jp=H(/\\(punct)/,`gu`).replace(/punct/g,gp).getRegex(),Mp=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Np=H(ap).replace(`(?:-->|$)`,`-->`).getRegex(),Pp=H(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Np).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ip=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,Fp).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lp=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Fp).replace(`ref`,tp).getRegex(),Rp=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,tp).getRegex(),zp=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Lp).replace(`nolink`,Rp).getRegex(),Bp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Vp={_backpedal:Vf,anyPunctuation:jp,autolink:Mp,blockSkip:Cp,br:mp,code:pp,del:Vf,emStrongLDelim:Tp,emStrongRDelimAst:Op,emStrongRDelimUnd:Ap,escape:fp,link:Ip,nolink:Rp,punctuation:yp,reflink:Lp,reflinkSearch:zp,tag:Pp,text:hp,url:Vf},Hp={...Vp,link:H(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Fp).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Fp).getRegex()},Up={...Vp,emStrongRDelimAst:kp,emStrongLDelim:Ep,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Bp).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Bp).getRegex()},Wp={...Up,br:H(mp).replace(`{2,}`,`*`).getRegex(),text:H(Up.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Gp={normal:cp,gfm:up,pedantic:dp},Kp={normal:Vp,gfm:Up,breaks:Wp,pedantic:Hp},qp={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Jp=e=>qp[e];function Yp(e,t){if(t){if(Uf.escapeTest.test(e))return e.replace(Uf.escapeReplace,Jp)}else if(Uf.escapeTestNoEncode.test(e))return e.replace(Uf.escapeReplaceNoEncode,Jp);return e}function Xp(e){try{e=encodeURI(e).replace(Uf.percentDecode,`%`)}catch{return null}return e}function Zp(e,t){let n=e.replace(Uf.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Uf.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Uf.slashPipe,`|`);return n}function Qp(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function $p(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function em(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function tm(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
131
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
132
+ `)}var nm=class{options;rules;lexer;constructor(e){this.options=e||zf}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Qp(e,`
133
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=tm(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Qp(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Qp(t[0],`
134
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Qp(t[0],`
135
+ `).split(`
136
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
137
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
138
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
139
+ ${s}`:s,r=r?`${r}
140
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
141
+ `+e.join(`
142
+ `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
143
+ `+e.join(`
144
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
145
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
146
+ `,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
147
+ `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
148
+ `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
149
+ `,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
150
+ `+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
151
+ `+l}!u&&!l.trim()&&(u=!0),r+=f+`
152
+ `,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Zp(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
153
+ `):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Zp(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
154
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Qp(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=$p(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),em(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return em(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},rm=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zf,this.options.tokenizer=this.options.tokenizer||new nm,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Uf,block:Gp.normal,inline:Kp.normal};this.options.pedantic?(t.block=Gp.pedantic,t.inline=Kp.pedantic):this.options.gfm&&(t.block=Gp.gfm,this.options.breaks?t.inline=Kp.breaks:t.inline=Kp.gfm),this.tokenizer.rules=t}static get rules(){return{block:Gp,inline:Kp}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Uf.carriageReturn,`
155
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Uf.tabCharGlobal,` `).replace(Uf.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
156
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
157
+ `)?``:`
158
+ `)+r.raw,n.text+=`
159
+ `+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
160
+ `)?``:`
161
+ `)+r.raw,n.text+=`
162
+ `+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
163
+ `)?``:`
164
+ `)+r.raw,a.text+=`
165
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
166
+ `)?``:`
167
+ `)+r.raw,n.text+=`
168
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},im=class{options;parser;constructor(e){this.options=e||zf}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Uf.notSpaceStart)?.[0],i=e.replace(Uf.endingNewline,``)+`
169
+ `;return r?`<pre><code class="language-`+Yp(r)+`">`+(n?i:Yp(i,!0))+`</code></pre>
170
+ `:`<pre><code>`+(n?i:Yp(i,!0))+`</code></pre>
171
+ `}blockquote({tokens:e}){return`<blockquote>
172
+ ${this.parser.parse(e)}</blockquote>
173
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
174
+ `}hr(e){return`<hr>
175
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
176
+ `+r+`</`+i+`>
177
+ `}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Yp(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
178
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
179
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
180
+ <thead>
181
+ `+t+`</thead>
182
+ `+r+`</table>
183
+ `}tablerow({text:e}){return`<tr>
184
+ ${e}</tr>
185
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
186
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Yp(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Xp(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Yp(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Xp(e);if(i===null)return Yp(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Yp(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Yp(e.text)}},am=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},om=class e{options;renderer;textRenderer;constructor(e){this.options=e||zf,this.options.renderer=this.options.renderer||new im,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new am}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
187
+ `+this.renderer.text(i);t?n+=this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},sm=class{options;block;constructor(e){this.options=e||zf}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?rm.lex:rm.lexInline}provideParser(){return this.block?om.parse:om.parseInline}},cm=new class{defaults=Rf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=om;Renderer=im;TextRenderer=am;Lexer=rm;Tokenizer=nm;Hooks=sm;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new im(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new nm(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new sm;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];sm.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&sm.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return rm.lex(e,t??this.defaults)}parser(e,t){return om.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?rm.lex:rm.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?om.parse:om.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?rm.lex:rm.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?om.parse:om.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
188
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Yp(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function U(e,t){return cm.parse(e,t)}U.options=U.setOptions=function(e){return cm.setOptions(e),U.defaults=cm.defaults,Bf(U.defaults),U},U.getDefaults=Rf,U.defaults=zf,U.use=function(...e){return cm.use(...e),U.defaults=cm.defaults,Bf(U.defaults),U},U.walkTokens=function(e,t){return cm.walkTokens(e,t)},U.parseInline=cm.parseInline,U.Parser=om,U.parser=om.parse,U.Renderer=im,U.TextRenderer=am,U.Lexer=rm,U.lexer=rm.lex,U.Tokenizer=nm,U.Hooks=sm,U.parse=U,U.options,U.setOptions,U.use,U.walkTokens,U.parseInline,om.parse,rm.lex;function lm(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
189
+ [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
190
+ `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
191
+ `)&&(o=String(e).split(`
192
+ `).map(function(e,t){return t===0?e:``+i+e}).join(`
193
+ `)),a+=o+n[t+1]}),a}var um=typeof performance<`u`&&typeof performance.now==`function`,dm=s(()=>um?performance.now():0,`now`),fm=`🧜 `,pm=`Mermaid render`,mm=`Mermaid`,hm={parse:`tertiary`,prepare:`secondary`,measure:`primary`,layout:`primary-dark`,layoutCore:`error`,draw:`primary-light`,paint:`secondary-dark`,serialize:`tertiary-dark`,render:`primary-light`};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{s(this,`Profiler`)}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();let n=dm();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(dm()-n)}}async tick(e,t){if(!this.enabled)return t();let n=dm();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(dm()-n)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;let t={name:e,start:dm(),duration:-1,children:[]},n=this.stack.at(-1);if(n?n.children.push(t):this.roots.push(t),this.stack.push(t),um&&typeof performance.mark==`function`)try{performance.mark(`${fm}${e} \u25B6`)}catch{}}end(){if(!this.enabled)return;let e=this.stack.pop();if(!e)return;let t=dm();if(e.duration=t-e.start,um&&typeof performance.measure==`function`)try{performance.measure(`${fm}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:`track-entry`,track:pm,trackGroup:mm,color:hm[e.name]??`primary`,tooltipText:`${e.name} \u2014 ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;let n=e.duration,r=t&&t!==e.name?`${e.name} [${t}]`:e.name,i=[`ms % phase`],a=s((e,t)=>{let r=` `.repeat(t),o=e.duration.toFixed(1).padStart(8),s=n>0?`${(e.duration/n*100).toFixed(0).padStart(3)}%`:` -`;i.push(`${o} ${s} ${r}${e.name}`);for(let n of e.children)a(n,t+1);if(e.children.length>0){let t=e.children.reduce((e,t)=>e+t.duration,0),n=e.duration-t;if(n>.5){let e=n.toFixed(1).padStart(8);i.push(`${e} ${r} (self)`)}}},`walk`);a(e,0);let o=Object.keys(this.buckets);if(o.length>0){i.push(`—— buckets (summed) ——`);for(let e of o)i.push(`${this.buckets[e].toFixed(1).padStart(8)} ${e}`)}console.log(`${fm}mermaid render profile \xB7 ${r}
194
+ ${i.join(`
195
+ `)}`)}}),globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:`0.0.0`};var gm=If.default.extend({raf(e){typeof queueMicrotask==`function`?queueMicrotask(e):setTimeout(e,0)}}).extend(Lf.default);function _m(e,{markdownAutoWrap:t}){return lm(e.replace(/<br\/>/g,`
196
+ `).replace(/\n{2,}/g,`
197
+ `))}s(_m,`preprocessMarkdown`);function vm(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}s(vm,`nonMarkdownToLines`);function ym(e,t={}){let n=_m(e,t),r=U.lexer(n),i=[[]],a=0;function o(e,t=`normal`){e.type===`text`?e.text.split(`
198
+ `).forEach((e,n)=>{n!==0&&(a++,i.push([])),e.split(` `).forEach(e=>{e=e.replace(/&#39;/g,`'`),e&&i[a].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{o(t,e.type)}):e.type===`html`&&i[a].push({content:e.text,type:`normal`})}return s(o,`processNode`),r.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{o(e)}):e.type===`html`?i[a].push({content:e.text,type:`normal`}):i[a].push({content:e.raw,type:`normal`})}),i}s(ym,`markdownToLines`);function bm(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}s(bm,`nonMarkdownToHTML`);function xm(e,{markdownAutoWrap:t}={}){let n=U.lexer(e);function r(e){return e.type===`text`?t===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,`&nbsp;`):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(r).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(r).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(r).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(f.warn(`Unsupported markdown: ${e.type}`),e.raw)}return s(r,`output`),n.map(r).join(``)}s(xm,`markdownToHTML`);function Sm(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}s(Sm,`splitTextToChars`);function Cm(e,t){return wm(e,[],Sm(t.content),t.type)}s(Cm,`splitWordToFitWidth`);function wm(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?wm(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}s(wm,`splitWordToFitWidthRecursion`);function Tm(e,t){if(e.some(({content:e})=>e.includes(`
199
+ `)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return Em(e,t)}s(Tm,`splitLineToFitWidth`);function Em(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return Em(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=Cm(t,a);n.push([r]),i.content&&e.unshift(i)}return Em(e,t,n)}s(Em,`splitLineToFitWidthRecursion`);function Dm(e,t){t&&e.attr(`style`,t)}s(Dm,`applyStyle`);var Om=16384;async function km(e,t,n,r,i=!1,a=z()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,Om)}px`),o.attr(`height`,`${Math.min(10*n,Om)}px`);let s=o.append(`xhtml:div`),c=ar(t.label)?await cr(t.label.replace(lr.lineBreakRegex,`
200
+ `),a):Wn(t.label,a),l=t.isNode?`nodeLabel`:`edgeLabel`,u=s.append(`span`);return u.html(c),Dm(u,t.labelStyle),u.attr(`class`,`${l} ${r}`),Dm(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`),(await gm.measure(()=>s.node().getBoundingClientRect())).width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`)),o.node()}s(km,`addHtmlSpan`);function Am(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}s(Am,`createTspan`);function jm(e,t,n){let r=e.append(`text`),i=Am(r,1,t);Fm(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}s(jm,`computeWidthOfText`);function Mm(e,t,n){let r=e.append(`text`),i=Am(r,1,t);Fm(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}s(Mm,`computeDimensionOfText`);function Nm(e,t,n,r=!1,i=!1){let a=1.1,o=t.append(`g`),c=o.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=o.append(`text`).attr(`y`,`-10.1`);i&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of n){let n=s(t=>jm(o,a,t)<=e,`checkWidth`),r=n(t)?[t]:Tm(t,n);for(let e of r)Fm(Am(l,u,a,i),e),u++}if(r){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),o.node()}else return l.node()}s(Nm,`createFormattedText`);function Pm(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}s(Pm,`decodeHTMLEntities`);function Fm(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Pm(t.content)):r.text(` `+Pm(t.content))})}s(Fm,`updateTextContentAndStyles`);async function Im(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await Gu(n)?await Ku(n,void 0,{class:`label-icon`}):`<i class='${Wn(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}s(Im,`replaceIconSubstring`);var Lm=s(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:c=200,addSvgBackground:l=!1}={},u)=>{if(f.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,l),a){let r=await Im(Af(o?xm(t,u):bm(t)),u),a=t.replace(/\\\\/g,`\\`);return await km(e,{isNode:s,label:ar(t)?a:r,labelStyle:n.replace(`fill:`,`color:`)},c,i,l,u)}else{let i=Af(t.replace(/<br\s*\/?>/g,`<br/>`)),a=Nm(c,e,o?ym(i.replace(`<br>`,`<br/>`),u):vm(i),t?l:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);V(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);V(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);V(a).select(`text`).attr(`style`,t)}return r?V(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):V(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`),Rm=s(e=>{let{handDrawnSeed:t}=B();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),zm=s(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),Bm=s(e=>{let t=Vm([...e.cssCompiledStyles||[],...e.cssStyles||[],...zm(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),Vm=s(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),Hm=s(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),W=s(e=>{let{stylesArray:t}=Bm(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];Hm(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),G=s((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=B(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:o}=Bm(e);return Object.assign({roughness:.7,fill:o.get(`fill`)||a,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:o.get(`stroke`)||i,seed:r,strokeWidth:o.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:Um(o.get(`stroke-dasharray`))},t)},`userNodeOverrides`),Um=s(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);function Wm(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function Gm(e,t){return e[0]===t[0]&&e[1]===t[1]}function Km(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)Wm(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];Gm(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)Wm(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),Wm(r,t,n)})(c,s,-i)}return c}function qm(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),Km(e,r,n,i||1)}var Jm=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=qm(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function Ym(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var Xm=class extends Jm{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=qm(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)Ym([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Zm=class extends Jm{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Qm=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=qm(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Ym(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},$m=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=qm(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=Ym(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},eh=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=qm(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=Ym(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},th={},nh=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},rh=0,ih=1,ah=2,oh={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function sh(e,t){return e.type===t}function ch(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:rh,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:ih,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:ah,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!sh(a,ah);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return ch(`M0,0`+e);i++,o=oh[a.text],r=a.text}else sh(a,ih)?o=oh[r]:(i++,o=oh[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!sh(t,ih))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof oh[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function lh(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function uh(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(fh(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function dh(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function fh(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=dh(e,t,-u),[n,r]=dh(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=fh(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],D=[n+C*x,r-w*b],O=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,D,O].concat(f);{f=[E,D,O].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=dh(f[t][0],f[t][1],u),r=dh(f[t+1][0],f[t+1][1],u),i=dh(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var ph={randOffset:function(e,t){return K(e,t)},randOffsetWithRange:function(e,t,n){return Eh(e,t,n)},ellipse:function(e,t,n,r,i){return yh(e,t,i,vh(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return Dh(e,t,n,r,i,!0)}};function mh(e,t,n,r,i){return{type:`path`,ops:Dh(e,t,n,r,i)}}function hh(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...Dh(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...Dh(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?mh(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function gh(e,t,n,r,i){return function(e,t){return hh(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function _h(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=kh(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:kh(n[0],1.5*(1+.22*t.roughness),wh(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=kh(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:kh(a,1.5*(1+.22*t.roughness),wh(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function vh(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=K(o*c,n),s+=K(s*c,n),{increment:a,rx:o,ry:s}}function yh(e,t,n,r){let[i,a]=jh(r.increment,e,t,r.rx,r.ry,1,r.increment*Eh(.1,Eh(.4,1,n),n),n),o=Ah(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=jh(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=Ah(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function bh(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=K(.01*d,c),f+=K(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=Mh(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=Mh(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...Dh(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...Dh(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function xh(e,t){let n=uh(lh(ch(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...Dh(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...Nh(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...Dh(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Sh(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+K(e,t),r[0][1]+K(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+K(e,t),r[a][1]+K(e,t)]})}}return{type:`fillPath`,ops:n}}function Ch(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!th[n])switch(n){case`zigzag`:th[n]||(th[n]=new Xm(t));break;case`cross-hatch`:th[n]||(th[n]=new Zm(t));break;case`dots`:th[n]||(th[n]=new Qm(t));break;case`dashed`:th[n]||(th[n]=new $m(t));break;case`zigzag-line`:th[n]||(th[n]=new eh(t));break;default:n=`hachure`,th[n]||(th[n]=new Jm(t))}return th[n]}(t,ph).fillPolygons(e,t)}function wh(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Th(e){return e.randomizer||=new nh(e.seed||0),e.randomizer.next()}function Eh(e,t,n,r=1){return n.roughness*r*(Th(n)*(t-e)+e)}function K(e,t,n=1){return Eh(-e,e,t,n)}function Dh(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=Oh(e,t,n,r,i,!0,!1);if(o)return s;let c=Oh(e,t,n,r,i,!0,!0);return s.concat(c)}function Oh(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*Th(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=K(p,i,l),m=K(m,i,l);let h=[],g=()=>K(d,i,l),_=()=>K(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:K(u,i,l)),t+(v?0:K(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function kh(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]),r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]),i===e.length-1&&r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]);return Ah(r,null,n)}function Ah(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+K(e,n),t[1]+K(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...Oh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function jh(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=K(.5,s)-Math.PI/2;l.push([K(a,s)+t+.9*r*Math.cos(u-e),K(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[K(a,s)+t+r*Math.cos(o),K(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([K(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),K(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([K(a,s)+t+.98*r*Math.cos(u+o),K(a,s)+n+.98*i*Math.sin(u+o)]),l.push([K(a,s)+t+.9*r*Math.cos(u+.5*o),K(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function Mh(e,t,n,r,i,a,o,s,c){let l=a+K(.1,c),u=[];u.push([K(s,c)+t+.9*r*Math.cos(l-e),K(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([K(s,c)+t+r*Math.cos(a),K(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),Ah(u,null,c)}function Nh(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:K(l[0],s)),o[1]+(f?0:K(l[0],s))]}),u=f?[i,a]:[i+K(l[p],s),a+K(l[p],s)],c.push({op:`bcurveTo`,data:[e+K(l[p],s),t+K(l[p],s),n+K(l[p],s),r+K(l[p],s),u[0],u[1]]});return c}function Ph(e){return[...e]}function Fh(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(Ph(e[0]),Ph(e[1]),Ph(e[2]),Ph(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(Ph(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function Ih(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function Lh(e,t,n){let r=Ih(t,n);if(r===0)return Ih(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Ih(e,Rh(t,n,i))}function Rh(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function zh(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Ih(a,o)))>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=Rh(a,o,r),u=Rh(o,s,r),d=Rh(s,c,r),f=Rh(l,u,r),p=Rh(u,d,r),m=Rh(f,p,r);zh([a,l,f,m],0,n,i),zh([m,p,d,c],0,n,i)}var a,o;return i}function Bh(e,t){return Vh(e,0,e.length,t)}function Vh(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=Lh(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Vh(e,t,l+1,r,a),Vh(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Hh(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)zh(e,3*n,t,r);return n&&n>0?Vh(r,0,r.length,n):r}var Uh=`none`,Wh=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[mh(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=gh(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Sh([i],a)):o.push(Ch([i],a))}return a.stroke!==Uh&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=vh(n,r,a),c=yh(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=yh(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(Ch([c.estimatedPoints],a));return a.stroke!==Uh&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[hh(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=bh(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=bh(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=K(.01*l,o),u+=K(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),Ch([m],o)}(e,t,n,r,i,a,c));return c.stroke!==Uh&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=_h(e,n);if(n.fill&&n.fill!==Uh)if(n.fillStyle===`solid`){let t=_h(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Hh(Fh([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Hh(Fh(r),10,(1+n.roughness)/2))}t.length&&r.push(Ch([t],n))}return n.stroke!==Uh&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=hh(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Sh([e],n)):r.push(Ch([e],n))),n.stroke!==Uh&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Uh,a=n.stroke!==Uh,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=uh(lh(ch(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...Hh(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=Bh(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=xh(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=xh(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Sh(s,n));else r.push(Ch(s,n));return a&&(o?s.forEach((e=>{r.push(hh(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Uh};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Uh,strokeWidth:0,fill:n.fill||Uh};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Uh,strokeWidth:n,fill:Uh}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Gh=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Wh(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},Kh=`http://www.w3.org/2000/svg`,qh=class{constructor(e,t){this.svg=e,this.gen=new Wh(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(Kh,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(Kh,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(Kh,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(Kh,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},q={canvas:(e,t)=>new Gh(e,t),svg:(e,t)=>new qh(e,t),generator:e=>new Wh(e),newSeed:()=>Wh.newSeed()},Jh=1,Yh=3;async function Xh(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let n=!Zh(e);await Promise.all([...t].map(e=>new Promise(t=>{function r(){if(e.style.display=`flex`,e.style.flexDirection=`column`,n){let[t=rn.fontSize]=Ef(B().fontSize?B().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}s(r,`setupImage`),setTimeout(()=>{e.complete&&r()}),e.addEventListener(`error`,r),e.addEventListener(`load`,r)})))}s(Xh,`configureLabelImages`);function Zh(e){return e.nodeType===Yh?e.textContent?.trim()!==``:e.nodeType!==Jh||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(Zh)}s(Zh,`hasTextBesidesImages`);var Qh=3,$h=32,eg=s(async(e,t,n)=>{let r=B(),i=e.insert(`g`).attr(`class`,n??`node default`).attr(`id`,t.domId||t.id),a=i.insert(`g`).attr(`class`,`label`).attr(`style`,Mf(t.labelStyle)),o=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),s=t.width?Math.max(t.width-2*(t.padding??0),$h):B().flowchart?.wrappingWidth??200,c=r.wrap?s:1/0,l=await Promise.all(o.map(async e=>{let n=a.append(`g`).attr(`class`,e.cssClass),i=await Lm(n,Wn(Af(e.text??``),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},r);return V(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),V(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:n,box:n.node().getBBox()}})),u=Math.max(...l.map(({box:e})=>e.width),0),d=0;for(let{el:e,box:t}of l)e.attr(`transform`,`translate(${u/2-t.x-t.width/2}, ${d-t.y})`),d+=t.height+Qh;let f=l.length>0?d-Qh:0;return a.insert(`rect`,`:first-child`),a.attr(`transform`,`translate(${-u/2}, ${-f/2})`),{shapeSvg:i,bbox:a.node().getBBox(),halfPadding:(t.padding??0)/2,label:a}},`c4LabelHelper`),J=s(async(e,t,n)=>{if(t.stereotype!==void 0)return eg(e,t,n);let r,i=t.useHtmlLabels||R(B()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,Mf(t.labelStyle)),s;s=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let c=!!t.icon||!!t.img,l=t.labelType===`markdown`,u=await Lm(o,Wn(Af(s),B()),{useHtmlLabels:i,width:t.width||t.wrappingWidth||B().flowchart?.wrappingWidth,classes:l?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:c,markdown:l},B()),d=(t?.padding??0)/2,f;if(i){let e=u.children[0],t=V(u);await Xh(e),f=await gm.measure(()=>e.getBoundingClientRect()),t.attr(`width`,f.width),t.attr(`height`,f.height)}else f=await gm.measure(()=>u.getBBox());return i?o.attr(`transform`,`translate(`+-f.width/2+`, `+-f.height/2+`)`):o.attr(`transform`,`translate(0, `+-f.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-f.width/2+`, `+-f.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:f,halfPadding:d,label:o}},`labelHelper`),tg=s(async(e,t,n)=>{let r=n.useHtmlLabels??On(B()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),a=await Lm(i,Wn(Af(t),B()),{useHtmlLabels:r,width:n.width||B()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),o=n.padding/2,s;if(On(B())){let e=a.children[0],t=V(a);s=await gm.measure(()=>e.getBoundingClientRect()),t.attr(`width`,s.width),t.attr(`height`,s.height)}else s=await gm.measure(()=>a.getBBox());return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},`insertLabel`),Y=s((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),X=s((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function Z(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}s(Z,`createPathFromPoints`);function ng(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}s(ng,`generateFullSineWavePoints`);function rg(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}s(rg,`generateCirclePoints`);function ig(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=s((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}s(ig,`mergePaths`);var ag=s((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),og=s((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),sg=s(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=B(),s=On(o);return await Lm(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function cg(e,t){return e.intersect(t)}s(cg,`intersectNode`);var lg=cg;function ug(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}s(ug,`intersectEllipse`);var dg=ug;function fg(e,t,n){return dg(e,t,t,n)}s(fg,`intersectCircle`);var pg=fg;function mg(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&hg(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&hg(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}s(mg,`intersectLine`);function hg(e,t){return e*t>0}s(hg,`sameSign`);var gg=mg;function _g(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=gg(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}s(_g,`intersectPolygon`);var Q={node:lg,circle:pg,ellipse:dg,polygon:_g,rect:ag};function vg(e,t){let{labelStyles:n}=W(t);t.labelStyle=n;let r=X(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=q.svg(a),c=G(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let l=s.circle(0,0,2,c),u=a.insert(()=>l,`:first-child`);return u.attr(`class`,`anchor`).attr(`style`,Mf(o)),Y(t,u),t.intersect=function(e){return f.info(`Circle intersect`,t,1,e),Q.circle(t,1,e)},a}s(vg,`anchor`);function yg(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}s(yg,`generateArcPoints`);function bg(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}s(bg,`calculateArcSagitta`);async function xg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,c=s(e=>e+o,`calcTotalHeight`),l=s(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await J(e,t,X(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=bg(f,p,m),g=(t?.width?t?.width:d.width)+a*2+h-h,_=f,{cssStyles:v}=t,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...yg(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...yg(g/2,_/2,g/2,-_/2,p,m,!0)],b=q.svg(u),x=G(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=Z(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${p/2}, 0)`),Y(t,w),t.intersect=function(e){return Q.polygon(t,y,e)},u}s(xg,`bowTieRect`);async function Sg(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:c}=await J(e,t,X(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(o.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=t,y=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(a).path(_,G(t,{}));y.node()?.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,i);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),Y(t,y);let b=m+(h-m)/2;c.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`);let x=s((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),S=[...x(d/2,m,-1),...x(g/2,h,1).reverse()];return t.intersect=function(e){return Q.polygon(t,S,e)},a}s(Sg,`bucket`);var Cg=20,wg=8,Tg=80,Eg=8;async function Dg(e,t){let{themeVariables:n}=B(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=W(t),{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=t.padding??8,l=s.height,u=Math.max(s.width+c*2,Tg,t?.width??0),d=Math.max(l+wg+Cg+c*2,t?.height??0),f=-u/2,p=-d/2,m=-(wg+Cg)/2,h=o.select(`.label`);h&&(t.useHtmlLabels??On(B())?h.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2+m})`):h.attr(`transform`,`translate(0, ${-s.height/2+m})`));let g;if(t.look===`handDrawn`){let e=q.svg(o),n=G(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(og(f,p,u,d,Eg),n);g=o.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container collapsed-group`).attr(`style`,Mf(t.cssStyles))}else g=o.insert(`rect`,`:first-child`),g.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,Eg).attr(`ry`,Eg).attr(`x`,f).attr(`y`,p).attr(`width`,u).attr(`height`,d).attr(`fill`,r).attr(`stroke`,i);let _=p+c+l+wg;o.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,f+8).attr(`y1`,_).attr(`x2`,f+u-8).attr(`y2`,_).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let v=_+Cg/2;for(let e=-1;e<=1;e++)o.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,v).attr(`r`,2.5).attr(`fill`,i);return Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},o}s(Dg,`collapsedGroup`);function Og(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}s(Og,`insertPolygonShape`);var kg=[`right`,`left`,`up`,`down`],Ag=`point`,jg=s(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),Mg=s(e=>kg.filter(t=>e.has(t)).join(`|`)||Ag,`getDirectionKey`),Ng={"right|left|up|down":s(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":s(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":s(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":s(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":s(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":s(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":s(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":s(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":s(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":s(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":s(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:s(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:s(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:s(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:s(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[Ag]:()=>[{x:0,y:0}]},Pg=s((e,t,n,r)=>{let i=jg(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(Ng[Mg(i)]??Ng[Ag])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Fg(e,t){let n=t,{shapeSvg:r,bbox:i}=await J(e,n,X(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=Pg(n.directions??[],i,n,u),f=Og(r,u,o,d);return f.attr(`style`,n.style??null),Y(n,f),n.intersect=function(e){return Q.polygon(n,d,e)},r}s(Fg,`block_arrow`);async function Ig(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(a).path(og(-u/2,f,u,d,12),G(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),Y(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}s(Ig,`browser`);var Lg=12;async function Rg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+Lg),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+Lg,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+Lg},{x:0+Lg,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=Og(s,l,u,p);return r&&m.attr(`style`,r),Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},s}s(Rg,`card`);function zg(e,t){let{nodeStyles:n}=W(t);t.label=``;let r=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=q.svg(r),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=Z(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return Q.polygon(t,o,e)},r}s(zg,`choice`);async function Bg(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await J(e,t,X(t)),c=n?.padding??s,l=t.look===`neo`?o.width/2+32:o.width/2+c,u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.circle(0,0,l*2,n);u=a.insert(()=>r,`:first-child`),u.attr(`class`,`basic label-container`).attr(`style`,Mf(d))}else u=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,l).attr(`cx`,0).attr(`cy`,0);return Y(t,u),t.calcIntersect=function(e,t){let n=e.width/2;return Q.circle(e,n,t)},t.intersect=function(e){return f.info(`Circle intersect`,t,l,e),Q.circle(t,l,e)},a}s(Bg,`circle`);async function Vg(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await J(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),Y(n,o),n.intersect=function(e){return Q.rect(n,e)},r}s(Vg,`composite`);async function Hg(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=q.svg(a).path(og(-u/2,f,u,d,12),G(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),Y(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}s(Hg,`consoleWindow`);function Ug(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
201
+ M ${i.x},${i.y} L ${o.x},${o.y}`}s(Ug,`createLine`);function Wg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=q.svg(i),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=s.circle(0,0,a*2,c),u=Ug(a),d=s.path(u,c),p=i.insert(()=>l,`:first-child`);return p.insert(()=>d),p.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),Y(t,p),t.intersect=function(e){return f.info(`crossedCircle intersect`,t,{radius:a,point:e}),Q.circle(t,a,e)},i}s(Wg,`crossedCircle`);function Gg(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}s(Gg,`generateCirclePoints`);async function Kg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Gg(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Gg(l/2+d*2,-d,d,20,-180,-270),...Gg(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Gg(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Gg(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Gg(l/2+l*.1,-d,d,20,-180,-270),...Gg(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Gg(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}s(Kg,`curlyBraceLeft`);function qg(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}s(qg,`generateCirclePoints`);async function Jg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...qg(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...qg(l/2+d*2,-d,d,20,-180,-270),...qg(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...qg(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...qg(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...qg(l/2+d*2,-d,d,20,-180,-270),...qg(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...qg(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}s(Jg,`curlyBraceRight`);function Yg(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}s(Yg,`generateCirclePoints`);async function Xg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Yg(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Yg(l/2+d*2,-d,d,20,-180,-270),...Yg(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Yg(l/2,u/2,d,20,0,90)],m=[...Yg(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Yg(-l/2-d/2,-d,d,20,0,90),...Yg(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Yg(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Yg(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Yg(l/2+d*2,-d,d,20,-180,-270),...Yg(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Yg(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...Yg(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Yg(-l/2-d/2,-d,d,20,0,90),...Yg(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Yg(-l/2+d+d/2,u/2,d,30,-180,-270)],g=q.svg(i),_=G(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(p).replace(`Z`,``),y=g.path(v,_),b=Z(m).replace(`Z`,``),x=g.path(b,_),S=Z(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,h,e)},i}s(Xg,`curlyBraces`);async function Zg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...rg(-_,-g/2,d,50,270,90)],b=Z(y),x=p.path(b,m),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}s(Zg,`curvedTrapezoid`);async function Qg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(og(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);Y(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let y=m+l,b=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,x=[...rg(0,-y,l,24,180+b,-b),...rg(-(-c/2+f),-(h+f),f,12,90,0),...rg(-(-c/2+f),-(p/2-f),f,12,360,270),...rg(-(c/2-f),-(p/2-f),f,12,270,180),...rg(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return Q.polygon(t,x,e)},i}s(Qg,`person`);var $g=s((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),e_=s((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),t_=s((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),n_=8,r_=8;async function i_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<r_&&(t.width=r_)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<n_&&(t.height=n_)}let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=Math.max(t.width??0,l.width)+o,f=d/2,p=f/(2.5+d/50),m=Math.max(t.height??0,l.height)+a+p,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=q.svg(c),n=e_(0,0,d,m,f,p),r=t_(0,p,d,m,f,p),i=G(t,{}),a=e.path(n,i),o=e.path(r,G(t,{fill:`none`}));h=c.insert(()=>o,`:first-child`),h=c.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=$g(0,0,d,m,f,p);h=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,Mf(g)).attr(`style`,r)}return h.attr(`label-offset-y`,p),h.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),Y(t,h),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}s(i_,`cylinder`);async function a_(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await J(e,t,X(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=f||p?e.path(og(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,Mf(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,Mf(f)).attr(`ry`,Mf(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return Y(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},a}s(a_,`drawRect`);async function o_(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await a_(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}s(o_,`datastore`);async function s_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,y),t.intersect=function(e){return Q.rect(t,e)},o}s(s_,`dividedRectangle`);async function c_(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width/2:c.width/2)+(o??0),u=l-i,d,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{roughness:.2,strokeWidth:2.5}),r=G(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,l*2,n),a=e.circle(0,0,u*2,r);d=s.insert(`g`,`:first-child`),d.attr(`class`,Mf(t.cssClasses)).attr(`style`,Mf(p)),d.node()?.appendChild(i),d.node()?.appendChild(a)}else{d=s.insert(`g`,`:first-child`);let e=d.insert(`circle`,`:first-child`),t=d.insert(`circle`);d.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,l).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0)}return Y(t,d),t.intersect=function(e){return f.info(`DoubleCircle intersect`,t,l,e),Q.circle(t,l,e)},s}s(c_,`doublecircle`);function l_(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=q.svg(a),{nodeBorder:c}=n,l=G(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=s.circle(0,0,14,l),d=a.insert(()=>u,`:first-child`);return d.selectAll(`path`).attr(`style`,`fill: ${c} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),Y(t,d),t.intersect=function(e){return f.info(`filledCircle intersect`,t,{radius:7,point:e}),Q.circle(t,7,e)},a}s(l_,`filledCircle`);var u_=10,d_=10;async function f_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<u_&&(t.height=u_),t.width=(t?.width??0)-a-a/2,t.width<d_&&(t.width=d_));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+(a??0),u=t?.height?t?.height:l+s.height,d=u,p=[{x:0,y:-u},{x:d,y:-u},{x:d/2,y:0}],{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p),v=h.path(_,g),y=o.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-u/2}, ${u/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=l,t.height=u,Y(t,y),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-u/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return f.info(`Triangle intersect`,t,p,e),Q.polygon(t,p,e)},o}s(f_,`flippedTriangle`);async function p_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=q.svg(i).path(g,G(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?Y(t,v):Y(t,v,{width:c,height:d});let y=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return Q.polygon(t,h,e)},i}s(p_,`folder`);function m_(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=W(t);t.label=``;let o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=q.svg(o),p=G(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),Y(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return Q.rect(t,e)},o}s(m_,`forkJoin`);async function h_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=(t?.width?t?.width:Math.max(15,s.width))+i*2,l=(t?.height?t?.height:Math.max(10,s.height))+a*2,u=l/2,{cssStyles:d}=t,p=q.svg(o),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-c/2,y:-l/2},{x:c/2-u,y:-l/2},...rg(-c/2+u,0,u,50,90,270),{x:c/2-u,y:l/2},{x:-c/2,y:l/2}],g=Z(h),_=p.path(g,m),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return f.info(`Pill intersect`,t,{radius:u,point:e}),Q.polygon(t,h,e)},o}s(h_,`halfRoundedRectangle`);var g_=s((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function __(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await J(e,t,X(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=g_(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=Og(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},c}s(__,`hexagon`);async function v_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await J(e,t,X(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=q.svg(i),l=G(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=Z(u),p=c.path(d,l),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-o/2})`),Y(t,m),t.intersect=function(e){return f.info(`Pill intersect`,t,{points:u}),Q.polygon(t,u,e)},i}s(v_,`hourglass`);async function y_(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await J(e,t,`icon-shape default`),p=t.pos===`t`,m=s,h=s,{nodeBorder:g}=n,{stylesMap:_}=Bm(t),v=-h/2,y=-m/2,b=t.label?8:0,x=q.svg(l),S=G(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(v,y,h,m,S),w=Math.max(h,u.width),T=m+u.height+b,E=x.rectangle(-w/2,-T/2,w,T,{...S,fill:`transparent`,stroke:`none`}),D=l.insert(()=>C,`:first-child`),O=l.insert(()=>E);if(t.icon){let e=l.append(`g`);e.html(`<g>${await Ku(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?u.height/2+b/2-i/2-o:-u.height/2-b/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${p?-T/2:T/2-u.height})`),D.attr(`transform`,`translate(0,${p?u.height/2+b/2:-u.height/2-b/2})`),Y(t,O),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+b},{x:n+h/2,y:r-i/2+u.height+b},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+u.height+b},{x:n-u.width/2,y:r-i/2+u.height+b}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+u.width/2,y:r-i/2+m},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],Q.polygon(t,a,e)},l}s(y_,`icon`);async function b_(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await J(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=Bm(t),v=q.svg(l),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`),y.stroke=_.get(`fill`)??g;let b=l.append(`g`);t.icon&&b.html(`<g>${await Ku(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let x=b.node().getBBox(),S=x.width,C=x.height,w=x.x,T=x.y,E=Math.max(S,C)*Math.SQRT2+40,D=v.circle(0,0,E,y),O=Math.max(E,u.width),ee=E+u.height+p,k=v.rectangle(-O/2,-ee/2,O,ee,{...y,fill:`transparent`,stroke:`none`}),te=l.insert(()=>D,`:first-child`),A=l.insert(()=>k);return b.attr(`transform`,`translate(${-S/2-w},${m?u.height/2+p/2-C/2-T:-u.height/2-p/2-C/2-T})`),b.attr(`style`,`color: ${_.get(`stroke`)??h};`),d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-ee/2:ee/2-u.height})`),te.attr(`transform`,`translate(0,${m?u.height/2+p/2:-u.height/2-p/2})`),Y(t,A),t.intersect=function(e){return f.info(`iconSquare intersect`,t,e),Q.rect(t,e)},l}s(b_,`iconCircle`);async function x_(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+d*2,g=s+d*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=Bm(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(l),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(og(b,x,g,h,5),w),E=Math.max(g,u.width),D=h+u.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),ee=l.insert(()=>T,`:first-child`).attr(`class`,`icon-shape2`),k=l.insert(()=>O);if(t.icon){let e=l.append(`g`);e.html(`<g>${await Ku(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?u.height/2+S/2-i/2-o:-u.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-D/2:D/2-u.height})`),ee.attr(`transform`,`translate(0,${m?u.height/2+S/2:-u.height/2-S/2})`),Y(t,k),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+S},{x:n+g/2,y:r-i/2+u.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+u.height+S},{x:n-u.width/2,y:r-i/2+u.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+u.width/2,y:r-i/2+h},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},l}s(x_,`iconRounded`);async function S_(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+d*2,g=s+d*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=Bm(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(l),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(og(b,x,g,h,.1),w),E=Math.max(g,u.width),D=h+u.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),ee=l.insert(()=>T,`:first-child`),k=l.insert(()=>O);if(t.icon){let e=l.append(`g`);e.html(`<g>${await Ku(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?u.height/2+S/2-i/2-o:-u.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-D/2:D/2-u.height})`),ee.attr(`transform`,`translate(0,${m?u.height/2+S/2:-u.height/2-S/2})`),Y(t,k),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+S},{x:n+g/2,y:r-i/2+u.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+u.height+S},{x:n-u.width/2,y:r-i/2+u.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+u.width/2,y:r-i/2+h},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},l}s(S_,`iconSquare`);async function C_(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=W(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let c=Math.max(t.label?s??0:0,t?.assetWidth??i),l=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,u=t.constraint===`on`?l/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(l,s??0);let{shapeSvg:d,bbox:p,label:m}=await J(e,t,`image-shape default`),h=t.pos===`t`,g=-l/2,_=-u/2,v=t.label?8:0,y=q.svg(d),b=G(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,l,u,b),S=Math.max(l,p.width),C=u+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=d.insert(()=>x,`:first-child`),E=d.insert(()=>w);if(t.img){let e=d.append(`image`);e.attr(`href`,t.img),e.attr(`width`,l),e.attr(`height`,u),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-l/2},${h?C/2-u:-C/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-u/2-p.height/2-v/2:u/2-p.height/2+v/2})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),Y(t,E),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+l/2,y:r-i/2+p.height+v},{x:n+l/2,y:r+i/2},{x:n-l/2,y:r+i/2},{x:n-l/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-l/2,y:r-i/2},{x:n+l/2,y:r-i/2},{x:n+l/2,y:r-i/2+u},{x:n+p.width/2,y:r-i/2+u},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+u},{x:n-l/2,y:r-i/2+u}],Q.polygon(t,a,e)},d}s(C_,`imageSquare`);async function w_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=Og(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}s(w_,`inv_trapezoid`);async function T_(e,t){let{shapeSvg:n,bbox:r,label:i}=await J(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Y(t,a),t.intersect=function(e){return Q.rect(t,e)},n}s(T_,`labelRect`);async function E_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=Og(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}s(E_,`lean_left`);async function D_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=Og(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}s(D_,`lean_right`);function O_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],l=q.svg(i),u=G(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=Z(c),p=l.path(d,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${o/2},${-s})`),Y(t,m),t.intersect=function(e){return f.info(`lightningBolt intersect`,t,e),Q.polygon(t,c,e)},i}s(O_,`lightningBolt`);var k_=s((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),A_=s((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),j_=s((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),M_=10,N_=10;async function P_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<N_&&(t.width=N_);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<M_&&(t.height=M_)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=A_(0,0,u,p,d,f,m),r=j_(0,f,u,p,d,f),i=G(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=k_(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,Mf(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Y(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}s(P_,`linedCylinder`);async function F_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=q.svg(s),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...ng(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),Y(t,y),t.intersect=function(e){return Q.polygon(t,_,e)},s}s(F_,`linedWaveEdgedRect`);async function I_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=q.svg(c),y=G(t,{}),b=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],x=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=Z(b),C=v.path(S,y),w=Z(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=ig(C),T=ig(T));let E=c.insert(`g`,`:first-child`);return E.insert(()=>C),E.insert(()=>T),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),Y(t,E),t.intersect=function(e){return Q.polygon(t,b,e)},c}s(I_,`multiRect`);async function L_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=ng(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],x=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],S=q.svg(i),C=G(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=Z(b),T=S.path(w,C),E=Z(x),D=S.path(E,C),O=i.insert(()=>T,`:first-child`);return O.insert(()=>D),O.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),Y(t,O),t.intersect=function(e){return Q.polygon(t,b,e)},i}s(L_,`multiWaveEdgedRectangle`);async function R_(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r,t.useHtmlLabels||On(z())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,p=q.svg(a),m=G(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(u,d,c,l,m),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),f&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Y(t,g),t.intersect=function(e){return Q.rect(t,e)},a}s(R_,`note`);var z_=s((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function B_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=z_(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=Og(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),Y(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=Q.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}s(B_,`question`);async function V_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=q.svg(s),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=Z(g),x=v.path(b,y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,g,e)},s}s(V_,`rect_left_inv_arrow`);async function H_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),c=t.description,l=t.label,u=await sg(s,l,t.labelStyle,!0,!0),d={width:0,height:0};if(On(B())){let e=u.children[0],t=V(u);d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}f.info(`Text 2`,c);let p=c||[],m=u.getBBox(),h=await sg(s,Array.isArray(p)?p.join(`<br/>`):p,t.labelStyle,!0,!0),g=h.children[0],_=V(h);d=g.getBoundingClientRect(),_.attr(`width`,d.width),_.attr(`height`,d.height);let v=(t.padding||0)/2;V(h).attr(`transform`,`translate( `+(d.width>m.width?0:(m.width-d.width)/2)+`, `+(m.height+v+5)+`)`),V(u).attr(`transform`,`translate( `+(d.width<m.width?0:-(m.width-d.width)/2)+`, 0)`),d=s.node().getBBox(),s.attr(`transform`,`translate(`+-d.width/2+`, `+(-d.height/2-v+3)+`)`);let y=d.width+(t.padding||0),b=d.height+(t.padding||0),x=-d.width/2-v,S=-d.height/2-v,C,w;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.path(og(x,S,y,b,t.rx||0),n),i=e.line(-d.width/2-v,-d.height/2-v+m.height+v,d.width/2+v,-d.height/2-v+m.height+v,n);w=a.insert(()=>(f.debug(`Rough node insert CXC`,r),i),`:first-child`),C=a.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`)}else C=o.insert(`rect`,`:first-child`),w=o.insert(`line`),C.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-d.width/2-v).attr(`y`,-d.height/2-v).attr(`width`,d.width+(t.padding||0)).attr(`height`,d.height+(t.padding||0)),w.attr(`class`,`divider`).attr(`x1`,-d.width/2-v).attr(`x2`,d.width/2+v).attr(`y1`,-d.height/2-v+m.height+v).attr(`y2`,-d.height/2-v+m.height+v);return Y(t,C),t.intersect=function(e){return Q.rect(t,e)},a}s(H_,`rectWithTitle`);async function U_(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return a_(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}s(U_,`roundedRect`);var W_=8;async function G_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?W_:W_*2),u=(t?.height??s.height)+a*2,d=l-W_,f=u,p=W_-l/2,m=-u/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-W_,y:m+f},{x:p-W_,y:m},{x:p,y:m},{x:p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`).attr(`style`,Mf(h)),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${W_/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,b),t.intersect=function(e){return Q.rect(t,e)},o}s(G_,`shadedProcess`);async function K_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],b=Z(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}s(K_,`slopedRect`);async function q_(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return a_(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}s(q_,`squareRect`);async function J_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...rg(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...rg(u/2-d,0,d,50,270,450)],g=Z(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return Q.polygon(t,h,e)},s}s(J_,`stadium`);async function Y_(e,t){return a_(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}s(Y_,`state`);function X_(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=q.svg(u),f=G(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return Y(t,_),t.intersect=function(e){return Q.circle(t,(t.width??0)/2,e)},u}s(X_,`stateEnd`);function Z_(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=q.svg(a).circle(0,0,t.width,Rm(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Y(t,o),t.intersect=function(e){return Q.circle(t,(t.width??7)/2,e)},a}s(Z_,`stateStart`);var Q_=8;async function $_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.width+2*Q_+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Q_,f=u,p=-l/2,m=-u/2,h=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Q_,m,p+Q_,m+f,n),a=e.line(p+Q_+d,m,p+Q_+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,Mf(c)),Y(t,o)}else{let e=Og(s,d,f,h);r&&e.attr(`style`,r),Y(t,e)}return t.intersect=function(e){return Q.polygon(t,h,e)},s}s($_,`subroutine`);var ev=.2;async function tv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-ev*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height?t?.height:c.height)+o*2,u=ev*l,d=ev*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],b=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=Z(y),S=_.path(x,v),C=Z(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),Y(t,T),t.intersect=function(e){return Q.polygon(t,y,e)},s}s(tv,`taggedRect`);async function nv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=q.svg(i),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...ng(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...ng(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=Z(g),x=m.path(b,h),S=Z(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,g,e)},i}s(nv,`taggedWaveEdgedRectangle`);async function rv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),Y(t,u),t.intersect=function(e){return Q.rect(t,e)},i}s(rv,`text`);var iv=s((e,t,n,r,i,a)=>`M${e},${t}
202
+ a${i},${a} 0,0,1 0,${-r}
203
+ l${n},0
204
+ a${i},${a} 0,0,1 0,${r}
205
+ M${n},${-r}
206
+ a${i},${a} 0,0,0 0,${r}
207
+ l${-n},0`,`createCylinderPathD`),av=s((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),ov=s((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),sv=5,cv=10;async function lv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.height<sv&&(t.height=sv)),t.width){let e=o/2/(2.5+o/50);t.width=t.width-a-e*3,t.width<cv&&(t.width=cv)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=Math.max(t.height??0,c.height)+a,d=u/2,f=d/(2.5+u/50),p=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t,h;if(t.look===`handDrawn`){let e=q.svg(s),n=av(0,0,p,u,f,d),r=ov(0,0,p,u,f,d),i=e.path(n,G(t,{})),a=e.path(r,G(t,{fill:`none`}));h=s.insert(()=>a,`:first-child`),h=s.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=iv(0,0,p,u,f,d);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,Mf(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,f),h.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,h),t.intersect=function(e){let n=Q.rect(t,e),r=n.y-(t.y??0);if(d!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}s(lv,`tiltedCylinder`);async function uv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=Og(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}s(uv,`trapezoid`);async function dv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=q.svg(s),p=G(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=Z(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Y(t,_),t.intersect=function(e){return Q.polygon(t,m,e)},s}s(dv,`trapezoidalPentagon`);var fv=10,pv=10;async function mv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<pv&&(t.width=pv),t.height=t?.height??0,t.height<fv&&(t.height=fv));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=R(B().flowchart?.htmlLabels),u=(t?.width?t?.width:s.width)+a,d=t?.height?t?.height:u+s.height,p=d,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(m),y=g.path(v,_),b=o.insert(()=>y,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return h&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Y(t,b),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${d/2-(s.height+(t.padding??0)/(l?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(e){return f.info(`Triangle intersect`,t,m,e),Q.polygon(t,m,e)},o}s(mv,`triangle`);async function hv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=q.svg(c),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-d/2-_,y:m/2},...ng(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],x=Z(b),S=v.path(x,y),C=c.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),Y(t,C),t.intersect=function(e){return Q.polygon(t,b,e)},c}s(hv,`waveEdgedRectangle`);async function gv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=q.svg(s),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...ng(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...ng(l/2,-f/2,-l/2,-f/2,d,-1)],_=Z(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),Y(t,y),t.intersect=function(e){return Q.polygon(t,g,e)},s}s(gv,`waveRectangle`);var _v=10;async function vv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-_v,10),t.height=Math.max((t?.height??0)-a*2-_v,10));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+i*2+_v,u=(t?.height?t?.height:s.height)+a*2+_v,d=l-_v,f=u-_v,p=-d/2,m=-f/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{}),v=[{x:p-_v,y:m-_v},{x:p-_v,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-_v}],y=`M${p-_v},${m-_v} L${p+d},${m-_v} L${p+d},${m+f} L${p-_v},${m+f} L${p-_v},${m-_v}
208
+ M${p-_v},${m} L${p+d},${m}
209
+ M${p},${m-_v} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`transform`,`translate(${_v/2}, ${_v/2})`),x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+_v/2-(s.x-(s.left??0))}, ${-(s.height/2)+_v/2-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,v,e)},o}s(vv,`windowPane`);var yv=new Set([`redux-color`,`redux-dark-color`]),bv=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function xv(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:i}=z(),{rowEven:a,rowOdd:o,nodeBorder:s,borderColorArray:c}=i;if(t.look===`handDrawn`){let{themeVariables:n}=z(),{background:r}=n;await xv(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let l=z();t.useHtmlLabels=l.htmlLabels;let u=l.er?.diagramPadding??10,d=l.er?.entityPadding??6,{cssStyles:f}=t,{labelStyles:p,nodeStyles:m}=W(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:``};yf(t.label,l)+i.labelPaddingX*2<l.er.minEntityWidth&&(t.width=l.er.minEntityWidth);let a=await a_(e,t,i);if(r!=null&&yv.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%c.length}`)}if(!R(l.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}l.htmlLabels||(u*=1.25,d*=1.25);let h=X(t);h||=`node default`;let g=e.insert(`g`).attr(`class`,h).attr(`id`,t.domId||t.id),_=await Sv(g,t.label??``,l,0,0,[`name`],p);_.height+=d;let v=0,y=[],b=[],x=0,S=0,C=0,w=0,T=!0,E=!0;for(let e of n.attributes){let t=await Sv(g,e.type,l,0,v,[`attribute-type`],p);x=Math.max(x,t.width+u);let n=await Sv(g,e.name,l,0,v,[`attribute-name`],p);S=Math.max(S,n.width+u);let r=await Sv(g,e.keys.join(),l,0,v,[`attribute-keys`],p);C=Math.max(C,r.width+u);let i=await Sv(g,e.comment,l,0,v,[`attribute-comment`],p);w=Math.max(w,i.width+u);let a=Math.max(t.height,n.height,r.height,i.height)+d;b.push({yOffset:v,rowHeight:a}),v+=a}let D=4;C<=u&&(T=!1,C=0,D--),w<=u&&(E=!1,w=0,D--);let O=g.node().getBBox();if(_.width+u*2-(x+S+C+w)>0){let e=_.width+u*2-(x+S+C+w);x+=e/D,S+=e/D,C>0&&(C+=e/D),w>0&&(w+=e/D)}let ee=x+S+C+w,k=q.svg(g),te=G(t,{});t.look!==`handDrawn`&&(te.roughness=0,te.fillStyle=`solid`);let A=0;b.length>0&&(A=b.reduce((e,t)=>e+(t?.rowHeight??0),0));let j=Math.max(O.width+u*2,t?.width||0,ee),M=Math.max((A??0)+_.height,t?.height||0),ne=-j/2,N=-M/2;if(g.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=V(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=x:r.attr(`class`).includes(`attribute-keys`)?a+=x+S:r.attr(`class`).includes(`attribute-comment`)&&(a+=x+S+C))}r.attr(`transform`,`translate(${ne+u/2+a}, ${o+N+_.height+d/2})`)}),g.select(`.name`).attr(`transform`,`translate(`+-_.width/2+`, `+(N+d/2)+`)`),r!=null&&yv.has(r)){let e=n.colorIndex??0;g.attr(`data-color-id`,`color-${e%c.length}`)}let re=k.rectangle(ne,N,j,M,te),ie=g.insert(()=>re,`:first-child`).attr(`class`,`outer-path`).attr(`style`,f.join(``));y.push(0);for(let[e,t]of b.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=k.rectangle(ne,_.height+N+t?.yOffset,j,t?.rowHeight,{...te,fill:n?a:o,stroke:s});g.insert(()=>r,`g.label`).attr(`style`,f.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let P=1e-4,ae=Cv(ne,_.height+N,j+ne,_.height+N,P),oe=k.polygon(ae.map(e=>[e.x,e.y]),te);if(g.insert(()=>oe).attr(`class`,`divider`),ae=Cv(x+ne,_.height+N,x+ne,M+N,P),oe=k.polygon(ae.map(e=>[e.x,e.y]),te),g.insert(()=>oe).attr(`class`,`divider`),T){let e=x+S+ne;ae=Cv(e,_.height+N,e,M+N,P),oe=k.polygon(ae.map(e=>[e.x,e.y]),te),g.insert(()=>oe).attr(`class`,`divider`)}if(E){let e=x+S+C+ne;ae=Cv(e,_.height+N,e,M+N,P),oe=k.polygon(ae.map(e=>[e.x,e.y]),te),g.insert(()=>oe).attr(`class`,`divider`)}for(let e of y){let t=_.height+N+e;ae=Cv(ne,t,j+ne,t,P),oe=k.polygon(ae.map(e=>[e.x,e.y]),te),g.insert(()=>oe).attr(`class`,`divider`)}if(Y(t,ie),m&&t.look!==`handDrawn`)if(r!=null&&bv.has(r))g.selectAll(`path`).attr(`style`,m);else{let e=m.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);g.selectAll(`path`).attr(`style`,e??``),g.selectAll(`.row-rect-even path`).attr(`style`,m)}return t.intersect=function(e){return Q.rect(t,e)},g}s(xv,`erBox`);async function Sv(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==$n(t)&&(t=$n(t),t=t.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`));let c=s.node().appendChild(await Lm(s,t,{width:yf(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`&lt;`)||t.includes(`&gt;`)){let e=c.children[0];for(e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`)}let l=c.getBBox();if(R(n.htmlLabels)){let e=c.children[0];e.style.textAlign=`start`;let t=V(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return l}s(Sv,`addText`);function Cv(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}s(Cv,`lineToPolygon`);async function wv(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Tv(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Tv(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Tv(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Tv(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}s(wv,`textHelper`);async function Tv(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=z(),o=`useHtmlLabels`in t?t.useHtmlLabels:R(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),ar(s)&&(o=!0);let c=await Lm(i,Fr(Af(s)),{width:yf(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),l,u=1;if(o){let e=c.children[0],t=V(c);u=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(u+=e.innerHTML.split(`<mrow>`).length-1),await Xh(e),l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}else{r.includes(`font-weight: bolder`)&&V(c).selectAll(`tspan`).attr(`font-weight`,``),u=c.children.length;let e=c.children[0];(c.textContent===``||c.textContent.includes(`&gt`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`&gt;`,`>`).replaceAll(`&lt;`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),l=c.getBBox()}return i.attr(`transform`,`translate(0,`+(-l.height/(2*u)+n)+`)`),l.height}s(Tv,`addText`);async function Ev(e,t){let n=B(),{themeVariables:r}=n,{useGradient:i}=r,a=n.class.padding??12,o=a,s=t.useHtmlLabels??R(n.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:l,bbox:u}=await wv(e,t,n,s,o),{labelStyles:d,nodeStyles:f}=W(t);t.labelStyle=d,t.cssStyles=c.styles||``;let p=c.styles?.join(`;`)||f||``;t.cssStyles||=p.replaceAll(`!important`,``).split(`;`);let m=c.members.length===0&&c.methods.length===0&&!n.class?.hideEmptyMembersBox,h=q.svg(l),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Math.max(t.width??0,u.width),v=Math.max(t.height??0,u.height),y=(t.height??0)>u.height;c.members.length===0&&c.methods.length===0?v+=o:c.members.length>0&&c.methods.length===0&&(v+=o*2);let b=-_/2,x=-v/2,S=m?a*2:c.members.length===0&&c.methods.length===0?-a:0;y&&(S=a*2);let C=h.rectangle(b-a,x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0),_+2*a,v+2*a+S,g),w=l.insert(()=>C,`:first-child`);w.attr(`class`,`basic label-container outer-path`);let T=w.node().getBBox(),E=l.select(`.annotation-group`).node().getBBox().height-(m?a/2:0)||0,D=l.select(`.label-group`).node().getBBox().height-(m?a/2:0)||0,O=l.select(`.members-group`).node().getBBox().height-(m?a/2:0)||0,ee=(E+D+x+a-(x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0)))/2;if(l.selectAll(`.text`).each((e,t,r)=>{let i=V(r[t]),u=i.attr(`transform`),d=0;if(u){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(u);e&&(d=parseFloat(e[2]))}let f=d+x+a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0);if(i.attr(`class`).includes(`methods-group`)){let e=Math.max(O,o/2);f=y?Math.max(ee,E+D+e+x+o*2+a)+o*2:E+D+e+x+o*4+a}c.members.length===0&&c.methods.length===0&&n.class?.hideEmptyMembersBox&&(f=c.annotations.length>0?d-o:d),s||(f-=4);let p=b;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(p=-i.node()?.getBBox().width/2||0,l.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(p=0)})),i.attr(`transform`,`translate(${p}, ${f})`)}),c.members.length>0||c.methods.length>0||m){let e=E+D+x+a,n=h.line(T.x,e,T.x+T.width,e+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(m||c.members.length>0||c.methods.length>0){let e=E+D+O+x+o*2+a,n=h.line(T.x,y?Math.max(ee,e):e,T.x+T.width,(y?Math.max(ee,e):e)+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(c.look!==`handDrawn`&&l.selectAll(`path`).attr(`style`,p),w.select(`:nth-child(2)`).attr(`style`,p),l.selectAll(`.divider`).select(`path`).attr(`style`,p),t.labelStyle?l.selectAll(`span`).attr(`style`,t.labelStyle):l.selectAll(`span`).attr(`style`,p),!s){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}else if(d){let t=e.exec(d);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}}}return Y(t,w),t.intersect=function(e){return Q.rect(t,e)},l}s(Ev,`classBox`);async function Dv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t,a=t,o=`verifyMethod`in t,s=X(t),c=B(),{themeVariables:l}=c,{borderColorArray:u,requirementEdgeLabelBackground:d}=l,f=c.layout===`elk`?`start`:`center`,p=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId??t.id),m;m=o?await Ov(p,`&lt;&lt;${i.type}&gt;&gt;`,0,t.labelStyle):await Ov(p,`&lt;&lt;Element&gt;&gt;`,0,t.labelStyle);let h=m,g=await Ov(p,i.name,h,t.labelStyle+`; font-weight: bold;`);if(h+=g+20,o){let e=await Ov(p,`${i.requirementId?`ID: ${i.requirementId}`:``}`,h,t.labelStyle,f);h+=e;let n=await Ov(p,`${i.text?`Text: ${i.text}`:``}`,h,t.labelStyle,f);h+=n;let r=await Ov(p,`${i.risk?`Risk: ${i.risk}`:``}`,h,t.labelStyle,f);h+=r,await Ov(p,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,h,t.labelStyle,f)}else{let e=await Ov(p,`${a.type?`Type: ${a.type}`:``}`,h,t.labelStyle,f);h+=e,await Ov(p,`${a.docRef?`Doc Ref: ${a.docRef}`:``}`,h,t.labelStyle,f)}let _=(p.node()?.getBBox().width??200)+20,v=(p.node()?.getBBox().height??200)+20,y=-_/2,b=-v/2,x=q.svg(p),S=G(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(y,b,_,v,S),w=p.insert(()=>C,`:first-child`);if(w.attr(`class`,`basic label-container outer-path`).attr(`style`,r),u?.length){let e=t.colorIndex??0;p.attr(`data-color-id`,`color-${e%u.length}`)}if(p.selectAll(`.label`).each((e,t,n)=>{let r=V(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-v/2,c=y+20/2;(t===0||t===1)&&(c=a),r.attr(`transform`,`translate(${c}, ${s+20})`)}),h>m+g+20){let e=b+m+g+20,n;if(t.look===`neo`){let t=.001,r=[[y,e],[y+_,e],[y+_,e+t],[y,e+t]];n=x.polygon(r,S)}else n=x.line(y,e,y+_,e,S);p.insert(()=>n).attr(`class`,`divider`)}return Y(t,w),t.intersect=function(e){return Q.rect(t,e)},r&&t.look!==`handDrawn`&&(d||u?.length)&&p.selectAll(`path`).attr(`style`,r),p}s(Dv,`requirementBox`);async function Ov(e,t,n,r=``,i=`center`){if(t===``)return 0;let a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),o=B(),s=o.htmlLabels??!0,c=await Lm(a,Fr(Af(t)),{width:yf(t,o)+50,classes:`markdown-node-label`,useHtmlLabels:s,style:r},o),l;if(s){let e=c.children[0],t=V(c);i===`start`&&V(e).style(`text-align`,`left`),l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=c.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);if(i===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}l=c.getBBox(),l.height+=6}return a.attr(`transform`,`translate(${-l.width/2},${-l.height/2+n})`),l.height}s(Ov,`addText`);var kv=s(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function Av(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await tg(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await tg(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await tg(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,b=-_/2,x=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let S,{rx:C,ry:w}=t,{cssStyles:T}=t;if(t.look===`handDrawn`){let e=q.svg(o),n=G(t,{}),r=C||w?e.path(og(b,x,_,y,C||0),n):e.rectangle(b,x,_,y,n);S=o.insert(()=>r,`:first-child`),S.attr(`class`,`basic label-container`).attr(`style`,T||null)}else{S=o.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,C??5).attr(`ry`,w??5).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=b+2,r=x+Math.floor((C??0)/2),i=x+y-Math.floor((C??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,kv(e))}}return Y(t,S),t.height=y,t.intersect=function(e){return Q.rect(t,e)},o}s(Av,`kanbanItem`);async function jv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+10*o,l=a.height+8*o,u=.15*c,{cssStyles:d}=t,p=a.width+20,m=a.height+20,h=Math.max(c,p),g=Math.max(l,m);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0
210
+ a${u},${u} 1 0,0 ${h*.25},${-1*g*.1}
211
+ a${u},${u} 1 0,0 ${h*.25},0
212
+ a${u},${u} 1 0,0 ${h*.25},0
213
+ a${u},${u} 1 0,0 ${h*.25},${g*.1}
214
+
215
+ a${u},${u} 1 0,0 ${h*.15},${g*.33}
216
+ a${u*.8},${u*.8} 1 0,0 0,${g*.34}
217
+ a${u},${u} 1 0,0 ${-1*h*.15},${g*.33}
218
+
219
+ a${u},${u} 1 0,0 ${-1*h*.25},${g*.15}
220
+ a${u},${u} 1 0,0 ${-1*h*.25},0
221
+ a${u},${u} 1 0,0 ${-1*h*.25},0
222
+ a${u},${u} 1 0,0 ${-1*h*.25},${-1*g*.15}
223
+
224
+ a${u},${u} 1 0,0 ${-1*h*.1},${-1*g*.33}
225
+ a${u*.8},${u*.8} 1 0,0 0,${-1*g*.34}
226
+ a${u},${u} 1 0,0 ${h*.1},${-1*g*.33}
227
+ H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,Mf(d))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),Y(t,_),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return f.info(`Bang intersect`,t,e),Q.rect(t,e)},i}s(jv,`bang`);async function Mv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+2*o,l=a.height+2*o,u=.15*c,d=.25*c,p=.35*c,m=.2*c,{cssStyles:h}=t,g,_=`M0 0
228
+ a${u},${u} 0 0,1 ${c*.25},${-1*c*.1}
229
+ a${p},${p} 1 0,1 ${c*.4},${-1*c*.1}
230
+ a${d},${d} 1 0,1 ${c*.35},${c*.2}
231
+
232
+ a${u},${u} 1 0,1 ${c*.15},${l*.35}
233
+ a${m},${m} 1 0,1 ${-1*c*.15},${l*.65}
234
+
235
+ a${d},${u} 1 0,1 ${-1*c*.25},${c*.15}
236
+ a${p},${p} 1 0,1 ${-1*c*.5},0
237
+ a${u},${u} 1 0,1 ${-1*c*.25},${-1*c*.15}
238
+
239
+ a${u},${u} 1 0,1 ${-1*c*.1},${-1*l*.35}
240
+ a${m},${m} 1 0,1 ${c*.1},${-1*l*.65}
241
+ H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,Mf(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-c/2}, ${-l/2})`),Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return f.info(`Cloud intersect`,t,e),Q.rect(t,e)},i}s(Mv,`cloud`);async function Nv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
242
+ M${-c/2} ${l/2-5}
243
+ v${-l+10}
244
+ q0,-5 5,-5
245
+ h${c-10}
246
+ q5,0 5,5
247
+ v${l-5}
248
+ H${-c/2}
249
+ Z
250
+ `:`
251
+ M${-c/2} ${l/2-5}
252
+ v${-l+10}
253
+ q0,-5 5,-5
254
+ h${c-10}
255
+ q5,0 5,5
256
+ v${l-10}
257
+ q0,5 -5,5
258
+ h${-(c-10)}
259
+ q-5,0 -5,-5
260
+ Z
261
+ `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Y(t,d),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},i}s(Nv,`defaultMindmapNode`);async function Pv(e,t){return Bg(e,t,{padding:t.padding??0})}s(Pv,`mindmapCircle`);var Fv=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:q_},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:U_},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:J_},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:$_},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:i_},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:o_},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:p_},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:Sg},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:Hg},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:Ig},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:Qg},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:Bg},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:jv},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Mv},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:B_},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:__},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:D_},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:E_},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:uv},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:w_},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:c_},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:rv},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:Rg},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:G_},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:Z_},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:X_},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:m_},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:v_},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:Kg},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Jg},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Xg},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:O_},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:hv},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:h_},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:lv},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:P_},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:Zg},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:s_},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:mv},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:vv},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:l_},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:dv},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:f_},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:K_},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:L_},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:I_},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:xg},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:Wg},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:nv},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:tv},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:gv},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:V_},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:F_}],Iv=s(()=>{let e=[...Object.entries({state:Y_,choice:zg,note:R_,composite:Vg,rectWithTitle:H_,labelRect:T_,block_arrow:Fg,collapsedGroup:Dg,iconSquare:S_,iconCircle:b_,icon:y_,iconRounded:x_,imageSquare:C_,anchor:vg,kanbanItem:Av,mindmapCircle:Pv,defaultMindmapNode:Nv,classBox:Ev,erBox:xv,requirementBox:Dv}),...Fv.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function Lv(e){return e in Iv}s(Lv,`isValidShape`);var Rv=s(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),zv=new Map;async function Bv(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?Iv[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,Mf(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),zv.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}s(Bv,`insertNode`);var Vv=s((e,t)=>{zv.set(t.id,e)},`setNodeElem`),Hv=s(()=>{zv.clear()},`clear`),Uv=s(e=>{let t=zv.get(e.id);f.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`),Wv=s((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),Gv={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Kv={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function qv(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Jv(e),t=Jv(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}s(qv,`calculateDeltaAndAngle`);var Jv=s(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),Yv=s(e=>({x:s(function(t,n,r){let i=0,a=Jv(r[0]).x<Jv(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(Gv,e.arrowTypeStart)){let{angle:t,deltaX:n}=qv(r[0],r[1]);i=Gv[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Gv,e.arrowTypeEnd)){let{angle:t,deltaX:n}=qv(r[r.length-1],r[r.length-2]);i=Gv[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(Jv(t).x-Jv(r[r.length-1]).x),s=Math.abs(Jv(t).y-Jv(r[r.length-1]).y),c=Math.abs(Jv(t).x-Jv(r[0]).x),l=Math.abs(Jv(t).y-Jv(r[0]).y),u=Gv[e.arrowTypeStart],d=Gv[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return Jv(t).x+i},`x`),y:s(function(t,n,r){let i=0,a=Jv(r[0]).y<Jv(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(Gv,e.arrowTypeStart)){let{angle:t,deltaY:n}=qv(r[0],r[1]);i=Gv[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Gv,e.arrowTypeEnd)){let{angle:t,deltaY:n}=qv(r[r.length-1],r[r.length-2]);i=Gv[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(Jv(t).y-Jv(r[r.length-1]).y),s=Math.abs(Jv(t).x-Jv(r[r.length-1]).x),c=Math.abs(Jv(t).y-Jv(r[0]).y),l=Math.abs(Jv(t).x-Jv(r[0]).x),u=Gv[e.arrowTypeStart],d=Gv[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return Jv(t).y+i},`y`)}),`getLineFunctionsWithOffset`),Xv=s((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&$v(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&$v(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Zv={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},Qv=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],$v=s((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let c=Zv[n],l=c&&Qv.includes(c.type);if(!c){f.warn(`Unknown arrow type: ${n}`);return}let u=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&l?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${u}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(u);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${u})`)},`addEdgeMarker`),ey=s(e=>typeof e==`string`?e:B()?.flowchart?.curve,`resolveEdgeCurveType`),ty=new Map,ny=new Map,ry=s(()=>{ty.clear(),ny.clear()},`clear`),iy=s(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),ay=s(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),oy=s(async(e,t)=>{let n=B(),r=On(n),{labelStyles:i}=W(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,c=await Lm(e,t.label,{style:ay(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(c),f.info(`abc82`,t,t.labelType);let l,u;if(r){let e=c.children[0],t=V(c);l=await gm.measure(()=>e.getBoundingClientRect()),u=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=V(c).select(`text`).node();await gm.measure(()=>{l=c.getBBox(),u=e&&typeof e.getBBox==`function`?e.getBBox():l})}o.attr(`transform`,Wv(u,r)),ty.set(t.id,a),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await sg(i,t.startLabelLeft,ay(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Wv(o,r)),ny.get(t.id)||ny.set(t.id,{}),ny.get(t.id).startLeft=n,sy(d,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await sg(i,t.startLabelRight,ay(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Wv(o,r)),ny.get(t.id)||ny.set(t.id,{}),ny.get(t.id).startRight=n,sy(d,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await sg(n,t.endLabelLeft,ay(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Wv(o,r)),ny.get(t.id)||ny.set(t.id,{}),ny.get(t.id).endLeft=n,sy(d,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await sg(n,t.endLabelRight,ay(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=V(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Wv(o,r)),ny.get(t.id)||ny.set(t.id,{}),ny.get(t.id).endRight=n,sy(d,t.endLabelRight)}return c},`insertEdgeLabel`);function sy(e,t){On(B())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}s(sy,`setTerminalWidth`);var cy=s((e,t)=>{f.debug(`Moving label abc88 `,e.id,e.label,ty.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:r}=Rv(B());if(e.label){let i=ty.get(e.id),a=e.x,o=e.y;if(n){let r=Of.calcLabelPosition(n);f.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e.startLabelLeft){let t=ny.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=ny.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=ny.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=ny.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),ly=s((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),uy=s((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),dy=s((e,t,n)=>{f.debug(`intersection calc abc89:
262
+ outsidePoint: ${JSON.stringify(t)}
263
+ insidePoint : ${JSON.stringify(n)}
264
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,c=e.height/2,l=Math.abs(t.y-n.y),u=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*c){let e=n.y<t.y?t.y-c-i:i-c-t.y;s=u*e/l;let r={x:n.x<t.x?n.x+s:n.x-u+s,y:n.y<t.y?n.y+l-e:n.y-l+e};return s===0&&(r.x=t.x,r.y=t.y),u===0&&(r.x=t.x),l===0&&(r.y=t.y),f.debug(`abc89 top/bottom calc, Q ${l}, q ${e}, R ${u}, r ${s}`,r),r}else{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=l*s/u,i=n.x<t.x?n.x+u-s:n.x-u+s,a=n.y<t.y?n.y+e:n.y-e;return f.debug(`sides calc abc89, Q ${l}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),u===0&&(i=t.x),l===0&&(a=t.y),{x:i,y:a}}},`intersection`),fy=s((e,t)=>{f.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(f.info(`abc88 checking point`,e,t),!uy(t,e)&&!i){let a=dy(t,r,e);f.debug(`abc88 inside`,e,r,a),f.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?f.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else f.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),f.debug(`returning points`,n),n},`cutPathAtIntersect`);function py(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}s(py,`extractCornerPoints`);var my=s(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),hy=s(function(e){let{cornerPointPositions:t}=py(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=my(t,a,5),s=my(i,a,5),c=s.x-o.x,l=s.y-o.y;n.push(o);let u=Math.sqrt(2)*2,d={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(f.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),d=a.x===o.x?{x:c<0?o.x-5+u:o.x+5-u,y:l<0?o.y-u:o.y+u}:{x:c<0?o.x-u:o.x+u,y:l<0?o.y-5+u:o.y+5-u}):f.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(d,s)}else n.push(e[r]);return n},`fixCorners`),gy=s((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),_y=s(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:c,layout:l}=B(),u=t.points,d=!1,p=i;var m=a;let h=[];for(let e in t.cssCompiledStyles)Hm(e)||h.push(t.cssCompiledStyles[e]);if(l===`swimlane`){if(m.intersect&&p.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[p.intersect(u[0]),m.intersect(u[1])];else{let e=u.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(u[u.length-1].x-n.x)<r&&Math.abs(u[u.length-1].y-n.y)<r,a=p.intersect(t),o=i?n:m.intersect(n),s=Math.abs(o.x-n.x)<r&&Math.abs(o.y-n.y)<r,c=Math.abs(a.x-t.x)<r&&Math.abs(a.y-t.y)<r?[]:[a],l=s?[]:[o];u=[...c,...e,...l]}u=ly(t,u)}else m.intersect&&p.intersect&&!s&&(u=u.slice(1,t.points.length-1),u.unshift(p.intersect(u[0])),u.push(m.intersect(u[u.length-1])));let g=btoa(JSON.stringify(u));t.toCluster&&(f.info(`to cluster abc88`,n.get(t.toCluster)),u=fy(t.points,n.get(t.toCluster).node),d=!0),t.fromCluster&&(f.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(u,null,2)),u=fy(u.reverse(),n.get(t.fromCluster).node).reverse(),d=!0);let _=u.filter(e=>!Number.isNaN(e.y)),v=ey(t.curve);v!==`rounded`&&(_=hy(_));let y=hl;switch(v){case`linear`:y=hl;break;case`basis`:y=Tl;break;case`cardinal`:y=Pl;break;case`bumpX`:y=bl;break;case`bumpY`:y=xl;break;case`catmullRom`:y=Vl;break;case`monotoneX`:y=tu;break;case`monotoneY`:y=nu;break;case`natural`:y=au;break;case`step`:y=su;break;case`stepAfter`:y=lu;break;case`stepBefore`:y=cu;break;case`rounded`:y=hl;break;default:y=Tl}let{x:b,y:x}=Yv(t),S=vl().x(b).y(x).curve(y),C;switch(t.thickness){case`normal`:C=`edge-thickness-normal`;break;case`thick`:C=`edge-thickness-thick`;break;case`invisible`:C=`edge-thickness-invisible`;break;default:C=`edge-thickness-normal`}switch(t.pattern){case`solid`:C+=` edge-pattern-solid`;break;case`dotted`:C+=` edge-pattern-dotted`;break;case`dashed`:C+=` edge-pattern-dashed`;break;default:C+=` edge-pattern-solid`}let w,T=v===`rounded`?vy(by(_,t),5):S(_),E=Array.isArray(t.style)?t.style:[t.style],D=E.find(e=>e?.startsWith(`stroke:`)),O=``;t.animate&&(O=`edge-animation-fast`),t.animation&&(O=`edge-animation-`+t.animation);let ee=!1;if(t.look===`handDrawn`){let n=q.svg(e);Object.assign([],_);let r=n.path(T,{roughness:.3,seed:c});C+=` transition`,w=V(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,E?E.reduce((e,t)=>e+`;`+t,``):``);let i=w.attr(`d`);w.attr(`d`,i),e.node().appendChild(w.node())}else{let n=h.join(`;`),r=E?E.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(E?E.reduce((e,t)=>e+`;`+t,``):``);w=e.append(`path`).attr(`d`,T).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,i),D=i.match(/stroke:([^;]+)/)?.[1],ee=t.animate===!0||!!t.animation||n.includes(`animation`);let a=w.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,c=Kv[t.arrowTypeStart]||0,l=Kv[t.arrowTypeEnd]||0;if(t.look===`neo`&&!ee){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?gy(s,c,l):`0 ${c} ${s-c-l} ${l}`}; stroke-dashoffset: 0;`;w.attr(`style`,e+w.attr(`style`))}}w.attr(`data-edge`,!0),w.attr(`data-et`,`edge`),w.attr(`data-id`,t.id),w.attr(`data-points`,g),w.attr(`data-look`,Mf(t.look)),t.showPoints&&_.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let k=``;(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(k=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),f.info(`arrowTypeStart`,t.arrowTypeStart),f.info(`arrowTypeEnd`,t.arrowTypeEnd);let te=!ee&&t?.look===`neo`;Xv(w,t,k,o,r,te,D);let A=Math.floor(u.length/2),j=u[A];Of.isLabelCoordinateInPath(j,w.attr(`d`))||(d=!0);let M={};return d&&(M.updatedPath=u),M.originalPath=t.points,M},`insertEdge`);function vy(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}s(vy,`generateRoundedPath`);function yy(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}s(yy,`calculateDeltaAndAngle`);function by(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&Gv[t.arrowTypeStart]){let r=Gv[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=yy(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&Gv[t.arrowTypeEnd]){let i=Gv[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=yy(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}s(by,`applyMarkerOffsetsToPoints`);var xy=s((e,t,n,r)=>{t.forEach(t=>{Sy[t](e,n,r)})},`insertMarkers`),Sy={extension:s((e,t,n)=>{f.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:s((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:s((e,t,n)=>{let{themeVariables:r}=z(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:s((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:s((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:s((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
265
+ L20,10
266
+ M20,10
267
+ L0,20`)},`requirement_arrow`),requirement_contains:s((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0
268
+ L20,10
269
+ M20,10
270
+ L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:s((e,t,n)=>{let{themeVariables:r}=z(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},Cy=xy,wy=typeof global==`object`&&global&&global.Object===Object&&global,Ty=typeof self==`object`&&self&&self.Object===Object&&self,Ey=wy||Ty||Function(`return this`)(),Dy=Ey.Symbol,Oy=Object.prototype,ky=Oy.hasOwnProperty,Ay=Oy.toString,jy=Dy?Dy.toStringTag:void 0;function My(e){var t=ky.call(e,jy),n=e[jy];try{e[jy]=void 0;var r=!0}catch{}var i=Ay.call(e);return r&&(t?e[jy]=n:delete e[jy]),i}var Ny=Object.prototype.toString;function Py(e){return Ny.call(e)}var Fy=`[object Null]`,Iy=`[object Undefined]`,Ly=Dy?Dy.toStringTag:void 0;function Ry(e){return e==null?e===void 0?Iy:Fy:Ly&&Ly in Object(e)?My(e):Py(e)}function zy(e){return typeof e==`object`&&!!e}var By=`[object Symbol]`;function Vy(e){return typeof e==`symbol`||zy(e)&&Ry(e)==By}function Hy(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Uy=Array.isArray,Wy=1/0,Gy=Dy?Dy.prototype:void 0,Ky=Gy?Gy.toString:void 0;function qy(e){if(typeof e==`string`)return e;if(Uy(e))return Hy(e,qy)+``;if(Vy(e))return Ky?Ky.call(e):``;var t=e+``;return t==`0`&&1/e==-Wy?`-0`:t}function Jy(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Yy(e){return e}var Xy=`[object AsyncFunction]`,Zy=`[object Function]`,Qy=`[object GeneratorFunction]`,$y=`[object Proxy]`;function eb(e){if(!Jy(e))return!1;var t=Ry(e);return t==Zy||t==Qy||t==Xy||t==$y}var tb=Ey[`__core-js_shared__`],nb=function(){var e=/[^.]+$/.exec(tb&&tb.keys&&tb.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function rb(e){return!!nb&&nb in e}var ib=Function.prototype.toString;function ab(e){if(e!=null){try{return ib.call(e)}catch{}try{return e+``}catch{}}return``}var ob=/[\\^$.*+?()[\]{}|]/g,sb=/^\[object .+?Constructor\]$/,cb=Function.prototype,lb=Object.prototype,ub=cb.toString,db=lb.hasOwnProperty,fb=RegExp(`^`+ub.call(db).replace(ob,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function pb(e){return!Jy(e)||rb(e)?!1:(eb(e)?fb:sb).test(ab(e))}function mb(e,t){return e?.[t]}function hb(e,t){var n=mb(e,t);return pb(n)?n:void 0}var gb=hb(Ey,`WeakMap`);function _b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vb(){}var yb=800,bb=16,xb=Date.now;function Sb(e){var t=0,n=0;return function(){var r=xb(),i=bb-(r-n);if(n=r,i>0){if(++t>=yb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cb(e){return function(){return e}}var wb=function(){try{var e=hb(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Tb=Sb(wb?function(e,t){return wb(e,`toString`,{configurable:!0,enumerable:!1,value:Cb(t),writable:!0})}:Yy);function Eb(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Db(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Ob(e){return e!==e}function kb(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ab(e,t,n){return t===t?kb(e,t,n):Db(e,Ob,n)}function jb(e,t){return!!(e!=null&&e.length)&&Ab(e,t,0)>-1}var Mb=9007199254740991,Nb=/^(?:0|[1-9]\d*)$/;function Pb(e,t){var n=typeof e;return t??=Mb,!!t&&(n==`number`||n!=`symbol`&&Nb.test(e))&&e>-1&&e%1==0&&e<t}function Fb(e,t){return e===t||e!==e&&t!==t}var Ib=Math.max;function Lb(e,t,n){return t=Ib(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ib(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),_b(e,this,s)}}function Rb(e,t){return Tb(Lb(e,t,Yy),e+``)}var zb=9007199254740991;function Bb(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=zb}function Vb(e){return e!=null&&Bb(e.length)&&!eb(e)}var Hb=Object.prototype;function Ub(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Hb)}function Wb(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Gb=`[object Arguments]`;function Kb(e){return zy(e)&&Ry(e)==Gb}var qb=Object.prototype,Jb=qb.hasOwnProperty,Yb=qb.propertyIsEnumerable,Xb=Kb(function(){return arguments}())?Kb:function(e){return zy(e)&&Jb.call(e,`callee`)&&!Yb.call(e,`callee`)};function Zb(){return!1}var Qb=typeof exports==`object`&&exports&&!exports.nodeType&&exports,$b=Qb&&typeof module==`object`&&module&&!module.nodeType&&module,ex=$b&&$b.exports===Qb?Ey.Buffer:void 0,tx=(ex?ex.isBuffer:void 0)||Zb,nx=`[object Arguments]`,rx=`[object Array]`,ix=`[object Boolean]`,ax=`[object Date]`,ox=`[object Error]`,sx=`[object Function]`,cx=`[object Map]`,lx=`[object Number]`,ux=`[object Object]`,dx=`[object RegExp]`,fx=`[object Set]`,px=`[object String]`,mx=`[object WeakMap]`,hx=`[object ArrayBuffer]`,gx=`[object DataView]`,_x=`[object Float32Array]`,vx=`[object Float64Array]`,yx=`[object Int8Array]`,bx=`[object Int16Array]`,xx=`[object Int32Array]`,Sx=`[object Uint8Array]`,Cx=`[object Uint8ClampedArray]`,wx=`[object Uint16Array]`,Tx=`[object Uint32Array]`,Ex={};Ex[_x]=Ex[vx]=Ex[yx]=Ex[bx]=Ex[xx]=Ex[Sx]=Ex[Cx]=Ex[wx]=Ex[Tx]=!0,Ex[nx]=Ex[rx]=Ex[hx]=Ex[ix]=Ex[gx]=Ex[ax]=Ex[ox]=Ex[sx]=Ex[cx]=Ex[lx]=Ex[ux]=Ex[dx]=Ex[fx]=Ex[px]=Ex[mx]=!1;function Dx(e){return zy(e)&&Bb(e.length)&&!!Ex[Ry(e)]}function Ox(e){return function(t){return e(t)}}var kx=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ax=kx&&typeof module==`object`&&module&&!module.nodeType&&module,jx=Ax&&Ax.exports===kx&&wy.process,Mx=function(){try{return Ax&&Ax.require&&Ax.require(`util`).types||jx&&jx.binding&&jx.binding(`util`)}catch{}}(),Nx=Mx&&Mx.isTypedArray,Px=Nx?Ox(Nx):Dx,Fx=Object.prototype.hasOwnProperty;function Ix(e,t){var n=Uy(e),r=!n&&Xb(e),i=!n&&!r&&tx(e),a=!n&&!r&&!i&&Px(e),o=n||r||i||a,s=o?Wb(e.length,String):[],c=s.length;for(var l in e)(t||Fx.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Pb(l,c)))&&s.push(l);return s}function Lx(e,t){return function(n){return e(t(n))}}var Rx=Lx(Object.keys,Object),zx=Object.prototype.hasOwnProperty;function Bx(e){if(!Ub(e))return Rx(e);var t=[];for(var n in Object(e))zx.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Vx(e){return Vb(e)?Ix(e):Bx(e)}var Hx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ux=/^\w*$/;function Wx(e,t){if(Uy(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Vy(e)?!0:Ux.test(e)||!Hx.test(e)||t!=null&&e in Object(t)}var Gx=hb(Object,`create`);function Kx(){this.__data__=Gx?Gx(null):{},this.size=0}function qx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Jx=`__lodash_hash_undefined__`,Yx=Object.prototype.hasOwnProperty;function Xx(e){var t=this.__data__;if(Gx){var n=t[e];return n===Jx?void 0:n}return Yx.call(t,e)?t[e]:void 0}var Zx=Object.prototype.hasOwnProperty;function Qx(e){var t=this.__data__;return Gx?t[e]!==void 0:Zx.call(t,e)}var $x=`__lodash_hash_undefined__`;function eS(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Gx&&t===void 0?$x:t,this}function tS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tS.prototype.clear=Kx,tS.prototype.delete=qx,tS.prototype.get=Xx,tS.prototype.has=Qx,tS.prototype.set=eS;function nS(){this.__data__=[],this.size=0}function rS(e,t){for(var n=e.length;n--;)if(Fb(e[n][0],t))return n;return-1}var iS=Array.prototype.splice;function aS(e){var t=this.__data__,n=rS(t,e);return n<0?!1:(n==t.length-1?t.pop():iS.call(t,n,1),--this.size,!0)}function oS(e){var t=this.__data__,n=rS(t,e);return n<0?void 0:t[n][1]}function sS(e){return rS(this.__data__,e)>-1}function cS(e,t){var n=this.__data__,r=rS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function lS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lS.prototype.clear=nS,lS.prototype.delete=aS,lS.prototype.get=oS,lS.prototype.has=sS,lS.prototype.set=cS;var uS=hb(Ey,`Map`);function dS(){this.size=0,this.__data__={hash:new tS,map:new(uS||lS),string:new tS}}function fS(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function pS(e,t){var n=e.__data__;return fS(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function mS(e){var t=pS(this,e).delete(e);return this.size-=+!!t,t}function hS(e){return pS(this,e).get(e)}function gS(e){return pS(this,e).has(e)}function _S(e,t){var n=pS(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function vS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vS.prototype.clear=dS,vS.prototype.delete=mS,vS.prototype.get=hS,vS.prototype.has=gS,vS.prototype.set=_S;var yS=`Expected a function`;function bS(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(yS);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(bS.Cache||vS),n}bS.Cache=vS;var xS=500;function SS(e){var t=bS(e,function(e){return n.size===xS&&n.clear(),e}),n=t.cache;return t}var CS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wS=/\\(\\)?/g,TS=SS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(CS,function(e,n,r,i){t.push(r?i.replace(wS,`$1`):n||e)}),t});function ES(e){return e==null?``:qy(e)}function DS(e,t){return Uy(e)?e:Wx(e,t)?[e]:TS(ES(e))}var OS=1/0;function kS(e){if(typeof e==`string`||Vy(e))return e;var t=e+``;return t==`0`&&1/e==-OS?`-0`:t}function AS(e,t){t=DS(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[kS(t[n++])];return n&&n==r?e:void 0}function jS(e,t,n){var r=e==null?void 0:AS(e,t);return r===void 0?n:r}function MS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var NS=Dy?Dy.isConcatSpreadable:void 0;function PS(e){return Uy(e)||Xb(e)||!!(NS&&e&&e[NS])}function FS(e,t,n,r,i){var a=-1,o=e.length;for(n||=PS,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?FS(s,t-1,n,r,i):MS(i,s):r||(i[i.length]=s)}return i}function IS(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function LS(){this.__data__=new lS,this.size=0}function RS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function zS(e){return this.__data__.get(e)}function BS(e){return this.__data__.has(e)}var VS=200;function HS(e,t){var n=this.__data__;if(n instanceof lS){var r=n.__data__;if(!uS||r.length<VS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new vS(r)}return n.set(e,t),this.size=n.size,this}function US(e){var t=this.__data__=new lS(e);this.size=t.size}US.prototype.clear=LS,US.prototype.delete=RS,US.prototype.get=zS,US.prototype.has=BS,US.prototype.set=HS;function WS(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function GS(){return[]}var KS=Object.prototype.propertyIsEnumerable,qS=Object.getOwnPropertySymbols,JS=qS?function(e){return e==null?[]:(e=Object(e),WS(qS(e),function(t){return KS.call(e,t)}))}:GS;function YS(e,t,n){var r=t(e);return Uy(e)?r:MS(r,n(e))}function XS(e){return YS(e,Vx,JS)}var ZS=hb(Ey,`DataView`),QS=hb(Ey,`Promise`),$S=hb(Ey,`Set`),eC=`[object Map]`,tC=`[object Object]`,nC=`[object Promise]`,rC=`[object Set]`,iC=`[object WeakMap]`,aC=`[object DataView]`,oC=ab(ZS),sC=ab(uS),cC=ab(QS),lC=ab($S),uC=ab(gb),dC=Ry;(ZS&&dC(new ZS(new ArrayBuffer(1)))!=aC||uS&&dC(new uS)!=eC||QS&&dC(QS.resolve())!=nC||$S&&dC(new $S)!=rC||gb&&dC(new gb)!=iC)&&(dC=function(e){var t=Ry(e),n=t==tC?e.constructor:void 0,r=n?ab(n):``;if(r)switch(r){case oC:return aC;case sC:return eC;case cC:return nC;case lC:return rC;case uC:return iC}return t});var fC=dC,pC=Ey.Uint8Array,mC=`__lodash_hash_undefined__`;function hC(e){return this.__data__.set(e,mC),this}function gC(e){return this.__data__.has(e)}function _C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new vS;++t<n;)this.add(e[t])}_C.prototype.add=_C.prototype.push=hC,_C.prototype.has=gC;function vC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function yC(e,t){return e.has(t)}var bC=1,xC=2;function SC(e,t,n,r,i,a){var o=n&bC,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&xC?new _C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!vC(t,function(e,t){if(!yC(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function CC(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function wC(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var TC=1,EC=2,DC=`[object Boolean]`,OC=`[object Date]`,kC=`[object Error]`,AC=`[object Map]`,jC=`[object Number]`,MC=`[object RegExp]`,NC=`[object Set]`,PC=`[object String]`,FC=`[object Symbol]`,IC=`[object ArrayBuffer]`,LC=`[object DataView]`,RC=Dy?Dy.prototype:void 0,zC=RC?RC.valueOf:void 0;function BC(e,t,n,r,i,a,o){switch(n){case LC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case IC:return!(e.byteLength!=t.byteLength||!a(new pC(e),new pC(t)));case DC:case OC:case jC:return Fb(+e,+t);case kC:return e.name==t.name&&e.message==t.message;case MC:case PC:return e==t+``;case AC:var s=CC;case NC:var c=r&TC;if(s||=wC,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=EC,o.set(e,t);var u=SC(s(e),s(t),r,i,a,o);return o.delete(e),u;case FC:if(zC)return zC.call(e)==zC.call(t)}return!1}var VC=1,HC=Object.prototype.hasOwnProperty;function UC(e,t,n,r,i,a){var o=n&VC,s=XS(e),c=s.length;if(c!=XS(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:HC.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var WC=1,GC=`[object Arguments]`,KC=`[object Array]`,qC=`[object Object]`,JC=Object.prototype.hasOwnProperty;function YC(e,t,n,r,i,a){var o=Uy(e),s=Uy(t),c=o?KC:fC(e),l=s?KC:fC(t);c=c==GC?qC:c,l=l==GC?qC:l;var u=c==qC,d=l==qC,f=c==l;if(f&&tx(e)){if(!tx(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new US,o||Px(e)?SC(e,t,n,r,i,a):BC(e,t,c,n,r,i,a);if(!(n&WC)){var p=u&&JC.call(e,`__wrapped__`),m=d&&JC.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new US,i(h,g,n,r,a)}}return f?(a||=new US,UC(e,t,n,r,i,a)):!1}function XC(e,t,n,r,i){return e===t?!0:e==null||t==null||!zy(e)&&!zy(t)?e!==e&&t!==t:YC(e,t,n,r,XC,i)}var ZC=1,QC=2;function $C(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new US;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?XC(u,l,ZC|QC,r,d):f))return!1}}return!0}function ew(e){return e===e&&!Jy(e)}function tw(e){for(var t=Vx(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ew(i)]}return t}function nw(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function rw(e){var t=tw(e);return t.length==1&&t[0][2]?nw(t[0][0],t[0][1]):function(n){return n===e||$C(n,e,t)}}function iw(e,t){return e!=null&&t in Object(e)}function aw(e,t,n){t=DS(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=kS(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Bb(i)&&Pb(o,i)&&(Uy(e)||Xb(e)))}function ow(e,t){return e!=null&&aw(e,t,iw)}var sw=1,cw=2;function lw(e,t){return Wx(e)&&ew(t)?nw(kS(e),t):function(n){var r=jS(n,e);return r===void 0&&r===t?ow(n,e):XC(t,r,sw|cw)}}function uw(e){return function(t){return t?.[e]}}function dw(e){return function(t){return AS(t,e)}}function fw(e){return Wx(e)?uw(kS(e)):dw(e)}function pw(e){return typeof e==`function`?e:e==null?Yy:typeof e==`object`?Uy(e)?lw(e[0],e[1]):rw(e):fw(e)}function mw(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var hw=mw();function gw(e,t){return e&&hw(e,t,Vx)}function _w(e,t){return function(n,r){if(n==null)return n;if(!Vb(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var vw=_w(gw);function yw(e){return zy(e)&&Vb(e)}function bw(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function xw(e){return typeof e==`function`?e:Yy}function Sw(e,t){return(Uy(e)?Eb:vw)(e,xw(t))}function Cw(e,t){var n=[];return vw(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function ww(e,t){return(Uy(e)?WS:Cw)(e,pw(t,3))}function Tw(e,t){return Hy(t,function(t){return e[t]})}function Ew(e){return e==null?[]:Tw(e,Vx(e))}var Dw=`[object Map]`,Ow=`[object Set]`,kw=Object.prototype.hasOwnProperty;function Aw(e){if(e==null)return!0;if(Vb(e)&&(Uy(e)||typeof e==`string`||typeof e.splice==`function`||tx(e)||Px(e)||Xb(e)))return!e.length;var t=fC(e);if(t==Dw||t==Ow)return!e.size;if(Ub(e))return!Bx(e).length;for(var n in e)if(kw.call(e,n))return!1;return!0}function jw(e){return e===void 0}function Mw(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Nw(e,t,n){var r=Uy(e)?IS:Mw,i=arguments.length<3;return r(e,pw(t,4),n,i,vw)}var Pw=$S&&1/wC(new $S([,-0]))[1]==1/0?function(e){return new $S(e)}:vb,Fw=200;function Iw(e,t,n){var r=-1,i=jb,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=bw;else if(a>=Fw){var l=t?null:Pw(e);if(l)return wC(l);o=!1,i=yC,c=new _C}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var Lw=Rb(function(e){return Iw(FS(e,1,yw,!0))}),Rw=`\0`,zw=`\0`,Bw=``,Vw=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Cb(void 0),this._defaultEdgeLabelFn=Cb(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[zw]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return eb(e)||(e=Cb(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Vx(this._nodes)}sources(){var e=this;return ww(this.nodes(),function(t){return Aw(e._in[t])})}sinks(){var e=this;return ww(this.nodes(),function(t){return Aw(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return Sw(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=zw,this._children[e]={},this._children[zw][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Sw(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),Sw(Vx(this._in[e]),t),delete this._in[e],delete this._preds[e],Sw(Vx(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(jw(t))t=zw;else{t+=``;for(var n=t;!jw(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==zw)return t}}children(e){if(jw(e)&&(e=zw),this._isCompound){var t=this._children[e];if(t)return Vx(t)}else if(e===zw)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Vx(t)}successors(e){var t=this._sucs[e];if(t)return Vx(t)}neighbors(e){var t=this.predecessors(e);if(t)return Lw(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Sw(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),Sw(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&Sw(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return eb(e)||(e=Cb(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ew(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return Nw(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,jw(n)||(n=``+n);var o=Ww(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!jw(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Gw(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,Hw(this._preds[t],e),Hw(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Kw(this._isDirected,arguments[0]):Ww(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Kw(this._isDirected,arguments[0]):Ww(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Kw(this._isDirected,arguments[0]):Ww(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Uw(this._preds[t],e),Uw(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Ew(n);return t?ww(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Ew(n);return t?ww(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};Vw.prototype._nodeCount=0,Vw.prototype._edgeCount=0;function Hw(e,t){e[t]?e[t]++:e[t]=1}function Uw(e,t){--e[t]||delete e[t]}function Ww(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+Bw+a+Bw+(jw(r)?Rw:r)}function Gw(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Kw(e,t){return Ww(e,t.v,t.w,t.name)}var qw=s(async(e,t)=>{let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,s=o,{labelStyles:c,nodeStyles:l,borderStyles:u,backgroundStyles:d}=W(t),p=e.insert(`g`).attr(`class`,`cluster swimlane `+(t.cssClasses||``)).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-et`,`cluster`).attr(`data-look`,t.look),m=R(n.flowchart.htmlLabels),h=t.direction===`LR`,g=p.insert(`g`).attr(`class`,`cluster-label swimlane-label`),_=await Lm(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}),v=_.getBBox();if(m){let e=_.children[0],t=V(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=t.padding??0,b=t.width<=v.width+y?v.width+y:t.width;t.width<=v.width+y?t.diff=(b-t.width)/2-y:t.diff=-y;let x=t.height,S=t.y-x/2,C=t.y+x/2,w=t.x-b/2,T=t.swimlaneContentTop===void 0?S+x/3:t.swimlaneContentTop,E=h?4:0,D=v.height+2*E,O,ee;if(h){let e=Math.max(D,v.height+2*E),n=w+e,r=Math.max(0,b-e);if(t.look===`handDrawn`){let o=q.svg(p),c=G(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),l=G(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),f=o.rectangle(w,S,e,x,c);O=p.insert(()=>f,`:first-child`);let m=o.rectangle(n,S,r,x,l);ee=p.insert(()=>m,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),O.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),ee=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,l).attr(`x`,w).attr(`y`,S).attr(`width`,e).attr(`height`,x).attr(`fill`,a).attr(`stroke`,s),ee.attr(`class`,`swimlane-body`).attr(`style`,l).attr(`x`,n).attr(`y`,S).attr(`width`,r).attr(`height`,x).attr(`fill`,`none`).attr(`stroke`,s);let o=w+e/2,c=t.y;g.attr(`transform`,`translate(${o}, ${c}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{let e=Math.max(0,T-S),n=Math.min(D,e),r=S+n,o=Math.max(0,C-r),c=t.x-b/2;if(t.look===`handDrawn`){let e=q.svg(p),l=G(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),f=G(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),m=e.rectangle(c,S,b,n,l);O=p.insert(()=>m,`:first-child`);let h=e.rectangle(c,r,b,o,f);ee=p.insert(()=>h,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),O.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),ee=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,l).attr(`x`,c).attr(`y`,S).attr(`width`,b).attr(`height`,n).attr(`fill`,a).attr(`stroke`,s),ee.attr(`class`,`swimlane-body`).attr(`style`,l).attr(`x`,c).attr(`y`,r).attr(`width`,b).attr(`height`,o).attr(`fill`,`none`).attr(`stroke`,s);let f=t.x-v.width/2,m=S+(n-v.height)/2;g.attr(`transform`,`translate(${f}, ${m})`)}if(f.trace(`Swimlane data `,t,JSON.stringify(t)),c){let e=g.select(`span`);e&&e.attr(`style`,c)}return t.offsetX=0,t.width=b,t.height=x,t.offsetY=v.height-y/2,t.intersect=function(e){return ag(t,e)},{cluster:p,labelBBox:v}},`swimlane`),Jw=s(async(e,t)=>{f.info(`Creating subgraph rect for `,t.id,t);let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=W(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=On(n),m=d.insert(`g`).attr(`class`,`cluster-label `),h;h=t.labelType===`markdown`?await Lm(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):await sg(m,t.label,t.labelStyle||``,!1,!0);let g=h.getBBox();if(On(n)){let e=h.children[0],t=V(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;f.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(d),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(og(y,b,_,v,0),n);x=d.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),x.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else x=d.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=Rv(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return ag(t,e)},{cluster:d,labelBBox:g}},`rect`),Yw={rect:Jw,squareRect:Jw,roundedWithTitle:s(async(e,t)=>{let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),u=l.insert(`g`,`:first-child`),d=l.insert(`g`).attr(`class`,`cluster-label`),f=l.append(`rect`),p=await sg(d,t.label,t.labelStyle,void 0,!0),m=p.getBBox();if(On(n)){let e=p.children[0],t=V(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let h=0*t.padding,g=h/2,_=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+h;t.width<=m.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+h,y=t.height+h-m.height-6,b=t.x-_/2,x=t.y-v/2;t.width=_;let S=t.y-t.height/2-g+m.height+2,C;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=q.svg(l),r=t.rx||t.ry?n.path(og(b,x,_,v,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:c,seed:i}):n.rectangle(b,x,_,v,{seed:i});C=l.insert(()=>r,`:first-child`);let u=n.rectangle(b,S,_,y,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:c,seed:i});C=l.insert(()=>r,`:first-child`),f=l.insert(()=>u)}else C=u.insert(`rect`,`:first-child`),C.attr(`class`,`outer`).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v).attr(`data-look`,t.look),f.attr(`class`,`inner`).attr(`x`,b).attr(`y`,S).attr(`width`,_).attr(`height`,y);return d.attr(`transform`,`translate(${t.x-m.width/2}, ${x+1-(On(n)?0:3)})`),t.height=C.node().getBBox().height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(e){return ag(t,e)},{cluster:l,labelBBox:m}},`roundedWithTitle`),noteGroup:s((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return ag(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:s((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=B(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=q.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return ag(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:s(async(e,t)=>{f.info(`Creating subgraph rect for `,t.id,t);let n=B(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=W(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=On(n),m=d.insert(`g`).attr(`class`,`cluster-label `),h=await Lm(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=h.getBBox();if(On(n)){let e=h.children[0],t=V(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;f.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(d),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(og(y,b,_,v,t.rx),n);x=d.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),x.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else x=d.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=Rv(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return ag(t,e)},{cluster:d,labelBBox:g}},`kanbanSection`),swimlane:qw},Xw=new Map,Zw=s(async(e,t)=>{let n=await Yw[t.shape||`rect`](e,t);return Xw.set(t.id,n),n},`insertCluster`),Qw=s(()=>{Xw=new Map},`clear`),$w={common:lr,getConfig:z,insertCluster:Zw,insertEdge:_y,insertEdgeLabel:oy,insertMarkers:Cy,insertNode:Bv,interpolateToCurve:Qd,labelHelper:J,log:f,positionEdgeLabel:cy},eT={},tT=s(e=>{for(let t of e)eT[t.name]=t},`registerLayoutLoaders`);s(()=>{tT([{name:`dagre`,loader:s(async()=>await r(()=>import(`./dagre-3AP2YEHR-DFiQF-6f.js`),__vite__mapDeps([3,4]),import.meta.url),`loader`)},{name:`swimlane`,loader:s(async()=>await r(()=>import(`./swimlanes-XN3QIQJK-CR-dfN_t.js`),[],import.meta.url),`loader`)},{name:`cose-bilkent`,loader:s(async()=>await r(()=>import(`./cose-bilkent-JH36ORCC-9YQYwdl0.js`),__vite__mapDeps([5,1,2,6]),import.meta.url),`loader`)}])},`registerDefaultLayoutLoaders`)();var nT=s(async(e,t)=>{if(!(e.layoutAlgorithm in eT))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=eT[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,$w,{algorithm:n.algorithm})},`render`),rT=s((e=``,{fallback:t=`dagre`}={})=>{if(e in eT)return e;if(t in eT)return f.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);function iT(e,{edgePathsClass:t=`edges edgePath`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}s(iT,`createLayoutElementGroups`);async function aT(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await J(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}s(aT,`measureGroupLabel`);async function oT(e,t,n){let r=await Bv(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}s(oT,`insertMeasuredNode`);async function sT(e,t){let n=new Vw({multigraph:!0,compound:!0}),i=[...t.edges],a=B(),o=iT(e),{edgeLabels:s,nodes:c}=o,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await aT(c,e),n.setNode(e.id,{...e});else{if(u){let t=await oT(c,e,{config:a,dir:e.dir});l.set(e.id,t)}n.setNode(e.id,{...e})}}));for(let e of i)u&&iy(e)&&await oy(s,e),n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await r(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-X5ZJPWSS-heUErzhI.js`);return{captureNodeSizes:e}},[],import.meta.url);n(e,t)}return{graph:n,groups:o,nodeElements:l}}s(sT,`createGraphWithElements`);var $=new Map,cT=new Map,lT=new Map,uT=s(()=>{cT.clear(),lT.clear(),$.clear()},`clear`),dT=s((e,t)=>{let n=cT.get(t)||[];return f.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),fT=s((e,t)=>{let n=cT.get(t)||[];return f.info(`Descendants of `,t,` is `,n),f.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||dT(e.v,t)||dT(e.w,t)||n.includes(e.w):(f.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),pT=s((e,t,n,r)=>{f.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),f.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)pT(i,t,n,r);else{let a=t.node(i);f.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(f.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(f.debug(`Setting parent`,i,e),n.setParent(i,e)):(f.info(`In copy `,e,`root`,r,`data`,t.node(e),r),f.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);f.debug(`Copying Edges`,o),o.forEach(i=>{f.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);f.info(`Edge data`,a,r);try{fT(i,r)?(f.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),f.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):f.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){f.error(e)}})}f.debug(`Removing node`,i),t.removeNode(i)})},`copy`),mT=s((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)lT.set(i,e),r=[...r,...mT(i,t)];return r},`extractDescendants`),hT=s((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),gT=s((e,t,n)=>{let r=t.children(e);if(f.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=gT(e,t,n),a=hT(t,n,r);if(r)if(a.length>0)i=r;else return r}return i},`findNonClusterChild`),_T=s(e=>!$.has(e)||!$.get(e).externalConnections?e:$.has(e)?$.get(e).id:e,`getAnchorId`),vT=s((e,t)=>{if(!e||t>10){f.debug(`Opting out, no graph `);return}else f.debug(`Opting in, graph `);e.nodes().forEach(function(t){e.children(t).length>0&&(f.debug(`Cluster identified`,t,` Replacement id in edges: `,gT(t,e,t)),cT.set(t,mT(t,e)),$.set(t,{id:gT(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(f.debug(`Cluster identified`,t,cT),r.forEach(e=>{dT(e.v,t)^dT(e.w,t)&&(f.debug(`Edge: `,e,` leaves cluster `,t),f.debug(`Descendants of XXX `,t,`: `,cT.get(t)),$.get(t).externalConnections=!0)})):f.debug(`Not a cluster `,t,cT)});for(let t of $.keys()){let n=$.get(t).id,r=e.parent(n);r!==t&&$.has(r)&&!$.get(r).externalConnections&&($.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&$.get(t)?.externalConnections&&i&&ST(e,n,t)){let r=CT(e,t,e.parent(n));r&&($.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);f.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),f.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(f.debug(`Fix XXX`,$,`ids:`,t.v,t.w,`Translating: `,$.get(t.v),` --- `,$.get(t.w)),$.get(t.v)||$.get(t.w)){if(f.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=_T(t.v),i=_T(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);$.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);$.get(r).externalConnections=!0,n.toCluster=t.w}f.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),yT(e,0),f.trace($)},`adjustClustersAndEdges`),yT=s((e,t)=>{if(t>10){f.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){f.debug(`Done, no node has children`,e.nodes());return}f.debug(`Nodes = `,n,t);for(let r of n)if(f.debug(`Extracting node`,r,$,$.has(r)&&!$.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!$.has(r))f.debug(`Not a cluster`,r,t);else if(!$.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){f.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;$.get(r)?.clusterData?.dir&&(n=$.get(r).clusterData.dir,f.debug(`Fixing dir`,$.get(r).clusterData.dir,n));let i=new Vw({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});pT(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:$.get(r).clusterData,label:$.get(r).label,graph:i})}else f.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!$.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),f.debug($);n=e.nodes(),f.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);f.debug(` Now next level`,r,n),n?.clusterNode&&yT(n.graph,t+1)}},`extractor`),bT=s((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=bT(e,e.children(t));n=[...n,...r]}),n},`sorter`),xT=s(e=>bT(e,e.children()),`sortNodesByHierarchy`),ST=s((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=$.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),CT=s((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||dT(i,n))continue;let r=gT(i,e,t);if(r&&!ST(e,r,t))return r}return null},`findSafeAnchorNode`);function wT({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??ET;return s(async function(t,s,c,l){let u=s.select(`g`);Cy(u,t.markers,t.type,t.diagramId),TT();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await o(t,d),p=await n(t,d),m={...d,measure:f};r?await r(t,m,p):await DT(t,m,a),await i?.(t,m,p)},`render`)}s(wT,`createCommonLayoutRenderer`);function TT(){Hv(),ry(),Qw(),uT()}s(TT,`clearLayoutRenderState`);async function ET(e,{element:t}){return await sT(t,e)}s(ET,`defaultMeasureLayout`);async function DT(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await OT(i,r,t,n);let a=AT(e.nodes);for(let r of e.edges)jT(r,n)||await MT(i,r,a,e,n,t)}s(DT,`paintLayoutData`);async function OT(e,t,n,r){t.clusterNode?Uv(t):kT(t,n,r)?await Zw(e.clusters,t):Uv(t)}s(OT,`paintLayoutNode`);function kT(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}s(kT,`shouldPaintAsCluster`);function AT(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}s(AT,`buildNodeLookup`);function jT(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}s(jT,`shouldSkipPaintEdge`);async function MT(e,t,n,r,i,a){let o=_y(e.edgePaths,{...t},i.clusterDb??new Map,r.type,NT(t.start,t,n,a,i),NT(t.end,t,n,a,i),r.diagramId,PT(t,i));iy(t)&&(ty.has(t.id)||await oy(e.edgeLabels,t),FT(t,o))}s(MT,`paintLayoutEdge`);function NT(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}s(NT,`getRenderedNode`);function PT(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}s(PT,`shouldSkipIntersect`);function FT(e,t){let n=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:r}=Rv({flowchart:z().flowchart??{}});if(e.label){let i=ty.get(e.id),a=e.x,o=e.y;if(n){let r=Of.calcLabelPosition(n);f.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e?.startLabelLeft){let t=ny.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=ny.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=ny.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=ny.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=Of.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}s(FT,`positionRenderedEdgeLabel`);function IT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}s(IT,`getDefaultExportFromCjs`);var LT={},RT={},zT={},BT;function VT(){if(BT)return zT;BT=1;function e(e){return e==null}s(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}s(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}s(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}s(r,`extend`);function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}s(i,`repeat`);function a(e){return e===0&&1/e==-1/0}return s(a,`isNegativeZero`),zT.isNothing=e,zT.isObject=t,zT.toArray=n,zT.repeat=i,zT.isNegativeZero=a,zT.extend=r,zT}s(VT,`requireCommon`);var HT,UT;function WT(){if(UT)return HT;UT=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
271
+
272
+ `+e.mark.snippet),r+` `+n):r}s(e,`formatError`);function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return s(t,`YAMLException2`),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=s(function(t){return this.name+`: `+e(this,t)},`toString`),HT=t,HT}s(WT,`requireException`);var GT,KT;function qT(){if(KT)return GT;KT=1;let e=VT();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}s(t,`getLine`);function n(t,n){return e.repeat(` `,n-t.length)+t}s(n,`padStart`);function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||=79,typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(r.buffer);)s.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(r.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=t(r.buffer,o[l-a],s[l-a],r.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),d)+` | `+c.str+`
273
+ `+u}let p=t(r.buffer,o[l],s[l],r.position,f);u+=e.repeat(` `,i.indent)+n((r.line+1).toString(),d)+` | `+p.str+`
274
+ `,u+=e.repeat(`-`,i.indent+d+3+p.pos)+`^
275
+ `;for(let a=1;a<=i.linesAfter&&!(l+a>=s.length);a++){let c=t(r.buffer,o[l+a],s[l+a],r.position-(o[l]-o[l+a]),f);u+=e.repeat(` `,i.indent)+n((r.line+a+1).toString(),d)+` | `+c.str+`
276
+ `}return u.replace(/\n$/,``)}return s(r,`makeSnippet`),GT=r,GT}s(qT,`requireSnippet`);var JT,YT;function XT(){if(YT)return JT;YT=1;let e=WT(),t=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],n=[`scalar`,`sequence`,`mapping`];function r(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}s(r,`compileStyleAliases`);function i(i,a){if(a||={},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e(`Unknown option "`+n+`" is met in definition of "`+i+`" YAML type.`)}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(e){return e},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=r(a.styleAliases||null),n.indexOf(this.kind)===-1)throw new e(`Unknown kind "`+this.kind+`" is specified for "`+i+`" YAML type.`)}return s(i,`Type2`),JT=i,JT}s(XT,`requireType`);var ZT,QT;function $T(){if(QT)return ZT;QT=1;let e=WT(),t=XT();function n(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}s(n,`compileList`);function r(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}s(t,`collectType`);for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}s(r,`compileMap`);function i(e){return this.extend(e)}return s(i,`Schema2`),i.prototype.extend=s(function(a){let o=[],s=[];if(a instanceof t)s.push(a);else if(Array.isArray(a))s=s.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(o=o.concat(a.implicit)),a.explicit&&(s=s.concat(a.explicit));else throw new e(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);o.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(n.loadKind&&n.loadKind!==`scalar`)throw new e(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(n.multi)throw new e(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),s.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(o),c.explicit=(this.explicit||[]).concat(s),c.compiledImplicit=n(c,`implicit`),c.compiledExplicit=n(c,`explicit`),c.compiledTypeMap=r(c.compiledImplicit,c.compiledExplicit),c},`extend`),ZT=i,ZT}s($T,`requireSchema`);var eE,tE;function nE(){return tE?eE:(tE=1,eE=new(XT())(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:s(function(e){return e===null?``:e},`construct`)}),eE)}s(nE,`requireStr`);var rE,iE;function aE(){return iE?rE:(iE=1,rE=new(XT())(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:s(function(e){return e===null?[]:e},`construct`)}),rE)}s(aE,`requireSeq`);var oE,sE;function cE(){return sE?oE:(sE=1,oE=new(XT())(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:s(function(e){return e===null?{}:e},`construct`)}),oE)}s(cE,`requireMap`);var lE,uE;function dE(){return uE?lE:(uE=1,lE=new($T())({explicit:[nE(),aE(),cE()]}),lE)}s(dE,`requireFailsafe`);var fE,pE;function mE(){if(pE)return fE;pE=1;let e=XT();function t(e){if(e===null)return!0;let t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}s(t,`resolveYamlNull`);function n(){return null}s(n,`constructYamlNull`);function r(e){return e===null}return s(r,`isNull`),fE=new e(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{canonical:s(function(){return`~`},`canonical`),lowercase:s(function(){return`null`},`lowercase`),uppercase:s(function(){return`NULL`},`uppercase`),camelcase:s(function(){return`Null`},`camelcase`),empty:s(function(){return``},`empty`)},defaultStyle:`lowercase`}),fE}s(mE,`require_null`);var hE,gE;function _E(){if(gE)return hE;gE=1;let e=XT();function t(e){if(e===null)return!1;let t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}s(t,`resolveYamlBoolean`);function n(e){return e===`true`||e===`True`||e===`TRUE`}s(n,`constructYamlBoolean`);function r(e){return Object.prototype.toString.call(e)===`[object Boolean]`}return s(r,`isBoolean`),hE=new e(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{lowercase:s(function(e){return e?`true`:`false`},`lowercase`),uppercase:s(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:s(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`}),hE}s(_E,`requireBool`);var vE,yE;function bE(){if(yE)return vE;yE=1;let e=VT(),t=XT();function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}s(n,`isHexCode`);function r(e){return e>=48&&e<=55}s(r,`isOctCode`);function i(e){return e>=48&&e<=57}s(i,`isDecCode`);function a(e){if(e===null)return!1;let t=e.length,a=0,s=!1;if(!t)return!1;let c=e[a];if((c===`-`||c===`+`)&&(c=e[++a]),c===`0`){if(a+1===t)return!0;if(c=e[++a],c===`b`){for(a++;a<t;a++){if(c=e[a],c!==`0`&&c!==`1`)return!1;s=!0}return s&&isFinite(o(e))}if(c===`x`){for(a++;a<t;a++){if(!n(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}if(c===`o`){for(a++;a<t;a++){if(!r(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}}for(;a<t;a++){if(!i(e.charCodeAt(a)))return!1;s=!0}return s?isFinite(o(e)):!1}s(a,`resolveYamlInteger`);function o(e){let t=e,n=1,r=t[0];if((r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}s(o,`parseYamlInteger`);function c(e){return o(e)}s(c,`constructYamlInteger`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&t%1==0&&!e.isNegativeZero(t)}return s(l,`isInteger`),vE=new t(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:a,construct:c,predicate:l,represent:{binary:s(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:s(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:s(function(e){return e.toString(10)},`decimal`),hexadecimal:s(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),vE}s(bE,`requireInt`);var xE,SE;function CE(){if(SE)return xE;SE=1;let e=VT(),t=XT(),n=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),r=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function i(e){return e===null||!n.test(e)?!1:isFinite(parseFloat(e,10))?!0:r.test(e)}s(i,`resolveYamlFloat`);function a(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}s(a,`constructYamlFloat`);let o=/^[-+]?[0-9]+e/;function c(t,n){if(isNaN(t))switch(n){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(t===1/0)switch(n){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(t===-1/0)switch(n){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(e.isNegativeZero(t))return`-0.0`;let r=t.toString(10);return o.test(r)?r.replace(`e`,`.e`):r}s(c,`representYamlFloat`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&(t%1!=0||e.isNegativeZero(t))}return s(l,`isFloat`),xE=new t(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:i,construct:a,predicate:l,represent:c,defaultStyle:`lowercase`}),xE}s(CE,`requireFloat`);var wE,TE;function EE(){return TE?wE:(TE=1,wE=dE().extend({implicit:[mE(),_E(),bE(),CE()]}),wE)}s(EE,`requireJson`);var DE,OE;function kE(){return OE?DE:(OE=1,DE=EE(),DE)}s(kE,`requireCore`);var AE,jE;function ME(){if(jE)return AE;jE=1;let e=XT(),t=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),n=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function r(e){return e===null?!1:t.exec(e)!==null||n.exec(e)!==null}s(r,`resolveYamlTimestamp`);function i(e){let r=0,i=null,a=t.exec(e);if(a===null&&(a=n.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,c=+a[3];if(!a[4])return new Date(Date.UTC(o,s,c));let l=+a[4],u=+a[5],d=+a[6];if(a[7]){for(r=a[7].slice(0,3);r.length<3;)r+=`0`;r=+r}if(a[9]){let e=+a[10],t=+(a[11]||0);i=(e*60+t)*6e4,a[9]===`-`&&(i=-i)}let f=new Date(Date.UTC(o,s,c,l,u,d,r));return i&&f.setTime(f.getTime()-i),f}s(i,`constructYamlTimestamp`);function a(e){return e.toISOString()}return s(a,`representYamlTimestamp`),AE=new e(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:r,construct:i,instanceOf:Date,represent:a}),AE}s(ME,`requireTimestamp`);var NE,PE;function FE(){if(PE)return NE;PE=1;let e=XT();function t(e){return e===`<<`||e===null}return s(t,`resolveYamlMerge`),NE=new e(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:t}),NE}s(FE,`requireMerge`);var IE,LE;function RE(){if(LE)return IE;LE=1;let e=XT();function t(e){if(e===null)return!1;let t=0,n=e.length;for(let r=0;r<n;r++){let n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
+ \r`.indexOf(e.charAt(r));if(!(n>64)){if(n<0)return!1;t+=6}}return t%8==0}s(t,`resolveYamlBinary`);function n(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,r=0,i=[];for(let e=0;e<n;e++)e%4==0&&e&&(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)),r=r<<6|`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
278
+ \r`.indexOf(t.charAt(e));let a=n%4*6;return a===0?(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)):a===18?(i.push(r>>10&255),i.push(r>>2&255)):a===12&&i.push(r>>4&255),new Uint8Array(i)}s(n,`constructYamlBinary`);function r(e){let t=``,n=0,r=e.length,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
279
+ \r`;for(let a=0;a<r;a++)a%3==0&&a&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[a];let a=r%3;return a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}s(r,`representYamlBinary`);function i(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}return s(i,`isBinary`),IE=new e(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:t,construct:n,predicate:i,represent:r}),IE}s(RE,`requireBinary`);var zE,BE;function VE(){if(BE)return zE;BE=1;let e=XT(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(e===null)return!0;let r=[],i=e;for(let e=0,a=i.length;e<a;e+=1){let a=i[e],o=!1;if(n.call(a)!==`[object Object]`)return!1;let s;for(s in a)if(t.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(r.indexOf(s)===-1)r.push(s);else return!1}return!0}s(r,`resolveYamlOmap`);function i(e){return e===null?[]:e}return s(i,`constructYamlOmap`),zE=new e(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:r,construct:i}),zE}s(VE,`requireOmap`);var HE,UE;function WE(){if(UE)return HE;UE=1;let e=XT(),t=Object.prototype.toString;function n(e){if(e===null)return!0;let n=e,r=Array(n.length);for(let e=0,i=n.length;e<i;e+=1){let i=n[e];if(t.call(i)!==`[object Object]`)return!1;let a=Object.keys(i);if(a.length!==1)return!1;r[e]=[a[0],i[a[0]]]}return!0}s(n,`resolveYamlPairs`);function r(e){if(e===null)return[];let t=e,n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1){let r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}return s(r,`constructYamlPairs`),HE=new e(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:n,construct:r}),HE}s(WE,`requirePairs`);var GE,KE;function qE(){if(KE)return GE;KE=1;let e=XT(),t=Object.prototype.hasOwnProperty;function n(e){if(e===null)return!0;let n=e;for(let e in n)if(t.call(n,e)&&n[e]!==null)return!1;return!0}s(n,`resolveYamlSet`);function r(e){return e===null?{}:e}return s(r,`constructYamlSet`),GE=new e(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:n,construct:r}),GE}s(qE,`requireSet`);var JE,YE;function XE(){return YE?JE:(YE=1,JE=kE().extend({implicit:[ME(),FE()],explicit:[RE(),VE(),WE(),qE()]}),JE)}s(XE,`require_default`);var ZE;function QE(){if(ZE)return RT;ZE=1;let e=VT(),t=WT(),n=qT(),r=XE(),i=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=/[\x85\u2028\u2029]/,c=/[,\[\]{}]/,l=/^(?:!|!!|![0-9A-Za-z-]+!)$/,u=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}s(d,`_class`);function f(e){return e===10||e===13}s(f,`isEol`);function p(e){return e===9||e===32}s(p,`isWhiteSpace`);function m(e){return e===9||e===32||e===10||e===13}s(m,`isWsOrEol`);function h(e){return e===44||e===91||e===93||e===123||e===125}s(h,`isFlowIndicator`);function g(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}s(g,`fromHexCode`);function _(e){return e===120?2:e===117?4:e===85?8:0}s(_,`escapedHexLen`);function v(e){return e>=48&&e<=57?e-48:-1}s(v,`fromDecimalCode`);function y(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`
280
+ `;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`…`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}s(y,`simpleEscapeSequence`);function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}s(b,`charFromCodepoint`);function x(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}s(x,`setProperty`);let S=Array(256),C=Array(256);for(let e=0;e<256;e++)S[e]=+!!y(e),C[e]=y(e);function w(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys==`number`?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}s(w,`State`);function T(e,r){let i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}s(T,`generateError`);function E(e,t){throw T(e,t)}s(E,`throwError`);function D(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}s(D,`throwWarning`);function O(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];i.call(n,t)||(n[t]={existed:i.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}s(O,`storeAnchor`);function ee(e){e.anchorMapTransactions.push(Object.create(null))}s(ee,`beginAnchorTransaction`);function k(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],a=Object.keys(t);for(let e=0,n=a.length;e<n;e+=1){let n=a[e];i.call(r,n)||(r[n]=t[n])}}s(k,`commitAnchorTransaction`);function te(e){let t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}s(te,`rollbackAnchorTransaction`);function A(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}s(A,`snapshotState`);function j(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}s(j,`restoreState`);let M={YAML:s(function(e,t,n){e.version!==null&&E(e,`duplication of %YAML directive`),n.length!==1&&E(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&E(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&E(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&D(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:s(function(e,t,n){let r;n.length!==2&&E(e,`TAG directive accepts exactly two arguments`);let a=n[0];r=n[1],l.test(a)||E(e,`ill-formed tag handle (first argument) of the TAG directive`),i.call(e.tagMap,a)&&E(e,`there is a previously declared suffix for "`+a+`" tag handle`),u.test(r)||E(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{E(e,`tag prefix is malformed: `+r)}e.tagMap[a]=r},`handleTagDirective`)};function ne(e,t,n,r){if(t<n){let i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){let n=i.charCodeAt(t);n===9||n>=32&&n<=1114111||E(e,`expected valid JSON character`)}else a.test(i)&&E(e,`the stream contains non-printable characters`);e.result+=i}}s(ne,`captureSegment`);function N(t,n,r,a){e.isObject(r)||E(t,`cannot merge mappings; the provided source object is unacceptable`);let o=Object.keys(r);for(let e=0,s=o.length;e<s;e+=1){let s=o[e];t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&E(t,`merge keys exceeded maxTotalMergeKeys (`+t.maxTotalMergeKeys+`)`),i.call(n,s)||(x(n,s,r[s]),a[s]=!0)}}s(N,`mergeMappings`);function re(e,t,n,r,a,o,s,c,l){if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(let t=0,n=a.length;t<n;t+=1)Array.isArray(a[t])&&E(e,`nested arrays are not supported inside keys`),typeof a==`object`&&d(a[t])===`[object Object]`&&(a[t]=`[object Object]`)}if(typeof a==`object`&&d(a)===`[object Object]`&&(a=`[object Object]`),a=String(a),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(o))for(let r=0,i=o.length;r<i;r+=1)N(e,t,o[r],n);else N(e,t,o,n);else !e.json&&!i.call(n,a)&&i.call(t,a)&&(e.line=s||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,E(e,`duplicated mapping key`)),x(t,a,o),delete n[a];return t}s(re,`storeMappingPair`);function ie(e){let t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):E(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}s(ie,`readLineBreak`);function P(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;i!==0;){for(;p(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(f(i))for(ie(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&D(e,`deficient indentation`),r}s(P,`skipSeparationSpace`);function ae(e){let t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||m(n)))}s(ae,`testDocumentSeparator`);function oe(t,n){n===1?t.result+=` `:n>1&&(t.result+=e.repeat(`
281
+ `,n-1))}s(oe,`writeFoldedLines`);function se(e,t,n){let r,i,a,o,s,c,l=e.kind,u=e.result,d=e.input.charCodeAt(e.position);if(m(d)||h(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96)return!1;if(d===63||d===45){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;d!==0;){if(d===58){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))break}else if(d===35){if(m(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&ae(e)||n&&h(d))break;else if(f(d))if(o=e.line,s=e.lineStart,c=e.lineIndent,P(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=i,e.line=o,e.lineStart=s,e.lineIndent=c;break}a&&=(ne(e,r,i,!1),oe(e,e.line-o),r=i=e.position,!1),p(d)||(i=e.position+1),d=e.input.charCodeAt(++e.position)}return ne(e,r,i,!1),e.result?!0:(e.kind=l,e.result=u,!1)}s(se,`readPlainScalar`);function ce(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(ne(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else f(i)?(ne(e,n,r,!0),oe(e,P(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ae(e)?E(e,`unexpected end of the document within a single quoted scalar`):(e.position++,p(i)||(r=e.position));E(e,`unexpected end of the stream within a single quoted scalar`)}s(ce,`readSingleQuotedScalar`);function le(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return ne(e,n,e.position,!0),e.position++,!0;else if(a===92){if(ne(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),f(a))P(e,!1,t);else if(a<256&&S[a])e.result+=C[a],e.position++;else if((i=_(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=g(a))>=0?n=(n<<4)+i:E(e,`expected hexadecimal character`);e.result+=b(n),e.position++}else E(e,`unknown escape sequence`);n=r=e.position}else f(a)?(ne(e,n,r,!0),oe(e,P(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ae(e)?E(e,`unexpected end of the document within a double quoted scalar`):(e.position++,p(a)||(r=e.position));E(e,`unexpected end of the stream within a double quoted scalar`)}s(le,`readDoubleQuotedScalar`);function ue(e,t){let n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)l=93,f=!1,s=[];else if(v===123)l=125,f=!0,s={};else return!1;for(e.anchor!==null&&O(e,e.anchor,s),v=e.input.charCodeAt(++e.position);v!==0;){if(P(e,!0,t),v=e.input.charCodeAt(e.position),v===l)return e.position++,e.tag=o,e.anchor=c,e.kind=f?`mapping`:`sequence`,e.result=s,!0;n?v===44&&E(e,`expected the node content, but found ','`):E(e,`missed comma between flow collection entries`),g=h=_=null,u=d=!1,v===63&&m(e.input.charCodeAt(e.position+1))&&(u=d=!0,e.position++,P(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,F(e,t,1,!1,!0),g=e.tag,h=e.result,P(e,!0,t),v=e.input.charCodeAt(e.position),(d||e.line===r)&&v===58&&(u=!0,v=e.input.charCodeAt(++e.position),P(e,!0,t),F(e,t,1,!1,!0),_=e.result),f?re(e,s,p,g,h,_,r,i,a):u?s.push(re(e,null,p,g,h,_,r,i,a)):s.push(h),P(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}E(e,`unexpected end of the stream within a flow collection`)}s(ue,`readFlowCollection`);function de(t,n){let r,i=1,a=!1,o=!1,s=n,c=0,l=!1,u,d=t.input.charCodeAt(t.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(t.kind=`scalar`,t.result=``;d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)i===1?i=d===43?3:2:E(t,`repeat of a chomping mode identifier`);else if((u=v(d))>=0)u===0?E(t,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?E(t,`repeat of an indentation width identifier`):(s=n+u-1,o=!0);else break;if(p(d)){do d=t.input.charCodeAt(++t.position);while(p(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!f(d)&&d!==0)}for(;d!==0;){for(ie(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!o||t.lineIndent<s)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>s&&(s=t.lineIndent),f(d)){c++;continue}if(!o&&s===0&&E(t,`missing indentation for block scalar`),t.lineIndent<s){i===3?t.result+=e.repeat(`
282
+ `,a?1+c:c):i===1&&a&&(t.result+=`
283
+ `);break}r?p(d)?(l=!0,t.result+=e.repeat(`
284
+ `,a?1+c:c)):l?(l=!1,t.result+=e.repeat(`
285
+ `,c+1)):c===0?a&&(t.result+=` `):t.result+=e.repeat(`
286
+ `,c):t.result+=e.repeat(`
287
+ `,a?1+c:c),a=!0,o=!0,c=0;let n=t.position;for(;!f(d)&&d!==0;)d=t.input.charCodeAt(++t.position);ne(t,n,t.position,!1)}return!0}s(de,`readBlockScalar`);function fe(e,t){let n=e.tag,r=e.anchor,i=[],a=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;o!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,E(e,`tab characters must not be used in indentation`)),!(o!==45||!m(e.input.charCodeAt(e.position+1))));){if(a=!0,e.position++,P(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}let n=e.line;if(F(e,t,3,!1,!0),i.push(e.result),P(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&o!==0)E(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=r,e.kind=`sequence`,e.result=i,!0):!1}s(fe,`readBlockSequence`);function pe(e,t,n){let r,i,a,o,s=e.tag,c=e.anchor,l={},u=Object.create(null),d=null,f=null,h=null,g=!1,_=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&O(e,e.anchor,l);let v=e.input.charCodeAt(e.position);for(;v!==0;){!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,E(e,`tab characters must not be used in indentation`));let y=e.input.charCodeAt(e.position+1),b=e.line;if((v===63||v===58)&&m(y))v===63?(g&&(re(e,l,u,d,f,null,i,a,o),d=f=h=null),_=!0,g=!0,r=!0):g?(g=!1,r=!0):E(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=y;else{if(i=e.line,a=e.lineStart,o=e.position,!F(e,n,2,!1,!0))break;if(e.line===b){for(v=e.input.charCodeAt(e.position);p(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),m(v)||E(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(re(e,l,u,d,f,null,i,a,o),d=f=h=null),_=!0,g=!1,r=!1,d=e.tag,f=e.result;else if(_)E(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=s,e.anchor=c,!0}else if(_)E(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=s,e.anchor=c,!0}if((e.line===b||e.lineIndent>t)&&(g&&(i=e.line,a=e.lineStart,o=e.position),F(e,t,4,!0,r)&&(g?f=e.result:h=e.result),g||(re(e,l,u,d,f,h,i,a,o),d=f=h=null),P(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===b||e.lineIndent>t)&&v!==0)E(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&re(e,l,u,d,f,null,i,a,o),_&&(e.tag=s,e.anchor=c,e.kind=`mapping`,e.result=l),_}s(pe,`readBlockMapping`);function me(e){let t=!1,n=!1,r,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;e.tag!==null&&E(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(n=!0,r=`!!`,o=e.input.charCodeAt(++e.position)):r=`!`;let s=e.position;if(t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(s,e.position),o=e.input.charCodeAt(++e.position)):E(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!m(o);)o===33&&(n?E(e,`tag suffix cannot contain exclamation marks`):(r=e.input.slice(s-1,e.position+1),l.test(r)||E(e,`named tag handle cannot contain such characters`),n=!0,s=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(s,e.position),c.test(a)&&E(e,`tag suffix cannot contain flow indicator characters`)}a&&!u.test(a)&&E(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{E(e,`tag name is malformed: `+a)}return t?e.tag=a:i.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r===`!`?e.tag=`!`+a:r===`!!`?e.tag=`tag:yaml.org,2002:`+a:E(e,`undeclared tag handle "`+r+`"`),!0}s(me,`readTagProperty`);function he(e){let t=e.input.charCodeAt(e.position);if(t!==38)return!1;e.anchor!==null&&E(e,`duplication of an anchor property`),t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!m(t)&&!h(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&E(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(n,e.position),!0}s(he,`readAnchorProperty`);function ge(e){let t=e.input.charCodeAt(e.position);if(t!==42)return!1;t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!m(t)&&!h(t);)t=e.input.charCodeAt(++e.position);e.position===n&&E(e,`name of an alias node must contain at least one character`);let r=e.input.slice(n,e.position);return i.call(e.anchorMap,r)||E(e,`unidentified alias "`+r+`"`),e.result=e.anchorMap[r],P(e,!0,-1),!0}s(ge,`readAlias`);function _e(e,t,n,r){let i=A(e);return ee(e),j(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,pe(e,n,r)&&e.kind===`mapping`?(k(e),!0):(te(e),j(e,i),!1)}s(_e,`tryReadBlockMappingFromProperty`);function F(e,t,n,r,a){let o,s,c=1,l=!1,u=!1,d=null,f,p,m;e.depth>=e.maxDepth&&E(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let h=o=s=n===4||n===3;if(r&&P(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;;){let n=e.input.charCodeAt(e.position),r=A(e);if(l&&(n===33&&e.tag!==null||n===38&&e.anchor!==null)||!me(e)&&!he(e))break;d===null&&(d=r),P(e,!0,-1)?(l=!0,s=h,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1}if(s&&=l||a,c===1||n===4)if(p=n===1||n===2?t:t+1,m=e.position-e.lineStart,c===1)if(s&&(fe(e,m)||pe(e,m,p))||ue(e,p))u=!0;else{let t=e.input.charCodeAt(e.position);d!==null&&h&&!s&&t!==124&&t!==62&&_e(e,d,d.position-d.lineStart,p)||o&&de(e,p)||ce(e,p)||le(e,p)?u=!0:ge(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&E(e,`alias node should not have any properties`)):se(e,p,n===1)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&O(e,e.anchor,e.result)}else c===0&&(u=s&&fe(e,m));if(e.tag===null)e.anchor!==null&&O(e,e.anchor,e.result);else if(e.tag===`?`){e.result!==null&&e.kind!==`scalar`&&E(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t<n;t+=1)if(f=e.implicitTypes[t],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&O(e,e.anchor,e.result);break}}else if(e.tag!==`!`){if(i.call(e.typeMap[e.kind||`fallback`],e.tag))f=e.typeMap[e.kind||`fallback`][e.tag];else{f=null;let t=e.typeMap.multi[e.kind||`fallback`];for(let n=0,r=t.length;n<r;n+=1)if(e.tag.slice(0,t[n].tag.length)===t[n].tag){f=t[n];break}}f||E(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&f.kind!==e.kind&&E(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+f.kind+`", not "`+e.kind+`"`),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&O(e,e.anchor,e.result)):E(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||u}s(F,`composeNode`);function ve(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(P(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);let a=e.input.slice(t,e.position),o=[];for(a.length<1&&E(e,`directive name must not be less than one character in length`);r!==0;){for(;p(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!f(r));break}if(f(r))break;for(t=e.position;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}r!==0&&ie(e),i.call(M,a)?M[a](e,a,o):D(e,`unknown document directive "`+a+`"`)}if(P(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,P(e,!0,-1)):n&&E(e,`directives end mark is expected`),F(e,e.lineIndent-1,4,!1,!0),P(e,!0,-1),e.checkLineBreaks&&o.test(e.input.slice(t,e.position))&&D(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&ae(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,P(e,!0,-1));return}e.position<e.length-1&&E(e,`end of the stream or a document separator is expected`)}s(ve,`readDocument`);function ye(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
288
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));let n=new w(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,E(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)ve(n);return n.documents}s(ye,`loadDocuments`);function be(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);let r=ye(e,n);if(typeof t!=`function`)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])}s(be,`loadAll2`);function xe(e,n){let r=ye(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new t(`expected a single document in the stream, but found more`)}}return s(xe,`load2`),RT.loadAll=be,RT.load=xe,RT}s(QE,`requireLoader`);var $E={},eD;function tD(){if(eD)return $E;eD=1;let e=VT(),t=WT(),n=XE(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=65279,o={};o[0]=`\\0`,o[7]=`\\a`,o[8]=`\\b`,o[9]=`\\t`,o[10]=`\\n`,o[11]=`\\v`,o[12]=`\\f`,o[13]=`\\r`,o[27]=`\\e`,o[34]=`\\"`,o[92]=`\\\\`,o[133]=`\\N`,o[160]=`\\_`,o[8232]=`\\L`,o[8233]=`\\P`;let c=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],l=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function u(e,t){if(t===null)return{};let n={},r=Object.keys(t);for(let a=0,o=r.length;a<o;a+=1){let o=r[a],s=String(t[o]);o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2));let c=e.compiledTypeMap.fallback[o];c&&i.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s}return n}s(u,`compileStyleMap`);function d(n){let r,i,a=n.toString(16).toUpperCase();if(n<=255)r=`x`,i=2;else if(n<=65535)r=`u`,i=4;else if(n<=4294967295)r=`U`,i=8;else throw new t(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+r+e.repeat(`0`,i-a.length)+a}s(d,`encodeHex`);function f(t){this.schema=t.schema||n,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=u(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType===`"`?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer==`function`?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}s(f,`State`);function p(t,n){let r=e.repeat(` `,n),i=0,a=``,o=t.length;for(;i<o;){let e,n=t.indexOf(`
289
+ `,i);n===-1?(e=t.slice(i),i=o):(e=t.slice(i,n+1),i=n+1),e.length&&e!==`
290
+ `&&(a+=r),a+=e}return a}s(p,`indentString`);function m(t,n){return`
291
+ `+e.repeat(` `,t.indent*n)}s(m,`generateNextLine`);function h(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}s(h,`testImplicitResolving`);function g(e){return e===32||e===9}s(g,`isWhitespace`);function _(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==a||e>=65536&&e<=1114111}s(_,`isPrintable`);function v(e){return _(e)&&e!==a&&e!==13&&e!==10}s(v,`isNsCharOrWhitespace`);function y(e,t,n){let r=v(e),i=r&&!g(e);return(n?r:r&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!i)||v(t)&&!g(t)&&e===35||t===58&&i}s(y,`isPlainSafe`);function b(e){return _(e)&&e!==a&&!g(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}s(b,`isPlainSafeFirst`);function x(e){return!g(e)&&e!==58}s(x,`isPlainSafeLast`);function S(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}s(S,`codePointAt`);function C(e){return/^\n* /.test(e)}s(C,`needIndentIndicator`);function w(e,t,n,r,i,a,o,s){let c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=b(S(e,0))&&x(S(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=S(e,c),!_(l))return 5;h&&=y(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=S(e,c),l===10)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!_(l))return 5;h&&=y(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?1:a===2?5:2:n>9&&C(e)?5:o?a===2?5:2:f?4:3}s(w,`chooseScalarStyle`);function T(e,n,r,i,a){e.dump=(function(){if(n.length===0)return e.quotingType===2?`""`:`''`;if(!e.noCompatMode&&(c.indexOf(n)!==-1||l.test(n)))return e.quotingType===2?`"`+n+`"`:`'`+n+`'`;let o=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),d=i||e.flowLevel>-1&&r>=e.flowLevel;function f(t){return h(e,t)}switch(s(f,`testAmbiguity`),w(n,d,e.indent,u,f,e.quotingType,e.forceQuotes&&!i,a)){case 1:return n;case 2:return`'`+n.replace(/'/g,`''`)+`'`;case 3:return`|`+E(n,e.indent)+D(p(n,o));case 4:return`>`+E(n,e.indent)+D(p(O(n,u),o));case 5:return`"`+k(n)+`"`;default:throw new t(`impossible error: invalid scalar style`)}})()}s(T,`writeScalar`);function E(e,t){let n=C(e)?String(t):``,r=e[e.length-1]===`
292
+ `;return n+(r&&(e[e.length-2]===`
293
+ `||e===`
294
+ `)?`+`:r?``:`-`)+`
295
+ `}s(E,`blockHeader`);function D(e){return e[e.length-1]===`
296
+ `?e.slice(0,-1):e}s(D,`dropEndingNewline`);function O(e,t){let n=/(\n+)([^\n]*)/g,r=(function(){let r=e.indexOf(`
297
+ `);return r=r===-1?e.length:r,n.lastIndex=r,ee(e.slice(0,r),t)})(),i=e[0]===`
298
+ `||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?`
299
+ `:``)+ee(n,t),i=a}return r}s(O,`foldString`);function ee(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
300
+ `+e.slice(i,a),i=a+1),o=s;return c+=`
301
+ `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
302
+ `+e.slice(o+1):c+=e.slice(i),c.slice(1)}s(ee,`foldLine`);function k(e){let t=``,n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=S(e,r);let i=o[n];!i&&_(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||d(n)}return t}s(k,`escapeString`);function te(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i<a;i+=1){let a=n[i];e.replacer&&(a=e.replacer.call(n,String(i),a)),(N(e,t,a,!1,!1)||a===void 0&&N(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump)}e.tag=i,e.dump=`[`+r+`]`}s(te,`writeFlowSequence`);function A(e,t,n,r){let i=``,a=e.tag;for(let a=0,o=n.length;a<o;a+=1){let o=n[a];e.replacer&&(o=e.replacer.call(n,String(a),o)),(N(e,t+1,o,!0,!0,!1,!0)||o===void 0&&N(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=m(e,t)),e.dump&&e.dump.charCodeAt(0)===10?i+=`-`:i+=`- `,i+=e.dump)}e.tag=a,e.dump=i||`[]`}s(A,`writeBlockSequence`);function j(e,t,n){let r=``,i=e.tag,a=Object.keys(n);for(let i=0,o=a.length;i<o;i+=1){let o=``;r!==``&&(o+=`, `),e.condenseFlow&&(o+=`"`);let s=a[i],c=n[s];e.replacer&&(c=e.replacer.call(n,s,c)),N(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),N(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}s(j,`writeFlowMapping`);function M(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t<o;t+=1){let o=``;(!i||a!==``)&&(o+=m(e,n));let c=s[t],l=r[c];if(e.replacer&&(l=e.replacer.call(r,c,l)),!N(e,n+1,c,!0,!0,!0))continue;let u=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024;u&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,u&&(o+=m(e,n)),N(e,n+1,l,!0,u)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}s(M,`writeBlockMapping`);function ne(e,n,a){let o=a?e.explicitTypes:e.implicitTypes;for(let s=0,c=o.length;s<c;s+=1){let c=o[s];if((c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n==`object`&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(a?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag=`?`,c.represent){let a=e.styleMap[c.tag]||c.defaultStyle,o;if(r.call(c.represent)===`[object Function]`)o=c.represent(n,a);else if(i.call(c.represent,a))o=c.represent[a](n,a);else throw new t(`!<`+c.tag+`> tag resolver accepts not "`+a+`" style`);e.dump=o}return!0}}return!1}s(ne,`detectType`);function N(e,n,i,a,o,s,c){e.tag=null,e.dump=i,ne(e,i,!1)||ne(e,i,!0);let l=r.call(e.dump),u=a;a&&=e.flowLevel<0||e.flowLevel>n;let d=l===`[object Object]`||l===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(i),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&n>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l===`[object Object]`)a&&Object.keys(e.dump).length!==0?(M(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(j(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!c&&n>0?A(e,n-1,e.dump,o):A(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(te(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object String]`)e.tag!==`?`&&T(e,e.dump,n,s,u);else if(l===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+l)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}s(N,`writeNode`);function re(e,t){let n=[],r=[];ie(e,n,r);let i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=Array(i)}s(re,`getDuplicateReferences`);function ie(e,t,n){if(typeof e==`object`&&e){let r=t.indexOf(e);if(r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)ie(e[r],t,n);else{let r=Object.keys(e);for(let i=0,a=r.length;i<a;i+=1)ie(e[r[i]],t,n)}}}s(ie,`inspectNode`);function P(e,t){t||={};let n=new f(t);n.noRefs||re(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),N(n,0,r,!0,!0)?n.dump+`
303
+ `:``}return s(P,`dump2`),$E.dump=P,$E}s(tD,`requireDumper`);var nD;function rD(){if(nD)return LT;nD=1;let e=QE(),t=tD();function n(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}return s(n,`renamed`),LT.Type=XT(),LT.Schema=$T(),LT.FAILSAFE_SCHEMA=dE(),LT.JSON_SCHEMA=EE(),LT.CORE_SCHEMA=kE(),LT.DEFAULT_SCHEMA=XE(),LT.load=e.load,LT.loadAll=e.loadAll,LT.dump=t.dump,LT.YAMLException=WT(),LT.types={binary:RE(),float:CE(),map:cE(),null:mE(),pairs:WE(),set:qE(),timestamp:ME(),bool:_E(),int:bE(),merge:FE(),omap:VE(),seq:aE(),str:nE()},LT.safeLoad=n(`safeLoad`,`load`),LT.safeLoadAll=n(`safeLoadAll`,`loadAll`),LT.safeDump=n(`safeDump`,`dump`),LT}s(rD,`requireJsYaml`);var{Type:iD,Schema:aD,FAILSAFE_SCHEMA:oD,JSON_SCHEMA:sD,CORE_SCHEMA:cD,DEFAULT_SCHEMA:lD,load:uD,loadAll:dD,dump:fD,YAMLException:pD,types:mD,safeLoad:hD,safeLoadAll:gD,safeDump:_D}=IT(rD()),vD=`comm`,yD=`rule`,bD=`decl`,xD=`@import`,SD=`@namespace`,CD=`@keyframes`,wD=`@layer`,TD=Math.abs,ED=String.fromCharCode;function DD(e){return e.trim()}function OD(e,t,n){return e.replace(t,n)}function kD(e,t,n){return e.indexOf(t,n)}function AD(e,t){return e.charCodeAt(t)|0}function jD(e,t,n){return e.slice(t,n)}function MD(e){return e.length}function ND(e){return e.length}function PD(e,t){return t.push(e),e}var FD=1,ID=1,LD=0,RD=0,zD=0,BD=``;function VD(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:FD,column:ID,length:o,return:``,siblings:s}}function HD(){return zD}function UD(){return zD=RD>0?AD(BD,--RD):0,ID--,zD===10&&(ID=1,FD--),zD}function WD(){return zD=RD<LD?AD(BD,RD++):0,ID++,zD===10&&(ID=1,FD++),zD}function GD(){return AD(BD,RD)}function KD(){return RD}function qD(e,t){return jD(BD,e,t)}function JD(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YD(e){return FD=ID=1,LD=MD(BD=e),RD=0,[]}function XD(e){return BD=``,e}function ZD(e){return DD(qD(RD-1,eO(e===91?e+2:e===40?e+1:e)))}function QD(e){for(;(zD=GD())&&zD<33;)WD();return JD(e)>2||JD(zD)>3?``:` `}function $D(e,t){for(;--t&&WD()&&!(zD<48||zD>102||zD>57&&zD<65||zD>70&&zD<97););return qD(e,KD()+(t<6&&GD()==32&&WD()==32))}function eO(e){for(;WD();)switch(zD){case e:return RD;case 34:case 39:e!==34&&e!==39&&eO(zD);break;case 40:e===41&&eO(e);break;case 92:WD();break}return RD}function tO(e,t){for(;WD()&&e+zD!==57&&!(e+zD===84&&GD()===47););return`/*`+qD(t,RD-1)+`*`+ED(e===47?e:WD())}function nO(e){for(;!JD(GD());)WD();return qD(e,RD)}function rO(e){return XD(iO(``,null,null,null,[``],e=YD(e),0,[0],e))}function iO(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=WD()){case 40:if(m!=108&&AD(C,d-1)==58){kD(C+=OD(ZD(v),`&`,`&\f`),`&\f`,TD(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=ZD(v);break;case 9:case 10:case 13:case 32:C+=QD(m);break;case 92:C+=$D(KD()-1,7);continue;case 47:switch(GD()){case 42:case 47:PD(oO(tO(WD(),KD()),t,n,c),c),(JD(m||1)==5||JD(GD()||1)==5)&&MD(C)&&jD(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=MD(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=OD(C,/\f/g,``)),p>0&&(MD(C)-d||h===0&&m===47)&&PD(p>32?sO(C+`;`,r,n,d-1,c):sO(OD(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(PD(S=aO(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)iO(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(AD(C,3)===110)break;case 108:if(AD(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?iO(e,S,S,r&&PD(aO(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):iO(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+MD(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&UD()==125)continue}switch(C+=ED(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(MD(C)-1)*_,_=1;break;case 64:GD()===45&&(C+=ZD(WD())),f=GD(),u=d=MD(y=C+=nO(KD())),v++;break;case 45:m===45&&MD(C)==2&&(h=0)}}return a}function aO(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=ND(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=jD(e,f+1,f=TD(g=o[h])),b=e;v<m;++v)(b=DD(g>0?p[v]+` `+y:OD(y,/&\f/g,p[v])))&&(c[_++]=b);return VD(e,t,n,i===0?yD:s,c,l,u,d)}function oO(e,t,n,r){return VD(e,t,n,vD,ED(HD()),jD(e,2,-2),0,r)}function sO(e,t,n,r,i){return VD(e,t,n,bD,jD(e,0,r),jD(e,r+1,-1),r,i)}function cO(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function lO(e,t,n,r){switch(e.type){case wD:if(e.children.length)break;case xD:case SD:case bD:return e.return=e.return||e.value;case vD:return``;case CD:return e.return=e.value+`{`+cO(e.children,r)+`}`;case yD:if(!MD(e.value=e.props.join(`,`)))return``}return MD(n=cO(e.children,r))?e.return=e.value+`{`+n+`}`:``}function uO(e){var t=ND(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var dO=`c4`,fO={id:dO,detector:s(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./c4Diagram-UCG6FXSJ-Dk_ieq2X.js`);return{diagram:e}},__vite__mapDeps([7,8]),import.meta.url);return{id:dO,diagram:e}},`loader`)},pO=`flowchart`,mO={id:pO,detector:s((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./flowDiagram-A5DVABFB-BBKL0x3P.js`);return{diagram:e}},__vite__mapDeps([9,8,10,11,12,13,14]),import.meta.url);return{id:pO,diagram:e}},`loader`)},hO=`flowchart-v2`,gO={id:hO,detector:s((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./flowDiagram-A5DVABFB-BBKL0x3P.js`);return{diagram:e}},__vite__mapDeps([9,8,10,11,12,13,14]),import.meta.url);return{id:hO,diagram:e}},`loader`)},_O=`swimlane`,vO={id:_O,detector:s(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js`);return{diagram:e}},__vite__mapDeps([15,8,10,11,12,13,14]),import.meta.url);return{id:_O,diagram:e}},`loader`)},yO=`er`,bO={id:yO,detector:s(e=>/^\s*erDiagram/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./erDiagram-SSCWMZ5O-EAGqqR79.js`);return{diagram:e}},__vite__mapDeps([16,12,10,14]),import.meta.url);return{id:yO,diagram:e}},`loader`)},xO=`gitGraph`,SO={id:xO,detector:s(e=>/^\s*gitGraph/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-B6g4dtDi.js`);return{diagram:e}},__vite__mapDeps([17,18,1,2,19,20]),import.meta.url);return{id:xO,diagram:e}},`loader`)},CO=`gantt`,wO={id:CO,detector:s(e=>/^\s*gantt/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-DqJsKb59.js`);return{diagram:e}},__vite__mapDeps([21,1,2,22,23,24]),import.meta.url);return{id:CO,diagram:e}},`loader`)},TO=`info`,EO={id:TO,detector:s(e=>/^\s*info/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./infoDiagram-RXCK75RN-Djm_nbd5.js`);return{diagram:e}},__vite__mapDeps([25,18,1,2]),import.meta.url);return{id:TO,diagram:e}},`loader`)},DO=`pie`,OO={id:DO,detector:s(e=>/^\s*pie/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-DpjqOFFp.js`);return{diagram:e}},__vite__mapDeps([26,18,1,2,27,24,28,20]),import.meta.url);return{id:DO,diagram:e}},`loader`)},kO=`quadrantChart`,AO={id:kO,detector:s(e=>/^\s*quadrantChart/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-BiNhgOXX.js`);return{diagram:e}},__vite__mapDeps([29,22,23,24]),import.meta.url);return{id:kO,diagram:e}},`loader`)},jO=`xychart`,MO={id:jO,detector:s(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js`);return{diagram:e}},__vite__mapDeps([30,22,23,24,27]),import.meta.url);return{id:jO,diagram:e}},`loader`)},NO=`requirement`,PO={id:NO,detector:s(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./requirementDiagram-EFPCY7ZU-DeCFdg9K.js`);return{diagram:e}},__vite__mapDeps([31,10,14]),import.meta.url);return{id:NO,diagram:e}},`loader`)},FO=`sequence`,IO={id:FO,detector:s(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-OEpQQdr4.js`);return{diagram:e}},__vite__mapDeps([32,19,8]),import.meta.url);return{id:FO,diagram:e}},`loader`)},LO=`class`,RO={id:LO,detector:s((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./classDiagram-DTDB5LWJ-DLFd9Xi0.js`);return{diagram:e}},__vite__mapDeps([33,8,34,13,10,14]),import.meta.url);return{id:LO,diagram:e}},`loader`)},zO=`classDiagram`,BO={id:zO,detector:s((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./classDiagram-v2-JRS7N3AN-DLFd9Xi0.js`);return{diagram:e}},__vite__mapDeps([35,8,34,13,10,14]),import.meta.url);return{id:zO,diagram:e}},`loader`)},VO=`state`,HO={id:VO,detector:s((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./stateDiagram-HBIQ2CUA-DvA3jSMB.js`);return{diagram:e}},__vite__mapDeps([36,4,8,37,10,14]),import.meta.url);return{id:VO,diagram:e}},`loader`)},UO=`stateDiagram`,WO={id:UO,detector:s((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-4QOOHH4V-BgQY03nz.js`);return{diagram:e}},__vite__mapDeps([38,8,37,10,14]),import.meta.url);return{id:UO,diagram:e}},`loader`)},GO=`journey`,KO={id:GO,detector:s(e=>/^\s*journey/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./journeyDiagram-EYS64GPL-DutxhSNI.js`);return{diagram:e}},__vite__mapDeps([39,28,13,8]),import.meta.url);return{id:GO,diagram:e}},`loader`)},qO={draw:s((e,t,n)=>{f.debug(`rendering svg for syntax error
304
+ `);let r=pu(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),fr(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},JO=qO,YO={db:{},renderer:qO,parser:{parse:s(()=>{},`parse`)}},XO=`flowchart-elk`,ZO={id:XO,detector:s((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./flowDiagram-A5DVABFB-BBKL0x3P.js`);return{diagram:e}},__vite__mapDeps([9,8,10,11,12,13,14]),import.meta.url);return{id:XO,diagram:e}},`loader`)},QO=`timeline`,$O={id:QO,detector:s(e=>/^\s*timeline/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-DAVJf1TX.js`);return{diagram:e}},__vite__mapDeps([40,28]),import.meta.url);return{id:QO,diagram:e}},`loader`)},ek=`mindmap`,tk={id:ek,detector:s(e=>/^\s*mindmap/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./mindmap-definition-FBJOCRG2-9-HC88D4.js`);return{diagram:e}},__vite__mapDeps([41,10,14]),import.meta.url);return{id:ek,diagram:e}},`loader`)},nk=`kanban`,rk={id:nk,detector:s(e=>/^\s*kanban/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./kanban-definition-3QL26DDD-DJdOF8Fm.js`);return{diagram:e}},__vite__mapDeps([42,13]),import.meta.url);return{id:nk,diagram:e}},`loader`)},ik=`sankey`,ak={id:ik,detector:s(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-CPH75rhw.js`);return{diagram:e}},__vite__mapDeps([43,27,24]),import.meta.url);return{id:ik,diagram:e}},`loader`)},ok=`packet`,sk={id:ok,detector:s(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-Du-nAJ9F.js`);return{diagram:e}},__vite__mapDeps([44,18,1,2,20]),import.meta.url);return{id:ok,diagram:e}},`loader`)},ck=`radar`,lk={id:ck,detector:s(e=>/^\s*radar-beta/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-DSCxJdBK.js`);return{diagram:e}},__vite__mapDeps([45,18,1,2,20]),import.meta.url);return{id:ck,diagram:e}},`loader`)},uk=`block`,dk={id:uk,detector:s(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./blockDiagram-NRAW4CY4-BjkljTNz.js`);return{diagram:e}},__vite__mapDeps([46,12,13]),import.meta.url);return{id:uk,diagram:e}},`loader`)},fk=`treeView`,pk={id:fk,detector:s(e=>/^\s*treeView-beta/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-Bt1v8-GC.js`);return{diagram:e}},__vite__mapDeps([47,18,1,2,19,20]),import.meta.url);return{id:fk,diagram:e}},`loader`)},mk=`architecture`,hk={id:mk,detector:s(e=>/^\s*architecture/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-DpIqL5h4.js`);return{diagram:e}},__vite__mapDeps([48,1,2,18,6,20]),import.meta.url);return{id:mk,diagram:e}},`loader`)},gk=`eventmodeling`,_k={id:gk,detector:s(e=>/^\s*eventmodeling/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-DHfYwp_9.js`);return{diagram:e}},__vite__mapDeps([49,18,1,2,20]),import.meta.url);return{id:gk,diagram:e}},`loader`)},vk=`ishikawa`,yk={id:vk,detector:s(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-DWya9SG2.js`);return{diagram:e}},[],import.meta.url);return{id:vk,diagram:e}},`loader`)},bk=`venn`,xk={id:bk,detector:s(e=>/^\s*venn-beta/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-DwM8eDkh.js`);return{diagram:e}},[],import.meta.url);return{id:bk,diagram:e}},`loader`)},Sk=`treemap`,Ck={id:Sk,detector:s(e=>/^\s*treemap/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-DdzD-4Le.js`);return{diagram:e}},__vite__mapDeps([50,18,1,2,23,27,24,20,10]),import.meta.url);return{id:Sk,diagram:e}},`loader`)},wk=`wardley`,Tk={id:wk,detector:s(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-DZL-Zz2t.js`);return{diagram:e}},__vite__mapDeps([51,18,1,2,20]),import.meta.url);return{id:wk,diagram:e}},`loader`)},Ek=`cynefin`,Dk={id:Ek,detector:s(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-ErLF5N13.js`);return{diagram:e}},__vite__mapDeps([52,18,1,2,20]),import.meta.url);return{id:Ek,diagram:e}},`loader`)},Ok=`railroad`,kk={id:Ok,detector:s(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-_Y3Ojg6G.js`);return{diagram:e}},__vite__mapDeps([53,18,1,2,20,54]),import.meta.url);return{id:Ok,diagram:e}},`loader`)},Ak=`railroadEbnf`,jk={id:Ak,detector:s(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-Da9C9NO1.js`);return{diagram:e}},__vite__mapDeps([55,18,1,2,20,54]),import.meta.url);return{id:Ak,diagram:e}},`loader`)},Mk=`railroadAbnf`,Nk={id:Mk,detector:s(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-g20pFzNV.js`);return{diagram:e}},__vite__mapDeps([56,18,1,2,20,54]),import.meta.url);return{id:Mk,diagram:e}},`loader`)},Pk=`railroadPeg`,Fk={id:Pk,detector:s(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:s(async()=>{let{diagram:e}=await r(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-DrEZd4fD.js`);return{diagram:e}},__vite__mapDeps([57,18,1,2,20,54]),import.meta.url);return{id:Pk,diagram:e}},`loader`)},Ik=!1,Lk=s(()=>{Ik||(Ik=!0,zr(`error`,YO,e=>e.toLowerCase().trim()===`error`),zr(`---`,{db:{clear:s(()=>{},`clear`)},styles:{},renderer:{draw:s(()=>{},`draw`)},parser:{parse:s(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:s(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),Fn(ZO,tk,hk),Fn(fO,rk,BO,RO,bO,wO,EO,OO,PO,IO,vO,gO,mO,$O,SO,WO,HO,KO,AO,ak,sk,MO,dk,_k,pk,lk,yk,Ck,kk,jk,Nk,Fk,xk,Tk,Dk))},`addDiagrams`),Rk=s(async()=>{f.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(Nn).map(async([e,{detector:t,loader:n}])=>{if(n)try{Br(e)}catch{try{let{diagram:e,id:r}=await n();zr(r,e,t)}catch(t){throw f.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Nn[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){f.error(`Failed to load ${e.length} external diagrams`);for(let t of e)f.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),zk=`graphics-document document`;function Bk(e,t){e.attr(`role`,zk),t!==``&&e.attr(`aria-roledescription`,t)}s(Bk,`setA11yDiagramInfo`);function Vk(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}s(Vk,`addSVGa11yTitleDescription`);var Hk=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{s(this,`Diagram`)}static async fromText(t,n={}){let r=z(),i=Pn(t,r);t=kf(t)+`
305
+ `;try{Br(i)}catch{let e=Ln(i);if(!e)throw new Mn(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();zr(t,n)}let{db:a,parser:o,renderer:s,init:c}=Br(i);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Uk=[],Wk=s(()=>{Uk.forEach(e=>{e()}),Uk=[]},`attachFunctions`),Gk=s(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Kk(e){let t=e.match(kn);if(!t)return{text:e,metadata:{}};let n=t[1],r=uD(n?t[2].split(`
306
+ `).map(e=>e.startsWith(n)?e.slice(n.length):e).join(`
307
+ `):t[2],{schema:sD})??{};r=typeof r==`object`&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}s(Kk,`extractFrontMatter`);var qk=s(e=>e.replace(/\r\n?/g,`
308
+ `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),Jk=s(e=>{let{text:t,metadata:n}=Kk(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),Yk=s(e=>{let t=Of.detectInit(e)??{},n=Of.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:Xd(e),directive:t}},`processDirectives`);function Xk(e){let t=Jk(qk(e)),n=Yk(t.text),r=Df(t.config,n.directive);return e=Gk(n.text),{code:e,title:t.title,config:r}}s(Xk,`preprocessDiagram`);function Zk(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}s(Zk,`toBase64`);var Qk=5e4,$k=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,eA=`sandbox`,tA=`loose`,nA=`http://www.w3.org/2000/svg`,rA=`http://www.w3.org/1999/xlink`,iA=`http://www.w3.org/1999/xhtml`,aA=`100%`,oA=`100%`,sA=`border:0;margin:0;`,cA=`margin:0`,lA=`allow-top-navigation-by-user-activation allow-popups`,uA=`The "iframe" tag is not supported by your browser.`,dA=[`foreignobject`],fA=[`dominant-baseline`];function pA(e){let t=Xk(e);return Sn(),xn(t.config??{}),t}s(pA,`processAndSetConfigs`);async function mA(e,t){Lk();try{let{code:t,config:n}=pA(e);return{diagramType:(await EA(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}s(mA,`parse`);var hA=s((e,t,n=[])=>`.${e} ${t} ${cn(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),gA=s((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=On(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{Wd(e.styles)||r.forEach(t=>{n.insertRule(hA(e.id,t,e.styles),n.cssRules.length)}),Wd(e.textStyles)||n.insertRule(hA(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=hr(t)+`
309
+ `}else r+=`${e.themeCSS}
310
+ `;return r+hr(n)},`createCssStyles`),_A=s((e,t)=>cO(rO(`${e}{${t}}`),uO([s(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`?new Set([`font-family`,`font-size`,`fill`]).has(e.props):!1)||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(f.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=vD))},`addNamespace`),lO])),`compileCSS`),vA=s((e,t,n,r)=>_A(r,vr(t,gA(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),yA=s((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=Af(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),bA=s((e=``,t)=>`<iframe style="width:${aA};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:oA};${sA}" src="data:text/html;charset=UTF-8;base64,${Zk(`<body style="${cA}">${e}</body>`)}" sandbox="${lA}">
311
+ ${uA}
312
+ </iframe>`,`putIntoIFrame`),xA=s((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,nA);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function SA(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}s(SA,`sandboxedIframe`);var CA=s((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),wA=s(async function(e,t,n){Lk();let r=pA(t);t=r.code;let i=z();f.debug(i),t.length>(i?.maxTextSize??Qk)&&(t=$k);let a=`#${e}`,o=`i`+e,c=`#`+o,l=`d`+e,u=`#`+l,d=s(()=>{let e=V(m?c:u).node();e&&`remove`in e&&e.remove()},`removeTempElements`),p=V(document.body),m=i.securityLevel===eA,h=i.securityLevel===tA,g=i.fontFamily;n===void 0?(CA(document,e,l,o),m?(p=V(SA(V(document.body),o).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=V(`body`),xA(p,e,l)):(n&&(n.innerHTML=``),m?(p=V(SA(V(n),o).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=V(n),xA(p,e,l,`font-family: ${g}`,rA));let _,v;try{_=await Hk.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw d(),e;_=await Hk.fromText(`error`),v=e}let y=p.select(u).node(),b=_.type,x=y.firstChild,S=x.firstChild,C=_.renderer.getClasses?.(t,_),w=vA(i,b,C,a),T=document.createElement(`style`);T.innerHTML=w,x.insertBefore(T,S);try{await _.renderer.draw(t,e,`11.17.0`,_)}catch(n){throw i.suppressErrorRendering?d():JO.draw(t,e,`11.17.0`),n}let E=p.select(`${u} svg`),D=_.db.getAccTitle?.(),O=_.db.getAccDescription?.();DA(b,E,D,O);let ee=s(()=>{p.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,iA);let t=p.select(u).node().innerHTML;if(f.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),t=yA(t,m,R(i.arrowMarkerAbsolute)),m){let e=p.select(u+` svg`).node();t=bA(t,e)}else h||(t=Et.sanitize(t,{ADD_TAGS:dA,ADD_ATTR:fA,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Wk(),t},`serializeSvg`)();if(v)throw v;return d(),{diagramType:b,svg:ee,bindFunctions:_.db.bindFunctions}},`render`);function TA(e={}){let t=Ot({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),gn(t),t?.theme&&t.theme in Qt?t.themeVariables=Qt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Qt.default.getThemeVariables(t.themeVariables)),p((typeof t==`object`?hn(t):vn()).logLevel),Lk()}s(TA,`initialize`);var EA=s((e,t={})=>{let{code:n}=Xk(e);return Hk.fromText(n,t)},`getDiagramFromText`);function DA(e,t,n,r){Bk(t,e),Vk(t,n,r,t.attr(`id`))}s(DA,`addA11yInfo`);var OA=Object.freeze({render:wA,parse:mA,getDiagramFromText:EA,initialize:TA,getConfig:z,setConfig:yn,getSiteConfig:vn,updateSiteConfig:_n,reset:s(()=>{Sn()},`reset`),globalReset:s(()=>{Sn(ln)},`globalReset`),defaultConfig:ln});p(z().logLevel),Sn(z());var kA=s((e,t,n)=>{f.warn(e),wf(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),AA=s(async function(e={querySelector:`.mermaid`}){try{await jA(e)}catch(t){if(wf(t)&&f.error(t.str),HA.parseError&&HA.parseError(t),!e.suppressErrors)throw f.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),jA=s(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=OA.getConfig();f.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);f.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(f.debug(`Start On Load: `+r?.startOnLoad),OA.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new Of.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(f.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=lm(Of.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=Of.detectInit(o);r&&f.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await VA(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){kA(e,s,HA.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),MA=s(function(e){OA.initialize(e)},`initialize`),NA=s(async function(e,t,n){f.warn(`mermaid.init is deprecated. Please use run instead.`),e&&MA(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await AA(r)},`init`),PA=s(async(e,{lazyLoad:t=!0}={})=>{Lk(),Fn(...e),t===!1&&await Rk()},`registerExternalDiagrams`),FA=s(function(){if(HA.startOnLoad){let{startOnLoad:e}=OA.getConfig();e&&HA.run().catch(e=>f.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,FA,!1);var IA=s(function(e){HA.parseError=e},`setParseErrorHandler`),LA=[],RA=!1,zA=s(async()=>{if(!RA){for(RA=!0;LA.length>0;){let e=LA.shift();if(e)try{await e()}catch(e){f.error(`Error executing queue`,e)}}RA=!1}},`executeQueue`),BA=s(async(e,t)=>new Promise((n,r)=>{let i=s(()=>new Promise((i,a)=>{OA.parse(e,t).then(e=>{i(e),n(e)},e=>{f.error(`Error parsing`,e),HA.parseError?.(e),a(e),r(e)})}),`performCall`);LA.push(i),zA().catch(r)}),`parse`),VA=s((e,t,n)=>new Promise((r,i)=>{let a=s(()=>new Promise((a,o)=>{OA.render(e,t,n).then(e=>{a(e),r(e)},e=>{f.error(`Error parsing`,e),HA.parseError?.(e),o(e),i(e)})}),`performCall`);LA.push(a),zA().catch(i)}),`render`),HA={startOnLoad:!0,mermaidAPI:OA,parse:BA,render:VA,init:NA,run:AA,registerExternalDiagrams:PA,registerLayoutLoaders:tT,initialize:MA,parseError:void 0,contentLoaded:FA,setParseErrorHandler:IA,detectType:Pn,registerIconPacks:Uu,getRegisteredDiagramsMetadata:s(()=>Object.keys(Nn).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},UA=HA,WA=i();UA.initialize({startOnLoad:!1,theme:`default`,securityLevel:`strict`});var GA=({chart:e})=>{let[t,n]=(0,a.useState)(``),[r,i]=(0,a.useState)(!1),o=(0,a.useId)().replace(/:/g,`-`);return(0,a.useEffect)(()=>{let t=!1;return(async()=>{try{let{svg:r}=await UA.render(o,e);t||(n(r),i(!1))}catch{t||i(!0)}})(),()=>{t=!0}},[e,o]),r?(0,WA.jsx)(`pre`,{className:`my-4 p-4 bg-slate-100 dark:bg-slate-800 rounded-lg overflow-x-auto text-sm text-red-500 border border-red-200 dark:border-red-800`,children:e}):(0,WA.jsx)(`div`,{className:`my-4 flex justify-center bg-white dark:bg-slate-800 p-4 rounded-lg border border-slate-200 dark:border-slate-700 overflow-x-auto`,dangerouslySetInnerHTML:{__html:t}})};export{Lb as $,or as $n,yd as $t,XS as A,ol as An,D as Ar,Hm as At,ES as B,zo as Bn,lf as Bt,hw as C,pl as Cn,pr as Cr,Bv as Ct,aw as D,dl as Dn,A as Dr,Iv as Dt,ow as E,ul as En,j as Er,Lv as Et,FS as F,il as Fn,c as Fr,vf as Ft,Px as G,Ja as Gn,Rd as Gt,Bx as H,Fo as Hn,pf as Ht,MS as I,al as In,s as Ir,yf as It,tx as J,go as Jn,ld as Jt,Mx as K,vo as Kn,Ed as Kt,AS as L,ll as Ln,Df as Lt,JS as M,GA as MermaidBlock,nl as Mn,g as Mr,Mm as Mt,GS as N,rl as Nn,f as Nr,Lm as Nt,pC as O,el as On,te as Or,Y as Ot,US as P,sl as Pn,l as Pr,bf as Pt,Rb as Q,Ot as Qn,ad as Qt,kS as R,Qc as Rn,df as Rt,gw as S,vl as Sn,kr as Sr,Rv as St,uw as T,$c as Tn,Et as Tr,Vv as Tt,Lx as U,Lo as Un,Of as Ut,Vx as V,Ro as Vn,Ef as Vt,Ix as W,Mo as Wn,gf as Wt,Ub as X,qa as Xn,nd as Xt,Xb as Y,Ka as Yn,cd as Yt,Vb as Z,V as Zn,dd as Zt,ww as _,Ku as _n,cr as _r,_y as _t,wT as a,td as an,rn as ar,wb as at,yw as b,pu as bn,Tr as br,Cy as bt,oT as c,sd as cn,z as cr,Yy as ct,nT as d,md as dn,It as dr,Hy as dt,bd as en,wr as er,Fb as et,Zw as f,hd as fn,Xn as fr,Vy as ft,Ew as g,Ju as gn,$n as gr,Ey as gt,jw as h,Qu as hn,Rn as hr,Dy as ht,$ as i,od as in,Pr as ir,Tb as it,YS as j,cl as jn,T as jr,W as jt,fC as k,tl as kn,k as kr,q as kt,xT as l,ed as ln,B as lr,Jy as lt,Nw as m,pd as mn,ar as mr,Ry as mt,uD as n,vd as nn,lr as nr,Db as nt,iT as o,ud as on,Or as or,Cb as ot,Vw as p,fd as pn,Dn as pr,zy as pt,Ox as q,po as qn,rd as qt,vT as r,gd as rn,fr as rr,Eb as rt,gT as s,$u as sn,Er as sr,eb as st,sD as t,_d as tn,yr as tr,Pb as tt,rT as u,id as un,Ar as ur,Uy as ut,Sw as v,Uu as vn,Wn as vr,oy as vt,pw as w,fl as wn,Ir as wr,Uv as wt,vw as x,Tl as xn,Nr as xr,cy as xt,xw as y,Bu as yn,Dr as yr,Gv as yt,DS as z,Wo as zn,jf as zt};