@kabmo-labs/kabmo 0.45.1 → 0.46.1

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 (369) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +412 -412
  3. package/dist/client/static/js/{CsvGrid-eqmctwyq.js → CsvGrid-qdkmv8bj.js} +2 -2
  4. package/dist/client/static/js/{DocxView-rjrshmzf.js → DocxView-k84ns803.js} +3 -3
  5. package/dist/client/static/js/{DrawioView-za569srw.js → DrawioView-r1n717f7.js} +2 -2
  6. package/dist/client/static/js/ImageView-jkrdrq8v.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-sh634350.js +2 -0
  8. package/dist/client/static/js/Modal-xe6h99jn.js +59 -0
  9. package/dist/client/static/js/{PdfView-2m78d4jz.js → PdfView-ffg4mccg.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-54awmse0.js → SessionsView-cdcbsee9.js} +1 -1
  11. package/dist/client/static/js/{SheetView-xfvjdh24.js → SheetView-89sscpz6.js} +19 -19
  12. package/dist/client/static/js/{SvgPreview-yfjrfb40.js → SvgPreview-68c0ccbv.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-tmsa3b36.js → abnfDiagram-O67JEVCF-h3a5s259.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-a5effrpz.js → architectureDiagram-NJMV4G6O-983p0jgn.js} +3 -3
  16. package/dist/client/static/js/{astro-56b0as3q.js → astro-hyj5wege.js} +1 -1
  17. package/dist/client/static/js/bash-8d8z8zrg.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-3q2kf22c.js → blockDiagram-BEXU5L5S-16pse5mh.js} +5 -5
  19. package/dist/client/static/js/c-acmn1zc9.js +1 -0
  20. package/dist/client/static/js/{c4Diagram-YGBWAQC7-mkw3jvf6.js → c4Diagram-YGBWAQC7-mvnb00zt.js} +3 -3
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fw9bs1za.js → classDiagram-v2-NBCMYWYE-kmpd91xb.js} +7 -7
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-eqjrpps4.js → cose-bilkent-JH36ORCC-3ek5r5se.js} +1 -1
  23. package/dist/client/static/js/cpp-620mvjkk.js +1 -0
  24. package/dist/client/static/js/css-bt76kxbq.js +1 -0
  25. package/dist/client/static/js/css-drfs4n12.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-4w61hq3e.js → cynefinDiagram-VND7K2PF-jkbh84zn.js} +1 -1
  28. package/dist/client/static/js/{dagre-6A5THRUB-t52jdfr1.js → dagre-6A5THRUB-4fdc0sgn.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-448hyxaz.js → diagram-22UHCM2B-hbk61nq9.js} +18 -18
  30. package/dist/client/static/js/{diagram-3UASUU5V-350k213a.js → diagram-3UASUU5V-hfpbr9qh.js} +1 -1
  31. package/dist/client/static/js/{diagram-ATOU4E4O-9davjeyb.js → diagram-ATOU4E4O-fn0nt71a.js} +3 -3
  32. package/dist/client/static/js/{diagram-CDSNMT55-034wwghk.js → diagram-CDSNMT55-ssswxjeb.js} +4 -4
  33. package/dist/client/static/js/{diagram-MLGK6HIB-kzzd4ecm.js → diagram-MLGK6HIB-whnzxv6f.js} +2 -2
  34. package/dist/client/static/js/{diagram-MPIPVDR6-rsky4e3s.js → diagram-MPIPVDR6-hk1chzxk.js} +2 -2
  35. package/dist/client/static/js/{dockerfile-68b0e6b6.js → dockerfile-zmsj8r4g.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-7bm1e394.js → ebnfDiagram-ZINNZB2B-q1vkg5mr.js} +1 -1
  37. package/dist/client/static/js/{elixir-12pgbgtq.js → elixir-80wq7gak.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-4xjp4rgh.js → elk-276RUBZZ-kt98vg8j.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-v52qmcrv.js → erDiagram-OPXOYQCR-ey3avsn9.js} +9 -9
  40. package/dist/client/static/js/{erlang-811btv6p.js → erlang-814e8qy5.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-7gvtpn3d.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-1r1fn18p.js → ganttDiagram-FUAMR5RP-a9k1at43.js} +4 -4
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-zt5cwg83.js → gitGraphDiagram-X574FWY7-gnekjfym.js} +13 -13
  46. package/dist/client/static/js/graphql-j1a6zp7m.js +1 -0
  47. package/dist/client/static/js/html-m0megrvb.js +1 -0
  48. package/dist/client/static/js/{index-qt9jc4ck.js → index-19x11s5w.js} +2 -2
  49. package/dist/client/static/js/{index-0gmw2bt3.js → index-1ax52p0q.js} +2 -2
  50. package/dist/client/static/js/{index-2b1wnvez.js → index-1c2jvnyh.js} +2 -2
  51. package/dist/client/static/js/index-2a6qp9y6.js +2 -0
  52. package/dist/client/static/js/{index-gcwmpfr4.js → index-2ks0m8ss.js} +2 -2
  53. package/dist/client/static/js/{index-pfj3sd1n.js → index-33qxg79j.js} +7 -7
  54. package/dist/client/static/js/{index-bcpyxt97.js → index-3x7h2eqj.js} +2 -2
  55. package/dist/client/static/js/{index-q36gq3yz.js → index-4cag7w6k.js} +198 -198
  56. package/dist/client/static/js/{index-03j5j1j0.js → index-561gkvve.js} +2 -2
  57. package/dist/client/static/js/{index-m9s7r4z9.js → index-5ka2tyf9.js} +3 -3
  58. package/dist/client/static/js/{index-f51jxezc.js → index-5wz0y88c.js} +2 -2
  59. package/dist/client/static/js/{index-frqq7yen.js → index-60v30k5h.js} +64 -64
  60. package/dist/client/static/js/{index-x2wvq4ae.js → index-64sqfr4a.js} +2 -2
  61. package/dist/client/static/js/{index-xgv501v0.js → index-65afr75v.js} +2 -2
  62. package/dist/client/static/js/index-83rkg916.js +2 -0
  63. package/dist/client/static/js/{index-ga6492qc.js → index-84fyq5a6.js} +1 -1
  64. package/dist/client/static/js/{index-2tmnqqzt.js → index-8g7q8mz4.js} +3 -3
  65. package/dist/client/static/js/{index-mnh8nptt.js → index-9vv7wr1n.js} +2 -2
  66. package/dist/client/static/js/{index-gzafyqsr.js → index-abs635a1.js} +56 -56
  67. package/dist/client/static/js/{index-j50y0z44.js → index-amsa0tfs.js} +1 -1
  68. package/dist/client/static/js/index-atq9q1s7.js +1 -0
  69. package/dist/client/static/js/{index-8ps5gdwz.js → index-b2e5pwx7.js} +5 -5
  70. package/dist/client/static/js/{index-cza9mnxx.js → index-b5dfvget.js} +6 -6
  71. package/dist/client/static/js/{index-zwx3vbf0.js → index-bsr7wmj2.js} +1 -1
  72. package/dist/client/static/js/{index-ex3w7t7s.js → index-c9e417cs.js} +2 -2
  73. package/dist/client/static/js/{index-fbct0jcf.js → index-d23eacf2.js} +2 -2
  74. package/dist/client/static/js/{index-wqrdgt1g.js → index-dn7hg4em.js} +2 -2
  75. package/dist/client/static/js/index-dpy3ewrn.css +1 -0
  76. package/dist/client/static/js/index-dt6q3rws.js +12 -0
  77. package/dist/client/static/js/{index-3h2mr90j.js → index-dxvtjn6a.js} +2 -2
  78. package/dist/client/static/js/{index-127se1a3.js → index-e9cxje00.js} +19 -19
  79. package/dist/client/static/js/{index-6sqmhdyv.js → index-fj5rsp5v.js} +2 -2
  80. package/dist/client/static/js/{index-c7vbr57m.js → index-fzngzhww.js} +2 -2
  81. package/dist/client/static/js/{index-n1ga63de.js → index-g7s0wsag.js} +2 -2
  82. package/dist/client/static/js/{index-x0kgnkv3.js → index-hgzntg2j.js} +2 -2
  83. package/dist/client/static/js/{index-jaqjvk22.js → index-hkz2mz34.js} +2 -2
  84. package/dist/client/static/js/{index-gzp4j2h5.js → index-hnb66d3s.js} +2 -2
  85. package/dist/client/static/js/{index-9zwtpazh.js → index-kb14dhrx.js} +2 -2
  86. package/dist/client/static/js/{index-snjtkfkq.js → index-kbhrvep8.js} +6 -6
  87. package/dist/client/static/js/{index-vgcm2g0g.js → index-kty4ncsr.js} +2 -2
  88. package/dist/client/static/js/index-m4k054wz.js +4 -0
  89. package/dist/client/static/js/{index-pxq4v81r.js → index-nw5mvcaj.js} +2 -2
  90. package/dist/client/static/js/index-pavvxrsz.js +1 -0
  91. package/dist/client/static/js/index-q9ytjey8.js +1 -0
  92. package/dist/client/static/js/{index-8dtp7mt0.js → index-qf3y3ahx.js} +2 -2
  93. package/dist/client/static/js/{index-as1wptfa.js → index-qfxn7yh5.js} +2 -2
  94. package/dist/client/static/js/{index-e6any867.js → index-sa1675y0.js} +2 -2
  95. package/dist/client/static/js/{index-ehg2ftnp.js → index-trvqvb1v.js} +2 -2
  96. package/dist/client/static/js/{index-1nwwvv29.js → index-vjmg7kn5.js} +2 -2
  97. package/dist/client/static/js/index-vkqb4dnt.js +1 -0
  98. package/dist/client/static/js/{index-nzhwd6t3.js → index-wbws16ag.js} +2 -2
  99. package/dist/client/static/js/{index-528x5x8c.js → index-wrcdc9vz.js} +1 -1
  100. package/dist/client/static/js/{index-2zntn964.js → index-x9r7zfp4.js} +2 -2
  101. package/dist/client/static/js/{index-mhnwyra0.js → index-xq5f3nxa.js} +2 -2
  102. package/dist/client/static/js/index-xwjbq003.js +2 -0
  103. package/dist/client/static/js/{index-2gbfke1a.js → index-yf93db65.js} +1 -1
  104. package/dist/client/static/js/{index-tkfxnnr5.js → index-ykm7a3cp.js} +2 -2
  105. package/dist/client/static/js/{index-t0yv1375.js → index-z0fkfphe.js} +2 -2
  106. package/dist/client/static/js/{index-84vmdg3k.js → index-z25ss7xj.js} +1 -1
  107. package/dist/client/static/js/{index-dmv2zasz.js → index-z4530r3c.js} +2 -2
  108. package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +1 -0
  109. package/dist/client/static/js/{infoDiagram-VRGFBTTK-yd4zwrtv.js → infoDiagram-VRGFBTTK-r1p25738.js} +2 -2
  110. package/dist/client/static/js/ini-5f4zqtqr.js +1 -0
  111. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-7sjp09d4.js → ishikawaDiagram-OU5B5YK6-afgrqdrt.js} +3 -3
  112. package/dist/client/static/js/java-jj41mty3.js +1 -0
  113. package/dist/client/static/js/javascript-n9w9p97f.js +1 -0
  114. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-qh9jk7qk.js → journeyDiagram-ZHPQQLJL-hepa4wk7.js} +5 -5
  115. package/dist/client/static/js/json-rnh2h17x.js +1 -0
  116. package/dist/client/static/js/jsx-4gecrt29.js +1 -0
  117. package/dist/client/static/js/{julia-mgsev9df.js → julia-yv2j8qd0.js} +1 -1
  118. package/dist/client/static/js/{kanban-definition-PNTS6WVX-cjc8k0jk.js → kanban-definition-PNTS6WVX-jysft8ya.js} +5 -5
  119. package/dist/client/static/js/lua-zszaw2f7.js +1 -0
  120. package/dist/client/static/js/markdown-nm6gw4v4.js +1 -0
  121. package/dist/client/static/js/{mermaid.core-vw0b7r0k.js → mermaid.core-0m90b0s8.js} +7 -7
  122. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-jyhtpt1z.js → mindmap-definition-NLK3R4M7-x2rrzpvr.js} +8 -8
  123. package/dist/client/static/js/one-dark-pro-09d8p5vy.js +1 -0
  124. package/dist/client/static/js/one-light-g3ednt6p.js +1 -0
  125. package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +1 -0
  126. package/dist/client/static/js/{pegDiagram-GJSIUBJH-80ygdd29.js → pegDiagram-GJSIUBJH-z7vb7f1z.js} +1 -1
  127. package/dist/client/static/js/{perl-6n93vjsa.js → perl-917pjq5a.js} +1 -1
  128. package/dist/client/static/js/{php-w23nmbtc.js → php-hwz75qzt.js} +1 -1
  129. package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +1 -0
  130. package/dist/client/static/js/{pieDiagram-5QR66LMP-6vgh7ntn.js → pieDiagram-5QR66LMP-jqv6v4e6.js} +3 -3
  131. package/dist/client/static/js/properties-rkptax7r.js +1 -0
  132. package/dist/client/static/js/python-qf1se1mj.js +1 -0
  133. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-k5byajmm.js → quadrantDiagram-O4NWA36T-w2h8yxrv.js} +6 -6
  134. package/dist/client/static/js/r-ms0cygq2.js +1 -0
  135. package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +1 -0
  136. package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +1 -0
  137. package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +1 -0
  138. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +1 -0
  139. package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +1 -0
  140. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-qffrkk7g.js → railroadDiagram-XR7U4H2S-nd09yac3.js} +1 -1
  141. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-r80w7tdp.js → requirementDiagram-PLB6GJNP-t61zxh5v.js} +10 -10
  142. package/dist/client/static/js/{ruby-ag3b3t9t.js → ruby-er7ayhte.js} +1 -1
  143. package/dist/client/static/js/{rust-a9jcfy2e.js → rust-avnkhh0p.js} +1 -1
  144. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-g9qdy74b.js → sankeyDiagram-IPEJSGJF-2f7h2cmw.js} +4 -4
  145. package/dist/client/static/js/{sass-x0eez0kp.js → sass-n47tt136.js} +1 -1
  146. package/dist/client/static/js/{scss-qycakpjn.js → scss-kvev49ga.js} +1 -1
  147. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-nywg1eq3.js → sequenceDiagram-PO4LG4MO-kfb5d7zd.js} +19 -19
  148. package/dist/client/static/js/{sizeCapture-INFHLROL-m5pks027.js → sizeCapture-INFHLROL-amfg19se.js} +1 -1
  149. package/dist/client/static/js/sql-hd42h8wx.js +1 -0
  150. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-xzzv780w.js → stateDiagram-v2-GCMORJYK-k5hx7btx.js} +3 -3
  151. package/dist/client/static/js/{svelte-tg19by0f.js → svelte-2pmz35vx.js} +1 -1
  152. package/dist/client/static/js/{swimlanes-2SLR337P-n4q5ad13.js → swimlanes-2SLR337P-wv3rp8kk.js} +1 -1
  153. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6y8zdbm4.js +8 -0
  154. package/dist/client/static/js/{timeline-definition-EJHVYXUP-j9pde7sa.js → timeline-definition-EJHVYXUP-0re95wtn.js} +6 -6
  155. package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +1 -0
  156. package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +1 -0
  157. package/dist/client/static/js/tsx-gx7td06z.js +1 -0
  158. package/dist/client/static/js/typescript-1a808spn.js +1 -0
  159. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ehnc0600.js → usecaseDiagram-POWQR4AR-yrje14qp.js} +44 -44
  160. package/dist/client/static/js/{vennDiagram-UO4OBE2U-cp4kj6kw.js → vennDiagram-UO4OBE2U-jxkmrfy5.js} +7 -7
  161. package/dist/client/static/js/{vue-mhj4sme0.js → vue-d5gpjfgn.js} +1 -1
  162. package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +1 -0
  163. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-eegf1jpw.js → wardleyDiagram-VNRHLVJA-d3v2m9b1.js} +3 -3
  164. package/dist/client/static/js/xml-3117mxd9.js +1 -0
  165. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-zkkqfyex.js → xychartDiagram-PMCCYNJV-9a1s1rjt.js} +5 -5
  166. package/dist/client/static/js/yaml-dmvh8vyt.js +1 -0
  167. package/extensions/kabmo-modes/index.ts +1 -1
  168. package/extensions/kabmo-modes/parked.test.ts +2 -2
  169. package/extensions/kabmo-modes/parked.ts +10 -9
  170. package/extensions/kabmo-modes/plan.test.ts +4 -4
  171. package/extensions/kabmo-modes/plan.ts +6 -6
  172. package/extensions/kabmo-modes/session.ts +2 -2
  173. package/package.json +1 -1
  174. package/src/client/components/common/FolderPicker.tsx +1 -1
  175. package/src/client/components/common/Modal.tsx +8 -3
  176. package/src/client/components/common/NotificationPermissionDialog.test.tsx +8 -3
  177. package/src/client/components/common/NotificationPermissionDialog.tsx +7 -9
  178. package/src/client/components/common/PWAInstallButton.tsx +1 -1
  179. package/src/client/components/common/header-panel-buttons/index.tsx +5 -1
  180. package/src/client/components/common/shell-update-button/Modal.tsx +31 -36
  181. package/src/client/components/common/shell-update-button/index.test.tsx +5 -2
  182. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +16 -0
  183. package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +204 -0
  184. package/src/client/components/layout/desktop-layout/RightColumn.tsx +52 -15
  185. package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
  186. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +4 -6
  187. package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +1 -1
  188. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +1 -1
  189. package/src/client/components/mobile/LayoutWrapper.tsx +9 -43
  190. package/src/client/components/mobile/RightSidebar.tsx +31 -12
  191. package/src/client/components/mobile/SessionSidebar.tsx +112 -137
  192. package/src/client/components/mobile/drawer-strip.tsx +85 -0
  193. package/src/client/components/mobile/left-drawer-nav.test.tsx +350 -0
  194. package/src/client/components/mobile/mobile-drawer-reveals.test.tsx +194 -0
  195. package/src/client/components/mobile/mobile-drawer-reveals.ts +138 -0
  196. package/src/client/components/mobile/mobile-main-view/Header.tsx +12 -24
  197. package/src/client/components/mobile/mobile-right-sidebar/Action.tsx +57 -0
  198. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +14 -87
  199. package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +2 -7
  200. package/src/client/components/mobile/mobile-right-sidebar/Header.test.tsx +157 -0
  201. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +109 -105
  202. package/src/client/components/mobile/mobile-right-sidebar/OutlineButton.tsx +1 -1
  203. package/src/client/components/mobile/mobile-right-sidebar/Overflow.tsx +95 -0
  204. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +212 -0
  205. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +7 -9
  206. package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +2 -2
  207. package/src/client/components/mobile/mobile-session-sidebar/use-dock.ts +29 -8
  208. package/src/client/components/mobile/mobile-session-sidebar/use-drawer-tabs.ts +97 -0
  209. package/src/client/components/settings/Band.test.tsx +83 -0
  210. package/src/client/components/settings/Band.tsx +96 -0
  211. package/src/client/components/settings/Modal.tsx +44 -69
  212. package/src/client/components/settings/apply-side-effects.ts +15 -4
  213. package/src/client/components/settings/band-height.test.tsx +16 -3
  214. package/src/client/components/settings/categories/AppearanceSettings.test.tsx +35 -9
  215. package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
  216. package/src/client/components/settings/categories/ChatSettings.test.tsx +32 -9
  217. package/src/client/components/settings/categories/ChatSettings.tsx +2 -0
  218. package/src/client/components/settings/categories/NotificationSettings.tsx +1 -1
  219. package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +40 -223
  220. package/src/client/components/settings/categories/appearance-settings/nav-choice.tsx +176 -0
  221. package/src/client/components/settings/categories/appearance-settings/nav-miniatures.tsx +93 -0
  222. package/src/client/components/settings/categories/connect-settings/PairDialog.tsx +1 -1
  223. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
  224. package/src/client/components/settings/categories/notification-settings/PermissionNotice.tsx +1 -1
  225. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +1 -1
  226. package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +1 -1
  227. package/src/client/components/settings/drill.tsx +113 -0
  228. package/src/client/components/settings/master-detail/GroupDetail.tsx +14 -6
  229. package/src/client/components/settings/master-detail/GroupSidebar.tsx +9 -1
  230. package/src/client/components/settings/master-detail/index.tsx +45 -25
  231. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +11 -0
  232. package/src/client/components/workspace/chat-timeline/MessageList.tsx +29 -21
  233. package/src/client/components/workspace/chat-timeline/MobileTurnJump.tsx +1 -1
  234. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +1 -1
  235. package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +4 -0
  236. package/src/client/components/workspace/chat-timeline/ToolCallingSection.test.ts +23 -6
  237. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
  238. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +19 -2
  239. package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +1 -1
  240. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +1 -1
  241. package/src/client/components/workspace/chat-timeline/index.tsx +5 -9
  242. package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +1 -1
  243. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.test.tsx +4 -4
  244. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.test.tsx +127 -0
  245. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.tsx +225 -0
  246. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.test.tsx +5 -4
  247. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.tsx +1 -1
  248. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/PluginPendingInteractions.test.ts +2 -2
  249. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.test.ts +4 -3
  250. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +40 -4
  251. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/Footer.tsx +1 -1
  252. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +1 -1
  253. package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +5 -1
  254. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AstEdit.tsx +8 -3
  255. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Lsp.tsx +5 -0
  256. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +16 -7
  257. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Resolve.tsx +16 -4
  258. package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +37 -12
  259. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +4 -3
  260. package/src/client/components/workspace/diff-panel/index.tsx +1 -1
  261. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +1 -1
  262. package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +1 -1
  263. package/src/client/components/workspace/file-explorer/Modals.tsx +4 -4
  264. package/src/client/components/workspace/git-panel/Modals.tsx +1 -1
  265. package/src/client/components/workspace/model-dropdown/CloseButton.tsx +38 -0
  266. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +16 -25
  267. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +30 -9
  268. package/src/client/components/workspace/model-dropdown/Header.tsx +33 -21
  269. package/src/client/components/workspace/model-dropdown/Panel.tsx +19 -4
  270. package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +139 -0
  271. package/src/client/components/workspace/model-dropdown/placement.test.tsx +9 -7
  272. package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
  273. package/src/client/components/workspace/wiki-panel/NavModal.tsx +1 -1
  274. package/src/client/data/settings/omp-schema.json +103 -42
  275. package/src/client/hooks/chat/timeline/ask-form-frame.ts +33 -0
  276. package/src/client/hooks/chat/timeline/ask-frame-asks.ts +68 -0
  277. package/src/client/hooks/chat/timeline/ask-frame-buckets.ts +77 -0
  278. package/src/client/hooks/chat/timeline/ask-frames-context.ts +68 -0
  279. package/src/client/hooks/chat/timeline/ask-frames-form.test.ts +170 -0
  280. package/src/client/hooks/chat/timeline/ask-frames.test.ts +1 -1
  281. package/src/client/hooks/chat/timeline/ask-frames.ts +36 -93
  282. package/src/client/hooks/chat/timeline/row-measure.ts +75 -0
  283. package/src/client/hooks/chat/timeline/row-window.test.ts +41 -21
  284. package/src/client/hooks/chat/timeline/row-window.ts +6 -24
  285. package/src/client/hooks/workspace/left-dock.ts +19 -0
  286. package/src/client/hooks/workspace/mobile-panel-nav.ts +90 -0
  287. package/src/client/hooks/workspace/panel-nav.test.ts +42 -21
  288. package/src/client/hooks/workspace/panel-tabs-reveal.test.tsx +286 -0
  289. package/src/client/hooks/workspace/panel-tabs-reveal.ts +174 -0
  290. package/src/client/hooks/workspace/panel-tabs.ts +22 -4
  291. package/src/client/hooks/workspace/session-state/index.test.tsx +145 -0
  292. package/src/client/hooks/workspace/session-state/index.ts +28 -16
  293. package/src/client/lib/ui/phone-row.test.ts +52 -0
  294. package/src/client/lib/ui/phone-row.ts +71 -0
  295. package/src/client/press-state.test.ts +179 -0
  296. package/src/client/tailwind.css +146 -0
  297. package/src/server/lib/bundler/titlebar-css.test.ts +10 -1
  298. package/src/server/lib/omp/rpc/constants.test.ts +6 -1
  299. package/src/shared/lib/chat/ask-form/data.ts +155 -0
  300. package/src/shared/lib/chat/ask-form/fields.ts +4 -0
  301. package/src/shared/lib/chat/ask-form/index.ts +8 -0
  302. package/src/shared/lib/chat/ask-form/types.ts +12 -0
  303. package/src/shared/lib/chat/timeline/tool-verbs.ts +28 -1
  304. package/src/shared/lib/chat/tool/tool-commands.test.ts +102 -0
  305. package/src/shared/lib/chat/tool/tool-commands.ts +124 -0
  306. package/src/shared/lib/omp/config/schema-releases.test.ts +34 -1
  307. package/src/shared/lib/omp/dialog-methods.ts +6 -0
  308. package/src/shared/lib/omp/session/wait-idle.ts +7 -3
  309. package/src/shared/lib/settings/defaults.ts +3 -2
  310. package/src/shared/lib/workspace/panel-nav.test.ts +26 -19
  311. package/src/shared/lib/workspace/panel-nav.ts +20 -9
  312. package/src/shared/types/omp/agent.ts +20 -3
  313. package/src/shared/types/settings/state.ts +17 -5
  314. package/dist/client/static/js/ImageView-6ksvyzqv.js +0 -1
  315. package/dist/client/static/js/LayoutWrapper-px60417t.js +0 -2
  316. package/dist/client/static/js/Modal-yv1718s1.js +0 -59
  317. package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +0 -1
  318. package/dist/client/static/js/bash-mevzaywf.js +0 -1
  319. package/dist/client/static/js/c-y1y6v00q.js +0 -1
  320. package/dist/client/static/js/cpp-wk9z0c5g.js +0 -1
  321. package/dist/client/static/js/css-3w3p9s67.js +0 -1
  322. package/dist/client/static/js/css-g85rwzty.js +0 -1
  323. package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +0 -1
  324. package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +0 -1
  325. package/dist/client/static/js/flowDiagram-KWPJA3E3-hekt0qsb.js +0 -1
  326. package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +0 -1
  327. package/dist/client/static/js/graphql-027z8sc0.js +0 -1
  328. package/dist/client/static/js/html-fqda6wxx.js +0 -1
  329. package/dist/client/static/js/index-252br0k2.js +0 -1
  330. package/dist/client/static/js/index-6bm4pw90.css +0 -1
  331. package/dist/client/static/js/index-80qxk9hx.js +0 -1
  332. package/dist/client/static/js/index-9674dxb4.js +0 -1
  333. package/dist/client/static/js/index-9k4121z4.js +0 -4
  334. package/dist/client/static/js/index-b6454rme.js +0 -12
  335. package/dist/client/static/js/index-ck0fd3aj.js +0 -2
  336. package/dist/client/static/js/index-jdf1tks1.js +0 -2
  337. package/dist/client/static/js/index-q58e8x6j.js +0 -1
  338. package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +0 -1
  339. package/dist/client/static/js/ini-3cx6tmv4.js +0 -1
  340. package/dist/client/static/js/java-zs6qh1dm.js +0 -1
  341. package/dist/client/static/js/javascript-b9mkygak.js +0 -1
  342. package/dist/client/static/js/json-qn73s8xb.js +0 -1
  343. package/dist/client/static/js/jsx-gahhfczw.js +0 -1
  344. package/dist/client/static/js/lua-d8enp14s.js +0 -1
  345. package/dist/client/static/js/markdown-qetaj4vp.js +0 -1
  346. package/dist/client/static/js/one-dark-pro-axkq0m3s.js +0 -1
  347. package/dist/client/static/js/one-light-pncb08qd.js +0 -1
  348. package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +0 -1
  349. package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +0 -1
  350. package/dist/client/static/js/properties-g6tpq003.js +0 -1
  351. package/dist/client/static/js/python-cy06fzhg.js +0 -1
  352. package/dist/client/static/js/r-vw8berfv.js +0 -1
  353. package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +0 -1
  354. package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +0 -1
  355. package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +0 -1
  356. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +0 -1
  357. package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +0 -1
  358. package/dist/client/static/js/sql-bwnasywx.js +0 -1
  359. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-253nz20y.js +0 -8
  360. package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +0 -1
  361. package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +0 -1
  362. package/dist/client/static/js/tsx-3dzv8h6k.js +0 -1
  363. package/dist/client/static/js/typescript-44vs0wn4.js +0 -1
  364. package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +0 -1
  365. package/dist/client/static/js/xml-yvv5fn3k.js +0 -1
  366. package/dist/client/static/js/yaml-avewh7n5.js +0 -1
  367. package/src/client/hooks/workspace/mobile-right-panel-nav.ts +0 -63
  368. package/src/shared/lib/ui/safe-area.test.ts +0 -28
  369. package/src/shared/lib/ui/safe-area.ts +0 -42
@@ -1,7 +1,7 @@
1
- import{$t}from"./index-q36gq3yz.js";import{fn,Tn}from"./index-gcwmpfr4.js";var ap=Tn(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",x="date",b="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,B={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(nt){var D=["th","st","nd","rd"],U=nt%100;return"["+nt+(D[(U-20)%10]||D[U]||D[0])+"]"}},_=function(nt,D,U){var it=String(nt);return!it||it.length>=D?nt:""+Array(D+1-it.length).join(U)+nt},v={s:_,z:function(nt){var D=-nt.utcOffset(),U=Math.abs(D),it=Math.floor(U/60),P=U%60;return(D<=0?"+":"-")+_(it,2,"0")+":"+_(P,2,"0")},m:function nt(D,U){if(D.date()<U.date())return-nt(U,D);var it=12*(U.year()-D.year())+(U.month()-D.month()),P=D.clone().add(it,f),ht=U-P<0,lt=D.clone().add(it+(ht?-1:1),f);return+(-(it+(U-P)/(ht?P-lt:lt-P))||0)},a:function(nt){return nt<0?Math.ceil(nt)||0:Math.floor(nt)},p:function(nt){return{M:f,y:m,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[nt]||String(nt||"").toLowerCase().replace(/s$/,"")},u:function(nt){return nt===void 0}},F="en",I={};I[F]=B;var O="$isDayjsObject",K=function(nt){return nt instanceof ut||!(!nt||!nt[O])},Z=function nt(D,U,it){var P;if(!D)return F;if(typeof D=="string"){var ht=D.toLowerCase();I[ht]&&(P=ht),U&&(I[ht]=U,P=ht);var lt=D.split("-");if(!P&&lt.length>1)return nt(lt[0])}else{var Bt=D.name;I[Bt]=D,P=Bt}return!it&&P&&(F=P),P||!it&&F},rt=function(nt,D){if(K(nt))return nt.clone();var U=typeof D=="object"?D:{};return U.date=nt,U.args=arguments,new ut(U)},st=v;st.l=Z,st.i=K,st.w=function(nt,D){return rt(nt,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var ut=function(){function nt(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[O]=!0}var D=nt.prototype;return D.parse=function(U){this.$d=function(it){var{date:P,utc:ht}=it;if(P===null)return new Date(NaN);if(st.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var lt=P.match(S);if(lt){var Bt=lt[2]-1||0,At=(lt[7]||"0").substring(0,3);return ht?new Date(Date.UTC(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,At)):new Date(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,At)}}return new Date(P)}(U),this.init()},D.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},D.$utils=function(){return st},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function(U,it){var P=rt(U);return this.startOf(it)<=P&&P<=this.endOf(it)},D.isAfter=function(U,it){return rt(U)<this.startOf(it)},D.isBefore=function(U,it){return this.endOf(it)<rt(U)},D.$g=function(U,it,P){return st.u(U)?this[it]:this.set(P,U)},D.unix=function(){return Math.floor(this.valueOf()/1000)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(U,it){var P=this,ht=!!st.u(it)||it,lt=st.p(U),Bt=function(zt,Kt){var Ut=st.w(P.$u?Date.UTC(P.$y,Kt,zt):new Date(P.$y,Kt,zt),P);return ht?Ut:Ut.endOf(n)},At=function(zt,Kt){return st.w(P.toDate()[zt].apply(P.toDate("s"),(ht?[0,0,0,0]:[23,59,59,999]).slice(Kt)),P)},Gt=this.$W,Vt=this.$M,Qt=this.$D,Jt="set"+(this.$u?"UTC":"");switch(lt){case m:return ht?Bt(1,0):Bt(31,11);case f:return ht?Bt(1,Vt):Bt(0,Vt+1);case d:var Pt=this.$locale().weekStart||0,It=(Gt<Pt?Gt+7:Gt)-Pt;return Bt(ht?Qt-It:Qt+(6-It),Vt);case n:case x:return At(Jt+"Hours",0);case c:return At(Jt+"Minutes",1);case a:return At(Jt+"Seconds",2);case o:return At(Jt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(U){return this.startOf(U,!1)},D.$set=function(U,it){var P,ht=st.p(U),lt="set"+(this.$u?"UTC":""),Bt=(P={},P[n]=lt+"Date",P[x]=lt+"Date",P[f]=lt+"Month",P[m]=lt+"FullYear",P[c]=lt+"Hours",P[a]=lt+"Minutes",P[o]=lt+"Seconds",P[s]=lt+"Milliseconds",P)[ht],At=ht===n?this.$D+(it-this.$W):it;if(ht===f||ht===m){var Gt=this.clone().set(x,1);Gt.$d[Bt](At),Gt.init(),this.$d=Gt.set(x,Math.min(this.$D,Gt.daysInMonth())).$d}else Bt&&this.$d[Bt](At);return this.init(),this},D.set=function(U,it){return this.clone().$set(U,it)},D.get=function(U){return this[st.p(U)]()},D.add=function(U,it){var P,ht=this;U=Number(U);var lt=st.p(it),Bt=function(Vt){var Qt=rt(ht);return st.w(Qt.date(Qt.date()+Math.round(Vt*U)),ht)};if(lt===f)return this.set(f,this.$M+U);if(lt===m)return this.set(m,this.$y+U);if(lt===n)return Bt(1);if(lt===d)return Bt(7);var At=(P={},P[a]=e,P[c]=i,P[o]=r,P)[lt]||1,Gt=this.$d.getTime()+U*At;return st.w(Gt,this)},D.subtract=function(U,it){return this.add(-1*U,it)},D.format=function(U){var it=this,P=this.$locale();if(!this.isValid())return P.invalidDate||b;var ht=U||"YYYY-MM-DDTHH:mm:ssZ",lt=st.z(this),Bt=this.$H,At=this.$m,Gt=this.$M,{weekdays:Vt,months:Qt,meridiem:Jt}=P,Pt=function(Kt,Ut,le,ne){return Kt&&(Kt[Ut]||Kt(it,ht))||le[Ut].slice(0,ne)},It=function(Kt){return st.s(Bt%12||12,Kt,"0")},zt=Jt||function(Kt,Ut,le){var ne=Kt<12?"AM":"PM";return le?ne.toLowerCase():ne};return ht.replace(T,function(Kt,Ut){return Ut||function(le){switch(le){case"YY":return String(it.$y).slice(-2);case"YYYY":return st.s(it.$y,4,"0");case"M":return Gt+1;case"MM":return st.s(Gt+1,2,"0");case"MMM":return Pt(P.monthsShort,Gt,Qt,3);case"MMMM":return Pt(Qt,Gt);case"D":return it.$D;case"DD":return st.s(it.$D,2,"0");case"d":return String(it.$W);case"dd":return Pt(P.weekdaysMin,it.$W,Vt,2);case"ddd":return Pt(P.weekdaysShort,it.$W,Vt,3);case"dddd":return Vt[it.$W];case"H":return String(Bt);case"HH":return st.s(Bt,2,"0");case"h":return It(1);case"hh":return It(2);case"a":return zt(Bt,At,!0);case"A":return zt(Bt,At,!1);case"m":return String(At);case"mm":return st.s(At,2,"0");case"s":return String(it.$s);case"ss":return st.s(it.$s,2,"0");case"SSS":return st.s(it.$ms,3,"0");case"Z":return lt}return null}(Kt)||lt.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(U,it,P){var ht,lt=this,Bt=st.p(it),At=rt(U),Gt=(At.utcOffset()-this.utcOffset())*e,Vt=this-At,Qt=function(){return st.m(lt,At)};switch(Bt){case m:ht=Qt()/12;break;case f:ht=Qt();break;case u:ht=Qt()/3;break;case d:ht=(Vt-Gt)/604800000;break;case n:ht=(Vt-Gt)/86400000;break;case c:ht=Vt/i;break;case a:ht=Vt/e;break;case o:ht=Vt/r;break;default:ht=Vt}return P?ht:st.a(ht)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return I[this.$L]},D.locale=function(U,it){if(!U)return this.$L;var P=this.clone(),ht=Z(U,it,!0);return ht&&(P.$L=ht),P},D.clone=function(){return st.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},nt}(),ct=ut.prototype;return rt.prototype=ct,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",x]].forEach(function(nt){ct[nt[1]]=function(D){return this.$g(D,nt[0],nt[1])}}),rt.extend=function(nt,D){return nt.$i||(nt(D,ut,rt),nt.$i=!0),rt},rt.locale=Z,rt.isDayjs=K,rt.unix=function(nt){return rt(1000*nt)},rt.en=I[F],rt.Ls=I,rt.p={},rt})});var Vd=Tn(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|&colon;)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var $s=Tn(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=_b;var Be=Vd();function Sb(r){return Be.relativeFirstCharacters.indexOf(r[0])>-1}function Tb(r){var e=r.replace(Be.ctrlCharactersRegex,"");return e.replace(Be.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function Bb(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function _b(r){if(!r)return Be.BLANK_URL;var e,i=Kd(r.trim());do i=Tb(i).replace(Be.htmlCtrlEntityRegex,"").replace(Be.ctrlCharactersRegex,"").replace(Be.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(Be.ctrlCharactersRegex)||i.match(Be.htmlEntitiesRegex)||i.match(Be.htmlCtrlEntityRegex)||i.match(Be.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Be.BLANK_URL;if(Sb(s))return s;var o=s.trimStart(),a=o.match(Be.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(Be.invalidProtocolRegex.test(c))return Be.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!Bb(n))return Be.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),po=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=fn(ap(),1),rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Qu=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,$e("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",$e("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,$e("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",$e("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,$e("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",$e("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,$e("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",$e("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,$e("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,$e("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("TRACE"))},"setLogLevel"),$e=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Tc=Do;var _y={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Bc=_y;var vy={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=vy;var Ly={channel:Tc,lang:Bc,unit:_c},Nt=Ly;var ir={};for(let r=0;r<=255;r++)ir[r]=Nt.unit.dec2hex(r);var me={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=me.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=me.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=me.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Nt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Nt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Nt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Nt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Nt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Nt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Nt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Nt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(me.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(me.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(me.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(me.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(me.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(me.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var Fy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=Fy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}${ir[Math.round(o*255)]}`;else return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}`}},wr=Ac;var Po={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:(r)=>{let e=r.match(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Nt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Nt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Nt.channel.clamp.h(parseFloat(i)*360)}}return Nt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Nt.channel.clamp.s(parseFloat(o)),l:Nt.channel.clamp.l(parseFloat(a)),a:c?Nt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Nt.lang.round(e)}, ${Nt.lang.round(i)}%, ${Nt.lang.round(s)}%, ${o})`;else return`hsl(${Nt.lang.round(e)}, ${Nt.lang.round(i)}%, ${Nt.lang.round(s)}%)`}},Bi=Po;var Ro={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:(r)=>{r=r.toLowerCase();let e=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ya=Ro;var Ec={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Nt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Nt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Nt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Nt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Nt.lang.round(e)}, ${Nt.lang.round(i)}, ${Nt.lang.round(s)}, ${Nt.lang.round(o)})`;else return`rgb(${Nt.lang.round(e)}, ${Nt.lang.round(i)}, ${Nt.lang.round(s)})`}},_i=Ec;var My={format:{keyword:ya,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ya.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(me.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ye=My;var Ay=(r,e)=>{let i=ye.parse(r);for(let s in e)i[s]=Nt.channel.clamp[s](e[s]);return ye.stringify(i)},qo=Ay;var Ey=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Nt.channel.clamp.r(r),g:Nt.channel.clamp.g(e),b:Nt.channel.clamp.b(i),a:Nt.channel.clamp.a(s)});return ye.stringify(o)},pt=Ey;var $y=(r,e)=>Nt.lang.round(ye.parse(r)[e]),ua=$y;var Iy=(r)=>{let{r:e,g:i,b:s}=ye.parse(r),o=0.2126*Nt.channel.toLinear(e)+0.7152*Nt.channel.toLinear(i)+0.0722*Nt.channel.toLinear(s);return Nt.lang.round(o)},$c=Iy;var Oy=(r)=>$c(r)>=0.5,Ic=Oy;var Dy=(r)=>!Ic(r),Ie=Dy;var Py=(r,e,i)=>{let s=ye.parse(r),o=s[e],a=Nt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ye.stringify(s)},Ul=Py;var Ry=(r,e)=>Ul(r,"l",e),g=Ry;var qy=(r,e)=>Ul(r,"l",-e),A=qy;var Wy=(r,e)=>{let i=ye.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=Wy;var Ny=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ye.parse(r),{r:n,g:d,b:f,a:u}=ye.parse(e),m=i/100,x=m*2-1,b=c-u,T=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,F=a*T+f*B,I=c*m+u*(1-m);return pt(_,v,F,I)},Oc=Ny;var zy=(r,e=100)=>{let i=ye.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=zy;var $f=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Nr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Hy=/\s/,Yy=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
2
- `,o);if(a===-1)break;let c=o;while(c>i&&Hy.test(r[c-1]))c--;e+=r.slice(i,c)+`
3
- `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),zf=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Qi={},Gl=t(function(r,e){r=Yy(r.replace($f,"").replace(Nr,""));for(let[i,{detector:s}]of Object.entries(Qi))if(s(r,e))return i;throw new zf(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),op=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Wc(e,i,s)},"registerLazyLoadedDiagrams"),Wc=t((r,e,i)=>{if(Qi[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Qi[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Hg=t((r)=>Qi[r].loader,"getDiagramLoader"),xa=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>xa(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(c)?[]:{};if(typeof o[a]==="object")o[a]=xa(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),Ve=xa,Ye="#ffffff",je="#f2f2f2",Zt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),jy=class{static{t(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(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||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},Uy=t((r)=>{let e=new jy;return e.calculate(r),e},"getThemeVariables"),Xy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=pt(255,255,255,0.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=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=pt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=pt(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||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(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=g(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=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=g(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=J(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Zt(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=pt(102,102,255,0.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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||A(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},jt=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Ky=class{static{t(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=g("#cde498",10),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(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=A(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Zy=t((r)=>{let e=new Ky;return e.calculate(r),e},"getThemeVariables"),Qy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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||g(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=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(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=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Jy=t((r)=>{let e=new Qy;return e.calculate(r),e},"getThemeVariables"),tx=class{static{t(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=Zt(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||L(r,{h:30}),this.cScale4=this.cScale4||L(r,{h:60}),this.cScale5=this.cScale5||L(r,{h:90}),this.cScale6=this.cScale6||L(r,{h:120}),this.cScale7=this.cScale7||L(r,{h:150}),this.cScale8=this.cScale8||L(r,{h:210,l:150}),this.cScale9=this.cScale9||L(r,{h:270}),this.cScale10=this.cScale10||L(r,{h:300}),this.cScale11=this.cScale11||L(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ex=t((r)=>{let e=new tx;return e.calculate(r),e},"getThemeVariables"),rx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var ix=t((r)=>{let e=new rx;return e.calculate(r),e},"getThemeVariables"),ox=class{static{t(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=Zt("#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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},sx=t((r)=>{let e=new ox;return e.calculate(r),e},"getThemeVariables"),ax=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},nx=t((r)=>{let e=new ax;return e.calculate(r),e},"getThemeVariables"),lx=class{static{t(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=Zt("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ie(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},hx=t((r)=>{let e=new lx;return e.calculate(r),e},"getThemeVariables"),cx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=pt(255,255,255,0.25),this.arrowheadColor=J(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||J(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ie(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||Ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||je}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ux=t((r)=>{let e=new cx;return e.calculate(r),e},"getThemeVariables"),mo={base:{getThemeVariables:Uy},dark:{getThemeVariables:Gy},default:{getThemeVariables:jt},forest:{getThemeVariables:Zy},neutral:{getThemeVariables:Jy},neo:{getThemeVariables:ex},"neo-dark":{getThemeVariables:ix},redux:{getThemeVariables:sx},"redux-dark":{getThemeVariables:nx},"redux-color":{getThemeVariables:hx},"redux-dark-color":{getThemeVariables:ux}},ge={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.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,theme:"redux-color",look:"neo",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:0.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:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",maxTextSize:50000,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},Nc={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:mo.default.getThemeVariables(),sequence:{...ge.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:ge.class?.theme,look:ge.class?.look,layout:ge.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},eventmodeling:{...ge.eventmodeling},treeView:{...ge.treeView,useWidth:void 0},radar:{...ge.radar},usecase:{...ge.usecase},railroad:{...ge.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:{...ge.ishikawa},sankey:{...ge.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:{...ge.venn},cynefin:{...ge.cynefin}},zc=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...zc(r[s],"")];return[...i,e+s]},[]),"keyify"),dx=new Set(zc(Nc,"")),Y=Nc,fx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},px=t((r)=>fx[r]??r,"getDiagramConfigKey"),gx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},mx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Ei=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Ei(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!dx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=gx[e];if(s)mx(r[e],s);else l.debug("sanitizing object",e),Ei(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Uf(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Uf=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),Vo=Object.freeze(Y),yx=["theme","look","layout"],xx=new Set(["classic","handDrawn","neo"]),Cx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(mo,e);return r!=="look"||xx.has(e)},"isUsableAppearance"),bx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&Cx(i,o))},"readAppearance"),$r=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),_e=Ve({},Vo),zo,Ho={},or=[],vi=Ve({},Vo),Ai,kx=t((r,e)=>{if(!Ai)return;let i=[e,...[...or].reverse(),Ho,Vo],s=r[Ai];for(let o of yx)for(let a of i){let c=bx(a,Ai,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Hr=t((r,e)=>{let i=Ve({},r),s={};for(let a of e)Hc(a),s=Ve(s,a);if(i=Ve(i,s),kx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(mo,i.theme)){let a=Ve({},zo),c=Ve(a.themeVariables||{},s.themeVariables);i.themeVariables=mo[i.theme].getThemeVariables(c)}return vi=i,Sx(vi),vi},"updateCurrentConfig"),ip=t((r)=>{Ai=r===void 0?void 0:px(r),Hr(_e,or)},"setDiagramConfigScope"),Wg=t((r)=>{if(_e=Ve({},Vo),_e=Ve(_e,r),Ho=Ve({},r),r.theme&&Object.hasOwn(mo,r.theme))_e.themeVariables=mo[r.theme].getThemeVariables(r.themeVariables);return Hr(_e,or),_e},"setSiteConfig"),Kg=t((r)=>{zo=Ve({},r)},"saveConfigFromInitialize"),Vg=t((r)=>(_e=Ve(_e,r),Ho=Ve(Ho,r),Hr(_e,or),_e),"updateSiteConfig"),Gf=t(()=>Ve({},_e),"getSiteConfig"),jf=t((r)=>(Hr(vi,[r]),C()),"setConfig"),C=t(()=>Ve({},vi),"getConfig"),Hc=t((r)=>{if(!r)return;["secure",..._e.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")Hc(r[e])})},"sanitize"),Yg=t((r)=>{if(Ei(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};or.push(r),Hr(_e,or)},"addDirective"),Ru=t((r=_e)=>{or=[],Ai=void 0,Hr(r,or)},"reset"),wx={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."},Dc={},Yc=t((r)=>{if(Dc[r])return;l.warn(wx[r]),Dc[r]=!0},"issueWarning"),Sx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),Jg=t(()=>{let r={};if(zo)r=Ve(r,zo);for(let e of or)r=Ve(r,e);return r},"getUserDefinedConfig"),qt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Yc("FLOWCHART_HTML_LABELS_DEPRECATED");return $r(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Ms=/<\/?br\s*\/?>/gi,Tx=new RegExp(Ms.source,"i"),Bx=t((r)=>{if(!r)return[""];return Xc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),_x=(()=>{let r=!1;return()=>{if(!r)jc(),r=!0}})();function jc(){$t.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),$t.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(jc,"setupDompurifyHooks");var Uc=t((r)=>(_x(),$t.sanitize(r)),"removeScript"),Pc=t((r,e)=>{if(qt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Uc(r);else if(i!=="loose")r=Xc(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Mx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=$t.sanitize(Pc(r,e),e.dompurifyConfig).toString();else r=$t.sanitize(Pc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),vx=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Lx=t((r)=>Tx.test(r),"hasBreaks"),Fx=t((r)=>r.split(Ms),"splitBreaks"),Mx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=t((r)=>r.replace(Ms,"#br#"),"breakToPlaceholder"),qf=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Ax=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Ex=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),fo=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],c=e[s+1];if($x(a,c))o=a+","+c,s++,i.pop()}i.push(Ix(o))}return i.join("")},"parseGenericTypes"),Ca=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),$x=t((r,e)=>{let i=Ca(r,"~"),s=Ca(e,"~");return i===1&&s===1},"shouldCombineSets"),Ix=t((r)=>{let e=Ca(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Rc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,_t=t((r)=>(r.match(Wo)?.length??0)>0,"hasKatex"),jl=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await ql(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Ox=t(async(r,e)=>{if(!_t(r))return r;if(!(Rc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Wo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Rc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Ms).map((o)=>_t(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Wo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Wo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),ql=t(async(r,e)=>ee(await Ox(r,e),e),"renderKatexSanitized"),w={getRows:Bx,sanitizeText:ee,sanitizeTextOrArray:vx,hasBreaks:Lx,splitBreaks:Fx,lineBreakRegex:Ms,removeScript:Uc,getUrl:qf,evaluate:$r,getMax:Ax,getMin:Ex},Dx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Px=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),te=t(function(r,e,i,s){let o=Px(e,i,s);Dx(r,o)},"configureSvgSize"),zr=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),No={};function sp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
- `)}t(sp,"cssStyleSheetToString");var Rx=t((r,e,i,s)=>{let o="";if(r in No&&No[r])o=No[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
1
+ import{zt}from"./index-4cag7w6k.js";import{hn,Nn}from"./index-2ks0m8ss.js";var up=Nn(function(ha,ca){(function(r,e){typeof ha=="object"&&typeof ca<"u"?ca.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ha,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",m="year",x="date",b="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,B={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(at){var P=["th","st","nd","rd"],U=at%100;return"["+at+(P[(U-20)%10]||P[U]||P[0])+"]"}},_=function(at,P,U){var et=String(at);return!et||et.length>=P?at:""+Array(P+1-et.length).join(U)+at},v={s:_,z:function(at){var P=-at.utcOffset(),U=Math.abs(P),et=Math.floor(U/60),R=U%60;return(P<=0?"+":"-")+_(et,2,"0")+":"+_(R,2,"0")},m:function at(P,U){if(P.date()<U.date())return-at(U,P);var et=12*(U.year()-P.year())+(U.month()-P.month()),R=P.clone().add(et,f),ht=U-R<0,lt=P.clone().add(et+(ht?-1:1),f);return+(-(et+(U-R)/(ht?R-lt:lt-R))||0)},a:function(at){return at<0?Math.ceil(at)||0:Math.floor(at)},p:function(at){return{M:f,y:m,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[at]||String(at||"").toLowerCase().replace(/s$/,"")},u:function(at){return at===void 0}},E="en",O={};O[E]=B;var D="$isDayjsObject",K=function(at){return at instanceof ut||!(!at||!at[D])},Z=function at(P,U,et){var R;if(!P)return E;if(typeof P=="string"){var ht=P.toLowerCase();O[ht]&&(R=ht),U&&(O[ht]=U,R=ht);var lt=P.split("-");if(!R&&lt.length>1)return at(lt[0])}else{var Bt=P.name;O[Bt]=P,R=Bt}return!et&&R&&(E=R),R||!et&&E},tt=function(at,P){if(K(at))return at.clone();var U=typeof P=="object"?P:{};return U.date=at,U.args=arguments,new ut(U)},ot=v;ot.l=Z,ot.i=K,ot.w=function(at,P){return tt(at,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var ut=function(){function at(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[D]=!0}var P=at.prototype;return P.parse=function(U){this.$d=function(et){var{date:R,utc:ht}=et;if(R===null)return new Date(NaN);if(ot.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var lt=R.match(S);if(lt){var Bt=lt[2]-1||0,vt=(lt[7]||"0").substring(0,3);return ht?new Date(Date.UTC(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,vt)):new Date(lt[1],Bt,lt[3]||1,lt[4]||0,lt[5]||0,lt[6]||0,vt)}}return new Date(R)}(U),this.init()},P.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},P.$utils=function(){return ot},P.isValid=function(){return this.$d.toString()!==b},P.isSame=function(U,et){var R=tt(U);return this.startOf(et)<=R&&R<=this.endOf(et)},P.isAfter=function(U,et){return tt(U)<this.startOf(et)},P.isBefore=function(U,et){return this.endOf(et)<tt(U)},P.$g=function(U,et,R){return ot.u(U)?this[et]:this.set(R,U)},P.unix=function(){return Math.floor(this.valueOf()/1000)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(U,et){var R=this,ht=!!ot.u(et)||et,lt=ot.p(U),Bt=function(Nt,Vt){var jt=ot.w(R.$u?Date.UTC(R.$y,Vt,Nt):new Date(R.$y,Vt,Nt),R);return ht?jt:jt.endOf(n)},vt=function(Nt,Vt){return ot.w(R.toDate()[Nt].apply(R.toDate("s"),(ht?[0,0,0,0]:[23,59,59,999]).slice(Vt)),R)},Xt=this.$W,Gt=this.$M,Qt=this.$D,Jt="set"+(this.$u?"UTC":"");switch(lt){case m:return ht?Bt(1,0):Bt(31,11);case f:return ht?Bt(1,Gt):Bt(0,Gt+1);case d:var Ot=this.$locale().weekStart||0,Et=(Xt<Ot?Xt+7:Xt)-Ot;return Bt(ht?Qt-Et:Qt+(6-Et),Gt);case n:case x:return vt(Jt+"Hours",0);case c:return vt(Jt+"Minutes",1);case a:return vt(Jt+"Seconds",2);case o:return vt(Jt+"Milliseconds",3);default:return this.clone()}},P.endOf=function(U){return this.startOf(U,!1)},P.$set=function(U,et){var R,ht=ot.p(U),lt="set"+(this.$u?"UTC":""),Bt=(R={},R[n]=lt+"Date",R[x]=lt+"Date",R[f]=lt+"Month",R[m]=lt+"FullYear",R[c]=lt+"Hours",R[a]=lt+"Minutes",R[o]=lt+"Seconds",R[s]=lt+"Milliseconds",R)[ht],vt=ht===n?this.$D+(et-this.$W):et;if(ht===f||ht===m){var Xt=this.clone().set(x,1);Xt.$d[Bt](vt),Xt.init(),this.$d=Xt.set(x,Math.min(this.$D,Xt.daysInMonth())).$d}else Bt&&this.$d[Bt](vt);return this.init(),this},P.set=function(U,et){return this.clone().$set(U,et)},P.get=function(U){return this[ot.p(U)]()},P.add=function(U,et){var R,ht=this;U=Number(U);var lt=ot.p(et),Bt=function(Gt){var Qt=tt(ht);return ot.w(Qt.date(Qt.date()+Math.round(Gt*U)),ht)};if(lt===f)return this.set(f,this.$M+U);if(lt===m)return this.set(m,this.$y+U);if(lt===n)return Bt(1);if(lt===d)return Bt(7);var vt=(R={},R[a]=e,R[c]=i,R[o]=r,R)[lt]||1,Xt=this.$d.getTime()+U*vt;return ot.w(Xt,this)},P.subtract=function(U,et){return this.add(-1*U,et)},P.format=function(U){var et=this,R=this.$locale();if(!this.isValid())return R.invalidDate||b;var ht=U||"YYYY-MM-DDTHH:mm:ssZ",lt=ot.z(this),Bt=this.$H,vt=this.$m,Xt=this.$M,{weekdays:Gt,months:Qt,meridiem:Jt}=R,Ot=function(Vt,jt,le,ne){return Vt&&(Vt[jt]||Vt(et,ht))||le[jt].slice(0,ne)},Et=function(Vt){return ot.s(Bt%12||12,Vt,"0")},Nt=Jt||function(Vt,jt,le){var ne=Vt<12?"AM":"PM";return le?ne.toLowerCase():ne};return ht.replace(T,function(Vt,jt){return jt||function(le){switch(le){case"YY":return String(et.$y).slice(-2);case"YYYY":return ot.s(et.$y,4,"0");case"M":return Xt+1;case"MM":return ot.s(Xt+1,2,"0");case"MMM":return Ot(R.monthsShort,Xt,Qt,3);case"MMMM":return Ot(Qt,Xt);case"D":return et.$D;case"DD":return ot.s(et.$D,2,"0");case"d":return String(et.$W);case"dd":return Ot(R.weekdaysMin,et.$W,Gt,2);case"ddd":return Ot(R.weekdaysShort,et.$W,Gt,3);case"dddd":return Gt[et.$W];case"H":return String(Bt);case"HH":return ot.s(Bt,2,"0");case"h":return Et(1);case"hh":return Et(2);case"a":return Nt(Bt,vt,!0);case"A":return Nt(Bt,vt,!1);case"m":return String(vt);case"mm":return ot.s(vt,2,"0");case"s":return String(et.$s);case"ss":return ot.s(et.$s,2,"0");case"SSS":return ot.s(et.$ms,3,"0");case"Z":return lt}return null}(Vt)||lt.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(U,et,R){var ht,lt=this,Bt=ot.p(et),vt=tt(U),Xt=(vt.utcOffset()-this.utcOffset())*e,Gt=this-vt,Qt=function(){return ot.m(lt,vt)};switch(Bt){case m:ht=Qt()/12;break;case f:ht=Qt();break;case u:ht=Qt()/3;break;case d:ht=(Gt-Xt)/604800000;break;case n:ht=(Gt-Xt)/86400000;break;case c:ht=Gt/i;break;case a:ht=Gt/e;break;case o:ht=Gt/r;break;default:ht=Gt}return R?ht:ot.a(ht)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return O[this.$L]},P.locale=function(U,et){if(!U)return this.$L;var R=this.clone(),ht=Z(U,et,!0);return ht&&(R.$L=ht),R},P.clone=function(){return ot.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},at}(),ct=ut.prototype;return tt.prototype=ct,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",m],["$D",x]].forEach(function(at){ct[at[1]]=function(P){return this.$g(P,at[0],at[1])}}),tt.extend=function(at,P){return at.$i||(at(P,ut,tt),at.$i=!0),tt},tt.locale=Z,tt.isDayjs=K,tt.unix=function(at){return tt(1000*at)},tt.en=O[E],tt.Ls=O,tt.p={},tt})});var Vd=Nn(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.BLANK_URL=Xd.relativeFirstCharacters=Xd.whitespaceEscapeCharsRegex=Xd.urlSchemeRegex=Xd.ctrlCharactersRegex=Xd.htmlCtrlEntityRegex=Xd.htmlEntitiesRegex=Xd.invalidProtocolRegex=void 0;Xd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xd.urlSchemeRegex=/^.+(:|&colon;)/gim;Xd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xd.relativeFirstCharacters=[".","/"];Xd.BLANK_URL="about:blank"});var Hs=Nn(function(Zd){Object.defineProperty(Zd,"__esModule",{value:!0});Zd.sanitizeUrl=Cb;var Be=Vd();function mb(r){return Be.relativeFirstCharacters.indexOf(r[0])>-1}function yb(r){var e=r.replace(Be.ctrlCharactersRegex,"");return e.replace(Be.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function xb(r){return URL.canParse(r)}function Kd(r){try{return decodeURIComponent(r)}catch(e){return r}}function Cb(r){if(!r)return Be.BLANK_URL;var e,i=Kd(r.trim());do i=yb(i).replace(Be.htmlCtrlEntityRegex,"").replace(Be.ctrlCharactersRegex,"").replace(Be.whitespaceEscapeCharsRegex,"").trim(),i=Kd(i),e=i.match(Be.ctrlCharactersRegex)||i.match(Be.htmlEntitiesRegex)||i.match(Be.htmlCtrlEntityRegex)||i.match(Be.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return Be.BLANK_URL;if(mb(s))return s;var o=s.trimStart(),a=o.match(Be.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(Be.invalidProtocolRegex.test(c))return Be.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!xb(n))return Be.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),uo=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var Sc=hn(up(),1),rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},Pu=t(function(r="fatal"){let e=rr.fatal;if(typeof r==="string"){if(r.toLowerCase()in rr)e=rr[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=rr.fatal)l.fatal=console.error?console.error.bind(console,Ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ie("FATAL"));if(e<=rr.error)l.error=console.error?console.error.bind(console,Ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ie("ERROR"));if(e<=rr.warn)l.warn=console.warn?console.warn.bind(console,Ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ie("WARN"));if(e<=rr.info)l.info=console.info?console.info.bind(console,Ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ie("INFO"));if(e<=rr.debug)l.debug=console.debug?console.debug.bind(console,Ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("DEBUG"));if(e<=rr.trace)l.trace=console.debug?console.debug.bind(console,Ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("TRACE"))},"setLogLevel"),Ie=t((r)=>`%c${Sc.default().format("ss.SSS")} : ${r} : `,"format");var Do={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return Do.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Do.hue2rgb(a,o,r)*255;case"b":return Do.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Tc=Do;var Cy={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Bc=Cy;var by={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},_c=by;var ky={channel:Tc,lang:Bc,unit:_c},Rt=ky;var ir={};for(let r=0;r<=255;r++)ir[r]=Rt.unit.dec2hex(r);var me={ALL:0,RGB:1,HSL:2};class vc{constructor(){this.type=me.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=me.ALL}is(r){return this.type===r}}var Lc=vc;class Fc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Lc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=me.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Rt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Rt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Rt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Rt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Rt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Rt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Rt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Rt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(me.HSL)&&e!==void 0)return e;return this._ensureHSL(),Rt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Rt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Rt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(me.RGB)&&e!==void 0)return e;return this._ensureRGB(),Rt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(me.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(me.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(me.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(me.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(me.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(me.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Mc=Fc;var wy=new Mc({r:0,g:0,b:0,a:0},"transparent"),pr=wy;var Ac={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Ac.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return pr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}${ir[Math.round(o*255)]}`;else return`#${ir[Math.round(e)]}${ir[Math.round(i)]}${ir[Math.round(s)]}`}},wr=Ac;var Po={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:(r)=>{let e=r.match(Po.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Rt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Rt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Rt.channel.clamp.h(parseFloat(i)*360)}}return Rt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Po.re);if(!i)return;let[,s,o,a,c,n]=i;return pr.set({h:Po._hue2deg(s),s:Rt.channel.clamp.s(parseFloat(o)),l:Rt.channel.clamp.l(parseFloat(a)),a:c?Rt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${Rt.lang.round(e)}, ${Rt.lang.round(i)}%, ${Rt.lang.round(s)}%, ${o})`;else return`hsl(${Rt.lang.round(e)}, ${Rt.lang.round(i)}%, ${Rt.lang.round(s)}%)`}},Bi=Po;var Ro={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:(r)=>{r=r.toLowerCase();let e=Ro.colors[r];if(!e)return;return wr.parse(e)},stringify:(r)=>{let e=wr.stringify(r);for(let i in Ro.colors)if(Ro.colors[i]===e)return i;return}},ua=Ro;var Ec={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Ec.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return pr.set({r:Rt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Rt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Rt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Rt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${Rt.lang.round(e)}, ${Rt.lang.round(i)}, ${Rt.lang.round(s)}, ${Rt.lang.round(o)})`;else return`rgb(${Rt.lang.round(e)}, ${Rt.lang.round(i)}, ${Rt.lang.round(s)})`}},_i=Ec;var Sy={format:{keyword:ua,hex:wr,rgb:_i,rgba:_i,hsl:Bi,hsla:Bi},parse:(r)=>{if(typeof r!=="string")return r;let e=wr.parse(r)||_i.parse(r)||Bi.parse(r)||ua.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(me.HSL)||r.data.r===void 0)return Bi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return _i.stringify(r);else return wr.stringify(r)}},ye=Sy;var Ty=(r,e)=>{let i=ye.parse(r);for(let s in e)i[s]=Rt.channel.clamp[s](e[s]);return ye.stringify(i)},qo=Ty;var By=(r,e,i=0,s=1)=>{if(typeof r!=="number")return qo(r,{a:e});let o=pr.set({r:Rt.channel.clamp.r(r),g:Rt.channel.clamp.g(e),b:Rt.channel.clamp.b(i),a:Rt.channel.clamp.a(s)});return ye.stringify(o)},ft=By;var _y=(r,e)=>Rt.lang.round(ye.parse(r)[e]),da=_y;var vy=(r)=>{let{r:e,g:i,b:s}=ye.parse(r),o=0.2126*Rt.channel.toLinear(e)+0.7152*Rt.channel.toLinear(i)+0.0722*Rt.channel.toLinear(s);return Rt.lang.round(o)},$c=vy;var Ly=(r)=>$c(r)>=0.5,Ic=Ly;var Fy=(r)=>!Ic(r),_e=Fy;var My=(r,e,i)=>{let s=ye.parse(r),o=s[e],a=Rt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return ye.stringify(s)},Kl=My;var Ay=(r,e)=>Kl(r,"l",e),g=Ay;var Ey=(r,e)=>Kl(r,"l",-e),A=Ey;var $y=(r,e)=>{let i=ye.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return qo(r,s)},L=$y;var Iy=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=ye.parse(r),{r:n,g:d,b:f,a:u}=ye.parse(e),m=i/100,x=m*2-1,b=c-u,T=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,E=a*T+f*B,O=c*m+u*(1-m);return ft(_,v,E,O)},Oc=Iy;var Oy=(r,e=100)=>{let i=ye.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Oc(i,r,e)},J=Oy;var Vf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Nr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Dy=/\s/,Py=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
2
+ `,o);if(a===-1)break;let c=o;while(c>i&&Dy.test(r[c-1]))c--;e+=r.slice(i,c)+`
3
+ `,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Yf=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Li={},Vl=t(function(r,e){r=Py(r.replace(Vf,"").replace(Nr,""));for(let[i,{detector:s}]of Object.entries(Li))if(s(r,e))return i;throw new Yf(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),dp=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)Wc(e,i,s)},"registerLazyLoadedDiagrams"),Wc=t((r,e,i)=>{if(Li[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Li[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Xg=t((r)=>Li[r].loader,"getDiagramLoader"),ya=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>ya(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(c)?[]:{};if(typeof o[a]==="object")o[a]=ya(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),Ye=ya,je="#ffffff",Ue="#f2f2f2",Zt=t((r,e)=>e?L(r,{s:-40,l:10}):L(r,{s:-40,l:-10}),"mkBorder"),Ry=class{static{t(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(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||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10);else this.rowOdd=this.rowOdd||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(this.mainBkg,5);if(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},qy=t((r)=>{let e=new Ry;return e.calculate(r),e},"getThemeVariables"),Wy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ft(255,255,255,0.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=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=ft(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ft(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||g(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(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=g(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=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=g(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=J(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Ny=t((r)=>{let e=new Wy;return e.calculate(r),e},"getThemeVariables"),zy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Zt(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=ft(102,102,255,0.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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.labelTextColor}if(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||A(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},qt=t((r)=>{let e=new zy;return e.calculate(r),e},"getThemeVariables"),Hy=class{static{t(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=g("#cde498",10),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(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=A(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(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||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(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??L(this.primaryColor,{l:-30}),this.venn2=this.venn2??L(this.secondaryColor,{l:-30}),this.venn3=this.venn3??L(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??L(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??L(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??L(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??L(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Yy=t((r)=>{let e=new Hy;return e.calculate(r),e},"getThemeVariables"),jy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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||g(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=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(this.contrast,30),this.taskBorderColor=A(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=g(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.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=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Uy=t((r)=>{let e=new jy;return e.calculate(r),e},"getThemeVariables"),Xy=class{static{t(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=Zt(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||L(r,{h:30}),this.cScale4=this.cScale4||L(r,{h:60}),this.cScale5=this.cScale5||L(r,{h:90}),this.cScale6=this.cScale6||L(r,{h:120}),this.cScale7=this.cScale7||L(r,{h:150}),this.cScale8=this.cScale8||L(r,{h:210,l:150}),this.cScale9=this.cScale9||L(r,{h:270}),this.cScale10=this.cScale10||L(r,{h:300}),this.cScale11=this.cScale11||L(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=ft(255,255,255,0.25),this.arrowheadColor=J(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var Ky=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Zy=class{static{t(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=Zt("#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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||L(r,{h:64}),this.fillType3=this.fillType3||L(e,{h:64}),this.fillType4=this.fillType4||L(r,{h:-64}),this.fillType5=this.fillType5||L(e,{h:-64}),this.fillType6=this.fillType6||L(r,{h:128}),this.fillType7=this.fillType7||L(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||L(r,{l:-10}),this.pie5=this.pie5||L(e,{l:-10}),this.pie6=this.pie6||L(i,{l:-10}),this.pie7=this.pie7||L(r,{h:60,l:-10}),this.pie8=this.pie8||L(r,{h:-60,l:-10}),this.pie9=this.pie9||L(r,{h:120,l:0}),this.pie10=this.pie10||L(r,{h:60,l:-20}),this.pie11=this.pie11||L(r,{h:-60,l:-20}),this.pie12=this.pie12||L(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=ft(255,255,255,0.25),this.arrowheadColor=J(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||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(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]||L(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||L(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(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||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(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=Zt("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=L(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||L(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||L(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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||r,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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||L(r,{h:-30}),this.git4=this.git4||L(r,{h:-60}),this.git5=this.git5||L(r,{h:-90}),this.git6=this.git6||L(r,{h:60}),this.git7=this.git7||L(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},rx=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),ix=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=ft(255,255,255,0.25),this.arrowheadColor=J(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||J(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||L(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?g(this.quadrant1Fill):A(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?A(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||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(this.git7,25);else 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.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ox=t((r)=>{let e=new ix;return e.calculate(r),e},"getThemeVariables"),po={base:{getThemeVariables:qy},dark:{getThemeVariables:Ny},default:{getThemeVariables:qt},forest:{getThemeVariables:Yy},neutral:{getThemeVariables:Uy},neo:{getThemeVariables:Gy},"neo-dark":{getThemeVariables:Ky},redux:{getThemeVariables:Qy},"redux-dark":{getThemeVariables:tx},"redux-color":{getThemeVariables:rx},"redux-dark-color":{getThemeVariables:ox}},ge={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:0.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,theme:"redux-color",look:"neo",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:0.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:0.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",maxTextSize:50000,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},Nc={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:po.default.getThemeVariables(),sequence:{...ge.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:ge.class?.theme,look:ge.class?.look,layout:ge.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},eventmodeling:{...ge.eventmodeling},treeView:{...ge.treeView,useWidth:void 0},radar:{...ge.radar},usecase:{...ge.usecase},railroad:{...ge.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:{...ge.ishikawa},sankey:{...ge.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:{...ge.venn},cynefin:{...ge.cynefin}},zc=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...zc(r[s],"")];return[...i,e+s]},[]),"keyify"),sx=new Set(zc(Nc,"")),Y=Nc,ax={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},nx=t((r)=>ax[r]??r,"getDiagramConfigKey"),lx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},hx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),Ai=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>Ai(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!sx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=lx[e];if(s)hx(r[e],s);else l.debug("sanitizing object",e),Ai(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Jf(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Jf=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),Yo=Object.freeze(Y),cx=["theme","look","layout"],ux=new Set(["classic","handDrawn","neo"]),dx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(po,e);return r!=="look"||ux.has(e)},"isUsableAppearance"),fx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&dx(i,o))},"readAppearance"),zr=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),ve=Ye({},Yo),zo,Ho={},or=[],vi=Ye({},Yo),Fi,px=t((r,e)=>{if(!Fi)return;let i=[e,...[...or].reverse(),Ho,Yo],s=r[Fi];for(let o of cx)for(let a of i){let c=fx(a,Fi,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Hr=t((r,e)=>{let i=Ye({},r),s={};for(let a of e)Hc(a),s=Ye(s,a);if(i=Ye(i,s),px(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(po,i.theme)){let a=Ye({},zo),c=Ye(a.themeVariables||{},s.themeVariables);i.themeVariables=po[i.theme].getThemeVariables(c)}return vi=i,mx(vi),vi},"updateCurrentConfig"),pp=t((r)=>{Fi=r===void 0?void 0:nx(r),Hr(ve,or)},"setDiagramConfigScope"),eA=t((r)=>{if(ve=Ye({},Yo),ve=Ye(ve,r),Ho=Ye({},r),r.theme&&Object.hasOwn(po,r.theme))ve.themeVariables=po[r.theme].getThemeVariables(r.themeVariables);return Hr(ve,or),ve},"setSiteConfig"),tA=t((r)=>{zo=Ye({},r)},"saveConfigFromInitialize"),nA=t((r)=>(ve=Ye(ve,r),Ho=Ye(Ho,r),Hr(ve,or),ve),"updateSiteConfig"),Zf=t(()=>Ye({},ve),"getSiteConfig"),Xf=t((r)=>(Hr(vi,[r]),C()),"setConfig"),C=t(()=>Ye({},vi),"getConfig"),Hc=t((r)=>{if(!r)return;["secure",...ve.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")Hc(r[e])})},"sanitize"),rA=t((r)=>{if(Ai(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};or.push(r),Hr(ve,or)},"addDirective"),Ou=t((r=ve)=>{or=[],Fi=void 0,Hr(r,or)},"reset"),gx={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."},Dc={},Yc=t((r)=>{if(Dc[r])return;l.warn(gx[r]),Dc[r]=!0},"issueWarning"),mx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Yc("LAZY_LOAD_DEPRECATED")},"checkConfig"),aA=t(()=>{let r={};if(zo)r=Ye(r,zo);for(let e of or)r=Ye(r,e);return r},"getUserDefinedConfig"),Ht=t((r)=>{if(r.flowchart?.htmlLabels!=null)Yc("FLOWCHART_HTML_LABELS_DEPRECATED");return zr(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),Gs=/<\/?br\s*\/?>/gi,yx=new RegExp(Gs.source,"i"),xx=t((r)=>{if(!r)return[""];return Xc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Cx=(()=>{let r=!1;return()=>{if(!r)jc(),r=!0}})();function jc(){zt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),zt.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(jc,"setupDompurifyHooks");var Uc=t((r)=>(Cx(),zt.sanitize(r)),"removeScript"),Pc=t((r,e)=>{if(Ht(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Uc(r);else if(i!=="loose")r=Xc(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=Sx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=zt.sanitize(Pc(r,e),e.dompurifyConfig).toString();else r=zt.sanitize(Pc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),bx=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),kx=t((r)=>yx.test(r),"hasBreaks"),wx=t((r)=>r.split(Gs),"splitBreaks"),Sx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xc=t((r)=>r.replace(Gs,"#br#"),"breakToPlaceholder"),eg=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Tx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Bx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),mo=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],c=e[s+1];if(_x(a,c))o=a+","+c,s++,i.pop()}i.push(vx(o))}return i.join("")},"parseGenericTypes"),xa=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),_x=t((r,e)=>{let i=xa(r,"~"),s=xa(e,"~");return i===1&&s===1},"shouldCombineSets"),vx=t((r)=>{let e=xa(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Rc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Wo=/\$\$(.*?)\$\$/g,St=t((r)=>(r.match(Wo)?.length??0)>0,"hasKatex"),Yl=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await Jl(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Lx=t(async(r,e)=>{if(!St(r))return r;if(!(Rc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Wo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Rc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Gs).map((o)=>St(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Wo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Wo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),Jl=t(async(r,e)=>ee(await Lx(r,e),e),"renderKatexSanitized"),w={getRows:xx,sanitizeText:ee,sanitizeTextOrArray:bx,hasBreaks:kx,splitBreaks:wx,lineBreakRegex:Gs,removeScript:Uc,getUrl:eg,evaluate:zr,getMax:Tx,getMin:Bx},Fx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Mx=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),te=t(function(r,e,i,s){let o=Mx(e,i,s);Fx(r,o)},"configureSvgSize"),Ur=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),No={};function mp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
4
+ `)}t(mp,"cssStyleSheetToString");var Ax=t((r,e,i,s)=>{let o="";if(r in No&&No[r])o=No[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
5
5
  font-family: ${i.fontFamily};
6
6
  font-size: ${i.fontSize};
7
7
  fill: ${i.textColor}
@@ -122,45 +122,45 @@ import{$t}from"./index-q36gq3yz.js";import{fn,Tn}from"./index-gcwmpfr4.js";var a
122
122
  }
123
123
 
124
124
  ${e}
125
- `},"getStyles"),qx=t((r,e)=>{if(e!==void 0)No[r]=e},"addStylesForDiagram"),Zg=Rx,lp={};po(lp,{clear:()=>R,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>q,setAccDescription:()=>z,setAccTitle:()=>M,setDiagramTitle:()=>H});var ba="",ka="",wa="",Sa=t((r)=>ee(r,C()),"sanitizeText"),R=t(()=>{ba="",wa="",ka=""},"clear"),M=t((r)=>{ba=Sa(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>ba,"getAccTitle"),z=t((r)=>{wa=Sa(r).replace(/\n\s+/g,`
126
- `)},"setAccDescription"),j=t(()=>wa,"getAccDescription"),H=t((r)=>{ka=Sa(r)},"setDiagramTitle"),q=t(()=>ka,"getDiagramTitle"),qc=l,Wx=Qu,p=C,da=jf,Ri=Vo,Uo=t((r)=>ee(r,p()),"sanitizeText"),Hl=zr,Nx=t(()=>lp,"getCommonDb"),jo={},Fu=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);qx(r,e.styles),e.injectUtils?.(qc,Wx,p,Uo,Hl,Nx(),()=>{})},"registerDiagram"),cp=t((r)=>{if(r in jo)return jo[r];throw new zx(r)},"getDiagram"),zx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class $i extends Map{constructor(r,e=jx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Hx(this,r),e)}delete(r){return super.delete(Yx(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Hx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Yx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function jx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Ux={value:()=>{}};function Kc(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Xo(i)}function Xo(r){this._=r}function Xx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Xo.prototype=Kc.prototype={constructor:Xo,on:function(r,e){var i=this._,s=Xx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=Gx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Xo(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function Gx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Ux,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Ta=Kc;var Go="http://www.w3.org/1999/xhtml",Ba={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ue(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ba.hasOwnProperty(e)?{space:Ba[e],local:r}:r}function Vx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Go&&e.documentElement.namespaceURI===Go?e.createElement(r):e.createElementNS(i,r)}}function Kx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Ue(r);return(e.local?Kx:Vx)(e)}function Zx(){}function gr(r){return r==null?Zx:function(){return this.querySelector(r)}}function _a(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new fe(s,this._parents)}function va(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Qx(){return[]}function Yr(r){return r==null?Qx:function(){return this.querySelectorAll(r)}}function Jx(r){return function(){return va(r.apply(this,arguments))}}function La(r){if(typeof r==="function")r=Jx(r);else r=Yr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new fe(s,o)}function Xr(r){return function(){return this.matches(r)}}function Ko(r){return function(e){return e.matches(r)}}var t0=Array.prototype.find;function e0(r){return function(){return t0.call(this.children,r)}}function r0(){return this.firstElementChild}function Fa(r){return this.select(r==null?r0:e0(typeof r==="function"?r:Ko(r)))}var i0=Array.prototype.filter;function o0(){return Array.from(this.children)}function s0(r){return function(){return i0.call(this.children,r)}}function Ma(r){return this.selectAll(r==null?o0:s0(typeof r==="function"?r:Ko(r)))}function Aa(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new fe(s,this._parents)}function Di(r){return Array(r.length)}function Ea(){return new fe(this._enter||this._groups.map(Di),this._parents)}function qi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}qi.prototype={constructor:qi,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Ia(r){return function(){return r}}function a0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new qi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function n0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,x=Array(u),b;for(n=0;n<u;++n)if(d=e[n])if(x[n]=b=c.call(d,d.__data__,n,e)+"",f.has(b))o[n]=d;else f.set(b,d);for(n=0;n<m;++n)if(b=c.call(r,a[n],n,a)+"",d=f.get(b))s[n]=d,d.__data__=a[n],f.delete(b);else i[n]=new qi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function l0(r){return r.__data__}function Da(r,e){if(!arguments.length)return Array.from(this,l0);var i=e?n0:a0,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],x=m.length,b=h0(r.call(u,u&&u.__data__,f,s)),S=b.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(x);i(u,m,T,B,_,b,e);for(var v=0,F=0,I,O;v<S;++v)if(I=T[v]){if(v>=F)F=v+1;while(!(O=B[F])&&++F<S);I._next=O||null}}return c=new fe(c,s),c._enter=n,c._exit=d,c}function h0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Pa(){return new fe(this._exit||this._groups.map(Di),this._parents)}function Ra(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function qa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,x=n[d]=Array(m),b,S=0;S<m;++S)if(b=f[S]||u[S])x[S]=b;for(;d<o;++d)n[d]=i[d];return new fe(n,this._parents)}function Wa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Na(r){if(!r)r=c0;function e(m,x){return m&&x?r(m.__data__,x.__data__):!m-!x}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new fe(o,this._parents).order()}function c0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function za(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function u0(r){return function(){this.removeAttribute(r)}}function d0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function f0(r,e){return function(){this.setAttribute(r,e)}}function p0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function g0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function m0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Ga(r,e){var i=Ue(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?d0:u0:typeof e==="function"?i.local?m0:g0:i.local?p0:f0)(i,e))}function Wi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function y0(r){return function(){this.style.removeProperty(r)}}function x0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function C0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Va(r,e,i){return arguments.length>1?this.each((e==null?y0:typeof e==="function"?C0:x0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||Wi(r).getComputedStyle(r,null).getPropertyValue(e)}function b0(r){return function(){delete this[r]}}function k0(r,e){return function(){this[r]=e}}function w0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?b0:typeof e==="function"?w0:k0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function S0(r){return function(){Jc(this,r)}}function T0(r){return function(){tu(this,r)}}function B0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?B0:e?S0:T0)(i,e))}function _0(){this.textContent=""}function v0(r){return function(){this.textContent=r}}function L0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?_0:(typeof r==="function"?L0:v0)(r)):this.node().textContent}function F0(){this.innerHTML=""}function M0(r){return function(){this.innerHTML=r}}function A0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?F0:(typeof r==="function"?A0:M0)(r)):this.node().innerHTML}function E0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(E0)}function $0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each($0)}function on(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function I0(){return null}function sn(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?I0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function O0(){var r=this.parentNode;if(r)r.removeChild(this)}function an(){return this.each(O0)}function D0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function P0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function nn(r){return this.select(r?P0:D0)}function hn(r){return arguments.length?this.property("__data__",r):this.node().__data__}function R0(r){return function(e){r.call(this,e,this.__data__)}}function q0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function W0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function N0(r,e,i){return function(){var s=this.__on,o,a=R0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function cn(r,e,i){var s=q0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?N0:W0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=Wi(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function z0(r,e){return function(){return eu(this,r,e)}}function H0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?H0:z0)(r,e))}function*dn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var pn=[null];function fe(r,e){this._groups=r,this._parents=e}function ru(){return new fe([[document.documentElement]],pn)}function Y0(){return this}fe.prototype=ru.prototype={constructor:fe,select:_a,selectAll:La,selectChild:Fa,selectChildren:Ma,filter:Aa,data:Da,enter:Ea,exit:Pa,join:Ra,merge:qa,selection:Y0,order:Wa,sort:Na,call:za,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:on,insert:sn,remove:an,clone:nn,datum:hn,on:cn,dispatch:un,[Symbol.iterator]:dn};var sr=ru;function h(r){return typeof r==="string"?new fe([[document.querySelector(r)]],[document.documentElement]):new fe([[r]],pn)}function Fi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Wl(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Li(){}var Ni=0.7,es=1/Ni,Vr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",j0=/^#([0-9a-f]{3,8})$/,U0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),X0=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),G0=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${zi}\\)$`),V0=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${zi}\\)$`),K0=new RegExp(`^hsl\\(${zi},${Xe},${Xe}\\)$`),Z0=new RegExp(`^hsla\\(${zi},${Xe},${Xe},${zi}\\)$`),iu={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};Fi(Li,Oa,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:Q0,formatHsl:J0,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function Q0(){return this.rgb().formatHex8()}function J0(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function Oa(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=j0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new Dn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=U0.exec(r))?new Dn(e[1],e[2],e[3],1):(e=X0.exec(r))?new Dn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=G0.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=V0.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=K0.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=Z0.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new Dn(NaN,NaN,NaN,0):null}function au(r){return new Dn(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new Dn(r,e,i,s)}function Hf(r){if(!(r instanceof Li))r=Oa(r);if(!r)return new Dn;return r=r.rgb(),new Dn(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?Hf(r):new Dn(r,e,i,s==null?1:s)}function Dn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Fi(Dn,Kr,Wl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Dn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Dn(Tr(this.r),Tr(this.g),Tr(this.b),rs(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:nu,formatHex:nu,formatHex8:tC,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function tC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Sr(r){return r=Tr(r),(r<16?"0":"")+r.toString(16)}function hu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Pe(r,e,i,s)}function uu(r){if(r instanceof Pe)return new Pe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Li))r=Oa(r);if(!r)return new Pe;if(r instanceof Pe)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Pe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Pe(r,e,i,s==null?1:s)}function Pe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Fi(Pe,du,Wl(Li,{brighter(r){return r=r==null?es:Math.pow(es,r),new Pe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ni:Math.pow(Ni,r),new Pe(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new Dn(gn(r>=240?r-240:r+120,o,s),gn(r,o,s),gn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Pe(cu(this.h),ts(this.s),ts(this.l),rs(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 r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function gn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function mn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return mn((i-s/e)*e,c,o,a,n)}}function xn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],c=r[(s+1)%e],n=r[(s+2)%e];return mn((i-s/e)*e,o,a,c,n)}}var Kl=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function eC(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function Xg(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):Kl(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Yo:function(e,i){return i-e?eC(e,i,r):Kl(isNaN(e)?i:e)}}function Yo(r,e){var i=e-r;return i?fu(r,i):Kl(isNaN(r)?e:r)}var Ps=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Yo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var rC=gu(yn),iC=gu(xn);function En(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var bn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(bn.source,"g");function oC(r){return function(){return r}}function sC(r){return function(e){return r(e)+""}}function Vl(r,e){var i=bn.lastIndex=Cn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=bn.exec(r))&&(o=Cn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:En(s,o)});i=Cn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?sC(d[0].x):oC(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push("translate(",null,e,null,i);S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m||x)b.push("translate("+m+e+x+i)}function c(f,u,m,x){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;x.push({i:m.push(o(m)+"rotate(",null,s)-2,x:En(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,x){if(f!==u)x.push({i:m.push(o(m)+"skewX(",null,s)-2,x:En(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push(o(b)+"scale(",null,",",null,")");S.push({i:T-4,x:En(f,m)},{i:T-2,x:En(u,x)})}else if(m!==1||x!==1)b.push(o(b)+"scale("+m+","+x+")")}return function(f,u){var m=[],x=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,x),c(f.rotate,u.rotate,m,x),n(f.skewX,u.skewX,m,x),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,x),f=u=null,function(b){var S=-1,T=x.length,B;while(++S<T)m[(B=x[S]).i]=B.x(b);return m.join("")}}}var kn=Cu(yu,"px, ","px)","deg)"),wn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Gi(){return Br||(wu(aC),Br=Ui.now()+ls)}function aC(){Br=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=hs.prototype={constructor:Xi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Gi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Sn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Sn()}};function hs(r,e,i){var s=new Xi;return s.restart(r,e,i),s}function Su(){Gi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Ui.now())+ls,Zr=Yi=0;try{Su()}finally{Zr=0,lC(),Br=0}}function nC(){var r=Ui.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function lC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;ji=r,Sn(s)}function Sn(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Ui.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Ui.now(),Hi=setInterval(nC,ku);Zr=1,wu(bu)}}function Vi(r,e,i){var s=new Xi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var hC=Ta("start","end","cancel","interrupt"),cC=[],_u=0,Tu=1,us=2,cs=3,Bu=4,ds=5,Ki=6;function ar(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;uC(r,i,{name:e,index:s,group:o,on:hC,tween:cC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:_u})}function Zi(r,e){var i=xe(r,e);if(i.state>_u)throw Error("too late; already scheduled");return i}function be(r,e){var i=xe(r,e);if(i.state>cs)throw Error("too late; already running");return i}function xe(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function uC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Tu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,x,b;if(i.state!==Tu)return d();for(u in s){if(b=s[u],b.name!==i.name)continue;if(b.state===cs)return Vi(c);if(b.state===Bu)b.state=Ki,b.timer.stop(),b.on.call("interrupt",r,r.__data__,b.index,b.group),delete s[u];else if(+u<e)b.state=Ki,b.timer.stop(),b.on.call("cancel",r,r.__data__,b.index,b.group),delete s[u]}if(Vi(function(){if(i.state===cs)i.state=Bu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(x=i.tween.length);for(u=0,m=-1;u<x;++u)if(b=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=b;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,x=o.length;while(++m<x)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Ki,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Ki,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function _n(r){return this.each(function(){Ji(this,r)})}function dC(r,e){var i,s;return function(){var o=be(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function fC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=be(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function vn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=xe(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?dC:fC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=be(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return xe(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?En:e instanceof Oa?Ps:(i=Oa(e))?(e=i,Ps):Vl)(r,e)}function pC(r){return function(){this.removeAttribute(r)}}function gC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function mC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function yC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function xC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function CC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function Ln(r,e){var i=Ue(r),s=i==="transform"?wn:to;return this.attrTween(r,typeof e==="function"?(i.local?CC:xC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?gC:pC)(i):(i.local?yC:mC)(i,s,e))}function bC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function kC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function wC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&kC(r,a);return i}return o._value=e,o}function SC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&bC(r,a);return i}return o._value=e,o}function Fn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Ue(r);return this.tween(i,(s.local?wC:SC)(s,e))}function TC(r,e){return function(){Zi(this,r).delay=+e.apply(this,arguments)}}function BC(r,e){return e=+e,function(){Zi(this,r).delay=e}}function Mn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?TC:BC)(e,r)):xe(this.node(),e).delay}function _C(r,e){return function(){be(this,r).duration=+e.apply(this,arguments)}}function vC(r,e){return e=+e,function(){be(this,r).duration=e}}function An(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?_C:vC)(e,r)):xe(this.node(),e).duration}function LC(r,e){if(typeof e!=="function")throw Error();return function(){be(this,r).ease=e}}function $n(r){var e=this._id;return arguments.length?this.each(LC(e,r)):xe(this.node(),e).ease}function FC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();be(this,r).ease=i}}function In(r){if(typeof r!=="function")throw Error();return this.each(FC(this._id,r))}function On(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new ve(s,this._parents,this._name,this._id)}function Pn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),x,b=0;b<u;++b)if(x=d[b]||f[b])m[b]=x;for(;n<s;++n)c[n]=e[n];return new ve(c,this._parents,this._name,this._id)}function MC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function AC(r,e,i){var s,o,a=MC(e)?Zi:be;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function Rn(r,e){var i=this._id;return arguments.length<2?xe(this.node(),i).on.on(r):this.each(AC(i,r,e))}function EC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function qn(){return this.on("end.remove",EC(this._id))}function zn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,x=0;x<d;++x)if((u=n[x])&&(m=r.call(u,u.__data__,x,n))){if("__data__"in u)m.__data__=u.__data__;f[x]=m,ar(f[x],e,i,x,f,xe(u,i))}return new ve(a,this._parents,e,i)}function Hn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Yr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var x=r.call(u,u.__data__,m,d),b,S=xe(u,i),T=0,B=x.length;T<B;++T)if(b=x[T])ar(b,e,i,T,x,S);a.push(x),c.push(u)}return new ve(a,c,e,i)}var $C=sr.prototype.constructor;function jn(){return new $C(this._groups,this._parents)}function IC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function vu(r){return function(){this.style.removeProperty(r)}}function OC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function DC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function PC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=be(this,r),f=d.on,u=d.value[a]==null?n||(n=vu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Un(r,e,i){var s=(r+="")==="transform"?kn:to;return e==null?this.styleTween(r,IC(r,s)).on("end.style."+r,vu(r)):typeof e==="function"?this.styleTween(r,DC(r,s,Qr(this,"style."+r,e))).each(PC(this._id,r)):this.styleTween(r,OC(r,s,e),i).on("end.style."+r,null)}function RC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function qC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&RC(r,c,i);return s}return a._value=e,a}function Xn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,qC(r,e,i==null?"":i))}function WC(r){return function(){this.textContent=r}}function NC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Gn(r){return this.tween("text",typeof r==="function"?NC(Qr(this,"text",r)):WC(r==null?"":r+""))}function zC(r){return function(e){this.textContent=r.call(this,e)}}function HC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&zC(o);return e}return s._value=r,s}function Zn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,HC(r))}function Jn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=xe(d,e);ar(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ve(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=be(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var YC=0;function ve(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Au(r){return sr().transition(r)}function fs(){return++YC}var nr=sr.prototype;ve.prototype=Au.prototype={constructor:ve,select:zn,selectAll:Hn,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:On,merge:Pn,selection:jn,transition:Jn,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:Rn,attr:Ln,attrTween:Fn,style:Un,styleTween:Xn,text:Gn,textTween:Zn,remove:qn,tween:vn,delay:Mn,duration:An,ease:$n,easeVarying:In,end:tl,[Symbol.iterator]:nr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var jC={time:null,delay:0,duration:250,ease:ps};function UC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof ve)e=r._id,r=r._name;else e=fs(),(i=jC).time=Gi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])ar(d,r,e,f,c,i||UC(d,e));return new ve(s,this._parents,r,e)}sr.prototype.interrupt=_n;sr.prototype.transition=el;var{abs:oF,max:sF,min:aF}=Math;function Eu(r){return[+r[0],+r[1]]}function XC(r){return[Eu(r[0]),Eu(r[1])]}var nF={name:"x",handles:["w","e"].map(rl),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},lF={name:"y",handles:["n","s"].map(rl),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},hF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:XC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var GC=ol-0.000001;function Iu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function VC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Iu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Iu:VC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let x=i-a,b=s-c,S=n*n+d*d,T=x*x+b*b,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),F=v/_,I=v/B;if(Math.abs(F-1)>0.000001)this._append`L${r+F*f},${e+F*u}`;this._append`A${o},${o},0,0,${+(u*x>f*b)},${this._x1=r+I*n},${this._y1=e+I*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>GC)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Du(){return new Jr}Du.prototype=Jr.prototype;function Ao(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var sl=Symbol("implicit");function Wn(){var r=new $i,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new $i;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return Wn(e,i).unknown(s)},Ao.apply(o,arguments),o}function yt(r){return function(){return r}}var{abs:al,atan2:ke,cos:yr,max:qu,min:gs,sin:Re,sqrt:_r}=Math,Ce=0.000000000001,ti=Math.PI,eo=ti/2,Yl=2*ti;function Wu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Jr(e)}function KC(r){return r.innerRadius}function ZC(r){return r.outerRadius}function QC(r){return r.startAngle}function JC(r){return r.endAngle}function tb(r){return r&&r.padAngle}function eb(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,x=m*d-u*f;if(x*x<Ce)return;return x=(u*(e-a)-m*(r-o))/x,[r+x*d,e+x*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,x=r+u,b=e+m,S=i+u,T=s+m,B=(x+S)/2,_=(b+T)/2,v=S-x,F=T-b,I=v*v+F*F,O=o-a,K=x*T-S*b,Z=(F<0?-1:1)*_r(qu(0,O*O*I-K*K)),rt=(K*F-v*Z)/I,st=(-K*v-F*Z)/I,ut=(K*F+v*Z)/I,ct=(-K*v+F*Z)/I,nt=rt-B,D=st-_,U=ut-B,it=ct-_;if(nt*nt+D*D>U*U+it*it)rt=ut,st=ct;return{cx:rt,cy:st,x01:-u,y01:-m,x11:rt*(o/O-1),y11:st*(o/O-1)}}function Ur(){var r=KC,e=ZC,i=yt(0),s=null,o=QC,a=JC,c=tb,n=null,d=ms(f);function f(){var u,m,x=+r.apply(this,arguments),b=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(b<x)m=b,b=x,x=m;if(!(b>Ce))n.moveTo(0,0);else if(B>Yl-Ce){if(n.moveTo(b*yr(S),b*Re(S)),n.arc(0,0,b,S,T,!_),x>Ce)n.moveTo(x*yr(T),x*Re(T)),n.arc(0,0,x,T,S,_)}else{var v=S,F=T,I=S,O=T,K=B,Z=B,rt=c.apply(this,arguments)/2,st=rt>Ce&&(s?+s.apply(this,arguments):_r(x*x+b*b)),ut=gs(al(b-x)/2,+i.apply(this,arguments)),ct=ut,nt=ut,D,U;if(st>Ce){var it=nl(st/x*Re(rt)),P=nl(st/b*Re(rt));if((K-=it*2)>Ce)it*=_?1:-1,I+=it,O-=it;else K=0,I=O=(S+T)/2;if((Z-=P*2)>Ce)P*=_?1:-1,v+=P,F-=P;else Z=0,v=F=(S+T)/2}var ht=b*yr(v),lt=b*Re(v),Bt=x*yr(O),At=x*Re(O);if(ut>Ce){var Gt=b*yr(F),Vt=b*Re(F),Qt=x*yr(I),Jt=x*Re(I),Pt;if(B<ti)if(Pt=eb(ht,lt,Qt,Jt,Gt,Vt,Bt,At)){var It=ht-Pt[0],zt=lt-Pt[1],Kt=Gt-Pt[0],Ut=Vt-Pt[1],le=1/Re(Wu((It*Kt+zt*Ut)/(_r(It*It+zt*zt)*_r(Kt*Kt+Ut*Ut)))/2),ne=_r(Pt[0]*Pt[0]+Pt[1]*Pt[1]);ct=gs(ut,(x-ne)/(le-1)),nt=gs(ut,(b-ne)/(le+1))}else ct=nt=0}if(!(Z>Ce))n.moveTo(ht,lt);else if(nt>Ce)if(D=ys(Qt,Jt,ht,lt,b,nt,_),U=ys(Gt,Vt,Bt,At,b,nt,_),n.moveTo(D.cx+D.x01,D.cy+D.y01),nt<ut)n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,nt,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,b,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),!_),n.arc(U.cx,U.cy,nt,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.moveTo(ht,lt),n.arc(0,0,b,v,F,!_);if(!(x>Ce)||!(K>Ce))n.lineTo(Bt,At);else if(ct>Ce)if(D=ys(Bt,At,Gt,Vt,x,-ct,_),U=ys(ht,lt,Qt,Jt,x,-ct,_),n.lineTo(D.cx+D.x01,D.cy+D.y01),ct<ut)n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(U.y01,U.x01),!_);else n.arc(D.cx,D.cy,ct,ke(D.y01,D.x01),ke(D.y11,D.x11),!_),n.arc(0,0,x,ke(D.cy+D.y11,D.cx+D.x11),ke(U.cy+U.y11,U.cx+U.x11),_),n.arc(U.cx,U.cy,ct,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.arc(0,0,x,O,I,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,Re(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:yt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:yt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:yt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:yt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:yt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:yt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:yt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var zF=Array.prototype.slice;function Lu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Nu(r){this._context=r}Nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function pa(r){return new Nu(r)}function Hu(r){return r[0]}function Yu(r){return r[1]}function Os(r,e){var i=yt(!0),s=null,o=pa,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Hu:yt(r),e=typeof e==="function"?e:e===void 0?Yu:yt(e);function n(d){var f,u=(d=Lu(d)).length,m,x=!1,b;if(s==null)a=o(b=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===x)if(x=!x)a.lineStart();else a.lineEnd();if(x)a.point(+r(m,f,d),+e(m,f,d))}if(b)return a=null,b+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:yt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:yt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:yt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Ae(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function oo(r){this._context=r}oo.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:ei(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function ju(r){this._context=r}ju.prototype={areaStart:Ae,areaEnd:Ae,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new ju(r)}function Xu(r){this._context=r}Xu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Gu(r,e){this._basis=new oo(r),this._beta=e}Gu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Gu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Ae,areaEnd:Ae,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>Ce){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>Ce){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Vu(r,e){this._context=r,this._alpha=e}Vu.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}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var no=function r(e){function i(s){return e?new Vu(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ku(r,e){this._context=r,this._alpha=e}Ku.prototype={areaStart:Ae,areaEnd:Ae,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dl=function r(e){function i(s){return e?new Ku(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fl=function r(e){function i(s){return e?new Zu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Ae,areaEnd:Ae,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function lo(r){return new Ts(r)}function co(r){return new id(r)}function ad(r){this._context=r}ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function oi(r){return new Bs(r,0.5)}function uo(r){return new Bs(r,0)}function go(r){return new Bs(r,1)}function xr(r,e,i){this.k=r,this.x=e,this.y=i}xr.prototype={constructor:xr,scale:function(r){return r===1?this:new xr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new xr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var de=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var Se={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
125
+ `},"getStyles"),Ex=t((r,e)=>{if(e!==void 0)No[r]=e},"addStylesForDiagram"),oA=Ax,fp={};uo(fp,{clear:()=>F,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>q,setAccDescription:()=>z,setAccTitle:()=>M,setDiagramTitle:()=>H});var Ca="",ba="",ka="",wa=t((r)=>ee(r,C()),"sanitizeText"),F=t(()=>{Ca="",ka="",ba=""},"clear"),M=t((r)=>{Ca=wa(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>Ca,"getAccTitle"),z=t((r)=>{ka=wa(r).replace(/\n\s+/g,`
126
+ `)},"setAccDescription"),j=t(()=>ka,"getAccDescription"),H=t((r)=>{ba=wa(r)},"setDiagramTitle"),q=t(()=>ba,"getDiagramTitle"),qc=l,$x=Pu,p=C,pa=Xf,Mi=Yo,Uo=t((r)=>ee(r,p()),"sanitizeText"),Zl=Ur,Ix=t(()=>fp,"getCommonDb"),jo={},$u=t((r,e,i)=>{if(jo[r])qc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(jo[r]=e,i)Wc(r,i);Ex(r,e.styles),e.injectUtils?.(qc,$x,p,Uo,Zl,Ix(),()=>{})},"registerDiagram"),gp=t((r)=>{if(r in jo)return jo[r];throw new Ox(r)},"getDiagram"),Ox=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class Ei extends Map{constructor(r,e=Rx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(Gc(this,r))}has(r){return super.has(Gc(this,r))}set(r,e){return super.set(Dx(this,r),e)}delete(r){return super.delete(Px(this,r))}}function Gc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Dx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Px({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Rx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var qx={value:()=>{}};function Kc(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Go(i)}function Go(r){this._=r}function Wx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Go.prototype=Kc.prototype={constructor:Go,on:function(r,e){var i=this._,s=Wx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=Nx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=Vc(i[o],r.name,e);else if(e==null)for(o in i)i[o]=Vc(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Go(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function Nx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function Vc(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=qx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var Sa=Kc;var Vo="http://www.w3.org/1999/xhtml",Ta={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xe(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return Ta.hasOwnProperty(e)?{space:Ta[e],local:r}:r}function zx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Vo&&e.documentElement.namespaceURI===Vo?e.createElement(r):e.createElementNS(i,r)}}function Hx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Ii(r){var e=Xe(r);return(e.local?Hx:zx)(e)}function Yx(){}function gr(r){return r==null?Yx:function(){return this.querySelector(r)}}function Ba(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new de(s,this._parents)}function _a(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function jx(){return[]}function Yr(r){return r==null?jx:function(){return this.querySelectorAll(r)}}function Ux(r){return function(){return _a(r.apply(this,arguments))}}function va(r){if(typeof r==="function")r=Ux(r);else r=Yr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new de(s,o)}function Xr(r){return function(){return this.matches(r)}}function Ko(r){return function(e){return e.matches(r)}}var Xx=Array.prototype.find;function Gx(r){return function(){return Xx.call(this.children,r)}}function Vx(){return this.firstElementChild}function La(r){return this.select(r==null?Vx:Gx(typeof r==="function"?r:Ko(r)))}var Kx=Array.prototype.filter;function Zx(){return Array.from(this.children)}function Qx(r){return function(){return Kx.call(this.children,r)}}function Fa(r){return this.selectAll(r==null?Zx:Qx(typeof r==="function"?r:Ko(r)))}function Ma(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new de(s,this._parents)}function Di(r){return Array(r.length)}function Ea(){return new de(this._enter||this._groups.map(Di),this._parents)}function Ri(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Ri.prototype={constructor:Ri,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function Ia(r){return function(){return r}}function Jx(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new Ri(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function t0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,m=a.length,x=Array(u),b;for(n=0;n<u;++n)if(d=e[n])if(x[n]=b=c.call(d,d.__data__,n,e)+"",f.has(b))o[n]=d;else f.set(b,d);for(n=0;n<m;++n)if(b=c.call(r,a[n],n,a)+"",d=f.get(b))s[n]=d,d.__data__=a[n],f.delete(b);else i[n]=new Ri(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function e0(r){return r.__data__}function Oa(r,e){if(!arguments.length)return Array.from(this,e0);var i=e?t0:Jx,s=this._parents,o=this._groups;if(typeof r!=="function")r=Ia(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],m=o[f],x=m.length,b=r0(r.call(u,u&&u.__data__,f,s)),S=b.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(x);i(u,m,T,B,_,b,e);for(var v=0,E=0,O,D;v<S;++v)if(O=T[v]){if(v>=E)E=v+1;while(!(D=B[E])&&++E<S);O._next=D||null}}return c=new de(c,s),c._enter=n,c._exit=d,c}function r0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Da(){return new de(this._exit||this._groups.map(Di),this._parents)}function Pa(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function Ra(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],m=f.length,x=n[d]=Array(m),b,S=0;S<m;++S)if(b=f[S]||u[S])x[S]=b;for(;d<o;++d)n[d]=i[d];return new de(n,this._parents)}function qa(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function Wa(r){if(!r)r=i0;function e(m,x){return m&&x?r(m.__data__,x.__data__):!m-!x}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new de(o,this._parents).order()}function i0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Na(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ha(){return Array.from(this)}function Ya(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var c=s[o];if(c)return c}return null}function ja(){let r=0;for(let e of this)++r;return r}function Ua(){return!this.node()}function Xa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function o0(r){return function(){this.removeAttribute(r)}}function s0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function a0(r,e){return function(){this.setAttribute(r,e)}}function n0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function l0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function h0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Ga(r,e){var i=Xe(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?s0:o0:typeof e==="function"?i.local?h0:l0:i.local?n0:a0)(i,e))}function qi(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function c0(r){return function(){this.style.removeProperty(r)}}function u0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function d0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Va(r,e,i){return arguments.length>1?this.each((e==null?c0:typeof e==="function"?d0:u0)(r,e,i==null?"":i)):mr(this.node(),r)}function mr(r,e){return r.style.getPropertyValue(e)||qi(r).getComputedStyle(r,null).getPropertyValue(e)}function f0(r){return function(){delete this[r]}}function p0(r,e){return function(){this[r]=e}}function g0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function Ka(r,e){return arguments.length>1?this.each((e==null?f0:typeof e==="function"?g0:p0)(r,e)):this.node()[r]}function Zc(r){return r.trim().split(/^|\s+/)}function Za(r){return r.classList||new Qc(r)}function Qc(r){this._node=r,this._names=Zc(r.getAttribute("class")||"")}Qc.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function Jc(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function tu(r,e){var i=Za(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function m0(r){return function(){Jc(this,r)}}function y0(r){return function(){tu(this,r)}}function x0(r,e){return function(){(e.apply(this,arguments)?Jc:tu)(this,r)}}function Qa(r,e){var i=Zc(r+"");if(arguments.length<2){var s=Za(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?x0:e?m0:y0)(i,e))}function C0(){this.textContent=""}function b0(r){return function(){this.textContent=r}}function k0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ja(r){return arguments.length?this.each(r==null?C0:(typeof r==="function"?k0:b0)(r)):this.node().textContent}function w0(){this.innerHTML=""}function S0(r){return function(){this.innerHTML=r}}function T0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function tn(r){return arguments.length?this.each(r==null?w0:(typeof r==="function"?T0:S0)(r)):this.node().innerHTML}function B0(){if(this.nextSibling)this.parentNode.appendChild(this)}function en(){return this.each(B0)}function _0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rn(){return this.each(_0)}function on(r){var e=typeof r==="function"?r:Ii(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function v0(){return null}function sn(r,e){var i=typeof r==="function"?r:Ii(r),s=e==null?v0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function L0(){var r=this.parentNode;if(r)r.removeChild(this)}function an(){return this.each(L0)}function F0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function M0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function nn(r){return this.select(r?M0:F0)}function ln(r){return arguments.length?this.property("__data__",r):this.node().__data__}function A0(r){return function(e){r.call(this,e,this.__data__)}}function E0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function $0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function I0(r,e,i){return function(){var s=this.__on,o,a=A0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function cn(r,e,i){var s=E0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?I0:$0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function eu(r,e,i){var s=qi(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function O0(r,e){return function(){return eu(this,r,e)}}function D0(r,e){return function(){return eu(this,r,e.apply(this,arguments))}}function un(r,e){return this.each((typeof e==="function"?D0:O0)(r,e))}function*fn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var pn=[null];function de(r,e){this._groups=r,this._parents=e}function ru(){return new de([[document.documentElement]],pn)}function P0(){return this}de.prototype=ru.prototype={constructor:de,select:Ba,selectAll:va,selectChild:La,selectChildren:Fa,filter:Ma,data:Oa,enter:Ea,exit:Da,join:Pa,merge:Ra,selection:P0,order:qa,sort:Wa,call:Na,nodes:Ha,node:Ya,size:ja,empty:Ua,each:Xa,attr:Ga,style:Va,property:Ka,classed:Qa,text:Ja,html:tn,raise:en,lower:rn,append:on,insert:sn,remove:an,clone:nn,datum:ln,on:cn,dispatch:un,[Symbol.iterator]:fn};var sr=ru;function h(r){return typeof r==="string"?new de([[document.querySelector(r)]],[document.documentElement]):new de([[r]],pn)}function Pi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Xl(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Oi(){}var Wi=0.7,es=1/Wi,Vr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R0=/^#([0-9a-f]{3,8})$/,q0=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),W0=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),N0=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${Ni}\\)$`),z0=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${Ni}\\)$`),H0=new RegExp(`^hsl\\(${Ni},${Ge},${Ge}\\)$`),Y0=new RegExp(`^hsla\\(${Ni},${Ge},${Ge},${Ni}\\)$`),iu={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};Pi(Oi,$a,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:ou,formatHex:ou,formatHex8:j0,formatHsl:U0,formatRgb:su,toString:su});function ou(){return this.rgb().formatHex()}function j0(){return this.rgb().formatHex8()}function U0(){return uu(this).formatHsl()}function su(){return this.rgb().formatRgb()}function $a(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=R0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?au(e):i===3?new Qn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=q0.exec(r))?new Qn(e[1],e[2],e[3],1):(e=W0.exec(r))?new Qn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=N0.exec(r))?Qo(e[1],e[2],e[3],e[4]):(e=z0.exec(r))?Qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=H0.exec(r))?hu(e[1],e[2]/100,e[3]/100,1):(e=Y0.exec(r))?hu(e[1],e[2]/100,e[3]/100,e[4]):iu.hasOwnProperty(r)?au(iu[r]):r==="transparent"?new Qn(NaN,NaN,NaN,0):null}function au(r){return new Qn(r>>16&255,r>>8&255,r&255,1)}function Qo(r,e,i,s){if(s<=0)r=e=i=NaN;return new Qn(r,e,i,s)}function tg(r){if(!(r instanceof Oi))r=$a(r);if(!r)return new Qn;return r=r.rgb(),new Qn(r.r,r.g,r.b,r.opacity)}function Kr(r,e,i,s){return arguments.length===1?tg(r):new Qn(r,e,i,s==null?1:s)}function Qn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Pi(Qn,Kr,Xl(Oi,{brighter(r){return r=r==null?es:Math.pow(es,r),new Qn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new Qn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Qn(Tr(this.r),Tr(this.g),Tr(this.b),rs(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:nu,formatHex:nu,formatHex8:X0,formatRgb:lu,toString:lu}));function nu(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function X0(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function lu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Sr(r){return r=Tr(r),(r<16?"0":"")+r.toString(16)}function hu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Pe(r,e,i,s)}function uu(r){if(r instanceof Pe)return new Pe(r.h,r.s,r.l,r.opacity);if(!(r instanceof Oi))r=$a(r);if(!r)return new Pe;if(r instanceof Pe)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Pe(c,n,d,r.opacity)}function du(r,e,i,s){return arguments.length===1?uu(r):new Pe(r,e,i,s==null?1:s)}function Pe(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Pi(Pe,du,Xl(Oi,{brighter(r){return r=r==null?es:Math.pow(es,r),new Pe(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Wi:Math.pow(Wi,r),new Pe(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new Qn(gn(r>=240?r-240:r+120,o,s),gn(r,o,s),gn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Pe(cu(this.h),ts(this.s),ts(this.l),rs(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 r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${cu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function cu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function gn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function mn(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function yn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return mn((i-s/e)*e,c,o,a,n)}}function xn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],c=r[(s+1)%e],n=r[(s+2)%e];return mn((i-s/e)*e,o,a,c,n)}}var ec=(r)=>()=>r;function fu(r,e){return function(i){return r+i*e}}function G0(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function iA(r,e){var i=e-r;return i?fu(r,i>180||i<-180?i-360*Math.round(i/360):i):ec(isNaN(r)?e:r)}function pu(r){return(r=+r)===1?Jo:function(e,i){return i-e?G0(e,i,r):ec(isNaN(e)?i:e)}}function Jo(r,e){var i=e-r;return i?fu(r,i):ec(isNaN(r)?e:r)}var js=function r(e){var i=pu(e);function s(o,a){var c=i((o=Kr(o)).r,(a=Kr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Jo(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function gu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Kr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var V0=gu(yn),K0=gu(xn);function _n(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var bn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(bn.source,"g");function Z0(r){return function(){return r}}function Q0(r){return function(e){return r(e)+""}}function tc(r,e){var i=bn.lastIndex=Cn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=bn.exec(r))&&(o=Cn.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:_n(s,o)});i=Cn.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?Q0(d[0].x):Z0(e):(e=d.length,function(f){for(var u=0,m;u<e;++u)n[(m=d[u]).i]=m.x(f);return n.join("")})}var mu=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*mu,skewX:Math.atan(d)*mu,scaleX:c,scaleY:n}}var ss;function yu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Cu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push("translate(",null,e,null,i);S.push({i:T-4,x:_n(f,m)},{i:T-2,x:_n(u,x)})}else if(m||x)b.push("translate("+m+e+x+i)}function c(f,u,m,x){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;x.push({i:m.push(o(m)+"rotate(",null,s)-2,x:_n(f,u)})}else if(u)m.push(o(m)+"rotate("+u+s)}function n(f,u,m,x){if(f!==u)x.push({i:m.push(o(m)+"skewX(",null,s)-2,x:_n(f,u)});else if(u)m.push(o(m)+"skewX("+u+s)}function d(f,u,m,x,b,S){if(f!==m||u!==x){var T=b.push(o(b)+"scale(",null,",",null,")");S.push({i:T-4,x:_n(f,m)},{i:T-2,x:_n(u,x)})}else if(m!==1||x!==1)b.push(o(b)+"scale("+m+","+x+")")}return function(f,u){var m=[],x=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,m,x),c(f.rotate,u.rotate,m,x),n(f.skewX,u.skewX,m,x),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,m,x),f=u=null,function(b){var S=-1,T=x.length,B;while(++S<T)m[(B=x[S]).i]=B.x(b);return m.join("")}}}var kn=Cu(yu,"px, ","px)","deg)"),wn=Cu(xu,", ",")",")");var Zr=0,Yi=0,Hi=0,ku=1000,as,ji,ns=0,Br=0,ls=0,Xi=typeof performance==="object"&&performance.now?performance:Date,wu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Vi(){return Br||(wu(J0),Br=Xi.now()+ls)}function J0(){Br=0}function Gi(){this._call=this._time=this._next=null}Gi.prototype=hs.prototype={constructor:Gi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Vi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,Tn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Tn()}};function hs(r,e,i){var s=new Gi;return s.restart(r,e,i),s}function Su(){Vi(),++Zr;var r=as,e;while(r){if((e=Br-r._time)>=0)r._call.call(void 0,e);r=r._next}--Zr}function bu(){Br=(ns=Xi.now())+ls,Zr=Yi=0;try{Su()}finally{Zr=0,eC(),Br=0}}function tC(){var r=Xi.now(),e=r-ns;if(e>ku)ls-=e,ns=r}function eC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;ji=r,Tn(s)}function Tn(r){if(Zr)return;if(Yi)Yi=clearTimeout(Yi);var e=r-Br;if(e>24){if(r<1/0)Yi=setTimeout(bu,r-Xi.now()-ls);if(Hi)Hi=clearInterval(Hi)}else{if(!Hi)ns=Xi.now(),Hi=setInterval(tC,ku);Zr=1,wu(bu)}}function Ki(r,e,i){var s=new Gi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var rC=Sa("start","end","cancel","interrupt"),iC=[],_u=0,Tu=1,us=2,cs=3,Bu=4,ds=5,Zi=6;function ar(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;oC(r,i,{name:e,index:s,group:o,on:rC,tween:iC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:_u})}function Qi(r,e){var i=xe(r,e);if(i.state>_u)throw Error("too late; already scheduled");return i}function be(r,e){var i=xe(r,e);if(i.state>cs)throw Error("too late; already running");return i}function xe(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function oC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Tu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,m,x,b;if(i.state!==Tu)return d();for(u in s){if(b=s[u],b.name!==i.name)continue;if(b.state===cs)return Ki(c);if(b.state===Bu)b.state=Zi,b.timer.stop(),b.on.call("interrupt",r,r.__data__,b.index,b.group),delete s[u];else if(+u<e)b.state=Zi,b.timer.stop(),b.on.call("cancel",r,r.__data__,b.index,b.group),delete s[u]}if(Ki(function(){if(i.state===cs)i.state=Bu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(x=i.tween.length);for(u=0,m=-1;u<x;++u)if(b=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++m]=b;o.length=m+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),m=-1,x=o.length;while(++m<x)o[m].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Zi,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function Ji(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=Zi,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function Bn(r){return this.each(function(){Ji(this,r)})}function sC(r,e){var i,s;return function(){var o=be(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function aC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=be(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function vn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=xe(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?sC:aC)(i,r,e))}function Qr(r,e,i){var s=r._id;return r.each(function(){var o=be(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return xe(o,s).value[e]}}function to(r,e){var i;return(typeof e==="number"?_n:e instanceof $a?js:(i=$a(e))?(e=i,js):tc)(r,e)}function nC(r){return function(){this.removeAttribute(r)}}function lC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function hC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function cC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function uC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function dC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function Ln(r,e){var i=Xe(r),s=i==="transform"?wn:to;return this.attrTween(r,typeof e==="function"?(i.local?dC:uC)(i,s,Qr(this,"attr."+r,e)):e==null?(i.local?lC:nC)(i):(i.local?cC:hC)(i,s,e))}function fC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function pC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function gC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&pC(r,a);return i}return o._value=e,o}function mC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&fC(r,a);return i}return o._value=e,o}function Mn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Xe(r);return this.tween(i,(s.local?gC:mC)(s,e))}function yC(r,e){return function(){Qi(this,r).delay=+e.apply(this,arguments)}}function xC(r,e){return e=+e,function(){Qi(this,r).delay=e}}function An(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?yC:xC)(e,r)):xe(this.node(),e).delay}function CC(r,e){return function(){be(this,r).duration=+e.apply(this,arguments)}}function bC(r,e){return e=+e,function(){be(this,r).duration=e}}function En(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?CC:bC)(e,r)):xe(this.node(),e).duration}function kC(r,e){if(typeof e!=="function")throw Error();return function(){be(this,r).ease=e}}function $n(r){var e=this._id;return arguments.length?this.each(kC(e,r)):xe(this.node(),e).ease}function wC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();be(this,r).ease=i}}function In(r){if(typeof r!=="function")throw Error();return this.each(wC(this._id,r))}function On(r){if(typeof r!=="function")r=Xr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new Le(s,this._parents,this._name,this._id)}function Dn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,m=c[n]=Array(u),x,b=0;b<u;++b)if(x=d[b]||f[b])m[b]=x;for(;n<s;++n)c[n]=e[n];return new Le(c,this._parents,this._name,this._id)}function SC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function TC(r,e,i){var s,o,a=SC(e)?Qi:be;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function Pn(r,e){var i=this._id;return arguments.length<2?xe(this.node(),i).on.on(r):this.each(TC(i,r,e))}function BC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function qn(){return this.on("end.remove",BC(this._id))}function Wn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,m,x=0;x<d;++x)if((u=n[x])&&(m=r.call(u,u.__data__,x,n))){if("__data__"in u)m.__data__=u.__data__;f[x]=m,ar(f[x],e,i,x,f,xe(u,i))}return new Le(a,this._parents,e,i)}function zn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Yr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,m=0;m<f;++m)if(u=d[m]){for(var x=r.call(u,u.__data__,m,d),b,S=xe(u,i),T=0,B=x.length;T<B;++T)if(b=x[T])ar(b,e,i,T,x,S);a.push(x),c.push(u)}return new Le(a,c,e,i)}var _C=sr.prototype.constructor;function Hn(){return new _C(this._groups,this._parents)}function vC(r,e){var i,s,o;return function(){var a=mr(this,r),c=(this.style.removeProperty(r),mr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function vu(r){return function(){this.style.removeProperty(r)}}function LC(r,e,i){var s,o=i+"",a;return function(){var c=mr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function FC(r,e,i){var s,o,a;return function(){var c=mr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),mr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function MC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=be(this,r),f=d.on,u=d.value[a]==null?n||(n=vu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function jn(r,e,i){var s=(r+="")==="transform"?kn:to;return e==null?this.styleTween(r,vC(r,s)).on("end.style."+r,vu(r)):typeof e==="function"?this.styleTween(r,FC(r,s,Qr(this,"style."+r,e))).each(MC(this._id,r)):this.styleTween(r,LC(r,s,e),i).on("end.style."+r,null)}function AC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function EC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&AC(r,c,i);return s}return a._value=e,a}function Un(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,EC(r,e,i==null?"":i))}function $C(r){return function(){this.textContent=r}}function IC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Xn(r){return this.tween("text",typeof r==="function"?IC(Qr(this,"text",r)):$C(r==null?"":r+""))}function OC(r){return function(e){this.textContent=r.call(this,e)}}function DC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&OC(o);return e}return s._value=r,s}function Gn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,DC(r))}function Zn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=xe(d,e);ar(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Le(s,this._parents,r,i)}function tl(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=be(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var PC=0;function Le(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function Lu(r){return sr().transition(r)}function fs(){return++PC}var nr=sr.prototype;Le.prototype=Lu.prototype={constructor:Le,select:Wn,selectAll:zn,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:On,merge:Dn,selection:Hn,transition:Zn,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:Pn,attr:Ln,attrTween:Mn,style:jn,styleTween:Un,text:Xn,textTween:Gn,remove:qn,tween:vn,delay:An,duration:En,ease:$n,easeVarying:In,end:tl,[Symbol.iterator]:nr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var RC={time:null,delay:0,duration:250,ease:ps};function qC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function el(r){var e,i;if(r instanceof Le)e=r._id,r=r._name;else e=fs(),(i=RC).time=Vi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])ar(d,r,e,f,c,i||qC(d,e));return new Le(s,this._parents,r,e)}sr.prototype.interrupt=Bn;sr.prototype.transition=el;var{abs:ZL,max:QL,min:JL}=Math;function Fu(r){return[+r[0],+r[1]]}function WC(r){return[Fu(r[0]),Fu(r[1])]}var tF={name:"x",handles:["w","e"].map(rl),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},eF={name:"y",handles:["n","s"].map(rl),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},rF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(rl),input:function(r){return r==null?null:WC(r)},output:function(r){return r}};function rl(r){return{type:r}}var il=Math.PI,ol=2*il;var NC=ol-0.000001;function Mu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function zC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Mu;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Jr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Mu:zC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,m=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(m>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let x=i-a,b=s-c,S=n*n+d*d,T=x*x+b*b,B=Math.sqrt(S),_=Math.sqrt(m),v=o*Math.tan((il-Math.acos((S+m-T)/(2*B*_)))/2),E=v/_,O=v/B;if(Math.abs(E-1)>0.000001)this._append`L${r+E*f},${e+E*u}`;this._append`A${o},${o},0,0,${+(u*x>f*b)},${this._x1=r+O*n},${this._y1=e+O*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,m=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(m<0)m=m%ol+ol;if(m>NC)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(m>0.000001)this._append`A${i},${i},0,${+(m>=il)},${u},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Au(){return new Jr}Au.prototype=Jr.prototype;function fo(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var sl=Symbol("implicit");function Kn(){var r=new Ei,e=[],i=[],s=sl;function o(a){let c=r.get(a);if(c===void 0){if(s!==sl)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new Ei;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return Kn(e,i).unknown(s)},fo.apply(o,arguments),o}function kt(r){return function(){return r}}var{abs:al,atan2:ke,cos:yr,max:Eu,min:gs,sin:Re,sqrt:_r}=Math,Ce=0.000000000001,ti=Math.PI,eo=ti/2,nc=2*ti;function Iu(r){return r>1?0:r<-1?ti:Math.acos(r)}function nl(r){return r>=1?eo:r<=-1?-eo:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Jr(e)}function HC(r){return r.innerRadius}function YC(r){return r.outerRadius}function jC(r){return r.startAngle}function UC(r){return r.endAngle}function XC(r){return r&&r.padAngle}function GC(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,m=n-a,x=m*d-u*f;if(x*x<Ce)return;return x=(u*(e-a)-m*(r-o))/x,[r+x*d,e+x*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/_r(n*n+d*d),u=f*d,m=-f*n,x=r+u,b=e+m,S=i+u,T=s+m,B=(x+S)/2,_=(b+T)/2,v=S-x,E=T-b,O=v*v+E*E,D=o-a,K=x*T-S*b,Z=(E<0?-1:1)*_r(Eu(0,D*D*O-K*K)),tt=(K*E-v*Z)/O,ot=(-K*v-E*Z)/O,ut=(K*E+v*Z)/O,ct=(-K*v+E*Z)/O,at=tt-B,P=ot-_,U=ut-B,et=ct-_;if(at*at+P*P>U*U+et*et)tt=ut,ot=ct;return{cx:tt,cy:ot,x01:-u,y01:-m,x11:tt*(o/D-1),y11:ot*(o/D-1)}}function Gr(){var r=HC,e=YC,i=kt(0),s=null,o=jC,a=UC,c=XC,n=null,d=ms(f);function f(){var u,m,x=+r.apply(this,arguments),b=+e.apply(this,arguments),S=o.apply(this,arguments)-eo,T=a.apply(this,arguments)-eo,B=al(T-S),_=T>S;if(!n)n=u=d();if(b<x)m=b,b=x,x=m;if(!(b>Ce))n.moveTo(0,0);else if(B>nc-Ce){if(n.moveTo(b*yr(S),b*Re(S)),n.arc(0,0,b,S,T,!_),x>Ce)n.moveTo(x*yr(T),x*Re(T)),n.arc(0,0,x,T,S,_)}else{var v=S,E=T,O=S,D=T,K=B,Z=B,tt=c.apply(this,arguments)/2,ot=tt>Ce&&(s?+s.apply(this,arguments):_r(x*x+b*b)),ut=gs(al(b-x)/2,+i.apply(this,arguments)),ct=ut,at=ut,P,U;if(ot>Ce){var et=nl(ot/x*Re(tt)),R=nl(ot/b*Re(tt));if((K-=et*2)>Ce)et*=_?1:-1,O+=et,D-=et;else K=0,O=D=(S+T)/2;if((Z-=R*2)>Ce)R*=_?1:-1,v+=R,E-=R;else Z=0,v=E=(S+T)/2}var ht=b*yr(v),lt=b*Re(v),Bt=x*yr(D),vt=x*Re(D);if(ut>Ce){var Xt=b*yr(E),Gt=b*Re(E),Qt=x*yr(O),Jt=x*Re(O),Ot;if(B<ti)if(Ot=GC(ht,lt,Qt,Jt,Xt,Gt,Bt,vt)){var Et=ht-Ot[0],Nt=lt-Ot[1],Vt=Xt-Ot[0],jt=Gt-Ot[1],le=1/Re(Iu((Et*Vt+Nt*jt)/(_r(Et*Et+Nt*Nt)*_r(Vt*Vt+jt*jt)))/2),ne=_r(Ot[0]*Ot[0]+Ot[1]*Ot[1]);ct=gs(ut,(x-ne)/(le-1)),at=gs(ut,(b-ne)/(le+1))}else ct=at=0}if(!(Z>Ce))n.moveTo(ht,lt);else if(at>Ce)if(P=ys(Qt,Jt,ht,lt,b,at,_),U=ys(Xt,Gt,Bt,vt,b,at,_),n.moveTo(P.cx+P.x01,P.cy+P.y01),at<ut)n.arc(P.cx,P.cy,at,ke(P.y01,P.x01),ke(U.y01,U.x01),!_);else n.arc(P.cx,P.cy,at,ke(P.y01,P.x01),ke(P.y11,P.x11),!_),n.arc(0,0,b,ke(P.cy+P.y11,P.cx+P.x11),ke(U.cy+U.y11,U.cx+U.x11),!_),n.arc(U.cx,U.cy,at,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.moveTo(ht,lt),n.arc(0,0,b,v,E,!_);if(!(x>Ce)||!(K>Ce))n.lineTo(Bt,vt);else if(ct>Ce)if(P=ys(Bt,vt,Xt,Gt,x,-ct,_),U=ys(ht,lt,Qt,Jt,x,-ct,_),n.lineTo(P.cx+P.x01,P.cy+P.y01),ct<ut)n.arc(P.cx,P.cy,ct,ke(P.y01,P.x01),ke(U.y01,U.x01),!_);else n.arc(P.cx,P.cy,ct,ke(P.y01,P.x01),ke(P.y11,P.x11),!_),n.arc(0,0,x,ke(P.cy+P.y11,P.cx+P.x11),ke(U.cy+U.y11,U.cx+U.x11),_),n.arc(U.cx,U.cy,ct,ke(U.y11,U.x11),ke(U.y01,U.x01),!_);else n.arc(0,0,x,D,O,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,m=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[yr(m)*u,Re(m)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:kt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:kt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:kt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:kt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:kt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:kt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:kt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var OF=Array.prototype.slice;function zu(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Du(r){this._context=r}Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function ma(r){return new Du(r)}function Ru(r){return r[0]}function Nu(r){return r[1]}function qs(r,e){var i=kt(!0),s=null,o=ma,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Ru:kt(r),e=typeof e==="function"?e:e===void 0?Nu:kt(e);function n(d){var f,u=(d=zu(d)).length,m,x=!1,b;if(s==null)a=o(b=c());for(f=0;f<=u;++f){if(!(f<u&&i(m=d[f],f,d))===x)if(x=!x)a.lineStart();else a.lineEnd();if(x)a.point(+r(m,f,d),+e(m,f,d))}if(b)return a=null,b+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:kt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:kt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:kt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class ll{constructor(r,e){this._context=r,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function ro(r){return new ll(r,!0)}function io(r){return new ll(r,!1)}function Ee(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function oo(r){this._context=r}oo.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:ei(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function vr(r){return new oo(r)}function Yu(r){this._context=r}Yu.prototype={areaStart:Ee,areaEnd:Ee,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new Yu(r)}function Xu(r){this._context=r}Xu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Xu(r)}function Vu(r,e){this._basis=new oo(r),this._beta=e}Vu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var hl=function r(e){function i(s){return e===1?new oo(s):new Vu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var so=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:Ee,areaEnd:Ee,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cl=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ul=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ao(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>Ce){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>Ce){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function Ku(r,e){this._context=r,this._alpha=e}Ku.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}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var no=function r(e){function i(s){return e?new Ku(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Zu(r,e){this._context=r,this._alpha=e}Zu.prototype={areaStart:Ee,areaEnd:Ee,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dl=function r(e){function i(s){return e?new Zu(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Qu(r,e){this._context=r,this._alpha=e}Qu.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:ao(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fl=function r(e){function i(s){return e?new Qu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Ju(r){this._context=r}Ju.prototype={areaStart:Ee,areaEnd:Ee,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Ju(r)}function td(r){return r<0?-1:1}function ed(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(td(a)+td(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function rd(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function pl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:pl(this,this._t0,rd(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,pl(this,rd(this,i=ed(this,r,e)),i);break;default:pl(this,this._t0,i=ed(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function id(r){this._context=new od(r)}(id.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function od(r){this._context=r}od.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function lo(r){return new Ts(r)}function co(r){return new id(r)}function ad(r){this._context=r}ad.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=sd(r),o=sd(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function sd(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ii(r){return new ad(r)}function Bs(r,e){this._context=r,this._t=e}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function oi(r){return new Bs(r,0.5)}function go(r){return new Bs(r,0)}function yo(r){return new Bs(r,1)}function xr(r,e,i){this.k=r,this.x=e,this.y=i}xr.prototype={constructor:xr,scale:function(r){return r===1?this:new xr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new xr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gl=new xr(1,0,0);ml.prototype=xr.prototype;function ml(r){while(!r.__zoom)if(!(r=r.parentNode))return gl;return r.__zoom}var pe=t((r)=>{let{securityLevel:e}=p(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Ed(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Ed,"getDefaultExportFromCjs");var Se={},_s={},Cr={},nd;function si(){if(nd)return Cr;nd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let m=d[f];c[m]=n[m]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),Cr.isNothing=r,Cr.isObject=e,Cr.toArray=i,Cr.repeat=o,Cr.isNegativeZero=a,Cr.extend=s,Cr}t(si,"requireCommon");var yl,ld;function ai(){if(ld)return yl;ld=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
127
127
 
128
128
  `+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),yl=e,yl}t(ai,"requireException");var xl,hd;function $d(){if(hd)return xl;hd=1;let r=si();function e(o,a,c,n,d){let f="",u="",m=Math.floor(d/2)-1;if(n-a>m)f=" ... ",a=n-m+f.length;if(c-n>m)u=" ...",c=n+m-u.length;return{str:f+o.slice(a,c).replace(/\t/g,"→")+u,pos:n-a+f.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let c=/\r?\n|\r|\0/g,n=[0],d=[],f,u=-1;while(f=c.exec(o.buffer))if(d.push(f.index),n.push(f.index+f[0].length),o.position<=f.index&&u<0)u=n.length-2;if(u<0)u=n.length-1;let m="",x=Math.min(o.line+a.linesAfter,d.length).toString().length,b=a.maxLength-(a.indent+x+3);for(let T=1;T<=a.linesBefore;T++){if(u-T<0)break;let B=e(o.buffer,n[u-T],d[u-T],o.position-(n[u]-n[u-T]),b);m=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),x)+" | "+B.str+`
129
129
  `+m}let S=e(o.buffer,n[u],d[u],o.position,b);m+=r.repeat(" ",a.indent)+i((o.line+1).toString(),x)+" | "+S.str+`
130
130
  `,m+=r.repeat("-",a.indent+x+3+S.pos)+`^
131
131
  `;for(let T=1;T<=a.linesAfter;T++){if(u+T>=d.length)break;let B=e(o.buffer,n[u+T],d[u+T],o.position-(n[u]-n[u+T]),b);m+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),x)+" | "+B.str+`
132
- `}return m.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t($d,"requireSnippet");var Cl,cd;function Te(){if(cd)return Cl;cd=1;let r=ai(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(Te,"requireType");var bl,ud;function Nl(){if(ud)return bl;ud=1;let r=ai(),e=Te();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,m){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=m}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(Nl,"requireSchema");var kl,dd;function zl(){if(dd)return kl;return dd=1,kl=new(Te())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(zl,"requireStr");var wl,fd;function Ql(){if(fd)return wl;return fd=1,wl=new(Te())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(Ql,"requireSeq");var Sl,pd;function th(){if(pd)return Sl;return pd=1,Sl=new(Te())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(th,"requireMap");var Tl,gd;function eh(){if(gd)return Tl;return gd=1,Tl=new(Nl())({explicit:[zl(),Ql(),th()]}),Tl}t(eh,"requireFailsafe");var Bl,md;function rh(){if(md)return Bl;md=1;let r=Te();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bl}t(rh,"require_null");var _l,yd;function ih(){if(yd)return _l;yd=1;let r=Te();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),_l=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),_l}t(ih,"requireBool");var vl,xd;function oh(){if(xd)return vl;xd=1;let r=si(),e=Te();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,m=0,x=!1;if(!u)return!1;let b=f[m];if(b==="-"||b==="+")b=f[++m];if(b==="0"){if(m+1===u)return!0;if(b=f[++m],b==="b"){m++;for(;m<u;m++){if(b=f[m],b!=="0"&&b!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(b==="x"){m++;for(;m<u;m++){if(!i(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}if(b==="o"){m++;for(;m<u;m++){if(!s(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}}for(;m<u;m++){if(!o(f.charCodeAt(m)))return!1;x=!0}if(!x)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,m=1,x=u[0];if(x==="-"||x==="+"){if(x==="-")m=-1;u=u.slice(1),x=u[0]}if(u==="0")return 0;if(x==="0"){if(u[1]==="b")return m*parseInt(u.slice(2),2);if(u[1]==="x")return m*parseInt(u.slice(2),16);if(u[1]==="o")return m*parseInt(u.slice(2),8)}return m*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(oh,"requireInt");var Ll,Cd;function sh(){if(Cd)return Ll;Cd=1;let r=si(),e=Te(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),m=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return m*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return c.test(m)?m.replace("e",".e"):m}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(sh,"requireFloat");var Fl,bd;function ah(){if(bd)return Fl;return bd=1,Fl=eh().extend({implicit:[rh(),ih(),oh(),sh()]}),Fl}t(ah,"requireJson");var Ml,kd;function nh(){if(kd)return Ml;return kd=1,Ml=ah(),Ml}t(nh,"requireCore");var Al,wd;function lh(){if(wd)return Al;wd=1;let r=Te(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new 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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],m=+f[2]-1,x=+f[3];if(!f[4])return new Date(Date.UTC(u,m,x));let b=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,m,x,b,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(lh,"requireTimestamp");var El,Sd;function hh(){if(Sd)return El;Sd=1;let r=Te();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(hh,"requireMerge");var $l,Td;function ch(){if(Td)return $l;Td=1;let r=Te(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
- \r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let b=0;b<d;b++){if(b%4===0&&b)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(b))}let x=d%4*6;if(x===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(x===18)m.push(u>>10&255),m.push(u>>2&255);else if(x===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let x=0;x<f;x++){if(x%3===0&&x)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[x]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(ch,"requireBinary");var Il,Bd;function uh(){if(Bd)return Il;Bd=1;let r=Te(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let x;for(x in u)if(e.call(u,x))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(x)===-1)c.push(x);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(uh,"requireOmap");var Ol,_d;function dh(){if(_d)return Ol;_d=1;let r=Te(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(dh,"requirePairs");var Dl,vd;function fh(){if(vd)return Dl;vd=1;let r=Te(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(fh,"requireSet");var Pl,Ld;function vs(){if(Ld)return Pl;return Ld=1,Pl=nh().extend({implicit:[lh(),hh()],explicit:[ch(),uh(),dh(),fh()]}),Pl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,x=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(k){return Object.prototype.toString.call(k)}t(_,"_class");function v(k){return k===10||k===13}t(v,"isEol");function F(k){return k===9||k===32}t(F,"isWhiteSpace");function I(k){return k===9||k===32||k===10||k===13}t(I,"isWsOrEol");function O(k){return k===44||k===91||k===93||k===123||k===125}t(O,"isFlowIndicator");function K(k){if(k>=48&&k<=57)return k-48;let ot=k|32;if(ot>=97&&ot<=102)return ot-97+10;return-1}t(K,"fromHexCode");function Z(k){if(k===120)return 2;if(k===117)return 4;if(k===85)return 8;return 0}t(Z,"escapedHexLen");function rt(k){if(k>=48&&k<=57)return k-48;return-1}t(rt,"fromDecimalCode");function st(k){switch(k){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
134
- `;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" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(st,"simpleEscapeSequence");function ut(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ut,"charFromCodepoint");function ct(k,ot,gt){if(ot==="__proto__")Object.defineProperty(k,ot,{configurable:!0,enumerable:!0,writable:!0,value:gt});else k[ot]=gt}t(ct,"setProperty");let nt=Array(256),D=Array(256);for(let k=0;k<256;k++)nt[k]=st(k)?1:0,D[k]=st(k);function U(k,ot){this.input=k,this.filename=ot.filename||null,this.schema=ot.schema||s,this.onWarning=ot.onWarning||null,this.legacy=ot.legacy||!1,this.json=ot.json||!1,this.listener=ot.listener||null,this.maxDepth=typeof ot.maxDepth==="number"?ot.maxDepth:100,this.maxTotalMergeKeys=typeof ot.maxTotalMergeKeys==="number"?ot.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=k.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=[]}t(U,"State");function it(k,ot){let gt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return gt.snippet=i(gt),new e(ot,gt)}t(it,"generateError");function P(k,ot){throw it(k,ot)}t(P,"throwError");function ht(k,ot){if(k.onWarning)k.onWarning.call(null,it(k,ot))}t(ht,"throwWarning");function lt(k,ot,gt){let bt=k.anchorMapTransactions;if(bt.length!==0){let dt=bt[bt.length-1];if(!o.call(dt,ot))dt[ot]={existed:o.call(k.anchorMap,ot),value:k.anchorMap[ot]}}k.anchorMap[ot]=gt}t(lt,"storeAnchor");function Bt(k){k.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function At(k){let ot=k.anchorMapTransactions.pop(),gt=k.anchorMapTransactions;if(gt.length===0)return;let bt=gt[gt.length-1],dt=Object.keys(ot);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(!o.call(bt,at))bt[at]=ot[at]}}t(At,"commitAnchorTransaction");function Gt(k){let ot=k.anchorMapTransactions.pop(),gt=Object.keys(ot);for(let bt=gt.length-1;bt>=0;bt-=1){let dt=ot[gt[bt]];if(dt.existed)k.anchorMap[gt[bt]]=dt.value;else delete k.anchorMap[gt[bt]]}}t(Gt,"rollbackAnchorTransaction");function Vt(k){return{position:k.position,line:k.line,lineStart:k.lineStart,lineIndent:k.lineIndent,firstTabInLine:k.firstTabInLine,tag:k.tag,anchor:k.anchor,kind:k.kind,result:k.result}}t(Vt,"snapshotState");function Qt(k,ot){k.position=ot.position,k.line=ot.line,k.lineStart=ot.lineStart,k.lineIndent=ot.lineIndent,k.firstTabInLine=ot.firstTabInLine,k.tag=ot.tag,k.anchor=ot.anchor,k.kind=ot.kind,k.result=ot.result}t(Qt,"restoreState");let Jt={YAML:t(function(ot,gt,bt){if(ot.version!==null)P(ot,"duplication of %YAML directive");if(bt.length!==1)P(ot,"YAML directive accepts exactly one argument");let dt=/^([0-9]+)\.([0-9]+)$/.exec(bt[0]);if(dt===null)P(ot,"ill-formed argument of the YAML directive");let Tt=parseInt(dt[1],10),E=parseInt(dt[2],10);if(Tt!==1)P(ot,"unacceptable YAML version of the document");if(ot.version=bt[0],ot.checkLineBreaks=E<2,E!==1&&E!==2)ht(ot,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(ot,gt,bt){let dt;if(bt.length!==2)P(ot,"TAG directive accepts exactly two arguments");let Tt=bt[0];if(dt=bt[1],!T.test(Tt))P(ot,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(ot.tagMap,Tt))P(ot,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!B.test(dt))P(ot,"ill-formed tag prefix (second argument) of the TAG directive");try{dt=decodeURIComponent(dt)}catch(E){P(ot,"tag prefix is malformed: "+dt)}ot.tagMap[Tt]=dt},"handleTagDirective")};function Pt(k,ot,gt,bt){if(ot<gt){let dt=k.input.slice(ot,gt);if(bt)for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt.charCodeAt(Tt);if(!(at===9||at>=32&&at<=1114111))P(k,"expected valid JSON character")}else if(x.test(dt))P(k,"the stream contains non-printable characters");k.result+=dt}}t(Pt,"captureSegment");function It(k,ot,gt,bt){if(!r.isObject(gt))P(k,"cannot merge mappings; the provided source object is unacceptable");let dt=Object.keys(gt);for(let Tt=0,E=dt.length;Tt<E;Tt+=1){let at=dt[Tt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)P(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(ot,at))ct(ot,at,gt[at]),bt[at]=!0}}t(It,"mergeMappings");function zt(k,ot,gt,bt,dt,Tt,E,at,wt){if(Array.isArray(dt)){dt=Array.prototype.slice.call(dt);for(let xt=0,Ct=dt.length;xt<Ct;xt+=1){if(Array.isArray(dt[xt]))P(k,"nested arrays are not supported inside keys");if(typeof dt==="object"&&_(dt[xt])==="[object Object]")dt[xt]="[object Object]"}}if(typeof dt==="object"&&_(dt)==="[object Object]")dt="[object Object]";if(dt=String(dt),ot===null)ot={};if(bt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let xt=0,Ct=Tt.length;xt<Ct;xt+=1)It(k,ot,Tt[xt],gt);else It(k,ot,Tt,gt);else{if(!k.json&&!o.call(gt,dt)&&o.call(ot,dt))k.line=E||k.line,k.lineStart=at||k.lineStart,k.position=wt||k.position,P(k,"duplicated mapping key");ct(ot,dt,Tt),delete gt[dt]}return ot}t(zt,"storeMappingPair");function Kt(k){let ot=k.input.charCodeAt(k.position);if(ot===10)k.position++;else if(ot===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else P(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Kt,"readLineBreak");function Ut(k,ot,gt){let bt=0,dt=k.input.charCodeAt(k.position);while(dt!==0){while(F(dt)){if(dt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;dt=k.input.charCodeAt(++k.position)}if(ot&&dt===35)do dt=k.input.charCodeAt(++k.position);while(dt!==10&&dt!==13&&dt!==0);if(v(dt)){Kt(k),dt=k.input.charCodeAt(k.position),bt++,k.lineIndent=0;while(dt===32)k.lineIndent++,dt=k.input.charCodeAt(++k.position)}else break}if(gt!==-1&&bt!==0&&k.lineIndent<gt)ht(k,"deficient indentation");return bt}t(Ut,"skipSeparationSpace");function le(k){let ot=k.position,gt=k.input.charCodeAt(ot);if((gt===45||gt===46)&&gt===k.input.charCodeAt(ot+1)&&gt===k.input.charCodeAt(ot+2)){if(ot+=3,gt=k.input.charCodeAt(ot),gt===0||I(gt))return!0}return!1}t(le,"testDocumentSeparator");function ne(k,ot){if(ot===1)k.result+=" ";else if(ot>1)k.result+=r.repeat(`
135
- `,ot-1)}t(ne,"writeFoldedLines");function er(k,ot,gt){let bt,dt,Tt,E,at,wt,{kind:xt,result:Ct}=k,St=k.input.charCodeAt(k.position);if(I(St)||O(St)||St===35||St===38||St===42||St===33||St===124||St===62||St===39||St===34||St===37||St===64||St===96)return!1;if(St===63||St===45){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))return!1}k.kind="scalar",k.result="",bt=dt=k.position,Tt=!1;while(St!==0){if(St===58){let kt=k.input.charCodeAt(k.position+1);if(I(kt)||gt&&O(kt))break}else if(St===35){let kt=k.input.charCodeAt(k.position-1);if(I(kt))break}else if(k.position===k.lineStart&&le(k)||gt&&O(St))break;else if(v(St))if(E=k.line,at=k.lineStart,wt=k.lineIndent,Ut(k,!1,-1),k.lineIndent>=ot){Tt=!0,St=k.input.charCodeAt(k.position);continue}else{k.position=dt,k.line=E,k.lineStart=at,k.lineIndent=wt;break}if(Tt)Pt(k,bt,dt,!1),ne(k,k.line-E),bt=dt=k.position,Tt=!1;if(!F(St))dt=k.position+1;St=k.input.charCodeAt(++k.position)}if(Pt(k,bt,dt,!1),k.result)return!0;return k.kind=xt,k.result=Ct,!1}t(er,"readPlainScalar");function Or(k,ot){let gt,bt,dt=k.input.charCodeAt(k.position);if(dt!==39)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((dt=k.input.charCodeAt(k.position))!==0)if(dt===39)if(Pt(k,gt,k.position,!0),dt=k.input.charCodeAt(++k.position),dt===39)gt=k.position,k.position++,bt=k.position;else return!0;else if(v(dt))Pt(k,gt,bt,!0),ne(k,Ut(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!F(dt))bt=k.position;P(k,"unexpected end of the stream within a single quoted scalar")}t(Or,"readSingleQuotedScalar");function ze(k,ot){let gt,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==34)return!1;k.kind="scalar",k.result="",k.position++,gt=bt=k.position;while((Tt=k.input.charCodeAt(k.position))!==0)if(Tt===34)return Pt(k,gt,k.position,!0),k.position++,!0;else if(Tt===92){if(Pt(k,gt,k.position,!0),Tt=k.input.charCodeAt(++k.position),v(Tt))Ut(k,!1,ot);else if(Tt<256&&nt[Tt])k.result+=D[Tt],k.position++;else if((dt=Z(Tt))>0){let E=dt,at=0;for(;E>0;E--)if(Tt=k.input.charCodeAt(++k.position),(dt=K(Tt))>=0)at=(at<<4)+dt;else P(k,"expected hexadecimal character");k.result+=ut(at),k.position++}else P(k,"unknown escape sequence");gt=bt=k.position}else if(v(Tt))Pt(k,gt,bt,!0),ne(k,Ut(k,!1,ot)),gt=bt=k.position;else if(k.position===k.lineStart&&le(k))P(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!F(Tt))bt=k.position;P(k,"unexpected end of the stream within a double quoted scalar")}t(ze,"readDoubleQuotedScalar");function yi(k,ot){let gt=!0,bt,dt,Tt,E=k.tag,at,wt=k.anchor,xt,Ct,St,kt,Ot=Object.create(null),Et,Rt,Yt,re=k.input.charCodeAt(k.position);if(re===91)xt=93,kt=!1,at=[];else if(re===123)xt=125,kt=!0,at={};else return!1;if(k.anchor!==null)lt(k,k.anchor,at);re=k.input.charCodeAt(++k.position);while(re!==0){if(Ut(k,!0,ot),re=k.input.charCodeAt(k.position),re===xt)return k.position++,k.tag=E,k.anchor=wt,k.kind=kt?"mapping":"sequence",k.result=at,!0;else if(!gt)P(k,"missed comma between flow collection entries");else if(re===44)P(k,"expected the node content, but found ','");if(Rt=Et=Yt=null,Ct=St=!1,re===63){let he=k.input.charCodeAt(k.position+1);if(I(he))Ct=St=!0,k.position++,Ut(k,!0,ot)}if(bt=k.line,dt=k.lineStart,Tt=k.position,De(k,ot,a,!1,!0),Rt=k.tag,Et=k.result,Ut(k,!0,ot),re=k.input.charCodeAt(k.position),(St||k.line===bt)&&re===58)Ct=!0,re=k.input.charCodeAt(++k.position),Ut(k,!0,ot),De(k,ot,a,!1,!0),Yt=k.result;if(kt)zt(k,at,Ot,Rt,Et,Yt,bt,dt,Tt);else if(Ct)at.push(zt(k,null,Ot,Rt,Et,Yt,bt,dt,Tt));else at.push(Et);if(Ut(k,!0,ot),re=k.input.charCodeAt(k.position),re===44)gt=!0,re=k.input.charCodeAt(++k.position);else gt=!1}P(k,"unexpected end of the stream within a flow collection")}t(yi,"readFlowCollection");function xi(k,ot){let gt,bt=f,dt=!1,Tt=!1,E=ot,at=0,wt=!1,xt,Ct=k.input.charCodeAt(k.position);if(Ct===124)gt=!1;else if(Ct===62)gt=!0;else return!1;k.kind="scalar",k.result="";while(Ct!==0)if(Ct=k.input.charCodeAt(++k.position),Ct===43||Ct===45)if(f===bt)bt=Ct===43?m:u;else P(k,"repeat of a chomping mode identifier");else if((xt=rt(Ct))>=0)if(xt===0)P(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)E=ot+xt-1,Tt=!0;else P(k,"repeat of an indentation width identifier");else break;if(F(Ct)){do Ct=k.input.charCodeAt(++k.position);while(F(Ct));if(Ct===35)do Ct=k.input.charCodeAt(++k.position);while(!v(Ct)&&Ct!==0)}while(Ct!==0){Kt(k),k.lineIndent=0,Ct=k.input.charCodeAt(k.position);while((!Tt||k.lineIndent<E)&&Ct===32)k.lineIndent++,Ct=k.input.charCodeAt(++k.position);if(!Tt&&k.lineIndent>E)E=k.lineIndent;if(v(Ct)){at++;continue}if(!Tt&&E===0)P(k,"missing indentation for block scalar");if(k.lineIndent<E){if(bt===m)k.result+=r.repeat(`
136
- `,dt?1+at:at);else if(bt===f){if(dt)k.result+=`
137
- `}break}if(gt)if(F(Ct))wt=!0,k.result+=r.repeat(`
138
- `,dt?1+at:at);else if(wt)wt=!1,k.result+=r.repeat(`
139
- `,at+1);else if(at===0){if(dt)k.result+=" "}else k.result+=r.repeat(`
140
- `,at);else k.result+=r.repeat(`
141
- `,dt?1+at:at);dt=!0,Tt=!0,at=0;let St=k.position;while(!v(Ct)&&Ct!==0)Ct=k.input.charCodeAt(++k.position);Pt(k,St,k.position,!1)}return!0}t(xi,"readBlockScalar");function He(k,ot){let{tag:gt,anchor:bt}=k,dt=[],Tt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,dt);let E=k.input.charCodeAt(k.position);while(E!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");if(E!==45)break;let at=k.input.charCodeAt(k.position+1);if(!I(at))break;if(Tt=!0,k.position++,Ut(k,!0,-1)){if(k.lineIndent<=ot){dt.push(null),E=k.input.charCodeAt(k.position);continue}}let wt=k.line;if(De(k,ot,n,!1,!0),dt.push(k.result),Ut(k,!0,-1),E=k.input.charCodeAt(k.position),(k.line===wt||k.lineIndent>ot)&&E!==0)P(k,"bad indentation of a sequence entry");else if(k.lineIndent<ot)break}if(Tt)return k.tag=gt,k.anchor=bt,k.kind="sequence",k.result=dt,!0;return!1}t(He,"readBlockSequence");function Dr(k,ot,gt){let bt,dt,Tt,E,{tag:at,anchor:wt}=k,xt={},Ct=Object.create(null),St=null,kt=null,Ot=null,Et=!1,Rt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,xt);let Yt=k.input.charCodeAt(k.position);while(Yt!==0){if(!Et&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,P(k,"tab characters must not be used in indentation");let re=k.input.charCodeAt(k.position+1),he=k.line;if((Yt===63||Yt===58)&&I(re)){if(Yt===63){if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Ot=null;Rt=!0,Et=!0,bt=!0}else if(Et)Et=!1,bt=!0;else P(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Yt=re}else{if(dt=k.line,Tt=k.lineStart,E=k.position,!De(k,gt,c,!1,!0))break;if(k.line===he){Yt=k.input.charCodeAt(k.position);while(F(Yt))Yt=k.input.charCodeAt(++k.position);if(Yt===58){if(Yt=k.input.charCodeAt(++k.position),!I(Yt))P(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E),St=kt=Ot=null;Rt=!0,Et=!1,bt=!1,St=k.tag,kt=k.result}else if(Rt)P(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=at,k.anchor=wt,!0}else if(Rt)P(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=at,k.anchor=wt,!0}if(k.line===he||k.lineIndent>ot){if(Et)dt=k.line,Tt=k.lineStart,E=k.position;if(De(k,ot,d,!0,bt))if(Et)kt=k.result;else Ot=k.result;if(!Et)zt(k,xt,Ct,St,kt,Ot,dt,Tt,E),St=kt=Ot=null;Ut(k,!0,-1),Yt=k.input.charCodeAt(k.position)}if((k.line===he||k.lineIndent>ot)&&Yt!==0)P(k,"bad indentation of a mapping entry");else if(k.lineIndent<ot)break}if(Et)zt(k,xt,Ct,St,kt,null,dt,Tt,E);if(Rt)k.tag=at,k.anchor=wt,k.kind="mapping",k.result=xt;return Rt}t(Dr,"readBlockMapping");function Ci(k){let ot=!1,gt=!1,bt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==33)return!1;if(k.tag!==null)P(k,"duplication of a tag property");if(Tt=k.input.charCodeAt(++k.position),Tt===60)ot=!0,Tt=k.input.charCodeAt(++k.position);else if(Tt===33)gt=!0,bt="!!",Tt=k.input.charCodeAt(++k.position);else bt="!";let E=k.position;if(ot){do Tt=k.input.charCodeAt(++k.position);while(Tt!==0&&Tt!==62);if(k.position<k.length)dt=k.input.slice(E,k.position),Tt=k.input.charCodeAt(++k.position);else P(k,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!I(Tt)){if(Tt===33)if(!gt){if(bt=k.input.slice(E-1,k.position+1),!T.test(bt))P(k,"named tag handle cannot contain such characters");gt=!0,E=k.position+1}else P(k,"tag suffix cannot contain exclamation marks");Tt=k.input.charCodeAt(++k.position)}if(dt=k.input.slice(E,k.position),S.test(dt))P(k,"tag suffix cannot contain flow indicator characters")}if(dt&&!B.test(dt))P(k,"tag name cannot contain such characters: "+dt);try{dt=decodeURIComponent(dt)}catch(at){P(k,"tag name is malformed: "+dt)}if(ot)k.tag=dt;else if(o.call(k.tagMap,bt))k.tag=k.tagMap[bt]+dt;else if(bt==="!")k.tag="!"+dt;else if(bt==="!!")k.tag="tag:yaml.org,2002:"+dt;else P(k,'undeclared tag handle "'+bt+'"');return!0}t(Ci,"readTagProperty");function Pr(k){let ot=k.input.charCodeAt(k.position);if(ot!==38)return!1;if(k.anchor!==null)P(k,"duplication of an anchor property");ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(gt,k.position),!0}t(Pr,"readAnchorProperty");function Rr(k){let ot=k.input.charCodeAt(k.position);if(ot!==42)return!1;ot=k.input.charCodeAt(++k.position);let gt=k.position;while(ot!==0&&!I(ot)&&!O(ot))ot=k.input.charCodeAt(++k.position);if(k.position===gt)P(k,"name of an alias node must contain at least one character");let bt=k.input.slice(gt,k.position);if(!o.call(k.anchorMap,bt))P(k,'unidentified alias "'+bt+'"');return k.result=k.anchorMap[bt],Ut(k,!0,-1),!0}t(Rr,"readAlias");function bi(k,ot,gt,bt){let dt=Vt(k);if(Bt(k),Qt(k,ot),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Dr(k,gt,bt)&&k.kind==="mapping")return At(k),!0;return Gt(k),Qt(k,dt),!1}t(bi,"tryReadBlockMappingFromProperty");function De(k,ot,gt,bt,dt){let Tt,E,at=1,wt=!1,xt=!1,Ct=null,St,kt,Ot;if(k.depth>=k.maxDepth)P(k,"nesting exceeded maxDepth ("+k.maxDepth+")");if(k.depth+=1,k.listener!==null)k.listener("open",k);k.tag=null,k.anchor=null,k.kind=null,k.result=null;let Et=Tt=E=d===gt||n===gt;if(bt){if(Ut(k,!0,-1)){if(wt=!0,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}}if(at===1)while(!0){let Rt=k.input.charCodeAt(k.position),Yt=Vt(k);if(wt&&(Rt===33&&k.tag!==null||Rt===38&&k.anchor!==null))break;if(!Ci(k)&&!Pr(k))break;if(Ct===null)Ct=Yt;if(Ut(k,!0,-1)){if(wt=!0,E=Et,k.lineIndent>ot)at=1;else if(k.lineIndent===ot)at=0;else if(k.lineIndent<ot)at=-1}else E=!1}if(E)E=wt||dt;if(at===1||d===gt){if(a===gt||c===gt)kt=ot;else kt=ot+1;if(Ot=k.position-k.lineStart,at===1)if(E&&(He(k,Ot)||Dr(k,Ot,kt))||yi(k,kt))xt=!0;else{let Rt=k.input.charCodeAt(k.position);if(Ct!==null&&Et&&!E&&Rt!==124&&Rt!==62&&bi(k,Ct,Ct.position-Ct.lineStart,kt))xt=!0;else if(Tt&&xi(k,kt)||Or(k,kt)||ze(k,kt))xt=!0;else if(Rr(k)){if(xt=!0,k.tag!==null||k.anchor!==null)P(k,"alias node should not have any properties")}else if(er(k,kt,a===gt)){if(xt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(at===0)xt=E&&He(k,Ot)}if(k.tag===null){if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")P(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Rt=0,Yt=k.implicitTypes.length;Rt<Yt;Rt+=1)if(St=k.implicitTypes[Rt],St.resolve(k.result)){if(k.result=St.construct(k.result),k.tag=St.tag,k.anchor!==null)lt(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))St=k.typeMap[k.kind||"fallback"][k.tag];else{St=null;let Rt=k.typeMap.multi[k.kind||"fallback"];for(let Yt=0,re=Rt.length;Yt<re;Yt+=1)if(k.tag.slice(0,Rt[Yt].tag.length)===Rt[Yt].tag){St=Rt[Yt];break}}if(!St)P(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&St.kind!==k.kind)P(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+St.kind+'", not "'+k.kind+'"');if(!St.resolve(k.result,k.tag))P(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=St.construct(k.result,k.tag),k.anchor!==null)lt(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||xt}t(De,"composeNode");function ki(k){let ot=k.position,gt=!1,bt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((bt=k.input.charCodeAt(k.position))!==0){if(Ut(k,!0,-1),bt=k.input.charCodeAt(k.position),k.lineIndent>0||bt!==37)break;gt=!0,bt=k.input.charCodeAt(++k.position);let dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);let Tt=k.input.slice(dt,k.position),E=[];if(Tt.length<1)P(k,"directive name must not be less than one character in length");while(bt!==0){while(F(bt))bt=k.input.charCodeAt(++k.position);if(bt===35){do bt=k.input.charCodeAt(++k.position);while(bt!==0&&!v(bt));break}if(v(bt))break;dt=k.position;while(bt!==0&&!I(bt))bt=k.input.charCodeAt(++k.position);E.push(k.input.slice(dt,k.position))}if(bt!==0)Kt(k);if(o.call(Jt,Tt))Jt[Tt](k,Tt,E);else ht(k,'unknown document directive "'+Tt+'"')}if(Ut(k,!0,-1),k.lineIndent===0&&k.input.charCodeAt(k.position)===45&&k.input.charCodeAt(k.position+1)===45&&k.input.charCodeAt(k.position+2)===45)k.position+=3,Ut(k,!0,-1);else if(gt)P(k,"directives end mark is expected");if(De(k,k.lineIndent-1,d,!1,!0),Ut(k,!0,-1),k.checkLineBreaks&&b.test(k.input.slice(ot,k.position)))ht(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&le(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,Ut(k,!0,-1);return}if(k.position<k.length-1)P(k,"end of the stream or a document separator is expected")}t(ki,"readDocument");function qr(k,ot){if(k=String(k),ot=ot||{},k.length!==0){if(k.charCodeAt(k.length-1)!==10&&k.charCodeAt(k.length-1)!==13)k+=`
142
- `;if(k.charCodeAt(0)===65279)k=k.slice(1)}let gt=new U(k,ot),bt=k.indexOf("\x00");if(bt!==-1)gt.position=bt,P(gt,"null byte is not allowed in input");gt.input+="\x00";while(gt.input.charCodeAt(gt.position)===32)gt.lineIndent+=1,gt.position+=1;while(gt.position<gt.length-1)ki(gt);return gt.documents}t(qr,"loadDocuments");function Wr(k,ot,gt){if(ot!==null&&typeof ot==="object"&&typeof gt>"u")gt=ot,ot=null;let bt=qr(k,gt);if(typeof ot!=="function")return bt;for(let dt=0,Tt=bt.length;dt<Tt;dt+=1)ot(bt[dt])}t(Wr,"loadAll2");function wi(k,ot){let gt=qr(k,ot);if(gt.length===0)return;else if(gt.length===1)return gt[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Wr,_s.load=wi,_s}t(Id,"requireLoader");var Rl={},Md;function Od(){if(Md)return Rl;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,x=35,b=37,S=38,T=39,B=42,_=44,v=45,F=58,I=61,O=62,K=63,Z=64,rt=91,st=93,ut=96,ct=123,nt=124,D=125,U={};U[0]="\\0",U[7]="\\a",U[8]="\\b",U[9]="\\t",U[10]="\\n",U[11]="\\v",U[12]="\\f",U[13]="\\r",U[27]="\\e",U[34]="\\\"",U[92]="\\\\",U[133]="\\N",U[160]="\\_",U[8232]="\\L",U[8233]="\\P";let it=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],P=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ht(E,at){if(at===null)return{};let wt={},xt=Object.keys(at);for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct],Ot=String(at[kt]);if(kt.slice(0,2)==="!!")kt="tag:yaml.org,2002:"+kt.slice(2);let Et=E.compiledTypeMap.fallback[kt];if(Et&&o.call(Et.styleAliases,Ot))Ot=Et.styleAliases[Ot];wt[kt]=Ot}return wt}t(ht,"compileStyleMap");function lt(E){let at,wt,xt=E.toString(16).toUpperCase();if(E<=255)at="x",wt=2;else if(E<=65535)at="u",wt=4;else if(E<=4294967295)at="U",wt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+at+r.repeat("0",wt-xt.length)+xt}t(lt,"encodeHex");let Bt=1,At=2;function Gt(E){this.schema=E.schema||i,this.indent=Math.max(1,E.indent||2),this.noArrayIndent=E.noArrayIndent||!1,this.skipInvalid=E.skipInvalid||!1,this.flowLevel=r.isNothing(E.flowLevel)?-1:E.flowLevel,this.styleMap=ht(this.schema,E.styles||null),this.sortKeys=E.sortKeys||!1,this.lineWidth=E.lineWidth||80,this.noRefs=E.noRefs||!1,this.noCompatMode=E.noCompatMode||!1,this.condenseFlow=E.condenseFlow||!1,this.quotingType=E.quotingType==='"'?At:Bt,this.forceQuotes=E.forceQuotes||!1,this.replacer=typeof E.replacer==="function"?E.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Gt,"State");function Vt(E,at){let wt=r.repeat(" ",at),xt=0,Ct="",St=E.length;while(xt<St){let kt,Ot=E.indexOf(`
143
- `,xt);if(Ot===-1)kt=E.slice(xt),xt=St;else kt=E.slice(xt,Ot+1),xt=Ot+1;if(kt.length&&kt!==`
144
- `)Ct+=wt;Ct+=kt}return Ct}t(Vt,"indentString");function Qt(E,at){return`
145
- `+r.repeat(" ",E.indent*at)}t(Qt,"generateNextLine");function Jt(E,at){for(let wt=0,xt=E.implicitTypes.length;wt<xt;wt+=1)if(E.implicitTypes[wt].resolve(at))return!0;return!1}t(Jt,"testImplicitResolving");function Pt(E){return E===f||E===c}t(Pt,"isWhitespace");function It(E){return E>=32&&E<=126||E>=161&&E<=55295&&E!==8232&&E!==8233||E>=57344&&E<=65533&&E!==a||E>=65536&&E<=1114111}t(It,"isPrintable");function zt(E){return It(E)&&E!==a&&E!==d&&E!==n}t(zt,"isNsCharOrWhitespace");function Kt(E,at,wt){let xt=zt(E),Ct=xt&&!Pt(E);return(wt?xt:xt&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D)&&E!==x&&!(at===F&&!Ct)||zt(at)&&!Pt(at)&&E===x||at===F&&Ct}t(Kt,"isPlainSafe");function Ut(E){return It(E)&&E!==a&&!Pt(E)&&E!==v&&E!==K&&E!==F&&E!==_&&E!==rt&&E!==st&&E!==ct&&E!==D&&E!==x&&E!==S&&E!==B&&E!==u&&E!==nt&&E!==I&&E!==O&&E!==T&&E!==m&&E!==b&&E!==Z&&E!==ut}t(Ut,"isPlainSafeFirst");function le(E){return!Pt(E)&&E!==F}t(le,"isPlainSafeLast");function ne(E,at){let wt=E.charCodeAt(at),xt;if(wt>=55296&&wt<=56319&&at+1<E.length){if(xt=E.charCodeAt(at+1),xt>=56320&&xt<=57343)return(wt-55296)*1024+xt-56320+65536}return wt}t(ne,"codePointAt");function er(E){return/^\n* /.test(E)}t(er,"needIndentIndicator");let Or=1,ze=2,yi=3,xi=4,He=5;function Dr(E,at,wt,xt,Ct,St,kt,Ot){let Et,Rt=0,Yt=null,re=!1,he=!1,kc=xt!==-1,Si=-1,Ti=Ut(ne(E,0))&&le(ne(E,E.length-1));if(at||kt)for(Et=0;Et<E.length;Rt>=65536?Et+=2:Et++){if(Rt=ne(E,Et),!It(Rt))return He;Ti=Ti&&Kt(Rt,Yt,Ot),Yt=Rt}else{for(Et=0;Et<E.length;Rt>=65536?Et+=2:Et++){if(Rt=ne(E,Et),Rt===n){if(re=!0,kc)he=he||Et-Si-1>xt&&E[Si+1]!==" ",Si=Et}else if(!It(Rt))return He;Ti=Ti&&Kt(Rt,Yt,Ot),Yt=Rt}he=he||kc&&(Et-Si-1>xt&&E[Si+1]!==" ")}if(!re&&!he){if(Ti&&!kt&&!Ct(E))return Or;return St===At?He:ze}if(wt>9&&er(E))return He;if(!kt)return he?xi:yi;return St===At?He:ze}t(Dr,"chooseScalarStyle");function Ci(E,at,wt,xt,Ct){E.dump=function(){if(at.length===0)return E.quotingType===At?'""':"''";if(!E.noCompatMode){if(it.indexOf(at)!==-1||P.test(at))return E.quotingType===At?'"'+at+'"':"'"+at+"'"}let St=E.indent*Math.max(1,wt),kt=E.lineWidth===-1?-1:Math.max(Math.min(E.lineWidth,40),E.lineWidth-St),Ot=xt||E.flowLevel>-1&&wt>=E.flowLevel;function Et(Rt){return Jt(E,Rt)}switch(t(Et,"testAmbiguity"),Dr(at,Ot,E.indent,kt,Et,E.quotingType,E.forceQuotes&&!xt,Ct)){case Or:return at;case ze:return"'"+at.replace(/'/g,"''")+"'";case yi:return"|"+Pr(at,E.indent)+Rr(Vt(at,St));case xi:return">"+Pr(at,E.indent)+Rr(Vt(bi(at,kt),St));case He:return'"'+ki(at)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Ci,"writeScalar");function Pr(E,at){let wt=er(E)?String(at):"",xt=E[E.length-1]===`
146
- `,St=xt&&(E[E.length-2]===`
147
- `||E===`
148
- `)?"+":xt?"":"-";return wt+St+`
149
- `}t(Pr,"blockHeader");function Rr(E){return E[E.length-1]===`
150
- `?E.slice(0,-1):E}t(Rr,"dropEndingNewline");function bi(E,at){let wt=/(\n+)([^\n]*)/g,xt=function(){let Ot=E.indexOf(`
151
- `);return Ot=Ot!==-1?Ot:E.length,wt.lastIndex=Ot,De(E.slice(0,Ot),at)}(),Ct=E[0]===`
152
- `||E[0]===" ",St,kt;while(kt=wt.exec(E)){let Ot=kt[1],Et=kt[2];St=Et[0]===" ",xt+=Ot+(!Ct&&!St&&Et!==""?`
153
- `:"")+De(Et,at),Ct=St}return xt}t(bi,"foldString");function De(E,at){if(E===""||E[0]===" ")return E;let wt=/ [^ ]/g,xt,Ct=0,St,kt=0,Ot=0,Et="";while(xt=wt.exec(E)){if(Ot=xt.index,Ot-Ct>at)St=kt>Ct?kt:Ot,Et+=`
154
- `+E.slice(Ct,St),Ct=St+1;kt=Ot}if(Et+=`
155
- `,E.length-Ct>at&&kt>Ct)Et+=E.slice(Ct,kt)+`
156
- `+E.slice(kt+1);else Et+=E.slice(Ct);return Et.slice(1)}t(De,"foldLine");function ki(E){let at="",wt=0;for(let xt=0;xt<E.length;wt>=65536?xt+=2:xt++){wt=ne(E,xt);let Ct=U[wt];if(!Ct&&It(wt)){if(at+=E[xt],wt>=65536)at+=E[xt+1]}else at+=Ct||lt(wt)}return at}t(ki,"escapeString");function qr(E,at,wt){let xt="",Ct=E.tag;for(let St=0,kt=wt.length;St<kt;St+=1){let Ot=wt[St];if(E.replacer)Ot=E.replacer.call(wt,String(St),Ot);if(gt(E,at,Ot,!1,!1)||typeof Ot>"u"&&gt(E,at,null,!1,!1)){if(xt!=="")xt+=","+(!E.condenseFlow?" ":"");xt+=E.dump}}E.tag=Ct,E.dump="["+xt+"]"}t(qr,"writeFlowSequence");function Wr(E,at,wt,xt){let Ct="",St=E.tag;for(let kt=0,Ot=wt.length;kt<Ot;kt+=1){let Et=wt[kt];if(E.replacer)Et=E.replacer.call(wt,String(kt),Et);if(gt(E,at+1,Et,!0,!0,!1,!0)||typeof Et>"u"&&gt(E,at+1,null,!0,!0,!1,!0)){if(!xt||Ct!=="")Ct+=Qt(E,at);if(E.dump&&n===E.dump.charCodeAt(0))Ct+="-";else Ct+="- ";Ct+=E.dump}}E.tag=St,E.dump=Ct||"[]"}t(Wr,"writeBlockSequence");function wi(E,at,wt){let xt="",Ct=E.tag,St=Object.keys(wt);for(let kt=0,Ot=St.length;kt<Ot;kt+=1){let Et="";if(xt!=="")Et+=", ";if(E.condenseFlow)Et+='"';let Rt=St[kt],Yt=wt[Rt];if(E.replacer)Yt=E.replacer.call(wt,Rt,Yt);if(!gt(E,at,Rt,!1,!1))continue;if(E.dump.length>1024)Et+="? ";if(Et+=E.dump+(E.condenseFlow?'"':"")+":"+(E.condenseFlow?"":" "),!gt(E,at,Yt,!1,!1))continue;Et+=E.dump,xt+=Et}E.tag=Ct,E.dump="{"+xt+"}"}t(wi,"writeFlowMapping");function k(E,at,wt,xt){let Ct="",St=E.tag,kt=Object.keys(wt);if(E.sortKeys===!0)kt.sort();else if(typeof E.sortKeys==="function")kt.sort(E.sortKeys);else if(E.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Ot=0,Et=kt.length;Ot<Et;Ot+=1){let Rt="";if(!xt||Ct!=="")Rt+=Qt(E,at);let Yt=kt[Ot],re=wt[Yt];if(E.replacer)re=E.replacer.call(wt,Yt,re);if(!gt(E,at+1,Yt,!0,!0,!0))continue;let he=E.tag!==null&&E.tag!=="?"||E.dump&&E.dump.length>1024;if(he)if(E.dump&&n===E.dump.charCodeAt(0))Rt+="?";else Rt+="? ";if(Rt+=E.dump,he)Rt+=Qt(E,at);if(!gt(E,at+1,re,!0,he))continue;if(E.dump&&n===E.dump.charCodeAt(0))Rt+=":";else Rt+=": ";Rt+=E.dump,Ct+=Rt}E.tag=St,E.dump=Ct||"{}"}t(k,"writeBlockMapping");function ot(E,at,wt){let xt=wt?E.explicitTypes:E.implicitTypes;for(let Ct=0,St=xt.length;Ct<St;Ct+=1){let kt=xt[Ct];if((kt.instanceOf||kt.predicate)&&(!kt.instanceOf||typeof at==="object"&&at instanceof kt.instanceOf)&&(!kt.predicate||kt.predicate(at))){if(wt)if(kt.multi&&kt.representName)E.tag=kt.representName(at);else E.tag=kt.tag;else E.tag="?";if(kt.represent){let Ot=E.styleMap[kt.tag]||kt.defaultStyle,Et;if(s.call(kt.represent)==="[object Function]")Et=kt.represent(at,Ot);else if(o.call(kt.represent,Ot))Et=kt.represent[Ot](at,Ot);else throw new e("!<"+kt.tag+'> tag resolver accepts not "'+Ot+'" style');E.dump=Et}return!0}}return!1}t(ot,"detectType");function gt(E,at,wt,xt,Ct,St,kt){if(E.tag=null,E.dump=wt,!ot(E,wt,!1))ot(E,wt,!0);let Ot=s.call(E.dump),Et=xt;if(xt)xt=E.flowLevel<0||E.flowLevel>at;let Rt=Ot==="[object Object]"||Ot==="[object Array]",Yt,re;if(Rt)Yt=E.duplicates.indexOf(wt),re=Yt!==-1;if(E.tag!==null&&E.tag!=="?"||re||E.indent!==2&&at>0)Ct=!1;if(re&&E.usedDuplicates[Yt])E.dump="*ref_"+Yt;else{if(Rt&&re&&!E.usedDuplicates[Yt])E.usedDuplicates[Yt]=!0;if(Ot==="[object Object]"){if(xt&&Object.keys(E.dump).length!==0){if(k(E,at,E.dump,Ct),re)E.dump="&ref_"+Yt+E.dump}else if(wi(E,at,E.dump),re)E.dump="&ref_"+Yt+" "+E.dump}else if(Ot==="[object Array]"){if(xt&&E.dump.length!==0){if(E.noArrayIndent&&!kt&&at>0)Wr(E,at-1,E.dump,Ct);else Wr(E,at,E.dump,Ct);if(re)E.dump="&ref_"+Yt+E.dump}else if(qr(E,at,E.dump),re)E.dump="&ref_"+Yt+" "+E.dump}else if(Ot==="[object String]"){if(E.tag!=="?")Ci(E,E.dump,at,St,Et)}else if(Ot==="[object Undefined]")return!1;else{if(E.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Ot)}if(E.tag!==null&&E.tag!=="?"){let he=encodeURI(E.tag[0]==="!"?E.tag.slice(1):E.tag).replace(/!/g,"%21");if(E.tag[0]==="!")he="!"+he;else if(he.slice(0,18)==="tag:yaml.org,2002:")he="!!"+he.slice(18);else he="!<"+he+">";E.dump=he+" "+E.dump}}return!0}t(gt,"writeNode");function bt(E,at){let wt=[],xt=[];dt(E,wt,xt);let Ct=xt.length;for(let St=0;St<Ct;St+=1)at.duplicates.push(wt[xt[St]]);at.usedDuplicates=Array(Ct)}t(bt,"getDuplicateReferences");function dt(E,at,wt){if(E!==null&&typeof E==="object"){let xt=at.indexOf(E);if(xt!==-1){if(wt.indexOf(xt)===-1)wt.push(xt)}else if(at.push(E),Array.isArray(E))for(let Ct=0,St=E.length;Ct<St;Ct+=1)dt(E[Ct],at,wt);else{let Ct=Object.keys(E);for(let St=0,kt=Ct.length;St<kt;St+=1)dt(E[Ct[St]],at,wt)}}}t(dt,"inspectNode");function Tt(E,at){at=at||{};let wt=new Gt(at);if(!wt.noRefs)bt(E,wt);let xt=E;if(wt.replacer)xt=wt.replacer.call({"":xt},"",xt);if(gt(wt,0,xt,!0,!0))return wt.dump+`
157
- `;return""}return t(Tt,"dump2"),Rl.dump=Tt,Rl}t(Od,"requireDumper");var Ad;function Dd(){if(Ad)return Se;Ad=1;let r=Id(),e=Od();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Se.Type=Te(),Se.Schema=Nl(),Se.FAILSAFE_SCHEMA=eh(),Se.JSON_SCHEMA=ah(),Se.CORE_SCHEMA=nh(),Se.DEFAULT_SCHEMA=vs(),Se.load=r.load,Se.loadAll=r.loadAll,Se.dump=e.dump,Se.YAMLException=ai(),Se.types={binary:ch(),float:sh(),map:th(),null:rh(),pairs:dh(),set:fh(),timestamp:lh(),bool:ih(),int:oh(),merge:hh(),omap:uh(),seq:Ql(),str:zl()},Se.safeLoad=i("safeLoad","load"),Se.safeLoadAll=i("safeLoadAll","loadAll"),Se.safeDump=i("safeDump","dump"),Se}t(Dd,"requireJsYaml");var rb=Dd(),ib=Ed(rb),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:lr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:cr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=ib;var up=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((m,x,b)=>r.append("defs").append("filter").attr("id",m).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",b).attr("dy",b).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Pd=t((r)=>{let{handDrawnSeed:e}=p();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),ob=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ge=t((r)=>{let e=sb([...r.cssCompiledStyles||[],...r.cssStyles||[],...ob(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),sb=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Mu=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),Q=t((r)=>{let{stylesArray:e}=Ge(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Mu(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),vt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=p(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ge(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:ab(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),ab=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var ph=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!Ls(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!Ls(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ls(n,i)?null:n}return null},Ls=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var nb=Object.freeze({left:0,top:0,width:16,height:16}),ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gh=Object.freeze({...nb,...ni}),Rd=Object.freeze({...gh,body:"",hidden:!1});function qd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function mh(r,e){let i=qd(r,e);for(let s in Rd)if(s in ni){if(s in r&&!(s in i))i[s]=ni[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Wd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Nd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=mh(s[n]||o[n],a)}return c(e),i.forEach(c),mh(r,a)}function yh(r,e){if(r.icons[e])return Nd(r,e,[]);let i=Wd(r,[e])[e];return i?Nd(r,e,i):null}var lb=Object.freeze({width:null,height:null}),zd=Object.freeze({...lb,...ni});var hb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xh(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(hb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=cb.test(a);while(!0){if(c){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");c=!c}}function ub(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function db(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Hd(r,e,i){let s=ub(r);return db(s.defs,e+s.content+i)}var fb=(r)=>r==="unset"||r==="undefined"||r==="none";function Ch(r,e){let i={...gh,...r},s={...zd,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:F}=T;if(_)if(v)F+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let I;if(F<0)F-=Math.floor(F/4)*4;switch(F=F%4,F){case 1:I=o.height/2+o.top,B.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:I=o.width/2+o.left,B.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")")}if(F%2===1){if(o.left!==o.top)I=o.left,o.left=o.top,o.top=I;if(o.width!==o.height)I=o.width,o.width=o.height,o.height=I}if(B.length)a=Hd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,m;if(c===null)m=n===null?"1em":n==="auto"?f:n,u=xh(m,d/f);else u=c==="auto"?d:c,m=n===null?xh(u,f/d):n==="auto"?f:n;let x={},b=(T,B)=>{if(!fb(B))x[T]=B.toString()};b("width",u),b("height",m);let S=[o.left,o.top,d,f];return x.viewBox=S.join(" "),{attributes:x,viewBox:S,body:a}}var pb=/\sid="(\S+)"/g,Yd=new Map;function gb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Yd.get(r)||0;return Yd.set(r,e+1),e?`${r}${e}`:r}function bh(r){let e=[],i;while(i=pb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=gb(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function kh(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Wf={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},wh=new Map,jd=new Map,Mi=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)jd.set(e.name,e.loader);else if("icons"in e)wh.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ud=t(async(r,e)=>{let i=ph(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=wh.get(s);if(!o){let c=jd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},wh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=yh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Fs=t(async(r)=>{try{return await Ud(r),!0}catch{return!1}},"isIconAvailable"),ur=t(async(r,e,i)=>{let s;try{s=await Ud(r,e?.fallbackPrefix)}catch(c){l.error(c),s=Wf}let o=Ch(s,e),a=kh(bh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var hf=fn($s(),1);function Lr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function Pi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Jo(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var dp="[object RegExp]",Jl="[object String]",Zl="[object Number]",Xl="[object Boolean]",ec="[object Arguments]",pp="[object Symbol]",mp="[object Date]",fp="[object Map]",gp="[object Set]",Ap="[object Array]";var hp="[object ArrayBuffer]",bp="[object Object]";var yp="[object DataView]",vp="[object Uint8Array]",kp="[object Uint8ClampedArray]",xp="[object Uint16Array]",wp="[object Uint32Array]";var Cp="[object Int8Array]",Ep="[object Int16Array]",Bp="[object Int32Array]";var Ip="[object Float32Array]",_p="[object Float64Array]";function li(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Zo(r){return li(r)}function Qd(){}function Jd(r){if(Pi(r))return r;if(Array.isArray(r)||li(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function As(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var Sh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function tc(r){return typeof Sh.Buffer<"u"&&Sh.Buffer.isBuffer(r)}function tf(r){return r==="__proto__"}function Es(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ef(r,e){return hi(r,void 0,r,new Map,e)}function hi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Pi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,hi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(hi(n,void 0,i,s,o));return c}if(tc(r))return r.subarray();if(li(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,Oe(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof r==="object"&&Lb(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),Oe(c,r,i,s,o),c}return r}function Oe(r,e,i=r,s,o){let a=[...Object.keys(e),...As(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=hi(e[n],n,i,s,o)}}function Lb(r){switch(Jo(r)){case ec:case Ap:case hp:case yp:case Xl:case mp:case Ip:case _p:case Cp:case Ep:case Bp:case fp:case Zl:case bp:case dp:case gp:case Jl:case pp:case vp:case kp:case xp:case wp:return!0;default:return!1}}function rf(r,e){return ef(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Jo(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Oe(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Zl:case Jl:case Xl:{let n=new r.constructor(r?.valueOf());return Oe(n,r),n}case ec:{let n={};return Oe(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function Th(r){return rf(r)}function Pu(r){return r!==null&&typeof r==="object"&&Jo(r)==="[object Arguments]"}function yo(r){return typeof r==="object"&&r!==null}function of(r){return Number.isSafeInteger(r)&&r>=0}function Sp(r){return r!=null&&typeof r!=="function"&&of(r.length)}function sf(r){return yo(r)&&Sp(r)}function af(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Is(o,c,s,new Map)}return o}function Is(r,e,i,s){if(Pi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return Jd(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...As(e)];for(let a=0;a<o.length;a++){let c=o[a];if(tf(c))continue;let n=e[c],d=r[c];if(Pu(n))n={...n};if(Pu(d))d={...d};if(tc(n))n=Th(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],m=Reflect.ownKeys(d);for(let x=0;x<m.length;x++){let b=m[x];u[b]=d[b]}d=u}else if(sf(d)){let u=[];for(let m=0;m<d.length;m++)u[m]=d[m];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Is(d,n,i,s);else if(yo(d)&&yo(n)&&(Es(d)||Es(n)||Zo(d)||Zo(n)))r[c]=Is(d,n,i,s);else if(d==null&&Es(n))r[c]=Is({},n,i,s);else if(d==null&&Zo(n))r[c]=Th(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function Bh(r,...e){return af(r,...e,Qd)}var Kf="​",Fb={curveBasis:vr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ro,curveBumpY:io,curveBundle:hl,curveCardinalClosed:cl,curveCardinalOpen:ul,curveCardinal:so,curveCatmullRomClosed:dl,curveCatmullRomOpen:fl,curveCatmullRom:no,curveLinear:pa,curveLinearClosed:Ss,curveMonotoneX:lo,curveMonotoneY:co,curveNatural:ii,curveStep:oi,curveStepAfter:go,curveStepBefore:uo},Mb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ab=t(function(r,e){let i=cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);Ei(c),s=Ve(s,[...c])}else s=i.args;if(!s)return;let o=Gl(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Mb.source})(?=[}][%]{2}).*
158
- `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Nr.exec(r))!==null){if(s.index===Nr.lastIndex)Nr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),eA=t(function(r){return r.replace(Nr,"")},"removeDirectives"),Eb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Rs(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return Fb[i]??e}t(Rs,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var $b=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function _h(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(_h,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=_h(o,e),e=o});let s=i/2;return vh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),vh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=_h(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ib=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=vh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=vh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Tp(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Tp,"getStylesFromArray");var lf=0,Vf=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(gf,"makeRandomHex");var Yf=t((r)=>gf(r.length),"random"),Ob=t(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"),Db=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Nn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),Oi=Lr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((c,n)=>{let d=Kn(`${c} `,i),f=Kn(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:b}=Pb(c,e,"-",i);o.push(a,...x),a=b}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Pb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(Kn(f,s)>=e){let m=d+1,x=o.length===m,b=`${f}${i}`;a.push(x?f:b),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Ou(r,e){return $u(r,e).height}t(Ou,"calculateTextHeight");function Kn(r,e){return $u(r,e).width}t(Kn,"calculateTextWidth");var $u=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Nn(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let b=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Ob();B.text=T||Kf;let _=Db(u,B).style("font-size",a).style("font-weight",o).style("font-family",x),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),b=Math.round(v.height),S.height+=b,S.lineHeight=Math.round(Math.max(S.lineHeight,b))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Rb=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},Ds,qb=t(function(r){return Ds=Ds||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ds.innerHTML=r,unescape(Ds.textContent)},"entityDecode");function Dp(r){return"str"in r}t(Dp,"isDetailedError");var Wb=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Nn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ie(r,e){return Bh({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:Ve,wrapLabel:Oi,calculateTextHeight:Ou,calculateTextWidth:Kn,calculateTextDimensions:$u,cleanAndMerge:ie,detectInit:Ab,detectDirective:cf,isSubstringInArray:Eb,interpolateToCurve:Rs,calcLabelPosition:ff,calcCardinalityPosition:Ib,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Tp,generateId:Vf,random:Yf,runFunc:$b,entityDecode:qb,insertTitle:Wb,isLabelCoordinateInPath:mf,parseFontSize:Nn,InitIDGenerator:Rb},tA=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),$a=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Bn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function ue(r){return r??null}t(ue,"handleUndefinedAttr");function mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(mf,"isLabelCoordinateInPath");function Fh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=Fh();function Sf(r){Mr=r}var wo={exec:()=>null};function se(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Le.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Nb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Le={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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},zb=/^(?:[ \t]*(?:\n|$))+/,Hb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,So=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Mh=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=se(Tf).replace(/bull/g,Mh).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(),Ub=se(Tf).replace(/bull/g,Mh).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(),Ah=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xb=/^[^\n]+/,Eh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Gb=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vb=se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Mh).getRegex(),Ys="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",$h=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kb=se("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$h).replace("tag",Ys).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=se(Ah).replace("hr",So).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",Ys).getRegex(),Zb=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Ih={blockquote:Zb,code:Hb,def:Gb,fences:Yb,heading:jb,hr:So,html:Kb,lheading:Bf,list:Vb,newline:zb,paragraph:_f,table:wo,text:Xb},yf=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",Ys).getRegex(),Qb={...Ih,lheading:Ub,table:yf,paragraph:se(Ah).replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",Ys).getRegex()},Jb={...Ih,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$h).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:wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(Ah).replace("hr",So).replace("heading",` *#{1,6} *[^
159
- ]`).replace("lheading",Bf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ek=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vf=/^( {2,}|\\)\n(?!\s*$)/,rk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,js=/[\p{P}\p{S}]/u,Oh=/[\s\p{P}\p{S}]/u,Lf=/[^\s\p{P}\p{S}]/u,ik=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Oh).getRegex(),Ff=/(?!~)[\p{P}\p{S}]/u,ok=/(?!~)[\s\p{P}\p{S}]/u,sk=/(?:[^\s\p{P}\p{S}]|~)/u,ak=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Nb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nk=se(Mf,"u").replace(/punct/g,js).getRegex(),lk=se(Mf,"u").replace(/punct/g,Ff).getRegex(),Af="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hk=se(Af,"gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Oh).replace(/punct/g,js).getRegex(),ck=se(Af,"gu").replace(/notPunctSpace/g,sk).replace(/punctSpace/g,ok).replace(/punct/g,Ff).getRegex(),uk=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Oh).replace(/punct/g,js).getRegex(),dk=se(/\\(punct)/,"gu").replace(/punct/g,js).getRegex(),fk=se(/^<(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(),pk=se($h).replace("(?:-->|$)","-->").getRegex(),gk=se("^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",pk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ws=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mk=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ws).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ef=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Ws).replace("ref",Eh).getRegex(),If=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eh).getRegex(),yk=se("reflink|nolink(?!\\()","g").replace("reflink",Ef).replace("nolink",If).getRegex(),xf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dh={_backpedal:wo,anyPunctuation:dk,autolink:fk,blockSkip:ak,br:vf,code:ek,del:wo,emStrongLDelim:nk,emStrongRDelimAst:hk,emStrongRDelimUnd:uk,escape:tk,link:mk,nolink:If,punctuation:ik,reflink:Ef,reflinkSearch:yk,tag:gk,text:rk,url:wo},xk={...Dh,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Ws).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ws).getRegex()},Lh={...Dh,emStrongRDelimAst:ck,emStrongLDelim:lk,url:se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xf).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:se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xf).getRegex()},Ck={...Lh,br:se(vf).replace("{2,}","*").getRegex(),text:se(Lh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qs={normal:Ih,gfm:Qb,pedantic:Jb},xo={normal:Dh,gfm:Lh,breaks:Ck,pedantic:xk},bk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cf=(r)=>bk[r];function Ke(r,e){if(e){if(Le.escapeTest.test(r))return r.replace(Le.escapeReplace,Cf)}else if(Le.escapeTestNoEncode.test(r))return r.replace(Le.escapeReplaceNoEncode,Cf);return r}function bf(r){try{r=encodeURI(r).replace(Le.percentDecode,"%")}catch{return null}return r}function kf(r,e){let i=r.replace(Le.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Le.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Le.slashPipe,"|");return s}function Co(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function kk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function wf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function wk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
132
+ `}return m.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t($d,"requireSnippet");var Cl,cd;function Te(){if(cd)return Cl;cd=1;let r=ai(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(Te,"requireType");var bl,ud;function ql(){if(ud)return bl;ud=1;let r=ai(),e=Te();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,m){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=m}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(ql,"requireSchema");var kl,dd;function Wl(){if(dd)return kl;return dd=1,kl=new(Te())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(Wl,"requireStr");var wl,fd;function Nl(){if(fd)return wl;return fd=1,wl=new(Te())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(Nl,"requireSeq");var Sl,pd;function zl(){if(pd)return Sl;return pd=1,Sl=new(Te())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(zl,"requireMap");var Tl,gd;function Hl(){if(gd)return Tl;return gd=1,Tl=new(ql())({explicit:[Wl(),Nl(),zl()]}),Tl}t(Hl,"requireFailsafe");var Bl,md;function jl(){if(md)return Bl;md=1;let r=Te();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bl}t(jl,"require_null");var _l,yd;function Ul(){if(yd)return _l;yd=1;let r=Te();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),_l=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),_l}t(Ul,"requireBool");var vl,xd;function Gl(){if(xd)return vl;xd=1;let r=si(),e=Te();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,m=0,x=!1;if(!u)return!1;let b=f[m];if(b==="-"||b==="+")b=f[++m];if(b==="0"){if(m+1===u)return!0;if(b=f[++m],b==="b"){m++;for(;m<u;m++){if(b=f[m],b!=="0"&&b!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(b==="x"){m++;for(;m<u;m++){if(!i(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}if(b==="o"){m++;for(;m<u;m++){if(!s(f.charCodeAt(m)))return!1;x=!0}return x&&isFinite(c(f))}}for(;m<u;m++){if(!o(f.charCodeAt(m)))return!1;x=!0}if(!x)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,m=1,x=u[0];if(x==="-"||x==="+"){if(x==="-")m=-1;u=u.slice(1),x=u[0]}if(u==="0")return 0;if(x==="0"){if(u[1]==="b")return m*parseInt(u.slice(2),2);if(u[1]==="x")return m*parseInt(u.slice(2),16);if(u[1]==="o")return m*parseInt(u.slice(2),8)}return m*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(Gl,"requireInt");var Ll,Cd;function Ql(){if(Cd)return Ll;Cd=1;let r=si(),e=Te(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),m=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return m*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return c.test(m)?m.replace("e",".e"):m}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(Ql,"requireFloat");var Fl,bd;function th(){if(bd)return Fl;return bd=1,Fl=Hl().extend({implicit:[jl(),Ul(),Gl(),Ql()]}),Fl}t(th,"requireJson");var Ml,kd;function eh(){if(kd)return Ml;return kd=1,Ml=th(),Ml}t(eh,"requireCore");var Al,wd;function rh(){if(wd)return Al;wd=1;let r=Te(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new 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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],m=+f[2]-1,x=+f[3];if(!f[4])return new Date(Date.UTC(u,m,x));let b=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,m,x,b,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(rh,"requireTimestamp");var El,Sd;function ih(){if(Sd)return El;Sd=1;let r=Te();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(ih,"requireMerge");var $l,Td;function oh(){if(Td)return $l;Td=1;let r=Te(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
133
+ \r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let m=f.indexOf(c.charAt(u));if(m>64)continue;if(m<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,m=[];for(let b=0;b<d;b++){if(b%4===0&&b)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);u=u<<6|f.indexOf(n.charAt(b))}let x=d%4*6;if(x===0)m.push(u>>16&255),m.push(u>>8&255),m.push(u&255);else if(x===18)m.push(u>>10&255),m.push(u>>2&255);else if(x===12)m.push(u>>4&255);return new Uint8Array(m)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let x=0;x<f;x++){if(x%3===0&&x)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[x]}let m=f%3;if(m===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(m===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(m===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(oh,"requireBinary");var Il,Bd;function sh(){if(Bd)return Il;Bd=1;let r=Te(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],m=!1;if(i.call(u)!=="[object Object]")return!1;let x;for(x in u)if(e.call(u,x))if(!m)m=!0;else return!1;if(!m)return!1;if(c.indexOf(x)===-1)c.push(x);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(sh,"requireOmap");var Ol,_d;function ah(){if(_d)return Ol;_d=1;let r=Te(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(ah,"requirePairs");var Dl,vd;function nh(){if(vd)return Dl;vd=1;let r=Te(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(nh,"requireSet");var Pl,Ld;function vs(){if(Ld)return Pl;return Ld=1,Pl=eh().extend({implicit:[rh(),ih()],explicit:[oh(),sh(),ah(),nh()]}),Pl}t(vs,"require_default");var Fd;function Id(){if(Fd)return _s;Fd=1;let r=si(),e=ai(),i=$d(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,m=3,x=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(k){return Object.prototype.toString.call(k)}t(_,"_class");function v(k){return k===10||k===13}t(v,"isEol");function E(k){return k===9||k===32}t(E,"isWhiteSpace");function O(k){return k===9||k===32||k===10||k===13}t(O,"isWsOrEol");function D(k){return k===44||k===91||k===93||k===123||k===125}t(D,"isFlowIndicator");function K(k){if(k>=48&&k<=57)return k-48;let it=k|32;if(it>=97&&it<=102)return it-97+10;return-1}t(K,"fromHexCode");function Z(k){if(k===120)return 2;if(k===117)return 4;if(k===85)return 8;return 0}t(Z,"escapedHexLen");function tt(k){if(k>=48&&k<=57)return k-48;return-1}t(tt,"fromDecimalCode");function ot(k){switch(k){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
134
+ `;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" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(ot,"simpleEscapeSequence");function ut(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ut,"charFromCodepoint");function ct(k,it,pt){if(it==="__proto__")Object.defineProperty(k,it,{configurable:!0,enumerable:!0,writable:!0,value:pt});else k[it]=pt}t(ct,"setProperty");let at=Array(256),P=Array(256);for(let k=0;k<256;k++)at[k]=ot(k)?1:0,P[k]=ot(k);function U(k,it){this.input=k,this.filename=it.filename||null,this.schema=it.schema||s,this.onWarning=it.onWarning||null,this.legacy=it.legacy||!1,this.json=it.json||!1,this.listener=it.listener||null,this.maxDepth=typeof it.maxDepth==="number"?it.maxDepth:100,this.maxTotalMergeKeys=typeof it.maxTotalMergeKeys==="number"?it.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=k.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=[]}t(U,"State");function et(k,it){let pt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return pt.snippet=i(pt),new e(it,pt)}t(et,"generateError");function R(k,it){throw et(k,it)}t(R,"throwError");function ht(k,it){if(k.onWarning)k.onWarning.call(null,et(k,it))}t(ht,"throwWarning");function lt(k,it,pt){let xt=k.anchorMapTransactions;if(xt.length!==0){let dt=xt[xt.length-1];if(!o.call(dt,it))dt[it]={existed:o.call(k.anchorMap,it),value:k.anchorMap[it]}}k.anchorMap[it]=pt}t(lt,"storeAnchor");function Bt(k){k.anchorMapTransactions.push(Object.create(null))}t(Bt,"beginAnchorTransaction");function vt(k){let it=k.anchorMapTransactions.pop(),pt=k.anchorMapTransactions;if(pt.length===0)return;let xt=pt[pt.length-1],dt=Object.keys(it);for(let Tt=0,I=dt.length;Tt<I;Tt+=1){let st=dt[Tt];if(!o.call(xt,st))xt[st]=it[st]}}t(vt,"commitAnchorTransaction");function Xt(k){let it=k.anchorMapTransactions.pop(),pt=Object.keys(it);for(let xt=pt.length-1;xt>=0;xt-=1){let dt=it[pt[xt]];if(dt.existed)k.anchorMap[pt[xt]]=dt.value;else delete k.anchorMap[pt[xt]]}}t(Xt,"rollbackAnchorTransaction");function Gt(k){return{position:k.position,line:k.line,lineStart:k.lineStart,lineIndent:k.lineIndent,firstTabInLine:k.firstTabInLine,tag:k.tag,anchor:k.anchor,kind:k.kind,result:k.result}}t(Gt,"snapshotState");function Qt(k,it){k.position=it.position,k.line=it.line,k.lineStart=it.lineStart,k.lineIndent=it.lineIndent,k.firstTabInLine=it.firstTabInLine,k.tag=it.tag,k.anchor=it.anchor,k.kind=it.kind,k.result=it.result}t(Qt,"restoreState");let Jt={YAML:t(function(it,pt,xt){if(it.version!==null)R(it,"duplication of %YAML directive");if(xt.length!==1)R(it,"YAML directive accepts exactly one argument");let dt=/^([0-9]+)\.([0-9]+)$/.exec(xt[0]);if(dt===null)R(it,"ill-formed argument of the YAML directive");let Tt=parseInt(dt[1],10),I=parseInt(dt[2],10);if(Tt!==1)R(it,"unacceptable YAML version of the document");if(it.version=xt[0],it.checkLineBreaks=I<2,I!==1&&I!==2)ht(it,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(it,pt,xt){let dt;if(xt.length!==2)R(it,"TAG directive accepts exactly two arguments");let Tt=xt[0];if(dt=xt[1],!T.test(Tt))R(it,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(it.tagMap,Tt))R(it,'there is a previously declared suffix for "'+Tt+'" tag handle');if(!B.test(dt))R(it,"ill-formed tag prefix (second argument) of the TAG directive");try{dt=decodeURIComponent(dt)}catch(I){R(it,"tag prefix is malformed: "+dt)}it.tagMap[Tt]=dt},"handleTagDirective")};function Ot(k,it,pt,xt){if(it<pt){let dt=k.input.slice(it,pt);if(xt)for(let Tt=0,I=dt.length;Tt<I;Tt+=1){let st=dt.charCodeAt(Tt);if(!(st===9||st>=32&&st<=1114111))R(k,"expected valid JSON character")}else if(x.test(dt))R(k,"the stream contains non-printable characters");k.result+=dt}}t(Ot,"captureSegment");function Et(k,it,pt,xt){if(!r.isObject(pt))R(k,"cannot merge mappings; the provided source object is unacceptable");let dt=Object.keys(pt);for(let Tt=0,I=dt.length;Tt<I;Tt+=1){let st=dt[Tt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)R(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(it,st))ct(it,st,pt[st]),xt[st]=!0}}t(Et,"mergeMappings");function Nt(k,it,pt,xt,dt,Tt,I,st,bt){if(Array.isArray(dt)){dt=Array.prototype.slice.call(dt);for(let mt=0,yt=dt.length;mt<yt;mt+=1){if(Array.isArray(dt[mt]))R(k,"nested arrays are not supported inside keys");if(typeof dt==="object"&&_(dt[mt])==="[object Object]")dt[mt]="[object Object]"}}if(typeof dt==="object"&&_(dt)==="[object Object]")dt="[object Object]";if(dt=String(dt),it===null)it={};if(xt==="tag:yaml.org,2002:merge")if(Array.isArray(Tt))for(let mt=0,yt=Tt.length;mt<yt;mt+=1)Et(k,it,Tt[mt],pt);else Et(k,it,Tt,pt);else{if(!k.json&&!o.call(pt,dt)&&o.call(it,dt))k.line=I||k.line,k.lineStart=st||k.lineStart,k.position=bt||k.position,R(k,"duplicated mapping key");ct(it,dt,Tt),delete pt[dt]}return it}t(Nt,"storeMappingPair");function Vt(k){let it=k.input.charCodeAt(k.position);if(it===10)k.position++;else if(it===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else R(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Vt,"readLineBreak");function jt(k,it,pt){let xt=0,dt=k.input.charCodeAt(k.position);while(dt!==0){while(E(dt)){if(dt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;dt=k.input.charCodeAt(++k.position)}if(it&&dt===35)do dt=k.input.charCodeAt(++k.position);while(dt!==10&&dt!==13&&dt!==0);if(v(dt)){Vt(k),dt=k.input.charCodeAt(k.position),xt++,k.lineIndent=0;while(dt===32)k.lineIndent++,dt=k.input.charCodeAt(++k.position)}else break}if(pt!==-1&&xt!==0&&k.lineIndent<pt)ht(k,"deficient indentation");return xt}t(jt,"skipSeparationSpace");function le(k){let it=k.position,pt=k.input.charCodeAt(it);if((pt===45||pt===46)&&pt===k.input.charCodeAt(it+1)&&pt===k.input.charCodeAt(it+2)){if(it+=3,pt=k.input.charCodeAt(it),pt===0||O(pt))return!0}return!1}t(le,"testDocumentSeparator");function ne(k,it){if(it===1)k.result+=" ";else if(it>1)k.result+=r.repeat(`
135
+ `,it-1)}t(ne,"writeFoldedLines");function er(k,it,pt){let xt,dt,Tt,I,st,bt,{kind:mt,result:yt}=k,wt=k.input.charCodeAt(k.position);if(O(wt)||D(wt)||wt===35||wt===38||wt===42||wt===33||wt===124||wt===62||wt===39||wt===34||wt===37||wt===64||wt===96)return!1;if(wt===63||wt===45){let Ct=k.input.charCodeAt(k.position+1);if(O(Ct)||pt&&D(Ct))return!1}k.kind="scalar",k.result="",xt=dt=k.position,Tt=!1;while(wt!==0){if(wt===58){let Ct=k.input.charCodeAt(k.position+1);if(O(Ct)||pt&&D(Ct))break}else if(wt===35){let Ct=k.input.charCodeAt(k.position-1);if(O(Ct))break}else if(k.position===k.lineStart&&le(k)||pt&&D(wt))break;else if(v(wt))if(I=k.line,st=k.lineStart,bt=k.lineIndent,jt(k,!1,-1),k.lineIndent>=it){Tt=!0,wt=k.input.charCodeAt(k.position);continue}else{k.position=dt,k.line=I,k.lineStart=st,k.lineIndent=bt;break}if(Tt)Ot(k,xt,dt,!1),ne(k,k.line-I),xt=dt=k.position,Tt=!1;if(!E(wt))dt=k.position+1;wt=k.input.charCodeAt(++k.position)}if(Ot(k,xt,dt,!1),k.result)return!0;return k.kind=mt,k.result=yt,!1}t(er,"readPlainScalar");function Ir(k,it){let pt,xt,dt=k.input.charCodeAt(k.position);if(dt!==39)return!1;k.kind="scalar",k.result="",k.position++,pt=xt=k.position;while((dt=k.input.charCodeAt(k.position))!==0)if(dt===39)if(Ot(k,pt,k.position,!0),dt=k.input.charCodeAt(++k.position),dt===39)pt=k.position,k.position++,xt=k.position;else return!0;else if(v(dt))Ot(k,pt,xt,!0),ne(k,jt(k,!1,it)),pt=xt=k.position;else if(k.position===k.lineStart&&le(k))R(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!E(dt))xt=k.position;R(k,"unexpected end of the stream within a single quoted scalar")}t(Ir,"readSingleQuotedScalar");function ze(k,it){let pt,xt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==34)return!1;k.kind="scalar",k.result="",k.position++,pt=xt=k.position;while((Tt=k.input.charCodeAt(k.position))!==0)if(Tt===34)return Ot(k,pt,k.position,!0),k.position++,!0;else if(Tt===92){if(Ot(k,pt,k.position,!0),Tt=k.input.charCodeAt(++k.position),v(Tt))jt(k,!1,it);else if(Tt<256&&at[Tt])k.result+=P[Tt],k.position++;else if((dt=Z(Tt))>0){let I=dt,st=0;for(;I>0;I--)if(Tt=k.input.charCodeAt(++k.position),(dt=K(Tt))>=0)st=(st<<4)+dt;else R(k,"expected hexadecimal character");k.result+=ut(st),k.position++}else R(k,"unknown escape sequence");pt=xt=k.position}else if(v(Tt))Ot(k,pt,xt,!0),ne(k,jt(k,!1,it)),pt=xt=k.position;else if(k.position===k.lineStart&&le(k))R(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!E(Tt))xt=k.position;R(k,"unexpected end of the stream within a double quoted scalar")}t(ze,"readDoubleQuotedScalar");function yi(k,it){let pt=!0,xt,dt,Tt,I=k.tag,st,bt=k.anchor,mt,yt,wt,Ct,$t=Object.create(null),Ft,Dt,Yt,re=k.input.charCodeAt(k.position);if(re===91)mt=93,Ct=!1,st=[];else if(re===123)mt=125,Ct=!0,st={};else return!1;if(k.anchor!==null)lt(k,k.anchor,st);re=k.input.charCodeAt(++k.position);while(re!==0){if(jt(k,!0,it),re=k.input.charCodeAt(k.position),re===mt)return k.position++,k.tag=I,k.anchor=bt,k.kind=Ct?"mapping":"sequence",k.result=st,!0;else if(!pt)R(k,"missed comma between flow collection entries");else if(re===44)R(k,"expected the node content, but found ','");if(Dt=Ft=Yt=null,yt=wt=!1,re===63){let he=k.input.charCodeAt(k.position+1);if(O(he))yt=wt=!0,k.position++,jt(k,!0,it)}if(xt=k.line,dt=k.lineStart,Tt=k.position,De(k,it,a,!1,!0),Dt=k.tag,Ft=k.result,jt(k,!0,it),re=k.input.charCodeAt(k.position),(wt||k.line===xt)&&re===58)yt=!0,re=k.input.charCodeAt(++k.position),jt(k,!0,it),De(k,it,a,!1,!0),Yt=k.result;if(Ct)Nt(k,st,$t,Dt,Ft,Yt,xt,dt,Tt);else if(yt)st.push(Nt(k,null,$t,Dt,Ft,Yt,xt,dt,Tt));else st.push(Ft);if(jt(k,!0,it),re=k.input.charCodeAt(k.position),re===44)pt=!0,re=k.input.charCodeAt(++k.position);else pt=!1}R(k,"unexpected end of the stream within a flow collection")}t(yi,"readFlowCollection");function xi(k,it){let pt,xt=f,dt=!1,Tt=!1,I=it,st=0,bt=!1,mt,yt=k.input.charCodeAt(k.position);if(yt===124)pt=!1;else if(yt===62)pt=!0;else return!1;k.kind="scalar",k.result="";while(yt!==0)if(yt=k.input.charCodeAt(++k.position),yt===43||yt===45)if(f===xt)xt=yt===43?m:u;else R(k,"repeat of a chomping mode identifier");else if((mt=tt(yt))>=0)if(mt===0)R(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Tt)I=it+mt-1,Tt=!0;else R(k,"repeat of an indentation width identifier");else break;if(E(yt)){do yt=k.input.charCodeAt(++k.position);while(E(yt));if(yt===35)do yt=k.input.charCodeAt(++k.position);while(!v(yt)&&yt!==0)}while(yt!==0){Vt(k),k.lineIndent=0,yt=k.input.charCodeAt(k.position);while((!Tt||k.lineIndent<I)&&yt===32)k.lineIndent++,yt=k.input.charCodeAt(++k.position);if(!Tt&&k.lineIndent>I)I=k.lineIndent;if(v(yt)){st++;continue}if(!Tt&&I===0)R(k,"missing indentation for block scalar");if(k.lineIndent<I){if(xt===m)k.result+=r.repeat(`
136
+ `,dt?1+st:st);else if(xt===f){if(dt)k.result+=`
137
+ `}break}if(pt)if(E(yt))bt=!0,k.result+=r.repeat(`
138
+ `,dt?1+st:st);else if(bt)bt=!1,k.result+=r.repeat(`
139
+ `,st+1);else if(st===0){if(dt)k.result+=" "}else k.result+=r.repeat(`
140
+ `,st);else k.result+=r.repeat(`
141
+ `,dt?1+st:st);dt=!0,Tt=!0,st=0;let wt=k.position;while(!v(yt)&&yt!==0)yt=k.input.charCodeAt(++k.position);Ot(k,wt,k.position,!1)}return!0}t(xi,"readBlockScalar");function He(k,it){let{tag:pt,anchor:xt}=k,dt=[],Tt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,dt);let I=k.input.charCodeAt(k.position);while(I!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,R(k,"tab characters must not be used in indentation");if(I!==45)break;let st=k.input.charCodeAt(k.position+1);if(!O(st))break;if(Tt=!0,k.position++,jt(k,!0,-1)){if(k.lineIndent<=it){dt.push(null),I=k.input.charCodeAt(k.position);continue}}let bt=k.line;if(De(k,it,n,!1,!0),dt.push(k.result),jt(k,!0,-1),I=k.input.charCodeAt(k.position),(k.line===bt||k.lineIndent>it)&&I!==0)R(k,"bad indentation of a sequence entry");else if(k.lineIndent<it)break}if(Tt)return k.tag=pt,k.anchor=xt,k.kind="sequence",k.result=dt,!0;return!1}t(He,"readBlockSequence");function Or(k,it,pt){let xt,dt,Tt,I,{tag:st,anchor:bt}=k,mt={},yt=Object.create(null),wt=null,Ct=null,$t=null,Ft=!1,Dt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)lt(k,k.anchor,mt);let Yt=k.input.charCodeAt(k.position);while(Yt!==0){if(!Ft&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,R(k,"tab characters must not be used in indentation");let re=k.input.charCodeAt(k.position+1),he=k.line;if((Yt===63||Yt===58)&&O(re)){if(Yt===63){if(Ft)Nt(k,mt,yt,wt,Ct,null,dt,Tt,I),wt=Ct=$t=null;Dt=!0,Ft=!0,xt=!0}else if(Ft)Ft=!1,xt=!0;else R(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Yt=re}else{if(dt=k.line,Tt=k.lineStart,I=k.position,!De(k,pt,c,!1,!0))break;if(k.line===he){Yt=k.input.charCodeAt(k.position);while(E(Yt))Yt=k.input.charCodeAt(++k.position);if(Yt===58){if(Yt=k.input.charCodeAt(++k.position),!O(Yt))R(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Ft)Nt(k,mt,yt,wt,Ct,null,dt,Tt,I),wt=Ct=$t=null;Dt=!0,Ft=!1,xt=!1,wt=k.tag,Ct=k.result}else if(Dt)R(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=st,k.anchor=bt,!0}else if(Dt)R(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=st,k.anchor=bt,!0}if(k.line===he||k.lineIndent>it){if(Ft)dt=k.line,Tt=k.lineStart,I=k.position;if(De(k,it,d,!0,xt))if(Ft)Ct=k.result;else $t=k.result;if(!Ft)Nt(k,mt,yt,wt,Ct,$t,dt,Tt,I),wt=Ct=$t=null;jt(k,!0,-1),Yt=k.input.charCodeAt(k.position)}if((k.line===he||k.lineIndent>it)&&Yt!==0)R(k,"bad indentation of a mapping entry");else if(k.lineIndent<it)break}if(Ft)Nt(k,mt,yt,wt,Ct,null,dt,Tt,I);if(Dt)k.tag=st,k.anchor=bt,k.kind="mapping",k.result=mt;return Dt}t(Or,"readBlockMapping");function Ci(k){let it=!1,pt=!1,xt,dt,Tt=k.input.charCodeAt(k.position);if(Tt!==33)return!1;if(k.tag!==null)R(k,"duplication of a tag property");if(Tt=k.input.charCodeAt(++k.position),Tt===60)it=!0,Tt=k.input.charCodeAt(++k.position);else if(Tt===33)pt=!0,xt="!!",Tt=k.input.charCodeAt(++k.position);else xt="!";let I=k.position;if(it){do Tt=k.input.charCodeAt(++k.position);while(Tt!==0&&Tt!==62);if(k.position<k.length)dt=k.input.slice(I,k.position),Tt=k.input.charCodeAt(++k.position);else R(k,"unexpected end of the stream within a verbatim tag")}else{while(Tt!==0&&!O(Tt)){if(Tt===33)if(!pt){if(xt=k.input.slice(I-1,k.position+1),!T.test(xt))R(k,"named tag handle cannot contain such characters");pt=!0,I=k.position+1}else R(k,"tag suffix cannot contain exclamation marks");Tt=k.input.charCodeAt(++k.position)}if(dt=k.input.slice(I,k.position),S.test(dt))R(k,"tag suffix cannot contain flow indicator characters")}if(dt&&!B.test(dt))R(k,"tag name cannot contain such characters: "+dt);try{dt=decodeURIComponent(dt)}catch(st){R(k,"tag name is malformed: "+dt)}if(it)k.tag=dt;else if(o.call(k.tagMap,xt))k.tag=k.tagMap[xt]+dt;else if(xt==="!")k.tag="!"+dt;else if(xt==="!!")k.tag="tag:yaml.org,2002:"+dt;else R(k,'undeclared tag handle "'+xt+'"');return!0}t(Ci,"readTagProperty");function Dr(k){let it=k.input.charCodeAt(k.position);if(it!==38)return!1;if(k.anchor!==null)R(k,"duplication of an anchor property");it=k.input.charCodeAt(++k.position);let pt=k.position;while(it!==0&&!O(it)&&!D(it))it=k.input.charCodeAt(++k.position);if(k.position===pt)R(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(pt,k.position),!0}t(Dr,"readAnchorProperty");function Pr(k){let it=k.input.charCodeAt(k.position);if(it!==42)return!1;it=k.input.charCodeAt(++k.position);let pt=k.position;while(it!==0&&!O(it)&&!D(it))it=k.input.charCodeAt(++k.position);if(k.position===pt)R(k,"name of an alias node must contain at least one character");let xt=k.input.slice(pt,k.position);if(!o.call(k.anchorMap,xt))R(k,'unidentified alias "'+xt+'"');return k.result=k.anchorMap[xt],jt(k,!0,-1),!0}t(Pr,"readAlias");function bi(k,it,pt,xt){let dt=Gt(k);if(Bt(k),Qt(k,it),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Or(k,pt,xt)&&k.kind==="mapping")return vt(k),!0;return Xt(k),Qt(k,dt),!1}t(bi,"tryReadBlockMappingFromProperty");function De(k,it,pt,xt,dt){let Tt,I,st=1,bt=!1,mt=!1,yt=null,wt,Ct,$t;if(k.depth>=k.maxDepth)R(k,"nesting exceeded maxDepth ("+k.maxDepth+")");if(k.depth+=1,k.listener!==null)k.listener("open",k);k.tag=null,k.anchor=null,k.kind=null,k.result=null;let Ft=Tt=I=d===pt||n===pt;if(xt){if(jt(k,!0,-1)){if(bt=!0,k.lineIndent>it)st=1;else if(k.lineIndent===it)st=0;else if(k.lineIndent<it)st=-1}}if(st===1)while(!0){let Dt=k.input.charCodeAt(k.position),Yt=Gt(k);if(bt&&(Dt===33&&k.tag!==null||Dt===38&&k.anchor!==null))break;if(!Ci(k)&&!Dr(k))break;if(yt===null)yt=Yt;if(jt(k,!0,-1)){if(bt=!0,I=Ft,k.lineIndent>it)st=1;else if(k.lineIndent===it)st=0;else if(k.lineIndent<it)st=-1}else I=!1}if(I)I=bt||dt;if(st===1||d===pt){if(a===pt||c===pt)Ct=it;else Ct=it+1;if($t=k.position-k.lineStart,st===1)if(I&&(He(k,$t)||Or(k,$t,Ct))||yi(k,Ct))mt=!0;else{let Dt=k.input.charCodeAt(k.position);if(yt!==null&&Ft&&!I&&Dt!==124&&Dt!==62&&bi(k,yt,yt.position-yt.lineStart,Ct))mt=!0;else if(Tt&&xi(k,Ct)||Ir(k,Ct)||ze(k,Ct))mt=!0;else if(Pr(k)){if(mt=!0,k.tag!==null||k.anchor!==null)R(k,"alias node should not have any properties")}else if(er(k,Ct,a===pt)){if(mt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(st===0)mt=I&&He(k,$t)}if(k.tag===null){if(k.anchor!==null)lt(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")R(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Dt=0,Yt=k.implicitTypes.length;Dt<Yt;Dt+=1)if(wt=k.implicitTypes[Dt],wt.resolve(k.result)){if(k.result=wt.construct(k.result),k.tag=wt.tag,k.anchor!==null)lt(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))wt=k.typeMap[k.kind||"fallback"][k.tag];else{wt=null;let Dt=k.typeMap.multi[k.kind||"fallback"];for(let Yt=0,re=Dt.length;Yt<re;Yt+=1)if(k.tag.slice(0,Dt[Yt].tag.length)===Dt[Yt].tag){wt=Dt[Yt];break}}if(!wt)R(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&wt.kind!==k.kind)R(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+wt.kind+'", not "'+k.kind+'"');if(!wt.resolve(k.result,k.tag))R(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=wt.construct(k.result,k.tag),k.anchor!==null)lt(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||mt}t(De,"composeNode");function ki(k){let it=k.position,pt=!1,xt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((xt=k.input.charCodeAt(k.position))!==0){if(jt(k,!0,-1),xt=k.input.charCodeAt(k.position),k.lineIndent>0||xt!==37)break;pt=!0,xt=k.input.charCodeAt(++k.position);let dt=k.position;while(xt!==0&&!O(xt))xt=k.input.charCodeAt(++k.position);let Tt=k.input.slice(dt,k.position),I=[];if(Tt.length<1)R(k,"directive name must not be less than one character in length");while(xt!==0){while(E(xt))xt=k.input.charCodeAt(++k.position);if(xt===35){do xt=k.input.charCodeAt(++k.position);while(xt!==0&&!v(xt));break}if(v(xt))break;dt=k.position;while(xt!==0&&!O(xt))xt=k.input.charCodeAt(++k.position);I.push(k.input.slice(dt,k.position))}if(xt!==0)Vt(k);if(o.call(Jt,Tt))Jt[Tt](k,Tt,I);else ht(k,'unknown document directive "'+Tt+'"')}if(jt(k,!0,-1),k.lineIndent===0&&k.input.charCodeAt(k.position)===45&&k.input.charCodeAt(k.position+1)===45&&k.input.charCodeAt(k.position+2)===45)k.position+=3,jt(k,!0,-1);else if(pt)R(k,"directives end mark is expected");if(De(k,k.lineIndent-1,d,!1,!0),jt(k,!0,-1),k.checkLineBreaks&&b.test(k.input.slice(it,k.position)))ht(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&le(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,jt(k,!0,-1);return}if(k.position<k.length-1)R(k,"end of the stream or a document separator is expected")}t(ki,"readDocument");function Rr(k,it){if(k=String(k),it=it||{},k.length!==0){if(k.charCodeAt(k.length-1)!==10&&k.charCodeAt(k.length-1)!==13)k+=`
142
+ `;if(k.charCodeAt(0)===65279)k=k.slice(1)}let pt=new U(k,it),xt=k.indexOf("\x00");if(xt!==-1)pt.position=xt,R(pt,"null byte is not allowed in input");pt.input+="\x00";while(pt.input.charCodeAt(pt.position)===32)pt.lineIndent+=1,pt.position+=1;while(pt.position<pt.length-1)ki(pt);return pt.documents}t(Rr,"loadDocuments");function Wr(k,it,pt){if(it!==null&&typeof it==="object"&&typeof pt>"u")pt=it,it=null;let xt=Rr(k,pt);if(typeof it!=="function")return xt;for(let dt=0,Tt=xt.length;dt<Tt;dt+=1)it(xt[dt])}t(Wr,"loadAll2");function wi(k,it){let pt=Rr(k,it);if(pt.length===0)return;else if(pt.length===1)return pt[0];throw new e("expected a single document in the stream, but found more")}return t(wi,"load2"),_s.loadAll=Wr,_s.load=wi,_s}t(Id,"requireLoader");var Rl={},Md;function Od(){if(Md)return Rl;Md=1;let r=si(),e=ai(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,m=34,x=35,b=37,S=38,T=39,B=42,_=44,v=45,E=58,O=61,D=62,K=63,Z=64,tt=91,ot=93,ut=96,ct=123,at=124,P=125,U={};U[0]="\\0",U[7]="\\a",U[8]="\\b",U[9]="\\t",U[10]="\\n",U[11]="\\v",U[12]="\\f",U[13]="\\r",U[27]="\\e",U[34]="\\\"",U[92]="\\\\",U[133]="\\N",U[160]="\\_",U[8232]="\\L",U[8233]="\\P";let et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],R=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ht(I,st){if(st===null)return{};let bt={},mt=Object.keys(st);for(let yt=0,wt=mt.length;yt<wt;yt+=1){let Ct=mt[yt],$t=String(st[Ct]);if(Ct.slice(0,2)==="!!")Ct="tag:yaml.org,2002:"+Ct.slice(2);let Ft=I.compiledTypeMap.fallback[Ct];if(Ft&&o.call(Ft.styleAliases,$t))$t=Ft.styleAliases[$t];bt[Ct]=$t}return bt}t(ht,"compileStyleMap");function lt(I){let st,bt,mt=I.toString(16).toUpperCase();if(I<=255)st="x",bt=2;else if(I<=65535)st="u",bt=4;else if(I<=4294967295)st="U",bt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+st+r.repeat("0",bt-mt.length)+mt}t(lt,"encodeHex");let Bt=1,vt=2;function Xt(I){this.schema=I.schema||i,this.indent=Math.max(1,I.indent||2),this.noArrayIndent=I.noArrayIndent||!1,this.skipInvalid=I.skipInvalid||!1,this.flowLevel=r.isNothing(I.flowLevel)?-1:I.flowLevel,this.styleMap=ht(this.schema,I.styles||null),this.sortKeys=I.sortKeys||!1,this.lineWidth=I.lineWidth||80,this.noRefs=I.noRefs||!1,this.noCompatMode=I.noCompatMode||!1,this.condenseFlow=I.condenseFlow||!1,this.quotingType=I.quotingType==='"'?vt:Bt,this.forceQuotes=I.forceQuotes||!1,this.replacer=typeof I.replacer==="function"?I.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Xt,"State");function Gt(I,st){let bt=r.repeat(" ",st),mt=0,yt="",wt=I.length;while(mt<wt){let Ct,$t=I.indexOf(`
143
+ `,mt);if($t===-1)Ct=I.slice(mt),mt=wt;else Ct=I.slice(mt,$t+1),mt=$t+1;if(Ct.length&&Ct!==`
144
+ `)yt+=bt;yt+=Ct}return yt}t(Gt,"indentString");function Qt(I,st){return`
145
+ `+r.repeat(" ",I.indent*st)}t(Qt,"generateNextLine");function Jt(I,st){for(let bt=0,mt=I.implicitTypes.length;bt<mt;bt+=1)if(I.implicitTypes[bt].resolve(st))return!0;return!1}t(Jt,"testImplicitResolving");function Ot(I){return I===f||I===c}t(Ot,"isWhitespace");function Et(I){return I>=32&&I<=126||I>=161&&I<=55295&&I!==8232&&I!==8233||I>=57344&&I<=65533&&I!==a||I>=65536&&I<=1114111}t(Et,"isPrintable");function Nt(I){return Et(I)&&I!==a&&I!==d&&I!==n}t(Nt,"isNsCharOrWhitespace");function Vt(I,st,bt){let mt=Nt(I),yt=mt&&!Ot(I);return(bt?mt:mt&&I!==_&&I!==tt&&I!==ot&&I!==ct&&I!==P)&&I!==x&&!(st===E&&!yt)||Nt(st)&&!Ot(st)&&I===x||st===E&&yt}t(Vt,"isPlainSafe");function jt(I){return Et(I)&&I!==a&&!Ot(I)&&I!==v&&I!==K&&I!==E&&I!==_&&I!==tt&&I!==ot&&I!==ct&&I!==P&&I!==x&&I!==S&&I!==B&&I!==u&&I!==at&&I!==O&&I!==D&&I!==T&&I!==m&&I!==b&&I!==Z&&I!==ut}t(jt,"isPlainSafeFirst");function le(I){return!Ot(I)&&I!==E}t(le,"isPlainSafeLast");function ne(I,st){let bt=I.charCodeAt(st),mt;if(bt>=55296&&bt<=56319&&st+1<I.length){if(mt=I.charCodeAt(st+1),mt>=56320&&mt<=57343)return(bt-55296)*1024+mt-56320+65536}return bt}t(ne,"codePointAt");function er(I){return/^\n* /.test(I)}t(er,"needIndentIndicator");let Ir=1,ze=2,yi=3,xi=4,He=5;function Or(I,st,bt,mt,yt,wt,Ct,$t){let Ft,Dt=0,Yt=null,re=!1,he=!1,kc=mt!==-1,Si=-1,Ti=jt(ne(I,0))&&le(ne(I,I.length-1));if(st||Ct)for(Ft=0;Ft<I.length;Dt>=65536?Ft+=2:Ft++){if(Dt=ne(I,Ft),!Et(Dt))return He;Ti=Ti&&Vt(Dt,Yt,$t),Yt=Dt}else{for(Ft=0;Ft<I.length;Dt>=65536?Ft+=2:Ft++){if(Dt=ne(I,Ft),Dt===n){if(re=!0,kc)he=he||Ft-Si-1>mt&&I[Si+1]!==" ",Si=Ft}else if(!Et(Dt))return He;Ti=Ti&&Vt(Dt,Yt,$t),Yt=Dt}he=he||kc&&(Ft-Si-1>mt&&I[Si+1]!==" ")}if(!re&&!he){if(Ti&&!Ct&&!yt(I))return Ir;return wt===vt?He:ze}if(bt>9&&er(I))return He;if(!Ct)return he?xi:yi;return wt===vt?He:ze}t(Or,"chooseScalarStyle");function Ci(I,st,bt,mt,yt){I.dump=function(){if(st.length===0)return I.quotingType===vt?'""':"''";if(!I.noCompatMode){if(et.indexOf(st)!==-1||R.test(st))return I.quotingType===vt?'"'+st+'"':"'"+st+"'"}let wt=I.indent*Math.max(1,bt),Ct=I.lineWidth===-1?-1:Math.max(Math.min(I.lineWidth,40),I.lineWidth-wt),$t=mt||I.flowLevel>-1&&bt>=I.flowLevel;function Ft(Dt){return Jt(I,Dt)}switch(t(Ft,"testAmbiguity"),Or(st,$t,I.indent,Ct,Ft,I.quotingType,I.forceQuotes&&!mt,yt)){case Ir:return st;case ze:return"'"+st.replace(/'/g,"''")+"'";case yi:return"|"+Dr(st,I.indent)+Pr(Gt(st,wt));case xi:return">"+Dr(st,I.indent)+Pr(Gt(bi(st,Ct),wt));case He:return'"'+ki(st)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Ci,"writeScalar");function Dr(I,st){let bt=er(I)?String(st):"",mt=I[I.length-1]===`
146
+ `,wt=mt&&(I[I.length-2]===`
147
+ `||I===`
148
+ `)?"+":mt?"":"-";return bt+wt+`
149
+ `}t(Dr,"blockHeader");function Pr(I){return I[I.length-1]===`
150
+ `?I.slice(0,-1):I}t(Pr,"dropEndingNewline");function bi(I,st){let bt=/(\n+)([^\n]*)/g,mt=function(){let $t=I.indexOf(`
151
+ `);return $t=$t!==-1?$t:I.length,bt.lastIndex=$t,De(I.slice(0,$t),st)}(),yt=I[0]===`
152
+ `||I[0]===" ",wt,Ct;while(Ct=bt.exec(I)){let $t=Ct[1],Ft=Ct[2];wt=Ft[0]===" ",mt+=$t+(!yt&&!wt&&Ft!==""?`
153
+ `:"")+De(Ft,st),yt=wt}return mt}t(bi,"foldString");function De(I,st){if(I===""||I[0]===" ")return I;let bt=/ [^ ]/g,mt,yt=0,wt,Ct=0,$t=0,Ft="";while(mt=bt.exec(I)){if($t=mt.index,$t-yt>st)wt=Ct>yt?Ct:$t,Ft+=`
154
+ `+I.slice(yt,wt),yt=wt+1;Ct=$t}if(Ft+=`
155
+ `,I.length-yt>st&&Ct>yt)Ft+=I.slice(yt,Ct)+`
156
+ `+I.slice(Ct+1);else Ft+=I.slice(yt);return Ft.slice(1)}t(De,"foldLine");function ki(I){let st="",bt=0;for(let mt=0;mt<I.length;bt>=65536?mt+=2:mt++){bt=ne(I,mt);let yt=U[bt];if(!yt&&Et(bt)){if(st+=I[mt],bt>=65536)st+=I[mt+1]}else st+=yt||lt(bt)}return st}t(ki,"escapeString");function Rr(I,st,bt){let mt="",yt=I.tag;for(let wt=0,Ct=bt.length;wt<Ct;wt+=1){let $t=bt[wt];if(I.replacer)$t=I.replacer.call(bt,String(wt),$t);if(pt(I,st,$t,!1,!1)||typeof $t>"u"&&pt(I,st,null,!1,!1)){if(mt!=="")mt+=","+(!I.condenseFlow?" ":"");mt+=I.dump}}I.tag=yt,I.dump="["+mt+"]"}t(Rr,"writeFlowSequence");function Wr(I,st,bt,mt){let yt="",wt=I.tag;for(let Ct=0,$t=bt.length;Ct<$t;Ct+=1){let Ft=bt[Ct];if(I.replacer)Ft=I.replacer.call(bt,String(Ct),Ft);if(pt(I,st+1,Ft,!0,!0,!1,!0)||typeof Ft>"u"&&pt(I,st+1,null,!0,!0,!1,!0)){if(!mt||yt!=="")yt+=Qt(I,st);if(I.dump&&n===I.dump.charCodeAt(0))yt+="-";else yt+="- ";yt+=I.dump}}I.tag=wt,I.dump=yt||"[]"}t(Wr,"writeBlockSequence");function wi(I,st,bt){let mt="",yt=I.tag,wt=Object.keys(bt);for(let Ct=0,$t=wt.length;Ct<$t;Ct+=1){let Ft="";if(mt!=="")Ft+=", ";if(I.condenseFlow)Ft+='"';let Dt=wt[Ct],Yt=bt[Dt];if(I.replacer)Yt=I.replacer.call(bt,Dt,Yt);if(!pt(I,st,Dt,!1,!1))continue;if(I.dump.length>1024)Ft+="? ";if(Ft+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),!pt(I,st,Yt,!1,!1))continue;Ft+=I.dump,mt+=Ft}I.tag=yt,I.dump="{"+mt+"}"}t(wi,"writeFlowMapping");function k(I,st,bt,mt){let yt="",wt=I.tag,Ct=Object.keys(bt);if(I.sortKeys===!0)Ct.sort();else if(typeof I.sortKeys==="function")Ct.sort(I.sortKeys);else if(I.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let $t=0,Ft=Ct.length;$t<Ft;$t+=1){let Dt="";if(!mt||yt!=="")Dt+=Qt(I,st);let Yt=Ct[$t],re=bt[Yt];if(I.replacer)re=I.replacer.call(bt,Yt,re);if(!pt(I,st+1,Yt,!0,!0,!0))continue;let he=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;if(he)if(I.dump&&n===I.dump.charCodeAt(0))Dt+="?";else Dt+="? ";if(Dt+=I.dump,he)Dt+=Qt(I,st);if(!pt(I,st+1,re,!0,he))continue;if(I.dump&&n===I.dump.charCodeAt(0))Dt+=":";else Dt+=": ";Dt+=I.dump,yt+=Dt}I.tag=wt,I.dump=yt||"{}"}t(k,"writeBlockMapping");function it(I,st,bt){let mt=bt?I.explicitTypes:I.implicitTypes;for(let yt=0,wt=mt.length;yt<wt;yt+=1){let Ct=mt[yt];if((Ct.instanceOf||Ct.predicate)&&(!Ct.instanceOf||typeof st==="object"&&st instanceof Ct.instanceOf)&&(!Ct.predicate||Ct.predicate(st))){if(bt)if(Ct.multi&&Ct.representName)I.tag=Ct.representName(st);else I.tag=Ct.tag;else I.tag="?";if(Ct.represent){let $t=I.styleMap[Ct.tag]||Ct.defaultStyle,Ft;if(s.call(Ct.represent)==="[object Function]")Ft=Ct.represent(st,$t);else if(o.call(Ct.represent,$t))Ft=Ct.represent[$t](st,$t);else throw new e("!<"+Ct.tag+'> tag resolver accepts not "'+$t+'" style');I.dump=Ft}return!0}}return!1}t(it,"detectType");function pt(I,st,bt,mt,yt,wt,Ct){if(I.tag=null,I.dump=bt,!it(I,bt,!1))it(I,bt,!0);let $t=s.call(I.dump),Ft=mt;if(mt)mt=I.flowLevel<0||I.flowLevel>st;let Dt=$t==="[object Object]"||$t==="[object Array]",Yt,re;if(Dt)Yt=I.duplicates.indexOf(bt),re=Yt!==-1;if(I.tag!==null&&I.tag!=="?"||re||I.indent!==2&&st>0)yt=!1;if(re&&I.usedDuplicates[Yt])I.dump="*ref_"+Yt;else{if(Dt&&re&&!I.usedDuplicates[Yt])I.usedDuplicates[Yt]=!0;if($t==="[object Object]"){if(mt&&Object.keys(I.dump).length!==0){if(k(I,st,I.dump,yt),re)I.dump="&ref_"+Yt+I.dump}else if(wi(I,st,I.dump),re)I.dump="&ref_"+Yt+" "+I.dump}else if($t==="[object Array]"){if(mt&&I.dump.length!==0){if(I.noArrayIndent&&!Ct&&st>0)Wr(I,st-1,I.dump,yt);else Wr(I,st,I.dump,yt);if(re)I.dump="&ref_"+Yt+I.dump}else if(Rr(I,st,I.dump),re)I.dump="&ref_"+Yt+" "+I.dump}else if($t==="[object String]"){if(I.tag!=="?")Ci(I,I.dump,st,wt,Ft)}else if($t==="[object Undefined]")return!1;else{if(I.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+$t)}if(I.tag!==null&&I.tag!=="?"){let he=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");if(I.tag[0]==="!")he="!"+he;else if(he.slice(0,18)==="tag:yaml.org,2002:")he="!!"+he.slice(18);else he="!<"+he+">";I.dump=he+" "+I.dump}}return!0}t(pt,"writeNode");function xt(I,st){let bt=[],mt=[];dt(I,bt,mt);let yt=mt.length;for(let wt=0;wt<yt;wt+=1)st.duplicates.push(bt[mt[wt]]);st.usedDuplicates=Array(yt)}t(xt,"getDuplicateReferences");function dt(I,st,bt){if(I!==null&&typeof I==="object"){let mt=st.indexOf(I);if(mt!==-1){if(bt.indexOf(mt)===-1)bt.push(mt)}else if(st.push(I),Array.isArray(I))for(let yt=0,wt=I.length;yt<wt;yt+=1)dt(I[yt],st,bt);else{let yt=Object.keys(I);for(let wt=0,Ct=yt.length;wt<Ct;wt+=1)dt(I[yt[wt]],st,bt)}}}t(dt,"inspectNode");function Tt(I,st){st=st||{};let bt=new Xt(st);if(!bt.noRefs)xt(I,bt);let mt=I;if(bt.replacer)mt=bt.replacer.call({"":mt},"",mt);if(pt(bt,0,mt,!0,!0))return bt.dump+`
157
+ `;return""}return t(Tt,"dump2"),Rl.dump=Tt,Rl}t(Od,"requireDumper");var Ad;function Dd(){if(Ad)return Se;Ad=1;let r=Id(),e=Od();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Se.Type=Te(),Se.Schema=ql(),Se.FAILSAFE_SCHEMA=Hl(),Se.JSON_SCHEMA=th(),Se.CORE_SCHEMA=eh(),Se.DEFAULT_SCHEMA=vs(),Se.load=r.load,Se.loadAll=r.loadAll,Se.dump=e.dump,Se.YAMLException=ai(),Se.types={binary:oh(),float:Ql(),map:zl(),null:jl(),pairs:ah(),set:nh(),timestamp:rh(),bool:Ul(),int:Gl(),merge:ih(),omap:sh(),seq:Nl(),str:Wl()},Se.safeLoad=i("safeLoad","load"),Se.safeLoadAll=i("safeLoadAll","loadAll"),Se.safeDump=i("safeDump","dump"),Se}t(Dd,"requireJsYaml");var VC=Dd(),KC=Ed(VC),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:cr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:ur,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=KC;var Ap=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((m,x,b)=>r.append("defs").append("filter").attr("id",m).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",b).attr("dy",b).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var Pd=t((r)=>{let{handDrawnSeed:e}=p();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),ZC=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ve=t((r)=>{let e=QC([...r.cssCompiledStyles||[],...r.cssStyles||[],...ZC(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),QC=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Uu=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),Q=t((r)=>{let{stylesArray:e}=Ve(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Uu(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),_t=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=p(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ve(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:JC(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),JC=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var lh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!Ls(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!Ls(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ls(n,i)?null:n}return null},Ls=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var tb=Object.freeze({left:0,top:0,width:16,height:16}),ni=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),hh=Object.freeze({...tb,...ni}),Rd=Object.freeze({...hh,body:"",hidden:!1});function qd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function ch(r,e){let i=qd(r,e);for(let s in Rd)if(s in ni){if(s in r&&!(s in i))i[s]=ni[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function Wd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Nd(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=ch(s[n]||o[n],a)}return c(e),i.forEach(c),ch(r,a)}function uh(r,e){if(r.icons[e])return Nd(r,e,[]);let i=Wd(r,[e])[e];return i?Nd(r,e,i):null}var eb=Object.freeze({width:null,height:null}),zd=Object.freeze({...eb,...ni});var rb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ib=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dh(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(rb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=ib.test(a);while(!0){if(c){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");c=!c}}function ob(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function sb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Hd(r,e,i){let s=ob(r);return sb(s.defs,e+s.content+i)}var ab=(r)=>r==="unset"||r==="undefined"||r==="none";function fh(r,e){let i={...hh,...r},s={...zd,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:E}=T;if(_)if(v)E+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let O;if(E<0)E-=Math.floor(E/4)*4;switch(E=E%4,E){case 1:O=o.height/2+o.top,B.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:O=o.width/2+o.left,B.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")")}if(E%2===1){if(o.left!==o.top)O=o.left,o.left=o.top,o.top=O;if(o.width!==o.height)O=o.width,o.width=o.height,o.height=O}if(B.length)a=Hd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,m;if(c===null)m=n===null?"1em":n==="auto"?f:n,u=dh(m,d/f);else u=c==="auto"?d:c,m=n===null?dh(u,f/d):n==="auto"?f:n;let x={},b=(T,B)=>{if(!ab(B))x[T]=B.toString()};b("width",u),b("height",m);let S=[o.left,o.top,d,f];return x.viewBox=S.join(" "),{attributes:x,viewBox:S,body:a}}var nb=/\sid="(\S+)"/g,Yd=new Map;function lb(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Yd.get(r)||0;return Yd.set(r,e+1),e?`${r}${e}`:r}function ph(r){let e=[],i;while(i=nb.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=lb(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function gh(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var ng={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},mh=new Map,jd=new Map,$i=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)jd.set(e.name,e.loader);else if("icons"in e)mh.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ud=t(async(r,e)=>{let i=lh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=mh.get(s);if(!o){let c=jd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},mh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=uh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Fs=t(async(r)=>{try{return await Ud(r),!0}catch{return!1}},"isIconAvailable"),dr=t(async(r,e,i)=>{let s;try{s=await Ud(r,e?.fallbackPrefix)}catch(c){l.error(c),s=ng}let o=fh(s,e),a=gh(ph(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var hf=hn(Hs(),1);function Lr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Lr.Cache||Map),i}Lr.Cache=Map;function zi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Zo(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var hp="[object RegExp]",rc="[object String]",ac="[object Number]",oc="[object Boolean]",ic="[object Arguments]",bp="[object Symbol]",yp="[object Date]",vp="[object Map]",kp="[object Set]",xp="[object Array]";var wp="[object ArrayBuffer]",Cp="[object Object]";var Ep="[object DataView]",Bp="[object Uint8Array]",Ip="[object Uint8ClampedArray]",_p="[object Uint16Array]",Sp="[object Uint32Array]";var Tp="[object Int8Array]",Dp="[object Int16Array]",Np="[object Int32Array]";var Qp="[object Float32Array]",Rp="[object Float64Array]";function li(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Xo(r){return li(r)}function Qd(){}function Jd(r){if(zi(r))return r;if(Array.isArray(r)||li(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Ms(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var yh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function sc(r){return typeof yh.Buffer<"u"&&yh.Buffer.isBuffer(r)}function tf(r){return r==="__proto__"}function As(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ef(r,e){return hi(r,void 0,r,new Map,e)}function hi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(zi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,hi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(hi(n,void 0,i,s,o));return c}if(sc(r))return r.subarray();if(li(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=hi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,Oe(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),Oe(c,r,i,s,o),c}if(typeof r==="object"&&kb(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),Oe(c,r,i,s,o),c}return r}function Oe(r,e,i=r,s,o){let a=[...Object.keys(e),...Ms(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=hi(e[n],n,i,s,o)}}function kb(r){switch(Zo(r)){case ic:case xp:case wp:case Ep:case oc:case yp:case Qp:case Rp:case Tp:case Dp:case Np:case vp:case ac:case Cp:case hp:case kp:case rc:case bp:case Bp:case Ip:case _p:case Sp:return!0;default:return!1}}function rf(r,e){return ef(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Zo(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Oe(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case ac:case rc:case oc:{let n=new r.constructor(r?.valueOf());return Oe(n,r),n}case ic:{let n={};return Oe(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function xh(r){return rf(r)}function Gu(r){return r!==null&&typeof r==="object"&&Zo(r)==="[object Arguments]"}function xo(r){return typeof r==="object"&&r!==null}function of(r){return Number.isSafeInteger(r)&&r>=0}function Fp(r){return r!=null&&typeof r!=="function"&&of(r.length)}function sf(r){return xo(r)&&Fp(r)}function af(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Es(o,c,s,new Map)}return o}function Es(r,e,i,s){if(zi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return Jd(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...Ms(e)];for(let a=0;a<o.length;a++){let c=o[a];if(tf(c))continue;let n=e[c],d=r[c];if(Gu(n))n={...n};if(Gu(d))d={...d};if(sc(n))n=xh(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],m=Reflect.ownKeys(d);for(let x=0;x<m.length;x++){let b=m[x];u[b]=d[b]}d=u}else if(sf(d)){let u=[];for(let m=0;m<d.length;m++)u[m]=d[m];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Es(d,n,i,s);else if(xo(d)&&xo(n)&&(As(d)||As(n)||Xo(d)||Xo(n)))r[c]=Es(d,n,i,s);else if(d==null&&As(n))r[c]=Es({},n,i,s);else if(d==null&&Xo(n))r[c]=xh(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function Ch(r,...e){return af(r,...e,Qd)}var rg="​",wb={curveBasis:vr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ro,curveBumpY:io,curveBundle:hl,curveCardinalClosed:cl,curveCardinalOpen:ul,curveCardinal:so,curveCatmullRomClosed:dl,curveCatmullRomOpen:fl,curveCatmullRom:no,curveLinear:ma,curveLinearClosed:Ss,curveMonotoneX:lo,curveMonotoneY:co,curveNatural:ii,curveStep:oi,curveStepAfter:yo,curveStepBefore:go},Sb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Tb=t(function(r,e){let i=cf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);Ai(c),s=Ye(s,[...c])}else s=i.args;if(!s)return;let o=Vl(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),cf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${Sb.source})(?=[}][%]{2}).*
158
+ `,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Nr.exec(r))!==null){if(s.index===Nr.lastIndex)Nr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),sA=t(function(r){return r.replace(Nr,"")},"removeDirectives"),Bb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Is(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return wb[i]??e}t(Is,"interpolateToCurve");function uf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return hf.sanitizeUrl(i);return i}t(uf,"formatUrl");var _b=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function bh(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(bh,"distance");function df(r){let e,i=0;r.forEach((o)=>{i+=bh(o,e),e=o});let s=i/2;return kh(r,s)}t(df,"traverseEdge");function ff(r){if(r.length===1)return r[0];return df(r)}t(ff,"calcLabelPosition");var nf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),kh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=bh(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:nf((1-c)*i.x+c*o.x,5),y:nf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),vb=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=kh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function pf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=kh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(pf,"calcTerminalLabelPosition");function Lp(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(Lp,"getStylesFromArray");var lf=0,ag=t(()=>(lf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lf),"generateId");function gf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(gf,"makeRandomHex");var og=t((r)=>gf(r.length),"random"),Lb=t(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"),Fb=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Rn(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),Ui=Lr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((c,n)=>{let d=Vn(`${c} `,i),f=Vn(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:b}=Mb(c,e,"-",i);o.push(a,...x),a=b}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Mb=Lr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(Vn(f,s)>=e){let m=d+1,x=o.length===m,b=`${f}${i}`;a.push(x?f:b),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function ju(r,e){return qu(r,e).height}t(ju,"calculateTextHeight");function Vn(r,e){return qu(r,e).width}t(Vn,"calculateTextWidth");var qu=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Rn(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let b=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Lb();B.text=T||rg;let _=Fb(u,B).style("font-size",a).style("font-weight",o).style("font-family",x),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),b=Math.round(v.height),S.height+=b,S.lineHeight=Math.round(Math.max(S.lineHeight,b))}d.push(S)}u.remove();let m=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[m]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Ab=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},$s,Eb=t(function(r){return $s=$s||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$s.innerHTML=r,unescape($s.textContent)},"entityDecode");function Mp(r){return"str"in r}t(Mp,"isDetailedError");var $b=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),Rn=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ie(r,e){return Ch({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:Ye,wrapLabel:Ui,calculateTextHeight:ju,calculateTextWidth:Vn,calculateTextDimensions:qu,cleanAndMerge:ie,detectInit:Tb,detectDirective:cf,isSubstringInArray:Bb,interpolateToCurve:Is,calcLabelPosition:ff,calcCardinalityPosition:vb,calcTerminalLabelPosition:pf,formatUrl:uf,getStylesFromArray:Lp,generateId:ag,random:og,runFunc:_b,entityDecode:Eb,insertTitle:$b,isLabelCoordinateInPath:mf,parseFontSize:Rn,InitIDGenerator:Ab},lA=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),za=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Sn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function ue(r){return r??null}t(ue,"handleUndefinedAttr");function mf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(mf,"isLabelCoordinateInPath");function Sh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=Sh();function Sf(r){Mr=r}var wo={exec:()=>null};function se(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Fe.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Ib=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Fe={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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Ob=/^(?:[ \t]*(?:\n|$))+/,Db=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,So=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Rb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Th=/(?:[*+-]|\d{1,9}[.)])/,Tf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bf=se(Tf).replace(/bull/g,Th).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(),qb=se(Tf).replace(/bull/g,Th).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(),Bh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wb=/^[^\n]+/,_h=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Nb=se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_h).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zb=se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Th).getRegex(),Ns="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",vh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hb=se("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",vh).replace("tag",Ns).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f=se(Bh).replace("hr",So).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",Ns).getRegex(),Yb=se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_f).getRegex(),Lh={blockquote:Yb,code:Db,def:Nb,fences:Pb,heading:Rb,hr:So,html:Hb,lheading:Bf,list:zb,newline:Ob,paragraph:_f,table:wo,text:Wb},yf=se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",Ns).getRegex(),jb={...Lh,lheading:qb,table:yf,paragraph:se(Bh).replace("hr",So).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yf).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",Ns).getRegex()},Ub={...Lh,html:se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vh).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:wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:se(Bh).replace("hr",So).replace("heading",` *#{1,6} *[^
159
+ ]`).replace("lheading",Bf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Xb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vf=/^( {2,}|\\)\n(?!\s*$)/,Vb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,zs=/[\p{P}\p{S}]/u,Fh=/[\s\p{P}\p{S}]/u,Lf=/[^\s\p{P}\p{S}]/u,Kb=se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fh).getRegex(),Ff=/(?!~)[\p{P}\p{S}]/u,Zb=/(?!~)[\s\p{P}\p{S}]/u,Qb=/(?:[^\s\p{P}\p{S}]|~)/u,Jb=se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ib?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,tk=se(Mf,"u").replace(/punct/g,zs).getRegex(),ek=se(Mf,"u").replace(/punct/g,Ff).getRegex(),Af="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rk=se(Af,"gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Fh).replace(/punct/g,zs).getRegex(),ik=se(Af,"gu").replace(/notPunctSpace/g,Qb).replace(/punctSpace/g,Zb).replace(/punct/g,Ff).getRegex(),ok=se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Lf).replace(/punctSpace/g,Fh).replace(/punct/g,zs).getRegex(),sk=se(/\\(punct)/,"gu").replace(/punct/g,zs).getRegex(),ak=se(/^<(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(),nk=se(vh).replace("(?:-->|$)","-->").getRegex(),lk=se("^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",nk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,hk=se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ef=se(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",_h).getRegex(),$f=se(/^!?\[(ref)\](?:\[\])?/).replace("ref",_h).getRegex(),ck=se("reflink|nolink(?!\\()","g").replace("reflink",Ef).replace("nolink",$f).getRegex(),xf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mh={_backpedal:wo,anyPunctuation:sk,autolink:ak,blockSkip:Jb,br:vf,code:Gb,del:wo,emStrongLDelim:tk,emStrongRDelimAst:rk,emStrongRDelimUnd:ok,escape:Xb,link:hk,nolink:$f,punctuation:Kb,reflink:Ef,reflinkSearch:ck,tag:lk,text:Vb,url:wo},uk={...Mh,link:se(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},wh={...Mh,emStrongRDelimAst:ik,emStrongLDelim:ek,url:se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xf).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:se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xf).getRegex()},dk={...wh,br:se(vf).replace("{2,}","*").getRegex(),text:se(wh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:Lh,gfm:jb,pedantic:Ub},Co={normal:Mh,gfm:wh,breaks:dk,pedantic:uk},fk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cf=(r)=>fk[r];function Ke(r,e){if(e){if(Fe.escapeTest.test(r))return r.replace(Fe.escapeReplace,Cf)}else if(Fe.escapeTestNoEncode.test(r))return r.replace(Fe.escapeReplaceNoEncode,Cf);return r}function bf(r){try{r=encodeURI(r).replace(Fe.percentDecode,"%")}catch{return null}return r}function kf(r,e){let i=r.replace(Fe.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Fe.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Fe.slashPipe,"|");return s}function bo(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function pk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function wf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function gk(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
160
160
  `).map((a)=>{let c=a.match(i.other.beginningSpace);if(c===null)return a;let[n]=c;return n.length>=o.length?a.slice(o.length):a}).join(`
161
- `)}var Ns=class{options;rules;lexer;constructor(r){this.options=r||Mr}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Co(i,`
162
- `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=wk(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=Co(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Co(e[0],`
163
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=Co(e[0],`
161
+ `)}var Ps=class{options;rules;lexer;constructor(r){this.options=r||Mr}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:bo(i,`
162
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=gk(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=bo(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:bo(e[0],`
163
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=bo(e[0],`
164
164
  `).split(`
165
165
  `),s="",o="",a=[];for(;i.length>0;){let c=!1,n=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))n.push(i[d]),c=!0;else if(!c)n.push(i[d]);else break;i=i.slice(d);let f=n.join(`
166
166
  `),u=f.replace(this.rules.other.blockquoteSetextReplace,`
@@ -174,14 +174,14 @@ ${u}`:u;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
174
174
  `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),c=!1;for(;r;){let d=!1,f="",u="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;f=e[0],r=r.substring(f.length);let m=e[2].split(`
175
175
  `,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),x=r.split(`
176
176
  `,1)[0],b=!m.trim(),S=0;if(this.options.pedantic?(S=2,u=m.trimStart()):b?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,u=m.slice(S),S+=e[1].length),b&&this.rules.other.blankLine.test(x)&&(f+=x+`
177
- `,r=r.substring(x.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),F=this.rules.other.fencesBeginRegex(S),I=this.rules.other.headingBeginRegex(S),O=this.rules.other.htmlBeginRegex(S);for(;r;){let K=r.split(`
178
- `,1)[0],Z;if(x=K,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),Z=x):Z=x.replace(this.rules.other.tabCharGlobal," "),F.test(x)||I.test(x)||O.test(x)||_.test(x)||v.test(x))break;if(Z.search(this.rules.other.nonSpaceChar)>=S||!x.trim())u+=`
179
- `+Z.slice(S);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||F.test(m)||I.test(m)||v.test(m))break;u+=`
177
+ `,r=r.substring(x.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),E=this.rules.other.fencesBeginRegex(S),O=this.rules.other.headingBeginRegex(S),D=this.rules.other.htmlBeginRegex(S);for(;r;){let K=r.split(`
178
+ `,1)[0],Z;if(x=K,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),Z=x):Z=x.replace(this.rules.other.tabCharGlobal," "),E.test(x)||O.test(x)||D.test(x)||_.test(x)||v.test(x))break;if(Z.search(this.rules.other.nonSpaceChar)>=S||!x.trim())u+=`
179
+ `+Z.slice(S);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(m)||O.test(m)||v.test(m))break;u+=`
180
180
  `+x}!b&&!x.trim()&&(b=!0),f+=K+`
181
181
  `,r=r.substring(K.length+1),m=Z.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(u),T&&(B=T[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!T,checked:B,loose:!1,text:u,tokens:[]}),o.raw+=f}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter((m)=>m.type==="space"),u=f.length>0&&f.some((m)=>this.rules.other.anyLine.test(m.raw));o.loose=u}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=kf(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
182
182
  `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?a.align.push("right"):this.rules.other.tableAlignCenter.test(c)?a.align.push("center"):this.rules.other.tableAlignLeft.test(c)?a.align.push("left"):a.align.push(null);for(let c=0;c<i.length;c++)a.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:a.align[c]});for(let c of o)a.rows.push(kf(c,a.header.length).map((n,d)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[d]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
183
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Co(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=kk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),wf(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return wf(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,m=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let x=m.slice(2,-2);return{type:"strong",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},qe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new Ns,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 i={other:Le,block:qs.normal,inline:xo.normal};this.options.pedantic?(i.block=qs.pedantic,i.inline=xo.pedantic):this.options.gfm&&(i.block=qs.gfm,this.options.breaks?i.inline=xo.breaks:i.inline=xo.gfm),this.tokenizer.rules=i}static get rules(){return{block:qs,inline:xo}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Le.carriageReturn,`
184
- `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Le.tabCharGlobal," ").replace(Le.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
183
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=bo(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=pk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),wf(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return wf(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,m=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let x=m.slice(2,-2);return{type:"strong",raw:m,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},qe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new Ps,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 i={other:Fe,block:Os.normal,inline:Co.normal};this.options.pedantic?(i.block=Os.pedantic,i.inline=Co.pedantic):this.options.gfm&&(i.block=Os.gfm,this.options.breaks?i.inline=Co.breaks:i.inline=Co.gfm),this.tokenizer.rules=i}static get rules(){return{block:Os,inline:Co}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Fe.carriageReturn,`
184
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Fe.tabCharGlobal," ").replace(Fe.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
185
185
  `:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
186
186
  `)?"":`
187
187
  `)+o.raw,c.text+=`
@@ -194,7 +194,7 @@ ${u}`:u;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
194
194
  `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
195
195
  `)?"":`
196
196
  `)+o.raw,c.text+=`
197
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,n="";for(;e;){c||(n=""),c=!1;let d;if(this.options.extensions?.inline?.some((u)=>(d=u.call({lexer:this},e,i))?(e=e.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let u=i.at(-1);d.type==="text"&&u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(e,s,n)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),i.push(d);continue}let f=e;if(this.options.extensions?.startInline){let u=1/0,m=e.slice(1),x;this.options.extensions.startInline.forEach((b)=>{x=b.call({lexer:this},m),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(f=e.substring(0,u+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),c=!0;let u=i.at(-1);u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw Error(u)}}return i}},Hs=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Le.notSpaceStart)?.[0],o=r.replace(Le.endingNewline,"")+`
197
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,n="";for(;e;){c||(n=""),c=!1;let d;if(this.options.extensions?.inline?.some((u)=>(d=u.call({lexer:this},e,i))?(e=e.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let u=i.at(-1);d.type==="text"&&u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(e,s,n)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),i.push(d);continue}let f=e;if(this.options.extensions?.startInline){let u=1/0,m=e.slice(1),x;this.options.extensions.startInline.forEach((b)=>{x=b.call({lexer:this},m),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(f=e.substring(0,u+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),c=!0;let u=i.at(-1);u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw Error(u)}}return i}},Rs=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Fe.notSpaceStart)?.[0],o=r.replace(Fe.endingNewline,"")+`
198
198
  `;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?o:Ke(o,!0))+`</code></pre>
199
199
  `:"<pre><code>"+(i?o:Ke(o,!0))+`</code></pre>
200
200
  `}blockquote({tokens:r}){return`<blockquote>
@@ -212,30 +212,30 @@ ${this.parser.parse(r)}</blockquote>
212
212
  `}tablerow({text:r}){return`<tr>
213
213
  ${r}</tr>
214
214
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
215
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ke(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=bf(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=bf(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Ph=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},We=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new Hs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ph}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,d=this.options.extensions.renderers[n.type].call({parser:this},n);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=d||"";continue}}let c=a;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let n=c,d=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],d+=`
216
- `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let c=a;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ko=class{options;block;constructor(r){this.options=r||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?qe.lex:qe.lexInline}provideParser(){return this.block?We.parse:We.parseInline}},Sk=class{defaults=Fh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=We;Renderer=Hs;TextRenderer=Ph;Lexer=qe;Tokenizer=Ns;Hooks=ko;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let c of a)i=i.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let c=o[a].flat(1/0);i=i.concat(this.walkTokens(c,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...c){let n=o.renderer.apply(this,c);return n===!1&&(n=a.apply(this,c)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Hs(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,n=i.renderer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ns(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,n=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ko;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,n=i.hooks[c],d=o[c];ko.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&ko.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await n.call(o,f);return d.call(o,m)})();let u=n.call(o,f);return d.call(o,u)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await n.apply(o,f);return m===!1&&(m=await d.apply(o,f)),m})();let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(c){let n=[];return n.push(a.call(this,c)),o&&(n=n.concat(o.call(this,c))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return qe.lex(r,e??this.defaults)}parser(r,e){return We.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.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 e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?qe.lex:qe.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():r?We.parse:We.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?qe.lex:qe.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?We.parse:We.parseInline)(c,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(c){return a(c)}}}onError(r,e){return(i)=>{if(i.message+=`
217
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new Sk;function ae(r,e){return Fr.parse(r,e)}ae.options=ae.setOptions=function(r){return Fr.setOptions(r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.getDefaults=Fh;ae.defaults=Mr;ae.use=function(...r){return Fr.use(...r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.walkTokens=function(r,e){return Fr.walkTokens(r,e)};ae.parseInline=Fr.parseInline;ae.Parser=We;ae.parser=We.parse;ae.Renderer=Hs;ae.TextRenderer=Ph;ae.Lexer=qe;ae.lexer=qe.lex;ae.Tokenizer=Ns;ae.Hooks=ko;ae.parse=ae;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ae;var Cz=We.parse,bz=qe.lex;function Np(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);if(f)return n.concat(f.map(function(u){var m,x;return(x=(m=u.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&x!==void 0?x:0}));return n},[]);if(o.length){var a=new RegExp(`
215
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ke(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=bf(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=bf(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Ah=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},We=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new Rs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ah}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,d=this.options.extensions.renderers[n.type].call({parser:this},n);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=d||"";continue}}let c=a;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let n=c,d=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],d+=`
216
+ `+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let c=a;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},ko=class{options;block;constructor(r){this.options=r||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?qe.lex:qe.lexInline}provideParser(){return this.block?We.parse:We.parseInline}},mk=class{defaults=Sh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=We;Renderer=Rs;TextRenderer=Ah;Lexer=qe;Tokenizer=Ps;Hooks=ko;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let c of a)i=i.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let c=o[a].flat(1/0);i=i.concat(this.walkTokens(c,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...c){let n=o.renderer.apply(this,c);return n===!1&&(n=a.apply(this,c)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Rs(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,n=i.renderer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ps(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,n=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ko;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,n=i.hooks[c],d=o[c];ko.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&ko.passThroughHooksRespectAsync.has(a))return(async()=>{let m=await n.call(o,f);return d.call(o,m)})();let u=n.call(o,f);return d.call(o,u)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await n.apply(o,f);return m===!1&&(m=await d.apply(o,f)),m})();let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(c){let n=[];return n.push(a.call(this,c)),o&&(n=n.concat(o.call(this,c))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return qe.lex(r,e??this.defaults)}parser(r,e){return We.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.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 e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?qe.lex:qe.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():r?We.parse:We.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?qe.lex:qe.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?We.parse:We.parseInline)(c,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(c){return a(c)}}}onError(r,e){return(i)=>{if(i.message+=`
217
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new mk;function ae(r,e){return Fr.parse(r,e)}ae.options=ae.setOptions=function(r){return Fr.setOptions(r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.getDefaults=Sh;ae.defaults=Mr;ae.use=function(...r){return Fr.use(...r),ae.defaults=Fr.defaults,Sf(ae.defaults),ae};ae.walkTokens=function(r,e){return Fr.walkTokens(r,e)};ae.parseInline=Fr.parseInline;ae.Parser=We;ae.parser=We.parse;ae.Renderer=Rs;ae.TextRenderer=Ah;ae.Lexer=qe;ae.lexer=qe.lex;ae.Tokenizer=Ps;ae.Hooks=ko;ae.parse=ae;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ae;var Cz=We.parse,bz=qe.lex;function Pp(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);if(f)return n.concat(f.map(function(u){var m,x;return(x=(m=u.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&x!==void 0?x:0}));return n},[]);if(o.length){var a=new RegExp(`
218
218
  [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(n){return n.replace(a,`
219
219
  `)})}s[0]=s[0].replace(/^\r?\n/,"");var c=s[0];return e.forEach(function(n,d){var f=c.match(/(?:^|\n)( *)$/),u=f?f[1]:"",m=n;if(typeof n==="string"&&n.includes(`
220
220
  `))m=String(n).split(`
221
221
  `).map(function(x,b){return b===0?x:"".concat(u).concat(x)}).join(`
222
- `);c+=m+s[d+1]}),c}var qh=typeof performance<"u"&&typeof performance.now==="function",ci=t(()=>qh?performance.now():0,"now"),Rh="\uD83E\uDDDC ",Tk="Mermaid render",Bk="Mermaid",_k={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=ci();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}async tick(r,e){if(!this.enabled)return e();let i=ci();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:ci(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),qh&&typeof performance.mark==="function")try{performance.mark(`${Rh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=ci();if(r.duration=e-r.start,qh&&typeof performance.measure==="function")try{performance.measure(`${Rh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:Tk,trackGroup:Bk,color:_k[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}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(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,d)=>{let f=" ".repeat(d),u=n.duration.toFixed(1).padStart(8),m=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${m} ${f}${n.name}`);for(let x of n.children)a(x,d+1);if(n.children.length>0){let x=n.children.reduce((S,T)=>S+T.duration,0),b=n.duration-x;if(b>0.5){let S=b.toFixed(1).padStart(8);o.push(`${S} ${f} (self)`)}}},"walk");a(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let n of c)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Rh}mermaid render profile · ${s}
222
+ `);c+=m+s[d+1]}),c}var $h=typeof performance<"u"&&typeof performance.now==="function",ci=t(()=>$h?performance.now():0,"now"),Eh="\uD83E\uDDDC ",yk="Mermaid render",xk="Mermaid",Ck={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=ci();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}async tick(r,e){if(!this.enabled)return e();let i=ci();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(ci()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:ci(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),$h&&typeof performance.mark==="function")try{performance.mark(`${Eh}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=ci();if(r.duration=e-r.start,$h&&typeof performance.measure==="function")try{performance.measure(`${Eh}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:yk,trackGroup:xk,color:Ck[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}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(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,d)=>{let f=" ".repeat(d),u=n.duration.toFixed(1).padStart(8),m=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${m} ${f}${n.name}`);for(let x of n.children)a(x,d+1);if(n.children.length>0){let x=n.children.reduce((S,T)=>S+T.duration,0),b=n.duration-x;if(b>0.5){let S=b.toFixed(1).padStart(8);o.push(`${S} ${f} (self)`)}}},"walk");a(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let n of c)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Eh}mermaid render profile · ${s}
223
223
  ${o.join(`
224
- `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Df(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
224
+ `)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Of(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
225
225
  `).replace(/\n{2,}/g,`
226
- `);return Np(s)}t(Df,"preprocessMarkdown");function Pf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Pf,"nonMarkdownToLines");function Qp(r,e={}){let i=Df(r,e),s=ae.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
227
- `).forEach((u,m)=>{if(m!==0)a++,o.push([]);u.split(" ").forEach((x)=>{if(x=x.replace(/&#39;/g,"'"),x)o[a].push({content:x,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Qp,"markdownToLines");function Rf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Rf,"nonMarkdownToHTML");function Nf(r,{markdownAutoWrap:e}={}){let i=ae.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Nf,"markdownToHTML");var vk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var m=!u?f:f.bind(u);return this.reads.push(m),o(this),m},"measure"),mutate:t(function(f,u){e("mutate");var m=!u?f:f.bind(u);return this.writes.push(m),o(this),m},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:m}=f,x;try{e("flushing reads",m.length),f.runTasks(m),e("flushing writes",u.length),f.runTasks(u)}catch(b){x=b}if(f.scheduled=!1,m.length||u.length)o(f);if(x)if(e("task errored",x.message),f.catch)f.catch(x);else throw x}t(a,"flush");function c(f,u){var m=f.indexOf(u);return!!~m&&!!f.splice(m,1)}t(c,"remove");function n(f,u){for(var m in u)if(u.hasOwnProperty(m))f[m]=u[m]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),Qf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Wh(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Wh(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Wh(r,e,i,s){var{_tasks:o,fastdom:a}=r,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t(Wh,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Qf,Lk=Qf,Fk=vk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Lk),hr=Fk;function tp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(tp,"splitTextToChars");function ep(r,e){let i=tp(e.content);return Hh(r,[],i,e.type)}t(ep,"splitWordToFitWidth");function Hh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Hh(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Hh,"splitWordToFitWidthRecursion");function rp(r,e){if(r.some(({content:i})=>i.includes(`
228
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Xs(r,e)}t(rp,"splitLineToFitWidth");function Xs(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Xs(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=ep(e,a);if(i.push([n]),d.content)r.unshift(d)}return Xs(r,e,i)}t(Xs,"splitLineToFitWidthRecursion");function Nh(r,e){if(e)r.attr("style",e)}t(Nh,"applyStyle");var Of=16384;async function np(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Of)}px`),n.attr("height",`${Math.min(10*i,Of)}px`);let d=n.append("xhtml:div"),f=_t(e.label)?await ql(e.label.replace(w.lineBreakRegex,`
229
- `),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Nh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Nh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let x=await hr.measure(()=>d.node().getBoundingClientRect());if(x.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(x.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(np,"addHtmlSpan");function Vs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Vs,"createTspan");function Lp(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Lp,"computeWidthOfText");function Jf(r,e,i){let s=r.append("text"),o=Vs(s,1,e);Ks(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(Jf,"computeDimensionOfText");function Fp(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((b)=>Lp(c,1.1,b)<=r,"checkWidth"),x=m(u)?[u]:rp(u,m);for(let b of x){let S=Vs(d,f,1.1,o);Ks(S,b),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Fp,"createFormattedText");function zh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(zh,"decodeHTMLEntities");function Ks(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(zh(i.content));else o.text(" "+zh(i.content))})}t(Ks,"updateTextContentAndStyles");async function Mp(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Fs(n))return await ur(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Mp,"replaceIconSubstring");var ln=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let x=c?Nf(e,m):Rf(e),b=await Mp($a(x),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:_t(e)?S:b,labelStyle:i.replace("fill:","color:")};return await np(r,T,d,o,u,m,f)}else{let x=$a(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?Qp(x.replace("<br>","<br/>"),m):Pf(x),S=Fp(d,r,b,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var zu=new Set(["redux-color","redux-dark-color"]),Mk=12,Ak=64,mt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),et=t((r,e)=>r!=null&&zu.has(r)&&mt(e),"isColorTheme"),Ek=/^[\w-]+$/,tt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Ek.test(e)?e:"classic"},"safeLook"),Gr=t((r)=>mt(r)?r.length:0,"paletteSlotCount"),Vn=t((r,e)=>{if(mt(e))return Gr(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Ak?r:Mk},"colorSlotCount"),Yn=t((r,e,i,s)=>{if(e===void 0||!et(i,s))return;let o=e%Gr(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Yh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function $k(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ik(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Yh(f,n,o);let d=function(f,u,m){let x=[];for(let v of f){let F=[...v];$k(F[0],F[F.length-1])||F.push([F[0][0],F[0][1]]),F.length>2&&x.push(F)}let b=[];u=Math.max(u,0.1);let S=[];for(let v of x)for(let F=0;F<v.length-1;F++){let I=v[F],O=v[F+1];if(I[1]!==O[1]){let K=Math.min(I[1],O[1]);S.push({ymin:K,ymax:Math.max(I[1],O[1]),x:K===I[1]?I[0]:O[0],islope:(O[0]-I[0])/(O[1]-I[1])})}}if(S.sort((v,F)=>v.ymin<F.ymin?-1:v.ymin>F.ymin?1:v.x<F.x?-1:v.x>F.x?1:v.ymax===F.ymax?0:(v.ymax-F.ymax)/Math.abs(v.ymax-F.ymax)),!S.length)return b;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let F=0;F<S.length&&!(S[F].ymin>B);F++)v=F;S.splice(0,v+1).forEach((F)=>{T.push({s:B,edge:F})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,F)=>v.edge.x===F.edge.x?0:(v.edge.x-F.edge.x)/Math.abs(v.edge.x-F.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let F=v+1;if(F>=T.length)break;let I=T[v].edge,O=T[F].edge;b.push([[Math.round(I.x),B],[Math.round(O.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return b}(c,a,s);if(o){for(let f of c)Yh(f,n,-o);(function(f,u,m){let x=[];f.forEach((b)=>x.push(...b)),Yh(x,u,m)})(d,n,-o)}return d}function vo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Ik(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=vo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function aa(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class jp extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=vo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Up extends sa{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class Xp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,x=Math.min(c[0][1],c[1][1]);for(let b=0;b<f;b++){let S=x+u+b*s,T=m-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class Gp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let x=0;x<n;x++){let b=x*(i+s),S=b+i,T=[f[0]+b*Math.cos(m)+d*Math.cos(m),f[1]+b*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class Vp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=vo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,x=2*(u+1)*e,b=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],B=[S[0]+b*Math.cos(f+Math.PI/4),S[1]+b*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Fe={};class Kp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ok=0,jh=1,$p=2,Zs={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 Uh(r,e){return r.type===e}function Qh(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Ok,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:jh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:$p,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Uh(a,$p);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return Qh("M0,0"+r);o++,c=Zs[a.text],s=a.text}else Uh(a,jh)?c=Zs[s]:(o++,c=Zs[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Uh(f,jh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Zs[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function Zp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function Jp(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,x=0;i==="C"||i==="S"?(m=s+(s-n),x=o+(o-d)):(m=s,x=o),e.push({key:"C",data:[m,x,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,x]=u,b=0,S=0;i==="Q"||i==="T"?(b=s+(s-n),S=o+(o-d)):(b=s,S=o);let T=s+2*(b-s)/3,B=o+2*(S-o)/3,_=m+2*(b-m)/3,v=x+2*(S-x)/3;e.push({key:"C",data:[T,B,_,v,m,x]}),n=b,d=S,s=m,o=x;break}case"Q":{let[m,x,b,S]=u,T=s+2*(m-s)/3,B=o+2*(x-o)/3,_=b+2*(m-b)/3,v=S+2*(x-S)/3;e.push({key:"C",data:[T,B,_,v,b,S]}),n=m,d=x,s=b,o=S;break}case"A":{let m=Math.abs(u[0]),x=Math.abs(u[1]),b=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||x===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)tg(s,o,B,_,m,x,b,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function To(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function tg(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let x=[],b=0,S=0,T=0,B=0;if(f)[b,S,T,B]=f;else{[r,e]=To(r,e,-u),[i,s]=To(i,s,-u);let D=(r-i)/2,U=(e-s)/2,it=D*D/(o*o)+U*U/(a*a);it>1&&(it=Math.sqrt(it),o*=it,a*=it);let P=o*o,ht=a*a,lt=P*ht-P*U*U-ht*D*D,Bt=P*U*U+ht*D*D,At=(n===d?-1:1)*Math.sqrt(Math.abs(lt/Bt));T=At*o*U/a+(r+i)/2,B=At*-a*D/o+(e+s)/2,b=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(b=Math.PI-b),i<T&&(S=Math.PI-S),b<0&&(b=2*Math.PI+b),S<0&&(S=2*Math.PI+S),d&&b>S&&(b-=2*Math.PI),!d&&S>b&&(S-=2*Math.PI)}let _=S-b;if(Math.abs(_)>120*Math.PI/180){let D=S,U=i,it=s;S=d&&S>b?b+120*Math.PI/180*1:b+120*Math.PI/180*-1,x=tg(i=T+o*Math.cos(S),s=B+a*Math.sin(S),U,it,o,a,c,0,d,[S,D,T,B])}_=S-b;let v=Math.cos(b),F=Math.sin(b),I=Math.cos(S),O=Math.sin(S),K=Math.tan(_/4),Z=1.3333333333333333*o*K,rt=1.3333333333333333*a*K,st=[r,e],ut=[r+Z*F,e-rt*v],ct=[i+Z*O,s-rt*I],nt=[i,s];if(ut[0]=2*st[0]-ut[0],ut[1]=2*st[1]-ut[1],f)return[ut,ct,nt].concat(x);{x=[ut,ct,nt].concat(x);let D=[];for(let U=0;U<x.length;U+=3){let it=To(x[U][0],x[U][1],u),P=To(x[U+1][0],x[U+1][1],u),ht=To(x[U+2][0],x[U+2][1],u);D.push([it[0],it[1],P[0],P[1],ht[0],ht[1]])}return D}}var Dk={randOffset:function(r,e){return Xt(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=ig(i,s,o);return Vh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function rg(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?rg(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Pk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Op(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Qs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Qs(i[0],1.5*(1+0.22*e.roughness),Wp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Qs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Qs(c,1.5*(1+0.22*e.roughness),Wp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function ig(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Xt(c*d,i),n+=Xt(n*d,i),{increment:a,rx:c,ry:n}}function Vh(r,e,i,s){let[o,a]=zp(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=zp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function Pp(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),x=Math.abs(s/2);m+=Xt(0.01*m,d),x+=Xt(0.01*x,d);let b=o,S=a;for(;b<0;)b+=2*Math.PI,S+=2*Math.PI;S-b>2*Math.PI&&(b=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-b)/2),_=Hp(B,f,u,m,x,b,S,1,d);if(!d.disableMultiStroke){let v=Hp(B,f,u,m,x,b,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(b),u+x*Math.sin(b),d),...br(f,u,f+m*Math.cos(S),u+x*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(b),u+x*Math.sin(b)]})),{type:"path",ops:_}}function qp(r,e){let i=Jp(Zp(Qh(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,x,b]=n;s.push(...Rk(d,f,u,m,x,b,a,e)),a=[x,b];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Xh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Xt(o,e),s[0][1]+Xt(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Xt(o,e),s[c][1]+Xt(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Fe[o])switch(o){case"zigzag":Fe[o]||(Fe[o]=new jp(s));break;case"cross-hatch":Fe[o]||(Fe[o]=new Up(s));break;case"dots":Fe[o]||(Fe[o]=new Xp(s));break;case"dashed":Fe[o]||(Fe[o]=new Gp(s));break;case"zigzag-line":Fe[o]||(Fe[o]=new Vp(s));break;default:o="hachure",Fe[o]||(Fe[o]=new sa(s))}return Fe[o]}(e,Dk).fillPolygons(r,e)}function Wp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function og(r){return r.randomizer||(r.randomizer=new Kp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(og(i)*(e-r)+r)}function Xt(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Kh(r,e,i,s,o,!0,!1);if(c)return n;let d=Kh(r,e,i,s,o,!0,!0);return n.concat(d)}function Kh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,x=0.2+0.2*og(o),b=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;b=Xt(b,o,f),S=Xt(S,o,f);let T=[],B=()=>Xt(m,o,f),_=()=>Xt(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Xt(u,o,f)),e+(v?0:Xt(u,o,f))]})),c?T.push({op:"bcurveTo",data:[b+r+(i-r)*x+B(),S+e+(s-e)*x+B(),b+r+2*(i-r)*x+B(),S+e+2*(s-e)*x+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[b+r+(i-r)*x+_(),S+e+(s-e)*x+_(),b+r+2*(i-r)*x+_(),S+e+2*(s-e)*x+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Qs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Xt(e,i),r[0][1]+Xt(e,i)]),s.push([r[0][0]+Xt(e,i),r[0][1]+Xt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Xt(e,i),r[o][1]+Xt(e,i)]),o===r.length-1&&s.push([r[o][0]+Xt(e,i),r[o][1]+Xt(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Xt(n,i),e[1]+Xt(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Kh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function zp(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Xt(0.5,n)-Math.PI/2;f.push([Xt(a,n)+e+0.9*s*Math.cos(u-r),Xt(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let x=u;x<m;x+=r){let b=[Xt(a,n)+e+s*Math.cos(x),Xt(a,n)+i+o*Math.sin(x)];d.push(b),f.push(b)}f.push([Xt(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Xt(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Xt(a,n)+e+0.98*s*Math.cos(u+c),Xt(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Xt(a,n)+e+0.9*s*Math.cos(u+0.5*c),Xt(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function Hp(r,e,i,s,o,a,c,n,d){let f=a+Xt(0.1,d),u=[];u.push([Xt(n,d)+e+0.9*s*Math.cos(f-r),Xt(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Xt(n,d)+e+s*Math.cos(m),Xt(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Rk(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,x=n.preserveVertices;for(let b=0;b<m;b++)b===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Xt(f[0],n)),c[1]+(x?0:Xt(f[0],n))]}),u=x?[o,a]:[o+Xt(f[b],n),a+Xt(f[b],n)],d.push({op:"bcurveTo",data:[r+Xt(f[b],n),e+Xt(f[b],n),i+Xt(f[b],n),s+Xt(f[b],n),u[0],u[1]]});return d}function Bo(r){return[...r]}function Yp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(Bo(r[0]),Bo(r[1]),Bo(r[2]),Bo(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],c=1-e;s.push(Bo(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function qk(r,e,i){let s=ea(e,i);if(s===0)return ea(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),ea(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Zh(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],x=n[d+3],b=3*u[0]-2*f[0]-x[0];b*=b;let S=3*u[1]-2*f[1]-x[1];S*=S;let T=3*m[0]-2*x[0]-f[0];T*=T;let B=3*m[1]-2*x[1]-f[1];return B*=B,b<T&&(b=T),S<B&&(S=B),b+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],x=Ar(d,f,0.5),b=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(x,b,0.5),B=Ar(b,S,0.5),_=Ar(T,B,0.5);Zh([d,x,T,_],0,i,o),Zh([_,B,S,m],0,i,o)}var a,c;return o}function Wk(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=qk(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Gh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Zh(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var Ee="none";class _o{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[rg(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Pk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Xh([d],a)):c.push(ui([d],a))}return a.stroke!==Ee&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=ig(i,s,a),d=Vh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Vh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==Ee&&c.push(d.opset),this._d("ellipse",c,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=Pp(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let x=Pp(r,e,i,s,o,a,!0,!1,m);x.type="fillPath",f.push(x)}else f.push(function(m,x,b,S,T,B,_){let v=m,F=x,I=Math.abs(b/2),O=Math.abs(S/2);I+=Xt(0.01*I,_),O+=Xt(0.01*O,_);let K=T,Z=B;for(;K<0;)K+=2*Math.PI,Z+=2*Math.PI;Z-K>2*Math.PI&&(K=0,Z=2*Math.PI);let rt=(Z-K)/_.curveStepCount,st=[];for(let ut=K;ut<=Z;ut+=rt)st.push([v+I*Math.cos(ut),F+O*Math.sin(ut)]);return st.push([v+I*Math.cos(Z),F+O*Math.sin(Z)]),st.push([v,F]),ui([st],_)}(r,e,i,s,o,a,d));return d.stroke!==Ee&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Op(r,i);if(i.fill&&i.fill!==Ee)if(i.fillStyle==="solid"){let a=Op(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Gh(Yp([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Gh(Yp(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==Ee&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Xh([r],i)):s.push(ui([r],i))),i.stroke!==Ee&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Ee,a=i.stroke!==Ee,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let x=Jp(Zp(Qh(f))),b=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Gh(B,u)),B=[]},v=()=>{_(),S.length&&(b.push(S),S=[])};for(let{key:I,data:O}of x)switch(I){case"M":v(),T=[O[0],O[1]],S.push(T);break;case"L":_(),S.push([O[0],O[1]]);break;case"C":if(!B.length){let K=S.length?S[S.length-1]:T;B.push([K[0],K[1]])}B.push([O[0],O[1]]),B.push([O[2],O[3]]),B.push([O[4],O[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return b;let F=[];for(let I of b){let O=Wk(I,m);O.length&&F.push(O)}return F}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=qp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=qp(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Xh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ee};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ee,strokeWidth:0,fill:i.fill||Ee};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Ee,strokeWidth:i,fill:Ee}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class sg{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Js="http://www.w3.org/2000/svg";class ag{constructor(r,e){this.svg=r,this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,c,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Js,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new sg(r,e),svg:(r,e)=>new ag(r,e),generator:(r)=>new _o(r),newSeed:()=>_o.newSeed()};var Nk=1,zk=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=Y.fontSize]=Nn(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===zk)return r.textContent?.trim()!=="";if(r.nodeType!==Nk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var ng=3,Hk=32,Yk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),d=e.width?Math.max(e.width-2*(e.padding??0),Hk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),F=await ln(v,ee($a(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(F).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(F).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),x=Math.max(...m.map(({box:_})=>_.width),0),b=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${x/2-v.x-v.width/2}, ${b-v.y})`),b+=v.height+ng;let S=m.length>0?b-ng:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),lg=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Yk(r,e,i);let s,o=e.useHtmlLabels||$r(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await ln(c,ee($a(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),x=(e?.padding??0)/2,b;if(o){let S=m.children[0],T=h(m);await fc(S),b=await hr.measure(()=>S.getBoundingClientRect()),b=lg(b,u),T.attr("width",b.width),T.attr("height",b.height)}else b=await hr.measure(()=>m.getBBox()),b=lg(b,u);if(o)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");else c.attr("transform","translate(0, "+-b.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:b,halfPadding:x,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??qt(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await ln(o,ee($a(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(qt(p())){let d=a.children[0],f=h(a);n=await hr.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await hr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:c,label:o}},"insertLabel"),W=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),Dt=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(oe,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,x=e+f/2;for(let b=0;b<=50;b++){let S=b/50,T=r+S*d,B=x+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var jk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=jk;function Mg(r,e){return r.intersect(e)}t(Mg,"intersectNode");var Uk=Mg;function Ag(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ag,"intersectEllipse");var Eg=Ag;function $g(r,e,i){return Eg(r,e,e,i)}t($g,"intersectCircle");var Xk=$g;function Ig(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,x=s.x*i.y-i.x*s.y,b=u*r.x+m*r.y+x,S=u*e.x+m*e.y+x;if(Math.abs(b)<0.000001&&Math.abs(S)<0.000001&&cc(b,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*x-m*c)/T,_=(u*c-o*x)/T;return{x:B,y:_}}}t(Ig,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var Gk=Ig;function Og(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],x=e[u<e.length-1?u+1:0],b=Gk(r,i,{x:d+m.x,y:f+m.y},{x:d+x.x,y:f+x.y});if(b)a.push(b)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let x=u.x-i.x,b=u.y-i.y,S=Math.sqrt(x*x+b*b),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Og,"intersectPolygon");var Vk=Og,N={node:Uk,circle:Xk,ellipse:Eg,polygon:Vk,rect:Je},Me=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Kk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=qt(c);return await ln(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ne=Kk;function Dg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=Dt(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",ue(n)),W(e,m),e.intersect=function(x){return l.info("Circle intersect",e,c,x),N.circle(e,c,x)},a}t(Dg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,x=(s-e)/2,b=m/o,S=x/a,T=Math.sqrt(b**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),F=Math.atan2((e-v)/a,(r-_)/o),O=Math.atan2((s-v)/a,(i-_)/o)-F;if(c&&O<0)O+=2*Math.PI;if(!c&&O>0)O-=2*Math.PI;let K=[];for(let Z=0;Z<20;Z++){let rt=Z/19,st=F+rt*O,ut=_+o*Math.cos(st),ct=v+a*Math.sin(st);K.push({x:ut,y:ct})}return K}t(uc,"generateArcPoints");function Pg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Pg,"calculateArcSagitta");async function Rg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((st)=>st+c,"calcTotalHeight"),d=t((st)=>{let ut=st/2;return[ut/(2.5+st/50),ut]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=n(e?.height?e?.height:u.height),[x,b]=d(m),S=Pg(m,x,b),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,F=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,x,b,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,x,b,!0)],I=y.svg(f),O=vt(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=oe(F),Z=I.path(K,O),rt=f.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")rt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(${x/2}, 0)`),W(e,rt),e.intersect=function(st){return N.polygon(e,F,st)},f}t(Rg,"bowTieRect");async function qg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),x=Math.max(c.height+f*2+m,e.height??0),b=-x/2+m,S=x/2,T=u*0.72,B=[`M${-u/2},${b}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${b}`,`A${u/2},${m} 0 0 0 ${-u/2},${b}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let rt=y.svg(a).path(B,vt(e,{}));if(v.node()?.appendChild(rt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",b).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),W(e,v);let F=b+(S-b)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${F-c.height/2-(c.y-(c.top??0))})`);let I=12,O=t((Z,rt,st)=>Array.from({length:I+1},(ut,ct)=>{let nt=Math.PI-ct*Math.PI/I;return{x:Z*Math.cos(nt),y:rt+st*m*Math.sin(nt)}}),"arc"),K=[...O(u/2,b,-1),...O(T/2,S,1).reverse()];return e.intersect=function(Z){return N.polygon(e,K,Z)},a}t(qg,"bucket");var Jh=20,rc=8,Zk=80,Qk=8;function Ng(r){let{themeVariables:e}=p(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Qk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(Ng,"getCollapsedStyle");async function zg(r,e){let i=Ng(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await X(r,e,Dt(e)),{theme:d,themeVariables:f}=p();Yn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,x=Math.max(n.width+u*2,Zk,e?.width??0),b=Math.max(m+rc+Jh+u*2,e?.height??0),S=-x/2,T=-b/2,B=-(rc+Jh)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??qt(p()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Z=y.svg(c),rt=vt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),st=Z.path(Me(S,T,x,b,i.rx),rt);v=c.insert(()=>st,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",ue(e.cssStyles))}else if(v=c.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let F=T+u+m+rc;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",F).attr("x2",S+x-8).attr("y2",F).attr("stroke",o).attr("stroke-dasharray","3, 3");let I=F+Jh/2,O=2.5,K=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*K).attr("cy",I).attr("r",O).attr("fill",o);return W(e,v),e.calcIntersect=function(Z,rt){return N.rect(Z,rt)},e.intersect=function(Z){return N.rect(e,Z)},c}t(zg,"collapsedGroup");function tr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(tr,"insertPolygonShape");var Jk=["right","left","up","down"],gc="point",t1=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),e1=t((r)=>Jk.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),hg={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},r1=t((r,e,i,s)=>{let o=t1(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=e1(o);return(hg[f]??hg[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function jg(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,Dt(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,x=r1(i.directions??[],o,i,m),b=tr(s,m,c,x);return b.attr("style",i.style??null),W(i,b),i.intersect=function(S){return N.polygon(i,x,S)},s}t(jg,"block_arrow");async function Ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Me(-x/2,S,x,b,m),vt(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-x/2).attr("y1",S+u).attr("x2",x/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-x/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",S+4).attr("width",Math.max(x-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(Ug,"browser");var na=12;async function Gg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,x=f,b=-u,S=0,T=[{x:m+na,y:b},{x,y:b},{x,y:S},{x:m,y:S},{x:m,y:b+na},{x:m+na,y:b}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),F=vt(e,{}),I=oe(T),O=v.path(I,F);if(B=n.insert(()=>O,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(Gg,"card");function Qg(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=oe(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(x){return N.polygon(e,c,x)},s}t(Qg,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,Dt(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=vt(e,{}),B=S.circle(0,0,m*2,T);x=a.insert(()=>B,":first-child"),x.attr("class","basic label-container").attr("style",ue(b))}else x=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return W(e,x),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function tm(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,x=i.positioned?-u/2:-a.height/2-c;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",m).attr("y",x).attr("width",f).attr("height",u),W(i,n),i.intersect=function(b){return N.rect(i,b)},o}t(tm,"composite");async function em(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,Dt(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let F=y.svg(a).path(Me(-x/2,S,x,b,m),vt(e,{}));if(B.node()?.appendChild(F),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-x/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(em,"consoleWindow");function rm(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
230
- M ${o.x},${o.y} L ${c.x},${c.y}`}t(rm,"createLine");function im(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=rm(a),m=n.path(u,d),x=o.insert(()=>f,":first-child");if(x.insert(()=>m),x.attr("class","outer-path"),c&&e.look!=="handDrawn")x.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")x.selectAll("path").attr("style",s);return W(e,x),e.intersect=function(b){return l.info("crossedCircle intersect",e,{radius:a,point:b}),N.circle(e,a,b)},o}t(im,"crossedCircle");function dr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(dr,"generateCirclePoints");async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...dr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...dr(f/2+m*2,-m,m,20,-180,-270),...dr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...dr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...dr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...dr(f/2+f*0.1,-m,m,20,-180,-270),...dr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...dr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(om,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:b,y:S})}return c}t(fr,"generateCirclePoints");async function sm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),F=T.path(v,B),I=oe(S),O=T.path(I,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>O,":first-child").attr("stroke-opacity",0),K.insert(()=>F,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(sm,"curlyBraceRight");function we(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(we,"generateCirclePoints");async function am(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...we(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...we(f/2,u/2,m,20,0,90)],S=[...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...we(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...we(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=vt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let F=oe(b).replace("Z",""),I=B.path(F,_),K=oe(S).replace("Z",""),Z=B.path(K,_),rt=oe(T),st=B.path(rt,{..._}),ut=o.insert("g",":first-child");if(ut.insert(()=>st,":first-child").attr("stroke-opacity",0),ut.insert(()=>I,":first-child"),ut.insert(()=>Z,":first-child"),ut.attr("class","text"),x&&e.look!=="handDrawn")ut.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return ut.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,T,ct)},o}t(am,"curlyBraces");async function nm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=Math.max(d,u.height+c*2,e?.height??0),x=m/2,b=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),S=Math.max(m/4,b),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=T,I=m,O=F-x,K=I/4,Z=[{x:O,y:0},{x:K,y:0},{x:0,y:I/2},{x:K,y:I},{x:O,y:I},...Qe(-O,-I/2,x,50,270,90)],rt=oe(Z),st=_.path(rt,v),ut=f.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",s);return ut.attr("transform",`translate(${-T/2}, ${-m/2})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,Z,ct)},f}t(nm,"curvedTrapezoid");async function lm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),x=Math.min(d*0.177,m*0.45),b=m+2*f-u,S=-b/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let rt=y.svg(o),st=vt(e,{}),ut=rt.path(Me(-d/2,T,d,m,x),st),ct=rt.circle(0,S+f,f*2,st);if(B.insert(()=>ct,":first-child"),B.insert(()=>ut,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",x).attr("ry",x).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);W(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let F=S+f,I=Math.asin(Math.min(1,(T-F)/f))*180/Math.PI,O=24,Z=[...Qe(0,-F,f,O,180+I,-I),...Qe(-(-d/2+x),-(T+x),x,12,90,0),...Qe(-(-d/2+x),-(b/2-x),x,12,360,270),...Qe(-(d/2-x),-(b/2-x),x,12,270,180),...Qe(-(d/2-x),-(T+x),x,12,180,90)];return e.intersect=function(rt){return N.polygon(e,Z,rt)},o}t(lm,"person");var i1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),o1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),s1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),cg=8,ug=8;async function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<cg)e.height=cg}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=Math.max(e.width??0,f.width)+c,x=m/2,b=x/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+b,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=o1(0,0,m,S,x,b),F=s1(0,b,m,S,x,b),I=vt(e,{}),O=_.path(v,I),K=_.path(F,vt(e,{fill:"none"}));if(T=d.insert(()=>K,":first-child"),T=d.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=i1(0,0,m,S,x,b);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-m/2}, ${-(S/2+b)})`),W(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(x!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let I=b*b*(1-F*F/(x*x));if(I>0)I=Math.sqrt(I);if(I=b-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},d}t(hm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,Dt(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:x,ry:b}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)x=i.rx,b=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=vt(e,{}),_=x||b?T.path(Me(f,u,n,d,x||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",ue(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",ue(x)).attr("ry",ue(b)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return W(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function cm(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let b=y.svg(f),S=vt(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>b.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>b.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,x=(Number(u.attr("height"))||n)??0;if(m>0&&x>0)u.attr("stroke-dasharray",`${m} ${x}`);return f}t(cm,"datastore");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=n.width+o,u=n.height+a,m=u*0.2,x=-f/2,b=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:b+m},{x:-x,y:b+m},{x:-x,y:-b},{x,y:-b},{x,y:b},{x:-x,y:b},{x:-x,y:b+m}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=c.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${b+m+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,F),e.intersect=function(I){return N.rect(e,I)},c}t(um,"dividedRectangle");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{roughness:0.2,strokeWidth:2.5}),B=vt(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,m*2,T),v=S.circle(0,0,u*2,B);x=n.insert("g",":first-child"),x.attr("class",ue(e.cssClasses)).attr("style",ue(b)),x.node()?.appendChild(_),x.node()?.appendChild(v)}else{x=n.insert("g",":first-child");let S=x.insert("circle",":first-child"),T=x.insert("circle");x.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return W(e,x),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(dm,"doublecircle");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,Dt(e)),{theme:n,themeVariables:d}=p();Yn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=vt(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(x=o.insert(()=>B,":first-child"),x.attr("class","basic label-container"),b)x.attr("style",b)}else x=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,W(e,x),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(fm,"usecaseEllipse");function pm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=vt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),x=a.insert(()=>m,":first-child");if(x.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")x.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")x.selectAll("path").attr("style",o);return W(e,x),e.intersect=function(b){return l.info("filledCircle intersect",e,{radius:c,point:b}),N.circle(e,c,b)},a}t(pm,"filledCircle");var dg=10,fg=10;async function gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,x=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:b}=e,S=y.svg(c),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=oe(x),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,W(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(F){return l.info("Triangle intersect",e,x,F),N.polygon(e,x,F)},c}t(gm,"flippedTriangle");async function mm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),x=m-u,b=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+b,y:S},{x:-d/2+b,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((I)=>`L${I.x},${I.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let O=y.svg(o).path(B,vt(e,{}));if(v=o.insert(()=>O,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")W(e,v);else W(e,v,{width:d,height:m});let F=S+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${F-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(I){return N.polygon(e,T,I)},o}t(mm,"folder");function ym(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,x=y.svg(c),b=vt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let S=x.rectangle(u,m,d,f,b),T=c.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);W(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return N.rect(e,_)},c}t(ym,"forkJoin");async function xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,Dt(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,x=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),b=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-b/2,y:-u/2},{x:b/2-m,y:-u/2},...Qe(-b/2+m,0,m,50,90,270),{x:b/2-m,y:u/2},{x:-b/2,y:u/2}],v=oe(_),F=T.path(v,B),I=d.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")I.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return W(e,I),e.intersect=function(O){return l.info("Pill intersect",e,{radius:m,point:O}),N.polygon(e,_,O)},d}t(xm,"halfRoundedRectangle");var a1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let F=(e.height??0)/o;e.width=(e?.width??0)-2*F-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await X(r,e,Dt(e)),x=(e?.height?e?.height:m.height)+d,b=x/o,S=(e?.width?e?.width:m.width)+2*b+f,T=[{x:b,y:0},{x:S-b,y:0},{x:S,y:-x/2},{x:S-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),F=vt(e,{}),I=a1(0,0,S,x,b),O=v.path(I,F);if(B=u.insert(()=>O,":first-child").attr("transform",`translate(${-S/2}, ${x/2})`),_)B.attr("style",_)}else B=tr(u,S,x,T);if(s)B.attr("style",s);return e.width=S,e.height=x,W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(Cm,"hexagon");async function bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,Dt(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=vt(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=oe(u),x=d.path(m,f),b=o.insert(()=>x,":first-child");if(b.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")b.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")b.selectChildren("path").attr("style",s);return b.attr("transform",`translate(${-a/2}, ${-c/2})`),W(e,b),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(bm,"hourglass");async function km(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=e.pos==="t",b=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ge(e),_=-S/2,v=-b/2,F=e.label?8:0,I=y.svg(f),O=vt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let K=I.rectangle(_,v,S,b,O),Z=Math.max(S,u.width),rt=b+u.height+F,st=I.rectangle(-Z/2,-rt/2,Z,rt,{...O,fill:"transparent",stroke:"none"}),ut=f.insert(()=>K,":first-child"),ct=f.insert(()=>st);if(e.icon){let nt=f.append("g");nt.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let D=nt.node().getBBox(),{width:U,height:it,x:P,y:ht}=D;nt.attr("transform",`translate(${-U/2-P},${x?u.height/2+F/2-it/2-ht:-u.height/2-F/2-it/2-ht})`),nt.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-rt/2:rt/2-u.height})`),ut.attr("transform",`translate(0,${x?u.height/2+F/2:-u.height/2-F/2})`),W(e,ct),e.intersect=function(nt){if(l.info("iconSquare intersect",e,nt),!e.label)return N.rect(e,nt);let D=e.x??0,U=e.y??0,it=e.height??0,P=[];if(x)P=[{x:D-u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2},{x:D+u.width/2,y:U-it/2+u.height+F},{x:D+S/2,y:U-it/2+u.height+F},{x:D+S/2,y:U+it/2},{x:D-S/2,y:U+it/2},{x:D-S/2,y:U-it/2+u.height+F},{x:D-u.width/2,y:U-it/2+u.height+F}];else P=[{x:D-S/2,y:U-it/2},{x:D+S/2,y:U-it/2},{x:D+S/2,y:U-it/2+b},{x:D+u.width/2,y:U-it/2+b},{x:D+u.width/2/2,y:U+it/2},{x:D-u.width/2,y:U+it/2},{x:D-u.width/2,y:U-it/2+b},{x:D-S/2,y:U-it/2+b}];return N.polygon(e,P,nt)},f}t(km,"icon");async function wm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=20,b=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ge(e),v=y.svg(f),F=vt(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=_.get("fill");F.stroke=I??B;let O=f.append("g");if(e.icon)O.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let K=O.node().getBBox(),{width:Z,height:rt,x:st,y:ut}=K,ct=Math.max(Z,rt)*Math.SQRT2+x*2,nt=v.circle(0,0,ct,F),D=Math.max(ct,u.width),U=ct+u.height+b,it=v.rectangle(-D/2,-U/2,D,U,{...F,fill:"transparent",stroke:"none"}),P=f.insert(()=>nt,":first-child"),ht=f.insert(()=>it);return O.attr("transform",`translate(${-Z/2-st},${S?u.height/2+b/2-rt/2-ut:-u.height/2-b/2-rt/2-ut})`),O.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-U/2:U/2-u.height})`),P.attr("transform",`translate(0,${S?u.height/2+b/2:-u.height/2-b/2})`),W(e,ht),e.intersect=function(lt){return l.info("iconSquare intersect",e,lt),N.rect(e,lt)},f}t(wm,"iconCircle");async function Sm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=vt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Me(F,I,T,S,5),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child").attr("class","icon-shape2"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:At}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-At:-u.height/2-O/2-lt/2-At})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Sm,"iconRounded");async function Tm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ge(e),F=-T/2,I=-S/2,O=e.label?8:0,K=y.svg(f),Z=vt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let rt=v.get("fill");Z.stroke=rt??_;let st=K.path(Me(F,I,T,S,0.1),Z),ut=Math.max(T,u.width),ct=S+u.height+O,nt=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),D=f.insert(()=>st,":first-child"),U=f.insert(()=>nt);if(e.icon){let it=f.append("g");it.html(`<g>${await ur(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=it.node().getBBox(),{width:ht,height:lt,x:Bt,y:At}=P;it.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+O/2-lt/2-At:-u.height/2-O/2-lt/2-At})`),it.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),D.attr("transform",`translate(0,${b?u.height/2+O/2:-u.height/2-O/2})`),W(e,U),e.intersect=function(it){if(l.info("iconSquare intersect",e,it),!e.label)return N.rect(e,it);let P=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:P-u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2},{x:P+u.width/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht-lt/2+u.height+O},{x:P+T/2,y:ht+lt/2},{x:P-T/2,y:ht+lt/2},{x:P-T/2,y:ht-lt/2+u.height+O},{x:P-u.width/2,y:ht-lt/2+u.height+O}];else Bt=[{x:P-T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2},{x:P+T/2,y:ht-lt/2+S},{x:P+u.width/2,y:ht-lt/2+S},{x:P+u.width/2/2,y:ht+lt/2},{x:P-u.width/2,y:ht+lt/2},{x:P-u.width/2,y:ht-lt/2+S},{x:P-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,it)},f}t(Tm,"iconSquare");async function Bm(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:x,label:b}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),F=vt(e,{});if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let I=v.rectangle(T,B,f,u,F),O=Math.max(f,x.width),K=u+x.height+_,Z=v.rectangle(-O/2,-K/2,O,K,{...F,fill:"none",stroke:"none"}),rt=m.insert(()=>I,":first-child"),st=m.insert(()=>Z);if(e.img){let ut=m.append("image");ut.attr("href",e.img),ut.attr("width",f),ut.attr("height",u),ut.attr("preserveAspectRatio","none"),ut.attr("transform",`translate(${-f/2},${S?K/2-u:-K/2})`)}return b.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${S?-u/2-x.height/2-_/2:u/2-x.height/2+_/2})`),rt.attr("transform",`translate(0,${S?x.height/2+_/2:-x.height/2-_/2})`),W(e,st),e.intersect=function(ut){if(l.info("iconSquare intersect",e,ut),!e.label)return N.rect(e,ut);let ct=e.x??0,nt=e.y??0,D=e.height??0,U=[];if(S)U=[{x:ct-x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2},{x:ct+x.width/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt-D/2+x.height+_},{x:ct+f/2,y:nt+D/2},{x:ct-f/2,y:nt+D/2},{x:ct-f/2,y:nt-D/2+x.height+_},{x:ct-x.width/2,y:nt-D/2+x.height+_}];else U=[{x:ct-f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2},{x:ct+f/2,y:nt-D/2+u},{x:ct+x.width/2,y:nt-D/2+u},{x:ct+x.width/2/2,y:nt+D/2},{x:ct-x.width/2,y:nt+D/2},{x:ct-x.width/2,y:nt-D/2+u},{x:ct-f/2,y:nt-D/2+u}];return N.polygon(e,U,ut)},m}t(Bm,"imageSquare");async function _m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(_m,"inv_trapezoid");async function vm(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),W(e,a),e.intersect=function(d){return N.rect(e,d)},i}t(vm,"labelRect");async function Lm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Lm,"lean_left");async function Fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Fm,"lean_right");function Mm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",Dt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=vt(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let x=oe(f),b=u.path(x,m),S=o.insert(()=>b,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${c/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Mm,"lightningBolt");var n1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),l1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),h1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Am(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let F=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-F*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,x=m/(2.5+u/50),b=(e?.height?e?.height:d.height)+x+c*2,S=b*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=l1(0,0,u,b,m,x,S),F=h1(0,x,u,b,m,x),I=vt(e,{}),O=_.path(v,I),K=_.path(F,I);if(n.insert(()=>K,":first-child").attr("class","line"),T=n.insert(()=>O,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=n1(0,0,u,b,m,x,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-u/2}, ${-(b/2+x)})`),W(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),F=v.x-(e.x??0);if(m!=0&&(Math.abs(F)<(e.width??0)/2||Math.abs(F)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let I=x*x*(1-F*F/(m*m));if(I>0)I=Math.sqrt(I);if(I=x-I,_.y-(e.y??0)>0)I=-I;v.y+=I}return v},n}t(Am,"linedCylinder");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let I=e.width;if(e.width=(I??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,x=e.look==="neo"?m/4:m/8,b=m+x,{cssStyles:S}=e,T=y.svg(n),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:b/2},...kr(-u/2-u/2*0.1,b/2,u/2+u/2*0.1,b/2,x,0.8),{x:u/2+u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2,y:-b/2},{x:-u/2,y:b/2*1.1},{x:-u/2,y:-b/2}],v=T.polygon(_.map((I)=>[I.x,I.y]),B),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")F.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return F.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,F),e.intersect=function(I){return N.polygon(e,_,I)},n}t(Em,"linedWaveEdgedRect");var c1=56,ic=72,mg=8,yg=2,u1=8,d1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,oc=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),f1={normal:oc(-24,12),hollow:oc(-23,9),awesome:oc(-21,13),icon:"M 12 -8 L 26 -26"},bg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),yc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,vt(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),p1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,vt(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var g1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",f1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Fo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,Dt(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:x}=p();Yn(n,e.colorIndex,m,x.borderColorArray);let b,S;if(e.stereotype){let rt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=rt.label.attr("class","label usecase-stereotype"),S=rt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${d1[i]}`).attr("style",a||null);await s(T,e),g1(T,e,i);let B=e.padding??u1,_=S?.height??0,v=ic+mg+d.height+(S?_+yg:0),F=Math.max(c1,d.width,S?.width??0)+B*2,I=v+B*2,O=-v/2;T.attr("transform",`translate(0,${O+ic/2})`);let K=O+ic+mg;if(b&&S)K+=_/2,bg(b,S,K),K+=_/2+yg;bg(f,d,K+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-F/2).attr("y",-I/2).attr("width",F).attr("height",I).attr("opacity",0).attr("aria-hidden","true");return W(e,Z),e.intersect=(rt)=>N.rect(e,rt),n}t(Fo,"renderUsecaseActor");var m1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function $m(r,e){return Fo(r,e,"normal",(i,s)=>{yc(i,s,m1,"usecase-actor-stick")})}t($m,"usecaseActor");var y1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Im(r,e){return Fo(r,e,"awesome",(i,s)=>{yc(i,s,y1,"usecase-actor-awesome-silhouette")})}t(Im,"usecaseActorAwesome");var x1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Om(r,e){return Fo(r,e,"hollow",(i,s)=>{p1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,x1,"usecase-actor-hollow-body",!0)})}t(Om,"usecaseActorHollow");var di=52,kg=42,wg=-2,C1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,vt(e,{}));r.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Fs(o.includes(":")?o:`fa:${o}`),c=await ur(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function Dm(r,e){return Fo(r,e,"icon",C1)}t(Dm,"usecaseActorIcon");var Sg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Pm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,Dt(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Yn(c,e.colorIndex,u,m.borderColorArray);let x,b;if(i.stereotype){let D=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=D.label.attr("class","label usecase-stereotype"),b=D.bbox}let S=b?2:0,T=n.height+(b?.height??0)+S,B=Math.max(n.width,b?.width??0),_=d??10,v=B/2+_*2,F=T/2+_*2,I=Math.min(Math.max(_/5,1),_/2),O=B/2+I,K=v-I,Z=O/v,rt=K/v,st=F*Math.sqrt(Math.max(0,1-Z*Z)),ut=-F*Math.sqrt(Math.max(0,1-rt*rt));if(x&&b)Sg(x,b,-T/2+b.height/2);Sg(f,n,T/2-n.height/2);let ct;if(e.look==="handDrawn"){let U=y.svg(c).ellipse(0,0,v*2,F*2,vt(e,{}));ct=c.insert(()=>U,":first-child").attr("class","basic label-container usecase-business-ellipse")}else ct=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",F).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${O} ${st} L ${K} ${ut}`).attr("fill","none").attr("style",o||null);let nt=i.accessibleName??i.label;if(nt)c.attr("role","img").attr("aria-label",nt);return W(e,ct),e.calcIntersect=(D,U)=>N.ellipse(D,D.width/2,D.height/2,U),e.intersect=(D)=>N.ellipse(e,v,F,D),c}t(Pm,"usecaseBusiness");var sc=8,Tg=4,b1=1,ac=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),k1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:b1},"numericStrokeWidth");async function Rm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ge(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let D of i.jsonRows??[]){let U=await Ir(f,D.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),it=await Ir(f,D.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:U.label.attr("class","label usecase-json-key"),bbox:U.bbox},value:{label:it.label.attr("class","label usecase-json-value"),bbox:it.bbox}})}let m=Math.max(0,...u.map(({key:D})=>D.bbox.width))+sc*2,x=Math.max(0,...u.map(({value:D})=>D.bbox.width))+sc*2,b=n.width+sc*2,S=Math.max(b,m+x),T=x+Math.max(0,S-m-x),B=n.height+Tg*2,_=u.map(({key:D,value:U})=>Math.max(D.bbox.height,U.bbox.height)+Tg*2),v=B+_.reduce((D,U)=>D+U,0),F=k1(a.get("stroke-width")),I=S+F*2,O=v+F*2,K=-S/2,Z=-v/2,rt=e.look==="handDrawn"?y.svg(c):void 0,st=rt?vt(e,{}):void 0,ut=t((D,U,it,P,ht,lt)=>{if(rt&&st){let Bt=rt.rectangle(it,P,ht,lt,st);return D.insert(()=>Bt,":first-child").attr("class",U)}return D.insert("rect",":first-child").attr("class",U).attr("x",it).attr("y",P).attr("width",ht).attr("height",lt).attr("style",o)},"insertCell"),ct=ut(c,"label-container usecase-json-border",-I/2,-O/2,I,O);ut(f,"usecase-json-cell usecase-json-title-cell",K,Z,S,B),f.node()?.append(d.node()),ac(d,n,0,Z+B/2);let nt=Z+B;return u.forEach(({key:D,value:U},it)=>{let P=_[it],ht=f.append("g").attr("class","usecase-json-row").attr("data-row-index",it).attr("transform",`translate(0,${nt})`);ut(ht,"usecase-json-cell usecase-json-key-cell",K,0,m,P),ut(ht,"usecase-json-cell usecase-json-value-cell",K+m,0,T,P),ht.node()?.append(D.label.node(),U.label.node()),ac(D.label,D.bbox,K+m/2,P/2),ac(U.label,U.bbox,K+m+T/2,P/2),nt+=P}),W(e,ct),e.intersect=(D)=>N.rect(e,D),c}t(Rm,"usecaseJsonTable");async function qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,b=m-2*n,S=x-2*n,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),F=vt(e,{}),I=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+b-n,y:B+S+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B+S-n},{x:T+b+n,y:B+S-n},{x:T+b+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],O=[{x:T,y:B+n},{x:T+b-n,y:B+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B},{x:T,y:B}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,F);if(e.look!=="handDrawn")Z=hc(Z),st=hc(st);let ut=d.insert("g",":first-child");if(ut.insert(()=>Z),ut.insert(()=>st),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},d}t(qm,"multiRect");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,x=Math.max(a.height,e?.height??0)+f*3,b=e.look==="neo"?x/4:x/8,S=x+(u?b/2:-b/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,F=kr(T-_,B+S+_,T+m-_,B+S+_,b,0.8),I=F?.[F.length-1],O=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...F,{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:I.y-2*_},{x:T+m+_,y:I.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],K=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:I.y-_},{x:T+m,y:I.y-_},{x:T+m,y:B},{x:T,y:B}],Z=y.svg(o),rt=vt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=oe(O),ut=Z.path(st,rt),ct=oe(K),nt=Z.path(ct,rt),D=o.insert(()=>ut,":first-child");if(D.insert(()=>nt),D.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")D.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return D.attr("transform",`translate(0,${-b/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-b-(a.y-(a.top??0))})`),W(e,D),e.intersect=function(U){return N.polygon(e,O,U)},o}t(Wm,"multiWaveEdgedRectangle");async function Nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||qt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,x=-u/2,{cssStyles:b}=e,S=y.svg(c),T=vt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,x,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),b&&e.look!=="handDrawn")_.selectAll("path").attr("style",b);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Nm,"note");var w1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function zm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Dt(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:x}=e;if(e.look==="handDrawn"){let b=y.svg(o),S=vt(e,{}),T=w1(0,0,d),B=b.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)m.attr("style",x)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return W(e,m),e.calcIntersect=function(b,S){let T=b.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(b,B,S)},e.intersect=function(b){return this.calcIntersect(e,b)},o}t(zm,"question");async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),x=m/4,S=-Math.max(u,(e.width??0)-x)/2,T=-m/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,F=y.svg(n),I=vt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=oe(_),K=F.path(O,I),Z=n.insert(()=>K,":first-child");if(Z.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Z.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-B/2},0)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,Z),e.intersect=function(rt){return N.polygon(e,_,rt)},n}t(Hm,"rect_left_inv_arrow");async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await Ne(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(qt(p())){let rt=u.children[0],st=h(u);m=rt.getBoundingClientRect(),st.attr("width",m.width),st.attr("height",m.height)}l.info("Text 2",d);let x=d||[],b=u.getBBox(),S=await Ne(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<b.width?0:-(b.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),F=m.height+(e.padding||0),I=-m.width/2-_,O=-m.height/2-_,K,Z;if(e.look==="handDrawn"){let rt=y.svg(a),st=vt(e,{}),ut=rt.path(Me(I,O,v,F,e.rx||0),st),ct=rt.line(-m.width/2-_,-m.height/2-_+b.height+_,m.width/2+_,-m.height/2-_+b.height+_,st);Z=a.insert(()=>(l.debug("Rough node insert CXC",ut),ct),":first-child"),K=a.insert(()=>(l.debug("Rough node insert CXC",ut),ut),":first-child")}else K=c.insert("rect",":first-child"),Z=c.insert("line"),K.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+b.height+_).attr("y2",-m.height/2-_+b.height+_);return W(e,K),e.intersect=function(rt){return N.rect(e,rt)},a}t(Ym,"rectWithTitle");async function jm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return mi(r,e,o)}t(jm,"roundedRect");var Er=8;async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,x=u,b=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:b,y:S},{x:b+m,y:S},{x:b+m,y:S+x},{x:b-Er,y:S+x},{x:b-Er,y:S},{x:b,y:S},{x:b,y:S+x}],F=B.polygon(v.map((O)=>[O.x,O.y]),_),I=c.insert(()=>F,":first-child");if(I.attr("class","basic label-container outer-path").attr("style",ue(T)),s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,I),e.intersect=function(O){return N.rect(e,O)},c}t(Um,"shadedProcess");async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,b=m/1.5,S=-x/2,T=-b/2,{cssStyles:B}=e,_=y.svg(n),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=[{x:S,y:T},{x:S,y:T+b},{x:S+x,y:T+b},{x:S+x,y:T-b/2}],I=oe(F),O=_.path(I,v),K=n.insert(()=>O,":first-child");if(K.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")K.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return K.attr("transform",`translate(0, ${b/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-b/4+(e.padding??0)-(d.y-(d.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,F,Z)},n}t(Xm,"slopedRect");async function Gm(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Yn(c,e.colorIndex,n,d.borderColorArray)}return c}t(Gm,"squareRect");var dc=50,S1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),{w:f,h:u}=S1(d,a,c),m=u/2,{cssStyles:x}=e,b=y.svg(n),S=vt(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=oe(T),_=b.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(F){return N.polygon(e,T,F)},n}t(Vm,"stadium");async function Km(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(Km,"state");function Zm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),x=vt(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let b=m.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...x,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>b,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",F=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${F})`)}return W(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(Zm,"stateEnd");function Qm(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return W(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(Qm,"stateStart");var fi=8;async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,x=u,b=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=vt(e,{}),v=B.rectangle(b,S,m+16,x,_),F=B.line(b+fi,S,b+fi,S+x,_),I=B.line(b+fi+m,S,b+fi+m,S+x,_);n.insert(()=>F,":first-child"),n.insert(()=>I,":first-child");let O=n.insert(()=>v,":first-child"),{cssStyles:K}=e;O.attr("class","basic label-container").attr("style",ue(K)),W(e,O)}else{let B=tr(n,m,x,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(Jm,"subroutine");var lc=0.2;async function ty(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-lc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.height?e?.height:d.height)+c*2,u=lc*f,m=lc*f,b=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),F=vt(e,{}),I=[{x:T-u/2,y:B},{x:T+b+u/2,y:B},{x:T+b+u/2,y:B+S},{x:T-u/2,y:B+S}],O=[{x:T+b-u/2,y:B+S},{x:T+b+u/2,y:B+S},{x:T+b+u/2,y:B+S-m}];if(e.look!=="handDrawn")F.roughness=0,F.fillStyle="solid";let K=oe(I),Z=v.path(K,F),rt=oe(O),st=v.path(rt,{...F,fillStyle:"solid"}),ut=n.insert(()=>st,":first-child");if(ut.insert(()=>Z,":first-child"),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return W(e,ut),e.intersect=function(ct){return N.polygon(e,I,ct)},n}t(ty,"taggedRect");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,Dt(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,x=d+f,{cssStyles:b}=e,S=y.svg(o),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:x/2},...kr(-n/2-n/2*0.1,x/2,n/2+n/2*0.1,x/2,f,0.8),{x:n/2+n/2*0.1,y:-x/2},{x:-n/2-n/2*0.1,y:-x/2}],_=-n/2+n/2*0.1,v=-x/2-m*0.4,F=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],I=oe(B),O=S.path(I,T),K=oe(F),Z=S.path(K,{...T,fillStyle:"solid"}),rt=o.insert(()=>Z,":first-child");if(rt.insert(()=>O,":first-child"),rt.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")rt.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,B,st)},o}t(ey,"taggedWaveEdgedRectangle");async function ry(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,Dt(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),W(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(ry,"text");var T1=t((r,e,i,s,o,a)=>`M${r},${e}
226
+ `);return Pp(s)}t(Of,"preprocessMarkdown");function Df(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Df,"nonMarkdownToLines");function Op(r,e={}){let i=Of(r,e),s=ae.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
227
+ `).forEach((u,m)=>{if(m!==0)a++,o.push([]);u.split(" ").forEach((x)=>{if(x=x.replace(/&#39;/g,"'"),x)o[a].push({content:x,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Op,"markdownToLines");function Pf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Pf,"nonMarkdownToHTML");function Rf(r,{markdownAutoWrap:e}={}){let i=ae.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Rf,"markdownToHTML");var bk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var m=!u?f:f.bind(u);return this.reads.push(m),o(this),m},"measure"),mutate:t(function(f,u){e("mutate");var m=!u?f:f.bind(u);return this.writes.push(m),o(this),m},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:m}=f,x;try{e("flushing reads",m.length),f.runTasks(m),e("flushing writes",u.length),f.runTasks(u)}catch(b){x=b}if(f.scheduled=!1,m.length||u.length)o(f);if(x)if(e("task errored",x.message),f.catch)f.catch(x);else throw x}t(a,"flush");function c(f,u){var m=f.indexOf(u);return!!~m&&!!f.splice(m,1)}t(c,"remove");function n(f,u){for(var m in u)if(u.hasOwnProperty(m))f[m]=u[m]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),qf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Ih(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Ih(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function Ih(r,e,i,s){var{_tasks:o,fastdom:a}=r,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t(Ih,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=qf,kk=qf,wk=bk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(kk),lr=wk;function Wf(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(Wf,"splitTextToChars");function Nf(r,e){let i=Wf(e.content);return Ph(r,[],i,e.type)}t(Nf,"splitWordToFitWidth");function Ph(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Ph(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Ph,"splitWordToFitWidthRecursion");function zf(r,e){if(r.some(({content:i})=>i.includes(`
228
+ `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Ys(r,e)}t(zf,"splitLineToFitWidth");function Ys(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Ys(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=Nf(e,a);if(i.push([n]),d.content)r.unshift(d)}return Ys(r,e,i)}t(Ys,"splitLineToFitWidthRecursion");function Oh(r,e){if(e)r.attr("style",e)}t(Oh,"applyStyle");var If=16384;async function Hf(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,If)}px`),n.attr("height",`${Math.min(10*i,If)}px`);let d=n.append("xhtml:div"),f=St(e.label)?await Jl(e.label.replace(w.lineBreakRegex,`
229
+ `),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",m=d.append("span");if(m.html(f),Oh(m,e.labelStyle),m.attr("class",`${u} ${s}`),Oh(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let x=await lr.measure(()=>d.node().getBoundingClientRect());if(x.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(x.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(Hf,"addHtmlSpan");function Us(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(Us,"createTspan");function jf(r,e,i){let s=r.append("text"),o=Us(s,1,e);Xs(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(jf,"computeWidthOfText");function ig(r,e,i){let s=r.append("text"),o=Us(s,1,e);Xs(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(ig,"computeDimensionOfText");function Uf(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let m=t((b)=>jf(c,1.1,b)<=r,"checkWidth"),x=m(u)?[u]:zf(u,m);for(let b of x){let S=Us(d,f,1.1,o);Xs(S,b),f++}}if(s){let u=d.node().getBBox(),m=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Uf,"createFormattedText");function Dh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Dh,"decodeHTMLEntities");function Xs(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Dh(i.content));else o.text(" "+Dh(i.content))})}t(Xs,"updateTextContentAndStyles");async function Gf(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Fs(n))return await dr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Gf,"replaceIconSubstring");var dn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},m)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let x=c?Rf(e,m):Pf(e),b=await Gf(za(x),m),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:St(e)?S:b,labelStyle:i.replace("fill:","color:")};return await Hf(r,T,d,o,u,m,f)}else{let x=za(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?Op(x.replace("<br>","<br/>"),m):Df(x),S=Uf(d,r,b,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var Hu=new Set(["redux-color","redux-dark-color"]),Sk=12,Tk=64,gt=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),nt=t((r,e)=>r!=null&&Hu.has(r)&&gt(e),"isColorTheme"),Bk=/^[\w-]+$/,rt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Bk.test(e)?e:"classic"},"safeLook"),jr=t((r)=>gt(r)?r.length:0,"paletteSlotCount"),Yn=t((r,e)=>{if(gt(e))return jr(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Tk?r:Sk},"colorSlotCount"),Jn=t((r,e,i,s)=>{if(e===void 0||!nt(i,s))return;let o=e%jr(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Rh(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function _k(r,e){return r[0]===e[0]&&r[1]===e[1]}function vk(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Rh(f,n,o);let d=function(f,u,m){let x=[];for(let v of f){let E=[...v];_k(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}let b=[];u=Math.max(u,0.1);let S=[];for(let v of x)for(let E=0;E<v.length-1;E++){let O=v[E],D=v[E+1];if(O[1]!==D[1]){let K=Math.min(O[1],D[1]);S.push({ymin:K,ymax:Math.max(O[1],D[1]),x:K===O[1]?O[0]:D[0],islope:(D[0]-O[0])/(D[1]-O[1])})}}if(S.sort((v,E)=>v.ymin<E.ymin?-1:v.ymin>E.ymin?1:v.x<E.x?-1:v.x>E.x?1:v.ymax===E.ymax?0:(v.ymax-E.ymax)/Math.abs(v.ymax-E.ymax)),!S.length)return b;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let E=0;E<S.length&&!(S[E].ymin>B);E++)v=E;S.splice(0,v+1).forEach((E)=>{T.push({s:B,edge:E})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,E)=>v.edge.x===E.edge.x?0:(v.edge.x-E.edge.x)/Math.abs(v.edge.x-E.edge.x)),(m!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let E=v+1;if(E>=T.length)break;let O=T[v].edge,D=T[E].edge;b.push([[Math.round(O.x),B],[Math.round(D.x),B]])}B+=m,T.forEach((v)=>{v.edge.x=v.edge.x+m*v.edge.islope}),_++}return b}(c,a,s);if(o){for(let f of c)Rh(f,n,-o);(function(f,u,m){let x=[];f.forEach((b)=>x.push(...b)),Rh(x,u,m)})(d,n,-o)}return d}function vo(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),vk(r,o,s,a||1)}class sa{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=vo(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function aa(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class ap extends sa{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=vo(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)aa([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class np extends sa{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class lp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let c of r){let n=aa(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,m=(c[0][0]+c[1][0])/2-s/4,x=Math.min(c[0][1],c[1][1]);for(let b=0;b<f;b++){let S=x+u+b*s,T=m-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class cp{constructor(r){this.helper=r}fillPolygons(r,e){let i=vo(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let c=aa(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let m=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let x=0;x<n;x++){let b=x*(i+s),S=b+i,T=[f[0]+b*Math.cos(m)+d*Math.cos(m),f[1]+b*Math.sin(m)+d*Math.sin(m)],B=[f[0]+S*Math.cos(m)+d*Math.cos(m),f[1]+S*Math.sin(m)+d*Math.sin(m)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class qp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=vo(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=aa(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let m=2*u*e,x=2*(u+1)*e,b=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+m*Math.cos(f),n[1]+m*Math.sin(f)],T=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],B=[S[0]+b*Math.cos(f+Math.PI/4),S[1]+b*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Me={};class Wp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Lk=0,qh=1,Kf=2,Zs={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 Wh(r,e){return r.type===e}function Uh(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Lk,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:qh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:Kf,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Wh(a,Kf);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return Uh("M0,0"+r);o++,c=Zs[a.text],s=a.text}else Wh(a,qh)?c=Zs[s]:(o++,c=Zs[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!Wh(f,qh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Zs[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function zp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function Hp(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let m=0,x=0;i==="C"||i==="S"?(m=s+(s-n),x=o+(o-d)):(m=s,x=o),e.push({key:"C",data:[m,x,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[m,x]=u,b=0,S=0;i==="Q"||i==="T"?(b=s+(s-n),S=o+(o-d)):(b=s,S=o);let T=s+2*(b-s)/3,B=o+2*(S-o)/3,_=m+2*(b-m)/3,v=x+2*(S-x)/3;e.push({key:"C",data:[T,B,_,v,m,x]}),n=b,d=S,s=m,o=x;break}case"Q":{let[m,x,b,S]=u,T=s+2*(m-s)/3,B=o+2*(x-o)/3,_=b+2*(m-b)/3,v=S+2*(x-S)/3;e.push({key:"C",data:[T,B,_,v,b,S]}),n=m,d=x,s=b,o=S;break}case"A":{let m=Math.abs(u[0]),x=Math.abs(u[1]),b=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(m===0||x===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)Yp(s,o,B,_,m,x,b,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function To(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function Yp(r,e,i,s,o,a,c,n,d,f){let u=(m=c,Math.PI*m/180);var m;let x=[],b=0,S=0,T=0,B=0;if(f)[b,S,T,B]=f;else{[r,e]=To(r,e,-u),[i,s]=To(i,s,-u);let P=(r-i)/2,U=(e-s)/2,et=P*P/(o*o)+U*U/(a*a);et>1&&(et=Math.sqrt(et),o*=et,a*=et);let R=o*o,ht=a*a,lt=R*ht-R*U*U-ht*P*P,Bt=R*U*U+ht*P*P,vt=(n===d?-1:1)*Math.sqrt(Math.abs(lt/Bt));T=vt*o*U/a+(r+i)/2,B=vt*-a*P/o+(e+s)/2,b=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(b=Math.PI-b),i<T&&(S=Math.PI-S),b<0&&(b=2*Math.PI+b),S<0&&(S=2*Math.PI+S),d&&b>S&&(b-=2*Math.PI),!d&&S>b&&(S-=2*Math.PI)}let _=S-b;if(Math.abs(_)>120*Math.PI/180){let P=S,U=i,et=s;S=d&&S>b?b+120*Math.PI/180*1:b+120*Math.PI/180*-1,x=Yp(i=T+o*Math.cos(S),s=B+a*Math.sin(S),U,et,o,a,c,0,d,[S,P,T,B])}_=S-b;let v=Math.cos(b),E=Math.sin(b),O=Math.cos(S),D=Math.sin(S),K=Math.tan(_/4),Z=1.3333333333333333*o*K,tt=1.3333333333333333*a*K,ot=[r,e],ut=[r+Z*E,e-tt*v],ct=[i+Z*D,s-tt*O],at=[i,s];if(ut[0]=2*ot[0]-ut[0],ut[1]=2*ot[1]-ut[1],f)return[ut,ct,at].concat(x);{x=[ut,ct,at].concat(x);let P=[];for(let U=0;U<x.length;U+=3){let et=To(x[U][0],x[U][1],u),R=To(x[U+1][0],x[U+1][1],u),ht=To(x[U+2][0],x[U+2][1],u);P.push([et[0],et[1],R[0],R[1],ht[0],ht[1]])}return P}}var Fk={randOffset:function(r,e){return Ut(r,e)},randOffsetWithRange:function(r,e,i){return ra(r,e,i)},ellipse:function(r,e,i,s,o){let a=Up(i,s,o);return Hh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return br(r,e,i,s,o,!0)}};function jp(r,e,i,s,o){return{type:"path",ops:br(r,e,i,s,o)}}function ta(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...br(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...br(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?jp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Mk(r,e,i,s,o){return function(a,c){return ta(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Qf(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=Qs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:Qs(i[0],1.5*(1+0.22*e.roughness),rp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=Qs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:Qs(c,1.5*(1+0.22*e.roughness),rp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function Up(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Ut(c*d,i),n+=Ut(n*d,i),{increment:a,rx:c,ry:n}}function Hh(r,e,i,s){let[o,a]=ip(s.increment,r,e,s.rx,s.ry,1,s.increment*ra(0.1,ra(0.4,1,i),i),i),c=ia(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=ip(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=ia(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function tp(r,e,i,s,o,a,c,n,d){let f=r,u=e,m=Math.abs(i/2),x=Math.abs(s/2);m+=Ut(0.01*m,d),x+=Ut(0.01*x,d);let b=o,S=a;for(;b<0;)b+=2*Math.PI,S+=2*Math.PI;S-b>2*Math.PI&&(b=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-b)/2),_=op(B,f,u,m,x,b,S,1,d);if(!d.disableMultiStroke){let v=op(B,f,u,m,x,b,S,1.5,d);_.push(...v)}return c&&(n?_.push(...br(f,u,f+m*Math.cos(b),u+x*Math.sin(b),d),...br(f,u,f+m*Math.cos(S),u+x*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+m*Math.cos(b),u+x*Math.sin(b)]})),{type:"path",ops:_}}function ep(r,e){let i=Hp(zp(Uh(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...br(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,m,x,b]=n;s.push(...Ak(d,f,u,m,x,b,a,e)),a=[x,b];break}case"Z":s.push(...br(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Nh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Ut(o,e),s[0][1]+Ut(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Ut(o,e),s[c][1]+Ut(o,e)]})}}return{type:"fillPath",ops:i}}function ui(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Me[o])switch(o){case"zigzag":Me[o]||(Me[o]=new ap(s));break;case"cross-hatch":Me[o]||(Me[o]=new np(s));break;case"dots":Me[o]||(Me[o]=new lp(s));break;case"dashed":Me[o]||(Me[o]=new cp(s));break;case"zigzag-line":Me[o]||(Me[o]=new qp(s));break;default:o="hachure",Me[o]||(Me[o]=new sa(s))}return Me[o]}(e,Fk).fillPolygons(r,e)}function rp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function Xp(r){return r.randomizer||(r.randomizer=new Wp(r.seed||0)),r.randomizer.next()}function ra(r,e,i,s=1){return i.roughness*s*(Xp(i)*(e-r)+r)}function Ut(r,e,i=1){return ra(-r,r,e,i)}function br(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Yh(r,e,i,s,o,!0,!1);if(c)return n;let d=Yh(r,e,i,s,o,!0,!0);return n.concat(d)}function Yh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let m=u/2,x=0.2+0.2*Xp(o),b=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;b=Ut(b,o,f),S=Ut(S,o,f);let T=[],B=()=>Ut(m,o,f),_=()=>Ut(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Ut(u,o,f)),e+(v?0:Ut(u,o,f))]})),c?T.push({op:"bcurveTo",data:[b+r+(i-r)*x+B(),S+e+(s-e)*x+B(),b+r+2*(i-r)*x+B(),S+e+2*(s-e)*x+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[b+r+(i-r)*x+_(),S+e+(s-e)*x+_(),b+r+2*(i-r)*x+_(),S+e+2*(s-e)*x+_(),i+(v?0:_()),s+(v?0:_())]}),T}function Qs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Ut(e,i),r[0][1]+Ut(e,i)]),s.push([r[0][0]+Ut(e,i),r[0][1]+Ut(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Ut(e,i),r[o][1]+Ut(e,i)]),o===r.length-1&&s.push([r[o][0]+Ut(e,i),r[o][1]+Ut(e,i)]);return ia(s,null,i)}function ia(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Ut(n,i),e[1]+Ut(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Yh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ip(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let m=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(m),f.push(m)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Ut(0.5,n)-Math.PI/2;f.push([Ut(a,n)+e+0.9*s*Math.cos(u-r),Ut(a,n)+i+0.9*o*Math.sin(u-r)]);let m=2*Math.PI+u-0.01;for(let x=u;x<m;x+=r){let b=[Ut(a,n)+e+s*Math.cos(x),Ut(a,n)+i+o*Math.sin(x)];d.push(b),f.push(b)}f.push([Ut(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Ut(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Ut(a,n)+e+0.98*s*Math.cos(u+c),Ut(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Ut(a,n)+e+0.9*s*Math.cos(u+0.5*c),Ut(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function op(r,e,i,s,o,a,c,n,d){let f=a+Ut(0.1,d),u=[];u.push([Ut(n,d)+e+0.9*s*Math.cos(f-r),Ut(n,d)+i+0.9*o*Math.sin(f-r)]);for(let m=f;m<=c;m+=r)u.push([Ut(n,d)+e+s*Math.cos(m),Ut(n,d)+i+o*Math.sin(m)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),ia(u,null,d)}function Ak(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],m=n.disableMultiStroke?1:2,x=n.preserveVertices;for(let b=0;b<m;b++)b===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Ut(f[0],n)),c[1]+(x?0:Ut(f[0],n))]}),u=x?[o,a]:[o+Ut(f[b],n),a+Ut(f[b],n)],d.push({op:"bcurveTo",data:[r+Ut(f[b],n),e+Ut(f[b],n),i+Ut(f[b],n),s+Ut(f[b],n),u[0],u[1]]});return d}function Bo(r){return[...r]}function sp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(Bo(r[0]),Bo(r[1]),Bo(r[2]),Bo(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],c=1-e;s.push(Bo(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function ea(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Ek(r,e,i){let s=ea(e,i);if(s===0)return ea(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),ea(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function jh(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],m=n[d+2],x=n[d+3],b=3*u[0]-2*f[0]-x[0];b*=b;let S=3*u[1]-2*f[1]-x[1];S*=S;let T=3*m[0]-2*x[0]-f[0];T*=T;let B=3*m[1]-2*x[1]-f[1];return B*=B,b<T&&(b=T),S<B&&(S=B),b+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(ea(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],m=r[e+3],x=Ar(d,f,0.5),b=Ar(f,u,0.5),S=Ar(u,m,0.5),T=Ar(x,b,0.5),B=Ar(b,S,0.5),_=Ar(T,B,0.5);jh([d,x,T,_],0,i,o),jh([_,B,S,m],0,i,o)}var a,c;return o}function $k(r,e){return oa(r,0,r.length,e)}function oa(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let m=Ek(r[u],c,n);m>d&&(d=m,f=u)}return Math.sqrt(d)>s?(oa(r,e,f+1,s,a),oa(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function zh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)jh(r,3*a,e,s);return i&&i>0?oa(s,0,s.length,i):s}var $e="none";class _o{constructor(r){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[jp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Mk(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Nh([d],a)):c.push(ui([d],a))}return a.stroke!==$e&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=Up(i,s,a),d=Hh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=Hh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(ui([d.estimatedPoints],a));return a.stroke!==$e&&c.push(d.opset),this._d("ellipse",c,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[ta(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=tp(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let m=Object.assign({},d);m.disableMultiStroke=!0;let x=tp(r,e,i,s,o,a,!0,!1,m);x.type="fillPath",f.push(x)}else f.push(function(m,x,b,S,T,B,_){let v=m,E=x,O=Math.abs(b/2),D=Math.abs(S/2);O+=Ut(0.01*O,_),D+=Ut(0.01*D,_);let K=T,Z=B;for(;K<0;)K+=2*Math.PI,Z+=2*Math.PI;Z-K>2*Math.PI&&(K=0,Z=2*Math.PI);let tt=(Z-K)/_.curveStepCount,ot=[];for(let ut=K;ut<=Z;ut+=tt)ot.push([v+O*Math.cos(ut),E+D*Math.sin(ut)]);return ot.push([v+O*Math.cos(Z),E+D*Math.sin(Z)]),ot.push([v,E]),ui([ot],_)}(r,e,i,s,o,a,d));return d.stroke!==$e&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Qf(r,i);if(i.fill&&i.fill!==$e)if(i.fillStyle==="solid"){let a=Qf(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...zh(sp([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...zh(sp(d),10,(1+i.roughness)/2))}a.length&&s.push(ui([a],i))}return i.stroke!==$e&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=ta(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Nh([r],i)):s.push(ui([r],i))),i.stroke!==$e&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==$e,a=i.stroke!==$e,c=!!(i.simplification&&i.simplification<1),n=function(f,u,m){let x=Hp(zp(Uh(f))),b=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...zh(B,u)),B=[]},v=()=>{_(),S.length&&(b.push(S),S=[])};for(let{key:O,data:D}of x)switch(O){case"M":v(),T=[D[0],D[1]],S.push(T);break;case"L":_(),S.push([D[0],D[1]]);break;case"C":if(!B.length){let K=S.length?S[S.length-1]:T;B.push([K[0],K[1]])}B.push([D[0],D[1]]),B.push([D[2],D[3]]),B.push([D[4],D[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!m)return b;let E=[];for(let O of b){let D=$k(O,m);D.length&&E.push(D)}return E}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=ep(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=ep(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Nh(n,i));else s.push(ui(n,i));return a&&(c?n.forEach((f)=>{s.push(ta(f,!1,i))}):s.push(d)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:$e};break;case"fillPath":a={d:this.opsToPath(o),stroke:$e,strokeWidth:0,fill:i.fill||$e};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||$e,strokeWidth:i,fill:$e}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class Gp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Js="http://www.w3.org/2000/svg";class Vp{constructor(r,e){this.svg=r,this.gen=new _o(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Js,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Js,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,c,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Js,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new Gp(r,e),svg:(r,e)=>new Vp(r,e),generator:(r)=>new _o(r),newSeed:()=>_o.newSeed()};var Ik=1,Ok=3;async function fc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!pc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=p().fontSize?p().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=Y.fontSize]=Rn(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(fc,"configureLabelImages");function pc(r){if(r.nodeType===Ok)return r.textContent?.trim()!=="";if(r.nodeType!==Ik)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(pc)}t(pc,"hasTextBesidesImages");var Kp=3,Dk=32,Pk=t(async(r,e,i)=>{let s=p(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),d=e.width?Math.max(e.width-2*(e.padding??0),Dk):p().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,m=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),E=await dn(v,ee(za(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(E).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(E).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),x=Math.max(...m.map(({box:_})=>_.width),0),b=0;for(let{el:_,box:v}of m)_.attr("transform",`translate(${x/2-v.x-v.width/2}, ${b-v.y})`),b+=v.height+Kp;let S=m.length>0?b-Kp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),Zp=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Pk(r,e,i);let s,o=e.useHtmlLabels||zr(p()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",ue(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,m=await dn(c,ee(za(n),p()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||p().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},p()),x=(e?.padding??0)/2,b;if(o){let S=m.children[0],T=h(m);await fc(S),b=await lr.measure(()=>S.getBoundingClientRect()),b=Zp(b,u),T.attr("width",b.width),T.attr("height",b.height)}else b=await lr.measure(()=>m.getBBox()),b=Zp(b,u);if(o)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");else c.attr("transform","translate(0, "+-b.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:b,halfPadding:x,label:c}},"labelHelper"),$r=t(async(r,e,i)=>{let s=i.useHtmlLabels??Ht(p()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await dn(o,ee(za(e),p()),{useHtmlLabels:s,width:i.width||p()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(Ht(p())){let d=a.children[0],f=h(a);n=await lr.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await lr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:c,label:o}},"insertLabel"),W=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),It=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function oe(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(oe,"createPathFromPoints");function kr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,m=2*Math.PI/u,x=e+f/2;for(let b=0;b<=50;b++){let S=b/50,T=r+S*d,B=x+o*Math.sin(m*(T-r));c.push({x:T,y:B})}return c}t(kr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Qe,"generateCirclePoints");function hc(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(hc,"mergePaths");var Rk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=Rk;function Mg(r,e){return r.intersect(e)}t(Mg,"intersectNode");var qk=Mg;function Ag(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(Ag,"intersectEllipse");var Eg=Ag;function $g(r,e,i){return Eg(r,e,e,i)}t($g,"intersectCircle");var Wk=$g;function Ig(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&cc(n,d))return;let u=s.y-i.y,m=i.x-s.x,x=s.x*i.y-i.x*s.y,b=u*r.x+m*r.y+x,S=u*e.x+m*e.y+x;if(Math.abs(b)<0.000001&&Math.abs(S)<0.000001&&cc(b,S))return;let T=o*m-u*a;if(T===0)return;let B=(a*x-m*c)/T,_=(u*c-o*x)/T;return{x:B,y:_}}}t(Ig,"intersectLine");function cc(r,e){return r*e>0}t(cc,"sameSign");var Nk=Ig;function Og(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let m=e[u],x=e[u<e.length-1?u+1:0],b=Nk(r,i,{x:d+m.x,y:f+m.y},{x:d+x.x,y:f+x.y});if(b)a.push(b)}if(!a.length)return r;if(a.length>1)a.sort(function(u,m){let x=u.x-i.x,b=u.y-i.y,S=Math.sqrt(x*x+b*b),T=m.x-i.x,B=m.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(Og,"intersectPolygon");var zk=Og,N={node:qk,circle:Wk,ellipse:Eg,polygon:zk,rect:Je},Ae=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Hk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=p(),n=Ht(c);return await dn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ne=Hk;function Dg(r,e){let{labelStyles:i}=Q(e);e.labelStyle=i;let s=It(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=_t(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),m=a.insert(()=>u,":first-child");return m.attr("class","anchor").attr("style",ue(n)),W(e,m),e.intersect=function(x){return l.info("Circle intersect",e,c,x),N.circle(e,c,x)},a}t(Dg,"anchor");function uc(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),m=(i-r)/2,x=(s-e)/2,b=m/o,S=x/a,T=Math.sqrt(b**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),E=Math.atan2((e-v)/a,(r-_)/o),D=Math.atan2((s-v)/a,(i-_)/o)-E;if(c&&D<0)D+=2*Math.PI;if(!c&&D>0)D-=2*Math.PI;let K=[];for(let Z=0;Z<20;Z++){let tt=Z/19,ot=E+tt*D,ut=_+o*Math.cos(ot),ct=v+a*Math.sin(ot);K.push({x:ut,y:ct})}return K}t(uc,"generateArcPoints");function Pg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(Pg,"calculateArcSagitta");async function Rg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((ot)=>ot+c,"calcTotalHeight"),d=t((ot)=>{let ut=ot/2;return[ut/(2.5+ot/50),ut]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,It(e)),m=n(e?.height?e?.height:u.height),[x,b]=d(m),S=Pg(m,x,b),B=(e?.width?e?.width:u.width)+a*2+S-S,_=m,{cssStyles:v}=e,E=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...uc(-B/2,-_/2,-B/2,_/2,x,b,!1),{x:B/2,y:_/2},...uc(B/2,_/2,B/2,-_/2,x,b,!0)],O=y.svg(f),D=_t(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let K=oe(E),Z=O.path(K,D),tt=f.insert(()=>Z,":first-child");if(tt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")tt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(${x/2}, 0)`),W(e,tt),e.intersect=function(ot){return N.polygon(e,E,ot)},f}t(Rg,"bowTieRect");async function qg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),m=Math.max(Math.min(u*0.08,12),5),x=Math.max(c.height+f*2+m,e.height??0),b=-x/2+m,S=x/2,T=u*0.72,B=[`M${-u/2},${b}`,`L${-T/2},${S}`,`A${T/2},${m} 0 0 0 ${T/2},${S}`,`L${u/2},${b}`,`A${u/2},${m} 0 0 0 ${-u/2},${b}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let tt=y.svg(a).path(B,_t(e,{}));if(v.node()?.appendChild(tt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",b).attr("rx",u/2).attr("ry",m).attr("style",`fill:none;stroke:${d};stroke-width:1px`),W(e,v);let E=b+(S-b)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${E-c.height/2-(c.y-(c.top??0))})`);let O=12,D=t((Z,tt,ot)=>Array.from({length:O+1},(ut,ct)=>{let at=Math.PI-ct*Math.PI/O;return{x:Z*Math.cos(at),y:tt+ot*m*Math.sin(at)}}),"arc"),K=[...D(u/2,b,-1),...D(T/2,S,1).reverse()];return e.intersect=function(Z){return N.polygon(e,K,Z)},a}t(qg,"bucket");var Xh=20,Gh=8,Yk=80,jk=8;function Wg(r){let{themeVariables:e}=p(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:jk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(Wg,"getCollapsedStyle");async function Ng(r,e){let i=Wg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=Q(e),{shapeSvg:c,bbox:n}=await X(r,e,It(e)),{theme:d,themeVariables:f}=p();Jn(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,m=n.height,x=Math.max(n.width+u*2,Yk,e?.width??0),b=Math.max(m+Gh+Xh+u*2,e?.height??0),S=-x/2,T=-b/2,B=-(Gh+Xh)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??Ht(p()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Z=y.svg(c),tt=_t(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),ot=Z.path(Ae(S,T,x,b,i.rx),tt);v=c.insert(()=>ot,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",ue(e.cssStyles))}else if(v=c.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let E=T+u+m+Gh;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",E).attr("x2",S+x-8).attr("y2",E).attr("stroke",o).attr("stroke-dasharray","3, 3");let O=E+Xh/2,D=2.5,K=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*K).attr("cy",O).attr("r",D).attr("fill",o);return W(e,v),e.calcIntersect=function(Z,tt){return N.rect(Z,tt)},e.intersect=function(Z){return N.rect(e,Z)},c}t(Ng,"collapsedGroup");function tr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(tr,"insertPolygonShape");var Uk=["right","left","up","down"],gc="point",Xk=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),Gk=t((r)=>Uk.filter((e)=>r.has(e)).join("|")||gc,"getDirectionKey"),Jp={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[gc]:()=>[{x:0,y:0}]},Vk=t((r,e,i,s)=>{let o=Xk(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=Gk(o);return(Jp[f]??Jp[gc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function zg(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,It(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,m=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,x=Vk(i.directions??[],o,i,m),b=tr(s,m,c,x);return b.attr("style",i.style??null),W(i,b),i.intersect=function(S){return N.polygon(i,x,S)},s}t(zg,"block_arrow");async function Hg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ae(-x/2,S,x,b,m),_t(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("line").attr("x1",-x/2).attr("y1",S+u).attr("x2",x/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-x/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",S+4).attr("width",Math.max(x-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(Hg,"browser");var na=12;async function Yg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+na),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),m=0,x=f,b=-u,S=0,T=[{x:m+na,y:b},{x,y:b},{x,y:S},{x:m,y:S},{x:m,y:b+na},{x:m+na,y:b}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),E=_t(e,{}),O=oe(T),D=v.path(O,E);if(B=n.insert(()=>D,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},n}t(Yg,"card");function jg(r,e){let{nodeStyles:i}=Q(e);e.label="";let s=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=oe(c),u=n.path(f,d),m=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")m.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")m.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(x){return N.polygon(e,c,x)},s}t(jg,"choice");async function mc(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,It(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,m=e.look==="neo"?u+d*2:u+f,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=_t(e,{}),B=S.circle(0,0,m*2,T);x=a.insert(()=>B,":first-child"),x.attr("class","basic label-container").attr("style",ue(b))}else x=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",m).attr("cx",0).attr("cy",0);return W(e,x),e.calcIntersect=function(S,T){let B=S.width/2;return N.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,m,S),N.circle(e,m,S)},a}t(mc,"circle");async function Ug(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,m=i.positioned?-f/2:-a.width/2-c,x=i.positioned?-u/2:-a.height/2-c;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",m).attr("y",x).attr("width",f).attr("height",u),W(i,n),i.intersect=function(b){return N.rect(i,b)},o}t(Ug,"composite");async function Gg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,m=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ae(-x/2,S,x,b,m),_t(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",m).attr("ry",m).attr("style",o);B.append("text").attr("x",-x/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return N.rect(e,v)},a}t(Gg,"consoleWindow");function Vg(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
230
+ M ${o.x},${o.y} L ${c.x},${c.y}`}t(Vg,"createLine");function Kg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=_t(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=Vg(a),m=n.path(u,d),x=o.insert(()=>f,":first-child");if(x.insert(()=>m),x.attr("class","outer-path"),c&&e.look!=="handDrawn")x.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")x.selectAll("path").attr("style",s);return W(e,x),e.intersect=function(b){return l.info("crossedCircle intersect",e,{radius:a,point:b}),N.circle(e,a,b)},o}t(Kg,"crossedCircle");function hr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(hr,"generateCirclePoints");async function Zg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...hr(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...hr(f/2+m*2,-m,m,20,-180,-270),...hr(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...hr(f/2,u/2,m,20,0,90)],S=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...hr(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...hr(f/2+f*0.1,-m,m,20,-180,-270),...hr(f/2+f*0.1,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...hr(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2,y:u/2+m}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),E=T.path(v,B),O=oe(S),D=T.path(O,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>D,":first-child").attr("stroke-opacity",0),K.insert(()=>E,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${m}, 0)`),c.attr("transform",`translate(${-f/2+m-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(Zg,"curlyBraceLeft");function fr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:b,y:S})}return c}t(fr,"generateCirclePoints");async function Qg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90)],S=[{x:-f/2,y:-u/2-m},{x:f/2,y:-u/2-m},...fr(f/2,-u/2,m,20,-90,0),{x:f/2+m,y:-m},...fr(f/2+m*2,-m,m,20,-180,-270),...fr(f/2+m*2,m,m,20,-90,-180),{x:f/2+m,y:u/2},...fr(f/2,u/2,m,20,0,90),{x:f/2,y:u/2+m},{x:-f/2,y:u/2+m}],T=y.svg(o),B=_t(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=oe(b).replace("Z",""),E=T.path(v,B),O=oe(S),D=T.path(O,{...B}),K=o.insert("g",":first-child");if(K.insert(()=>D,":first-child").attr("stroke-opacity",0),K.insert(()=>E,":first-child"),K.attr("class","text"),x&&e.look!=="handDrawn")K.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")K.selectAll("path").attr("style",s);return K.attr("transform",`translate(${-m}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,S,Z)},o}t(Qg,"curlyBraceRight");function we(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let m=0;m<s;m++){let x=n+m*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(we,"generateCirclePoints");async function Jg(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),m=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...we(f/2,-u/2,m,30,-90,0),{x:-f/2-m,y:m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:-u/2},...we(f/2,u/2,m,20,0,90)],S=[...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],T=[{x:f/2,y:-u/2-m},{x:-f/2,y:-u/2-m},...we(f/2,-u/2,m,20,-90,0),{x:-f/2-m,y:-m},...we(f/2+m*2,-m,m,20,-180,-270),...we(f/2+m*2,m,m,20,-90,-180),{x:-f/2-m,y:u/2},...we(f/2,u/2,m,20,0,90),{x:-f/2,y:u/2+m},{x:f/2-m-m/2,y:u/2+m},...we(-f/2+m+m/2,-u/2,m,20,-90,-180),{x:f/2-m/2,y:m},...we(-f/2-m/2,-m,m,20,0,90),...we(-f/2-m/2,m,m,20,-90,0),{x:f/2-m/2,y:-m},...we(-f/2+m+m/2,u/2,m,30,-180,-270)],B=y.svg(o),_=_t(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let E=oe(b).replace("Z",""),O=B.path(E,_),K=oe(S).replace("Z",""),Z=B.path(K,_),tt=oe(T),ot=B.path(tt,{..._}),ut=o.insert("g",":first-child");if(ut.insert(()=>ot,":first-child").attr("stroke-opacity",0),ut.insert(()=>O,":first-child"),ut.insert(()=>Z,":first-child"),ut.attr("class","text"),x&&e.look!=="handDrawn")ut.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return ut.attr("transform",`translate(${m-m/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,T,ct)},o}t(Jg,"curlyBraces");async function tm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,It(e)),m=Math.max(d,u.height+c*2,e?.height??0),x=m/2,b=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),S=Math.max(m/4,b),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=T,O=m,D=E-x,K=O/4,Z=[{x:D,y:0},{x:K,y:0},{x:0,y:O/2},{x:K,y:O},{x:D,y:O},...Qe(-D,-O/2,x,50,270,90)],tt=oe(Z),ot=_.path(tt,v),ut=f.insert(()=>ot,":first-child");if(ut.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ut.selectChildren("path").attr("style",s);return ut.attr("transform",`translate(${-T/2}, ${-m/2})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,Z,ct)},f}t(tm,"curvedTrapezoid");async function em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,m=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),x=Math.min(d*0.177,m*0.45),b=m+2*f-u,S=-b/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let tt=y.svg(o),ot=_t(e,{}),ut=tt.path(Ae(-d/2,T,d,m,x),ot),ct=tt.circle(0,S+f,f*2,ot);if(B.insert(()=>ct,":first-child"),B.insert(()=>ut,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",m).attr("rx",x).attr("ry",x).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);W(e,B);let v=T+m/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let E=S+f,O=Math.asin(Math.min(1,(T-E)/f))*180/Math.PI,D=24,Z=[...Qe(0,-E,f,D,180+O,-O),...Qe(-(-d/2+x),-(T+x),x,12,90,0),...Qe(-(-d/2+x),-(b/2-x),x,12,360,270),...Qe(-(d/2-x),-(b/2-x),x,12,270,180),...Qe(-(d/2-x),-(T+x),x,12,180,90)];return e.intersect=function(tt){return N.polygon(e,Z,tt)},o}t(em,"person");var Kk=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),Zk=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),Qk=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),hg=8,ug=8;async function rm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<ug)e.width=ug}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<hg)e.height=hg}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),m=Math.max(e.width??0,f.width)+c,x=m/2,b=x/(2.5+m/50),S=Math.max(e.height??0,f.height)+a+b,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=Zk(0,0,m,S,x,b),E=Qk(0,b,m,S,x,b),O=_t(e,{}),D=_.path(v,O),K=_.path(E,_t(e,{fill:"none"}));if(T=d.insert(()=>K,":first-child"),T=d.insert(()=>D,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=Kk(0,0,m,S,x,b);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-m/2}, ${-(S/2+b)})`),W(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),E=v.x-(e.x??0);if(x!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let O=b*b*(1-E*E/(x*x));if(O>0)O=Math.sqrt(O);if(O=b-O,_.y-(e.y??0)>0)O=-O;v.y+=O}return v},d}t(rm,"cylinder");async function mi(r,e,i){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,It(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,m,{rx:x,ry:b}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)x=i.rx,b=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=_t(e,{}),_=x||b?T.path(Ae(f,u,n,d,x||0),B):T.rectangle(f,u,n,d,B);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",ue(S))}else m=a.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",o).attr("rx",ue(x)).attr("ry",ue(b)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return W(e,m,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return N.rect(T,B)},e.intersect=function(T){return N.rect(e,T)},a}t(mi,"drawRect");async function im(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await mi(r,e,d);if(e.look==="handDrawn"){let b=y.svg(f),S=_t(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>b.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>b.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),m=(Number(u.attr("width"))||c)??0,x=(Number(u.attr("height"))||n)??0;if(m>0&&x>0)u.attr("stroke-dasharray",`${m} ${x}`);return f}t(im,"datastore");async function om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=n.width+o,u=n.height+a,m=u*0.2,x=-f/2,b=-u/2-m/2,{cssStyles:S}=e,T=y.svg(c),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:b+m},{x:-x,y:b+m},{x:-x,y:-b},{x,y:-b},{x,y:b},{x:-x,y:b},{x:-x,y:b+m}],v=T.polygon(_.map((O)=>[O.x,O.y]),B),E=c.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${b+m+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,E),e.intersect=function(O){return N.rect(e,O)},c}t(om,"dividedRectangle");async function sm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),m=u+o,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{roughness:0.2,strokeWidth:2.5}),B=_t(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,m*2,T),v=S.circle(0,0,u*2,B);x=n.insert("g",":first-child"),x.attr("class",ue(e.cssClasses)).attr("style",ue(b)),x.node()?.appendChild(_),x.node()?.appendChild(v)}else{x=n.insert("g",":first-child");let S=x.insert("circle",":first-child"),T=x.insert("circle");x.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return W(e,x),e.intersect=function(S){return l.info("DoubleCircle intersect",e,m,S),N.circle(e,m,S)},n}t(sm,"doublecircle");async function am(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,It(e)),{theme:n,themeVariables:d}=p();Jn(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,m=a.height/2+f*2,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=_t(e,{}),B=S.ellipse(0,0,u*2,m*2,T);if(x=o.insert(()=>B,":first-child"),x.attr("class","basic label-container"),b)x.attr("style",b)}else x=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",m).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=m*2,W(e,x),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return N.ellipse(S,B,_,T)},e.intersect=function(S){return N.ellipse(e,u,m,S)},o}t(am,"usecaseEllipse");function nm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=_t(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let m=d.circle(0,0,c*2,u),x=a.insert(()=>m,":first-child");if(x.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")x.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")x.selectAll("path").attr("style",o);return W(e,x),e.intersect=function(b){return l.info("filledCircle intersect",e,{radius:c,point:b}),N.circle(e,c,b)},a}t(nm,"filledCircle");var dg=10,fg=10;async function lm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<dg)e.height=dg;if(e.width=(e?.width??0)-a-a/2,e.width<fg)e.width=fg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,m=u,x=[{x:0,y:-u},{x:m,y:-u},{x:m/2,y:0}],{cssStyles:b}=e,S=y.svg(c),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=oe(x),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,W(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(E){return l.info("Triangle intersect",e,x,E),N.polygon(e,x,E)},c}t(lm,"flippedTriangle");async function hm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),m=Math.max(f+u,e.height??0),x=m-u,b=Math.max(d*0.38,28),S=-m/2,T=[{x:-d/2,y:S},{x:-d/2+b,y:S},{x:-d/2+b,y:S+u},{x:d/2,y:S+u},{x:d/2,y:m/2},{x:-d/2,y:m/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((O)=>`L${O.x},${O.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let D=y.svg(o).path(B,_t(e,{}));if(v=o.insert(()=>D,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")W(e,v);else W(e,v,{width:d,height:m});let E=S+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${E-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(O){return N.polygon(e,T,O)},o}t(hm,"folder");function cm(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=Q(e);e.label="";let c=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,m=-1*f/2,x=y.svg(c),b=_t(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let S=x.rectangle(u,m,d,f,b),T=c.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);W(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return N.rect(e,_)},c}t(cm,"forkJoin");async function um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=15,a=10,c=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,It(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,m=u/2,x=m-Math.sqrt(Math.max(0,m**2-(f.height/2)**2)),b=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-b/2,y:-u/2},{x:b/2-m,y:-u/2},...Qe(-b/2+m,0,m,50,90,270),{x:b/2-m,y:u/2},{x:-b/2,y:u/2}],v=oe(_),E=T.path(v,B),O=d.insert(()=>E,":first-child");if(O.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")O.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")O.selectChildren("path").attr("style",s);return W(e,O),e.intersect=function(D){return l.info("Pill intersect",e,{radius:m,point:D}),N.polygon(e,_,D)},d}t(um,"halfRoundedRectangle");var Jk=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let E=(e.height??0)/o;e.width=(e?.width??0)-2*E-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:m}=await X(r,e,It(e)),x=(e?.height?e?.height:m.height)+d,b=x/o,S=(e?.width?e?.width:m.width)+2*b+f,T=[{x:b,y:0},{x:S-b,y:0},{x:S,y:-x/2},{x:S-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),E=_t(e,{}),O=Jk(0,0,S,x,b),D=v.path(O,E);if(B=u.insert(()=>D,":first-child").attr("transform",`translate(${-S/2}, ${x/2})`),_)B.attr("style",_)}else B=tr(u,S,x,T);if(s)B.attr("style",s);return e.width=S,e.height=x,W(e,B),e.intersect=function(v){return N.polygon(e,T,v)},u}t(dm,"hexagon");async function fm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,It(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=_t(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],m=oe(u),x=d.path(m,f),b=o.insert(()=>x,":first-child");if(b.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")b.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")b.selectChildren("path").attr("style",s);return b.attr("transform",`translate(${-a/2}, ${-c/2})`),W(e,b),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),N.polygon(e,u,S)},o}t(fm,"hourglass");async function pm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=e.pos==="t",b=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ve(e),_=-S/2,v=-b/2,E=e.label?8:0,O=y.svg(f),D=_t(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let K=O.rectangle(_,v,S,b,D),Z=Math.max(S,u.width),tt=b+u.height+E,ot=O.rectangle(-Z/2,-tt/2,Z,tt,{...D,fill:"transparent",stroke:"none"}),ut=f.insert(()=>K,":first-child"),ct=f.insert(()=>ot);if(e.icon){let at=f.append("g");at.html(`<g>${await dr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let P=at.node().getBBox(),{width:U,height:et,x:R,y:ht}=P;at.attr("transform",`translate(${-U/2-R},${x?u.height/2+E/2-et/2-ht:-u.height/2-E/2-et/2-ht})`),at.attr("style",`color: ${B.get("stroke")??T};`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-tt/2:tt/2-u.height})`),ut.attr("transform",`translate(0,${x?u.height/2+E/2:-u.height/2-E/2})`),W(e,ct),e.intersect=function(at){if(l.info("iconSquare intersect",e,at),!e.label)return N.rect(e,at);let P=e.x??0,U=e.y??0,et=e.height??0,R=[];if(x)R=[{x:P-u.width/2,y:U-et/2},{x:P+u.width/2,y:U-et/2},{x:P+u.width/2,y:U-et/2+u.height+E},{x:P+S/2,y:U-et/2+u.height+E},{x:P+S/2,y:U+et/2},{x:P-S/2,y:U+et/2},{x:P-S/2,y:U-et/2+u.height+E},{x:P-u.width/2,y:U-et/2+u.height+E}];else R=[{x:P-S/2,y:U-et/2},{x:P+S/2,y:U-et/2},{x:P+S/2,y:U-et/2+b},{x:P+u.width/2,y:U-et/2+b},{x:P+u.width/2/2,y:U+et/2},{x:P-u.width/2,y:U+et/2},{x:P-u.width/2,y:U-et/2+b},{x:P-S/2,y:U-et/2+b}];return N.polygon(e,R,at)},f}t(pm,"icon");async function gm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:m}=await X(r,e,"icon-shape default"),x=20,b=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ve(e),v=y.svg(f),E=_t(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let O=_.get("fill");E.stroke=O??B;let D=f.append("g");if(e.icon)D.html(`<g>${await dr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let K=D.node().getBBox(),{width:Z,height:tt,x:ot,y:ut}=K,ct=Math.max(Z,tt)*Math.SQRT2+x*2,at=v.circle(0,0,ct,E),P=Math.max(ct,u.width),U=ct+u.height+b,et=v.rectangle(-P/2,-U/2,P,U,{...E,fill:"transparent",stroke:"none"}),R=f.insert(()=>at,":first-child"),ht=f.insert(()=>et);return D.attr("transform",`translate(${-Z/2-ot},${S?u.height/2+b/2-tt/2-ut:-u.height/2-b/2-tt/2-ut})`),D.attr("style",`color: ${_.get("stroke")??T};`),m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-U/2:U/2-u.height})`),R.attr("transform",`translate(0,${S?u.height/2+b/2:-u.height/2-b/2})`),W(e,ht),e.intersect=function(lt){return l.info("iconSquare intersect",e,lt),N.rect(e,lt)},f}t(gm,"iconCircle");async function mm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,O=-S/2,D=e.label?8:0,K=y.svg(f),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let tt=v.get("fill");Z.stroke=tt??_;let ot=K.path(Ae(E,O,T,S,5),Z),ut=Math.max(T,u.width),ct=S+u.height+D,at=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),P=f.insert(()=>ot,":first-child").attr("class","icon-shape2"),U=f.insert(()=>at);if(e.icon){let et=f.append("g");et.html(`<g>${await dr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let R=et.node().getBBox(),{width:ht,height:lt,x:Bt,y:vt}=R;et.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+D/2-lt/2-vt:-u.height/2-D/2-lt/2-vt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),P.attr("transform",`translate(0,${b?u.height/2+D/2:-u.height/2-D/2})`),W(e,U),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let R=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:R-u.width/2,y:ht-lt/2},{x:R+u.width/2,y:ht-lt/2},{x:R+u.width/2,y:ht-lt/2+u.height+D},{x:R+T/2,y:ht-lt/2+u.height+D},{x:R+T/2,y:ht+lt/2},{x:R-T/2,y:ht+lt/2},{x:R-T/2,y:ht-lt/2+u.height+D},{x:R-u.width/2,y:ht-lt/2+u.height+D}];else Bt=[{x:R-T/2,y:ht-lt/2},{x:R+T/2,y:ht-lt/2},{x:R+T/2,y:ht-lt/2+S},{x:R+u.width/2,y:ht-lt/2+S},{x:R+u.width/2/2,y:ht+lt/2},{x:R-u.width/2,y:ht+lt/2},{x:R-u.width/2,y:ht-lt/2+S},{x:R-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,et)},f}t(mm,"iconRounded");async function ym(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=Q(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:m,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+m*2,T=n+m*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,O=-S/2,D=e.label?8:0,K=y.svg(f),Z=_t(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let tt=v.get("fill");Z.stroke=tt??_;let ot=K.path(Ae(E,O,T,S,0.1),Z),ut=Math.max(T,u.width),ct=S+u.height+D,at=K.rectangle(-ut/2,-ct/2,ut,ct,{...Z,fill:"transparent",stroke:"none"}),P=f.insert(()=>ot,":first-child"),U=f.insert(()=>at);if(e.icon){let et=f.append("g");et.html(`<g>${await dr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let R=et.node().getBBox(),{width:ht,height:lt,x:Bt,y:vt}=R;et.attr("transform",`translate(${-ht/2-Bt},${b?u.height/2+D/2-lt/2-vt:-u.height/2-D/2-lt/2-vt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-ct/2:ct/2-u.height})`),P.attr("transform",`translate(0,${b?u.height/2+D/2:-u.height/2-D/2})`),W(e,U),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return N.rect(e,et);let R=e.x??0,ht=e.y??0,lt=e.height??0,Bt=[];if(b)Bt=[{x:R-u.width/2,y:ht-lt/2},{x:R+u.width/2,y:ht-lt/2},{x:R+u.width/2,y:ht-lt/2+u.height+D},{x:R+T/2,y:ht-lt/2+u.height+D},{x:R+T/2,y:ht+lt/2},{x:R-T/2,y:ht+lt/2},{x:R-T/2,y:ht-lt/2+u.height+D},{x:R-u.width/2,y:ht-lt/2+u.height+D}];else Bt=[{x:R-T/2,y:ht-lt/2},{x:R+T/2,y:ht-lt/2},{x:R+T/2,y:ht-lt/2+S},{x:R+u.width/2,y:ht-lt/2+S},{x:R+u.width/2/2,y:ht+lt/2},{x:R-u.width/2,y:ht+lt/2},{x:R-u.width/2,y:ht-lt/2+S},{x:R-T/2,y:ht-lt/2+S}];return N.polygon(e,Bt,et)},f}t(ym,"iconSquare");async function xm(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:c}=Q(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:m,bbox:x,label:b}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(m),E=_t(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let O=v.rectangle(T,B,f,u,E),D=Math.max(f,x.width),K=u+x.height+_,Z=v.rectangle(-D/2,-K/2,D,K,{...E,fill:"none",stroke:"none"}),tt=m.insert(()=>O,":first-child"),ot=m.insert(()=>Z);if(e.img){let ut=m.append("image");ut.attr("href",e.img),ut.attr("width",f),ut.attr("height",u),ut.attr("preserveAspectRatio","none"),ut.attr("transform",`translate(${-f/2},${S?K/2-u:-K/2})`)}return b.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${S?-u/2-x.height/2-_/2:u/2-x.height/2+_/2})`),tt.attr("transform",`translate(0,${S?x.height/2+_/2:-x.height/2-_/2})`),W(e,ot),e.intersect=function(ut){if(l.info("iconSquare intersect",e,ut),!e.label)return N.rect(e,ut);let ct=e.x??0,at=e.y??0,P=e.height??0,U=[];if(S)U=[{x:ct-x.width/2,y:at-P/2},{x:ct+x.width/2,y:at-P/2},{x:ct+x.width/2,y:at-P/2+x.height+_},{x:ct+f/2,y:at-P/2+x.height+_},{x:ct+f/2,y:at+P/2},{x:ct-f/2,y:at+P/2},{x:ct-f/2,y:at-P/2+x.height+_},{x:ct-x.width/2,y:at-P/2+x.height+_}];else U=[{x:ct-f/2,y:at-P/2},{x:ct+f/2,y:at-P/2},{x:ct+f/2,y:at-P/2+u},{x:ct+x.width/2,y:at-P/2+u},{x:ct+x.width/2/2,y:at+P/2},{x:ct-x.width/2,y:at+P/2},{x:ct-x.width/2,y:at-P/2+u},{x:ct-f/2,y:at-P/2+u}];return N.polygon(e,U,ut)},m}t(xm,"imageSquare");async function Cm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),m=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Cm,"inv_trapezoid");async function bm(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),W(e,a),e.intersect=function(d){return N.rect(e,d)},i}t(bm,"labelRect");async function km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(km,"lean_left");async function wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(wm,"lean_right");function Sm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),m=_t(e,{});if(e.look!=="handDrawn")m.roughness=0,m.fillStyle="solid";let x=oe(f),b=u.path(x,m),S=o.insert(()=>b,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${c/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),N.polygon(e,f,T)},o}t(Sm,"lightningBolt");var t1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),e1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),r1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),pg=10,gg=10;async function Tm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<gg)e.width=gg;let E=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-E*3,e.height<pg)e.height=pg}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+a*2,m=u/2,x=m/(2.5+u/50),b=(e?.height?e?.height:d.height)+x+c*2,S=b*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=e1(0,0,u,b,m,x,S),E=r1(0,x,u,b,m,x),O=_t(e,{}),D=_.path(v,O),K=_.path(E,O);if(n.insert(()=>K,":first-child").attr("class","line"),T=n.insert(()=>D,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=t1(0,0,u,b,m,x,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",ue(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-u/2}, ${-(b/2+x)})`),W(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(_){let v=N.rect(e,_),E=v.x-(e.x??0);if(m!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let O=x*x*(1-E*E/(m*m));if(O>0)O=Math.sqrt(O);if(O=x-O,_.y-(e.y??0)>0)O=-O;v.y+=O}return v},n}t(Tm,"linedCylinder");async function Bm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let O=e.width;if(e.width=(O??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,m=(e?.height?e?.height:d.height)+(c??0)*2,x=e.look==="neo"?m/4:m/8,b=m+x,{cssStyles:S}=e,T=y.svg(n),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:b/2},...kr(-u/2-u/2*0.1,b/2,u/2+u/2*0.1,b/2,x,0.8),{x:u/2+u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2,y:-b/2},{x:-u/2,y:b/2*1.1},{x:-u/2,y:-b/2}],v=T.polygon(_.map((O)=>[O.x,O.y]),B),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return E.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-m/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,E),e.intersect=function(O){return N.polygon(e,_,O)},n}t(Bm,"linedWaveEdgedRect");var i1=56,Vh=72,mg=8,yg=2,o1=8,s1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},xg=Math.PI/3,Cg=0.6,Kh=t((r,e)=>{let i=e*Cg,s=e*Math.sqrt(1-Cg**2),o=Math.cos(xg),a=-Math.sin(xg),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),a1={normal:Kh(-24,12),hollow:Kh(-23,9),awesome:Kh(-21,13),icon:"M 12 -8 L 26 -26"},bg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),yc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,_t(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),n1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,_t(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var l1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",a1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Fo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=Q(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,It(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:m,themeVariables:x}=p();Jn(n,e.colorIndex,m,x.borderColorArray);let b,S;if(e.stereotype){let tt=await $r(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=tt.label.attr("class","label usecase-stereotype"),S=tt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${s1[i]}`).attr("style",a||null);await s(T,e),l1(T,e,i);let B=e.padding??o1,_=S?.height??0,v=Vh+mg+d.height+(S?_+yg:0),E=Math.max(i1,d.width,S?.width??0)+B*2,O=v+B*2,D=-v/2;T.attr("transform",`translate(0,${D+Vh/2})`);let K=D+Vh+mg;if(b&&S)K+=_/2,bg(b,S,K),K+=_/2+yg;bg(f,d,K+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-E/2).attr("y",-O/2).attr("width",E).attr("height",O).attr("opacity",0).attr("aria-hidden","true");return W(e,Z),e.intersect=(tt)=>N.rect(e,tt),n}t(Fo,"renderUsecaseActor");var h1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function _m(r,e){return Fo(r,e,"normal",(i,s)=>{yc(i,s,h1,"usecase-actor-stick")})}t(_m,"usecaseActor");var c1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function vm(r,e){return Fo(r,e,"awesome",(i,s)=>{yc(i,s,c1,"usecase-actor-awesome-silhouette")})}t(vm,"usecaseActorAwesome");var u1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Lm(r,e){return Fo(r,e,"hollow",(i,s)=>{n1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),yc(i,s,u1,"usecase-actor-hollow-body",!0)})}t(Lm,"usecaseActorHollow");var di=52,kg=42,wg=-2,d1=t(async(r,e)=>{let i=-di/2,s=wg-di/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,di,di,_t(e,{}));r.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",di).attr("height",di).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Fs(o.includes(":")?o:`fa:${o}`),c=await dr(o,{height:kg,width:kg,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${wg-d.height/2-d.y})`)},"drawIconActor");async function Fm(r,e){return Fo(r,e,"icon",d1)}t(Fm,"usecaseActorIcon");var Sg=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Mm(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,It(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:m}=p();Jn(c,e.colorIndex,u,m.borderColorArray);let x,b;if(i.stereotype){let P=await $r(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=P.label.attr("class","label usecase-stereotype"),b=P.bbox}let S=b?2:0,T=n.height+(b?.height??0)+S,B=Math.max(n.width,b?.width??0),_=d??10,v=B/2+_*2,E=T/2+_*2,O=Math.min(Math.max(_/5,1),_/2),D=B/2+O,K=v-O,Z=D/v,tt=K/v,ot=E*Math.sqrt(Math.max(0,1-Z*Z)),ut=-E*Math.sqrt(Math.max(0,1-tt*tt));if(x&&b)Sg(x,b,-T/2+b.height/2);Sg(f,n,T/2-n.height/2);let ct;if(e.look==="handDrawn"){let U=y.svg(c).ellipse(0,0,v*2,E*2,_t(e,{}));ct=c.insert(()=>U,":first-child").attr("class","basic label-container usecase-business-ellipse")}else ct=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",E).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${D} ${ot} L ${K} ${ut}`).attr("fill","none").attr("style",o||null);let at=i.accessibleName??i.label;if(at)c.attr("role","img").attr("aria-label",at);return W(e,ct),e.calcIntersect=(P,U)=>N.ellipse(P,P.width/2,P.height/2,U),e.intersect=(P)=>N.ellipse(e,v,E,P),c}t(Mm,"usecaseBusiness");var Zh=8,Tg=4,f1=1,Qh=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),p1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:f1},"numericStrokeWidth");async function Am(r,e){let i=e,{labelStyles:s,nodeStyles:o}=Q(e),{stylesMap:a}=Ve(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let P of i.jsonRows??[]){let U=await $r(f,P.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),et=await $r(f,P.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:U.label.attr("class","label usecase-json-key"),bbox:U.bbox},value:{label:et.label.attr("class","label usecase-json-value"),bbox:et.bbox}})}let m=Math.max(0,...u.map(({key:P})=>P.bbox.width))+Zh*2,x=Math.max(0,...u.map(({value:P})=>P.bbox.width))+Zh*2,b=n.width+Zh*2,S=Math.max(b,m+x),T=x+Math.max(0,S-m-x),B=n.height+Tg*2,_=u.map(({key:P,value:U})=>Math.max(P.bbox.height,U.bbox.height)+Tg*2),v=B+_.reduce((P,U)=>P+U,0),E=p1(a.get("stroke-width")),O=S+E*2,D=v+E*2,K=-S/2,Z=-v/2,tt=e.look==="handDrawn"?y.svg(c):void 0,ot=tt?_t(e,{}):void 0,ut=t((P,U,et,R,ht,lt)=>{if(tt&&ot){let Bt=tt.rectangle(et,R,ht,lt,ot);return P.insert(()=>Bt,":first-child").attr("class",U)}return P.insert("rect",":first-child").attr("class",U).attr("x",et).attr("y",R).attr("width",ht).attr("height",lt).attr("style",o)},"insertCell"),ct=ut(c,"label-container usecase-json-border",-O/2,-D/2,O,D);ut(f,"usecase-json-cell usecase-json-title-cell",K,Z,S,B),f.node()?.append(d.node()),Qh(d,n,0,Z+B/2);let at=Z+B;return u.forEach(({key:P,value:U},et)=>{let R=_[et],ht=f.append("g").attr("class","usecase-json-row").attr("data-row-index",et).attr("transform",`translate(0,${at})`);ut(ht,"usecase-json-cell usecase-json-key-cell",K,0,m,R),ut(ht,"usecase-json-cell usecase-json-value-cell",K+m,0,T,R),ht.node()?.append(P.label.node(),U.label.node()),Qh(P.label,P.bbox,K+m/2,R/2),Qh(U.label,U.bbox,K+m+T/2,R/2),at+=R}),W(e,ct),e.intersect=(P)=>N.rect(e,P),c}t(Am,"usecaseJsonTable");async function Em(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),m=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,b=m-2*n,S=x-2*n,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),E=_t(e,{}),O=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+b-n,y:B+S+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B+S-n},{x:T+b+n,y:B+S-n},{x:T+b+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],D=[{x:T,y:B+n},{x:T+b-n,y:B+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B},{x:T,y:B}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let K=oe(O),Z=v.path(K,E),tt=oe(D),ot=v.path(tt,E);if(e.look!=="handDrawn")Z=hc(Z),ot=hc(ot);let ut=d.insert("g",":first-child");if(ut.insert(()=>Z),ut.insert(()=>ot),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),W(e,ut),e.intersect=function(ct){return N.polygon(e,O,ct)},d}t(Em,"multiRect");async function $m(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let m=Math.max(a.width,e?.width??0)+d*2,x=Math.max(a.height,e?.height??0)+f*3,b=e.look==="neo"?x/4:x/8,S=x+(u?b/2:-b/2),T=-m/2,B=-S/2,_=10,{cssStyles:v}=e,E=kr(T-_,B+S+_,T+m-_,B+S+_,b,0.8),O=E?.[E.length-1],D=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...E,{x:T+m-_,y:O.y-_},{x:T+m,y:O.y-_},{x:T+m,y:O.y-2*_},{x:T+m+_,y:O.y-2*_},{x:T+m+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],K=[{x:T,y:B+_},{x:T+m-_,y:B+_},{x:T+m-_,y:O.y-_},{x:T+m,y:O.y-_},{x:T+m,y:B},{x:T,y:B}],Z=y.svg(o),tt=_t(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let ot=oe(D),ut=Z.path(ot,tt),ct=oe(K),at=Z.path(ct,tt),P=o.insert(()=>ut,":first-child");if(P.insert(()=>at),P.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")P.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return P.attr("transform",`translate(0,${-b/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-b-(a.y-(a.top??0))})`),W(e,P),e.intersect=function(U){return N.polygon(e,D,U)},o}t($m,"multiWaveEdgedRectangle");async function Im(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);if(e.labelStyle=s,!(e.useHtmlLabels||Ht(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=-f/2,x=-u/2,{cssStyles:b}=e,S=y.svg(c),T=_t(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(m,x,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),b&&e.look!=="handDrawn")_.selectAll("path").attr("style",b);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return N.rect(e,v)},c}t(Im,"note");var g1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Om(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,It(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],m,{cssStyles:x}=e;if(e.look==="handDrawn"){let b=y.svg(o),S=_t(e,{}),T=g1(0,0,d),B=b.path(T,S);if(m=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)m.attr("style",x)}else m=tr(o,d,d,u),m.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)m.attr("style",s);return W(e,m),e.calcIntersect=function(b,S){let T=b.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return N.polygon(b,B,S)},e.intersect=function(b){return this.calcIntersect(e,b)},o}t(Om,"question");async function Dm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=d.width+(e.look==="neo"?a*2:a),m=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),x=m/4,S=-Math.max(u,(e.width??0)-x)/2,T=-m/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,E=y.svg(n),O=_t(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let D=oe(_),K=E.path(D,O),Z=n.insert(()=>K,":first-child");if(Z.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Z.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-B/2},0)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,Z),e.intersect=function(tt){return N.polygon(e,_,tt)},n}t(Dm,"rect_left_inv_arrow");async function Pm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await Ne(n,f,e.labelStyle,!0,!0),m={width:0,height:0};if(Ht(p())){let tt=u.children[0],ot=h(u);m=tt.getBoundingClientRect(),ot.attr("width",m.width),ot.attr("height",m.height)}l.info("Text 2",d);let x=d||[],b=u.getBBox(),S=await Ne(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),T=S.children[0],B=h(S);m=T.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+_+5)+")"),h(u).attr("transform","translate( "+(m.width<b.width?0:-(b.width-m.width)/2)+", 0)"),m=n.node().getBBox(),n.attr("transform","translate("+-m.width/2+", "+(-m.height/2-_+3)+")");let v=m.width+(e.padding||0),E=m.height+(e.padding||0),O=-m.width/2-_,D=-m.height/2-_,K,Z;if(e.look==="handDrawn"){let tt=y.svg(a),ot=_t(e,{}),ut=tt.path(Ae(O,D,v,E,e.rx||0),ot),ct=tt.line(-m.width/2-_,-m.height/2-_+b.height+_,m.width/2+_,-m.height/2-_+b.height+_,ot);Z=a.insert(()=>(l.debug("Rough node insert CXC",ut),ct),":first-child"),K=a.insert(()=>(l.debug("Rough node insert CXC",ut),ut),":first-child")}else K=c.insert("rect",":first-child"),Z=c.insert("line"),K.attr("class","outer title-state").attr("style",s).attr("x",-m.width/2-_).attr("y",-m.height/2-_).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-m.width/2-_).attr("x2",m.width/2+_).attr("y1",-m.height/2-_+b.height+_).attr("y2",-m.height/2-_+b.height+_);return W(e,K),e.intersect=function(tt){return N.rect(e,tt)},a}t(Pm,"rectWithTitle");async function Rm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return mi(r,e,o)}t(Rm,"roundedRect");var Er=8;async function qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,m=f-Er,x=u,b=Er-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=_t(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:b,y:S},{x:b+m,y:S},{x:b+m,y:S+x},{x:b-Er,y:S+x},{x:b-Er,y:S},{x:b,y:S},{x:b,y:S+x}],E=B.polygon(v.map((D)=>[D.x,D.y]),_),O=c.insert(()=>E,":first-child");if(O.attr("class","basic label-container outer-path").attr("style",ue(T)),s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,O),e.intersect=function(D){return N.rect(e,D)},c}t(qm,"shadedProcess");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+a*2,m=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,b=m/1.5,S=-x/2,T=-b/2,{cssStyles:B}=e,_=y.svg(n),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=[{x:S,y:T},{x:S,y:T+b},{x:S+x,y:T+b},{x:S+x,y:T-b/2}],O=oe(E),D=_.path(O,v),K=n.insert(()=>D,":first-child");if(K.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")K.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")K.selectChildren("path").attr("style",s);return K.attr("transform",`translate(0, ${b/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-b/4+(e.padding??0)-(d.y-(d.top??0))})`),W(e,K),e.intersect=function(Z){return N.polygon(e,E,Z)},n}t(Wm,"slopedRect");async function Nm(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await mi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=p();Jn(c,e.colorIndex,n,d.borderColorArray)}return c}t(Nm,"squareRect");var dc=50,m1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(dc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function zm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),{w:f,h:u}=m1(d,a,c),m=u/2,{cssStyles:x}=e,b=y.svg(n),S=_t(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+m,y:-u/2},{x:f/2-m,y:-u/2},...Qe(-f/2+m,0,m,dc,90,270),{x:f/2-m,y:u/2},...Qe(f/2-m,0,m,dc,270,450)],B=oe(T),_=b.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(E){return N.polygon(e,T,E)},n}t(zm,"stadium");async function Hm(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return mi(r,e,i)}t(Hm,"state");function Ym(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),m=y.svg(u),x=_t(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let b=m.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=m.circle(0,0,T,{...x,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>b,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",E=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${E})`)}return W(e,_),e.intersect=function(v){return N.circle(e,(e.width??0)/2,v)},u}t(Ym,"stateEnd");function jm(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,Pd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return W(e,c),e.intersect=function(n){return N.circle(e,(e.width??7)/2,n)},a}t(jm,"stateStart");var fi=8;async function Um(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.width+2*fi+a,e.width??0),u=Math.max(d.height+c,e.height??0),m=f-2*fi,x=u,b=-f/2,S=-u/2,T=[{x:0,y:0},{x:m,y:0},{x:m,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=_t(e,{}),v=B.rectangle(b,S,m+16,x,_),E=B.line(b+fi,S,b+fi,S+x,_),O=B.line(b+fi+m,S,b+fi+m,S+x,_);n.insert(()=>E,":first-child"),n.insert(()=>O,":first-child");let D=n.insert(()=>v,":first-child"),{cssStyles:K}=e;D.attr("class","basic label-container").attr("style",ue(K)),W(e,D)}else{let B=tr(n,m,x,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return N.polygon(e,T,B)},n}t(Um,"subroutine");var Jh=0.2;async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-Jh*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.height?e?.height:d.height)+c*2,u=Jh*f,m=Jh*f,b=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),E=_t(e,{}),O=[{x:T-u/2,y:B},{x:T+b+u/2,y:B},{x:T+b+u/2,y:B+S},{x:T-u/2,y:B+S}],D=[{x:T+b-u/2,y:B+S},{x:T+b+u/2,y:B+S},{x:T+b+u/2,y:B+S-m}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let K=oe(O),Z=v.path(K,E),tt=oe(D),ot=v.path(tt,{...E,fillStyle:"solid"}),ut=n.insert(()=>ot,":first-child");if(ut.insert(()=>Z,":first-child"),ut.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ut.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ut.selectAll("path").attr("style",s);return W(e,ut),e.intersect=function(ct){return N.polygon(e,O,ct)},n}t(Xm,"taggedRect");async function Gm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,m=0.2*d,x=d+f,{cssStyles:b}=e,S=y.svg(o),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:x/2},...kr(-n/2-n/2*0.1,x/2,n/2+n/2*0.1,x/2,f,0.8),{x:n/2+n/2*0.1,y:-x/2},{x:-n/2-n/2*0.1,y:-x/2}],_=-n/2+n/2*0.1,v=-x/2-m*0.4,E=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-m},{x:_+n,y:(v+d)*0.9},...kr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],O=oe(B),D=S.path(O,T),K=oe(E),Z=S.path(K,{...T,fillStyle:"solid"}),tt=o.insert(()=>Z,":first-child");if(tt.insert(()=>D,":first-child"),tt.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")tt.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),W(e,tt),e.intersect=function(ot){return N.polygon(e,B,ot)},o}t(Gm,"taggedWaveEdgedRectangle");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,It(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),W(e,u),e.intersect=function(m){return N.rect(e,m)},o}t(Vm,"text");var y1=t((r,e,i,s,o,a)=>`M${r},${e}
231
231
  a${o},${a} 0,0,1 0,${-s}
232
232
  l${i},0
233
233
  a${o},${a} 0,0,1 0,${s}
234
234
  M${i},${-s}
235
235
  a${o},${a} 0,0,0 0,${s}
236
- l${-i},0`,"createCylinderPathD"),B1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),_1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function iy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=Math.max(e.height??0,d.height)+a,m=u/2,x=m/(2.5+u/50),b=Math.max(e.width??0,d.width)+x+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=B1(0,0,b,u,x,m),v=_1(0,0,b,u,x,m),F=B.path(_,vt(e,{})),I=B.path(v,vt(e,{fill:"none"}));if(T=n.insert(()=>I,":first-child"),T=n.insert(()=>F,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=T1(0,0,b,u,x,m);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",ue(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",x),T.attr("transform",`translate(${-b/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,T),e.intersect=function(B){let _=N.rect(e,B),v=_.y-(e.y??0);if(m!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-x)){let F=x*x*(1-v*v/(m*m));if(F!=0)F=Math.sqrt(Math.abs(F));if(F=x-F,B.x-(e.x??0)>0)F=-F;_.x+=F}return _},n}t(iy,"tiltedCylinder");async function oy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(oy,"trapezoid");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:b}=e,S=y.svg(f),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-m/2*0.8,y:-x/2},{x:m/2*0.8,y:-x/2},{x:m/2,y:-x/2*0.6},{x:m/2,y:x/2},{x:-m/2,y:x/2},{x:-m/2,y:-x/2*0.6}],_=oe(B),v=S.path(_,T),F=f.insert(()=>v,":first-child");if(F.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")F.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},f}t(sy,"trapezoidalPentagon");var vg=10,Lg=10;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<Lg)e.width=Lg;if(e.height=e?.height??0,e.height<vg)e.height=vg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=$r(p().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,m=e?.height?e?.height:u+n.height,x=m,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=oe(b),v=T.path(_,B),F=c.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")F.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")F.selectChildren("path").attr("style",s);return e.width=u,e.height=m,W(e,F),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(I){return l.info("Triangle intersect",e,b,I),N.polygon(e,b,I)},c}t(ay,"triangle");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,Dt(e)),m=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,b=e.look==="neo"?x/4:x/8,S=x+(n?b:-b),{cssStyles:T}=e,_=14-m,v=_>0?_/2:0,F=y.svg(d),I=vt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let O=[{x:-m/2-v,y:S/2},...kr(-m/2-v,S/2,m/2+v,S/2,b,0.8),{x:m/2+v,y:-S/2},{x:-m/2-v,y:-S/2}],K=oe(O),Z=F.path(K,I),rt=d.insert(()=>Z,":first-child");if(rt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")rt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")rt.selectAll("path").attr("style",s);return rt.attr("transform",`translate(0,${-b/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-b-(f.y-(f.top??0))})`),W(e,rt),e.intersect=function(st){return N.polygon(e,O,st)},d}t(ny,"waveEdgedRectangle");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let I=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-I*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,m=u/8,x=u+m*2,{cssStyles:b}=e,S=y.svg(n),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:x/2},...kr(-f/2,x/2,f/2,x/2,m,1),{x:f/2,y:-x/2},...kr(f/2,-x/2,-f/2,-x/2,m,-1)],_=oe(B),v=S.path(_,T),F=n.insert(()=>v,":first-child");if(F.attr("class","basic label-container"),b&&e.look!=="handDrawn")F.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")F.selectAll("path").attr("style",s);return W(e,F),e.intersect=function(I){return N.polygon(e,B,I)},n}t(ly,"waveRectangle");var pe=10;async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-pe,10),e.height=Math.max((e?.height??0)-a*2-pe,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,Dt(e)),f=(e?.width?e?.width:n.width)+o*2+pe,u=(e?.height?e?.height:n.height)+a*2+pe,m=f-pe,x=u-pe,b=-m/2,S=-x/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{}),v=[{x:b-pe,y:S-pe},{x:b-pe,y:S+x},{x:b+m,y:S+x},{x:b+m,y:S-pe}],F=`M${b-pe},${S-pe} L${b+m},${S-pe} L${b+m},${S+x} L${b-pe},${S+x} L${b-pe},${S-pe}
237
- M${b-pe},${S} L${b+m},${S}
238
- M${b},${S-pe} L${b},${S+x}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let I=B.path(F,_),O=c.insert(()=>I,":first-child");if(O.attr("transform",`translate(${pe/2}, ${pe/2})`),O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")O.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")O.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+pe/2-(n.x-(n.left??0))}, ${-(n.height/2)+pe/2-(n.y-(n.top??0))})`),W(e,O),e.intersect=function(K){return N.polygon(e,v,K)},c}t(hy,"windowPane");var Fg=new Set(["redux-color","redux-dark-color"]),v1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:It}=C(),{background:zt}=It,Kt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${zt}`]};await xc(r,Kt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:b,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let It={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(Kn(e.label,f)+It.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let zt=await mi(r,e,It);if(s!=null&&Fg.has(s)){let Kt=i.colorIndex??0;zt.attr("data-color-id",`color-${Kt%d.length}`)}if(!$r(f.htmlLabels)){let Kt=zt.select("text"),Ut=Kt.node()?.getBBox();Kt.attr("transform",`translate(${-Ut.width/2}, 0)`)}return zt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=Dt(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],b);_.height+=m;let v=0,F=[],I=[],O=0,K=0,Z=0,rt=0,st=!0,ut=!0;for(let It of i.attributes){let zt=await pi(B,It.type,f,0,v,["attribute-type"],b);O=Math.max(O,zt.width+u);let Kt=await pi(B,It.name,f,0,v,["attribute-name"],b);K=Math.max(K,Kt.width+u);let Ut=await pi(B,It.keys.join(),f,0,v,["attribute-keys"],b);Z=Math.max(Z,Ut.width+u);let le=await pi(B,It.comment,f,0,v,["attribute-comment"],b);rt=Math.max(rt,le.width+u);let ne=Math.max(zt.height,Kt.height,Ut.height,le.height)+m;I.push({yOffset:v,rowHeight:ne}),v+=ne}let ct=4;if(Z<=u)st=!1,Z=0,ct--;if(rt<=u)ut=!1,rt=0,ct--;let nt=B.node().getBBox();if(_.width+u*2-(O+K+Z+rt)>0){let It=_.width+u*2-(O+K+Z+rt);if(O+=It/ct,K+=It/ct,Z>0)Z+=It/ct;if(rt>0)rt+=It/ct}let D=O+K+Z+rt,U=y.svg(B),it=vt(e,{});if(e.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let P=0;if(I.length>0)P=I.reduce((It,zt)=>It+(zt?.rowHeight??0),0);let ht=Math.max(nt.width+u*2,e?.width||0,D),lt=Math.max((P??0)+_.height,e?.height||0),Bt=-ht/2,At=-lt/2;if(B.selectAll("g:not(:first-child)").each((It,zt,Kt)=>{let Ut=h(Kt[zt]),le=Ut.attr("transform"),ne=0,er=0;if(le){let ze=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);if(ze){if(ne=parseFloat(ze[1]),er=parseFloat(ze[2]),Ut.attr("class").includes("attribute-name"))ne+=O;else if(Ut.attr("class").includes("attribute-keys"))ne+=O+K;else if(Ut.attr("class").includes("attribute-comment"))ne+=O+K+Z}}Ut.attr("transform",`translate(${Bt+u/2+ne}, ${er+At+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(At+m/2)+")"),s!=null&&Fg.has(s)){let It=i.colorIndex??0;B.attr("data-color-id",`color-${It%d.length}`)}let Gt=U.rectangle(Bt,At,ht,lt,it),Vt=B.insert(()=>Gt,":first-child").attr("class","outer-path").attr("style",x.join(""));F.push(0);for(let[It,zt]of I.entries()){let Ut=(It+1)%2===0&&zt.yOffset!==0,le=U.rectangle(Bt,_.height+At+zt?.yOffset,ht,zt?.rowHeight,{...it,fill:Ut?a:c,stroke:n});B.insert(()=>le,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ut?"even":"odd"}`)}let Qt=0.0001,Jt=gi(Bt,_.height+At,ht+Bt,_.height+At,Qt),Pt=U.polygon(Jt.map((It)=>[It.x,It.y]),it);if(B.insert(()=>Pt).attr("class","divider"),Jt=gi(O+Bt,_.height+At,O+Bt,lt+At,Qt),Pt=U.polygon(Jt.map((It)=>[It.x,It.y]),it),B.insert(()=>Pt).attr("class","divider"),st){let It=O+K+Bt;Jt=gi(It,_.height+At,It,lt+At,Qt),Pt=U.polygon(Jt.map((zt)=>[zt.x,zt.y]),it),B.insert(()=>Pt).attr("class","divider")}if(ut){let It=O+K+Z+Bt;Jt=gi(It,_.height+At,It,lt+At,Qt),Pt=U.polygon(Jt.map((zt)=>[zt.x,zt.y]),it),B.insert(()=>Pt).attr("class","divider")}for(let It of F){let zt=_.height+At+It;Jt=gi(Bt,zt,ht+Bt,zt,Qt),Pt=U.polygon(Jt.map((Kt)=>[Kt.x,Kt.y]),it),B.insert(()=>Pt).attr("class","divider")}if(W(e,Vt),S&&e.look!=="handDrawn")if(s!=null&&v1.has(s))B.selectAll("path").attr("style",S);else{let zt=S.split(";")?.filter((Kt)=>Kt.includes("stroke"))?.map((Kt)=>`${Kt}`).join("; ");B.selectAll("path").attr("style",zt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(It){return N.rect(e,It)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==fo(e))e=fo(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let d=n.node().appendChild(await ln(n,e,{width:Kn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let u=d.children[0];u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if($r(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(gi,"lineToPolygon");async function cy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",Dt(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,x=0,b=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Lo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Lo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();x=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let F=await Lo(f,v,T,[v.parseClassifier()]);T+=F+a}if(b=f.node().getBBox().height,b<=0)b=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let F=await Lo(u,v,B,[v.parseClassifier()]);B+=F+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+x+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+x+(b?b+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(cy,"textHelper");async function Lo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:$r(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(_t(n))c=!0;let d=await ln(o,Uo($a(n)),{width:Kn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes("&gt")){if(m.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],x=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Lo,"addText");async function uy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??$r(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:x}=await cy(r,e,i,f,d);Yn(m,e.colorIndex,s,c);let{labelStyles:b,nodeStyles:S}=Q(e);e.labelStyle=b,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let F=Math.max(e.width??0,x.width),I=Math.max(e.height??0,x.height),O=(e.height??0)>x.height;if(u.members.length===0&&u.methods.length===0)I+=d;else if(u.members.length>0&&u.methods.length===0)I+=d*2;let K=-F/2,Z=-I/2,rt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(O)rt=n*2;let st=_.rectangle(K-n,Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),F+2*n,I+2*n+rt,v),ut=m.insert(()=>st,":first-child");ut.attr("class","basic label-container outer-path");let ct=ut.node().getBBox(),nt=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,D=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,U=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,it=(nt+D+Z+n-(Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((P,ht,lt)=>{let Bt=h(lt[ht]),At=Bt.attr("transform"),Gt=0;if(At){let Pt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(At);if(Pt)Gt=parseFloat(Pt[2])}let Vt=Gt+Z+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Jt=Math.max(U,d/2);if(O)Vt=Math.max(it,nt+D+Jt+Z+d*2+n)+d*2;else Vt=nt+D+Jt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Vt=Gt-d;else Vt=Gt;if(!f)Vt-=4;let Qt=K;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))Qt=-Bt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Jt,Pt,It){if(window.getComputedStyle(It[Pt]).textAnchor==="middle")Qt=0});Bt.attr("transform",`translate(${Qt}, ${Vt})`)}),u.members.length>0||u.methods.length>0||B){let P=nt+D+Z+n,ht=_.line(ct.x,P,ct.x+ct.width,P+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let P=nt+D+U+Z+d*2+n,ht=_.line(ct.x,O?Math.max(it,P):P,ct.x+ct.width,(O?Math.max(it,P):P)+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ut.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let P=RegExp(/color\s*:\s*([^;]*)/),ht=P.exec(T);if(ht){let lt=ht[0].replace("color","fill");m.selectAll("tspan").attr("style",lt)}else if(b){let lt=P.exec(b);if(lt){let Bt=lt[0].replace("color","fill");m.selectAll("tspan").attr("style",Bt)}}}return W(e,ut),e.intersect=function(P){return N.rect(e,P)},m}t(uy,"classBox");async function dy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=Dt(e),u=p(),{themeVariables:m}=u,{borderColorArray:x,requirementEdgeLabelBackground:b}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ze(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Ze(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let ct=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=ct;let nt=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=nt;let D=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=D,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let ct=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=ct,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let F=(T.node()?.getBBox().width??200)+c,I=(T.node()?.getBBox().height??200)+c,O=-F/2,K=-I/2,Z=y.svg(T),rt=vt(e,{});if(e.look!=="handDrawn")rt.roughness=0,rt.fillStyle="solid";let st=Z.rectangle(O,K,F,I,rt),ut=T.insert(()=>st,":first-child");if(ut.attr("class","basic label-container outer-path").attr("style",s),x?.length){let ct=e.colorIndex??0;T.attr("data-color-id",`color-${ct%x.length}`)}if(T.selectAll(".label").each((ct,nt,D)=>{let U=h(D[nt]),it=U.attr("transform"),P=0,ht=0;if(it){let Gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(it);if(Gt)P=parseFloat(Gt[1]),ht=parseFloat(Gt[2])}let lt=ht-I/2,Bt=O+c/2;if(nt===0||nt===1)Bt=P;U.attr("transform",`translate(${Bt}, ${lt+c})`)}),_>B+v+n){let ct=K+B+v+n,nt;if(e.look==="neo"){let it=[[O,ct],[O+F,ct],[O+F,ct+0.001],[O,ct+0.001]];nt=Z.polygon(it,rt)}else nt=Z.line(O,ct,O+F,ct,rt);T.insert(()=>nt).attr("class","divider")}if(W(e,ut),e.intersect=function(ct){return N.rect(e,ct)},s&&e.look!=="handDrawn"&&(b||x?.length))T.selectAll("path").attr("style",s);return T}t(dy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await ln(a,Uo($a(e)),{width:Kn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ze,"addText");var L1=t((r)=>{switch(r){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 fy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,Dt(e)),u=e.padding||10,m="",x;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),x=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(x)({label:S,bbox:T}=await Ir(x,"ticket"in e&&e.ticket||"",b));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",b));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",b);e.width=c;let v=10,F=e?.width||0,I=Math.max(T.height,_.height)/2,O=Math.max(d.height+v*2,e?.height||0)+I,K=-F/2,Z=-O/2;f.attr("transform","translate("+(u-F/2)+", "+(-I-d.height/2)+")"),S.attr("transform","translate("+(u-F/2)+", "+(-I+d.height/2)+")"),B.attr("transform","translate("+(u+F/2-_.width-2*a)+", "+(-I+d.height/2)+")");let rt,{rx:st,ry:ut}=e,{cssStyles:ct}=e;if(e.look==="handDrawn"){let nt=y.svg(n),D=vt(e,{}),U=st||ut?nt.path(Me(K,Z,F,O,st||0),D):nt.rectangle(K,Z,F,O,D);rt=n.insert(()=>U,":first-child"),rt.attr("class","basic label-container").attr("style",ct?ct:null)}else{rt=n.insert("rect",":first-child"),rt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",st??5).attr("ry",ut??5).attr("x",K).attr("y",Z).attr("width",F).attr("height",O);let nt="priority"in e&&e.priority;if(nt){let D=n.append("line"),U=K+2,it=Z+Math.floor((st??0)/2),P=Z+O-Math.floor((st??0)/2);D.attr("x1",U).attr("y1",it).attr("x2",U).attr("y2",P).attr("stroke-width","4").attr("stroke",L1(nt))}}return W(e,rt),e.height=O,e.intersect=function(nt){return N.rect(e,nt)},n}t(fy,"kanbanItem");async function py(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,x=a.width+20,b=a.height+20,S=Math.max(d,x),T=Math.max(f,b);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
236
+ l${-i},0`,"createCylinderPathD"),x1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),C1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function Km(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Bg)e.height=Bg}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<_g)e.width=_g}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=Math.max(e.height??0,d.height)+a,m=u/2,x=m/(2.5+u/50),b=Math.max(e.width??0,d.width)+x+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=x1(0,0,b,u,x,m),v=C1(0,0,b,u,x,m),E=B.path(_,_t(e,{})),O=B.path(v,_t(e,{fill:"none"}));if(T=n.insert(()=>O,":first-child"),T=n.insert(()=>E,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=y1(0,0,b,u,x,m);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",ue(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",x),T.attr("transform",`translate(${-b/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,T),e.intersect=function(B){let _=N.rect(e,B),v=_.y-(e.y??0);if(m!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-x)){let E=x*x*(1-v*v/(m*m));if(E!=0)E=Math.sqrt(Math.abs(E));if(E=x-E,B.x-(e.x??0)>0)E=-E;_.x+=E}return _},n}t(Km,"tiltedCylinder");async function Zm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),m=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=_t(e,{}),B=oe(m),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,m);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return N.polygon(e,m,S)},n}t(Zm,"trapezoid");async function Qm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,It(e)),m=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:b}=e,S=y.svg(f),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-m/2*0.8,y:-x/2},{x:m/2*0.8,y:-x/2},{x:m/2,y:-x/2*0.6},{x:m/2,y:x/2},{x:-m/2,y:x/2},{x:-m/2,y:-x/2*0.6}],_=oe(B),v=S.path(_,T),E=f.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")E.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return W(e,E),e.intersect=function(O){return N.polygon(e,B,O)},f}t(Qm,"trapezoidalPentagon");var vg=10,Lg=10;async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<Lg)e.width=Lg;if(e.height=e?.height??0,e.height<vg)e.height=vg}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=zr(p().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,m=e?.height?e?.height:u+n.height,x=m,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-m}],{cssStyles:S}=e,T=y.svg(c),B=_t(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=oe(b),v=T.path(_,B),E=c.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")E.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return e.width=u,e.height=m,W(e,E),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(O){return l.info("Triangle intersect",e,b,O),N.polygon(e,b,O)},c}t(Jm,"triangle");async function ty(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),m=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,b=e.look==="neo"?x/4:x/8,S=x+(n?b:-b),{cssStyles:T}=e,_=14-m,v=_>0?_/2:0,E=y.svg(d),O=_t(e,{});if(e.look!=="handDrawn")O.roughness=0,O.fillStyle="solid";let D=[{x:-m/2-v,y:S/2},...kr(-m/2-v,S/2,m/2+v,S/2,b,0.8),{x:m/2+v,y:-S/2},{x:-m/2-v,y:-S/2}],K=oe(D),Z=E.path(K,O),tt=d.insert(()=>Z,":first-child");if(tt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")tt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-b/2})`),u.attr("transform",`translate(${-m/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-b-(f.y-(f.top??0))})`),W(e,tt),e.intersect=function(ot){return N.polygon(e,D,ot)},d}t(ty,"waveEdgedRectangle");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let O=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-O*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,m=u/8,x=u+m*2,{cssStyles:b}=e,S=y.svg(n),T=_t(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:x/2},...kr(-f/2,x/2,f/2,x/2,m,1),{x:f/2,y:-x/2},...kr(f/2,-x/2,-f/2,-x/2,m,-1)],_=oe(B),v=S.path(_,T),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container"),b&&e.look!=="handDrawn")E.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return W(e,E),e.intersect=function(O){return N.polygon(e,B,O)},n}t(ey,"waveRectangle");var fe=10;async function ry(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-fe,10),e.height=Math.max((e?.height??0)-a*2-fe,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width?e?.width:n.width)+o*2+fe,u=(e?.height?e?.height:n.height)+a*2+fe,m=f-fe,x=u-fe,b=-m/2,S=-x/2,{cssStyles:T}=e,B=y.svg(c),_=_t(e,{}),v=[{x:b-fe,y:S-fe},{x:b-fe,y:S+x},{x:b+m,y:S+x},{x:b+m,y:S-fe}],E=`M${b-fe},${S-fe} L${b+m},${S-fe} L${b+m},${S+x} L${b-fe},${S+x} L${b-fe},${S-fe}
237
+ M${b-fe},${S} L${b+m},${S}
238
+ M${b},${S-fe} L${b},${S+x}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let O=B.path(E,_),D=c.insert(()=>O,":first-child");if(D.attr("transform",`translate(${fe/2}, ${fe/2})`),D.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")D.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+fe/2-(n.x-(n.left??0))}, ${-(n.height/2)+fe/2-(n.y-(n.top??0))})`),W(e,D),e.intersect=function(K){return N.polygon(e,v,K)},c}t(ry,"windowPane");var Fg=new Set(["redux-color","redux-dark-color"]),b1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:Et}=C(),{background:Nt}=Et,Vt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Nt}`]};await xc(r,Vt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,m=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:b,nodeStyles:S}=Q(e);if(i.attributes.length===0&&e.label){let Et={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(Vn(e.label,f)+Et.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Nt=await mi(r,e,Et);if(s!=null&&Fg.has(s)){let Vt=i.colorIndex??0;Nt.attr("data-color-id",`color-${Vt%d.length}`)}if(!zr(f.htmlLabels)){let Vt=Nt.select("text"),jt=Vt.node()?.getBBox();Vt.attr("transform",`translate(${-jt.width/2}, 0)`)}return Nt}if(!f.htmlLabels)u*=1.25,m*=1.25;let T=It(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await pi(B,e.label??"",f,0,0,["name"],b);_.height+=m;let v=0,E=[],O=[],D=0,K=0,Z=0,tt=0,ot=!0,ut=!0;for(let Et of i.attributes){let Nt=await pi(B,Et.type,f,0,v,["attribute-type"],b);D=Math.max(D,Nt.width+u);let Vt=await pi(B,Et.name,f,0,v,["attribute-name"],b);K=Math.max(K,Vt.width+u);let jt=await pi(B,Et.keys.join(),f,0,v,["attribute-keys"],b);Z=Math.max(Z,jt.width+u);let le=await pi(B,Et.comment,f,0,v,["attribute-comment"],b);tt=Math.max(tt,le.width+u);let ne=Math.max(Nt.height,Vt.height,jt.height,le.height)+m;O.push({yOffset:v,rowHeight:ne}),v+=ne}let ct=4;if(Z<=u)ot=!1,Z=0,ct--;if(tt<=u)ut=!1,tt=0,ct--;let at=B.node().getBBox();if(_.width+u*2-(D+K+Z+tt)>0){let Et=_.width+u*2-(D+K+Z+tt);if(D+=Et/ct,K+=Et/ct,Z>0)Z+=Et/ct;if(tt>0)tt+=Et/ct}let P=D+K+Z+tt,U=y.svg(B),et=_t(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let R=0;if(O.length>0)R=O.reduce((Et,Nt)=>Et+(Nt?.rowHeight??0),0);let ht=Math.max(at.width+u*2,e?.width||0,P),lt=Math.max((R??0)+_.height,e?.height||0),Bt=-ht/2,vt=-lt/2;if(B.selectAll("g:not(:first-child)").each((Et,Nt,Vt)=>{let jt=h(Vt[Nt]),le=jt.attr("transform"),ne=0,er=0;if(le){let ze=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);if(ze){if(ne=parseFloat(ze[1]),er=parseFloat(ze[2]),jt.attr("class").includes("attribute-name"))ne+=D;else if(jt.attr("class").includes("attribute-keys"))ne+=D+K;else if(jt.attr("class").includes("attribute-comment"))ne+=D+K+Z}}jt.attr("transform",`translate(${Bt+u/2+ne}, ${er+vt+_.height+m/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(vt+m/2)+")"),s!=null&&Fg.has(s)){let Et=i.colorIndex??0;B.attr("data-color-id",`color-${Et%d.length}`)}let Xt=U.rectangle(Bt,vt,ht,lt,et),Gt=B.insert(()=>Xt,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(let[Et,Nt]of O.entries()){let jt=(Et+1)%2===0&&Nt.yOffset!==0,le=U.rectangle(Bt,_.height+vt+Nt?.yOffset,ht,Nt?.rowHeight,{...et,fill:jt?a:c,stroke:n});B.insert(()=>le,"g.label").attr("style",x.join("")).attr("class",`row-rect-${jt?"even":"odd"}`)}let Qt=0.0001,Jt=gi(Bt,_.height+vt,ht+Bt,_.height+vt,Qt),Ot=U.polygon(Jt.map((Et)=>[Et.x,Et.y]),et);if(B.insert(()=>Ot).attr("class","divider"),Jt=gi(D+Bt,_.height+vt,D+Bt,lt+vt,Qt),Ot=U.polygon(Jt.map((Et)=>[Et.x,Et.y]),et),B.insert(()=>Ot).attr("class","divider"),ot){let Et=D+K+Bt;Jt=gi(Et,_.height+vt,Et,lt+vt,Qt),Ot=U.polygon(Jt.map((Nt)=>[Nt.x,Nt.y]),et),B.insert(()=>Ot).attr("class","divider")}if(ut){let Et=D+K+Z+Bt;Jt=gi(Et,_.height+vt,Et,lt+vt,Qt),Ot=U.polygon(Jt.map((Nt)=>[Nt.x,Nt.y]),et),B.insert(()=>Ot).attr("class","divider")}for(let Et of E){let Nt=_.height+vt+Et;Jt=gi(Bt,Nt,ht+Bt,Nt,Qt),Ot=U.polygon(Jt.map((Vt)=>[Vt.x,Vt.y]),et),B.insert(()=>Ot).attr("class","divider")}if(W(e,Gt),S&&e.look!=="handDrawn")if(s!=null&&b1.has(s))B.selectAll("path").attr("style",S);else{let Nt=S.split(";")?.filter((Vt)=>Vt.includes("stroke"))?.map((Vt)=>`${Vt}`).join("; ");B.selectAll("path").attr("style",Nt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(Et){return N.rect(e,Et)},B}t(xc,"erBox");async function pi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==mo(e))e=mo(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;");let d=n.node().appendChild(await dn(n,e,{width:Vn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let u=d.children[0];u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=d.getBBox();if(zr(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let m=h(d);f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return f}t(pi,"addText");function gi(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(gi,"lineToPolygon");async function iy(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",It(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,m=0,x=0,b=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await Lo(n,{text:`«${v}»`},0),m=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Lo(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();x=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let E=await Lo(f,v,T,[v.parseClassifier()]);T+=E+a}if(b=f.node().getBBox().height,b<=0)b=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let E=await Lo(u,v,B,[v.parseClassifier()]);B+=E+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${m})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${m+x+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${m+x+(b?b+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(iy,"textHelper");async function Lo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:zr(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(St(n))c=!0;let d=await dn(o,Uo(za(n)),{width:Vn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let m=d.children[0];if(d.textContent===""||d.textContent.includes("&gt")){if(m.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" ")m.textContent=m.textContent[0]+" "+m.textContent.substring(1)}if(m.textContent==="undefined")m.textContent="";f=d.getBBox()}else{let m=d.children[0],x=h(d);if(u=m.innerHTML.split("<br>").length,m.innerHTML.includes("</math>"))u+=m.innerHTML.split("<mrow>").length-1;await fc(m),f=m.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t(Lo,"addText");async function oy(r,e){let i=p(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??zr(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:m,bbox:x}=await iy(r,e,i,f,d);Jn(m,e.colorIndex,s,c);let{labelStyles:b,nodeStyles:S}=Q(e);e.labelStyle=b,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(m),v=_t(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=Math.max(e.width??0,x.width),O=Math.max(e.height??0,x.height),D=(e.height??0)>x.height;if(u.members.length===0&&u.methods.length===0)O+=d;else if(u.members.length>0&&u.methods.length===0)O+=d*2;let K=-E/2,Z=-O/2,tt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(D)tt=n*2;let ot=_.rectangle(K-n,Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),E+2*n,O+2*n+tt,v),ut=m.insert(()=>ot,":first-child");ut.attr("class","basic label-container outer-path");let ct=ut.node().getBBox(),at=m.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,P=m.select(".label-group").node().getBBox().height-(B?n/2:0)||0,U=m.select(".members-group").node().getBBox().height-(B?n/2:0)||0,et=(at+P+Z+n-(Z-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(m.selectAll(".text").each((R,ht,lt)=>{let Bt=h(lt[ht]),vt=Bt.attr("transform"),Xt=0;if(vt){let Ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(vt);if(Ot)Xt=parseFloat(Ot[2])}let Gt=Xt+Z+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(Bt.attr("class").includes("methods-group")){let Jt=Math.max(U,d/2);if(D)Gt=Math.max(et,at+P+Jt+Z+d*2+n)+d*2;else Gt=at+P+Jt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Gt=Xt-d;else Gt=Xt;if(!f)Gt-=4;let Qt=K;if(Bt.attr("class").includes("label-group")||Bt.attr("class").includes("annotation-group"))Qt=-Bt.node()?.getBBox().width/2||0,m.selectAll("text").each(function(Jt,Ot,Et){if(window.getComputedStyle(Et[Ot]).textAnchor==="middle")Qt=0});Bt.attr("transform",`translate(${Qt}, ${Gt})`)}),u.members.length>0||u.methods.length>0||B){let R=at+P+Z+n,ht=_.line(ct.x,R,ct.x+ct.width,R+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let R=at+P+U+Z+d*2+n,ht=_.line(ct.x,D?Math.max(et,R):R,ct.x+ct.width,(D?Math.max(et,R):R)+0.001,v);m.insert(()=>ht).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")m.selectAll("path").attr("style",T);if(ut.select(":nth-child(2)").attr("style",T),m.selectAll(".divider").select("path").attr("style",T),e.labelStyle)m.selectAll("span").attr("style",e.labelStyle);else m.selectAll("span").attr("style",T);if(!f){let R=RegExp(/color\s*:\s*([^;]*)/),ht=R.exec(T);if(ht){let lt=ht[0].replace("color","fill");m.selectAll("tspan").attr("style",lt)}else if(b){let lt=R.exec(b);if(lt){let Bt=lt[0].replace("color","fill");m.selectAll("tspan").attr("style",Bt)}}}return W(e,ut),e.intersect=function(R){return N.rect(e,R)},m}t(oy,"classBox");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=It(e),u=p(),{themeVariables:m}=u,{borderColorArray:x,requirementEdgeLabelBackground:b}=m,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ze(T,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle);else B=await Ze(T,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let ct=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=ct;let at=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=at;let P=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=P,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let ct=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=ct,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let E=(T.node()?.getBBox().width??200)+c,O=(T.node()?.getBBox().height??200)+c,D=-E/2,K=-O/2,Z=y.svg(T),tt=_t(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let ot=Z.rectangle(D,K,E,O,tt),ut=T.insert(()=>ot,":first-child");if(ut.attr("class","basic label-container outer-path").attr("style",s),x?.length){let ct=e.colorIndex??0;T.attr("data-color-id",`color-${ct%x.length}`)}if(T.selectAll(".label").each((ct,at,P)=>{let U=h(P[at]),et=U.attr("transform"),R=0,ht=0;if(et){let Xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(et);if(Xt)R=parseFloat(Xt[1]),ht=parseFloat(Xt[2])}let lt=ht-O/2,Bt=D+c/2;if(at===0||at===1)Bt=R;U.attr("transform",`translate(${Bt}, ${lt+c})`)}),_>B+v+n){let ct=K+B+v+n,at;if(e.look==="neo"){let et=[[D,ct],[D+E,ct],[D+E,ct+0.001],[D,ct+0.001]];at=Z.polygon(et,tt)}else at=Z.line(D,ct,D+E,ct,tt);T.insert(()=>at).attr("class","divider")}if(W(e,ut),e.intersect=function(ct){return N.rect(e,ct)},s&&e.look!=="handDrawn"&&(b||x?.length))T.selectAll("path").attr("style",s);return T}t(sy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=p(),n=c.htmlLabels??!0,d=await dn(a,Uo(za(e)),{width:Vn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let m of u.children)if(s)m.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let m of u.children)m.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],m=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ze,"addText");var k1=t((r)=>{switch(r){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 ay(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=Q(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=e.padding||10,m="",x;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)m=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),x=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank");let b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(x)({label:S,bbox:T}=await $r(x,"ticket"in e&&e.ticket||"",b));else({label:S,bbox:T}=await $r(n,"ticket"in e&&e.ticket||"",b));let{label:B,bbox:_}=await $r(n,"assigned"in e&&e.assigned||"",b);e.width=c;let v=10,E=e?.width||0,O=Math.max(T.height,_.height)/2,D=Math.max(d.height+v*2,e?.height||0)+O,K=-E/2,Z=-D/2;f.attr("transform","translate("+(u-E/2)+", "+(-O-d.height/2)+")"),S.attr("transform","translate("+(u-E/2)+", "+(-O+d.height/2)+")"),B.attr("transform","translate("+(u+E/2-_.width-2*a)+", "+(-O+d.height/2)+")");let tt,{rx:ot,ry:ut}=e,{cssStyles:ct}=e;if(e.look==="handDrawn"){let at=y.svg(n),P=_t(e,{}),U=ot||ut?at.path(Ae(K,Z,E,D,ot||0),P):at.rectangle(K,Z,E,D,P);tt=n.insert(()=>U,":first-child"),tt.attr("class","basic label-container").attr("style",ct?ct:null)}else{tt=n.insert("rect",":first-child"),tt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",ot??5).attr("ry",ut??5).attr("x",K).attr("y",Z).attr("width",E).attr("height",D);let at="priority"in e&&e.priority;if(at){let P=n.append("line"),U=K+2,et=Z+Math.floor((ot??0)/2),R=Z+D-Math.floor((ot??0)/2);P.attr("x1",U).attr("y1",et).attr("x2",U).attr("y2",R).attr("stroke-width","4").attr("stroke",k1(at))}}return W(e,tt),e.height=D,e.intersect=function(at){return N.rect(e,at)},n}t(ay,"kanbanItem");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:m}=e,x=a.width+20,b=a.height+20,S=Math.max(d,x),T=Math.max(f,b);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
239
239
  a${u},${u} 1 0,0 ${S*0.25},${-1*T*0.1}
240
240
  a${u},${u} 1 0,0 ${S*0.25},0
241
241
  a${u},${u} 1 0,0 ${S*0.25},0
@@ -253,7 +253,7 @@ ${o.join(`
253
253
  a${u},${u} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
254
254
  a${u*0.8},${u*0.8} 1 0,0 0,${-1*T*0.34}
255
255
  a${u},${u} 1 0,0 ${S*0.1},${-1*T*0.33}
256
- H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),F=vt(e,{}),I=v.path(_,F);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",ue(m))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),W(e,B),e.calcIntersect=function(v,F){return N.rect(v,F)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(py,"bang");async function gy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,m=0.25*d,x=0.35*d,b=0.2*d,{cssStyles:S}=e,T,B=`M0 0
256
+ H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),E=_t(e,{}),O=v.path(_,E);B=o.insert(()=>O,":first-child"),B.attr("class","basic label-container").attr("style",ue(m))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),W(e,B),e.calcIntersect=function(v,E){return N.rect(v,E)},e.intersect=function(v){return l.info("Bang intersect",e,v),N.rect(e,v)},o}t(ny,"bang");async function ly(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,m=0.25*d,x=0.35*d,b=0.2*d,{cssStyles:S}=e,T,B=`M0 0
257
257
  a${u},${u} 0 0,1 ${d*0.25},${-1*d*0.1}
258
258
  a${x},${x} 1 0,1 ${d*0.4},${-1*d*0.1}
259
259
  a${m},${m} 1 0,1 ${d*0.35},${d*0.2}
@@ -267,7 +267,7 @@ ${o.join(`
267
267
 
268
268
  a${u},${u} 1 0,1 ${-1*d*0.1},${-1*f*0.35}
269
269
  a${b},${b} 1 0,1 ${d*0.1},${-1*f*0.65}
270
- H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=vt(e,{}),F=_.path(B,v);T=o.insert(()=>F,":first-child"),T.attr("class","basic label-container").attr("style",ue(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-d/2}, ${-f/2})`),W(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(gy,"cloud");async function my(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,Dt(e)),d=a.width+8*c,f=a.height+2*c,u=5,m=e.look==="neo"?`
270
+ H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=_t(e,{}),E=_.path(B,v);T=o.insert(()=>E,":first-child"),T.attr("class","basic label-container").attr("style",ue(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-d/2}, ${-f/2})`),W(e,T),e.calcIntersect=function(_,v){return N.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),N.rect(e,_)},o}t(ly,"cloud");async function hy(r,e){let{labelStyles:i,nodeStyles:s}=Q(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+8*c,f=a.height+2*c,u=5,m=e.look==="neo"?`
271
271
  M${-d/2} ${f/2-u}
272
272
  v${-f+2*u}
273
273
  q0,-${u} ${u},-${u}
@@ -287,16 +287,16 @@ ${o.join(`
287
287
  h${-(d-2*u)}
288
288
  q${-u},0 ${-u},${-u}
289
289
  Z
290
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let x=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,x),e.calcIntersect=function(b,S){return N.rect(b,S)},e.intersect=function(b){return N.rect(e,b)},o}t(my,"defaultMindmapNode");async function yy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(yy,"mindmapCircle");var F1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Gm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:jm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Vm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Jm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:hm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:cm},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:mm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:qg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:em},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Ug},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:lm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:py},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:gy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Cm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:oy},{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:_m},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:dm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ry},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Gg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Um},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Qm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ym},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:om},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:sm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:am},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Mm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ny},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:xm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:iy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Am},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:um},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ay},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:hy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Xm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Wm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:qm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Rg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:im},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ey},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ty},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ly},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Hm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Em}],M1=t(()=>{let e=[...Object.entries({state:Km,choice:Qg,note:Nm,composite:tm,rectWithTitle:Ym,labelRect:vm,block_arrow:jg,collapsedGroup:zg,iconSquare:Tm,iconCircle:wm,icon:km,iconRounded:Sm,imageSquare:Bm,anchor:Dg,kanbanItem:fy,mindmapCircle:yy,defaultMindmapNode:my,classBox:uy,erBox:xc,requirementBox:dy,usecaseActor:$m,usecaseActorHollow:Om,usecaseActorAwesome:Im,usecaseActorIcon:Dm,usecaseBusiness:Pm,usecaseEllipse:fm,usecaseJsonTable:Rm}),...F1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Uu=M1();function nc(r){return r in Uu}t(nc,"isValidShape");var ma=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),la=new Map;async function fa(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?Uu[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",ue(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(fa,"insertNode");var nA=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),rA=t(()=>{la.clear()},"clear"),jr=t((r)=>{let e=la.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var A1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:x,backgroundStyles:b}=Q(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Yn(S,e.colorIndex,s,d);let T=$r(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await ln(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),F=v.getBBox();if(T){let it=v.children[0],P=h(v);F=it.getBoundingClientRect(),P.attr("width",F.width),P.attr("height",F.height)}let I=e.padding??0,O=e.width<=F.width+I?F.width+I:e.width;if(e.width<=F.width+I)e.diff=(O-e.width)/2-I;else e.diff=-I;let K=e.height,Z=e.y-K/2,rt=e.y+K/2,st=e.x-O/2,ut=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+K/3,ct=B?4:0,nt=F.height+2*ct,D,U;if(B){let it=Math.max(nt,F.height+2*ct),P=st+it,ht=Math.max(0,O-it);if(e.look==="handDrawn"){let At=y.svg(S),Gt=vt(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Vt=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Qt=At.rectangle(st,Z,it,K,Gt);D=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let Jt=At.rectangle(P,Z,ht,K,Vt);U=S.insert(()=>Jt,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",st).attr("y",Z).attr("width",it).attr("height",K).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",P).attr("y",Z).attr("width",ht).attr("height",K).attr("fill","none").attr("stroke",f);let lt=st+it/2,Bt=e.y;_.attr("transform",`translate(${lt}, ${Bt}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{let it=Math.max(0,ut-Z),P=Math.min(nt,it),ht=Z+P,lt=Math.max(0,rt-ht),Bt=e.x-O/2;if(e.look==="handDrawn"){let Vt=y.svg(S),Qt=vt(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Jt=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Pt=Vt.rectangle(Bt,Z,O,P,Qt);D=S.insert(()=>Pt,":first-child").attr("class","swimlane-title");let It=Vt.rectangle(Bt,ht,O,lt,Jt);U=S.insert(()=>It,":first-child").attr("class","swimlane-body"),D.select("path:nth-child(2)").attr("style",x.join(";")),D.select("path").attr("style",b.join(";").replace("fill","stroke"))}else D=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",m).attr("x",Bt).attr("y",Z).attr("width",O).attr("height",P).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",Bt).attr("y",ht).attr("width",O).attr("height",lt).attr("fill","none").attr("stroke",f);let At=e.x-F.width/2,Gt=Z+(P-F.height)/2;_.attr("transform",`translate(${At}, ${Gt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let it=_.select("span");if(it)it.attr("style",u)}return e.offsetX=0,e.width=O,e.height=K,e.offsetY=F.height-I/2,e.intersect=function(it){return Je(e,it)},{cluster:S,labelBBox:F}},"swimlane"),xy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:x}=Q(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Yn(b,e.colorIndex,s,d);let S=qt(i),T=b.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await ln(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await Ne(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(qt(i)){let st=B.children[0],ut=h(B);_=st.getBoundingClientRect(),ut.attr("width",_.width),ut.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let F=e.height,I=e.x-v/2,O=e.y-F/2;l.trace("Data ",e,JSON.stringify(e));let K;if(e.look==="handDrawn"){let st=y.svg(b),ut=vt(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),ct=st.path(Me(I,O,v,F,0),ut);K=b.insert(()=>(l.debug("Rough node insert CXC",ct),ct),":first-child"),K.select("path:nth-child(2)").attr("style",m.join(";")),K.select("path").attr("style",x.join(";").replace("fill","stroke"))}else K=b.insert("rect",":first-child"),K.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",I).attr("y",O).attr("width",v).attr("height",F);let{subGraphTitleTopMargin:Z}=ma(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),f){let st=T.select("span");if(st)st.attr("style",f)}let rt=K.node().getBBox();return e.offsetX=0,e.width=rt.width,e.height=rt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(st){return Je(e,st)},{cluster:b,labelBBox:_}},"rect"),E1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),$1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Yn(m,e.colorIndex,s,n);let x=m.insert("g",":first-child"),b=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await Ne(b,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(qt(i)){let ct=T.children[0],nt=h(T);B=ct.getBoundingClientRect(),nt.attr("width",B.width),nt.attr("height",B.height)}let _=0*e.padding,v=_/2,F=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(F-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height+_,O=e.height+_-B.height-6,K=e.x-F/2,Z=e.y-I/2;e.width=F;let rt=e.y-e.height/2-v+B.height+2,st;if(e.look==="handDrawn"){let ct=e.cssClasses.includes("statediagram-cluster-alt"),nt=y.svg(m),D=e.rx||e.ry?nt.path(Me(K,Z,F,I,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):nt.rectangle(K,Z,F,I,{seed:a});st=m.insert(()=>D,":first-child");let U=nt.rectangle(K,rt,F,O,{fill:ct?c:d,fillStyle:ct?"hachure":"solid",stroke:u,seed:a});st=m.insert(()=>D,":first-child"),S=m.insert(()=>U),st.attr("class","outer"),S.attr("class","inner")}else{st=x.insert("rect",":first-child");let ct="outer";st.attr("class",ct).attr("x",K).attr("y",Z).attr("width",F).attr("height",I).attr("data-look",e.look),S.attr("class","inner").attr("x",K).attr("y",rt).attr("width",F).attr("height",O)}b.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(qt(i)?0:3)})`);let ut=st.node().getBBox();return e.height=ut.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(ct){return Je(e,ct)},{cluster:m,labelBBox:B}},"roundedWithTitle"),I1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=qt(i),b=m.insert("g").attr("class","cluster-label "),S=await ln(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),T=S.getBBox();if(qt(i)){let Z=S.children[0],rt=h(S);T=Z.getBoundingClientRect(),rt.attr("width",T.width),rt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,F=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let I;if(e.look==="handDrawn"){let Z=y.svg(m),rt=vt(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),st=Z.path(Me(v,F,B,_,e.rx),rt);I=m.insert(()=>(l.debug("Rough node insert CXC",st),st),":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=m.insert("rect",":first-child"),I.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",F).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:O}=ma(i);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+O})`),n){let Z=b.select("span");if(Z)Z.attr("style",n)}let K=I.node().getBBox();return e.offsetX=0,e.width=K.width,e.height=K.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Je(e,Z)},{cluster:m,labelBBox:T}},"kanbanSection"),O1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Yn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,x=e.width+m;e.diff=-e.padding;let b=e.height+m,S=e.x-x/2,T=e.y-b/2;e.width=x;let B;if(e.look==="handDrawn"){let F=y.svg(f).rectangle(S,T,x,b,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>F,":first-child").attr("class","divider")}else{B=u.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),D1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Yn(u,e.colorIndex,o,n);let m=qt(s),x=u.insert("g").attr("class","cluster-label"),b={width:0,height:0},S=e.label?.trim();if(S){let O;if(e.labelType==="markdown")O=await ln(x,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else O=await Ne(x,e.label,e.labelStyle||"",!1,!0);if(b=O.getBBox(),m){let K=O.children[0],Z=h(O);b=K.getBoundingClientRect(),Z.attr("width",b.width),Z.attr("height",b.height)}}let T=e.width<=b.width+e.padding?b.width+e.padding:e.width;if(e.width<=b.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,F;if(e.look==="handDrawn"){let O=y.svg(u),K=vt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=O.path(Me(_,v,T,B,i.rx),K);F=u.insert(()=>Z,":first-child"),F.select("path:nth-child(2)").attr("style",f.join(";"))}else if(F=u.insert("rect",":first-child"),F.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)F.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:O}=ma(s);if(x.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+O})`),d){let K=x.select("span");if(K)K.attr("style",d)}}let I=F.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=b.height-e.padding/2,e.intersect=function(O){return Je(e,O)},{cluster:u,labelBBox:b}},"createContainerGroup"),P1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return D1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),R1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),q1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ge(e),x=e.boundaryType||"rect",b=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${x} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",x).attr("data-look",e.look);Yn(b,e.colorIndex,s,d);let S=qt(i),T=b.insert("g").attr("class","cluster-label system-boundary-title"),B=await ln(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let D=B.children[0],U=h(B);_=D.getBoundingClientRect(),U.attr("width",_.width),U.attr("height",_.height)}let v=R1(e,_),{width:F,height:I,x:O,y:K,bodyY:Z,bodyHeight:rt,tabHeight:st,tabWidth:ut}=v;e.diff=e.width<=_.width+e.padding?(F-e.width)/2-e.padding:-e.padding;let ct=vt(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let D=y.svg(b),U=D.rectangle(O,Z,F,rt,ct);if(b.insert(()=>U,":first-child").attr("class","boundary-body label-container"),x==="package"){let it=D.rectangle(O,K,ut,st,ct);b.insert(()=>it,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(b.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",O).attr("y",Z).attr("width",F).attr("height",rt),x==="package")b.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",O).attr("y",K).attr("width",ut).attr("height",st);let{subGraphTitleTopMargin:nt}=ma(i);if(x==="package")T.attr("transform",`translate(${O+(ut-_.width)/2}, ${K+(st-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${K+nt})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=F,e.height=I,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(D){return Je(e,D)},{cluster:b,labelBBox:_}},"usecaseSystemBoundary"),W1=xy,N1={rect:xy,squareRect:W1,roundedWithTitle:$1,noteGroup:E1,divider:O1,kanbanSection:I1,flowGroup:P1,usecaseSystemBoundary:q1,swimlane:A1},z1=new Set(["noteGroup","divider"]),Zf=t((r)=>!z1.has(r??"rect"),"clusterPaintsTitle"),Cy=new Map,ho=t(async(r,e)=>{let i=e.shape||"rect",s=await N1[i](r,e);return Cy.set(e.id,s),s},"insertCluster"),aA=t(()=>{Cy=new Map},"clear");var Mo=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Ht={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},Rp={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ce(r),e=ce(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var ce=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),H1=t((r)=>({x:t(function(e,i,s){let o=0,a=ce(s[0]).x<ce(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:b,deltaX:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.cos(b)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:b,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.cos(b)*(S>=0?1:-1)}let c=Math.abs(ce(e).x-ce(s[s.length-1]).x),n=Math.abs(ce(e).y-ce(s[s.length-1]).y),d=Math.abs(ce(e).x-ce(s[0]).x),f=Math.abs(ce(e).y-ce(s[0]).y),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="right"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="right"?-1:1,o+=b}return ce(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ce(s[0]).y<ce(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Ht,r.arrowTypeStart)){let{angle:b,deltaY:S}=$o(s[0],s[1]);o=Ht[r.arrowTypeStart]*Math.abs(Math.sin(b))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Ht,r.arrowTypeEnd)){let{angle:b,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=Ht[r.arrowTypeEnd]*Math.abs(Math.sin(b))*(S>=0?1:-1)}let c=Math.abs(ce(e).y-ce(s[s.length-1]).y),n=Math.abs(ce(e).x-ce(s[s.length-1]).x),d=Math.abs(ce(e).y-ce(s[0]).y),f=Math.abs(ce(e).x-ce(s[0]).x),u=Ht[r.arrowTypeStart],m=Ht[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="up"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="up"?-1:1,o+=b}return ce(e).y+o},"y")}),"getLineFunctionsWithOffset"),Y1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)by(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)by(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),j1={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},arrow_hierarchy:{type:"hierarchy",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}},U1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],by=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=j1[i],f=d&&U1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,b=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${b}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(b);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((F)=>{if(F.setAttribute("stroke",n),d.fill)F.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${b})`)},"addEdgeMarker"),X1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),zs=new Map,Wt=new Map,oA=t(()=>{zs.clear(),Wt.clear()},"clear"),Xf=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),ga=t(async(r,e)=>{let i=p(),s=qt(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await ln(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let b=f.children[0],S=h(f);u=await hr.measure(()=>b.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let b=h(f).select("text").node();await hr.measure(()=>{if(u=f.getBBox(),b&&typeof b.getBBox==="function")m=b.getBBox();else m=u})}c.attr("transform",Mo(m,s)),zs.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startLeft=b,Io(x,e.startLabelLeft)}if(e.startLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).startRight=b,Io(x,e.startLabelRight)}if(e.endLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endLeft=b,Io(x,e.endLabelLeft)}if(e.endLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Wt.get(e.id))Wt.set(e.id,{});Wt.get(e.id).endRight=b,Io(x,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(qt(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var Us=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,zs.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=ma(s);if(r.label){let a=zs.get(r.id),{x:c,y:n}=r;if(i){let d=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Wt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Wt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Wt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Wt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),G1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),V1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),K1=t((r,e,i)=>{l.debug(`intersection calc abc89:
290
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let x=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",m);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,x),e.calcIntersect=function(b,S){return N.rect(b,S)},e.intersect=function(b){return N.rect(e,b)},o}t(hy,"defaultMindmapNode");async function cy(r,e){let i={padding:e.padding??0};return mc(r,e,i)}t(cy,"mindmapCircle");var w1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Nm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Rm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:zm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Um},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:im},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:hm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:qg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Gg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Hg},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:em},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ny},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ly},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Om},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:dm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:km},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Zm},{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:Cm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Vm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Yg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:jm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ym},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Zg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Qg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ty},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:um},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Km},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Tm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:om},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Jm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ry},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:nm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Qm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Wm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$m},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Em},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Rg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Kg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ey},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Dm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Bm}],S1=t(()=>{let e=[...Object.entries({state:Hm,choice:jg,note:Im,composite:Ug,rectWithTitle:Pm,labelRect:bm,block_arrow:zg,collapsedGroup:Ng,iconSquare:ym,iconCircle:gm,icon:pm,iconRounded:mm,imageSquare:xm,anchor:Dg,kanbanItem:ay,mindmapCircle:cy,defaultMindmapNode:hy,classBox:oy,erBox:xc,requirementBox:sy,usecaseActor:_m,usecaseActorHollow:Lm,usecaseActorAwesome:vm,usecaseActorIcon:Fm,usecaseBusiness:Mm,usecaseEllipse:am,usecaseJsonTable:Am}),...w1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Wu=S1();function lc(r){return r in Wu}t(lc,"isValidShape");var fa=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),la=new Map;async function ga(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?Wu[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",ue(e.look)),e.tooltip)o.attr("title",e.tooltip);if(la.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(ga,"insertNode");var cA=t((r,e)=>{la.set(e.id,r)},"setNodeElem"),uA=t(()=>{la.clear()},"clear"),qr=t((r)=>{let e=la.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var T1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:m,borderStyles:x,backgroundStyles:b}=Q(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);Jn(S,e.colorIndex,s,d);let T=zr(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await dn(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),E=v.getBBox();if(T){let et=v.children[0],R=h(v);E=et.getBoundingClientRect(),R.attr("width",E.width),R.attr("height",E.height)}let O=e.padding??0,D=e.width<=E.width+O?E.width+O:e.width;if(e.width<=E.width+O)e.diff=(D-e.width)/2-O;else e.diff=-O;let K=e.height,Z=e.y-K/2,tt=e.y+K/2,ot=e.x-D/2,ut=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+K/3,ct=B?4:0,at=E.height+2*ct,P,U;if(B){let et=Math.max(at,E.height+2*ct),R=ot+et,ht=Math.max(0,D-et);if(e.look==="handDrawn"){let vt=y.svg(S),Xt=_t(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Gt=_t(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Qt=vt.rectangle(ot,Z,et,K,Xt);P=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let Jt=vt.rectangle(R,Z,ht,K,Gt);U=S.insert(()=>Jt,":first-child").attr("class","swimlane-body"),P.select("path:nth-child(2)").attr("style",x.join(";")),P.select("path").attr("style",b.join(";").replace("fill","stroke"))}else P=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",m).attr("x",ot).attr("y",Z).attr("width",et).attr("height",K).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",R).attr("y",Z).attr("width",ht).attr("height",K).attr("fill","none").attr("stroke",f);let lt=ot+et/2,Bt=e.y;_.attr("transform",`translate(${lt}, ${Bt}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let et=Math.max(0,ut-Z),R=Math.min(at,et),ht=Z+R,lt=Math.max(0,tt-ht),Bt=e.x-D/2;if(e.look==="handDrawn"){let Gt=y.svg(S),Qt=_t(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Jt=_t(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Ot=Gt.rectangle(Bt,Z,D,R,Qt);P=S.insert(()=>Ot,":first-child").attr("class","swimlane-title");let Et=Gt.rectangle(Bt,ht,D,lt,Jt);U=S.insert(()=>Et,":first-child").attr("class","swimlane-body"),P.select("path:nth-child(2)").attr("style",x.join(";")),P.select("path").attr("style",b.join(";").replace("fill","stroke"))}else P=S.insert("rect",":first-child"),U=S.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",m).attr("x",Bt).attr("y",Z).attr("width",D).attr("height",R).attr("fill",c).attr("stroke",f),U.attr("class","swimlane-body").attr("style",m).attr("x",Bt).attr("y",ht).attr("width",D).attr("height",lt).attr("fill","none").attr("stroke",f);let vt=e.x-E.width/2,Xt=Z+(R-E.height)/2;_.attr("transform",`translate(${vt}, ${Xt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let et=_.select("span");if(et)et.attr("style",u)}return e.offsetX=0,e.width=D,e.height=K,e.offsetY=E.height-O/2,e.intersect=function(et){return Je(e,et)},{cluster:S,labelBBox:E}},"swimlane"),uy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:m,backgroundStyles:x}=Q(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Jn(b,e.colorIndex,s,d);let S=Ht(i),T=b.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await dn(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await Ne(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(Ht(i)){let ot=B.children[0],ut=h(B);_=ot.getBoundingClientRect(),ut.attr("width",_.width),ut.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let E=e.height,O=e.x-v/2,D=e.y-E/2;l.trace("Data ",e,JSON.stringify(e));let K;if(e.look==="handDrawn"){let ot=y.svg(b),ut=_t(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),ct=ot.path(Ae(O,D,v,E,0),ut);K=b.insert(()=>(l.debug("Rough node insert CXC",ct),ct),":first-child"),K.select("path:nth-child(2)").attr("style",m.join(";")),K.select("path").attr("style",x.join(";").replace("fill","stroke"))}else K=b.insert("rect",":first-child"),K.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",O).attr("y",D).attr("width",v).attr("height",E);let{subGraphTitleTopMargin:Z}=fa(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Z})`),f){let ot=T.select("span");if(ot)ot.attr("style",f)}let tt=K.node().getBBox();return e.offsetX=0,e.width=tt.width,e.height=tt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(ot){return Je(e,ot)},{cluster:b,labelBBox:_}},"rect"),B1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),_1=t(async(r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,m=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);Jn(m,e.colorIndex,s,n);let x=m.insert("g",":first-child"),b=m.insert("g").attr("class","cluster-label"),S=m.append("rect"),T=await Ne(b,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(Ht(i)){let ct=T.children[0],at=h(T);B=ct.getBoundingClientRect(),at.attr("width",B.width),at.attr("height",B.height)}let _=0*e.padding,v=_/2,E=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(E-e.width)/2-e.padding;else e.diff=-e.padding;let O=e.height+_,D=e.height+_-B.height-6,K=e.x-E/2,Z=e.y-O/2;e.width=E;let tt=e.y-e.height/2-v+B.height+2,ot;if(e.look==="handDrawn"){let ct=e.cssClasses.includes("statediagram-cluster-alt"),at=y.svg(m),P=e.rx||e.ry?at.path(Ae(K,Z,E,O,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):at.rectangle(K,Z,E,O,{seed:a});ot=m.insert(()=>P,":first-child");let U=at.rectangle(K,tt,E,D,{fill:ct?c:d,fillStyle:ct?"hachure":"solid",stroke:u,seed:a});ot=m.insert(()=>P,":first-child"),S=m.insert(()=>U),ot.attr("class","outer"),S.attr("class","inner")}else{ot=x.insert("rect",":first-child");let ct="outer";ot.attr("class",ct).attr("x",K).attr("y",Z).attr("width",E).attr("height",O).attr("data-look",e.look),S.attr("class","inner").attr("x",K).attr("y",tt).attr("width",E).attr("height",D)}b.attr("transform",`translate(${e.x-B.width/2}, ${Z+1-(Ht(i)?0:3)})`);let ut=ot.node().getBBox();return e.height=ut.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(ct){return Je(e,ct)},{cluster:m,labelBBox:B}},"roundedWithTitle"),v1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=p(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=Q(e),m=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=Ht(i),b=m.insert("g").attr("class","cluster-label "),S=await dn(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),T=S.getBBox();if(Ht(i)){let Z=S.children[0],tt=h(S);T=Z.getBoundingClientRect(),tt.attr("width",T.width),tt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,E=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let O;if(e.look==="handDrawn"){let Z=y.svg(m),tt=_t(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),ot=Z.path(Ae(v,E,B,_,e.rx),tt);O=m.insert(()=>(l.debug("Rough node insert CXC",ot),ot),":first-child"),O.select("path:nth-child(2)").attr("style",f.join(";")),O.select("path").attr("style",u.join(";").replace("fill","stroke"))}else O=m.insert("rect",":first-child"),O.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",E).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:D}=fa(i);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+D})`),n){let Z=b.select("span");if(Z)Z.attr("style",n)}let K=O.node().getBBox();return e.offsetX=0,e.width=K.width,e.height=K.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Z){return Je(e,Z)},{cluster:m,labelBBox:T}},"kanbanSection"),L1=t((r,e)=>{let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);Jn(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),m=0*e.padding,x=e.width+m;e.diff=-e.padding;let b=e.height+m,S=e.x-x/2,T=e.y-b/2;e.width=x;let B;if(e.look==="handDrawn"){let E=y.svg(f).rectangle(S,T,x,b,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>E,":first-child").attr("class","divider")}else{B=u.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),F1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=p(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=Q(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);Jn(u,e.colorIndex,o,n);let m=Ht(s),x=u.insert("g").attr("class","cluster-label"),b={width:0,height:0},S=e.label?.trim();if(S){let D;if(e.labelType==="markdown")D=await dn(x,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0,width:e.width});else D=await Ne(x,e.label,e.labelStyle||"",!1,!0);if(b=D.getBBox(),m){let K=D.children[0],Z=h(D);b=K.getBoundingClientRect(),Z.attr("width",b.width),Z.attr("height",b.height)}}let T=e.width<=b.width+e.padding?b.width+e.padding:e.width;if(e.width<=b.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,E;if(e.look==="handDrawn"){let D=y.svg(u),K=_t(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Z=D.path(Ae(_,v,T,B,i.rx),K);E=u.insert(()=>Z,":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";"))}else if(E=u.insert("rect",":first-child"),E.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)E.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:D}=fa(s);if(x.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+D})`),d){let K=x.select("span");if(K)K.attr("style",d)}}let O=E.node().getBBox();return e.offsetX=0,e.width=O.width,e.height=O.height,e.offsetY=b.height-e.padding/2,e.intersect=function(D){return Je(e,D)},{cluster:u,labelBBox:b}},"createContainerGroup"),M1=t(async(r,e)=>{let{themeVariables:i}=p(),s=i.flowContainerStroke||i.secondaryBorderColor;return F1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),A1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),E1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=p(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=Q(e),{stylesMap:m}=Ve(e),x=e.boundaryType||"rect",b=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${x} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",x).attr("data-look",e.look);Jn(b,e.colorIndex,s,d);let S=Ht(i),T=b.insert("g").attr("class","cluster-label system-boundary-title"),B=await dn(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let P=B.children[0],U=h(B);_=P.getBoundingClientRect(),U.attr("width",_.width),U.attr("height",_.height)}let v=A1(e,_),{width:E,height:O,x:D,y:K,bodyY:Z,bodyHeight:tt,tabHeight:ot,tabWidth:ut}=v;e.diff=e.width<=_.width+e.padding?(E-e.width)/2-e.padding:-e.padding;let ct=_t(e,{fill:m.get("fill")||c,stroke:m.get("stroke")||n,strokeWidth:m.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let P=y.svg(b),U=P.rectangle(D,Z,E,tt,ct);if(b.insert(()=>U,":first-child").attr("class","boundary-body label-container"),x==="package"){let et=P.rectangle(D,K,ut,ot,ct);b.insert(()=>et,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(b.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",D).attr("y",Z).attr("width",E).attr("height",tt),x==="package")b.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",D).attr("y",K).attr("width",ut).attr("height",ot);let{subGraphTitleTopMargin:at}=fa(i);if(x==="package")T.attr("transform",`translate(${D+(ut-_.width)/2}, ${K+(ot-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${K+at})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=E,e.height=O,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(P){return Je(e,P)},{cluster:b,labelBBox:_}},"usecaseSystemBoundary"),$1=uy,I1={rect:uy,squareRect:$1,roundedWithTitle:_1,noteGroup:B1,divider:L1,kanbanSection:v1,flowGroup:M1,usecaseSystemBoundary:E1,swimlane:T1},O1=new Set(["noteGroup","divider"]),sg=t((r)=>!O1.has(r??"rect"),"clusterPaintsTitle"),dy=new Map,Ao=t(async(r,e)=>{let i=e.shape||"rect",s=await I1[i](r,e);return dy.set(e.id,s),s},"insertCluster"),dA=t(()=>{dy=new Map},"clear");var Mo=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Wt={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},$p={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $o(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ce(r),e=ce(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t($o,"calculateDeltaAndAngle");var ce=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),D1=t((r)=>({x:t(function(e,i,s){let o=0,a=ce(s[0]).x<ce(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Wt,r.arrowTypeStart)){let{angle:b,deltaX:S}=$o(s[0],s[1]);o=Wt[r.arrowTypeStart]*Math.cos(b)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Wt,r.arrowTypeEnd)){let{angle:b,deltaX:S}=$o(s[s.length-1],s[s.length-2]);o=Wt[r.arrowTypeEnd]*Math.cos(b)*(S>=0?1:-1)}let c=Math.abs(ce(e).x-ce(s[s.length-1]).x),n=Math.abs(ce(e).y-ce(s[s.length-1]).y),d=Math.abs(ce(e).x-ce(s[0]).x),f=Math.abs(ce(e).y-ce(s[0]).y),u=Wt[r.arrowTypeStart],m=Wt[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="right"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="right"?-1:1,o+=b}return ce(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ce(s[0]).y<ce(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Wt,r.arrowTypeStart)){let{angle:b,deltaY:S}=$o(s[0],s[1]);o=Wt[r.arrowTypeStart]*Math.abs(Math.sin(b))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Wt,r.arrowTypeEnd)){let{angle:b,deltaY:S}=$o(s[s.length-1],s[s.length-2]);o=Wt[r.arrowTypeEnd]*Math.abs(Math.sin(b))*(S>=0?1:-1)}let c=Math.abs(ce(e).y-ce(s[s.length-1]).y),n=Math.abs(ce(e).x-ce(s[s.length-1]).x),d=Math.abs(ce(e).y-ce(s[0]).y),f=Math.abs(ce(e).x-ce(s[0]).x),u=Wt[r.arrowTypeStart],m=Wt[r.arrowTypeEnd],x=1;if(c<m&&c>0&&n<m){let b=m+x-c;b*=a==="up"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="up"?-1:1,o+=b}return ce(e).y+o},"y")}),"getLineFunctionsWithOffset"),P1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)fy(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)fy(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),R1={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},arrow_hierarchy:{type:"hierarchy",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}},q1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],fy=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=R1[i],f=d&&q1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,b=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${b}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(b);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((E)=>{if(E.setAttribute("stroke",n),d.fill)E.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${b})`)},"addEdgeMarker"),W1=t((r)=>typeof r==="string"?r:p()?.flowchart?.curve,"resolveEdgeCurveType"),Ws=new Map,Kt=new Map,pA=t(()=>{Ws.clear(),Kt.clear()},"clear"),lg=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Eo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),Aa=t(async(r,e)=>{let i=p(),s=Ht(i),{labelStyles:o}=Q(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await dn(r,e.label,{style:Eo(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,m;if(s){let b=f.children[0],S=h(f);u=await lr.measure(()=>b.getBoundingClientRect()),m=u,S.attr("width",u.width),S.attr("height",u.height)}else{let b=h(f).select("text").node();await lr.measure(()=>{if(u=f.getBBox(),b&&typeof b.getBBox==="function")m=b.getBBox();else m=u})}c.attr("transform",Mo(m,s)),Ws.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Kt.get(e.id))Kt.set(e.id,{});Kt.get(e.id).startLeft=b,Io(x,e.startLabelLeft)}if(e.startLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(S,e.startLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Kt.get(e.id))Kt.set(e.id,{});Kt.get(e.id).startRight=b,Io(x,e.startLabelRight)}if(e.endLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelLeft,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Kt.get(e.id))Kt.set(e.id,{});Kt.get(e.id).endLeft=b,Io(x,e.endLabelLeft)}if(e.endLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await Ne(b,e.endLabelRight,Eo(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Mo(B,s)),!Kt.get(e.id))Kt.set(e.id,{});Kt.get(e.id).endRight=b,Io(x,e.endLabelRight)}return f},"insertEdgeLabel");function Io(r,e){if(Ht(p())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Io,"setTerminalWidth");var Ks=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,Ws.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=p(),{subGraphTitleTotalMargin:o}=fa(s);if(r.label){let a=Ws.get(r.id),{x:c,y:n}=r;if(i){let d=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Kt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Kt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Kt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Kt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),N1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),z1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),H1=t((r,e,i)=>{l.debug(`intersection calc abc89:
291
291
  outsidePoint: ${JSON.stringify(e)}
292
292
  insidePoint : ${JSON.stringify(i)}
293
- node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let x={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)x.x=e.x,x.y=e.y;if(u===0)x.x=e.x;if(f===0)x.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,x),x}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,x=i.x<e.x?i.x+u-n:i.x-u+n,b=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:x,_y:b}),n===0)x=e.x,b=e.y;if(u===0)x=e.x;if(f===0)b=e.y;return{x,y:b}}},"intersection"),ky=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!V1(e,a)&&!o){let c=K1(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function Sy(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(Sy,"extractCornerPoints");var wy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),Z1=t(function(r){let{cornerPointPositions:e}=Sy(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=wy(o,c,5),d=wy(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,x={x:c.x,y:c.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let b=5;if(c.x===n.x)x={x:f<0?n.x-b+m:n.x+b-m,y:u<0?n.y-m:n.y+m};else x={x:f<0?n.x-m:n.x+m,y:u<0?n.y-b+m:n.y+b-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(x,d)}else i.push(r[s]);return i},"fixCorners"),Q1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),bo=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,x=o;var b=a;let S=[];for(let lt in e.cssCompiledStyles){if(Mu(lt))continue;S.push(e.cssCompiledStyles[lt])}if(f==="swimlane"){if(b.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),b.intersect(u[1])];else{let lt=u.slice(1,-1),Bt=lt[0],At=lt[lt.length-1],Gt=0.5,Vt=Math.abs(u[u.length-1].x-At.x)<0.5&&Math.abs(u[u.length-1].y-At.y)<0.5,Qt=x.intersect(Bt),Jt=Vt?At:b.intersect(At),Pt=Math.abs(Jt.x-At.x)<0.5&&Math.abs(Jt.y-At.y)<0.5,zt=Math.abs(Qt.x-Bt.x)<0.5&&Math.abs(Qt.y-Bt.y)<0.5?[]:[Qt],Kt=Pt?[]:[Jt];u=[...zt,...lt,...Kt]}u=G1(e,u)}else if(b.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(b.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=ky(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=ky(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((lt)=>!Number.isNaN(lt.y)),_=X1(e.curve);if(_!=="rounded")B=Z1(B);let v=pa;switch(_){case"linear":v=pa;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=lo;break;case"monotoneY":v=co;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=go;break;case"stepBefore":v=uo;break;case"rounded":v=pa;break;default:v=vr}let{x:F,y:I}=H1(e),O=Os().x(F).y(I).curve(v),K;switch(e.thickness){case"normal":K="edge-thickness-normal";break;case"thick":K="edge-thickness-thick";break;case"invisible":K="edge-thickness-invisible";break;default:K="edge-thickness-normal"}switch(e.pattern){case"solid":K+=" edge-pattern-solid";break;case"dotted":K+=" edge-pattern-dotted";break;case"dashed":K+=" edge-pattern-dashed";break;default:K+=" edge-pattern-solid"}let Z,rt=_==="rounded"?Ty(By(B,e),5):O(B),st=Array.isArray(e.style)?e.style:[e.style],ut=st.find((lt)=>lt?.startsWith("stroke:")),ct="";if(e.animate)ct="edge-animation-fast";if(e.animation)ct="edge-animation-"+e.animation;let nt=!1;if(e.look==="handDrawn"){let lt=y.svg(r);Object.assign([],B);let Bt=lt.path(rt,{roughness:0.3,seed:d});K+=" transition",Z=h(Bt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",st?st.reduce((Gt,Vt)=>Gt+";"+Vt,""):"");let At=Z.attr("d");Z.attr("d",At),r.node().appendChild(Z.node())}else{let lt=S.join(";"),Bt=st?st.reduce((Pt,It)=>Pt+It+";",""):"",At=(lt?lt+";"+Bt+";":Bt)+";"+(st?st.reduce((Pt,It)=>Pt+";"+It,""):"");Z=r.append("path").attr("d",rt).attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",At),ut=At.match(/stroke:([^;]+)/)?.[1],nt=e.animate===!0||!!e.animation||lt.includes("animation");let Gt=Z.node(),Vt=typeof Gt.getTotalLength==="function"?Gt.getTotalLength():0,Qt=Rp[e.arrowTypeStart]||0,Jt=Rp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!nt){let It=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?Q1(Vt,Qt,Jt):`0 ${Qt} ${Vt-Qt-Jt} ${Jt}`}; stroke-dashoffset: 0;`;Z.attr("style",It+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",T),Z.attr("data-look",ue(e.look)),e.showPoints)B.forEach((lt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let D="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let U=!nt&&e?.look==="neo";Y1(Z,e,D,c,s,U,ut);let it=Math.floor(u.length/2),P=u[it];if(!V.isLabelCoordinateInPath(P,Z.attr("d")))m=!0;let ht={};if(m)ht.updatedPath=u;return ht.originalPath=e.points,ht},"insertEdge");function Ty(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,x=d.y-c.y,b=Math.hypot(f,u),S=Math.hypot(m,x);if(b<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/b,B=u/b,_=m/S,v=x/S,F=T*_+B*v,I=Math.max(-1,Math.min(1,F)),O=Math.acos(I);if(O<o||Math.abs(Math.PI-O)<o){i+=`L${c.x},${c.y}`;continue}let K=Math.min(e/Math.sin(O/2),b/2,S/2),Z=c.x-T*K,rt=c.y-B*K,st=c.x+_*K,ut=c.y+v*K;i+=`L${Z},${rt}`,i+=`Q${c.x},${c.y} ${st},${ut}`}}return i}t(Ty,"generateRoundedPath");function Cc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Cc,"calculateDeltaAndAngle");function By(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Ht[e.arrowTypeStart]){let o=Ht[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Ht[e.arrowTypeEnd]){let o=Ht[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(By,"applyMarkerOffsetsToPoints");var J1=t((r,e,i,s)=>{e.forEach((o)=>{S2[o](r,i,s)})},"insertMarkers"),t2=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),e2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),r2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),i2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),o2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),s2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),a2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),n2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),l2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),h2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${a}`)},"barbNeo"),c2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),u2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),d2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),f2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),p2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${a}`)},"only_one_neo"),g2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),m2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${a}`)},"one_or_more_neo"),y2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),x2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
293
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let m=i.y<e.y?e.y-d-o:o-d-e.y;n=u*m/f;let x={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-m:i.y-f+m};if(n===0)x.x=e.x,x.y=e.y;if(u===0)x.x=e.x;if(f===0)x.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${m}, R ${u}, r ${n}`,x),x}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let m=f*n/u,x=i.x<e.x?i.x+u-n:i.x-u+n,b=i.y<e.y?i.y+m:i.y-m;if(l.debug(`sides calc abc89, Q ${f}, q ${m}, R ${u}, r ${n}`,{_x:x,_y:b}),n===0)x=e.x,b=e.y;if(u===0)x=e.x;if(f===0)b=e.y;return{x,y:b}}},"intersection"),py=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!z1(e,a)&&!o){let c=H1(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function my(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(my,"extractCornerPoints");var gy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),Y1=t(function(r){let{cornerPointPositions:e}=my(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=gy(o,c,5),d=gy(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let m=Math.sqrt(2)*2,x={x:c.x,y:c.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let b=5;if(c.x===n.x)x={x:f<0?n.x-b+m:n.x+b-m,y:u<0?n.y-m:n.y+m};else x={x:f<0?n.x-m:n.x+m,y:u<0?n.y-b+m:n.y+b-m}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(x,d)}else i.push(r[s]);return i},"fixCorners"),j1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),ho=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=p(),u=e.points,m=!1,x=o;var b=a;let S=[];for(let lt in e.cssCompiledStyles){if(Uu(lt))continue;S.push(e.cssCompiledStyles[lt])}if(f==="swimlane"){if(b.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),b.intersect(u[1])];else{let lt=u.slice(1,-1),Bt=lt[0],vt=lt[lt.length-1],Xt=0.5,Gt=Math.abs(u[u.length-1].x-vt.x)<0.5&&Math.abs(u[u.length-1].y-vt.y)<0.5,Qt=x.intersect(Bt),Jt=Gt?vt:b.intersect(vt),Ot=Math.abs(Jt.x-vt.x)<0.5&&Math.abs(Jt.y-vt.y)<0.5,Nt=Math.abs(Qt.x-Bt.x)<0.5&&Math.abs(Qt.y-Bt.y)<0.5?[]:[Qt],Vt=Ot?[]:[Jt];u=[...Nt,...lt,...Vt]}u=N1(e,u)}else if(b.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(b.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=py(e.points,i.get(e.toCluster).node),m=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=py(u.reverse(),i.get(e.fromCluster).node).reverse(),m=!0;let B=u.filter((lt)=>!Number.isNaN(lt.y)),_=W1(e.curve);if(_!=="rounded")B=Y1(B);let v=ma;switch(_){case"linear":v=ma;break;case"basis":v=vr;break;case"cardinal":v=so;break;case"bumpX":v=ro;break;case"bumpY":v=io;break;case"catmullRom":v=no;break;case"monotoneX":v=lo;break;case"monotoneY":v=co;break;case"natural":v=ii;break;case"step":v=oi;break;case"stepAfter":v=yo;break;case"stepBefore":v=go;break;case"rounded":v=ma;break;default:v=vr}let{x:E,y:O}=D1(e),D=qs().x(E).y(O).curve(v),K;switch(e.thickness){case"normal":K="edge-thickness-normal";break;case"thick":K="edge-thickness-thick";break;case"invisible":K="edge-thickness-invisible";break;default:K="edge-thickness-normal"}switch(e.pattern){case"solid":K+=" edge-pattern-solid";break;case"dotted":K+=" edge-pattern-dotted";break;case"dashed":K+=" edge-pattern-dashed";break;default:K+=" edge-pattern-solid"}let Z,tt=_==="rounded"?yy(xy(B,e),5):D(B),ot=Array.isArray(e.style)?e.style:[e.style],ut=ot.find((lt)=>lt?.startsWith("stroke:")),ct="";if(e.animate)ct="edge-animation-fast";if(e.animation)ct="edge-animation-"+e.animation;let at=!1;if(e.look==="handDrawn"){let lt=y.svg(r);Object.assign([],B);let Bt=lt.path(tt,{roughness:0.3,seed:d});K+=" transition",Z=h(Bt).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",ot?ot.reduce((Xt,Gt)=>Xt+";"+Gt,""):"");let vt=Z.attr("d");Z.attr("d",vt),r.node().appendChild(Z.node())}else{let lt=S.join(";"),Bt=ot?ot.reduce((Ot,Et)=>Ot+Et+";",""):"",vt=(lt?lt+";"+Bt+";":Bt)+";"+(ot?ot.reduce((Ot,Et)=>Ot+";"+Et,""):"");Z=r.append("path").attr("d",tt).attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(ct?" "+ct:"")).attr("style",vt),ut=vt.match(/stroke:([^;]+)/)?.[1],at=e.animate===!0||!!e.animation||lt.includes("animation");let Xt=Z.node(),Gt=typeof Xt.getTotalLength==="function"?Xt.getTotalLength():0,Qt=$p[e.arrowTypeStart]||0,Jt=$p[e.arrowTypeEnd]||0;if(e.look==="neo"&&!at){let Et=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?j1(Gt,Qt,Jt):`0 ${Qt} ${Gt-Qt-Jt} ${Jt}`}; stroke-dashoffset: 0;`;Z.attr("style",Et+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",T),Z.attr("data-look",ue(e.look)),e.showPoints)B.forEach((lt)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let P="";if(p().flowchart.arrowMarkerAbsolute||p().state.arrowMarkerAbsolute)P=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,P=P.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let U=!at&&e?.look==="neo";P1(Z,e,P,c,s,U,ut);let et=Math.floor(u.length/2),R=u[et];if(!V.isLabelCoordinateInPath(R,Z.attr("d")))m=!0;let ht={};if(m)ht.updatedPath=u;return ht.originalPath=e.points,ht},"insertEdge");function yy(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,m=d.x-c.x,x=d.y-c.y,b=Math.hypot(f,u),S=Math.hypot(m,x);if(b<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/b,B=u/b,_=m/S,v=x/S,E=T*_+B*v,O=Math.max(-1,Math.min(1,E)),D=Math.acos(O);if(D<o||Math.abs(Math.PI-D)<o){i+=`L${c.x},${c.y}`;continue}let K=Math.min(e/Math.sin(D/2),b/2,S/2),Z=c.x-T*K,tt=c.y-B*K,ot=c.x+_*K,ut=c.y+v*K;i+=`L${Z},${tt}`,i+=`Q${c.x},${c.y} ${ot},${ut}`}}return i}t(yy,"generateRoundedPath");function Cc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(Cc,"calculateDeltaAndAngle");function xy(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Wt[e.arrowTypeStart]){let o=Wt[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=Cc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Wt[e.arrowTypeEnd]){let o=Wt[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=Cc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(xy,"applyMarkerOffsetsToPoints");var U1=t((r,e,i,s)=>{e.forEach((o)=>{m2[o](r,i,s)})},"insertMarkers"),X1=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),G1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),V1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),K1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),Z1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),Q1=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),J1=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),t2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),e2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${a}`)},"barbNeo"),i2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),o2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),s2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),a2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),n2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${a}`)},"only_one_neo"),l2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),h2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${a}`)},"one_or_more_neo"),c2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),u2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
294
294
  L20,10
295
295
  M20,10
296
- L0,20`)},"requirement_arrow"),C2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
296
+ L0,20`)},"requirement_arrow"),d2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
297
297
  L20,10
298
298
  M20,10
299
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),b2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),k2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),w2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),S2={extension:t2,composition:e2,aggregation:r2,dependency:i2,lollipop:o2,point:s2,circle:a2,cross:n2,barb:l2,barbNeo:h2,hierarchy:w2,only_one:c2,zero_or_one:u2,one_or_more:d2,zero_or_more:f2,only_one_neo:p2,zero_or_one_neo:g2,one_or_more_neo:m2,zero_or_more_neo:y2,requirement_arrow:x2,requirement_contains:b2,requirement_arrow_neo:C2,requirement_contains_neo:k2},Gs=J1;var T2={common:w,getConfig:C,insertCluster:ho,insertEdge:bo,insertEdgeLabel:ga,insertMarkers:Gs,insertNode:fa,interpolateToCurve:Rs,labelHelper:X,log:l,positionEdgeLabel:Us},B2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Oo=Object.create(null),eg=t((r)=>{for(let e of r)Oo[e.name]=e},"registerLayoutLoaders"),_2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-4xjp4rgh.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...B2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),v2=t(()=>{eg([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-t52jdfr1.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-n4q5ad13.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-eqjrpps4.js"),"loader")},..._2()])},"registerDefaultLayoutLoaders");v2();var Ft=t(async(r,e)=>{if(!Object.hasOwn(Oo,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=Oo[r.layoutAlgorithm],s=await i.loader();return up(e,r.config),s.render(r,e,T2,{algorithm:i.algorithm})},"render"),bc="dagre",Lt=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(Oo,r))return r;for(let i of[e,bc])if(Object.hasOwn(Oo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} is registered.`)},"getRegisteredLayoutAlgorithm");var Qn=t(()=>`
299
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),f2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),p2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),g2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),m2={extension:X1,composition:G1,aggregation:V1,dependency:K1,lollipop:Z1,point:Q1,circle:J1,cross:t2,barb:e2,barbNeo:r2,hierarchy:g2,only_one:i2,zero_or_one:o2,one_or_more:s2,zero_or_more:a2,only_one_neo:n2,zero_or_one_neo:l2,one_or_more_neo:h2,zero_or_more_neo:c2,requirement_arrow:u2,requirement_contains:f2,requirement_arrow_neo:d2,requirement_contains_neo:p2},Vs=U1;var y2={common:w,getConfig:C,insertCluster:Ao,insertEdge:ho,insertEdgeLabel:Aa,insertMarkers:Vs,insertNode:ga,interpolateToCurve:Is,labelHelper:X,log:l,positionEdgeLabel:Ks},x2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Oo=Object.create(null),cg=t((r)=>{for(let e of r)Oo[e.name]=e},"registerLayoutLoaders"),C2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-kt98vg8j.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...x2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),b2=t(()=>{cg([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-4fdc0sgn.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-wv3rp8kk.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-3ek5r5se.js"),"loader")},...C2()])},"registerDefaultLayoutLoaders");b2();var Lt=t(async(r,e)=>{if(!Object.hasOwn(Oo,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=Oo[r.layoutAlgorithm],s=await i.loader();return Ap(e,r.config),s.render(r,e,y2,{algorithm:i.algorithm})},"render"),bc="dagre",Mt=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(Oo,r))return r;for(let i of[e,bc])if(Object.hasOwn(Oo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} is registered.`)},"getRegisteredLayoutAlgorithm");var Fn=t(()=>`
300
300
  /* Font Awesome icon styling - consolidated */
301
301
  .label-icon {
302
302
  display: inline-block;
@@ -310,5 +310,5 @@ ${o.join(`
310
310
  stroke: revert;
311
311
  stroke-width: revert;
312
312
  }
313
- `,"getIconStyles");var Mt=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var ft=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=L2(r,e);te(r,a,o,s);let d=F2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),L2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),F2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
- export{t,po,ap,l,Qu,pt,ua,Ie,Ul,g,A,$f,zf,Qi,Gl,op,Hg,Ve,jt,mo,Y,Uf,Vo,$r,ip,Wg,Kg,Vg,Gf,jf,C,Yg,Ru,Jg,qt,Ms,ee,qf,fo,_t,jl,ql,w,te,zr,sp,Zg,lp,R,M,G,z,j,H,q,p,da,Ri,Hl,Fu,cp,h,Fi,Wl,Li,Oa,Hf,Dn,Kl,Xg,Yo,Ps,En,Vl,Ao,Wn,yt,Yl,Ur,Lu,pa,Os,de,lr,cr,up,Mu,Q,Wf,Mi,ur,$s,Pi,Jo,dp,Jl,Zl,Xl,ec,pp,mp,fp,gp,Ap,hp,bp,yp,vp,kp,xp,wp,Cp,Ep,Bp,Ip,_p,Zo,tc,Pu,Sp,Kf,eA,Tp,Vf,Yf,Oi,Ou,Kn,$u,Dp,Nn,ie,V,tA,$a,Bn,Np,Qp,Jf,ln,zu,mt,et,tt,Gr,Vn,Yn,y,X,W,N,Uu,nc,ma,fa,nA,rA,jr,Zf,ho,aA,Ht,Rp,zs,Wt,oA,Xf,ga,Us,bo,Gs,eg,Ft,Lt,Qn,Mt,ft};
313
+ `,"getIconStyles");var Pt=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var At=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=k2(r,e);te(r,a,o,s);let d=w2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),k2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),w2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
314
+ export{t,uo,up,l,Pu,ft,da,_e,Kl,g,A,Vf,Yf,Li,Vl,dp,Xg,Ye,qt,po,Y,Jf,Yo,zr,pp,eA,tA,nA,Zf,Xf,C,rA,Ou,aA,Ht,Gs,ee,eg,mo,St,Yl,Jl,w,te,Ur,mp,oA,fp,F,M,G,z,j,H,q,p,pa,Mi,Zl,$u,gp,h,Pi,Xl,Oi,$a,tg,Qn,ec,iA,Jo,js,_n,tc,fo,Kn,kt,nc,Gr,zu,ma,qs,pe,cr,ur,Ap,Uu,Q,ng,$i,dr,Hs,zi,Zo,hp,rc,ac,oc,ic,bp,yp,vp,kp,xp,wp,Cp,Ep,Bp,Ip,_p,Sp,Tp,Dp,Np,Qp,Rp,Xo,sc,Gu,Fp,rg,sA,Lp,ag,og,Ui,ju,Vn,qu,Mp,Rn,ie,V,lA,za,Sn,Pp,Op,ig,dn,Hu,gt,nt,rt,jr,Yn,Jn,y,X,W,N,Wu,lc,fa,ga,cA,uA,qr,sg,Ao,dA,Wt,$p,Ws,Kt,pA,lg,Aa,Ks,ho,Vs,cg,Lt,Mt,Fn,Pt,At};