orbitchat 2.14.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/assets/ChartRenderer-B1mYF_kk.js +80 -0
  2. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  3. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  4. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  5. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  6. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  11. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  12. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  17. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  18. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  19. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  20. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  21. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  22. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  23. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  24. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  25. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  26. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  27. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  28. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  29. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  30. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  31. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  32. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  33. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  34. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  35. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  36. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  44. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  45. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  46. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  47. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  48. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  49. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  50. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  51. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  52. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  53. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  54. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  55. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  56. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  57. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  58. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  59. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  60. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  61. package/dist/assets/MermaidRenderer-Dhffx5mc.js +260 -0
  62. package/dist/assets/MusicRenderer-DbXJ8e4-.js +18 -0
  63. package/dist/assets/SVGRenderer-EhamRX_K.js +6 -0
  64. package/dist/assets/_basePickBy-C2AibBqo.js +1 -0
  65. package/dist/assets/_baseUniq-D52pUSvn.js +1 -0
  66. package/dist/assets/arc-BSnyvXPh.js +1 -0
  67. package/dist/assets/architectureDiagram-VXUJARFQ-BLMvVsZu.js +36 -0
  68. package/dist/assets/band-CquvqAHh.js +1 -0
  69. package/dist/assets/blockDiagram-VD42YOAC-CTz0dv5u.js +122 -0
  70. package/dist/assets/c4Diagram-YG6GDRKO-BjbN-GGh.js +10 -0
  71. package/dist/assets/channel-ryTtfXZE.js +1 -0
  72. package/dist/assets/chunk-4BX2VUAB-DEMWGIsU.js +1 -0
  73. package/dist/assets/chunk-55IACEB6-BYaauHLT.js +1 -0
  74. package/dist/assets/chunk-B4BG7PRW-D3_GFcfd.js +165 -0
  75. package/dist/assets/chunk-DI55MBZ5-Dy2EuzfA.js +220 -0
  76. package/dist/assets/{chunk-FMBD7UC4-dPK7Boav-Cz7OoDLR.js → chunk-FMBD7UC4-C9XHmwza.js} +2 -2
  77. package/dist/assets/chunk-QN33PNHL-BOCltIi9.js +1 -0
  78. package/dist/assets/chunk-QZHKN3VN-CvA964eQ.js +1 -0
  79. package/dist/assets/chunk-TZMSLE5B-B-3rZz90.js +1 -0
  80. package/dist/assets/classDiagram-2ON5EDUG-VbShFIzz.js +1 -0
  81. package/dist/assets/classDiagram-v2-WZHVMYZB-VbShFIzz.js +1 -0
  82. package/dist/assets/clone-BlhdKVDQ.js +1 -0
  83. package/dist/assets/cose-bilkent-S5V4N54A-CzPip3he.js +1 -0
  84. package/dist/assets/cytoscape.esm-CyJtwmzi.js +331 -0
  85. package/dist/assets/dagre-6UL2VRFP-CfCXYus3.js +4 -0
  86. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  87. package/dist/assets/diagram-PSM6KHXK-DyI2eDqp.js +24 -0
  88. package/dist/assets/diagram-QEK2KX5R-DuakIh40.js +43 -0
  89. package/dist/assets/diagram-S2PKOQOG-C3-4IORM.js +24 -0
  90. package/dist/assets/erDiagram-Q2GNP2WA-Dt-nZEaD.js +60 -0
  91. package/dist/assets/flowDiagram-NV44I4VS-B-2wjyTQ.js +162 -0
  92. package/dist/assets/ganttDiagram-JELNMOA3-CHTvjPq0.js +267 -0
  93. package/dist/assets/gitGraphDiagram-V2S2FVAM-d5GWmgY4.js +65 -0
  94. package/dist/assets/graph-COgkbiU8.js +1 -0
  95. package/dist/assets/index-DN2bBcCs.js +134 -0
  96. package/dist/assets/index-DtztdW2a.js +643 -0
  97. package/dist/assets/index-lGqyWNWb.css +1 -0
  98. package/dist/assets/infoDiagram-HS3SLOUP-30Hn0iLj.js +2 -0
  99. package/dist/assets/init-Dmth1JHB.js +1 -0
  100. package/dist/assets/journeyDiagram-XKPGCS4Q-CMOYXQ79.js +139 -0
  101. package/dist/assets/kanban-definition-3W4ZIXB7-dt3376cq.js +89 -0
  102. package/dist/assets/layout-DH97sy5g.js +1 -0
  103. package/dist/assets/linear-CKzVTQ0r.js +1 -0
  104. package/dist/assets/mindmap-definition-VGOIOE7T-BcZHPAlA.js +68 -0
  105. package/dist/assets/ordinal-DILIJJjt.js +1 -0
  106. package/dist/assets/pieDiagram-ADFJNKIX-DXjvgcgl.js +30 -0
  107. package/dist/assets/purify.es-A66Cw1IH.js +2 -0
  108. package/dist/assets/quadrantDiagram-AYHSOK5B-CICk2FdS.js +7 -0
  109. package/dist/assets/requirementDiagram-UZGBJVZJ-BdtxpQRA.js +64 -0
  110. package/dist/assets/sankeyDiagram-TZEHDZUN-BVNS9BQJ.js +10 -0
  111. package/dist/assets/sequenceDiagram-WL72ISMW-DF4fJTM7.js +145 -0
  112. package/dist/assets/stateDiagram-FKZM4ZOC-C8H8HujX.js +1 -0
  113. package/dist/assets/stateDiagram-v2-4FDKWEC3-DwtU033b.js +1 -0
  114. package/dist/assets/step-EjIQ8UIn.js +1 -0
  115. package/dist/assets/time-h5EapSZu.js +1 -0
  116. package/dist/assets/timeline-definition-IT6M3QCI-DUSG5Vfy.js +61 -0
  117. package/dist/assets/treemap-GDKQZRPO-1PI2PY4S.js +160 -0
  118. package/dist/assets/xychartDiagram-PRI3JC2R-CFPJj8WK.js +7 -0
  119. package/dist/favicon.svg +3 -1
  120. package/dist/index.html +2 -2
  121. package/markdown-renderer/LICENSE +201 -0
  122. package/markdown-renderer/src/CodeBlock.tsx +332 -0
  123. package/markdown-renderer/src/MarkdownComponents.tsx +233 -0
  124. package/markdown-renderer/src/MarkdownStyles.css +668 -0
  125. package/markdown-renderer/src/css.d.ts +4 -0
  126. package/markdown-renderer/src/index.ts +32 -0
  127. package/markdown-renderer/src/preprocessing.ts +519 -0
  128. package/markdown-renderer/src/renderers/ChartRenderer.tsx +1434 -0
  129. package/markdown-renderer/src/renderers/MermaidRenderer.tsx +474 -0
  130. package/markdown-renderer/src/renderers/MusicRenderer.tsx +394 -0
  131. package/markdown-renderer/src/renderers/SVGRenderer.tsx +307 -0
  132. package/markdown-renderer/src/types.ts +174 -0
  133. package/package.json +25 -3
  134. package/dist/assets/_baseUniq-BRKsqoH--68FUaYxk.js +0 -1
  135. package/dist/assets/arc-pab_su9s-BuY-VRZt.js +0 -1
  136. package/dist/assets/architectureDiagram-VXUJARFQ-DqQ8r_6g-C5b5VsO8.js +0 -36
  137. package/dist/assets/blockDiagram-VD42YOAC-B-dKfcH3-DVjqMJ-3.js +0 -122
  138. package/dist/assets/c4Diagram-YG6GDRKO-DMUPaBEl-o6ghjFV9.js +0 -10
  139. package/dist/assets/channel-HKsfPa5q-rOME8XF8.js +0 -1
  140. package/dist/assets/chunk-4BX2VUAB-CX67kh_B-Dl0Loq_e.js +0 -1
  141. package/dist/assets/chunk-55IACEB6-BocSyyvr-DYW83vZR.js +0 -1
  142. package/dist/assets/chunk-B4BG7PRW-CO8QAyfE-CsF1OX4R.js +0 -165
  143. package/dist/assets/chunk-DI55MBZ5-Dw1L6Eos-Dl1shJzL.js +0 -220
  144. package/dist/assets/chunk-QN33PNHL-vP2PqfVG-BuQNN8G2.js +0 -1
  145. package/dist/assets/chunk-QZHKN3VN-Bcidzu63-Bud1NKOb.js +0 -1
  146. package/dist/assets/chunk-TZMSLE5B-BtljMjlg-BKLxPJ-x.js +0 -1
  147. package/dist/assets/classDiagram-2ON5EDUG-C7cYN9hv-BHg-LSxQ.js +0 -1
  148. package/dist/assets/classDiagram-v2-WZHVMYZB-C7cYN9hv-BHg-LSxQ.js +0 -1
  149. package/dist/assets/clone-DoPb9X13-DejjKfXe.js +0 -1
  150. package/dist/assets/cose-bilkent-S5V4N54A-BGzO4EsH-rofdToAx.js +0 -1
  151. package/dist/assets/cytoscape.esm-CjI2IsL8-Da6dFVsf.js +0 -331
  152. package/dist/assets/dagre-6UL2VRFP-TzNvXCds-Ls1mVyc7.js +0 -4
  153. package/dist/assets/diagram-PSM6KHXK-BqY4RpUg-BJmYXUei.js +0 -24
  154. package/dist/assets/diagram-QEK2KX5R-CTjgBsne-dz-VLadE.js +0 -43
  155. package/dist/assets/diagram-S2PKOQOG-BqrhTIpA-ikxUE9Dj.js +0 -24
  156. package/dist/assets/erDiagram-Q2GNP2WA-B2hsi_Tl-B5gu6Jrx.js +0 -60
  157. package/dist/assets/flowDiagram-NV44I4VS-C03vtt_F-C9LVdVvn.js +0 -162
  158. package/dist/assets/ganttDiagram-JELNMOA3-B3hAg964-CYO6ZcQ8.js +0 -267
  159. package/dist/assets/gitGraphDiagram-NY62KEGX-ByhMH0yZ-BvO0WGzP.js +0 -65
  160. package/dist/assets/graph-BmNkcFEM-Bl2fiTgr.js +0 -1
  161. package/dist/assets/index-BXexqYFc-CFPIFV8r.js +0 -134
  162. package/dist/assets/index-KsGsuMGp.css +0 -1
  163. package/dist/assets/index-nqhgVFEP.js +0 -1010
  164. package/dist/assets/infoDiagram-WHAUD3N6-is6Ho4-T-D6tHdi3J.js +0 -2
  165. package/dist/assets/journeyDiagram-XKPGCS4Q-CRTOL26C-CL4DFaQP.js +0 -139
  166. package/dist/assets/kanban-definition-3W4ZIXB7-CNnO_t6O-DZBlsSao.js +0 -89
  167. package/dist/assets/layout-C0kZPebx-DiUdszUx.js +0 -1
  168. package/dist/assets/min-7Gb0pNxh-DsojA8pm.js +0 -1
  169. package/dist/assets/mindmap-definition-VGOIOE7T-CJZ2wTTa-Cd46k2jT.js +0 -68
  170. package/dist/assets/pieDiagram-ADFJNKIX-C9OSknjr-BGVcHmss.js +0 -30
  171. package/dist/assets/quadrantDiagram-AYHSOK5B-CW8yuAqv-CrCYjmJT.js +0 -7
  172. package/dist/assets/requirementDiagram-UZGBJVZJ-nGPhruO1-BzOGHXGi.js +0 -64
  173. package/dist/assets/sankeyDiagram-TZEHDZUN-CmL90u-m-BWp9STLO.js +0 -10
  174. package/dist/assets/sequenceDiagram-WL72ISMW-B02VRcnM-DB4Adljk.js +0 -145
  175. package/dist/assets/stateDiagram-FKZM4ZOC-DjoyLUdz-pDyQ50aU.js +0 -1
  176. package/dist/assets/stateDiagram-v2-4FDKWEC3-Bq76BTB7-C3j4gDpN.js +0 -1
  177. package/dist/assets/timeline-definition-IT6M3QCI-CTn0Gm3T-O1FhSixZ.js +0 -61
  178. package/dist/assets/treemap-KMMF4GRG-BjgLKKyi-DG8IQefJ.js +0 -128
  179. package/dist/assets/xychartDiagram-PRI3JC2R-Cgg6Uija-CPVch5-l.js +0 -7
@@ -0,0 +1,260 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DtztdW2a.js","assets/index-lGqyWNWb.css","assets/dagre-6UL2VRFP-CfCXYus3.js","assets/graph-COgkbiU8.js","assets/_baseUniq-D52pUSvn.js","assets/layout-DH97sy5g.js","assets/_basePickBy-C2AibBqo.js","assets/clone-BlhdKVDQ.js","assets/purify.es-A66Cw1IH.js","assets/step-EjIQ8UIn.js","assets/cose-bilkent-S5V4N54A-CzPip3he.js","assets/cytoscape.esm-CyJtwmzi.js","assets/c4Diagram-YG6GDRKO-BjbN-GGh.js","assets/chunk-TZMSLE5B-B-3rZz90.js","assets/flowDiagram-NV44I4VS-B-2wjyTQ.js","assets/chunk-FMBD7UC4-C9XHmwza.js","assets/chunk-55IACEB6-BYaauHLT.js","assets/chunk-QN33PNHL-BOCltIi9.js","assets/channel-ryTtfXZE.js","assets/erDiagram-Q2GNP2WA-Dt-nZEaD.js","assets/gitGraphDiagram-V2S2FVAM-d5GWmgY4.js","assets/chunk-4BX2VUAB-DEMWGIsU.js","assets/chunk-QZHKN3VN-CvA964eQ.js","assets/treemap-GDKQZRPO-1PI2PY4S.js","assets/ganttDiagram-JELNMOA3-CHTvjPq0.js","assets/time-h5EapSZu.js","assets/linear-CKzVTQ0r.js","assets/init-Dmth1JHB.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-HS3SLOUP-30Hn0iLj.js","assets/pieDiagram-ADFJNKIX-DXjvgcgl.js","assets/arc-BSnyvXPh.js","assets/ordinal-DILIJJjt.js","assets/quadrantDiagram-AYHSOK5B-CICk2FdS.js","assets/xychartDiagram-PRI3JC2R-CFPJj8WK.js","assets/band-CquvqAHh.js","assets/requirementDiagram-UZGBJVZJ-BdtxpQRA.js","assets/sequenceDiagram-WL72ISMW-DF4fJTM7.js","assets/classDiagram-2ON5EDUG-VbShFIzz.js","assets/chunk-B4BG7PRW-D3_GFcfd.js","assets/classDiagram-v2-WZHVMYZB-VbShFIzz.js","assets/stateDiagram-FKZM4ZOC-C8H8HujX.js","assets/chunk-DI55MBZ5-Dy2EuzfA.js","assets/stateDiagram-v2-4FDKWEC3-DwtU033b.js","assets/journeyDiagram-XKPGCS4Q-CMOYXQ79.js","assets/timeline-definition-IT6M3QCI-DUSG5Vfy.js","assets/mindmap-definition-VGOIOE7T-BcZHPAlA.js","assets/kanban-definition-3W4ZIXB7-dt3376cq.js","assets/sankeyDiagram-TZEHDZUN-BVNS9BQJ.js","assets/diagram-S2PKOQOG-C3-4IORM.js","assets/diagram-QEK2KX5R-DuakIh40.js","assets/blockDiagram-VD42YOAC-CTz0dv5u.js","assets/architectureDiagram-VXUJARFQ-BLMvVsZu.js","assets/diagram-PSM6KHXK-DyI2eDqp.js"])))=>i.map(i=>d[i]);
2
+ var fp=Object.defineProperty;var pp=(e,t,r)=>t in e?fp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ct=(e,t,r)=>pp(e,typeof t!="symbol"?t+"":t,r);import{g as gp,c as mp,_ as lt,r as jt,j as kt}from"./index-DtztdW2a.js";import{p as hr}from"./purify.es-A66Cw1IH.js";import{y as Ae,z as js,A as Ys,B as yp,D as ol,E as Oi,e as Vs,F as ll,G as cl,H as hl,I as ul,J as dl,K as fl,L as xp,M as Ka,N as pl,O as gl,P as bp,Q as Cp,c as wi,l as wp}from"./step-EjIQ8UIn.js";var Gs={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},ml={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(mp,function(){var r=1e3,i=6e4,a=36e5,n="millisecond",o="second",s="minute",c="hour",l="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|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(M){var B=["th","st","nd","rd"],T=M%100;return"["+M+(B[(T-20)%10]||B[T]||B[0])+"]"}},w=function(M,B,T){var A=String(M);return!A||A.length>=B?M:""+Array(B+1-A.length).join(T)+M},_={s:w,z:function(M){var B=-M.utcOffset(),T=Math.abs(B),A=Math.floor(T/60),L=T%60;return(B<=0?"+":"-")+w(A,2,"0")+":"+w(L,2,"0")},m:function M(B,T){if(B.date()<T.date())return-M(T,B);var A=12*(T.year()-B.year())+(T.month()-B.month()),L=B.clone().add(A,u),N=T-L<0,V=B.clone().add(A+(N?-1:1),u);return+(-(A+(T-L)/(N?L-V:V-L))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:h,d:l,D:g,h:c,m:s,s:o,ms:n,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},k="en",C={};C[k]=b;var v="$isDayjsObject",E=function(M){return M instanceof z||!(!M||!M[v])},R=function M(B,T,A){var L;if(!B)return k;if(typeof B=="string"){var N=B.toLowerCase();C[N]&&(L=N),T&&(C[N]=T,L=N);var V=B.split("-");if(!L&&V.length>1)return M(V[0])}else{var J=B.name;C[J]=B,L=J}return!A&&L&&(k=L),L||!A&&k},D=function(M,B){if(E(M))return M.clone();var T=typeof B=="object"?B:{};return T.date=M,T.args=arguments,new z(T)},$=_;$.l=R,$.i=E,$.w=function(M,B){return D(M,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var z=function(){function M(T){this.$L=R(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[v]=!0}var B=M.prototype;return B.parse=function(T){this.$d=function(A){var L=A.date,N=A.utc;if(L===null)return new Date(NaN);if($.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var V=L.match(y);if(V){var J=V[2]-1||0,nt=(V[7]||"0").substring(0,3);return N?new Date(Date.UTC(V[1],J,V[3]||1,V[4]||0,V[5]||0,V[6]||0,nt)):new Date(V[1],J,V[3]||1,V[4]||0,V[5]||0,V[6]||0,nt)}}return new Date(L)}(T),this.init()},B.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},B.$utils=function(){return $},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(T,A){var L=D(T);return this.startOf(A)<=L&&L<=this.endOf(A)},B.isAfter=function(T,A){return D(T)<this.startOf(A)},B.isBefore=function(T,A){return this.endOf(A)<D(T)},B.$g=function(T,A,L){return $.u(T)?this[A]:this.set(L,T)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(T,A){var L=this,N=!!$.u(A)||A,V=$.p(T),J=function(gt,pt){var _t=$.w(L.$u?Date.UTC(L.$y,pt,gt):new Date(L.$y,pt,gt),L);return N?_t:_t.endOf(l)},nt=function(gt,pt){return $.w(L.toDate()[gt].apply(L.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(pt)),L)},ht=this.$W,ut=this.$M,Dt=this.$D,et="set"+(this.$u?"UTC":"");switch(V){case d:return N?J(1,0):J(31,11);case u:return N?J(1,ut):J(0,ut+1);case h:var at=this.$locale().weekStart||0,yt=(ht<at?ht+7:ht)-at;return J(N?Dt-yt:Dt+(6-yt),ut);case l:case g:return nt(et+"Hours",0);case c:return nt(et+"Minutes",1);case s:return nt(et+"Seconds",2);case o:return nt(et+"Milliseconds",3);default:return this.clone()}},B.endOf=function(T){return this.startOf(T,!1)},B.$set=function(T,A){var L,N=$.p(T),V="set"+(this.$u?"UTC":""),J=(L={},L[l]=V+"Date",L[g]=V+"Date",L[u]=V+"Month",L[d]=V+"FullYear",L[c]=V+"Hours",L[s]=V+"Minutes",L[o]=V+"Seconds",L[n]=V+"Milliseconds",L)[N],nt=N===l?this.$D+(A-this.$W):A;if(N===u||N===d){var ht=this.clone().set(g,1);ht.$d[J](nt),ht.init(),this.$d=ht.set(g,Math.min(this.$D,ht.daysInMonth())).$d}else J&&this.$d[J](nt);return this.init(),this},B.set=function(T,A){return this.clone().$set(T,A)},B.get=function(T){return this[$.p(T)]()},B.add=function(T,A){var L,N=this;T=Number(T);var V=$.p(A),J=function(ut){var Dt=D(N);return $.w(Dt.date(Dt.date()+Math.round(ut*T)),N)};if(V===u)return this.set(u,this.$M+T);if(V===d)return this.set(d,this.$y+T);if(V===l)return J(1);if(V===h)return J(7);var nt=(L={},L[s]=i,L[c]=a,L[o]=r,L)[V]||1,ht=this.$d.getTime()+T*nt;return $.w(ht,this)},B.subtract=function(T,A){return this.add(-1*T,A)},B.format=function(T){var A=this,L=this.$locale();if(!this.isValid())return L.invalidDate||m;var N=T||"YYYY-MM-DDTHH:mm:ssZ",V=$.z(this),J=this.$H,nt=this.$m,ht=this.$M,ut=L.weekdays,Dt=L.months,et=L.meridiem,at=function(pt,_t,ye,Sr){return pt&&(pt[_t]||pt(A,N))||ye[_t].slice(0,Sr)},yt=function(pt){return $.s(J%12||12,pt,"0")},gt=et||function(pt,_t,ye){var Sr=pt<12?"AM":"PM";return ye?Sr.toLowerCase():Sr};return N.replace(x,function(pt,_t){return _t||function(ye){switch(ye){case"YY":return String(A.$y).slice(-2);case"YYYY":return $.s(A.$y,4,"0");case"M":return ht+1;case"MM":return $.s(ht+1,2,"0");case"MMM":return at(L.monthsShort,ht,Dt,3);case"MMMM":return at(Dt,ht);case"D":return A.$D;case"DD":return $.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return at(L.weekdaysMin,A.$W,ut,2);case"ddd":return at(L.weekdaysShort,A.$W,ut,3);case"dddd":return ut[A.$W];case"H":return String(J);case"HH":return $.s(J,2,"0");case"h":return yt(1);case"hh":return yt(2);case"a":return gt(J,nt,!0);case"A":return gt(J,nt,!1);case"m":return String(nt);case"mm":return $.s(nt,2,"0");case"s":return String(A.$s);case"ss":return $.s(A.$s,2,"0");case"SSS":return $.s(A.$ms,3,"0");case"Z":return V}return null}(pt)||V.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(T,A,L){var N,V=this,J=$.p(A),nt=D(T),ht=(nt.utcOffset()-this.utcOffset())*i,ut=this-nt,Dt=function(){return $.m(V,nt)};switch(J){case d:N=Dt()/12;break;case u:N=Dt();break;case f:N=Dt()/3;break;case h:N=(ut-ht)/6048e5;break;case l:N=(ut-ht)/864e5;break;case c:N=ut/a;break;case s:N=ut/i;break;case o:N=ut/r;break;default:N=ut}return L?N:$.a(N)},B.daysInMonth=function(){return this.endOf(u).$D},B.$locale=function(){return C[this.$L]},B.locale=function(T,A){if(!T)return this.$L;var L=this.clone(),N=R(T,A,!0);return N&&(L.$L=N),L},B.clone=function(){return $.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},M}(),O=z.prototype;return D.prototype=O,[["$ms",n],["$s",o],["$m",s],["$H",c],["$W",l],["$M",u],["$y",d],["$D",g]].forEach(function(M){O[M[1]]=function(B){return this.$g(B,M[0],M[1])}}),D.extend=function(M,B){return M.$i||(M(B,z,D),M.$i=!0),D},D.locale=R,D.isDayjs=E,D.unix=function(M){return D(1e3*M)},D.en=C[k],D.Ls=C,D.p={},D})})(ml);var kp=ml.exports;const vp=gp(kp);var yl=Object.defineProperty,p=(e,t)=>yl(e,"name",{value:t,configurable:!0}),_p=(e,t)=>{for(var r in t)yl(e,r,{get:t[r],enumerable:!0})},le={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Yn=p(function(e="fatal"){let t=le.fatal;typeof e=="string"?e.toLowerCase()in le&&(t=le[e]):typeof e=="number"&&(t=e),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},t<=le.fatal&&(F.fatal=console.error?console.error.bind(console,Yt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yt("FATAL"))),t<=le.error&&(F.error=console.error?console.error.bind(console,Yt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yt("ERROR"))),t<=le.warn&&(F.warn=console.warn?console.warn.bind(console,Yt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yt("WARN"))),t<=le.info&&(F.info=console.info?console.info.bind(console,Yt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yt("INFO"))),t<=le.debug&&(F.debug=console.debug?console.debug.bind(console,Yt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("DEBUG"))),t<=le.trace&&(F.trace=console.debug?console.debug.bind(console,Yt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("TRACE")))},"setLogLevel"),Yt=p(e=>`%c${vp().format("ss.SSS")} : ${e} : `,"format");const ki={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,n=2*r-a;switch(i){case"r":return ki.hue2rgb(n,a,e+1/3)*255;case"g":return ki.hue2rgb(n,a,e)*255;case"b":return ki.hue2rgb(n,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),n=Math.min(e,t,r),o=(a+n)/2;if(i==="l")return o*100;if(a===n)return 0;const s=a-n,c=o>.5?s/(2-a-n):s/(a+n);if(i==="s")return c*100;switch(a){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Sp={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Tp={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Q={channel:ki,lang:Sp,unit:Tp},be={};for(let e=0;e<=255;e++)be[e]=Q.unit.dec2hex(e);const Bt={ALL:0,RGB:1,HSL:2};class Bp{constructor(){this.type=Bt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Bt.ALL}is(t){return this.type===t}}class Lp{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Bp}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Bt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=Q.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Q.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=Q.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=Q.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Q.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=Q.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Bt.HSL)&&r!==void 0?r:(this._ensureHSL(),Q.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Bt.RGB)&&r!==void 0?r:(this._ensureRGB(),Q.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Bt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Bt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Bt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Bt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Bt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Bt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const fa=new Lp({r:0,g:0,b:0,a:0},"transparent"),tr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(tr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,n=a%4===0,o=a>4,s=o?1:17,c=o?8:4,l=n?0:-1,h=o?255:15;return fa.set({r:(i>>c*(l+3)&h)*s,g:(i>>c*(l+2)&h)*s,b:(i>>c*(l+1)&h)*s,a:n?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${be[Math.round(t)]}${be[Math.round(r)]}${be[Math.round(i)]}${be[Math.round(a*255)]}`:`#${be[Math.round(t)]}${be[Math.round(r)]}${be[Math.round(i)]}`}},Ee={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Ee.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Q.channel.clamp.h(parseFloat(r)*.9);case"rad":return Q.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Q.channel.clamp.h(parseFloat(r)*360)}}return Q.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ee.re);if(!r)return;const[,i,a,n,o,s]=r;return fa.set({h:Ee._hue2deg(i),s:Q.channel.clamp.s(parseFloat(a)),l:Q.channel.clamp.l(parseFloat(n)),a:o?Q.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${Q.lang.round(t)}, ${Q.lang.round(r)}%, ${Q.lang.round(i)}%, ${a})`:`hsl(${Q.lang.round(t)}, ${Q.lang.round(r)}%, ${Q.lang.round(i)}%)`}},Wr={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Wr.colors[e];if(t)return tr.parse(t)},stringify:e=>{const t=tr.stringify(e);for(const r in Wr.colors)if(Wr.colors[r]===t)return r}},Fr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Fr.re);if(!r)return;const[,i,a,n,o,s,c,l,h]=r;return fa.set({r:Q.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:Q.channel.clamp.g(o?parseFloat(n)*2.55:parseFloat(n)),b:Q.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?Q.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${Q.lang.round(t)}, ${Q.lang.round(r)}, ${Q.lang.round(i)}, ${Q.lang.round(a)})`:`rgb(${Q.lang.round(t)}, ${Q.lang.round(r)}, ${Q.lang.round(i)})`}},ae={format:{keyword:Wr,hex:tr,rgb:Fr,rgba:Fr,hsl:Ee,hsla:Ee},parse:e=>{if(typeof e!="string")return e;const t=tr.parse(e)||Fr.parse(e)||Ee.parse(e)||Wr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Bt.HSL)||e.data.r===void 0?Ee.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Fr.stringify(e):tr.stringify(e)},xl=(e,t)=>{const r=ae.parse(e);for(const i in t)r[i]=Q.channel.clamp[i](t[i]);return ae.stringify(r)},qr=(e,t,r=0,i=1)=>{if(typeof e!="number")return xl(e,{a:t});const a=fa.set({r:Q.channel.clamp.r(e),g:Q.channel.clamp.g(t),b:Q.channel.clamp.b(r),a:Q.channel.clamp.a(i)});return ae.stringify(a)},Mp=e=>{const{r:t,g:r,b:i}=ae.parse(e),a=.2126*Q.channel.toLinear(t)+.7152*Q.channel.toLinear(r)+.0722*Q.channel.toLinear(i);return Q.lang.round(a)},Ap=e=>Mp(e)>=.5,ii=e=>!Ap(e),bl=(e,t,r)=>{const i=ae.parse(e),a=i[t],n=Q.channel.clamp[t](a+r);return a!==n&&(i[t]=n),ae.stringify(i)},W=(e,t)=>bl(e,"l",t),U=(e,t)=>bl(e,"l",-t),S=(e,t)=>{const r=ae.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return xl(e,i)},$p=(e,t,r=50)=>{const{r:i,g:a,b:n,a:o}=ae.parse(e),{r:s,g:c,b:l,a:h}=ae.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=a*m+c*y,w=n*m+l*y,_=o*u+h*(1-u);return qr(x,b,w,_)},I=(e,t=100)=>{const r=ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,$p(r,e,t)};var Cl=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Hr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fp=/\s*%%.*\n/gm,rr,wl=(rr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(rr,"UnknownDiagramError"),rr),Pe={},Vn=p(function(e,t){e=e.replace(Cl,"").replace(Hr,"").replace(Fp,`
3
+ `);for(const[r,{detector:i}]of Object.entries(Pe))if(i(e,t))return r;throw new wl(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Qa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)kl(t,r,i)},"registerLazyLoadedDiagrams"),kl=p((e,t,r)=>{Pe[e]&&F.warn(`Detector with key ${e} already exists. Overwriting.`),Pe[e]={detector:t,loader:r},F.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Ep=p(e=>Pe[e].loader,"getDiagramLoader"),Ja=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(n=>Ja(e,n,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(n=>{e.includes(n)||e.push(n)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(n=>{typeof t[n]=="object"&&(e[n]===void 0||typeof e[n]=="object")?(e[n]===void 0&&(e[n]=Array.isArray(t[n])?[]:{}),e[n]=Ja(e[n],t[n],{depth:r-1,clobber:i})):(i||typeof e[n]!="object"&&typeof t[n]!="object")&&(e[n]=t[n])}),e)},"assignWithDepth"),bt=Ja,pa="#ffffff",ga="#f2f2f2",Ot=p((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),"mkBorder"),ir,Dp=(ir=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,n,o,s,c,l,h,u,f,d,g,m,y,x,b,w,_,k,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),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||W(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=U(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=U(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||I(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||W(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||U(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||S(this.mainBkg,{h:180,s:-15,l:t*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||S(this.mainBkg,{h:180,s:-15,l:t*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(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||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(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.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},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||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?W(this.quadrant1Fill):U(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:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((k=this.xyChart)==null?void 0:k.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?U(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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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||pa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ga}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ir,"Theme"),ir),Op=p(e=>{const t=new Dp;return t.calculate(e),t},"getThemeVariables"),ar,Rp=(ar=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(I("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=qr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.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.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=qr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=qr(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||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,n,o,s,c,l,h,u,f,d,g,m,y,x,b,w,_,k;this.secondBkg=W(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=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(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=this.darkTextColor,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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(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||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||I(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:30,s:-30,l:-(-10+C*4)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:30,s:-30,l:-(-7+C*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?W(this.quadrant1Fill):U(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.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:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((k=this.radar)==null?void 0:k.legendFontSize)||12},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?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||S(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||S(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||S(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||S(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||S(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ar,"Theme"),ar),Ip=p(e=>{const t=new Rp;return t.calculate(e),t},"getThemeVariables"),nr,Pp=(nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=qr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.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.updateColors()}updateColors(){var t,r,i,a,n,o,s,c,l,h,u,f,d,g,m,y,x,b,w,_,k;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||S(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:30,l:-(7+C*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||I(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||I(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=W(this.border1,23),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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||S(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||S(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||S(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?W(this.quadrant1Fill):U(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(I(this.git0),25),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ga}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(nr,"Theme"),nr),Np=p(e=>{const t=new Pp;return t.calculate(e),t},"getThemeVariables"),sr,zp=(sr=class{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=W("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.primaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,c,l,h,u,f,d,g,m,y,x,b,w,_,k;this.actorBorder=U(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||S(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:30,s:-30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:30,s:-30,l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(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||S(this.primaryColor,{l:-30}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||S(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?W(this.quadrant1Fill):U(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ga}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(sr,"Theme"),sr),Wp=p(e=>{const t=new zp;return t.calculate(e),t},"getThemeVariables"),or,qp=(or=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(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.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.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,c,l,h,u,f,d,g,m,y,x,b,w,_,k;this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||I(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=U(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=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(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=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?W(this.quadrant1Fill):U(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((k=this.radar)==null?void 0:k.legendFontSize)||12},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=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||S(this.primaryColor,{h:-30}),this.git4=this.pie5||S(this.primaryColor,{h:-60}),this.git5=this.pie6||S(this.primaryColor,{h:-90}),this.git6=this.pie7||S(this.primaryColor,{h:60}),this.git7=this.pie8||S(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||pa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ga}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(or,"Theme"),or),Hp=p(e=>{const t=new qp;return t.calculate(e),t},"getThemeVariables"),de={base:{getThemeVariables:Op},dark:{getThemeVariables:Ip},default:{getThemeVariables:Np},forest:{getThemeVariables:Wp},neutral:{getThemeVariables:Hp}},te={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},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,showTitle:!0,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},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},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},vl={...te,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:de.default.getThemeVariables(),sequence:{...te.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...te.gantt,tickInterval:void 0,useWidth:void 0},c4:{...te.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...te.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...te.pie,useWidth:984},xyChart:{...te.xyChart,useWidth:void 0},requirement:{...te.requirement,useWidth:void 0},packet:{...te.packet},radar:{...te.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},_l=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,..._l(e[i],"")]:[...r,t+i],[]),"keyify"),jp=new Set(_l(vl,"")),Sl=vl,Ri=p(e=>{if(F.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ri(t));return}for(const t of Object.keys(e)){if(F.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!jp.has(t)||e[t]==null){F.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){F.debug("sanitizing object",t),Ri(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(F.debug("sanitizing css option",t),e[t]=Yp(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}F.debug("After sanitization",e)}},"sanitizeDirective"),Yp=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ur=Object.freeze(Sl),Nt=bt({},ur),Ii,Ne=[],jr=bt({},ur),ma=p((e,t)=>{let r=bt({},e),i={};for(const a of t)Ll(a),i=bt(i,a);if(r=bt(r,i),i.theme&&i.theme in de){const a=bt({},Ii),n=bt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in de&&(r.themeVariables=de[r.theme].getThemeVariables(n))}return jr=r,Ml(jr),jr},"updateCurrentConfig"),Vp=p(e=>(Nt=bt({},ur),Nt=bt(Nt,e),e.theme&&de[e.theme]&&(Nt.themeVariables=de[e.theme].getThemeVariables(e.themeVariables)),ma(Nt,Ne),Nt),"setSiteConfig"),Gp=p(e=>{Ii=bt({},e)},"saveConfigFromInitialize"),Up=p(e=>(Nt=bt(Nt,e),ma(Nt,Ne),Nt),"updateSiteConfig"),Tl=p(()=>bt({},Nt),"getSiteConfig"),Bl=p(e=>(Ml(e),bt(jr,e),At()),"setConfig"),At=p(()=>bt({},jr),"getConfig"),Ll=p(e=>{e&&(["secure",...Nt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(F.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Ll(e[t])}))},"sanitize"),Xp=p(e=>{var t;Ri(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ne.push(e),ma(Nt,Ne)},"addDirective"),Pi=p((e=Nt)=>{Ne=[],ma(e,Ne)},"reset"),Zp={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Us={},Kp=p(e=>{Us[e]||(F.warn(Zp[e]),Us[e]=!0)},"issueWarning"),Ml=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Kp("LAZY_LOAD_DEPRECATED")},"checkConfig"),BS=p(()=>{let e={};Ii&&(e=bt(e,Ii));for(const t of Ne)e=bt(e,t);return e},"getUserDefinedConfig"),ai=/<br\s*\/?>/gi,Qp=p(e=>e?Fl(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Jp=(()=>{let e=!1;return()=>{e||(Al(),e=!0)}})();function Al(){const e="data-temp-href-target";hr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),hr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Al,"setupDompurifyHooks");var $l=p(e=>(Jp(),hr.sanitize(e)),"removeScript"),Xs=p((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=$l(e):i!=="loose"&&(e=Fl(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=ig(e))}return e},"sanitizeMore"),Vt=p((e,t)=>e&&(t.dompurifyConfig?e=hr.sanitize(Xs(e,t),t.dompurifyConfig).toString():e=hr.sanitize(Xs(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),tg=p((e,t)=>typeof e=="string"?Vt(e,t):e.flat().map(r=>Vt(r,t)),"sanitizeTextOrArray"),eg=p(e=>ai.test(e),"hasBreaks"),rg=p(e=>e.split(ai),"splitBreaks"),ig=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Fl=p(e=>e.replace(ai,"#br#"),"breakToPlaceholder"),ag=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),wt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ng=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),sg=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Zs=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const n=t[i-1],o=t[i+1];og(n,o)&&(a=n+","+o,i++,r.pop())}r.push(lg(a))}return r.join("")},"parseGenericTypes"),tn=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),og=p((e,t)=>{const r=tn(e,"~"),i=tn(t,"~");return r===1&&i===1},"shouldCombineSets"),lg=p(e=>{const t=tn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ks=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),en=/\$\$(.*)\$\$/g,dr=p(e=>{var t;return(((t=e.match(en))==null?void 0:t.length)??0)>0},"hasKatex"),LS=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Gn(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),cg=p(async(e,t)=>{if(!dr(e))return e;if(!(Ks()||t.legacyMathML||t.forceLegacyMathML))return e.replace(en,"MathML is unsupported in this environment.");{const{default:r}=await lt(async()=>{const{default:a}=await import("./index-DtztdW2a.js").then(n=>n.k);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!Ks()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ai).map(a=>dr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(en,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Gn=p(async(e,t)=>Vt(await cg(e,t),t),"renderKatexSanitized"),br={getRows:Qp,sanitizeText:Vt,sanitizeTextOrArray:tg,hasBreaks:eg,splitBreaks:rg,lineBreakRegex:ai,removeScript:$l,getUrl:ag,evaluate:wt,getMax:ng,getMin:sg},hg=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ug=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),El=p(function(e,t,r,i){const a=ug(t,r,i);hg(e,a)},"configureSvgSize"),dg=p(function(e,t,r,i){const a=t.node().getBBox(),n=a.width,o=a.height;F.info(`SVG bounds: ${n}x${o}`,a);let s=0,c=0;F.info(`Graph bounds: ${s}x${c}`,e),s=n+r*2,c=o+r*2,F.info(`Calculated bounds: ${s}x${c}`),El(t,c,s,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),vi={},fg=p((e,t,r)=>{let i="";return e in vi&&vi[e]?i=vi[e](r):F.warn(`No theme found for ${e}`),` & {
4
+ font-family: ${r.fontFamily};
5
+ font-size: ${r.fontSize};
6
+ fill: ${r.textColor}
7
+ }
8
+ @keyframes edge-animation-frame {
9
+ from {
10
+ stroke-dashoffset: 0;
11
+ }
12
+ }
13
+ @keyframes dash {
14
+ to {
15
+ stroke-dashoffset: 0;
16
+ }
17
+ }
18
+ & .edge-animation-slow {
19
+ stroke-dasharray: 9,5 !important;
20
+ stroke-dashoffset: 900;
21
+ animation: dash 50s linear infinite;
22
+ stroke-linecap: round;
23
+ }
24
+ & .edge-animation-fast {
25
+ stroke-dasharray: 9,5 !important;
26
+ stroke-dashoffset: 900;
27
+ animation: dash 20s linear infinite;
28
+ stroke-linecap: round;
29
+ }
30
+ /* Classes common for multiple diagrams */
31
+
32
+ & .error-icon {
33
+ fill: ${r.errorBkgColor};
34
+ }
35
+ & .error-text {
36
+ fill: ${r.errorTextColor};
37
+ stroke: ${r.errorTextColor};
38
+ }
39
+
40
+ & .edge-thickness-normal {
41
+ stroke-width: 1px;
42
+ }
43
+ & .edge-thickness-thick {
44
+ stroke-width: 3.5px
45
+ }
46
+ & .edge-pattern-solid {
47
+ stroke-dasharray: 0;
48
+ }
49
+ & .edge-thickness-invisible {
50
+ stroke-width: 0;
51
+ fill: none;
52
+ }
53
+ & .edge-pattern-dashed{
54
+ stroke-dasharray: 3;
55
+ }
56
+ .edge-pattern-dotted {
57
+ stroke-dasharray: 2;
58
+ }
59
+
60
+ & .marker {
61
+ fill: ${r.lineColor};
62
+ stroke: ${r.lineColor};
63
+ }
64
+ & .marker.cross {
65
+ stroke: ${r.lineColor};
66
+ }
67
+
68
+ & svg {
69
+ font-family: ${r.fontFamily};
70
+ font-size: ${r.fontSize};
71
+ }
72
+ & p {
73
+ margin: 0
74
+ }
75
+
76
+ ${i}
77
+
78
+ ${t}
79
+ `},"getStyles"),pg=p((e,t)=>{t!==void 0&&(vi[e]=t)},"addStylesForDiagram"),gg=fg,Dl={};_p(Dl,{clear:()=>mg,getAccDescription:()=>Cg,getAccTitle:()=>xg,getDiagramTitle:()=>kg,setAccDescription:()=>bg,setAccTitle:()=>yg,setDiagramTitle:()=>wg});var Un="",Xn="",Zn="",Kn=p(e=>Vt(e,At()),"sanitizeText"),mg=p(()=>{Un="",Zn="",Xn=""},"clear"),yg=p(e=>{Un=Kn(e).replace(/^\s+/g,"")},"setAccTitle"),xg=p(()=>Un,"getAccTitle"),bg=p(e=>{Zn=Kn(e).replace(/\n\s+/g,`
80
+ `)},"setAccDescription"),Cg=p(()=>Zn,"getAccDescription"),wg=p(e=>{Xn=Kn(e)},"setDiagramTitle"),kg=p(()=>Xn,"getDiagramTitle"),Qs=F,vg=Yn,st=At,MS=Bl,AS=ur,Qn=p(e=>Vt(e,st()),"sanitizeText"),_g=dg,Sg=p(()=>Dl,"getCommonDb"),Ni={},zi=p((e,t,r)=>{var i;Ni[e]&&Qs.warn(`Diagram with id ${e} already registered. Overwriting.`),Ni[e]=t,r&&kl(e,r),pg(e,t.styles),(i=t.injectUtils)==null||i.call(t,Qs,vg,st,Qn,_g,Sg(),()=>{})},"registerDiagram"),rn=p(e=>{if(e in Ni)return Ni[e];throw new Tg(e)},"getDiagram"),lr,Tg=(lr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(lr,"DiagramNotFoundError"),lr),Bg={value:()=>{}};function Ol(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new _i(r)}function _i(e){this._=e}function Lg(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}_i.prototype=Ol.prototype={constructor:_i,on:function(e,t){var r=this._,i=Lg(e+"",r),a,n=-1,o=i.length;if(arguments.length<2){for(;++n<o;)if((a=(e=i[n]).type)&&(a=Mg(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++n<o;)if(a=(e=i[n]).type)r[a]=Js(r[a],e.name,t);else if(t==null)for(a in r)r[a]=Js(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new _i(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,n;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,n=i.length;a<n;++a)i[a].value.apply(t,r)}};function Mg(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function Js(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=Bg,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var an="http://www.w3.org/1999/xhtml";const to={svg:"http://www.w3.org/2000/svg",xhtml:an,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ya(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),to.hasOwnProperty(t)?{space:to[t],local:e}:e}function Ag(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===an&&t.documentElement.namespaceURI===an?t.createElement(e):t.createElementNS(r,e)}}function $g(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rl(e){var t=ya(e);return(t.local?$g:Ag)(t)}function Fg(){}function Jn(e){return e==null?Fg:function(){return this.querySelector(e)}}function Eg(e){typeof e!="function"&&(e=Jn(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=new Array(o),c,l,h=0;h<o;++h)(c=n[h])&&(l=e.call(c,c.__data__,h,n))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new Ht(i,this._parents)}function Dg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Og(){return[]}function Il(e){return e==null?Og:function(){return this.querySelectorAll(e)}}function Rg(e){return function(){return Dg(e.apply(this,arguments))}}function Ig(e){typeof e=="function"?e=Rg(e):e=Il(e);for(var t=this._groups,r=t.length,i=[],a=[],n=0;n<r;++n)for(var o=t[n],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(i.push(e.call(c,c.__data__,l,o)),a.push(c));return new Ht(i,a)}function Pl(e){return function(){return this.matches(e)}}function Nl(e){return function(t){return t.matches(e)}}var Pg=Array.prototype.find;function Ng(e){return function(){return Pg.call(this.children,e)}}function zg(){return this.firstElementChild}function Wg(e){return this.select(e==null?zg:Ng(typeof e=="function"?e:Nl(e)))}var qg=Array.prototype.filter;function Hg(){return Array.from(this.children)}function jg(e){return function(){return qg.call(this.children,e)}}function Yg(e){return this.selectAll(e==null?Hg:jg(typeof e=="function"?e:Nl(e)))}function Vg(e){typeof e!="function"&&(e=Pl(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],c,l=0;l<o;++l)(c=n[l])&&e.call(c,c.__data__,l,n)&&s.push(c);return new Ht(i,this._parents)}function zl(e){return new Array(e.length)}function Gg(){return new Ht(this._enter||this._groups.map(zl),this._parents)}function Wi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wi.prototype={constructor:Wi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ug(e){return function(){return e}}function Xg(e,t,r,i,a,n){for(var o=0,s,c=t.length,l=n.length;o<l;++o)(s=t[o])?(s.__data__=n[o],i[o]=s):r[o]=new Wi(e,n[o]);for(;o<c;++o)(s=t[o])&&(a[o]=s)}function Zg(e,t,r,i,a,n,o){var s,c,l=new Map,h=t.length,u=n.length,f=new Array(h),d;for(s=0;s<h;++s)(c=t[s])&&(f[s]=d=o.call(c,c.__data__,s,t)+"",l.has(d)?a[s]=c:l.set(d,c));for(s=0;s<u;++s)d=o.call(e,n[s],s,n)+"",(c=l.get(d))?(i[s]=c,c.__data__=n[s],l.delete(d)):r[s]=new Wi(e,n[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(f[s])===c&&(a[s]=c)}function Kg(e){return e.__data__}function Qg(e,t){if(!arguments.length)return Array.from(this,Kg);var r=t?Zg:Xg,i=this._parents,a=this._groups;typeof e!="function"&&(e=Ug(e));for(var n=a.length,o=new Array(n),s=new Array(n),c=new Array(n),l=0;l<n;++l){var h=i[l],u=a[l],f=u.length,d=Jg(e.call(h,h&&h.__data__,l,i)),g=d.length,m=s[l]=new Array(g),y=o[l]=new Array(g),x=c[l]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,w=0,_,k;b<g;++b)if(_=m[b]){for(b>=w&&(w=b+1);!(k=y[w])&&++w<g;);_._next=k||null}}return o=new Ht(o,i),o._enter=s,o._exit=c,o}function Jg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tm(){return new Ht(this._exit||this._groups.map(zl),this._parents)}function em(e,t,r){var i=this.enter(),a=this,n=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?n.remove():r(n),i&&a?i.merge(a).order():a}function rm(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,n=i.length,o=Math.min(a,n),s=new Array(a),c=0;c<o;++c)for(var l=r[c],h=i[c],u=l.length,f=s[c]=new Array(u),d,g=0;g<u;++g)(d=l[g]||h[g])&&(f[g]=d);for(;c<a;++c)s[c]=r[c];return new Ht(s,this._parents)}function im(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,n=i[a],o;--a>=0;)(o=i[a])&&(n&&o.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(o,n),n=o);return this}function am(e){e||(e=nm);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,a=new Array(i),n=0;n<i;++n){for(var o=r[n],s=o.length,c=a[n]=new Array(s),l,h=0;h<s;++h)(l=o[h])&&(c[h]=l);c.sort(t)}return new Ht(a,this._parents).order()}function nm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function om(){return Array.from(this)}function lm(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length;a<n;++a){var o=i[a];if(o)return o}return null}function cm(){let e=0;for(const t of this)++e;return e}function hm(){return!this.node()}function um(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],n=0,o=a.length,s;n<o;++n)(s=a[n])&&e.call(s,s.__data__,n,a);return this}function dm(e){return function(){this.removeAttribute(e)}}function fm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pm(e,t){return function(){this.setAttribute(e,t)}}function gm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mm(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ym(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function xm(e,t){var r=ya(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?fm:dm:typeof t=="function"?r.local?ym:mm:r.local?gm:pm)(r,t))}function Wl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bm(e){return function(){this.style.removeProperty(e)}}function Cm(e,t,r){return function(){this.style.setProperty(e,t,r)}}function wm(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function km(e,t,r){return arguments.length>1?this.each((t==null?bm:typeof t=="function"?wm:Cm)(e,t,r??"")):fr(this.node(),e)}function fr(e,t){return e.style.getPropertyValue(t)||Wl(e).getComputedStyle(e,null).getPropertyValue(t)}function vm(e){return function(){delete this[e]}}function _m(e,t){return function(){this[e]=t}}function Sm(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Tm(e,t){return arguments.length>1?this.each((t==null?vm:typeof t=="function"?Sm:_m)(e,t)):this.node()[e]}function ql(e){return e.trim().split(/^|\s+/)}function ts(e){return e.classList||new Hl(e)}function Hl(e){this._node=e,this._names=ql(e.getAttribute("class")||"")}Hl.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jl(e,t){for(var r=ts(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Yl(e,t){for(var r=ts(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function Bm(e){return function(){jl(this,e)}}function Lm(e){return function(){Yl(this,e)}}function Mm(e,t){return function(){(t.apply(this,arguments)?jl:Yl)(this,e)}}function Am(e,t){var r=ql(e+"");if(arguments.length<2){for(var i=ts(this.node()),a=-1,n=r.length;++a<n;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Mm:t?Bm:Lm)(r,t))}function $m(){this.textContent=""}function Fm(e){return function(){this.textContent=e}}function Em(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Dm(e){return arguments.length?this.each(e==null?$m:(typeof e=="function"?Em:Fm)(e)):this.node().textContent}function Om(){this.innerHTML=""}function Rm(e){return function(){this.innerHTML=e}}function Im(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Pm(e){return arguments.length?this.each(e==null?Om:(typeof e=="function"?Im:Rm)(e)):this.node().innerHTML}function Nm(){this.nextSibling&&this.parentNode.appendChild(this)}function zm(){return this.each(Nm)}function Wm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qm(){return this.each(Wm)}function Hm(e){var t=typeof e=="function"?e:Rl(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jm(){return null}function Ym(e,t){var r=typeof e=="function"?e:Rl(e),i=t==null?jm:typeof t=="function"?t:Jn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Vm(){var e=this.parentNode;e&&e.removeChild(this)}function Gm(){return this.each(Vm)}function Um(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xm(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zm(e){return this.select(e?Xm:Um)}function Km(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Qm(e){return function(t){e.call(this,t,this.__data__)}}function Jm(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function ty(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,n;r<a;++r)n=t[r],(!e.type||n.type===e.type)&&n.name===e.name?this.removeEventListener(n.type,n.listener,n.options):t[++i]=n;++i?t.length=i:delete this.__on}}}function ey(e,t,r){return function(){var i=this.__on,a,n=Qm(t);if(i){for(var o=0,s=i.length;o<s;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=n,a.options=r),a.value=t;return}}this.addEventListener(e.type,n,r),a={type:e.type,name:e.name,value:t,listener:n,options:r},i?i.push(a):this.__on=[a]}}function ry(e,t,r){var i=Jm(e+""),a,n=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(a=0,h=s[c];a<n;++a)if((o=i[a]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?ey:ty,a=0;a<n;++a)this.each(s(i[a],t,r));return this}function Vl(e,t,r){var i=Wl(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function iy(e,t){return function(){return Vl(this,e,t)}}function ay(e,t){return function(){return Vl(this,e,t.apply(this,arguments))}}function ny(e,t){return this.each((typeof t=="function"?ay:iy)(e,t))}function*sy(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length,o;a<n;++a)(o=i[a])&&(yield o)}var Gl=[null];function Ht(e,t){this._groups=e,this._parents=t}function ni(){return new Ht([[document.documentElement]],Gl)}function oy(){return this}Ht.prototype=ni.prototype={constructor:Ht,select:Eg,selectAll:Ig,selectChild:Wg,selectChildren:Yg,filter:Vg,data:Qg,enter:Gg,exit:tm,join:em,merge:rm,selection:oy,order:im,sort:am,call:sm,nodes:om,node:lm,size:cm,empty:hm,each:um,attr:xm,style:km,property:Tm,classed:Am,text:Dm,html:Pm,raise:zm,lower:qm,append:Hm,insert:Ym,remove:Gm,clone:Zm,datum:Km,on:ry,dispatch:ny,[Symbol.iterator]:sy};function rt(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],Gl)}var eo=180/Math.PI,nn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ul(e,t,r,i,a,n){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),e*i<t*r&&(e=-e,t=-t,c=-c,o=-o),{translateX:a,translateY:n,rotate:Math.atan2(t,e)*eo,skewX:Math.atan(c)*eo,scaleX:o,scaleY:s}}var di;function ly(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?nn:Ul(t.a,t.b,t.c,t.d,t.e,t.f)}function cy(e){return e==null||(di||(di=document.createElementNS("http://www.w3.org/2000/svg","g")),di.setAttribute("transform",e),!(e=di.transform.baseVal.consolidate()))?nn:(e=e.matrix,Ul(e.a,e.b,e.c,e.d,e.e,e.f))}function Xl(e,t,r,i){function a(l){return l.length?l.pop()+" ":""}function n(l,h,u,f,d,g){if(l!==u||h!==f){var m=d.push("translate(",null,t,null,r);g.push({i:m-4,x:Ae(l,u)},{i:m-2,x:Ae(h,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(l,h,u,f){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),f.push({i:u.push(a(u)+"rotate(",null,i)-2,x:Ae(l,h)})):h&&u.push(a(u)+"rotate("+h+i)}function s(l,h,u,f){l!==h?f.push({i:u.push(a(u)+"skewX(",null,i)-2,x:Ae(l,h)}):h&&u.push(a(u)+"skewX("+h+i)}function c(l,h,u,f,d,g){if(l!==u||h!==f){var m=d.push(a(d)+"scale(",null,",",null,")");g.push({i:m-4,x:Ae(l,u)},{i:m-2,x:Ae(h,f)})}else(u!==1||f!==1)&&d.push(a(d)+"scale("+u+","+f+")")}return function(l,h){var u=[],f=[];return l=e(l),h=e(h),n(l.translateX,l.translateY,h.translateX,h.translateY,u,f),o(l.rotate,h.rotate,u,f),s(l.skewX,h.skewX,u,f),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,f),l=h=null,function(d){for(var g=-1,m=f.length,y;++g<m;)u[(y=f[g]).i]=y.x(d);return u.join("")}}}var hy=Xl(ly,"px, ","px)","deg)"),uy=Xl(cy,", ",")",")"),pr=0,Er=0,Tr=0,Zl=1e3,qi,Dr,Hi=0,ze=0,xa=0,Gr=typeof performance=="object"&&performance.now?performance:Date,Kl=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function es(){return ze||(Kl(dy),ze=Gr.now()+xa)}function dy(){ze=0}function ji(){this._call=this._time=this._next=null}ji.prototype=Ql.prototype={constructor:ji,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?es():+r)+(t==null?0:+t),!this._next&&Dr!==this&&(Dr?Dr._next=this:qi=this,Dr=this),this._call=e,this._time=r,sn()},stop:function(){this._call&&(this._call=null,this._time=1/0,sn())}};function Ql(e,t,r){var i=new ji;return i.restart(e,t,r),i}function fy(){es(),++pr;for(var e=qi,t;e;)(t=ze-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pr}function ro(){ze=(Hi=Gr.now())+xa,pr=Er=0;try{fy()}finally{pr=0,gy(),ze=0}}function py(){var e=Gr.now(),t=e-Hi;t>Zl&&(xa-=t,Hi=e)}function gy(){for(var e,t=qi,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:qi=r);Dr=e,sn(i)}function sn(e){if(!pr){Er&&(Er=clearTimeout(Er));var t=e-ze;t>24?(e<1/0&&(Er=setTimeout(ro,e-Gr.now()-xa)),Tr&&(Tr=clearInterval(Tr))):(Tr||(Hi=Gr.now(),Tr=setInterval(py,Zl)),pr=1,Kl(ro))}}function io(e,t,r){var i=new ji;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var my=Ol("start","end","cancel","interrupt"),yy=[],Jl=0,ao=1,on=2,Si=3,no=4,ln=5,Ti=6;function ba(e,t,r,i,a,n){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;xy(e,r,{name:t,index:i,group:a,on:my,tween:yy,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:Jl})}function rs(e,t){var r=Jt(e,t);if(r.state>Jl)throw new Error("too late; already scheduled");return r}function se(e,t){var r=Jt(e,t);if(r.state>Si)throw new Error("too late; already running");return r}function Jt(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function xy(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Ql(n,0,r.time);function n(l){r.state=ao,r.timer.restart(o,r.delay,r.time),r.delay<=l&&o(l-r.delay)}function o(l){var h,u,f,d;if(r.state!==ao)return c();for(h in i)if(d=i[h],d.name===r.name){if(d.state===Si)return io(o);d.state===no?(d.state=Ti,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=Ti,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(io(function(){r.state===Si&&(r.state=no,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=on,r.on.call("start",e,e.__data__,r.index,r.group),r.state===on){for(r.state=Si,a=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function s(l){for(var h=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=ln,1),u=-1,f=a.length;++u<f;)a[u].call(e,h);r.state===ln&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ti,r.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function by(e,t){var r=e.__transition,i,a,n=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){n=!1;continue}a=i.state>on&&i.state<ln,i.state=Ti,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}n&&delete e.__transition}}function Cy(e){return this.each(function(){by(this,e)})}function wy(e,t){var r,i;return function(){var a=se(this,e),n=a.tween;if(n!==r){i=r=n;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function ky(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var n=se(this,e),o=n.tween;if(o!==i){a=(i=o).slice();for(var s={name:t,value:r},c=0,l=a.length;c<l;++c)if(a[c].name===t){a[c]=s;break}c===l&&a.push(s)}n.tween=a}}function vy(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Jt(this.node(),r).tween,a=0,n=i.length,o;a<n;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?wy:ky)(r,e,t))}function is(e,t,r){var i=e._id;return e.each(function(){var a=se(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return Jt(a,i).value[t]}}function tc(e,t){var r;return(typeof t=="number"?Ae:t instanceof js?Ys:(r=js(t))?(t=r,Ys):yp)(e,t)}function _y(e){return function(){this.removeAttribute(e)}}function Sy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ty(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttribute(e);return o===a?null:o===i?n:n=t(i=o,r)}}function By(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?n:n=t(i=o,r)}}function Ly(e,t,r){var i,a,n;return function(){var o,s=r(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===i&&c===a?n:(a=c,n=t(i=o,s)))}}function My(e,t,r){var i,a,n;return function(){var o,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===i&&c===a?n:(a=c,n=t(i=o,s)))}}function Ay(e,t){var r=ya(e),i=r==="transform"?uy:tc;return this.attrTween(e,typeof t=="function"?(r.local?My:Ly)(r,i,is(this,"attr."+e,t)):t==null?(r.local?Sy:_y)(r):(r.local?By:Ty)(r,i,t))}function $y(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Fy(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Ey(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&Fy(e,n)),r}return a._value=t,a}function Dy(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&$y(e,n)),r}return a._value=t,a}function Oy(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=ya(e);return this.tween(r,(i.local?Ey:Dy)(i,t))}function Ry(e,t){return function(){rs(this,e).delay=+t.apply(this,arguments)}}function Iy(e,t){return t=+t,function(){rs(this,e).delay=t}}function Py(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ry:Iy)(t,e)):Jt(this.node(),t).delay}function Ny(e,t){return function(){se(this,e).duration=+t.apply(this,arguments)}}function zy(e,t){return t=+t,function(){se(this,e).duration=t}}function Wy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ny:zy)(t,e)):Jt(this.node(),t).duration}function qy(e,t){if(typeof t!="function")throw new Error;return function(){se(this,e).ease=t}}function Hy(e){var t=this._id;return arguments.length?this.each(qy(t,e)):Jt(this.node(),t).ease}function jy(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;se(this,e).ease=r}}function Yy(e){if(typeof e!="function")throw new Error;return this.each(jy(this._id,e))}function Vy(e){typeof e!="function"&&(e=Pl(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],c,l=0;l<o;++l)(c=n[l])&&e.call(c,c.__data__,l,n)&&s.push(c);return new pe(i,this._parents,this._name,this._id)}function Gy(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,n=Math.min(i,a),o=new Array(i),s=0;s<n;++s)for(var c=t[s],l=r[s],h=c.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=c[d]||l[d])&&(u[d]=f);for(;s<i;++s)o[s]=t[s];return new pe(o,this._parents,this._name,this._id)}function Uy(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Xy(e,t,r){var i,a,n=Uy(t)?rs:se;return function(){var o=n(this,e),s=o.on;s!==i&&(a=(i=s).copy()).on(t,r),o.on=a}}function Zy(e,t){var r=this._id;return arguments.length<2?Jt(this.node(),r).on.on(e):this.each(Xy(r,e,t))}function Ky(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Qy(){return this.on("end.remove",Ky(this._id))}function Jy(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Jn(e));for(var i=this._groups,a=i.length,n=new Array(a),o=0;o<a;++o)for(var s=i[o],c=s.length,l=n[o]=new Array(c),h,u,f=0;f<c;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,ba(l[f],t,r,f,l,Jt(h,r)));return new pe(n,this._parents,t,r)}function t0(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Il(e));for(var i=this._groups,a=i.length,n=[],o=[],s=0;s<a;++s)for(var c=i[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var f=e.call(h,h.__data__,u,c),d,g=Jt(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&ba(d,t,r,m,f,g);n.push(f),o.push(h)}return new pe(n,o,t,r)}var e0=ni.prototype.constructor;function r0(){return new e0(this._groups,this._parents)}function i0(e,t){var r,i,a;return function(){var n=fr(this,e),o=(this.style.removeProperty(e),fr(this,e));return n===o?null:n===r&&o===i?a:a=t(r=n,i=o)}}function ec(e){return function(){this.style.removeProperty(e)}}function a0(e,t,r){var i,a=r+"",n;return function(){var o=fr(this,e);return o===a?null:o===i?n:n=t(i=o,r)}}function n0(e,t,r){var i,a,n;return function(){var o=fr(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),fr(this,e))),o===c?null:o===i&&c===a?n:(a=c,n=t(i=o,s))}}function s0(e,t){var r,i,a,n="style."+t,o="end."+n,s;return function(){var c=se(this,e),l=c.on,h=c.value[n]==null?s||(s=ec(t)):void 0;(l!==r||a!==h)&&(i=(r=l).copy()).on(o,a=h),c.on=i}}function o0(e,t,r){var i=(e+="")=="transform"?hy:tc;return t==null?this.styleTween(e,i0(e,i)).on("end.style."+e,ec(e)):typeof t=="function"?this.styleTween(e,n0(e,i,is(this,"style."+e,t))).each(s0(this._id,e)):this.styleTween(e,a0(e,i,t),r).on("end.style."+e,null)}function l0(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function c0(e,t,r){var i,a;function n(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&l0(e,o,r)),i}return n._value=t,n}function h0(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,c0(e,t,r??""))}function u0(e){return function(){this.textContent=e}}function d0(e){return function(){var t=e(this);this.textContent=t??""}}function f0(e){return this.tween("text",typeof e=="function"?d0(is(this,"text",e)):u0(e==null?"":e+""))}function p0(e){return function(t){this.textContent=e.call(this,t)}}function g0(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&p0(a)),t}return i._value=e,i}function m0(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,g0(e))}function y0(){for(var e=this._name,t=this._id,r=rc(),i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var h=Jt(c,t);ba(c,e,r,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new pe(i,this._parents,e,r)}function x0(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(n,o){var s={value:o},c={value:function(){--a===0&&n()}};r.each(function(){var l=se(this,i),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),a===0&&n()})}var b0=0;function pe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function rc(){return++b0}var ce=ni.prototype;pe.prototype={constructor:pe,select:Jy,selectAll:t0,selectChild:ce.selectChild,selectChildren:ce.selectChildren,filter:Vy,merge:Gy,selection:r0,transition:y0,call:ce.call,nodes:ce.nodes,node:ce.node,size:ce.size,empty:ce.empty,each:ce.each,on:Zy,attr:Ay,attrTween:Oy,style:o0,styleTween:h0,text:f0,textTween:m0,remove:Qy,tween:vy,delay:Py,duration:Wy,ease:Hy,easeVarying:Yy,end:x0,[Symbol.iterator]:ce[Symbol.iterator]};function C0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var w0={time:null,delay:0,duration:250,ease:C0};function k0(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function v0(e){var t,r;e instanceof pe?(t=e._id,e=e._name):(t=rc(),(r=w0).time=es(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,c,l=0;l<s;++l)(c=o[l])&&ba(c,e,t,l,o,r||k0(c,t));return new pe(i,this._parents,e,t)}ni.prototype.interrupt=Cy;ni.prototype.transition=v0;function ic(e,t){this._basis=new ol(e),this._beta=t}ic.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],n=e[r]-i,o=t[r]-a,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+c*n),this._beta*t[s]+(1-this._beta)*(a+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const _0=function e(t){function r(i){return t===1?new ol(i):new ic(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Yi(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function as(e,t){this._context=e,this._k=(1-t)/6}as.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:Yi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Yi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ac=function e(t){function r(i){return new as(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ns(e,t){this._context=e,this._k=(1-t)/6}ns.prototype={areaStart:Oi,areaEnd:Oi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Yi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const S0=function e(t){function r(i){return new ns(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ss(e,t){this._context=e,this._k=(1-t)/6}ss.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Yi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const T0=function e(t){function r(i){return new ss(i,t)}return r.tension=function(i){return e(+i)},r}(0);function os(e,t,r){var i=e._x1,a=e._y1,n=e._x2,o=e._y2;if(e._l01_a>Vs){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Vs){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);n=(n*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,n,o,e._x2,e._y2)}function nc(e,t){this._context=e,this._alpha=t}nc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:os(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sc=function e(t){function r(i){return t?new nc(i,t):new as(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function oc(e,t){this._context=e,this._alpha=t}oc.prototype={areaStart:Oi,areaEnd:Oi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:os(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const B0=function e(t){function r(i){return t?new oc(i,t):new ns(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function lc(e,t){this._context=e,this._alpha=t}lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:os(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const L0=function e(t){function r(i){return t?new lc(i,t):new ss(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Or(e,t,r){this.k=e,this.x=t,this.y=r}Or.prototype={constructor:Or,scale:function(e){return e===1?this:new Or(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Or(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Or.prototype;var M0=p(e=>{var a;const{securityLevel:t}=st();let r=rt("body");if(t==="sandbox"){const o=((a=rt(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=rt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function ls(e){return typeof e>"u"||e===null}p(ls,"isNothing");function cc(e){return typeof e=="object"&&e!==null}p(cc,"isObject");function hc(e){return Array.isArray(e)?e:ls(e)?[]:[e]}p(hc,"toArray");function uc(e,t){var r,i,a,n;if(t)for(n=Object.keys(t),r=0,i=n.length;r<i;r+=1)a=n[r],e[a]=t[a];return e}p(uc,"extend");function dc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(dc,"repeat");function fc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(fc,"isNegativeZero");var A0=ls,$0=cc,F0=hc,E0=dc,D0=fc,O0=uc,Ct={isNothing:A0,isObject:$0,toArray:F0,repeat:E0,isNegativeZero:D0,extend:O0};function cs(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
81
+
82
+ `+e.mark.snippet),i+" "+r):i}p(cs,"formatError");function gr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=cs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(gr,"YAMLException$1");gr.prototype=Object.create(Error.prototype);gr.prototype.constructor=gr;gr.prototype.toString=p(function(t){return this.name+": "+cs(this,t)},"toString");var zt=gr;function Bi(e,t,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-t>s&&(n=" ... ",t=i-s+n.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:n+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+n.length}}p(Bi,"getLine");function Li(e,t){return Ct.repeat(" ",t-e.length)+e}p(Li,"padStart");function pc(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],n,o=-1;n=r.exec(e.buffer);)a.push(n.index),i.push(n.index+n[0].length),e.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",c,l,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=Bi(e.buffer,i[o-c],a[o-c],e.position-(i[o]-i[o-c]),u),s=Ct.repeat(" ",t.indent)+Li((e.line-c+1).toString(),h)+" | "+l.str+`
83
+ `+s;for(l=Bi(e.buffer,i[o],a[o],e.position,u),s+=Ct.repeat(" ",t.indent)+Li((e.line+1).toString(),h)+" | "+l.str+`
84
+ `,s+=Ct.repeat("-",t.indent+h+3+l.pos)+`^
85
+ `,c=1;c<=t.linesAfter&&!(o+c>=a.length);c++)l=Bi(e.buffer,i[o+c],a[o+c],e.position-(i[o]-i[o+c]),u),s+=Ct.repeat(" ",t.indent)+Li((e.line+c+1).toString(),h)+" | "+l.str+`
86
+ `;return s.replace(/\n$/,"")}p(pc,"makeSnippet");var R0=pc,I0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],P0=["scalar","sequence","mapping"];function gc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(gc,"compileStyleAliases");function mc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(I0.indexOf(r)===-1)throw new zt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=gc(t.styleAliases||null),P0.indexOf(this.kind)===-1)throw new zt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(mc,"Type$1");var $t=mc;function cn(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(n,o){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=o)}),r[a]=i}),r}p(cn,"compileList");function yc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(yc,"compileMap");function Vi(e){return this.extend(e)}p(Vi,"Schema$1");Vi.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof $t)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new zt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof $t))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new zt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new zt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(n){if(!(n instanceof $t))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Vi.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=cn(a,"implicit"),a.compiledExplicit=cn(a,"explicit"),a.compiledTypeMap=yc(a.compiledImplicit,a.compiledExplicit),a},"extend");var N0=Vi,z0=new $t("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),W0=new $t("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),q0=new $t("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),H0=new N0({explicit:[z0,W0,q0]});function xc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(xc,"resolveYamlNull");function bc(){return null}p(bc,"constructYamlNull");function Cc(e){return e===null}p(Cc,"isNull");var j0=new $t("tag:yaml.org,2002:null",{kind:"scalar",resolve:xc,construct:bc,predicate:Cc,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function wc(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(wc,"resolveYamlBoolean");function kc(e){return e==="true"||e==="True"||e==="TRUE"}p(kc,"constructYamlBoolean");function vc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(vc,"isBoolean");var Y0=new $t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:wc,construct:kc,predicate:vc,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function _c(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(_c,"isHexCode");function Sc(e){return 48<=e&&e<=55}p(Sc,"isOctCode");function Tc(e){return 48<=e&&e<=57}p(Tc,"isDecCode");function Bc(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!_c(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Sc(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Tc(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(Bc,"resolveYamlInteger");function Lc(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Lc,"constructYamlInteger");function Mc(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ct.isNegativeZero(e)}p(Mc,"isInteger");var V0=new $t("tag:yaml.org,2002:int",{kind:"scalar",resolve:Bc,construct:Lc,predicate:Mc,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),G0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ac(e){return!(e===null||!G0.test(e)||e[e.length-1]==="_")}p(Ac,"resolveYamlFloat");function $c(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p($c,"constructYamlFloat");var U0=/^[-+]?[0-9]+e/;function Fc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),U0.test(r)?r.replace("e",".e"):r}p(Fc,"representYamlFloat");function Ec(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ct.isNegativeZero(e))}p(Ec,"isFloat");var X0=new $t("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ac,construct:$c,predicate:Ec,represent:Fc,defaultStyle:"lowercase"}),Dc=H0.extend({implicit:[j0,Y0,V0,X0]}),Z0=Dc,Oc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Rc=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 Ic(e){return e===null?!1:Oc.exec(e)!==null||Rc.exec(e)!==null}p(Ic,"resolveYamlTimestamp");function Pc(e){var t,r,i,a,n,o,s,c=0,l=null,h,u,f;if(t=Oc.exec(e),t===null&&(t=Rc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(n=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,a,n,o,s,c)),l&&f.setTime(f.getTime()-l),f}p(Pc,"constructYamlTimestamp");function Nc(e){return e.toISOString()}p(Nc,"representYamlTimestamp");var K0=new $t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ic,construct:Pc,instanceOf:Date,represent:Nc});function zc(e){return e==="<<"||e===null}p(zc,"resolveYamlMerge");var Q0=new $t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:zc}),hs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
87
+ \r`;function Wc(e){if(e===null)return!1;var t,r,i=0,a=e.length,n=hs;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Wc,"resolveYamlBinary");function qc(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,n=hs,o=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|n.indexOf(i.charAt(t));return r=a%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(qc,"constructYamlBinary");function Hc(e){var t="",r=0,i,a,n=e.length,o=hs;for(i=0;i<n;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=n%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Hc,"representYamlBinary");function jc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(jc,"isBinary");var J0=new $t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Wc,construct:qc,predicate:jc,represent:Hc}),tx=Object.prototype.hasOwnProperty,ex=Object.prototype.toString;function Yc(e){if(e===null)return!0;var t=[],r,i,a,n,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(a=s[r],o=!1,ex.call(a)!=="[object Object]")return!1;for(n in a)if(tx.call(a,n))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}p(Yc,"resolveYamlOmap");function Vc(e){return e!==null?e:[]}p(Vc,"constructYamlOmap");var rx=new $t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Yc,construct:Vc}),ix=Object.prototype.toString;function Gc(e){if(e===null)return!0;var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],ix.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;n[t]=[a[0],i[a[0]]]}return!0}p(Gc,"resolveYamlPairs");function Uc(e){if(e===null)return[];var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),n[t]=[a[0],i[a[0]]];return n}p(Uc,"constructYamlPairs");var ax=new $t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Gc,construct:Uc}),nx=Object.prototype.hasOwnProperty;function Xc(e){if(e===null)return!0;var t,r=e;for(t in r)if(nx.call(r,t)&&r[t]!==null)return!1;return!0}p(Xc,"resolveYamlSet");function Zc(e){return e!==null?e:{}}p(Zc,"constructYamlSet");var sx=new $t("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xc,construct:Zc}),Kc=Z0.extend({implicit:[K0,Q0],explicit:[J0,rx,ax,sx]}),ke=Object.prototype.hasOwnProperty,Gi=1,Qc=2,Jc=3,Ui=4,Na=1,ox=2,so=3,lx=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cx=/[\x85\u2028\u2029]/,hx=/[,\[\]\{\}]/,th=/^(?:!|!!|![a-z\-]+!)$/i,eh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function hn(e){return Object.prototype.toString.call(e)}p(hn,"_class");function Kt(e){return e===10||e===13}p(Kt,"is_EOL");function we(e){return e===9||e===32}p(we,"is_WHITE_SPACE");function Rt(e){return e===9||e===32||e===10||e===13}p(Rt,"is_WS_OR_EOL");function De(e){return e===44||e===91||e===93||e===123||e===125}p(De,"is_FLOW_INDICATOR");function rh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(rh,"fromHexCode");function ih(e){return e===120?2:e===117?4:e===85?8:0}p(ih,"escapedHexLen");function ah(e){return 48<=e&&e<=57?e-48:-1}p(ah,"fromDecimalCode");function un(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
88
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(un,"simpleEscapeSequence");function nh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(nh,"charFromCodepoint");var sh=new Array(256),oh=new Array(256);for(Me=0;Me<256;Me++)sh[Me]=un(Me)?1:0,oh[Me]=un(Me);var Me;function lh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Kc,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(lh,"State$1");function us(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=R0(r),new zt(t,r)}p(us,"generateError");function G(e,t){throw us(e,t)}p(G,"throwError");function Ur(e,t){e.onWarning&&e.onWarning.call(null,us(e,t))}p(Ur,"throwWarning");var oo={YAML:p(function(t,r,i){var a,n,o;t.version!==null&&G(t,"duplication of %YAML directive"),i.length!==1&&G(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&G(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),o=parseInt(a[2],10),n!==1&&G(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ur(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,n;i.length!==2&&G(t,"TAG directive accepts exactly two arguments"),a=i[0],n=i[1],th.test(a)||G(t,"ill-formed tag handle (first argument) of the TAG directive"),ke.call(t.tagMap,a)&&G(t,'there is a previously declared suffix for "'+a+'" tag handle'),eh.test(n)||G(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{G(t,"tag prefix is malformed: "+n)}t.tagMap[a]=n},"handleTagDirective")};function fe(e,t,r,i){var a,n,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(a=0,n=s.length;a<n;a+=1)o=s.charCodeAt(a),o===9||32<=o&&o<=1114111||G(e,"expected valid JSON character");else lx.test(s)&&G(e,"the stream contains non-printable characters");e.result+=s}}p(fe,"captureSegment");function dn(e,t,r,i){var a,n,o,s;for(Ct.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,s=a.length;o<s;o+=1)n=a[o],ke.call(t,n)||(t[n]=r[n],i[n]=!0)}p(dn,"mergeMappings");function Oe(e,t,r,i,a,n,o,s,c){var l,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),l=0,h=a.length;l<h;l+=1)Array.isArray(a[l])&&G(e,"nested arrays are not supported inside keys"),typeof a=="object"&&hn(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&hn(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(l=0,h=n.length;l<h;l+=1)dn(e,t,n[l],r);else dn(e,t,n,r);else!e.json&&!ke.call(r,a)&&ke.call(t,a)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,G(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[a]=n,delete r[a];return t}p(Oe,"storeMappingPair");function Ca(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ca,"readLineBreak");function mt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;we(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Kt(a))for(Ca(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ur(e,"deficient indentation"),i}p(mt,"skipSeparationSpace");function si(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Rt(r)))}p(si,"testDocumentSeparator");function wa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ct.repeat(`
89
+ `,t-1))}p(wa,"writeFoldedLines");function ch(e,t,r){var i,a,n,o,s,c,l,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Rt(d)||De(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),Rt(a)||r&&De(a)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,s=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Rt(a)||r&&De(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Rt(i))break}else{if(e.position===e.lineStart&&si(e)||r&&De(d))break;if(Kt(d))if(c=e.line,l=e.lineStart,h=e.lineIndent,mt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}s&&(fe(e,n,o,!1),wa(e,e.line-c),n=o=e.position,s=!1),we(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return fe(e,n,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(ch,"readPlainScalar");function hh(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(fe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else Kt(r)?(fe(e,i,a,!0),wa(e,mt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&si(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}p(hh,"readSingleQuotedScalar");function uh(e,t){var r,i,a,n,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return fe(e,r,e.position,!0),e.position++,!0;if(s===92){if(fe(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Kt(s))mt(e,!1,t);else if(s<256&&sh[s])e.result+=oh[s],e.position++;else if((o=ih(s))>0){for(a=o,n=0;a>0;a--)s=e.input.charCodeAt(++e.position),(o=rh(s))>=0?n=(n<<4)+o:G(e,"expected hexadecimal character");e.result+=nh(n),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else Kt(s)?(fe(e,r,i,!0),wa(e,mt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&si(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}p(uh,"readDoubleQuotedScalar");function dh(e,t){var r=!0,i,a,n,o=e.tag,s,c=e.anchor,l,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(mt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),Rt(l)&&(u=f=!0,e.position++,mt(e,!0,t))),i=e.line,a=e.lineStart,n=e.position,We(e,t,Gi,!1,!0),y=e.tag,m=e.result,mt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),mt(e,!0,t),We(e,t,Gi,!1,!0),x=e.result),d?Oe(e,s,g,y,m,x,i,a,n):u?s.push(Oe(e,null,g,y,m,x,i,a,n)):s.push(m),mt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}G(e,"unexpected end of the stream within a flow collection")}p(dh,"readFlowCollection");function fh(e,t){var r,i,a=Na,n=!1,o=!1,s=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Na===a?a=u===43?so:ox:G(e,"repeat of a chomping mode identifier");else if((h=ah(u))>=0)h===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?G(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(we(u)){do u=e.input.charCodeAt(++e.position);while(we(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Kt(u)&&u!==0)}for(;u!==0;){for(Ca(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),Kt(u)){c++;continue}if(e.lineIndent<s){a===so?e.result+=Ct.repeat(`
90
+ `,n?1+c:c):a===Na&&n&&(e.result+=`
91
+ `);break}for(i?we(u)?(l=!0,e.result+=Ct.repeat(`
92
+ `,n?1+c:c)):l?(l=!1,e.result+=Ct.repeat(`
93
+ `,c+1)):c===0?n&&(e.result+=" "):e.result+=Ct.repeat(`
94
+ `,c):e.result+=Ct.repeat(`
95
+ `,n?1+c:c),n=!0,o=!0,c=0,r=e.position;!Kt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}return!0}p(fh,"readBlockScalar");function fn(e,t){var r,i=e.tag,a=e.anchor,n=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Rt(o))));){if(s=!0,e.position++,mt(e,!0,-1)&&e.lineIndent<=t){n.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,We(e,t,Jc,!1,!0),n.push(e.result),mt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}p(fn,"readBlockSequence");function ph(e,t,r){var i,a,n,o,s,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),n=e.line,(b===63||b===58)&&Rt(i))b===63?(y&&(Oe(e,u,f,d,g,null,o,s,c),d=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,c=e.position,!We(e,r,Qc,!1,!0))break;if(e.line===n){for(b=e.input.charCodeAt(e.position);we(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Rt(b)||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Oe(e,u,f,d,g,null,o,s,c),d=g=m=null),x=!0,y=!1,a=!1,d=e.tag,g=e.result;else if(x)G(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)G(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===n||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,c=e.position),We(e,t,Ui,!0,a)&&(y?g=e.result:m=e.result),y||(Oe(e,u,f,d,g,m,o,s,c),d=g=m=null),mt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===n||e.lineIndent>t)&&b!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Oe(e,u,f,d,g,null,o,s,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}p(ph,"readBlockMapping");function gh(e){var t,r=!1,i=!1,a,n,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Rt(o);)o===33&&(i?G(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),th.test(a)||G(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),hx.test(n)&&G(e,"tag suffix cannot contain flow indicator characters")}n&&!eh.test(n)&&G(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{G(e,"tag name is malformed: "+n)}return r?e.tag=n:ke.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:G(e,'undeclared tag handle "'+a+'"'),!0}p(gh,"readTagProperty");function mh(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Rt(r)&&!De(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(mh,"readAnchorProperty");function yh(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Rt(i)&&!De(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ke.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],mt(e,!0,-1),!0}p(yh,"readAlias");function We(e,t,r,i,a){var n,o,s,c=1,l=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=o=s=Ui===r||Jc===r,i&&mt(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;gh(e)||mh(e);)mt(e,!0,-1)?(l=!0,s=n,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||a),(c===1||Ui===r)&&(Gi===r||Qc===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?s&&(fn(e,y)||ph(e,y,m))||dh(e,m)?h=!0:(o&&fh(e,m)||hh(e,m)||uh(e,m)?h=!0:yh(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&G(e,"alias node should not have any properties")):ch(e,m,Gi===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=s&&fn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ke.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(We,"composeNode");function xh(e){var t=e.position,r,i,a,n=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(mt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(n=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Rt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&G(e,"directive name must not be less than one character in length");o!==0;){for(;we(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Kt(o));break}if(Kt(o))break;for(r=e.position;o!==0&&!Rt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Ca(e),ke.call(oo,i)?oo[i](e,i,a):Ur(e,'unknown document directive "'+i+'"')}if(mt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,mt(e,!0,-1)):n&&G(e,"directives end mark is expected"),We(e,e.lineIndent-1,Ui,!1,!0),mt(e,!0,-1),e.checkLineBreaks&&cx.test(e.input.slice(t,e.position))&&Ur(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&si(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,mt(e,!0,-1));return}if(e.position<e.length-1)G(e,"end of the stream or a document separator is expected");else return}p(xh,"readDocument");function ds(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
96
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new lh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)xh(r);return r.documents}p(ds,"loadDocuments");function ux(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=ds(e,r);if(typeof t!="function")return i;for(var a=0,n=i.length;a<n;a+=1)t(i[a])}p(ux,"loadAll$1");function bh(e,t){var r=ds(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zt("expected a single document in the stream, but found more")}}p(bh,"load$1");var dx=bh,fx={load:dx},Ch=Object.prototype.toString,wh=Object.prototype.hasOwnProperty,fs=65279,px=9,Xr=10,gx=13,mx=32,yx=33,xx=34,pn=35,bx=37,Cx=38,wx=39,kx=42,kh=44,vx=45,Xi=58,_x=61,Sx=62,Tx=63,Bx=64,vh=91,_h=93,Lx=96,Sh=123,Mx=124,Th=125,Et={};Et[0]="\\0";Et[7]="\\a";Et[8]="\\b";Et[9]="\\t";Et[10]="\\n";Et[11]="\\v";Et[12]="\\f";Et[13]="\\r";Et[27]="\\e";Et[34]='\\"';Et[92]="\\\\";Et[133]="\\N";Et[160]="\\_";Et[8232]="\\L";Et[8233]="\\P";var Ax=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$x=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Bh(e,t){var r,i,a,n,o,s,c;if(t===null)return{};for(r={},i=Object.keys(t),a=0,n=i.length;a<n;a+=1)o=i[a],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&wh.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[o]=s;return r}p(Bh,"compileStyleMap");function Lh(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new zt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ct.repeat("0",i-t.length)+t}p(Lh,"encodeHex");var Fx=1,Zr=2;function Mh(e){this.schema=e.schema||Kc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ct.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Bh(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==='"'?Zr:Fx,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}p(Mh,"State");function gn(e,t){for(var r=Ct.repeat(" ",t),i=0,a=-1,n="",o,s=e.length;i<s;)a=e.indexOf(`
97
+ `,i),a===-1?(o=e.slice(i),i=s):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
98
+ `&&(n+=r),n+=o;return n}p(gn,"indentString");function Zi(e,t){return`
99
+ `+Ct.repeat(" ",e.indent*t)}p(Zi,"generateNextLine");function Ah(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}p(Ah,"testImplicitResolving");function Kr(e){return e===mx||e===px}p(Kr,"isWhitespace");function mr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fs||65536<=e&&e<=1114111}p(mr,"isPrintable");function mn(e){return mr(e)&&e!==fs&&e!==gx&&e!==Xr}p(mn,"isNsCharOrWhitespace");function yn(e,t,r){var i=mn(e),a=i&&!Kr(e);return(r?i:i&&e!==kh&&e!==vh&&e!==_h&&e!==Sh&&e!==Th)&&e!==pn&&!(t===Xi&&!a)||mn(t)&&!Kr(t)&&e===pn||t===Xi&&a}p(yn,"isPlainSafe");function $h(e){return mr(e)&&e!==fs&&!Kr(e)&&e!==vx&&e!==Tx&&e!==Xi&&e!==kh&&e!==vh&&e!==_h&&e!==Sh&&e!==Th&&e!==pn&&e!==Cx&&e!==kx&&e!==yx&&e!==Mx&&e!==_x&&e!==Sx&&e!==wx&&e!==xx&&e!==bx&&e!==Bx&&e!==Lx}p($h,"isPlainSafeFirst");function Fh(e){return!Kr(e)&&e!==Xi}p(Fh,"isPlainSafeLast");function Je(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Je,"codePointAt");function ps(e){var t=/^\n* /;return t.test(e)}p(ps,"needIndentIndicator");var Eh=1,xn=2,Dh=3,Oh=4,Ke=5;function Rh(e,t,r,i,a,n,o,s){var c,l=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=$h(Je(e,0))&&Fh(Je(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Je(e,c),!mr(l))return Ke;m=m&&yn(l,h,s),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Je(e,c),l===Xr)u=!0,d&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!mr(l))return Ke;m=m&&yn(l,h,s),h=l}f=f||d&&c-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?Eh:n===Zr?Ke:xn:r>9&&ps(e)?Ke:o?n===Zr?Ke:xn:f?Oh:Dh}p(Rh,"chooseScalarStyle");function Ih(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===Zr?'""':"''";if(!e.noCompatMode&&(Ax.indexOf(t)!==-1||$x.test(t)))return e.quotingType===Zr?'"'+t+'"':"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return Ah(e,l)}switch(p(c,"testAmbiguity"),Rh(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,a)){case Eh:return t;case xn:return"'"+t.replace(/'/g,"''")+"'";case Dh:return"|"+bn(t,e.indent)+Cn(gn(t,n));case Oh:return">"+bn(t,e.indent)+Cn(gn(Ph(t,o),n));case Ke:return'"'+Nh(t)+'"';default:throw new zt("impossible error: invalid scalar style")}}()}p(Ih,"writeScalar");function bn(e,t){var r=ps(e)?String(t):"",i=e[e.length-1]===`
100
+ `,a=i&&(e[e.length-2]===`
101
+ `||e===`
102
+ `),n=a?"+":i?"":"-";return r+n+`
103
+ `}p(bn,"blockHeader");function Cn(e){return e[e.length-1]===`
104
+ `?e.slice(0,-1):e}p(Cn,"dropEndingNewline");function Ph(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=e.indexOf(`
105
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,wn(e.slice(0,l),t)}(),a=e[0]===`
106
+ `||e[0]===" ",n,o;o=r.exec(e);){var s=o[1],c=o[2];n=c[0]===" ",i+=s+(!a&&!n&&c!==""?`
107
+ `:"")+wn(c,t),a=n}return i}p(Ph,"foldString");function wn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,n,o=0,s=0,c="";i=r.exec(e);)s=i.index,s-a>t&&(n=o>a?o:s,c+=`
108
+ `+e.slice(a,n),a=n+1),o=s;return c+=`
109
+ `,e.length-a>t&&o>a?c+=e.slice(a,o)+`
110
+ `+e.slice(o+1):c+=e.slice(a),c.slice(1)}p(wn,"foldLine");function Nh(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Je(e,a),i=Et[r],!i&&mr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Lh(r);return t}p(Nh,"escapeString");function zh(e,t,r){var i="",a=e.tag,n,o,s;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(ne(e,t,s,!1,!1)||typeof s>"u"&&ne(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(zh,"writeFlowSequence");function kn(e,t,r,i){var a="",n=e.tag,o,s,c;for(o=0,s=r.length;o<s;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(ne(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&ne(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=Zi(e,t)),e.dump&&Xr===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}p(kn,"writeBlockSequence");function Wh(e,t,r){var i="",a=e.tag,n=Object.keys(r),o,s,c,l,h;for(o=0,s=n.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=n[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),ne(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}p(Wh,"writeFlowMapping");function qh(e,t,r,i){var a="",n=e.tag,o=Object.keys(r),s,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new zt("sortKeys must be a boolean or a function");for(s=0,c=o.length;s<c;s+=1)f="",(!i||a!=="")&&(f+=Zi(e,t)),l=o[s],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),ne(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Xr===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Zi(e,t)),ne(e,t+1,h,!0,u)&&(e.dump&&Xr===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=n,e.dump=a||"{}"}p(qh,"writeBlockMapping");function vn(e,t,r){var i,a,n,o,s,c;for(a=r?e.explicitTypes:e.implicitTypes,n=0,o=a.length;n<o;n+=1)if(s=a[n],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Ch.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(wh.call(s.represent,c))i=s.represent[c](t,c);else throw new zt("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}p(vn,"detectType");function ne(e,t,r,i,a,n,o){e.tag=null,e.dump=r,vn(e,r,!1)||vn(e,r,!0);var s=Ch.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(qh(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Wh(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?kn(e,t-1,e.dump,a):kn(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(zh(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Ih(e,e.dump,t,n,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}p(ne,"writeNode");function Hh(e,t){var r=[],i=[],a,n;for(Ki(e,r,i),a=0,n=i.length;a<n;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(n)}p(Hh,"getDuplicateReferences");function Ki(e,t,r){var i,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)Ki(e[a],t,r);else for(i=Object.keys(e),a=0,n=i.length;a<n;a+=1)Ki(e[i[a]],t,r)}p(Ki,"inspectNode");function Ex(e,t){t=t||{};var r=new Mh(t);r.noRefs||Hh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ne(r,0,i,!0,!0)?r.dump+`
111
+ `:""}p(Ex,"dump$1");function Dx(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(Dx,"renamed");var Ox=Dc,Rx=fx.load;/*! Bundled license information:
112
+
113
+ js-yaml/dist/js-yaml.mjs:
114
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
115
+ */var Mt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},lo={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Rr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ft(e),t=ft(t);const[r,i]=[e.x,e.y],[a,n]=[t.x,t.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(Rr,"calculateDeltaAndAngle");var ft=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Ix=p(e=>({x:p(function(t,r,i){let a=0;const n=ft(i[0]).x<ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Mt,e.arrowTypeStart)){const{angle:d,deltaX:g}=Rr(i[0],i[1]);a=Mt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Mt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Rr(i[i.length-1],i[i.length-2]);a=Mt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(ft(t).x-ft(i[i.length-1]).x),s=Math.abs(ft(t).y-ft(i[i.length-1]).y),c=Math.abs(ft(t).x-ft(i[0]).x),l=Math.abs(ft(t).y-ft(i[0]).y),h=Mt[e.arrowTypeStart],u=Mt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="right"?-1:1,a-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=n==="right"?-1:1,a+=d}return ft(t).x+a},"x"),y:p(function(t,r,i){let a=0;const n=ft(i[0]).y<ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Mt,e.arrowTypeStart)){const{angle:d,deltaY:g}=Rr(i[0],i[1]);a=Mt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Mt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Rr(i[i.length-1],i[i.length-2]);a=Mt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(ft(t).y-ft(i[i.length-1]).y),s=Math.abs(ft(t).x-ft(i[i.length-1]).x),c=Math.abs(ft(t).y-ft(i[0]).y),l=Math.abs(ft(t).x-ft(i[0]).x),h=Mt[e.arrowTypeStart],u=Mt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="up"?-1:1,a-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=n==="up"?-1:1,a+=d}return ft(t).y+a},"y")}),"getLineFunctionsWithOffset"),gs=p(({flowchart:e})=>{var a,n;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Px=p(e=>{const{handDrawnSeed:t}=st();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Cr=p(e=>{const t=Nx([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Nx=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),jh=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),j=p(e=>{const{stylesArray:t}=Cr(e),r=[],i=[],a=[],n=[];return t.forEach(o=>{const s=o[0];jh(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&a.push(o.join(":")+" !important"),s==="fill"&&n.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:n}},"styles2String"),H=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=st(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:o}=Cr(e);return Object.assign({roughness:.7,fill:o.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:zx(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),zx=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Yh={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0;vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;vt.htmlCtrlEntityRegex=/&(newline|tab);/gi;vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;vt.urlSchemeRegex=/^.+(:|&colon;)/gim;vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;vt.relativeFirstCharacters=[".","/"];vt.BLANK_URL="about:blank";Object.defineProperty(Yh,"__esModule",{value:!0});var Wx=Yh.sanitizeUrl=Yx,Lt=vt;function qx(e){return Lt.relativeFirstCharacters.indexOf(e[0])>-1}function Hx(e){var t=e.replace(Lt.ctrlCharactersRegex,"");return t.replace(Lt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function jx(e){return URL.canParse(e)}function co(e){try{return decodeURIComponent(e)}catch{return e}}function Yx(e){if(!e)return Lt.BLANK_URL;var t,r=co(e.trim());do r=Hx(r).replace(Lt.htmlCtrlEntityRegex,"").replace(Lt.ctrlCharactersRegex,"").replace(Lt.whitespaceEscapeCharsRegex,"").trim(),r=co(r),t=r.match(Lt.ctrlCharactersRegex)||r.match(Lt.htmlEntitiesRegex)||r.match(Lt.htmlCtrlEntityRegex)||r.match(Lt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Lt.BLANK_URL;if(qx(i))return i;var a=i.trimStart(),n=a.match(Lt.urlSchemeRegex);if(!n)return i;var o=n[0].toLowerCase().trim();if(Lt.invalidProtocolRegex.test(o))return Lt.BLANK_URL;var s=a.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!jx(s))return Lt.BLANK_URL;var c=new URL(s);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return s}var Vh=typeof global=="object"&&global&&global.Object===Object&&global,Vx=typeof self=="object"&&self&&self.Object===Object&&self,oe=Vh||Vx||Function("return this")(),Qi=oe.Symbol,Gh=Object.prototype,Gx=Gh.hasOwnProperty,Ux=Gh.toString,Br=Qi?Qi.toStringTag:void 0;function Xx(e){var t=Gx.call(e,Br),r=e[Br];try{e[Br]=void 0;var i=!0}catch{}var a=Ux.call(e);return i&&(t?e[Br]=r:delete e[Br]),a}var Zx=Object.prototype,Kx=Zx.toString;function Qx(e){return Kx.call(e)}var Jx="[object Null]",tb="[object Undefined]",ho=Qi?Qi.toStringTag:void 0;function wr(e){return e==null?e===void 0?tb:Jx:ho&&ho in Object(e)?Xx(e):Qx(e)}function Ye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var eb="[object AsyncFunction]",rb="[object Function]",ib="[object GeneratorFunction]",ab="[object Proxy]";function ms(e){if(!Ye(e))return!1;var t=wr(e);return t==rb||t==ib||t==eb||t==ab}var za=oe["__core-js_shared__"],uo=function(){var e=/[^.]+$/.exec(za&&za.keys&&za.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nb(e){return!!uo&&uo in e}var sb=Function.prototype,ob=sb.toString;function Ve(e){if(e!=null){try{return ob.call(e)}catch{}try{return e+""}catch{}}return""}var lb=/[\\^$.*+?()[\]{}|]/g,cb=/^\[object .+?Constructor\]$/,hb=Function.prototype,ub=Object.prototype,db=hb.toString,fb=ub.hasOwnProperty,pb=RegExp("^"+db.call(fb).replace(lb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gb(e){if(!Ye(e)||nb(e))return!1;var t=ms(e)?pb:cb;return t.test(Ve(e))}function mb(e,t){return e==null?void 0:e[t]}function Ge(e,t){var r=mb(e,t);return gb(r)?r:void 0}var Qr=Ge(Object,"create");function yb(){this.__data__=Qr?Qr(null):{},this.size=0}function xb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bb="__lodash_hash_undefined__",Cb=Object.prototype,wb=Cb.hasOwnProperty;function kb(e){var t=this.__data__;if(Qr){var r=t[e];return r===bb?void 0:r}return wb.call(t,e)?t[e]:void 0}var vb=Object.prototype,_b=vb.hasOwnProperty;function Sb(e){var t=this.__data__;return Qr?t[e]!==void 0:_b.call(t,e)}var Tb="__lodash_hash_undefined__";function Bb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qr&&t===void 0?Tb:t,this}function qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}qe.prototype.clear=yb;qe.prototype.delete=xb;qe.prototype.get=kb;qe.prototype.has=Sb;qe.prototype.set=Bb;function Lb(){this.__data__=[],this.size=0}function ka(e,t){return e===t||e!==e&&t!==t}function va(e,t){for(var r=e.length;r--;)if(ka(e[r][0],t))return r;return-1}var Mb=Array.prototype,Ab=Mb.splice;function $b(e){var t=this.__data__,r=va(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Ab.call(t,r,1),--this.size,!0}function Fb(e){var t=this.__data__,r=va(t,e);return r<0?void 0:t[r][1]}function Eb(e){return va(this.__data__,e)>-1}function Db(e,t){var r=this.__data__,i=va(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}me.prototype.clear=Lb;me.prototype.delete=$b;me.prototype.get=Fb;me.prototype.has=Eb;me.prototype.set=Db;var Jr=Ge(oe,"Map");function Ob(){this.size=0,this.__data__={hash:new qe,map:new(Jr||me),string:new qe}}function Rb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _a(e,t){var r=e.__data__;return Rb(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ib(e){var t=_a(this,e).delete(e);return this.size-=t?1:0,t}function Pb(e){return _a(this,e).get(e)}function Nb(e){return _a(this,e).has(e)}function zb(e,t){var r=_a(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Se(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Se.prototype.clear=Ob;Se.prototype.delete=Ib;Se.prototype.get=Pb;Se.prototype.has=Nb;Se.prototype.set=zb;var Wb="Expected a function";function oi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Wb);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var o=e.apply(this,i);return r.cache=n.set(a,o)||n,o};return r.cache=new(oi.Cache||Se),r}oi.Cache=Se;function qb(){this.__data__=new me,this.size=0}function Hb(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function jb(e){return this.__data__.get(e)}function Yb(e){return this.__data__.has(e)}var Vb=200;function Gb(e,t){var r=this.__data__;if(r instanceof me){var i=r.__data__;if(!Jr||i.length<Vb-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Se(i)}return r.set(e,t),this.size=r.size,this}function kr(e){var t=this.__data__=new me(e);this.size=t.size}kr.prototype.clear=qb;kr.prototype.delete=Hb;kr.prototype.get=jb;kr.prototype.has=Yb;kr.prototype.set=Gb;var Ji=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();function ys(e,t,r){t=="__proto__"&&Ji?Ji(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function _n(e,t,r){(r!==void 0&&!ka(e[t],r)||r===void 0&&!(t in e))&&ys(e,t,r)}function Ub(e){return function(t,r,i){for(var a=-1,n=Object(t),o=i(t),s=o.length;s--;){var c=o[++a];if(r(n[c],c,n)===!1)break}return t}}var Xb=Ub(),Uh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fo=Uh&&typeof module=="object"&&module&&!module.nodeType&&module,Zb=fo&&fo.exports===Uh,po=Zb?oe.Buffer:void 0,go=po?po.allocUnsafe:void 0;function Kb(e,t){if(t)return e.slice();var r=e.length,i=go?go(r):new e.constructor(r);return e.copy(i),i}var mo=oe.Uint8Array;function Qb(e){var t=new e.constructor(e.byteLength);return new mo(t).set(new mo(e)),t}function Jb(e,t){var r=t?Qb(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function t1(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var yo=Object.create,e1=function(){function e(){}return function(t){if(!Ye(t))return{};if(yo)return yo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Xh(e,t){return function(r){return e(t(r))}}var Zh=Xh(Object.getPrototypeOf,Object),r1=Object.prototype;function Sa(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||r1;return e===r}function i1(e){return typeof e.constructor=="function"&&!Sa(e)?e1(Zh(e)):{}}function li(e){return e!=null&&typeof e=="object"}var a1="[object Arguments]";function xo(e){return li(e)&&wr(e)==a1}var Kh=Object.prototype,n1=Kh.hasOwnProperty,s1=Kh.propertyIsEnumerable,ta=xo(function(){return arguments}())?xo:function(e){return li(e)&&n1.call(e,"callee")&&!s1.call(e,"callee")},ea=Array.isArray,o1=9007199254740991;function Qh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=o1}function Ta(e){return e!=null&&Qh(e.length)&&!ms(e)}function l1(e){return li(e)&&Ta(e)}function c1(){return!1}var Jh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bo=Jh&&typeof module=="object"&&module&&!module.nodeType&&module,h1=bo&&bo.exports===Jh,Co=h1?oe.Buffer:void 0,u1=Co?Co.isBuffer:void 0,xs=u1||c1,d1="[object Object]",f1=Function.prototype,p1=Object.prototype,tu=f1.toString,g1=p1.hasOwnProperty,m1=tu.call(Object);function y1(e){if(!li(e)||wr(e)!=d1)return!1;var t=Zh(e);if(t===null)return!0;var r=g1.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&tu.call(r)==m1}var x1="[object Arguments]",b1="[object Array]",C1="[object Boolean]",w1="[object Date]",k1="[object Error]",v1="[object Function]",_1="[object Map]",S1="[object Number]",T1="[object Object]",B1="[object RegExp]",L1="[object Set]",M1="[object String]",A1="[object WeakMap]",$1="[object ArrayBuffer]",F1="[object DataView]",E1="[object Float32Array]",D1="[object Float64Array]",O1="[object Int8Array]",R1="[object Int16Array]",I1="[object Int32Array]",P1="[object Uint8Array]",N1="[object Uint8ClampedArray]",z1="[object Uint16Array]",W1="[object Uint32Array]",dt={};dt[E1]=dt[D1]=dt[O1]=dt[R1]=dt[I1]=dt[P1]=dt[N1]=dt[z1]=dt[W1]=!0;dt[x1]=dt[b1]=dt[$1]=dt[C1]=dt[F1]=dt[w1]=dt[k1]=dt[v1]=dt[_1]=dt[S1]=dt[T1]=dt[B1]=dt[L1]=dt[M1]=dt[A1]=!1;function q1(e){return li(e)&&Qh(e.length)&&!!dt[wr(e)]}function H1(e){return function(t){return e(t)}}var eu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yr=eu&&typeof module=="object"&&module&&!module.nodeType&&module,j1=Yr&&Yr.exports===eu,Wa=j1&&Vh.process,wo=function(){try{var e=Yr&&Yr.require&&Yr.require("util").types;return e||Wa&&Wa.binding&&Wa.binding("util")}catch{}}(),ko=wo&&wo.isTypedArray,bs=ko?H1(ko):q1;function Sn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Y1=Object.prototype,V1=Y1.hasOwnProperty;function G1(e,t,r){var i=e[t];(!(V1.call(e,t)&&ka(i,r))||r===void 0&&!(t in e))&&ys(e,t,r)}function U1(e,t,r,i){var a=!r;r||(r={});for(var n=-1,o=t.length;++n<o;){var s=t[n],c=void 0;c===void 0&&(c=e[s]),a?ys(r,s,c):G1(r,s,c)}return r}function X1(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Z1=9007199254740991,K1=/^(?:0|[1-9]\d*)$/;function ru(e,t){var r=typeof e;return t=t??Z1,!!t&&(r=="number"||r!="symbol"&&K1.test(e))&&e>-1&&e%1==0&&e<t}var Q1=Object.prototype,J1=Q1.hasOwnProperty;function t2(e,t){var r=ea(e),i=!r&&ta(e),a=!r&&!i&&xs(e),n=!r&&!i&&!a&&bs(e),o=r||i||a||n,s=o?X1(e.length,String):[],c=s.length;for(var l in e)(t||J1.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||n&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ru(l,c)))&&s.push(l);return s}function e2(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var r2=Object.prototype,i2=r2.hasOwnProperty;function a2(e){if(!Ye(e))return e2(e);var t=Sa(e),r=[];for(var i in e)i=="constructor"&&(t||!i2.call(e,i))||r.push(i);return r}function iu(e){return Ta(e)?t2(e,!0):a2(e)}function n2(e){return U1(e,iu(e))}function s2(e,t,r,i,a,n,o){var s=Sn(e,r),c=Sn(t,r),l=o.get(c);if(l){_n(e,r,l);return}var h=n?n(s,c,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=ea(c),d=!f&&xs(c),g=!f&&!d&&bs(c);h=c,f||d||g?ea(s)?h=s:l1(s)?h=t1(s):d?(u=!1,h=Kb(c,!0)):g?(u=!1,h=Jb(c,!0)):h=[]:y1(c)||ta(c)?(h=s,ta(s)?h=n2(s):(!Ye(s)||ms(s))&&(h=i1(c))):u=!1}u&&(o.set(c,h),a(h,c,i,n,o),o.delete(c)),_n(e,r,h)}function au(e,t,r,i,a){e!==t&&Xb(t,function(n,o){if(a||(a=new kr),Ye(n))s2(e,t,o,r,au,i,a);else{var s=i?i(Sn(e,o),n,o+"",e,t,a):void 0;s===void 0&&(s=n),_n(e,o,s)}},iu)}function nu(e){return e}function o2(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var vo=Math.max;function l2(e,t,r){return t=vo(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,n=vo(i.length-t,0),o=Array(n);++a<n;)o[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(o),o2(e,this,s)}}function c2(e){return function(){return e}}var h2=Ji?function(e,t){return Ji(e,"toString",{configurable:!0,enumerable:!1,value:c2(t),writable:!0})}:nu,u2=800,d2=16,f2=Date.now;function p2(e){var t=0,r=0;return function(){var i=f2(),a=d2-(i-r);if(r=i,a>0){if(++t>=u2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var g2=p2(h2);function m2(e,t){return g2(l2(e,t,nu),e+"")}function y2(e,t,r){if(!Ye(r))return!1;var i=typeof t;return(i=="number"?Ta(r)&&ru(t,r.length):i=="string"&&t in r)?ka(r[t],e):!1}function x2(e){return m2(function(t,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=e.length>3&&typeof n=="function"?(a--,n):void 0,o&&y2(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),t=Object(t);++i<a;){var s=r[i];s&&e(t,s,i,n)}return t})}var b2=x2(function(e,t,r){au(e,t,r)}),C2="​",w2={curveBasis:wi,curveBasisClosed:Cp,curveBasisOpen:bp,curveBumpX:gl,curveBumpY:pl,curveBundle:_0,curveCardinalClosed:S0,curveCardinalOpen:T0,curveCardinal:ac,curveCatmullRomClosed:B0,curveCatmullRomOpen:L0,curveCatmullRom:sc,curveLinear:Ka,curveLinearClosed:xp,curveMonotoneX:fl,curveMonotoneY:dl,curveNatural:ul,curveStep:hl,curveStepAfter:cl,curveStepBefore:ll},k2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,v2=p(function(e,t){const r=su(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Ri(o),i=bt(i,[...o])}else i=r.args;if(!i)return;let a=Vn(e,t);const n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),su=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${k2.source})(?=[}][%]{2}).*
116
+ `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const o=[];for(;(n=Hr.exec(e))!==null;)if(n.index===Hr.lastIndex&&Hr.lastIndex++,n&&!t||t&&((r=n[1])!=null&&r.match(t))||t&&((i=n[2])!=null&&i.match(t))){const s=n[1]?n[1]:n[2],c=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:s,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return F.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),_2=p(function(e){return e.replace(Hr,"")},"removeDirectives"),S2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Cs(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return w2[r]??t}p(Cs,"interpolateToCurve");function ou(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Wx(r):r}p(ou,"formatUrl");var T2=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){F.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function ws(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(ws,"distance");function lu(e){let t,r=0;e.forEach(a=>{r+=ws(a,t),t=a});const i=r/2;return ks(e,i)}p(lu,"traverseEdge");function cu(e){return e.length===1?e[0]:lu(e)}p(cu,"calcLabelPosition");var _o=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ks=p((e,t)=>{let r,i=t;for(const a of e){if(r){const n=ws(a,r);if(n===0)return r;if(n<i)i-=n;else{const o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:_o((1-o)*r.x+o*a.x,5),y:_o((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),B2=p((e,t,r)=>{F.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=ks(t,25),n=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),s={x:0,y:0};return s.x=Math.sin(o)*n+(t[0].x+a.x)/2,s.y=-Math.cos(o)*n+(t[0].y+a.y)/2,s},"calcCardinalityPosition");function hu(e,t,r){const i=structuredClone(r);F.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,n=ks(i,a),o=10+e*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+n.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+n.y)/2):t==="end_right"?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+n.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+n.y)/2-5):t==="end_left"?(c.x=Math.sin(s)*o+(i[0].x+n.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+n.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+n.x)/2,c.y=-Math.cos(s)*o+(i[0].y+n.y)/2),c}p(hu,"calcTerminalLabelPosition");function uu(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(uu,"getStylesFromArray");var So=0,L2=p(()=>(So++,"id-"+Math.random().toString(36).substr(2,12)+"-"+So),"generateId");function du(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(du,"makeRandomHex");var M2=p(e=>du(e.length),"random"),A2=p(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"),$2=p(function(e,t){const r=t.text.replace(br.lineBreakRegex," "),[,i]=Ba(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),F2=oi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),br.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let n="";return i.forEach((o,s)=>{const c=ge(`${o} `,r),l=ge(n,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=E2(o,t,"-",r);a.push(n,...f),n=d}else l+c>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");s+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),E2=oi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],n=[];let o="";return a.forEach((s,c)=>{const l=`${o}${s}`;if(ge(l,i)>=t){const u=c+1,f=a.length===u,d=`${l}${r}`;n.push(f?l:d),o=""}else o=l}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function fu(e,t){return vs(e,t).height}p(fu,"calculateTextHeight");function ge(e,t){return vs(e,t).width}p(ge,"calculateTextWidth");var vs=oi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,n]=Ba(r),o=["sans-serif",i],s=e.split(br.lineBreakRegex),c=[],l=rt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=A2();y.text=m||C2;const x=$2(h,y).style("font-size",n).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}c.push(g)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),cr,D2=(cr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(cr,"InitIDGenerator"),cr),fi,O2=p(function(e){return fi=fi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),fi.innerHTML=e,unescape(fi.textContent)},"entityDecode");function _s(e){return"str"in e}p(_s,"isDetailedError");var R2=p((e,t,r,i)=>{var n;if(!i)return;const a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ba=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Ss(e,t){return b2({},e,t)}p(Ss,"cleanAndMerge");var Zt={assignWithDepth:bt,wrapLabel:F2,calculateTextHeight:fu,calculateTextWidth:ge,calculateTextDimensions:vs,cleanAndMerge:Ss,detectInit:v2,detectDirective:su,isSubstringInArray:S2,interpolateToCurve:Cs,calcLabelPosition:cu,calcCardinalityPosition:B2,calcTerminalLabelPosition:hu,formatUrl:ou,getStylesFromArray:uu,generateId:L2,random:M2,runFunc:T2,entityDecode:O2,insertTitle:R2,isLabelCoordinateInPath:pu,parseFontSize:Ba,InitIDGenerator:D2},I2=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ue=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),$S=p((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Ft(e){return e??null}p(Ft,"handleUndefinedAttr");function pu(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(pu,"isLabelCoordinateInPath");const P2=Object.freeze({left:0,top:0,width:16,height:16}),ra=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gu=Object.freeze({...P2,...ra}),N2=Object.freeze({...gu,body:"",hidden:!1}),z2=Object.freeze({width:null,height:null}),W2=Object.freeze({...z2,...ra}),q2=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),c=a.pop(),l={provider:a.length>0?a[0]:i,prefix:c,name:s};return qa(l)?l:null}const n=a[0],o=n.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return qa(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:n};return qa(s,r)?s:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function H2(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function To(e,t){const r=H2(e,t);for(const i in N2)i in ra?i in e&&!(i in r)&&(r[i]=ra[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function j2(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function n(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const s=i[o]&&i[o].parent,c=s&&n(s);c&&(a[o]=[s].concat(c))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(n),a}function Bo(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let n={};function o(s){n=To(i[s]||a[s],n)}return o(t),r.forEach(o),To(e,n)}function Y2(e,t){if(e.icons[t])return Bo(e,t,[]);const r=j2(e,[t])[t];return r?Bo(e,t,r):null}const V2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,G2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lo(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(V2);if(i===null||!i.length)return e;const a=[];let n=i.shift(),o=G2.test(n);for(;;){if(o){const s=parseFloat(n);isNaN(s)?a.push(n):a.push(Math.ceil(s*t*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");o=!o}}function U2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),n=e.indexOf("</"+t);if(a===-1||n===-1)break;const o=e.indexOf(">",n);if(o===-1)break;r+=e.slice(a+1,n).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function X2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Z2(e,t,r){const i=U2(e);return X2(i.defs,t+i.content+r)}const K2=e=>e==="unset"||e==="undefined"||e==="none";function Q2(e,t){const r={...gu,...e},i={...W2,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let _;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:_=a.height/2+a.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:_=a.width/2+a.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}w%2===1&&(a.left!==a.top&&(_=a.left,a.left=a.top,a.top=_),a.width!==a.height&&(_=a.width,a.width=a.height,a.height=_)),y.length&&(n=Z2(n,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,c=a.width,l=a.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?l:s,h=Lo(u,c/l)):(h=o==="auto"?c:o,u=s===null?Lo(h,l/c):s==="auto"?l:s);const f={},d=(m,y)=>{K2(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,c,l];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:n}}const J2=/\sid="(\S+)"/g,Mo=new Map;function tC(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Mo.get(e)||0;return Mo.set(e,t+1),t?`${e}${t}`:e}function eC(e){const t=[];let r;for(;r=J2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const n=tC(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function rC(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Ts(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Xe=Ts();function mu(e){Xe=e}var Vr={exec:()=>null};function it(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(It.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var iC=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),It={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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},aC=/^(?:[ \t]*(?:\n|$))+/,nC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ci=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bs=/(?:[*+-]|\d{1,9}[.)])/,yu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xu=it(yu).replace(/bull/g,Bs).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(),lC=it(yu).replace(/bull/g,Bs).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(),Ls=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cC=/^[^\n]+/,Ms=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hC=it(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ms).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uC=it(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bs).getRegex(),La="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",As=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dC=it("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",As).replace("tag",La).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bu=it(Ls).replace("hr",ci).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",La).getRegex(),fC=it(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bu).getRegex(),$s={blockquote:fC,code:nC,def:hC,fences:sC,heading:oC,hr:ci,html:dC,lheading:xu,list:uC,newline:aC,paragraph:bu,table:Vr,text:cC},Ao=it("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",La).getRegex(),pC={...$s,lheading:lC,table:Ao,paragraph:it(Ls).replace("hr",ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ao).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",La).getRegex()},gC={...$s,html:it(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",As).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:Vr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:it(Ls).replace("hr",ci).replace("heading",` *#{1,6} *[^
117
+ ]`).replace("lheading",xu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},mC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cu=/^( {2,}|\\)\n(?!\s*$)/,xC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ma=/[\p{P}\p{S}]/u,Fs=/[\s\p{P}\p{S}]/u,wu=/[^\s\p{P}\p{S}]/u,bC=it(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fs).getRegex(),ku=/(?!~)[\p{P}\p{S}]/u,CC=/(?!~)[\s\p{P}\p{S}]/u,wC=/(?:[^\s\p{P}\p{S}]|~)/u,kC=it(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vu=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vC=it(vu,"u").replace(/punct/g,Ma).getRegex(),_C=it(vu,"u").replace(/punct/g,ku).getRegex(),_u="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",SC=it(_u,"gu").replace(/notPunctSpace/g,wu).replace(/punctSpace/g,Fs).replace(/punct/g,Ma).getRegex(),TC=it(_u,"gu").replace(/notPunctSpace/g,wC).replace(/punctSpace/g,CC).replace(/punct/g,ku).getRegex(),BC=it("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wu).replace(/punctSpace/g,Fs).replace(/punct/g,Ma).getRegex(),LC=it(/\\(punct)/,"gu").replace(/punct/g,Ma).getRegex(),MC=it(/^<(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(),AC=it(As).replace("(?:-->|$)","-->").getRegex(),$C=it("^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",AC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ia=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,FC=it(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Su=it(/^!?\[(label)\]\[(ref)\]/).replace("label",ia).replace("ref",Ms).getRegex(),Tu=it(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ms).getRegex(),EC=it("reflink|nolink(?!\\()","g").replace("reflink",Su).replace("nolink",Tu).getRegex(),$o=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Es={_backpedal:Vr,anyPunctuation:LC,autolink:MC,blockSkip:kC,br:Cu,code:yC,del:Vr,emStrongLDelim:vC,emStrongRDelimAst:SC,emStrongRDelimUnd:BC,escape:mC,link:FC,nolink:Tu,punctuation:bC,reflink:Su,reflinkSearch:EC,tag:$C,text:xC,url:Vr},DC={...Es,link:it(/^!?\[(label)\]\((.*?)\)/).replace("label",ia).getRegex(),reflink:it(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ia).getRegex()},Tn={...Es,emStrongRDelimAst:TC,emStrongLDelim:_C,url:it(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$o).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:it(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$o).getRegex()},OC={...Tn,br:it(Cu).replace("{2,}","*").getRegex(),text:it(Tn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},pi={normal:$s,gfm:pC,pedantic:gC},Lr={normal:Es,gfm:Tn,breaks:OC,pedantic:DC},RC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fo=e=>RC[e];function ee(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,Fo)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,Fo);return e}function Eo(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function Do(e,t){var n;let r=e.replace(It.findPipe,(o,s,c)=>{let l=!1,h=s;for(;--h>=0&&c[h]==="\\";)l=!l;return l?"|":" |"}),i=r.split(It.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((n=i.at(-1))!=null&&n.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(It.slashPipe,"|");return i}function Mr(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function IC(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Oo(e,t,r,i,a){let n=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function PC(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
118
+ `).map(n=>{let o=n.match(r.other.beginningSpace);if(o===null)return n;let[s]=o;return s.length>=a.length?n.slice(a.length):n}).join(`
119
+ `)}var aa=class{constructor(t){ct(this,"options");ct(this,"rules");ct(this,"lexer");this.options=t||Xe}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Mr(i,`
120
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=PC(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=Mr(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Mr(r[0],`
121
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Mr(r[0],`
122
+ `).split(`
123
+ `),a="",n="",o=[];for(;i.length>0;){let s=!1,c=[],l;for(l=0;l<i.length;l++)if(this.rules.other.blockquoteStart.test(i[l]))c.push(i[l]),s=!0;else if(!s)c.push(i[l]);else break;i=i.slice(l);let h=c.join(`
124
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
125
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
126
+ ${h}`:h,n=n?`${n}
127
+ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,m=g.raw+`
128
+ `+i.join(`
129
+ `),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,n=n.substring(0,n.length-g.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,m=g.raw+`
130
+ `+i.join(`
131
+ `),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,n=n.substring(0,n.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
132
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,n={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let l=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
133
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
134
+ `,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
135
+ `,t=t.substring(d.length+1),l=!0),!l){let b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),_=this.rules.other.fencesBeginRegex(m),k=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
136
+ `,1)[0],E;if(d=v,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),E=d):E=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||k.test(d)||C.test(d)||b.test(d)||w.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
137
+ `+E.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(f)||k.test(f)||w.test(f))break;u+=`
138
+ `+d}!g&&!d.trim()&&(g=!0),h+=v+`
139
+ `,t=t.substring(v.length+1),f=E.slice(m)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),n.raw+=h}let c=n.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l=0;l<n.items.length;l++)if(this.lexer.state.top=!1,n.items[l].tokens=this.lexer.blockTokens(n.items[l].text,[]),!n.loose){let h=n.items[l].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}if(n.loose)for(let l=0;l<n.items.length;l++)n.items[l].loose=!0;return n}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:n}}}table(t){var s;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Do(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
140
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let c of a)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<i.length;c++)o.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:o.align[c]});for(let c of n)o.rows.push(Do(c,o.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
141
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Mr(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=IC(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let a=r[2],n="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],n=o[3])}else n=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Oo(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=r[a.toLowerCase()];if(!n){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Oo(i,n,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let n=[...a[0]].length-1,o,s,c=n,l=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+n);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(s=[...o].length,a[3]||a[4]){c+=s;continue}else if((a[5]||a[6])&&n%3&&!((n+s)%3)){l+=s;continue}if(c-=s,c>0)continue;s=Math.min(s,s+c+l);let u=[...a[0]][0].length,f=t.slice(0,n+a.index+u+s);if(Math.min(n,s)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),n=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&n&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,n;if(r[2]==="@")a=r[0],n="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:a,href:n,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ut=class Bn{constructor(t){ct(this,"tokens");ct(this,"options");ct(this,"state");ct(this,"tokenizer");ct(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Xe,this.options.tokenizer=this.options.tokenizer||new aa,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 r={other:It,block:pi.normal,inline:Lr.normal};this.options.pedantic?(r.block=pi.pedantic,r.inline=Lr.pedantic):this.options.gfm&&(r.block=pi.gfm,this.options.breaks?r.inline=Lr.breaks:r.inline=Lr.gfm),this.tokenizer.rules=r}static get rules(){return{block:pi,inline:Lr}}static lex(t,r){return new Bn(r).lex(t)}static lexInline(t,r){return new Bn(r).inlineTokens(t)}lex(t){t=t.replace(It.carriageReturn,`
142
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,n,o;for(this.options.pedantic&&(t=t.replace(It.tabCharGlobal," ").replace(It.spaceLine,""));t;){let s;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(l=>(s=l.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let l=r.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
143
+ `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
144
+ `)?"":`
145
+ `)+s.raw,l.text+=`
146
+ `+s.text,this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
147
+ `)?"":`
148
+ `)+s.raw,l.text+=`
149
+ `+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let c=t;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){let l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
150
+ `)?"":`
151
+ `)+s.raw,l.text+=`
152
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s),i=c.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
153
+ `)?"":`
154
+ `)+s.raw,l.text+=`
155
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(s);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,l,h,u,f;let i=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)n=a[2]?a[2].length:0,i=i.slice(0,a.index+n)+"["+"a".repeat(a[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((l=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:l.call({lexer:this},i))??i;let o=!1,s="";for(;t;){o||(s=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(m=>(d=m.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let m=r.at(-1);d.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,s)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((f=this.options.extensions)!=null&&f.startInline){let m=1/0,y=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},y),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(g=t.substring(0,m+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(s=d.raw.slice(-1)),o=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},na=class{constructor(t){ct(this,"options");ct(this,"parser");this.options=t||Xe}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(It.notSpaceStart))==null?void 0:o[0],n=t.replace(It.endingNewline,"")+`
156
+ `;return a?'<pre><code class="language-'+ee(a)+'">'+(i?n:ee(n,!0))+`</code></pre>
157
+ `:"<pre><code>"+(i?n:ee(n,!0))+`</code></pre>
158
+ `}blockquote({tokens:t}){return`<blockquote>
159
+ ${this.parser.parse(t)}</blockquote>
160
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
161
+ `}hr(t){return`<hr>
162
+ `}list(t){let r=t.ordered,i=t.start,a="";for(let s=0;s<t.items.length;s++){let c=t.items[s];a+=this.listitem(c)}let n=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+n+o+`>
163
+ `+a+"</"+n+`>
164
+ `}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+ee(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
165
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
166
+ `}table(t){let r="",i="";for(let n=0;n<t.header.length;n++)i+=this.tablecell(t.header[n]);r+=this.tablerow({text:i});let a="";for(let n=0;n<t.rows.length;n++){let o=t.rows[n];i="";for(let s=0;s<o.length;s++)i+=this.tablecell(o[s]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
167
+ <thead>
168
+ `+r+`</thead>
169
+ `+a+`</table>
170
+ `}tablerow({text:t}){return`<tr>
171
+ ${t}</tr>
172
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
173
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ee(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),n=Eo(t);if(n===null)return a;t=n;let o='<a href="'+t+'"';return r&&(o+=' title="'+ee(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let n=Eo(t);if(n===null)return ee(i);t=n;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ee(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ee(t.text)}},Ds=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Xt=class Ln{constructor(t){ct(this,"options");ct(this,"renderer");ct(this,"textRenderer");this.options=t||Xe,this.options.renderer=this.options.renderer||new na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ds}static parse(t,r){return new Ln(r).parse(t)}static parseInline(t,r){return new Ln(r).parseInline(t)}parse(t,r=!0){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let l=s,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){i+=h||"";continue}}let c=s;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let l=c,h=this.renderer.text(l);for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],h+=`
174
+ `+this.renderer.text(l);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(t,r=this.renderer){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}let c=s;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Ci,Ir=(Ci=class{constructor(t){ct(this,"options");ct(this,"block");this.options=t||Xe}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ut.lex:Ut.lexInline}provideParser(){return this.block?Xt.parse:Xt.parseInline}},ct(Ci,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ct(Ci,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ci),NC=class{constructor(...t){ct(this,"defaults",Ts());ct(this,"options",this.setOptions);ct(this,"parse",this.parseMarkdown(!0));ct(this,"parseInline",this.parseMarkdown(!1));ct(this,"Parser",Xt);ct(this,"Renderer",na);ct(this,"TextRenderer",Ds);ct(this,"Lexer",Ut);ct(this,"Tokenizer",aa);ct(this,"Hooks",Ir);this.use(...t)}walkTokens(t,r){var a,n;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let c of s.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of s.rows)for(let l of c)i=i.concat(this.walkTokens(l.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;(n=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&n[s.type]?this.defaults.extensions.childTokens[s.type].forEach(c=>{let l=s[c].flat(1/0);i=i.concat(this.walkTokens(l,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let o=r.renderers[n.name];o?r.renderers[n.name]=function(...s){let c=n.renderer.apply(this,s);return c===!1&&(c=o.apply(this,s)),c}:r.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[n.level];o?o.unshift(n.tokenizer):r[n.level]=[n.tokenizer],n.start&&(n.level==="block"?r.startBlock?r.startBlock.push(n.start):r.startBlock=[n.start]:n.level==="inline"&&(r.startInline?r.startInline.push(n.start):r.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(r.childTokens[n.name]=n.childTokens)}),a.extensions=r),i.renderer){let n=this.defaults.renderer||new na(this.defaults);for(let o in i.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,c=i.renderer[s],l=n[s];n[s]=(...h)=>{let u=c.apply(n,h);return u===!1&&(u=l.apply(n,h)),u||""}}a.renderer=n}if(i.tokenizer){let n=this.defaults.tokenizer||new aa(this.defaults);for(let o in i.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,c=i.tokenizer[s],l=n[s];n[s]=(...h)=>{let u=c.apply(n,h);return u===!1&&(u=l.apply(n,h)),u}}a.tokenizer=n}if(i.hooks){let n=this.defaults.hooks||new Ir;for(let o in i.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,c=i.hooks[s],l=n[s];Ir.passThroughHooks.has(o)?n[s]=h=>{if(this.defaults.async&&Ir.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await c.call(n,h);return l.call(n,f)})();let u=c.call(n,h);return l.call(n,u)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(n,h);return f===!1&&(f=await l.apply(n,h)),f})();let u=c.apply(n,h);return u===!1&&(u=l.apply(n,h)),u}}a.hooks=n}if(i.walkTokens){let n=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(s){let c=[];return c.push(o.call(this,s)),n&&(c=c.concat(n.call(this,s))),c}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ut.lex(t,r??this.defaults)}parser(t,r){return Xt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(new 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 r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(r):r,c=await(n.hooks?await n.hooks.provideLexer():t?Ut.lex:Ut.lexInline)(s,n),l=n.hooks?await n.hooks.processAllTokens(c):c;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser():t?Xt.parse:Xt.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let s=(n.hooks?n.hooks.provideLexer():t?Ut.lex:Ut.lexInline)(r,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let c=(n.hooks?n.hooks.provideParser():t?Xt.parse:Xt.parseInline)(s,n);return n.hooks&&(c=n.hooks.postprocess(c)),c}catch(s){return o(s)}}}onError(t,r){return i=>{if(i.message+=`
175
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+ee(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},He=new NC;function ot(e,t){return He.parse(e,t)}ot.options=ot.setOptions=function(e){return He.setOptions(e),ot.defaults=He.defaults,mu(ot.defaults),ot};ot.getDefaults=Ts;ot.defaults=Xe;ot.use=function(...e){return He.use(...e),ot.defaults=He.defaults,mu(ot.defaults),ot};ot.walkTokens=function(e,t){return He.walkTokens(e,t)};ot.parseInline=He.parseInline;ot.Parser=Xt;ot.parser=Xt.parse;ot.Renderer=na;ot.TextRenderer=Ds;ot.Lexer=Ut;ot.lexer=Ut.lex;ot.Tokenizer=aa;ot.Hooks=Ir;ot.parse=ot;ot.options;ot.setOptions;ot.use;ot.walkTokens;ot.parseInline;Xt.parse;Ut.lex;function Bu(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(s,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(a.length){var n=new RegExp(`
176
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(s){return s.replace(n,`
177
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=s;typeof s=="string"&&s.includes(`
178
+ `)&&(u=String(s).split(`
179
+ `).map(function(f,d){return d===0?f:""+h+f}).join(`
180
+ `)),o+=u+i[c+1]}),o}var zC={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},Mn=new Map,Lu=new Map,WC=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(F.debug("Registering icon pack:",t.name),"loader"in t)Lu.set(t.name,t.loader);else if("icons"in t)Mn.set(t.name,t.icons);else throw F.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Mu=p(async(e,t)=>{const r=q2(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=Mn.get(i);if(!a){const o=Lu.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},Mn.set(i,a)}catch(s){throw F.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Y2(a,r.name);if(!n)throw new Error(`Icon not found: ${e}`);return n},"getRegisteredIconData"),qC=p(async e=>{try{return await Mu(e),!0}catch{return!1}},"isIconAvailable"),hi=p(async(e,t,r)=>{let i;try{i=await Mu(e,t==null?void 0:t.fallbackPrefix)}catch(o){F.error(o),i=zC}const a=Q2(i,t),n=rC(eC(a.body),{...a.attributes,...r});return Vt(n,At())},"getIconSVG");function Au(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
181
+ `).replace(/\n{2,}/g,`
182
+ `),a=Bu(i);return t===!1?a.replace(/ /g,"&nbsp;"):a}p(Au,"preprocessMarkdown");function $u(e,t={}){const r=Au(e,t),i=ot.lexer(r),a=[[]];let n=0;function o(s,c="normal"){s.type==="text"?s.text.split(`
183
+ `).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[n].push({content:f,type:c})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(l=>{o(l,s.type)}):s.type==="html"&&a[n].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{var c;s.type==="paragraph"?(c=s.tokens)==null||c.forEach(l=>{o(l)}):s.type==="html"?a[n].push({content:s.text,type:"normal"}):a[n].push({content:s.raw,type:"normal"})}),a}p($u,"markdownToLines");function Fu(e,{markdownAutoWrap:t}={}){const r=ot.lexer(e);function i(a){var n,o,s;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(n=a.tokens)==null?void 0:n.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(s=a.tokens)==null?void 0:s.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(F.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(Fu,"markdownToHTML");function Eu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Eu,"splitTextToChars");function Du(e,t){const r=Eu(t.content);return Os(e,[],r,t.type)}p(Du,"splitWordToFitWidth");function Os(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?Os(e,o,n,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Os,"splitWordToFitWidthRecursion");function Ou(e,t){if(e.some(({content:r})=>r.includes(`
184
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return sa(e,t)}p(Ou,"splitLineToFitWidth");function sa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const n=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(n),t(o))return sa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(n);else if(n.content){const[s,c]=Du(t,n);r.push([s]),c.content&&e.unshift(c)}return sa(e,t,r)}p(sa,"splitLineToFitWidthRecursion");function An(e,t){t&&e.attr("style",t)}p(An,"applyStyle");async function Ru(e,t,r,i,a=!1,n=At()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),c=dr(t.label)?await Gn(t.label.replace(br.lineBreakRegex,`
185
+ `),n):Vt(t.label,n),l=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(c),An(h,t.labelStyle),h.attr("class",`${l} ${i}`),An(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}p(Ru,"addHtmlSpan");function Aa(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Aa,"createTspan");function Iu(e,t,r){const i=e.append("text"),a=Aa(i,1,t);$a(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}p(Iu,"computeWidthOfText");function HC(e,t,r){var o;const i=e.append("text"),a=Aa(i,1,t);$a(a,[{content:r,type:"normal"}]);const n=(o=a.node())==null?void 0:o.getBoundingClientRect();return n&&i.remove(),n}p(HC,"computeDimensionOfText");function Pu(e,t,r,i=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let c=0;for(const l of r){const h=p(f=>Iu(n,1.1,f)<=e,"checkWidth"),u=h(l)?[l]:Ou(l,h);for(const f of u){const d=Aa(s,c,1.1);$a(d,f),c++}}if(i){const l=s.node().getBBox(),h=2;return o.attr("x",l.x-h).attr("y",l.y-h).attr("width",l.width+2*h).attr("height",l.height+2*h),n.node()}else return s.node()}p(Pu,"createFormattedText");function $a(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p($a,"updateTextContentAndStyles");async function Nu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,o)=>(r.push((async()=>{const s=`${n}:${o}`;return await qC(s)?await hi(s,void 0,{class:"label-icon"}):`<i class='${Vt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Nu,"replaceIconSubstring");var Te=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:c=!1}={},l)=>{if(F.debug("XYZ createText",t,r,i,a,n,o,"addSvgBackground: ",c),n){const h=Fu(t,l),u=await Nu(Ue(h),l),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:dr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Ru(e,d,s,a,c,l)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=$u(h.replace("<br>","<br/>"),l),f=Pu(s,e,u,t?c:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");rt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(f).select("text").attr("style",g)}return f}},"createText");function Ha(e,t,r){if(e&&e.length){const[i,a]=t,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-a)*s+i,c[1]=(l-i)*s+(h-a)*o+a}}}function jC(e,t){return e[0]===t[0]&&e[1]===t[1]}function YC(e,t,r,i=1){const a=r,n=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(a)for(const l of o)Ha(l,s,a);const c=function(l,h,u){const f=[];for(const b of l){const w=[...b];jC(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let w=0;w<b.length-1;w++){const _=b[w],k=b[w+1];if(_[1]!==k[1]){const C=Math.min(_[1],k[1]);g.push({ymin:C,ymax:Math.max(_[1],k[1]),x:C===_[1]?_[0]:k[0],islope:(k[0]-_[0])/(k[1]-_[1])})}}if(g.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>y);w++)b=w;g.splice(0,b+1).forEach(w=>{m.push({s:y,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const _=m[b].edge,k=m[w].edge;d.push([[Math.round(_.x),y],[Math.round(k.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,n,i);if(a){for(const l of o)Ha(l,s,-a);(function(l,h,u){const f=[];l.forEach(d=>f.push(...d)),Ha(f,h,u)})(c,s,-a)}return c}function ui(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),YC(e,a,i,n||1)}class Rs{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ui(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Fa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class VC extends Rs{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=ui(t,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(n),c=.5*i*Math.sin(n);for(const[l,h]of a)Fa([l,h])&&o.push([[l[0]-s,l[1]+c],[...h]],[[l[0]+s,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class GC extends Rs{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(t,a);return i.ops=i.ops.concat(n.ops),i}}class UC{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const o=a/4;for(const s of t){const c=Fa(s),l=c/a,h=Math.ceil(l)-1,u=c-h*a,f=(s[0][0]+s[1][0])/2-a/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class XC{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return t.forEach(o=>{const s=Fa(o),c=Math.floor(s/(i+a)),l=(s+a-c*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<c;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+l*Math.cos(f),h[1]+g*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];n.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),n}}class ZC{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=ui(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(n=>{const o=Fa(n),s=Math.round(o/(2*r));let c=n[0],l=n[1];c[0]>l[0]&&(c=n[1],l=n[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+d*Math.cos(h),c[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),a}}const Pt={};class KC{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const QC=0,ja=1,Ro=2,gi={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 Ya(e,t){return e.type===t}function Is(e){const t=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:QC,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:ja,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Ro,text:""},s}(e);let i="BOD",a=0,n=r[a];for(;!Ya(n,Ro);){let o=0;const s=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return Is("M0,0"+e);a++,o=gi[n.text],i=n.text}else Ya(n,ja)?o=gi[i]:(a++,o=gi[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let c=a;c<a+o;c++){const l=r[c];if(!Ya(l,ja))throw new Error("Param not a number: "+i+","+l.text);s[s.length]=+l.text}if(typeof gi[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:s};t.push(c),a+=o,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function zu(e){let t=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of e)switch(o){case"M":n.push({key:"M",data:[...s]}),[t,r]=s,[i,a]=s;break;case"m":t+=s[0],r+=s[1],n.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":n.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],n.push({key:"L",data:[t,r]});break;case"C":n.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const c=s.map((l,h)=>h%2?l+r:l+t);n.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":n.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const c=s.map((l,h)=>h%2?l+r:l+t);n.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":n.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":n.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],n.push({key:"H",data:[t]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const c=s.map((l,h)=>h%2?l+r:l+t);n.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":n.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],n.push({key:"T",data:[t,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),t=i,r=a}return n}function Wu(e){const t=[];let r="",i=0,a=0,n=0,o=0,s=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[n,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],s=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=a+(a-c)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),s=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=a+(a-c)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=d,c=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),s=u,c=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(qu(i,a,y,x,u,f,d,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=n,a=o}r=l}return t}function Ar(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function qu(e,t,r,i,a,n,o,s,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(l)[d,g,m,y]=l;else{[e,t]=Ar(e,t,-h),[r,i]=Ar(r,i,-h);const O=(e-r)/2,M=(t-i)/2;let B=O*O/(a*a)+M*M/(n*n);B>1&&(B=Math.sqrt(B),a*=B,n*=B);const T=a*a,A=n*n,L=T*A-T*M*M-A*O*O,N=T*M*M+A*O*O,V=(s===c?-1:1)*Math.sqrt(Math.abs(L/N));m=V*a*M/n+(e+r)/2,y=V*-n*O/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),c&&d>g&&(d-=2*Math.PI),!c&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,M=r,B=i;g=c&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=qu(r=m+a*Math.cos(g),i=y+n*Math.sin(g),M,B,a,n,o,0,c,[g,O,m,y])}x=g-d;const b=Math.cos(d),w=Math.sin(d),_=Math.cos(g),k=Math.sin(g),C=Math.tan(x/4),v=4/3*a*C,E=4/3*n*C,R=[e,t],D=[e+v*w,t-E*b],$=[r+v*k,i-E*_],z=[r,i];if(D[0]=2*R[0]-D[0],D[1]=2*R[1]-D[1],l)return[D,$,z].concat(f);{f=[D,$,z].concat(f);const O=[];for(let M=0;M<f.length;M+=3){const B=Ar(f[M][0],f[M][1],h),T=Ar(f[M+1][0],f[M+1][1],h),A=Ar(f[M+2][0],f[M+2][1],h);O.push([B[0],B[1],T[0],T[1],A[0],A[1]])}return O}}const JC={randOffset:function(e,t){return K(e,t)},randOffsetWithRange:function(e,t,r){return oa(e,t,r)},ellipse:function(e,t,r,i,a){const n=ju(r,i,a);return $n(e,t,a,n).opset},doubleLineOps:function(e,t,r,i,a){return ve(e,t,r,i,a,!0)}};function Hu(e,t,r,i,a){return{type:"path",ops:ve(e,t,r,i,a)}}function Mi(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let n=0;n<i-1;n++)a.push(...ve(e[n][0],e[n][1],e[n+1][0],e[n+1][1],r));return t&&a.push(...ve(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Hu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function tw(e,t,r,i,a){return function(n,o){return Mi(n,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Io(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=mi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:mi(r[0],1.5*(1+.22*t.roughness),zo(t));for(let n=1;n<r.length;n++){const o=r[n];if(o.length){const s=mi(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:mi(o,1.5*(1+.22*t.roughness),zo(t));for(const l of s)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function ju(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(e/2),s=Math.abs(t/2);const c=1-r.curveFitting;return o+=K(o*c,r),s+=K(s*c,r),{increment:n,rx:o,ry:s}}function $n(e,t,r,i){const[a,n]=Wo(i.increment,e,t,i.rx,i.ry,1,i.increment*oa(.1,oa(.4,1,r),r),r);let o=la(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Wo(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=la(s,null,r);o=o.concat(c)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function Po(e,t,r,i,a,n,o,s,c){const l=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=K(.01*u,c),f+=K(.01*f,c);let d=a,g=n;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(g-d)/2),x=qo(y,l,h,u,f,d,g,1,c);if(!c.disableMultiStroke){const b=qo(y,l,h,u,f,d,g,1.5,c);x.push(...b)}return o&&(s?x.push(...ve(l,h,l+u*Math.cos(d),h+f*Math.sin(d),c),...ve(l,h,l+u*Math.cos(g),h+f*Math.sin(g),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function No(e,t){const r=Wu(zu(Is(e))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...ve(n[0],n[1],s[0],s[1],t)),n=[s[0],s[1]];break;case"C":{const[c,l,h,u,f,d]=s;i.push(...ew(c,l,h,u,f,d,n,t)),n=[f,d];break}case"Z":i.push(...ve(n[0],n[1],a[0],a[1],t)),n=[a[0],a[1]]}return{type:"path",ops:i}}function Va(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+K(a,t),i[0][1]+K(a,t)]});for(let o=1;o<n;o++)r.push({op:"lineTo",data:[i[o][0]+K(a,t),i[o][1]+K(a,t)]})}}return{type:"fillPath",ops:r}}function Ze(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Pt[a])switch(a){case"zigzag":Pt[a]||(Pt[a]=new VC(i));break;case"cross-hatch":Pt[a]||(Pt[a]=new GC(i));break;case"dots":Pt[a]||(Pt[a]=new UC(i));break;case"dashed":Pt[a]||(Pt[a]=new XC(i));break;case"zigzag-line":Pt[a]||(Pt[a]=new ZC(i));break;default:a="hachure",Pt[a]||(Pt[a]=new Rs(i))}return Pt[a]}(t,JC).fillPolygons(e,t)}function zo(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Yu(e){return e.randomizer||(e.randomizer=new KC(e.seed||0)),e.randomizer.next()}function oa(e,t,r,i=1){return r.roughness*i*(Yu(r)*(t-e)+e)}function K(e,t,r=1){return oa(-e,e,t,r)}function ve(e,t,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=Fn(e,t,r,i,a,!0,!1);if(o)return s;const c=Fn(e,t,r,i,a,!0,!0);return s.concat(c)}function Fn(e,t,r,i,a,n,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(s);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>s&&(h=c/10);const u=h/2,f=.2+.2*Yu(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=K(d,a,l),g=K(g,a,l);const m=[],y=()=>K(u,a,l),x=()=>K(h,a,l),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:K(h,a,l)),t+(b?0:K(h,a,l))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function mi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+K(t,r),e[0][1]+K(t,r)]),i.push([e[0][0]+K(t,r),e[0][1]+K(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+K(t,r),e[a][1]+K(t,r)]),a===e.length-1&&i.push([e[a][0]+K(t,r),e[a][1]+K(t,r)]);return la(i,null,r)}function la(e,t,r){const i=e.length,a=[];if(i>3){const n=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const c=e[s];n[0]=[c[0],c[1]],n[1]=[c[0]+(o*e[s+1][0]-o*e[s-1][0])/6,c[1]+(o*e[s+1][1]-o*e[s-1][1])/6],n[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],n[3]=[e[s+1][0],e[s+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Fn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Wo(e,t,r,i,a,n,o,s){const c=[],l=[];if(s.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(u),l.push(u)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=K(.5,s)-Math.PI/2;l.push([K(n,s)+t+.9*i*Math.cos(h-e),K(n,s)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[K(n,s)+t+i*Math.cos(f),K(n,s)+r+a*Math.sin(f)];c.push(d),l.push(d)}l.push([K(n,s)+t+i*Math.cos(h+2*Math.PI+.5*o),K(n,s)+r+a*Math.sin(h+2*Math.PI+.5*o)]),l.push([K(n,s)+t+.98*i*Math.cos(h+o),K(n,s)+r+.98*a*Math.sin(h+o)]),l.push([K(n,s)+t+.9*i*Math.cos(h+.5*o),K(n,s)+r+.9*a*Math.sin(h+.5*o)])}return[l,c]}function qo(e,t,r,i,a,n,o,s,c){const l=n+K(.1,c),h=[];h.push([K(s,c)+t+.9*i*Math.cos(l-e),K(s,c)+r+.9*a*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([K(s,c)+t+i*Math.cos(u),K(s,c)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),la(h,null,c)}function ew(e,t,r,i,a,n,o,s){const c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:K(l[0],s)),o[1]+(f?0:K(l[0],s))]}),h=f?[a,n]:[a+K(l[d],s),n+K(l[d],s)],c.push({op:"bcurveTo",data:[e+K(l[d],s),t+K(l[d],s),r+K(l[d],s),i+K(l[d],s),h[0],h[1]]});return c}function $r(e){return[...e]}function Ho(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push($r(e[0]),$r(e[1]),$r(e[2]),$r(e[2]));else{const a=[];a.push(e[0],e[0]);for(let s=1;s<e.length;s++)a.push(e[s]),s===e.length-1&&a.push(e[s]);const n=[],o=1-t;i.push($r(a[0]));for(let s=1;s+2<a.length;s++){const c=a[s];n[0]=[c[0],c[1]],n[1]=[c[0]+(o*a[s+1][0]-o*a[s-1][0])/6,c[1]+(o*a[s+1][1]-o*a[s-1][1])/6],n[2]=[a[s+1][0]+(o*a[s][0]-o*a[s+2][0])/6,a[s+1][1]+(o*a[s][1]-o*a[s+2][1])/6],n[3]=[a[s+1][0],a[s+1][1]],i.push(n[1],n[2],n[3])}}return i}function Ai(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function rw(e,t,r){const i=Ai(t,r);if(i===0)return Ai(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ai(e,$e(t,r,a))}function $e(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function En(e,t,r,i){const a=i||[];if(function(s,c){const l=s[c+0],h=s[c+1],u=s[c+2],f=s[c+3];let d=3*h[0]-2*l[0]-f[0];d*=d;let g=3*h[1]-2*l[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g}(e,t)<r){const s=e[t+0];a.length?(n=a[a.length-1],o=s,Math.sqrt(Ai(n,o))>1&&a.push(s)):a.push(s),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+3],f=$e(c,l,.5),d=$e(l,h,.5),g=$e(h,u,.5),m=$e(f,d,.5),y=$e(d,g,.5),x=$e(m,y,.5);En([c,f,m,x],0,r,a),En([x,y,g,u],0,r,a)}var n,o;return a}function iw(e,t){return ca(e,0,e.length,t)}function ca(e,t,r,i,a){const n=a||[],o=e[t],s=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=rw(e[h],o,s);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(ca(e,t,l+1,i,n),ca(e,l,r,i,n)):(n.length||n.push(o),n.push(s)),n}function Ga(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let n=0;n<a;n++)En(e,3*n,t,i);return r&&r>0?ca(i,0,i.length,r):i}const Wt="none";class ha{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,n){const o=this._o(n);return this._d("line",[Hu(t,r,i,a,o)],o)}rectangle(t,r,i,a,n){const o=this._o(n),s=[],c=tw(t,r,i,a,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?s.push(Va([l],o)):s.push(Ze([l],o))}return o.stroke!==Wt&&s.push(c),this._d("rectangle",s,o)}ellipse(t,r,i,a,n){const o=this._o(n),s=[],c=ju(i,a,o),l=$n(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=$n(t,r,o,c).opset;h.type="fillPath",s.push(h)}else s.push(Ze([l.estimatedPoints],o));return o.stroke!==Wt&&s.push(l.opset),this._d("ellipse",s,o)}circle(t,r,i,a){const n=this.ellipse(t,r,i,i,a);return n.shape="circle",n}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Mi(t,!1,i)],i)}arc(t,r,i,a,n,o,s=!1,c){const l=this._o(c),h=[],u=Po(t,r,i,a,n,o,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Po(t,r,i,a,n,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,m,y,x,b){const w=f,_=d;let k=Math.abs(g/2),C=Math.abs(m/2);k+=K(.01*k,b),C+=K(.01*C,b);let v=y,E=x;for(;v<0;)v+=2*Math.PI,E+=2*Math.PI;E-v>2*Math.PI&&(v=0,E=2*Math.PI);const R=(E-v)/b.curveStepCount,D=[];for(let $=v;$<=E;$+=R)D.push([w+k*Math.cos($),_+C*Math.sin($)]);return D.push([w+k*Math.cos(E),_+C*Math.sin(E)]),D.push([w,_]),Ze([D],b)}(t,r,i,a,n,o,l));return l.stroke!==Wt&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],n=Io(t,i);if(i.fill&&i.fill!==Wt)if(i.fillStyle==="solid"){const o=Io(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const c=typeof s[0][0]=="number"?[s]:s;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...Ga(Ho([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Ga(Ho(l),10,(1+i.roughness)/2))}o.length&&a.push(Ze([o],i))}return i.stroke!==Wt&&a.push(n),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],n=Mi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Va([t],i)):a.push(Ze([t],i))),i.stroke!==Wt&&a.push(n),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=i.fill&&i.fill!=="transparent"&&i.fill!==Wt,o=i.stroke!==Wt,s=!!(i.simplification&&i.simplification<1),c=function(h,u,f){const d=Wu(zu(Is(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ga(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:k,data:C}of d)switch(k){case"M":w(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const v=m.length?m[m.length-1]:y;x.push([v[0],v[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!f)return g;const _=[];for(const k of g){const C=iw(k,f);C.length&&_.push(C)}return _}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),l=No(t,i);if(n)if(i.fillStyle==="solid")if(c.length===1){const h=No(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(Va(c,i));else a.push(Ze(c,i));return o&&(s?c.forEach(h=>{a.push(Mi(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const n=typeof r=="number"&&r>=0?a.data.map(o=>+o.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const n of r){let o=null;switch(n.type){case"path":o={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Wt};break;case"fillPath":o={d:this.opsToPath(n),stroke:Wt,strokeWidth:0,fill:i.fill||Wt};break;case"fillSketch":o=this.fillSketch(n,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Wt,strokeWidth:i,fill:Wt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class aw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,n,s),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const n of r.ops){const o=typeof i=="number"&&i>=0?n.data.map(s=>+s.toFixed(i)):n.data;switch(n.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o),o}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o),o}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o),o}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n),n}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,n,o,s=!1,c){const l=this.gen.arc(t,r,i,a,n,o,s,c);return this.draw(l),l}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const yi="http://www.w3.org/2000/svg";class nw{constructor(t,r){this.svg=t,this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(yi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let c=null;switch(s.type){case"path":c=a.createElementNS(yi,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(yi,"path"),c.setAttribute("d",this.opsToPath(s,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,s,i)}c&&n.appendChild(c)}return n}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const n=t.createElementNS(yi,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o)}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o)}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o)}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,n,o,s=!1,c){const l=this.gen.arc(t,r,i,a,n,o,s,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var q={canvas:(e,t)=>new aw(e,t),svg:(e,t)=>new nw(e,t),generator:e=>new ha(e),newSeed:()=>ha.newSeed()},Z=p(async(e,t,r)=>{var u,f;let i;const a=t.useHtmlLabels||wt((u=st())==null?void 0:u.htmlLabels);r?i=r:i="node default";const n=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",Ft(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const c=await Te(o,Vt(Ue(s),st()),{useHtmlLabels:a,width:t.width||((f=st().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const d=c.children[0],g=rt(c),m=d.getElementsByTagName("img");if(m){const y=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function w(){if(x.style.display="flex",x.style.flexDirection="column",y){const _=st().fontSize?st().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[C=Sl.fontSize]=Ba(_),v=C*k+"px";x.style.minWidth=v,x.style.maxWidth=v}else x.style.width="100%";b(x)}p(w,"setupImage"),setTimeout(()=>{x.complete&&w()}),x.addEventListener("error",w),x.addEventListener("load",w)})))}l=d.getBoundingClientRect(),g.attr("width",l.width),g.attr("height",l.height)}return a?o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):o.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:l,halfPadding:h,label:o}},"labelHelper"),Ua=p(async(e,t,r)=>{var c,l,h,u,f,d;const i=r.useHtmlLabels||wt((l=(c=st())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await Te(a,Vt(Ue(t),st()),{useHtmlLabels:i,width:r.width||((u=(h=st())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=n.getBBox();const s=r.padding/2;if(wt((d=(f=st())==null?void 0:f.flowchart)==null?void 0:d.htmlLabels)){const g=n.children[0],m=rt(n);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:a}},"insertLabel"),Y=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),X=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function tt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(tt,"createPathFromPoints");function _e(e,t,r,i,a,n){const o=[],c=r-e,l=i-t,h=c/n,u=2*Math.PI/h,f=t+l/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*c,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(_e,"generateFullSineWavePoints");function ti(e,t,r,i,a,n){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(ti,"generateCirclePoints");var sw=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,n=t.y-i,o=e.width/2,s=e.height/2,c,l;return Math.abs(n)*o>Math.abs(a)*s?(n<0&&(s=-s),c=n===0?0:s*a/n,l=s):(a<0&&(o=-o),c=o,l=a===0?0:o*n/a),{x:r+c,y:i+l}},"intersectRect"),vr=sw;function Vu(e,t){t&&e.attr("style",t)}p(Vu,"applyStyle");async function Gu(e){const t=rt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=st();let a=e.label;e.label&&dr(e.label)&&(a=await Gn(e.label.replace(br.lineBreakRegex,`
186
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Vt(o,i)),Vu(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Gu,"addHtmlLabel");var ow=p(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),wt(st().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),F.info("vertexText"+a);const n={isNode:i,label:Ue(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Gu(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const s of o){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=s.trim(),n.appendChild(c)}return n}},"createLabel"),Re=ow,Be=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Uu=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=st(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=wt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Te(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const v=g.children[0],E=rt(g);m=v.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const v=q.svg(u),E=H(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),R=v.path(Be(b,w,y,x,0),E);_=u.insert(()=>(F.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",l.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=gs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),s){const v=d.select("span");v&&v.attr("style",s)}const C=_.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return vr(t,v)},{cluster:u,labelBBox:m}},"rect"),lw=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,n=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return vr(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),cw=p(async(e,t)=>{const r=st(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const d=u.node().appendChild(await Re(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(wt(r.flowchart.htmlLabels)){const R=d.children[0],D=rt(d);g=R.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,_=t.x-x/2,k=t.y-b/2;t.width=x;const C=t.y-t.height/2-y+g.height+2;let v;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),D=q.svg(l),$=t.rx||t.ry?D.path(Be(_,k,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:c,seed:a}):D.rectangle(_,k,x,b,{seed:a});v=l.insert(()=>$,":first-child");const z=D.rectangle(_,C,x,w,{fill:R?n:o,fillStyle:R?"hachure":"solid",stroke:c,seed:a});v=l.insert(()=>$,":first-child"),f=l.insert(()=>z)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",_).attr("y",k).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",_).attr("y",C).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${k+1-(wt(r.flowchart.htmlLabels)?0:3)})`);const E=v.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(R){return vr(t,R)},{cluster:l,labelBBox:g}},"roundedWithTitle"),hw=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=st(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=wt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Te(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const v=g.children[0],E=rt(g);m=v.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const v=q.svg(u),E=H(t,{roughness:.7,fill:n,stroke:o,fillWeight:4,seed:a}),R=v.path(Be(b,w,y,x,t.rx),E);_=u.insert(()=>(F.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",l.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=gs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),s){const v=d.select("span");v&&v.attr("style",s)}const C=_.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return vr(t,v)},{cluster:u,labelBBox:m}},"kanbanSection"),uw=p((e,t)=>{const r=st(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let d;if(t.look==="handDrawn"){const y=q.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return vr(t,m)},{cluster:o,labelBBox:{}}},"divider"),dw=Uu,fw={rect:Uu,squareRect:dw,roundedWithTitle:cw,noteGroup:lw,divider:uw,kanbanSection:hw},Xu=new Map,pw=p(async(e,t)=>{const r=t.shape||"rect",i=await fw[r](e,t);return Xu.set(t.id,i),i},"insertCluster"),IS=p(()=>{Xu=new Map},"clear");function Zu(e,t){return e.intersect(t)}p(Zu,"intersectNode");var gw=Zu;function Ku(e,t,r,i){var a=e.x,n=e.y,o=a-i.x,s=n-i.y,c=Math.sqrt(t*t*s*s+r*r*o*o),l=Math.abs(t*r*o/c);i.x<a&&(l=-l);var h=Math.abs(t*r*s/c);return i.y<n&&(h=-h),{x:a+l,y:n+h}}p(Ku,"intersectEllipse");var Qu=Ku;function Ju(e,t,r){return Qu(e,t,t,r)}p(Ju,"intersectCircle");var mw=Ju;function td(e,t,r,i){{const a=t.y-e.y,n=e.x-t.x,o=t.x*e.y-e.x*t.y,s=a*r.x+n*r.y+o,c=a*i.x+n*i.y+o,l=1e-6;if(s!==0&&c!==0&&Dn(s,c))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<l&&Math.abs(g)<l&&Dn(d,g))return;const m=a*u-h*n;if(m===0)return;const y=Math.abs(m/2);let x=n*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const w=x<0?(x-y)/m:(x+y)/m;return{x:b,y:w}}}p(td,"intersectLine");function Dn(e,t){return e*t>0}p(Dn,"sameSign");var yw=td;function ed(e,t,r){let i=e.x,a=e.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=i-e.width/2-o,l=a-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=yw(e,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});d&&n.push(d)}return n.length?(n.length>1&&n.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),n[0]):e}p(ed,"intersectPolygon");var xw=ed,P={node:gw,circle:mw,ellipse:Qu,polygon:xw,rect:vr};function rd(e,t){const{labelStyles:r}=j(t);t.labelStyle=r;const i=X(t);let a=i;i||(a="anchor");const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,c=q.svg(n),l=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=n.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Ft(s)),Y(t,u),t.intersect=function(f){return F.info("Circle intersect",t,o,f),P.circle(t,o,f)},n}p(rd,"anchor");function On(e,t,r,i,a,n,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*n*Math.sin(h)*(o?-1:1),b=l-y*a*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/n,(e-x)/a);let k=Math.atan2((i-b)/n,(r-x)/a)-w;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const C=[];for(let v=0;v<20;v++){const E=v/19,R=w+E*k,D=x+a*Math.cos(R),$=b+n*Math.sin(R);C.push({x:D,y:$})}return C}p(On,"generateArcPoints");async function id(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.width+t.padding+20,s=n.height+t.padding,c=s/2,l=c/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...On(-o/2,-s/2,-o/2,s/2,l,c,!1),{x:o/2,y:s/2},...On(o/2,s/2,o/2,-s/2,l,c,!0)],f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=tt(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),Y(t,y),t.intersect=function(x){return P.polygon(t,u,x)},a}p(id,"bowTieRect");function Le(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Le,"insertPolygonShape");async function ad(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.height+t.padding,s=12,c=n.width+t.padding+s,l=0,h=c,u=-o,f=0,d=[{x:l+s,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+s},{x:l+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=q.svg(a),x=H(t,{}),b=tt(d),w=y.path(b,x);g=a.insert(()=>w,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=Le(a,c,o,d);return i&&g.attr("style",i),Y(t,g),t.intersect=function(y){return P.polygon(t,d,y)},a}p(ad,"card");function nd(e,t){const{nodeStyles:r}=j(t);t.label="";const i=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(28,t.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=q.svg(i),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=tt(o),h=s.path(l,c),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return P.polygon(t,o,f)},i}p(nd,"choice");async function Ps(e,t,r){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,halfPadding:s}=await Z(e,t,X(t)),c=(r==null?void 0:r.padding)??s,l=o.width/2+c;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(n),d=H(t,{}),g=f.circle(0,0,l*2,d);h=n.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Ft(u))}else h=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0);return Y(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return P.circle(f,g,d)},t.intersect=function(f){return F.info("Circle intersect",t,l,f),P.circle(t,l,f)},n}p(Ps,"circle");function sd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},n={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${n.x},${n.y} L ${s.x},${s.y}
187
+ M ${a.x},${a.y} L ${o.x},${o.y}`}p(sd,"createLine");function od(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),n=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=q.svg(a),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=s.circle(0,0,n*2,c),h=sd(n),u=s.path(h,c),f=a.insert(()=>l,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Y(t,f),t.intersect=function(d){return F.info("crossedCircle intersect",t,{radius:n,point:d}),P.circle(t,n,d)},a}p(od,"crossedCircle");function he(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(he,"generateCirclePoints");async function ld(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...he(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...he(s/2+l*2,-l,l,20,-180,-270),...he(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...he(s/2,c/2,l,20,0,90)],f=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...he(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...he(s/2+s*.1,-l,l,20,-180,-270),...he(s/2+s*.1,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...he(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2,y:c/2+l}],d=q.svg(a),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=tt(u).replace("Z",""),x=d.path(y,g),b=tt(f),w=d.path(b,{...g}),_=a.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-s/2+l-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,_),t.intersect=function(k){return P.polygon(t,f,k)},a}p(ld,"curlyBraceLeft");function ue(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(ue,"generateCirclePoints");async function cd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...ue(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...ue(s/2+l*2,-l,l,20,-180,-270),...ue(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...ue(s/2,c/2,l,20,0,90)],f=[{x:-s/2,y:-c/2-l},{x:s/2,y:-c/2-l},...ue(s/2,-c/2,l,20,-90,0),{x:s/2+l,y:-l},...ue(s/2+l*2,-l,l,20,-180,-270),...ue(s/2+l*2,l,l,20,-90,-180),{x:s/2+l,y:c/2},...ue(s/2,c/2,l,20,0,90),{x:s/2,y:c/2+l},{x:-s/2,y:c/2+l}],d=q.svg(a),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=tt(u).replace("Z",""),x=d.path(y,g),b=tt(f),w=d.path(b,{...g}),_=a.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,_),t.intersect=function(k){return P.polygon(t,f,k)},a}p(cd,"curlyBraceRight");function St(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(St,"generateCirclePoints");async function hd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...St(s/2,-c/2,l,30,-90,0),{x:-s/2-l,y:l},...St(s/2+l*2,-l,l,20,-180,-270),...St(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:-c/2},...St(s/2,c/2,l,20,0,90)],f=[...St(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...St(-s/2-l/2,-l,l,20,0,90),...St(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...St(-s/2+l+l/2,c/2,l,30,-180,-270)],d=[{x:s/2,y:-c/2-l},{x:-s/2,y:-c/2-l},...St(s/2,-c/2,l,20,-90,0),{x:-s/2-l,y:-l},...St(s/2+l*2,-l,l,20,-180,-270),...St(s/2+l*2,l,l,20,-90,-180),{x:-s/2-l,y:c/2},...St(s/2,c/2,l,20,0,90),{x:-s/2,y:c/2+l},{x:s/2-l-l/2,y:c/2+l},...St(-s/2+l+l/2,-c/2,l,20,-90,-180),{x:s/2-l/2,y:l},...St(-s/2-l/2,-l,l,20,0,90),...St(-s/2-l/2,l,l,20,-90,0),{x:s/2-l/2,y:-l},...St(-s/2+l+l/2,c/2,l,30,-180,-270)],g=q.svg(a),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=tt(u).replace("Z",""),b=g.path(x,m),_=tt(f).replace("Z",""),k=g.path(_,m),C=tt(d),v=g.path(C,{...m}),E=a.insert("g",":first-child");return E.insert(()=>v,":first-child").attr("stroke-opacity",0),E.insert(()=>b,":first-child"),E.insert(()=>k,":first-child"),E.attr("class","text"),h&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,E),t.intersect=function(R){return P.polygon(t,d,R)},a}p(hd,"curlyBraces");async function ud(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=80,s=20,c=Math.max(o,(n.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),l=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=c,m=l,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...ti(-y,-m/2,h,50,270,90)],w=tt(b),_=f.path(w,d),k=a.insert(()=>_,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-c/2}, ${-l/2})`),Y(t,k),t.intersect=function(C){return P.polygon(t,b,C)},a}p(ud,"curvedTrapezoid");var bw=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Cw=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),ww=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function dd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+t.padding,t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(n.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=q.svg(a),g=Cw(0,0,s,h,c,l),m=ww(0,l,s,h,c,l),y=d.path(g,H(t,{})),x=d.path(m,H(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=bw(0,0,s,h,c,l);u=a.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Ft(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),Y(t,u),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(d){const g=P.rect(t,d),m=g.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}p(dd,"cylinder");async function fd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=n.width+t.padding,c=n.height+t.padding,l=c*.2,h=-s/2,u=-c/2-l/2,{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+l+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return P.rect(t,b)},a}p(fd,"dividedRectangle");async function pd(e,t){var f,d;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Z(e,t,X(t)),c=n.width/2+o+5,l=n.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=q.svg(a),m=H(t,{roughness:.2,strokeWidth:2.5}),y=H(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,c*2,m),b=g.circle(0,0,l*2,y);h=a.insert("g",":first-child"),h.attr("class",Ft(t.cssClasses)).attr("style",Ft(u)),(f=h.node())==null||f.appendChild(x),(d=h.node())==null||d.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return Y(t,h),t.intersect=function(g){return F.info("DoubleCircle intersect",t,c,g),P.circle(t,c,g)},a}p(pd,"doublecircle");function gd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=j(t);t.label="",t.labelStyle=i;const n=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,c=q.svg(n),{nodeBorder:l}=r,h=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=n.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),Y(t,f),t.intersect=function(d){return F.info("filledCircle intersect",t,{radius:o,point:d}),P.circle(t,o,d)},n}p(gd,"filledCircle");async function md(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=n.width+(t.padding??0),c=s+n.height,l=s+n.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=tt(h),m=f.path(g,d),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=c,Y(t,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,h,x),P.polygon(t,h,x)},a}p(md,"flippedTriangle");function yd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=j(t);t.label="";const o=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,u=-1*l/2,f=q.svg(o),d=H(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,c,l,d),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Y(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return P.rect(t,x)},o}p(yd,"forkJoin");async function xd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const a=80,n=50,{shapeSvg:o,bbox:s}=await Z(e,t,X(t)),c=Math.max(a,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=q.svg(o),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...ti(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=tt(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Y(t,x),t.intersect=function(b){return F.info("Pill intersect",t,{radius:h,point:b}),P.polygon(t,g,b)},o}p(xd,"halfRoundedRectangle");async function bd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.height+(t.padding??0),s=n.width+(t.padding??0)*2.5,{cssStyles:c}=t,l=q.svg(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const f=u/6;u=u+f;const d=o/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=tt(y),b=l.path(x,h),w=a.insert(()=>b,":first-child");return w.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=s,t.height=o,Y(t,w),t.intersect=function(_){return P.polygon(t,y,_)},a}p(bd,"hexagon");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await Z(e,t,X(t)),n=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,c=q.svg(a),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],u=tt(h),f=c.path(u,l),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-n/2}, ${-o/2})`),Y(t,d),t.intersect=function(g){return F.info("Pill intersect",t,{points:h}),P.polygon(t,h,g)},a}p(Cd,"hourglass");async function wd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await Z(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Cr(t),x=-g/2,b=-d/2,w=t.label?8:0,_=q.svg(l),k=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const C=_.rectangle(x,b,g,d,k),v=Math.max(g,h.width),E=d+h.height+w,R=_.rectangle(-v/2,-E/2,v,E,{...k,fill:"transparent",stroke:"none"}),D=l.insert(()=>C,":first-child"),$=l.insert(()=>R);if(t.icon){const z=l.append("g");z.html(`<g>${await hi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const O=z.node().getBBox(),M=O.width,B=O.height,T=O.x,A=O.y;z.attr("transform",`translate(${-M/2-T},${f?h.height/2+w/2-B/2-A:-h.height/2-w/2-B/2-A})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-E/2:E/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Y(t,$),t.intersect=function(z){if(F.info("iconSquare intersect",t,z),!t.label)return P.rect(t,z);const O=t.x??0,M=t.y??0,B=t.height??0;let T=[];return f?T=[{x:O-h.width/2,y:M-B/2},{x:O+h.width/2,y:M-B/2},{x:O+h.width/2,y:M-B/2+h.height+w},{x:O+g/2,y:M-B/2+h.height+w},{x:O+g/2,y:M+B/2},{x:O-g/2,y:M+B/2},{x:O-g/2,y:M-B/2+h.height+w},{x:O-h.width/2,y:M-B/2+h.height+w}]:T=[{x:O-g/2,y:M-B/2},{x:O+g/2,y:M-B/2},{x:O+g/2,y:M-B/2+d},{x:O+h.width/2,y:M-B/2+d},{x:O+h.width/2/2,y:M+B/2},{x:O-h.width/2,y:M+B/2},{x:O-h.width/2,y:M-B/2+d},{x:O-g/2,y:M-B/2+d}],P.polygon(t,T,z)},l}p(wd,"icon");async function kd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,label:u}=await Z(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Cr(t),b=q.svg(l),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=x.get("fill");w.stroke=_??y;const k=l.append("g");t.icon&&k.html(`<g>${await hi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=k.node().getBBox(),v=C.width,E=C.height,R=C.x,D=C.y,$=Math.max(v,E)*Math.SQRT2+f*2,z=b.circle(0,0,$,w),O=Math.max($,h.width),M=$+h.height+d,B=b.rectangle(-O/2,-M/2,O,M,{...w,fill:"transparent",stroke:"none"}),T=l.insert(()=>z,":first-child"),A=l.insert(()=>B);return k.attr("transform",`translate(${-v/2-R},${g?h.height/2+d/2-E/2-D:-h.height/2-d/2-E/2-D})`),k.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-M/2:M/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Y(t,A),t.intersect=function(L){return F.info("iconSquare intersect",t,L),P.rect(t,L)},l}p(kd,"iconCircle");async function vd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await Z(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Cr(t),w=-m/2,_=-g/2,k=t.label?8:0,C=q.svg(l),v=H(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=b.get("fill");v.stroke=E??x;const R=C.path(Be(w,_,m,g,5),v),D=Math.max(m,h.width),$=g+h.height+k,z=C.rectangle(-D/2,-$/2,D,$,{...v,fill:"transparent",stroke:"none"}),O=l.insert(()=>R,":first-child").attr("class","icon-shape2"),M=l.insert(()=>z);if(t.icon){const B=l.append("g");B.html(`<g>${await hi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=B.node().getBBox(),A=T.width,L=T.height,N=T.x,V=T.y;B.attr("transform",`translate(${-A/2-N},${d?h.height/2+k/2-L/2-V:-h.height/2-k/2-L/2-V})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+k/2:-h.height/2-k/2})`),Y(t,M),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return P.rect(t,B);const T=t.x??0,A=t.y??0,L=t.height??0;let N=[];return d?N=[{x:T-h.width/2,y:A-L/2},{x:T+h.width/2,y:A-L/2},{x:T+h.width/2,y:A-L/2+h.height+k},{x:T+m/2,y:A-L/2+h.height+k},{x:T+m/2,y:A+L/2},{x:T-m/2,y:A+L/2},{x:T-m/2,y:A-L/2+h.height+k},{x:T-h.width/2,y:A-L/2+h.height+k}]:N=[{x:T-m/2,y:A-L/2},{x:T+m/2,y:A-L/2},{x:T+m/2,y:A-L/2+g},{x:T+h.width/2,y:A-L/2+g},{x:T+h.width/2/2,y:A+L/2},{x:T-h.width/2,y:A+L/2},{x:T-h.width/2,y:A-L/2+g},{x:T-m/2,y:A-L/2+g}],P.polygon(t,N,B)},l}p(vd,"iconRounded");async function _d(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await Z(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Cr(t),w=-m/2,_=-g/2,k=t.label?8:0,C=q.svg(l),v=H(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=b.get("fill");v.stroke=E??x;const R=C.path(Be(w,_,m,g,.1),v),D=Math.max(m,h.width),$=g+h.height+k,z=C.rectangle(-D/2,-$/2,D,$,{...v,fill:"transparent",stroke:"none"}),O=l.insert(()=>R,":first-child"),M=l.insert(()=>z);if(t.icon){const B=l.append("g");B.html(`<g>${await hi(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const T=B.node().getBBox(),A=T.width,L=T.height,N=T.x,V=T.y;B.attr("transform",`translate(${-A/2-N},${d?h.height/2+k/2-L/2-V:-h.height/2-k/2-L/2-V})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+k/2:-h.height/2-k/2})`),Y(t,M),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return P.rect(t,B);const T=t.x??0,A=t.y??0,L=t.height??0;let N=[];return d?N=[{x:T-h.width/2,y:A-L/2},{x:T+h.width/2,y:A-L/2},{x:T+h.width/2,y:A-L/2+h.height+k},{x:T+m/2,y:A-L/2+h.height+k},{x:T+m/2,y:A+L/2},{x:T-m/2,y:A+L/2},{x:T-m/2,y:A-L/2+h.height+k},{x:T-h.width/2,y:A-L/2+h.height+k}]:N=[{x:T-m/2,y:A-L/2},{x:T+m/2,y:A-L/2},{x:T+m/2,y:A-L/2+g},{x:T+h.width/2,y:A-L/2+g},{x:T+h.width/2/2,y:A+L/2},{x:T-h.width/2,y:A+L/2},{x:T-h.width/2,y:A-L/2+g},{x:T-m/2,y:A-L/2+g}],P.polygon(t,N,B)},l}p(_d,"iconSquare");async function Sd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/n;const{labelStyles:o}=j(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??n;t.width=Math.max(l,s??0);const{shapeSvg:u,bbox:f,label:d}=await Z(e,t,"image-shape default"),g=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=q.svg(u),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=b.rectangle(m,y,l,h,w),k=Math.max(l,f.width),C=h+f.height+x,v=b.rectangle(-k/2,-C/2,k,C,{...w,fill:"none",stroke:"none"}),E=u.insert(()=>_,":first-child"),R=u.insert(()=>v);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",l),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-l/2},${g?C/2-h:-C/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),E.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Y(t,R),t.intersect=function(D){if(F.info("iconSquare intersect",t,D),!t.label)return P.rect(t,D);const $=t.x??0,z=t.y??0,O=t.height??0;let M=[];return g?M=[{x:$-f.width/2,y:z-O/2},{x:$+f.width/2,y:z-O/2},{x:$+f.width/2,y:z-O/2+f.height+x},{x:$+l/2,y:z-O/2+f.height+x},{x:$+l/2,y:z+O/2},{x:$-l/2,y:z+O/2},{x:$-l/2,y:z-O/2+f.height+x},{x:$-f.width/2,y:z-O/2+f.height+x}]:M=[{x:$-l/2,y:z-O/2},{x:$+l/2,y:z-O/2},{x:$+l/2,y:z-O/2+h},{x:$+f.width/2,y:z-O/2+h},{x:$+f.width/2/2,y:z+O/2},{x:$-f.width/2,y:z+O/2},{x:$-f.width/2,y:z-O/2+h},{x:$-l/2,y:z-O/2+h}],P.polygon(t,M,D)},u}p(Sd,"imageSquare");async function Td(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=tt(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=Le(a,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Y(t,l),t.intersect=function(u){return P.polygon(t,c,u)},a}p(Td,"inv_trapezoid");async function Ea(e,t,r){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{shapeSvg:n,bbox:o}=await Z(e,t,X(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),l=-s/2,h=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=q.svg(n),y=H(t,{}),x=f||d?m.path(Be(l,h,s,c,f||0),y):m.rectangle(l,h,s,c,y);u=n.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Ft(g))}else u=n.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Ft(f)).attr("ry",Ft(d)).attr("x",l).attr("y",h).attr("width",s).attr("height",c);return Y(t,u),t.calcIntersect=function(m,y){return P.rect(m,y)},t.intersect=function(m){return P.rect(t,m)},n}p(Ea,"drawRect");async function Bd(e,t){const{shapeSvg:r,bbox:i,label:a}=await Z(e,t,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Y(t,n),t.intersect=function(c){return P.rect(t,c)},r}p(Bd,"labelRect");async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=tt(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=Le(a,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Y(t,l),t.intersect=function(u){return P.polygon(t,c,u)},a}p(Ld,"lean_left");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=tt(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=Le(a,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Y(t,l),t.intersect=function(u){return P.polygon(t,c,u)},a}p(Md,"lean_right");function Ad(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),c=7,l=[{x:o,y:0},{x:0,y:s+c/2},{x:o-2*c,y:s+c/2},{x:0,y:2*s},{x:o,y:s-c/2},{x:2*c,y:s-c/2}],h=q.svg(a),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=tt(l),d=h.path(f,u),g=a.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Y(t,g),t.intersect=function(m){return F.info("lightningBolt intersect",t,m),P.polygon(t,l,m)},a}p(Ad,"lightningBolt");var kw=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),vw=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_w=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function $d(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0),t.width??0),c=s/2,l=c/(2.5+s/50),h=Math.max(n.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=q.svg(a),m=vw(0,0,s,h,c,l,u),y=_w(0,l,s,h,c,l),x=H(t,{}),b=g.path(m,x),w=g.path(y,x);a.insert(()=>w,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=kw(0,0,s,h,c,l,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Ft(d)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-s/2}, ${-(h/2+l)})`),Y(t,f),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+l-(n.y-(n.top??0))})`),t.intersect=function(g){const m=P.rect(t,g),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}p($d,"linedCylinder");async function Fd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},..._e(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,l,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l/2-(n.y-(n.top??0))})`),Y(t,y),t.intersect=function(x){return P.polygon(t,g,x)},a}p(Fd,"linedWaveEdgedRect");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=q.svg(a),g=H(t,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+s-l,y:u+c+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u+c-l},{x:h+s+l,y:u+c-l},{x:h+s+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+s-l,y:u+l},{x:h+s-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=tt(m),b=d.path(x,g),w=tt(y),_=d.path(w,{...g,fill:"none"}),k=a.insert(()=>_,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)-l-(n.x-(n.left??0))}, ${-(n.height/2)+l-(n.y-(n.top??0))})`),Y(t,k),t.intersect=function(C){return P.polygon(t,m,C)},a}p(Ed,"multiRect");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,u=-s/2,f=-h/2,d=5,{cssStyles:g}=t,m=_e(u-d,f+h+d,u+s-d,f+h+d,l,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],w=q.svg(a),_=H(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=tt(x),C=w.path(k,_),v=tt(b),E=w.path(v,_),R=a.insert(()=>C,":first-child");return R.insert(()=>E),R.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)+d-l/2-(n.y-(n.top??0))})`),Y(t,R),t.intersect=function(D){return P.polygon(t,x,D)},a}p(Dd,"multiWaveEdgedRectangle");async function Od(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i,t.useHtmlLabels||((b=At().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:c}=await Z(e,t,X(t)),l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-l/2,f=-h/2,{cssStyles:d}=t,g=q.svg(o),m=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,l,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(w){return P.rect(t,w)},o}p(Od,"note");var Sw=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.width+t.padding,s=n.height+t.padding,c=o+s,l=.5,h=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=q.svg(a),g=H(t,{}),m=Sw(0,0,c),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2+l}, ${c/2})`),f&&u.attr("style",f)}else u=Le(a,c,c,h),u.attr("transform",`translate(${-c/2+l}, ${c/2})`);return i&&u.attr("style",i),Y(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=P.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}p(Rd,"question");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),l=-s/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:d}=t,g=q.svg(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=tt(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Y(t,b),t.intersect=function(w){return P.polygon(t,f,w)},a}p(Id,"rect_left_inv_arrow");async function Pd(e,t){var E,R;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=n.insert("g"),s=n.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=s.node().appendChild(await Re(l,t.labelStyle,!0,!0));let u={width:0,height:0};if(wt((R=(E=st())==null?void 0:E.flowchart)==null?void 0:R.htmlLabels)){const D=h.children[0],$=rt(h);u=D.getBoundingClientRect(),$.attr("width",u.width),$.attr("height",u.height)}F.info("Text 2",c);const f=c||[],d=h.getBBox(),g=s.node().appendChild(await Re(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=rt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;rt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),rt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),_=-u.width/2-x,k=-u.height/2-x;let C,v;if(t.look==="handDrawn"){const D=q.svg(n),$=H(t,{}),z=D.path(Be(_,k,b,w,t.rx||0),$),O=D.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,$);v=n.insert(()=>(F.debug("Rough node insert CXC",z),O),":first-child"),C=n.insert(()=>(F.debug("Rough node insert CXC",z),z),":first-child")}else C=o.insert("rect",":first-child"),v=o.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Y(t,C),t.intersect=function(D){return P.rect(t,D)},n}p(Pd,"rectWithTitle");function Pr(e,t,r,i,a,n,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*n*Math.sin(h)*(o?-1:1),b=l-y*a*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/n,(e-x)/a);let k=Math.atan2((i-b)/n,(r-x)/a)-w;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const C=[];for(let v=0;v<20;v++){const E=v/19,R=w+E*k,D=x+a*Math.cos(R),$=b+n*Math.sin(R);C.push({x:D,y:$})}return C}p(Pr,"generateArcPoints");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=(t==null?void 0:t.padding)??0,s=(t==null?void 0:t.padding)??0,c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o*2,l=(t!=null&&t.height?t==null?void 0:t.height:n.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2+u,y:-l/2},{x:c/2-u,y:-l/2},...Pr(c/2-u,-l/2,c/2,-l/2+u,h,h,!0),{x:c/2,y:-l/2+u},{x:c/2,y:l/2-u},...Pr(c/2,l/2-u,c/2-u,l/2,h,h,!0),{x:c/2-u,y:l/2},{x:-c/2+u,y:l/2},...Pr(-c/2+u,l/2,-c/2,l/2-u,h,h,!0),{x:-c/2,y:l/2-u},{x:-c/2,y:-l/2+u},...Pr(-c/2,-l/2+u,-c/2+u,-l/2,h,h,!0)],y=tt(m),x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Y(t,b),t.intersect=function(w){return P.polygon(t,m,w)},a}p(Nd,"roundedRect");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=(t==null?void 0:t.padding)??0,c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-n.width/2-s,u=-n.height/2-s,{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Ft(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return P.rect(t,b)},a}p(zd,"shadedProcess");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-s/2,h=-c/2,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:l,y:h},{x:l,y:h+c},{x:l+s,y:h+c},{x:l+s,y:h-c/2}],m=tt(g),y=f.path(m,d),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return P.polygon(t,g,b)},a}p(Wd,"slopedRect");async function qd(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ea(e,t,r)}p(qd,"squareRect");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.height+t.padding,s=n.width+o/4+t.padding,c=o/2,{cssStyles:l}=t,h=q.svg(a),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-s/2+c,y:-o/2},{x:s/2-c,y:-o/2},...ti(-s/2+c,0,c,50,90,270),{x:s/2-c,y:o/2},...ti(s/2-c,0,c,50,270,450)],d=tt(f),g=h.path(d,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Y(t,m),t.intersect=function(y){return P.polygon(t,f,y)},a}p(Hd,"stadium");async function jd(e,t){return Ea(e,t,{rx:5,ry:5})}p(jd,"state");function Yd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{cssStyles:n}=t,{lineColor:o,stateBorder:s,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=q.svg(l),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??c,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>g),n&&m.selectAll("path").attr("style",n),a&&m.selectAll("path").attr("style",a),Y(t,m),t.intersect=function(y){return P.circle(t,7,y)},l}p(Yd,"stateEnd");function Vd(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const s=q.svg(a).circle(0,0,14,Px(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Y(t,n),t.intersect=function(o){return P.circle(t,7,o)},a}p(Vd,"stateStart");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=((t==null?void 0:t.padding)||0)/2,s=n.width+t.padding,c=n.height+t.padding,l=-n.width/2-o,h=-n.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const f=q.svg(a),d=H(t,{}),g=f.rectangle(l-8,h,s+16,c,d),m=f.line(l,h,l,h+c,d),y=f.line(l+s,h,l+s,h+c,d);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Ft(b)),Y(t,x)}else{const f=Le(a,s,c,u);i&&f.attr("style",i),Y(t,f)}return t.intersect=function(f){return P.polygon(t,u,f)},a}p(Gd,"subroutine");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-o/2,l=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=q.svg(a),g=H(t,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+s},{x:c-h/2,y:l+s}],y=[{x:c+o-h/2,y:l+s},{x:c+o+h/2,y:l+s},{x:c+o+h/2,y:l+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=tt(m),b=d.path(x,g),w=tt(y),_=d.path(w,{...g,fillStyle:"solid"}),k=a.insert(()=>_,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Y(t,k),t.intersect=function(C){return P.polygon(t,m,C)},a}p(Ud,"taggedRect");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=.2*s,u=.2*c,f=c+l,{cssStyles:d}=t,g=q.svg(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},..._e(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,w=[{x:x+s-h,y:(b+c)*1.4},{x:x+s,y:b+c-u},{x:x+s,y:(b+c)*.9},..._e(x+s,(b+c)*1.3,x+s-h,(b+c)*1.5,-c*.03,.5)],_=tt(y),k=g.path(_,m),C=tt(w),v=g.path(C,{...m,fillStyle:"solid"}),E=a.insert(()=>v,":first-child");return E.insert(()=>k,":first-child"),E.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l/2-(n.y-(n.top??0))})`),Y(t,E),t.intersect=function(R){return P.polygon(t,y,R)},a}p(Xd,"taggedWaveEdgedRectangle");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=Math.max(n.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(n.height+t.padding,(t==null?void 0:t.height)||0),c=-o/2,l=-s/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",s),Y(t,h),t.intersect=function(u){return P.rect(t,u)},a}p(Zd,"text");var Tw=p((e,t,r,i,a,n)=>`M${e},${t}
188
+ a${a},${n} 0,0,1 0,${-i}
189
+ l${r},0
190
+ a${a},${n} 0,0,1 0,${i}
191
+ M${r},${-i}
192
+ a${a},${n} 0,0,0 0,${i}
193
+ l${-r},0`,"createCylinderPathD"),Bw=p((e,t,r,i,a,n)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Lw=p((e,t,r,i,a,n)=>[`M${e+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Z(e,t,X(t)),c=t.look==="neo"?s*2:s,l=n.height+c,h=l/2,u=h/(2.5+l/50),f=n.width+u+c,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=q.svg(a),y=Bw(0,0,f,l,u,h),x=Lw(0,0,f,l,u,h),b=m.path(y,H(t,{})),w=m.path(x,H(t,{fill:"none"}));g=a.insert(()=>w,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=Tw(0,0,f,l,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ft(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Y(t,g),t.intersect=function(m){const y=P.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Kd,"tiltedCylinder");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=n.width+t.padding,s=n.height+t.padding,c=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=tt(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&l.attr("style",h)}else l=Le(a,o,s,c);return i&&l.attr("style",i),t.width=o,t.height=s,Y(t,l),t.intersect=function(u){return P.polygon(t,c,u)},a}p(Qd,"trapezoid");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=60,s=20,c=Math.max(o,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=q.svg(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],g=tt(d),m=u.path(g,f),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Y(t,y),t.intersect=function(x){return P.polygon(t,d,x)},a}p(Jd,"trapezoidalPentagon");async function tf(e,t){var b;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=wt((b=st().flowchart)==null?void 0:b.htmlLabels),c=n.width+(t.padding??0),l=c+n.height,h=c+n.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=tt(u),y=d.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,Y(t,x),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${l/2-(n.height+(t.padding??0)/(s?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return F.info("Triangle intersect",t,u,w),P.polygon(t,u,w)},a}p(tf,"triangle");async function ef(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:u}=t,d=70-s,g=d>0?d/2:0,m=q.svg(a),y=H(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},..._e(-s/2-g,h/2,s/2+g,h/2,l,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=tt(x),w=m.path(b,y),_=a.insert(()=>w,":first-child");return _.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l-(n.y-(n.top??0))})`),Y(t,_),t.intersect=function(k){return P.polygon(t,x,k)},a}p(ef,"waveEdgedRectangle");async function rf(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Z(e,t,X(t)),o=100,s=50,c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=q.svg(a),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},..._e(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},..._e(u/2,-g/2,-u/2,-g/2,d,-1)],w=tt(b),_=y.path(w,x),k=a.insert(()=>_,":first-child");return k.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Y(t,k),t.intersect=function(C){return P.polygon(t,b,C)},a}p(rf,"waveRectangle");async function af(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Z(e,t,X(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-s/2,u=-c/2,{cssStyles:f}=t,d=q.svg(a),g=H(t,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+s,y:u+c},{x:h+s,y:u-l}],y=`M${h-l},${u-l} L${h+s},${u-l} L${h+s},${u+c} L${h-l},${u+c} L${h-l},${u-l}
194
+ M${h-l},${u} L${h+s},${u}
195
+ M${h},${u-l} L${h},${u+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)+l/2-(n.x-(n.left??0))}, ${-(n.height/2)+l/2-(n.y-(n.top??0))})`),Y(t,b),t.intersect=function(w){return P.polygon(t,m,w)},a}p(af,"windowPane");async function Ns(e,t){var nt,ht,ut,Dt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:et}=At(),{background:at}=et,yt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${at}`]};await Ns(e,yt)}const i=At();t.useHtmlLabels=i.htmlLabels;let a=((nt=i.er)==null?void 0:nt.diagramPadding)??10,n=((ht=i.er)==null?void 0:ht.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:c}=j(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};ge(t.label,i)+et.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const at=await Ea(e,t,et);if(!wt(i.htmlLabels)){const yt=at.select("text"),gt=(ut=yt.node())==null?void 0:ut.getBBox();yt.attr("transform",`translate(${-gt.width/2}, 0)`)}return at}i.htmlLabels||(a*=1.25,n*=1.25);let l=X(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),u=await Qe(h,t.label??"",i,0,0,["name"],s);u.height+=n;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,w=!0,_=!0;for(const et of r.attributes){const at=await Qe(h,et.type,i,0,f,["attribute-type"],s);m=Math.max(m,at.width+a);const yt=await Qe(h,et.name,i,0,f,["attribute-name"],s);y=Math.max(y,yt.width+a);const gt=await Qe(h,et.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,gt.width+a);const pt=await Qe(h,et.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,pt.width+a);const _t=Math.max(at.height,yt.height,gt.height,pt.height)+n;g.push({yOffset:f,rowHeight:_t}),f+=_t}let k=4;x<=a&&(w=!1,x=0,k--),b<=a&&(_=!1,b=0,k--);const C=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const et=u.width+a*2-(m+y+x+b);m+=et/k,y+=et/k,x>0&&(x+=et/k),b>0&&(b+=et/k)}const v=m+y+x+b,E=q.svg(h),R=H(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let D=0;g.length>0&&(D=g.reduce((et,at)=>et+((at==null?void 0:at.rowHeight)??0),0));const $=Math.max(C.width+a*2,(t==null?void 0:t.width)||0,v),z=Math.max((D??0)+u.height,(t==null?void 0:t.height)||0),O=-$/2,M=-z/2;h.selectAll("g:not(:first-child)").each((et,at,yt)=>{const gt=rt(yt[at]),pt=gt.attr("transform");let _t=0,ye=0;if(pt){const Pa=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(pt);Pa&&(_t=parseFloat(Pa[1]),ye=parseFloat(Pa[2]),gt.attr("class").includes("attribute-name")?_t+=m:gt.attr("class").includes("attribute-keys")?_t+=m+y:gt.attr("class").includes("attribute-comment")&&(_t+=m+y+x))}gt.attr("transform",`translate(${O+a/2+_t}, ${ye+M+u.height+n/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(M+n/2)+")");const B=E.rectangle(O,M,$,z,R),T=h.insert(()=>B,":first-child").attr("style",o.join("")),{themeVariables:A}=At(),{rowEven:L,rowOdd:N,nodeBorder:V}=A;d.push(0);for(const[et,at]of g.entries()){const gt=(et+1)%2===0&&at.yOffset!==0,pt=E.rectangle(O,u.height+M+(at==null?void 0:at.yOffset),$,at==null?void 0:at.rowHeight,{...R,fill:gt?L:N,stroke:V});h.insert(()=>pt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${gt?"even":"odd"}`)}let J=E.line(O,u.height+M,$+O,u.height+M,R);h.insert(()=>J).attr("class","divider"),J=E.line(m+O,u.height+M,m+O,z+M,R),h.insert(()=>J).attr("class","divider"),w&&(J=E.line(m+y+O,u.height+M,m+y+O,z+M,R),h.insert(()=>J).attr("class","divider")),_&&(J=E.line(m+y+x+O,u.height+M,m+y+x+O,z+M,R),h.insert(()=>J).attr("class","divider"));for(const et of d)J=E.line(O,u.height+M+et,$+O,u.height+M+et,R),h.insert(()=>J).attr("class","divider");if(Y(t,T),c&&t.look!=="handDrawn"){const et=c.split(";"),at=(Dt=et==null?void 0:et.filter(yt=>yt.includes("stroke")))==null?void 0:Dt.map(yt=>`${yt}`).join("; ");h.selectAll("path").attr("style",at??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(et){return P.rect(t,et)},h}p(Ns,"erBox");async function Qe(e,t,r,i=0,a=0,n=[],o=""){const s=e.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Zs(t)&&(t=Zs(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=s.node().appendChild(await Te(s,t,{width:ge(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=c.getBBox();if(wt(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=rt(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}p(Qe,"addText");async function nf(e,t,r,i,a=r.class.padding??12){const n=i?0:3,o=e.insert("g").attr("class",X(t)).attr("id",t.domId||t.id);let s=null,c=null,l=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Nr(s,{text:`«${b}»`},0),u=s.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await Nr(c,t,0,["font-weight: bolder"]);const g=c.node().getBBox();f=g.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await Nr(l,b,m,[b.parseClassifier()]);m+=w+n}d=l.node().getBBox().height,d<=0&&(d=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await Nr(h,b,y,[b.parseClassifier()]);y+=w+n}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(nf,"textHelper");async function Nr(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),n=At();let o="useHtmlLabels"in t?t.useHtmlLabels:wt(n.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),dr(s)&&(o=!0);const c=await Te(a,Qn(Ue(s)),{width:ge(s,n)+50,classes:"markdown-node-label",useHtmlLabels:o},n);let l,h=1;if(o){const u=c.children[0],f=rt(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const w=((b=n.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,k=parseInt(w,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&&rt(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(u.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}p(Nr,"addText");async function sf(e,t){var R,D;const r=st(),i=r.class.padding??12,a=i,n=t.useHtmlLabels??wt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:c}=await nf(e,t,r,n,a),{labelStyles:l,nodeStyles:h}=j(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=((R=o.styles)==null?void 0:R.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((D=r.class)!=null&&D.hideEmptyMembersBox),d=q.svg(s),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,w=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),_=s.insert(()=>w,":first-child");_.attr("class","basic label-container");const k=_.node().getBBox();s.selectAll(".text").each(($,z,O)=>{var N;const M=rt(O[z]),B=M.attr("transform");let T=0;if(B){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(B);J&&(T=parseFloat(J[2]))}let A=T+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);n||(A-=4);let L=x;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(L=-((N=M.node())==null?void 0:N.getBBox().width)/2||0,s.selectAll("text").each(function(V,J,nt){window.getComputedStyle(nt[J]).textAnchor==="middle"&&(L=0)})),M.attr("transform",`translate(${L}, ${A})`)});const C=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,v=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,E=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const $=d.line(k.x,C+v+b+i,k.x+k.width,C+v+b+i,g);s.insert(()=>$).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const $=d.line(k.x,C+v+E+b+a*2+i,k.x+k.width,C+v+E+b+i+a*2,g);s.insert(()=>$).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),_.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!n){const $=RegExp(/color\s*:\s*([^;]*)/),z=$.exec(u);if(z){const O=z[0].replace("color","fill");s.selectAll("tspan").attr("style",O)}else if(l){const O=$.exec(l);if(O){const M=O[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}}}return Y(t,_),t.intersect=function($){return P.rect(t,$)},s}p(sf,"classBox");async function of(e,t){var C,v;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const a=t,n=t,o=20,s=20,c="verifyMethod"in t,l=X(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await re(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):u=await re(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await re(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,c){const E=await re(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=E;const R=await re(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=R;const D=await re(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=D,await re(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const E=await re(h,`${n.type?`Type: ${n.type}`:""}`,f,t.labelStyle);f+=E,await re(h,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,f,t.labelStyle)}const g=(((C=h.node())==null?void 0:C.getBBox().width)??200)+o,m=(((v=h.node())==null?void 0:v.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=q.svg(h),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=b.rectangle(y,x,g,m,w),k=h.insert(()=>_,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((E,R,D)=>{const $=rt(D[R]),z=$.attr("transform");let O=0,M=0;if(z){const L=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);L&&(O=parseFloat(L[1]),M=parseFloat(L[2]))}const B=M-m/2;let T=y+o/2;(R===0||R===1)&&(T=O),$.attr("transform",`translate(${T}, ${B+o})`)}),f>u+d+s){const E=b.line(y,x+u+d+s,y+g,x+u+d+s,w);h.insert(()=>E).attr("style",i)}return Y(t,k),t.intersect=function(E){return P.rect(t,E)},h}p(of,"requirementBox");async function re(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=st(),o=n.htmlLabels??!0,s=await Te(a,Qn(Ue(t)),{width:ge(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let c;if(o){const l=s.children[0],h=rt(s);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=s.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=s.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(re,"addText");var Mw=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function lf(e,t,{config:r}){var z,O;const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i||"";const n=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:c,label:l}=await Z(e,t,X(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await Ua(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Ua(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Ua(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,w=(t==null?void 0:t.width)||0,_=Math.max(m.height,x.height)/2,k=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+_,C=-w/2,v=-k/2;l.attr("transform","translate("+(h-w/2)+", "+(-_-c.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-_+c.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*n)+", "+(-_+c.height/2)+")");let E;const{rx:R,ry:D}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const M=q.svg(s),B=H(t,{}),T=R||D?M.path(Be(C,v,w,k,R||0),B):M.rectangle(C,v,w,k,B);E=s.insert(()=>T,":first-child"),E.attr("class","basic label-container").attr("style",$||null)}else{E=s.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",D??5).attr("x",C).attr("y",v).attr("width",w).attr("height",k);const M="priority"in t&&t.priority;if(M){const B=s.append("line"),T=C+2,A=v+Math.floor((R??0)/2),L=v+k-Math.floor((R??0)/2);B.attr("x1",T).attr("y1",A).attr("x2",T).attr("y2",L).attr("stroke-width","4").attr("stroke",Mw(M))}}return Y(t,E),t.height=k,t.intersect=function(M){return P.rect(t,M)},s}p(lf,"kanbanItem");async function cf(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Z(e,t,X(t)),c=n.width+10*o,l=n.height+8*o,h=.15*c,{cssStyles:u}=t,f=n.width+20,d=n.height+20,g=Math.max(c,f),m=Math.max(l,d);s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let y;const x=`M0 0
196
+ a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
197
+ a${h},${h} 1 0,0 ${g*.25},0
198
+ a${h},${h} 1 0,0 ${g*.25},0
199
+ a${h},${h} 1 0,0 ${g*.25},${m*.1}
200
+
201
+ a${h},${h} 1 0,0 ${g*.15},${m*.33}
202
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
203
+ a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
204
+
205
+ a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
206
+ a${h},${h} 1 0,0 ${-1*g*.25},0
207
+ a${h},${h} 1 0,0 ${-1*g*.25},0
208
+ a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
209
+
210
+ a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
211
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
212
+ a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
213
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=q.svg(a),w=H(t,{}),_=b.path(x,w);y=a.insert(()=>_,":first-child"),y.attr("class","basic label-container").attr("style",Ft(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Y(t,y),t.calcIntersect=function(b,w){return P.rect(b,w)},t.intersect=function(b){return F.info("Bang intersect",t,b),P.rect(t,b)},a}p(cf,"bang");async function hf(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Z(e,t,X(t)),c=n.width+2*o,l=n.height+2*o,h=.15*c,u=.25*c,f=.35*c,d=.2*c,{cssStyles:g}=t;let m;const y=`M0 0
214
+ a${h},${h} 0 0,1 ${c*.25},${-1*c*.1}
215
+ a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
216
+ a${u},${u} 1 0,1 ${c*.35},${c*.2}
217
+
218
+ a${h},${h} 1 0,1 ${c*.15},${l*.35}
219
+ a${d},${d} 1 0,1 ${-1*c*.15},${l*.65}
220
+
221
+ a${u},${h} 1 0,1 ${-1*c*.25},${c*.15}
222
+ a${f},${f} 1 0,1 ${-1*c*.5},0
223
+ a${h},${h} 1 0,1 ${-1*c*.25},${-1*c*.15}
224
+
225
+ a${h},${h} 1 0,1 ${-1*c*.1},${-1*l*.35}
226
+ a${d},${d} 1 0,1 ${c*.1},${-1*l*.65}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=q.svg(a),b=H(t,{}),w=x.path(y,b);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Ft(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),m.attr("transform",`translate(${-c/2}, ${-l/2})`),Y(t,m),t.calcIntersect=function(x,b){return P.rect(x,b)},t.intersect=function(x){return F.info("Cloud intersect",t,x),P.rect(t,x)},a}p(hf,"cloud");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Z(e,t,X(t)),c=n.width+8*o,l=n.height+2*o,h=5,u=`
228
+ M${-c/2} ${l/2-h}
229
+ v${-l+2*h}
230
+ q0,-${h} ${h},-${h}
231
+ h${c-2*h}
232
+ q${h},0 ${h},${h}
233
+ v${l-2*h}
234
+ q0,${h} -${h},${h}
235
+ h${-c+2*h}
236
+ q-${h},0 -${h},-${h}
237
+ Z
238
+ `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",l/2).attr("x2",c/2).attr("y2",l/2),s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>s.node()),Y(t,f),t.calcIntersect=function(d,g){return P.rect(d,g)},t.intersect=function(d){return P.rect(t,d)},a}p(uf,"defaultMindmapNode");async function df(e,t){const r={padding:t.padding??0};return Ps(e,t,r)}p(df,"mindmapCircle");var Aw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:qd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Nd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:dd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ps},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:cf},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hf},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Rd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Md},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ld},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qd},{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:Td},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:pd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ad},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Vd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Cd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ld},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:cd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ad},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ef},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:xd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Kd},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:$d},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ud},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:fd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:af},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:gd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jd},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:md},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Wd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Dd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ed},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:id},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:od},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Xd},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ud},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rf},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Id},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Fd}],$w=p(()=>{const t=[...Object.entries({state:jd,choice:nd,note:Od,rectWithTitle:Pd,labelRect:Bd,iconSquare:_d,iconCircle:kd,icon:wd,iconRounded:vd,imageSquare:Sd,anchor:rd,kanbanItem:lf,mindmapCircle:df,defaultMindmapNode:uf,classBox:sf,erBox:Ns,requirementBox:of}),...Aw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ff=$w();function Fw(e){return e in ff}p(Fw,"isValidShape");var Da=new Map;async function pf(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const n=t.shape?ff[t.shape]:void 0;if(!n)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await n(i,t,r)}else a=await n(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Da.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(pf,"insertNode");var PS=p((e,t)=>{Da.set(t.id,e)},"setNodeElem"),NS=p(()=>{Da.clear()},"clear"),zS=p(e=>{const t=Da.get(e.id);F.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Ew=p((e,t,r,i,a,n)=>{t.arrowTypeStart&&jo(e,"start",t.arrowTypeStart,r,i,a,n),t.arrowTypeEnd&&jo(e,"end",t.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),Dw={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},jo=p((e,t,r,i,a,n,o)=>{var u;const s=Dw[r];if(!s){F.warn(`Unknown arrow type: ${r}`);return}const c=s.type,h=`${a}_${n}-${c}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),s.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ua=new Map,Tt=new Map,WS=p(()=>{ua.clear(),Tt.clear()},"clear"),xi=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Ow=p(async(e,t)=>{let r=wt(st().flowchart.htmlLabels);const{labelStyles:i}=j(t);t.labelStyle=i;const a=await Te(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});F.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),o=n.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let s=a.getBBox();if(r){const l=a.children[0],h=rt(a);s=l.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),ua.set(t.id,n),t.width=s.width,t.height=s.height;let c;if(t.startLabelLeft){const l=await Re(t.startLabelLeft,xi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).startLeft=h,zr(c,t.startLabelLeft)}if(t.startLabelRight){const l=await Re(t.startLabelRight,xi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=h.node().appendChild(l),u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).startRight=h,zr(c,t.startLabelRight)}if(t.endLabelLeft){const l=await Re(t.endLabelLeft,xi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(l),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).endLeft=h,zr(c,t.endLabelLeft)}if(t.endLabelRight){const l=await Re(t.endLabelRight,xi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");c=u.node().appendChild(l);const f=l.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(l),Tt.get(t.id)||Tt.set(t.id,{}),Tt.get(t.id).endRight=h,zr(c,t.endLabelRight)}return a},"insertEdgeLabel");function zr(e,t){st().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(zr,"setTerminalWidth");var Rw=p((e,t)=>{F.debug("Moving label abc88 ",e.id,e.label,ua.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=st(),{subGraphTitleTotalMargin:a}=gs(i);if(e.label){const n=ua.get(e.id);let o=e.x,s=e.y;if(r){const c=Zt.calcLabelPosition(r);F.debug("Moving label "+e.label+" from (",o,",",s,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,s=c.y)}n.attr("transform",`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){const n=Tt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const c=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,s=c.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const n=Tt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const c=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,s=c.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const n=Tt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const c=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,s=c.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const n=Tt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const c=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,s=c.y}n.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Iw=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),n=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return a>=o||n>=s},"outsideNode"),Pw=p((e,t,r)=>{F.debug(`intersection calc abc89:
239
+ outsidePoint: ${JSON.stringify(t)}
240
+ insidePoint : ${JSON.stringify(r)}
241
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-n:o+n;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-a:a-c-t.y;s=h*u/l;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+l-u:r.y-l+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),F.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=l*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.y?r.y+u:r.y-u;return F.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),h===0&&(f=t.x),l===0&&(d=t.y),{x:f,y:d}}},"intersection"),Yo=p((e,t)=>{F.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(n=>{if(F.info("abc88 checking point",n,t),!Iw(t,n)&&!a){const o=Pw(t,i,n);F.debug("abc88 inside",n,i,o),F.debug("abc88 intersection",o,t);let s=!1;r.forEach(c=>{s=s||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?F.warn("abc88 no intersect",o,r):r.push(o),a=!0}else F.warn("abc88 outside",n,i),i=n,a||r.push(n)}),F.debug("returning points",r),r},"cutPathAtIntersect");function gf(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],n=e[i],o=e[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(t.push(n),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(gf,"extractCornerPoints");var Vo=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,n=Math.sqrt(i*i+a*a),o=r/n;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Nw=p(function(e){const{cornerPointPositions:t}=gf(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],n=e[i+1],o=e[i],s=Vo(a,o,5),c=Vo(n,o,5),l=c.x-s.x,h=c.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){F.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));const d=5;o.x===s.x?f={x:l<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:l<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else F.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),zw=p((e,t,r)=>{const i=e-t-r,a=2,n=2,o=a+n,s=Math.floor(i/o),c=Array(s).fill(`${a} ${n}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Ww=p(function(e,t,r,i,a,n,o,s=!1){var M;const{handDrawnSeed:c}=st();let l=t.points,h=!1;const u=a;var f=n;const d=[];for(const B in t.cssCompiledStyles)jh(B)||d.push(t.cssCompiledStyles[B]);F.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!s&&(l=l.slice(1,t.points.length-1),l.unshift(u.intersect(l[0])),F.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1])));const g=btoa(JSON.stringify(l));t.toCluster&&(F.info("to cluster abc88",r.get(t.toCluster)),l=Yo(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(F.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Yo(l.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=l.filter(B=>!Number.isNaN(B.y));m=Nw(m);let y=wi;switch(y=Ka,t.curve){case"linear":y=Ka;break;case"basis":y=wi;break;case"cardinal":y=ac;break;case"bumpX":y=gl;break;case"bumpY":y=pl;break;case"catmullRom":y=sc;break;case"monotoneX":y=fl;break;case"monotoneY":y=dl;break;case"natural":y=ul;break;case"step":y=hl;break;case"stepAfter":y=cl;break;case"stepBefore":y=ll;break;default:y=wi}const{x,y:b}=Ix(t),w=wp().x(x).y(b).curve(y);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let k,C=t.curve==="rounded"?mf(yf(m,t),5):w(m);const v=Array.isArray(t.style)?t.style:[t.style];let E=v.find(B=>B==null?void 0:B.startsWith("stroke:")),R=!1;if(t.look==="handDrawn"){const B=q.svg(e);Object.assign([],m);const T=B.path(C,{roughness:.3,seed:c});_+=" transition",k=rt(T).select("path").attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((L,N)=>L+";"+N,""):"");let A=k.attr("d");k.attr("d",A),e.node().appendChild(k.node())}else{const B=d.join(";"),T=v?v.reduce((ht,ut)=>ht+ut+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const L=(B?B+";"+T+";":T)+";"+(v?v.reduce((ht,ut)=>ht+";"+ut,""):"");k=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(A??"")).attr("style",L),E=(M=L.match(/stroke:([^;]+)/))==null?void 0:M[1],R=t.animate===!0||!!t.animation||B.includes("animation");const N=k.node(),V=typeof N.getTotalLength=="function"?N.getTotalLength():0,J=lo[t.arrowTypeStart]||0,nt=lo[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){const ut=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?zw(V,J,nt):`0 ${J} ${V-J-nt} ${nt}`}; stroke-dashoffset: 0;`;k.attr("style",ut+k.attr("style"))}}k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",t.id),k.attr("data-points",g),t.showPoints&&m.forEach(B=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",B.x).attr("cy",B.y)});let D="";(st().flowchart.arrowMarkerAbsolute||st().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),F.info("arrowTypeStart",t.arrowTypeStart),F.info("arrowTypeEnd",t.arrowTypeEnd),Ew(k,t,D,o,i,E);const $=Math.floor(l.length/2),z=l[$];Zt.isLabelCoordinateInPath(z,k.attr("d"))||(h=!0);let O={};return h&&(O.updatedPath=l),O.originalPath=t.points,O},"insertEdge");function mf(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let n=0;n<i;n++){const o=e[n],s=e[n-1],c=e[n+1];if(n===0)r+=`M${o.x},${o.y}`;else if(n===i-1)r+=`L${o.x},${o.y}`;else{const l=o.x-s.x,h=o.y-s.y,u=c.x-o.x,f=c.y-o.y,d=Math.hypot(l,h),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=l/d,y=h/d,x=u/g,b=f/g,w=m*x+y*b,_=Math.max(-1,Math.min(1,w)),k=Math.acos(_);if(k<a||Math.abs(Math.PI-k)<a){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(k/2),d/2,g/2),v=o.x-m*C,E=o.y-y*C,R=o.x+x*C,D=o.y+b*C;r+=`L${v},${E}`,r+=`Q${o.x},${o.y} ${R},${D}`}}return r}p(mf,"generateRoundedPath");function Rn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Rn,"calculateDeltaAndAngle");function yf(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Mt[t.arrowTypeStart]){const a=Mt[t.arrowTypeStart],n=e[0],o=e[1],{angle:s}=Rn(n,o),c=a*Math.cos(s),l=a*Math.sin(s);r[0].x=n.x+c,r[0].y=n.y+l}const i=e.length;if(i>=2&&Mt[t.arrowTypeEnd]){const a=Mt[t.arrowTypeEnd],n=e[i-1],o=e[i-2],{angle:s}=Rn(o,n),c=a*Math.cos(s),l=a*Math.sin(s);r[i-1].x=n.x-c,r[i-1].y=n.y-l}return r}p(yf,"applyMarkerOffsetsToPoints");var qw=p((e,t,r,i)=>{t.forEach(a=>{ak[a](e,r,i)})},"insertMarkers"),Hw=p((e,t,r)=>{F.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),jw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Yw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Vw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Gw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Uw=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Xw=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Zw=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Kw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Qw=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Jw=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),tk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),ek=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),rk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
242
+ L20,10
243
+ M20,10
244
+ L0,20`)},"requirement_arrow"),ik=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ak={extension:Hw,composition:jw,aggregation:Yw,dependency:Vw,lollipop:Gw,point:Uw,circle:Xw,cross:Zw,barb:Kw,only_one:Qw,zero_or_one:Jw,one_or_more:tk,zero_or_more:ek,requirement_arrow:rk,requirement_contains:ik},nk=qw,sk={common:br,getConfig:At,insertCluster:pw,insertEdge:Ww,insertEdgeLabel:Ow,insertMarkers:nk,insertNode:pf,interpolateToCurve:Cs,labelHelper:Z,log:F,positionEdgeLabel:Rw},ei={},xf=p(e=>{for(const t of e)ei[t.name]=t},"registerLayoutLoaders"),ok=p(()=>{xf([{name:"dagre",loader:p(async()=>await lt(()=>import("./dagre-6UL2VRFP-CfCXYus3.js"),__vite__mapDeps([2,3,4,5,6,7,0,1,8,9])),"loader")},{name:"cose-bilkent",loader:p(async()=>await lt(()=>import("./cose-bilkent-S5V4N54A-CzPip3he.js"),__vite__mapDeps([10,11,0,1,8,9])),"loader")}])},"registerDefaultLayoutLoaders");ok();var qS=p(async(e,t)=>{if(!(e.layoutAlgorithm in ei))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=ei[e.layoutAlgorithm];return(await r.loader()).render(e,t,sk,{algorithm:r.algorithm})},"render"),HS=p((e="",{fallback:t="dagre"}={})=>{if(e in ei)return e;if(t in ei)return F.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),bf="comm",Cf="rule",wf="decl",lk="@import",ck="@namespace",hk="@keyframes",uk="@layer",kf=Math.abs,zs=String.fromCharCode;function vf(e){return e.trim()}function $i(e,t,r){return e.replace(t,r)}function dk(e,t,r){return e.indexOf(t,r)}function er(e,t){return e.charCodeAt(t)|0}function yr(e,t,r){return e.slice(t,r)}function ie(e){return e.length}function fk(e){return e.length}function bi(e,t){return t.push(e),e}var Oa=1,xr=1,_f=0,Gt=0,xt=0,_r="";function Ws(e,t,r,i,a,n,o,s){return{value:e,root:t,parent:r,type:i,props:a,children:n,line:Oa,column:xr,length:o,return:"",siblings:s}}function pk(){return xt}function gk(){return xt=Gt>0?er(_r,--Gt):0,xr--,xt===10&&(xr=1,Oa--),xt}function Qt(){return xt=Gt<_f?er(_r,Gt++):0,xr++,xt===10&&(xr=1,Oa++),xt}function Ce(){return er(_r,Gt)}function Fi(){return Gt}function Ra(e,t){return yr(_r,e,t)}function ri(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mk(e){return Oa=xr=1,_f=ie(_r=e),Gt=0,[]}function yk(e){return _r="",e}function Xa(e){return vf(Ra(Gt-1,In(e===91?e+2:e===40?e+1:e)))}function xk(e){for(;(xt=Ce())&&xt<33;)Qt();return ri(e)>2||ri(xt)>3?"":" "}function bk(e,t){for(;--t&&Qt()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Ra(e,Fi()+(t<6&&Ce()==32&&Qt()==32))}function In(e){for(;Qt();)switch(xt){case e:return Gt;case 34:case 39:e!==34&&e!==39&&In(xt);break;case 40:e===41&&In(e);break;case 92:Qt();break}return Gt}function Ck(e,t){for(;Qt()&&e+xt!==57;)if(e+xt===84&&Ce()===47)break;return"/*"+Ra(t,Gt-1)+"*"+zs(e===47?e:Qt())}function wk(e){for(;!ri(Ce());)Qt();return Ra(e,Gt)}function kk(e){return yk(Ei("",null,null,null,[""],e=mk(e),0,[0],e))}function Ei(e,t,r,i,a,n,o,s,c){for(var l=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,w="",_=a,k=n,C=i,v=w;y;)switch(g=b,b=Qt()){case 40:if(g!=108&&er(v,u-1)==58){dk(v+=$i(Xa(b),"&","&\f"),"&\f",kf(l?s[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=Xa(b);break;case 9:case 10:case 13:case 32:v+=xk(g);break;case 92:v+=bk(Fi()-1,7);continue;case 47:switch(Ce()){case 42:case 47:bi(vk(Ck(Qt(),Fi()),t,r,c),c),(ri(g||1)==5||ri(Ce()||1)==5)&&ie(v)&&yr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:s[l++]=ie(v)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(v=$i(v,/\f/g,"")),d>0&&(ie(v)-u||m===0&&g===47)&&bi(d>32?Uo(v+";",i,r,u-1,c):Uo($i(v," ","")+";",i,r,u-2,c),c);break;case 59:v+=";";default:if(bi(C=Go(v,t,r,l,h,a,s,w,_=[],k=[],u,n),n),b===123)if(h===0)Ei(v,t,C,C,_,n,u,s,k);else{switch(f){case 99:if(er(v,3)===110)break;case 108:if(er(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ei(e,C,C,i&&bi(Go(e,C,C,0,0,a,s,w,a,_=[],u,k),k),a,k,u,s,i?_:k):Ei(v,C,C,C,[""],k,0,s,k)}}l=h=d=0,m=x=1,w=v="",u=o;break;case 58:u=1+ie(v),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&gk()==125)continue}switch(v+=zs(b),b*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:s[l++]=(ie(v)-1)*x,x=1;break;case 64:Ce()===45&&(v+=Xa(Qt())),f=Ce(),h=u=ie(w=v+=wk(Fi())),b++;break;case 45:g===45&&ie(v)==2&&(m=0)}}return n}function Go(e,t,r,i,a,n,o,s,c,l,h,u){for(var f=a-1,d=a===0?n:[""],g=fk(d),m=0,y=0,x=0;m<i;++m)for(var b=0,w=yr(e,f+1,f=kf(y=o[m])),_=e;b<g;++b)(_=vf(y>0?d[b]+" "+w:$i(w,/&\f/g,d[b])))&&(c[x++]=_);return Ws(e,t,r,a===0?Cf:s,c,l,h,u)}function vk(e,t,r,i){return Ws(e,t,r,bf,zs(pk()),yr(e,2,-2),0,i)}function Uo(e,t,r,i,a){return Ws(e,t,r,wf,yr(e,0,i),yr(e,i+1,-1),i,a)}function Pn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function _k(e,t,r,i){switch(e.type){case uk:if(e.children.length)break;case lk:case ck:case wf:return e.return=e.return||e.value;case bf:return"";case hk:return e.return=e.value+"{"+Pn(e.children,i)+"}";case Cf:if(!ie(e.value=e.props.join(",")))return""}return ie(r=Pn(e.children,i))?e.return=e.value+"{"+r+"}":""}var Sk=Xh(Object.keys,Object),Tk=Object.prototype,Bk=Tk.hasOwnProperty;function Lk(e){if(!Sa(e))return Sk(e);var t=[];for(var r in Object(e))Bk.call(e,r)&&r!="constructor"&&t.push(r);return t}var Nn=Ge(oe,"DataView"),zn=Ge(oe,"Promise"),Wn=Ge(oe,"Set"),qn=Ge(oe,"WeakMap"),Xo="[object Map]",Mk="[object Object]",Zo="[object Promise]",Ko="[object Set]",Qo="[object WeakMap]",Jo="[object DataView]",Ak=Ve(Nn),$k=Ve(Jr),Fk=Ve(zn),Ek=Ve(Wn),Dk=Ve(qn),Fe=wr;(Nn&&Fe(new Nn(new ArrayBuffer(1)))!=Jo||Jr&&Fe(new Jr)!=Xo||zn&&Fe(zn.resolve())!=Zo||Wn&&Fe(new Wn)!=Ko||qn&&Fe(new qn)!=Qo)&&(Fe=function(e){var t=wr(e),r=t==Mk?e.constructor:void 0,i=r?Ve(r):"";if(i)switch(i){case Ak:return Jo;case $k:return Xo;case Fk:return Zo;case Ek:return Ko;case Dk:return Qo}return t});var Ok="[object Map]",Rk="[object Set]",Ik=Object.prototype,Pk=Ik.hasOwnProperty;function tl(e){if(e==null)return!0;if(Ta(e)&&(ea(e)||typeof e=="string"||typeof e.splice=="function"||xs(e)||bs(e)||ta(e)))return!e.length;var t=Fe(e);if(t==Ok||t==Rk)return!e.size;if(Sa(e))return!Lk(e).length;for(var r in e)if(Pk.call(e,r))return!1;return!0}var Sf="c4",Nk=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),zk=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-BjbN-GGh.js");return{diagram:t}},__vite__mapDeps([12,13,0,1,8,9]));return{id:Sf,diagram:e}},"loader"),Wk={id:Sf,detector:Nk,loader:zk},qk=Wk,Tf="flowchart",Hk=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),jk=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-B-2wjyTQ.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,18,0,1,8,9]));return{id:Tf,diagram:e}},"loader"),Yk={id:Tf,detector:Hk,loader:jk},Vk=Yk,Bf="flowchart-v2",Gk=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Uk=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-B-2wjyTQ.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,18,0,1,8,9]));return{id:Bf,diagram:e}},"loader"),Xk={id:Bf,detector:Gk,loader:Uk},Zk=Xk,Lf="er",Kk=p(e=>/^\s*erDiagram/.test(e),"detector"),Qk=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-Dt-nZEaD.js");return{diagram:t}},__vite__mapDeps([19,16,17,18,0,1,8,9]));return{id:Lf,diagram:e}},"loader"),Jk={id:Lf,detector:Kk,loader:Qk},tv=Jk,Mf="gitGraph",ev=p(e=>/^\s*gitGraph/.test(e),"detector"),rv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-d5GWmgY4.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,0,1,4,6,7,8,9]));return{id:Mf,diagram:e}},"loader"),iv={id:Mf,detector:ev,loader:rv},av=iv,Af="gantt",nv=p(e=>/^\s*gantt/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-CHTvjPq0.js");return{diagram:t}},__vite__mapDeps([24,0,1,25,26,9,27,28,8]));return{id:Af,diagram:e}},"loader"),ov={id:Af,detector:nv,loader:sv},lv=ov,$f="info",cv=p(e=>/^\s*info/.test(e),"detector"),hv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-30Hn0iLj.js");return{diagram:t}},__vite__mapDeps([29,23,0,1,4,6,7,8,9]));return{id:$f,diagram:e}},"loader"),uv={id:$f,detector:cv,loader:hv},Ff="pie",dv=p(e=>/^\s*pie/.test(e),"detector"),fv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-DXjvgcgl.js");return{diagram:t}},__vite__mapDeps([30,21,23,0,1,4,6,7,31,9,32,27,8]));return{id:Ff,diagram:e}},"loader"),pv={id:Ff,detector:dv,loader:fv},Ef="quadrantChart",gv=p(e=>/^\s*quadrantChart/.test(e),"detector"),mv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-CICk2FdS.js");return{diagram:t}},__vite__mapDeps([33,26,9,27,28,0,1,8]));return{id:Ef,diagram:e}},"loader"),yv={id:Ef,detector:gv,loader:mv},xv=yv,Df="xychart",bv=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-CFPJj8WK.js");return{diagram:t}},__vite__mapDeps([34,35,27,32,26,9,28,0,1,8]));return{id:Df,diagram:e}},"loader"),wv={id:Df,detector:bv,loader:Cv},kv=wv,Of="requirement",vv=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-BdtxpQRA.js");return{diagram:t}},__vite__mapDeps([36,16,17,0,1,8,9]));return{id:Of,diagram:e}},"loader"),Sv={id:Of,detector:vv,loader:_v},Tv=Sv,Rf="sequence",Bv=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-DF4fJTM7.js");return{diagram:t}},__vite__mapDeps([37,13,22,0,1,8,9]));return{id:Rf,diagram:e}},"loader"),Mv={id:Rf,detector:Bv,loader:Lv},Av=Mv,If="class",$v=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Fv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-VbShFIzz.js");return{diagram:t}},__vite__mapDeps([38,39,15,16,17,0,1,8,9]));return{id:If,diagram:e}},"loader"),Ev={id:If,detector:$v,loader:Fv},Dv=Ev,Pf="classDiagram",Ov=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Rv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-VbShFIzz.js");return{diagram:t}},__vite__mapDeps([40,39,15,16,17,0,1,8,9]));return{id:Pf,diagram:e}},"loader"),Iv={id:Pf,detector:Ov,loader:Rv},Pv=Iv,Nf="state",Nv=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),zv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-C8H8HujX.js");return{diagram:t}},__vite__mapDeps([41,42,16,17,3,4,5,6,9,0,1,8]));return{id:Nf,diagram:e}},"loader"),Wv={id:Nf,detector:Nv,loader:zv},qv=Wv,zf="stateDiagram",Hv=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),jv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-DwtU033b.js");return{diagram:t}},__vite__mapDeps([43,42,16,17,0,1,8,9]));return{id:zf,diagram:e}},"loader"),Yv={id:zf,detector:Hv,loader:jv},Vv=Yv,Wf="journey",Gv=p(e=>/^\s*journey/.test(e),"detector"),Uv=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-CMOYXQ79.js");return{diagram:t}},__vite__mapDeps([44,13,15,31,9,0,1,8]));return{id:Wf,diagram:e}},"loader"),Xv={id:Wf,detector:Gv,loader:Uv},Zv=Xv,Kv=p((e,t,r)=>{F.debug(`rendering svg for syntax error
245
+ `);const i=M0(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),El(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),qf={draw:Kv},Qv=qf,Jv={db:{},renderer:qf,parser:{parse:p(()=>{},"parse")}},t_=Jv,Hf="flowchart-elk",e_=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),r_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-B-2wjyTQ.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,18,0,1,8,9]));return{id:Hf,diagram:e}},"loader"),i_={id:Hf,detector:e_,loader:r_},a_=i_,jf="timeline",n_=p(e=>/^\s*timeline/.test(e),"detector"),s_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-DUSG5Vfy.js");return{diagram:t}},__vite__mapDeps([45,31,9,0,1,8]));return{id:jf,diagram:e}},"loader"),o_={id:jf,detector:n_,loader:s_},l_=o_,Yf="mindmap",c_=p(e=>/^\s*mindmap/.test(e),"detector"),h_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-BcZHPAlA.js");return{diagram:t}},__vite__mapDeps([46,16,17,0,1,8,9]));return{id:Yf,diagram:e}},"loader"),u_={id:Yf,detector:c_,loader:h_},d_=u_,Vf="kanban",f_=p(e=>/^\s*kanban/.test(e),"detector"),p_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-dt3376cq.js");return{diagram:t}},__vite__mapDeps([47,15,0,1,8,9]));return{id:Vf,diagram:e}},"loader"),g_={id:Vf,detector:f_,loader:p_},m_=g_,Gf="sankey",y_=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),x_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-BVNS9BQJ.js");return{diagram:t}},__vite__mapDeps([48,32,27,0,1,8,9]));return{id:Gf,diagram:e}},"loader"),b_={id:Gf,detector:y_,loader:x_},C_=b_,Uf="packet",w_=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),k_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-C3-4IORM.js");return{diagram:t}},__vite__mapDeps([49,21,23,0,1,4,6,7,8,9]));return{id:Uf,diagram:e}},"loader"),v_={id:Uf,detector:w_,loader:k_},Xf="radar",__=p(e=>/^\s*radar-beta/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-DuakIh40.js");return{diagram:t}},__vite__mapDeps([50,21,23,0,1,4,6,7,8,9]));return{id:Xf,diagram:e}},"loader"),T_={id:Xf,detector:__,loader:S_},Zf="block",B_=p(e=>/^\s*block(-beta)?/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-CTz0dv5u.js");return{diagram:t}},__vite__mapDeps([51,15,7,4,3,18,9,0,1,8]));return{id:Zf,diagram:e}},"loader"),M_={id:Zf,detector:B_,loader:L_},A_=M_,Kf="architecture",$_=p(e=>/^\s*architecture/.test(e),"detector"),F_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-BLMvVsZu.js");return{diagram:t}},__vite__mapDeps([52,21,23,0,1,4,6,7,11,8,9]));return{id:Kf,diagram:e}},"loader"),E_={id:Kf,detector:$_,loader:F_},D_=E_,Qf="treemap",O_=p(e=>/^\s*treemap/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-DyI2eDqp.js");return{diagram:t}},__vite__mapDeps([53,17,21,23,0,1,4,6,7,28,32,27,8,9]));return{id:Qf,diagram:e}},"loader"),I_={id:Qf,detector:O_,loader:R_},el=!1,Ia=p(()=>{el||(el=!0,zi("error",t_,e=>e.toLowerCase().trim()==="error"),zi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Qa(a_,d_,D_),Qa(qk,m_,Pv,Dv,tv,lv,uv,pv,Tv,Av,Zk,Vk,l_,av,Vv,qv,Zv,xv,C_,v_,kv,A_,T_,I_))},"addDiagrams"),P_=p(async()=>{F.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Pe).map(async([r,{detector:i,loader:a}])=>{if(a)try{rn(r)}catch{try{const{diagram:n,id:o}=await a();zi(o,n,i)}catch(n){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Pe[r],n}}}))).filter(r=>r.status==="rejected");if(t.length>0){F.error(`Failed to load ${t.length} external diagrams`);for(const r of t)F.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),N_="graphics-document document";function Jf(e,t){e.attr("role",N_),t!==""&&e.attr("aria-roledescription",t)}p(Jf,"setA11yDiagramInfo");function tp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(tp,"addSVGa11yTitleDescription");var Ie,Hn=(Ie=class{constructor(t,r,i,a,n){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=n}static async fromText(t,r={}){var l,h;const i=At(),a=Vn(t,i);t=I2(t)+`
246
+ `;try{rn(a)}catch{const u=Ep(a);if(!u)throw new wl(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();zi(f,d)}const{db:n,parser:o,renderer:s,init:c}=rn(a);return o.parser&&(o.parser.yy=n),(l=n.clear)==null||l.call(n),c==null||c(i),r.title&&((h=n.setDiagramTitle)==null||h.call(n,r.title)),await o.parse(t),new Ie(a,t,n,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Ie,"Diagram"),Ie),rl=[],z_=p(()=>{rl.forEach(e=>{e()}),rl=[]},"attachFunctions"),W_=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ep(e){const t=e.match(Cl);if(!t)return{text:e,metadata:{}};let r=Rx(t[1],{schema:Ox})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(ep,"extractFrontMatter");var q_=p(e=>e.replace(/\r\n?/g,`
247
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),H_=p(e=>{const{text:t,metadata:r}=ep(e),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:t}},"processFrontmatter"),j_=p(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:_2(e),directive:t}},"processDirectives");function qs(e){const t=q_(e),r=H_(t),i=j_(r.text),a=Ss(r.config,i.directive);return e=W_(i.text),{code:e,title:r.title,config:a}}p(qs,"preprocessDiagram");function rp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(rp,"toBase64");var Y_=5e4,V_="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",G_="sandbox",U_="loose",X_="http://www.w3.org/2000/svg",Z_="http://www.w3.org/1999/xlink",K_="http://www.w3.org/1999/xhtml",Q_="100%",J_="100%",tS="border:0;margin:0;",eS="margin:0",rS="allow-top-navigation-by-user-activation allow-popups",iS='The "iframe" tag is not supported by your browser.',aS=["foreignobject"],nS=["dominant-baseline"];function Hs(e){const t=qs(e);return Pi(),Xp(t.config??{}),t}p(Hs,"processAndSetConfigs");async function ip(e,t){Ia();try{const{code:r,config:i}=Hs(e);return{diagramType:(await np(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(ip,"parse");var il=p((e,t,r=[])=>`
248
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),sS=p((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
249
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
250
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
251
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{tl(c.styles)||s.forEach(l=>{r+=il(c.id,l,c.styles)}),tl(c.textStyles)||(r+=il(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),oS=p((e,t,r,i)=>{const a=sS(e,r),n=gg(t,a,e.themeVariables);return Pn(kk(`${i}{${n}}`),_k)},"createUserStyles"),lS=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ue(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),cS=p((e="",t)=>{var a,n;const r=(n=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&n.height?t.viewBox.baseVal.height+"px":J_,i=rp(`<body style="${eS}">${e}</body>`);return`<iframe style="width:${Q_};height:${r};${tS}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${rS}">
252
+ ${iS}
253
+ </iframe>`},"putIntoIFrame"),al=p((e,t,r,i,a)=>{const n=e.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",t).attr("width","100%").attr("xmlns",X_);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function jn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(jn,"sandboxedIframe");var hS=p((e,t,r,i)=>{var a,n,o;(a=e.getElementById(t))==null||a.remove(),(n=e.getElementById(r))==null||n.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),uS=p(async function(e,t,r){var z,O,M,B,T,A;Ia();const i=Hs(t);t=i.code;const a=At();F.debug(a),t.length>((a==null?void 0:a.maxTextSize)??Y_)&&(t=V_);const n="#"+e,o="i"+e,s="#"+o,c="d"+e,l="#"+c,h=p(()=>{const N=rt(f?s:l).node();N&&"remove"in N&&N.remove()},"removeTempElements");let u=rt("body");const f=a.securityLevel===G_,d=a.securityLevel===U_,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=jn(rt(r),o);u=rt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt(r);al(u,e,c,`font-family: ${g}`,Z_)}else{if(hS(document,e,c,o),f){const L=jn(rt("body"),o);u=rt(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt("body");al(u,e,c)}let m,y;try{m=await Hn.fromText(t,{title:i.title})}catch(L){if(a.suppressErrorRendering)throw h(),L;m=await Hn.fromText("error"),y=L}const x=u.select(l).node(),b=m.type,w=x.firstChild,_=w.firstChild,k=(O=(z=m.renderer).getClasses)==null?void 0:O.call(z,t,m),C=oS(a,b,k,n),v=document.createElement("style");v.innerHTML=C,w.insertBefore(v,_);try{await m.renderer.draw(t,e,Gs.version,m)}catch(L){throw a.suppressErrorRendering?h():Qv.draw(t,e,Gs.version),L}const E=u.select(`${l} svg`),R=(B=(M=m.db).getAccTitle)==null?void 0:B.call(M),D=(A=(T=m.db).getAccDescription)==null?void 0:A.call(T);sp(b,E,R,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",K_);let $=u.select(l).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),$=lS($,f,wt(a.arrowMarkerAbsolute)),f){const L=u.select(l+" svg").node();$=cS($,L)}else d||($=hr.sanitize($,{ADD_TAGS:aS,ADD_ATTR:nS,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(z_(),y)throw y;return h(),{diagramType:b,svg:$,bindFunctions:m.db.bindFunctions}},"render");function ap(e={}){var i;const t=bt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Gp(t),t!=null&&t.theme&&t.theme in de?t.themeVariables=de[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=de.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Vp(t):Tl();Yn(r.logLevel),Ia()}p(ap,"initialize");var np=p((e,t={})=>{const{code:r}=qs(e);return Hn.fromText(r,t)},"getDiagramFromText");function sp(e,t,r,i){Jf(t,e),tp(t,r,i,t.attr("id"))}p(sp,"addA11yInfo");var je=Object.freeze({render:uS,parse:ip,getDiagramFromText:np,initialize:ap,getConfig:At,setConfig:Bl,getSiteConfig:Tl,updateSiteConfig:Up,reset:p(()=>{Pi()},"reset"),globalReset:p(()=>{Pi(ur)},"globalReset"),defaultConfig:ur});Yn(At().logLevel);Pi(At());var dS=p((e,t,r)=>{F.warn(e),_s(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),op=p(async function(e={querySelector:".mermaid"}){try{await fS(e)}catch(t){if(_s(t)&&F.error(t.str),qt.parseError&&qt.parseError(t),!e.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),t}},"run"),fS=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=je.getConfig();F.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(F.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),je.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const n=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const c of Array.from(a)){if(F.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${n.next()}`;o=c.innerHTML,o=Bu(Zt.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(o);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await up(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){dS(u,s,qt.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),lp=p(function(e){je.initialize(e)},"initialize"),pS=p(async function(e,t,r){F.warn("mermaid.init is deprecated. Please use run instead."),e&&lp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await op(i)},"init"),gS=p(async(e,{lazyLoad:t=!0}={})=>{Ia(),Qa(...e),t===!1&&await P_()},"registerExternalDiagrams"),cp=p(function(){if(qt.startOnLoad){const{startOnLoad:e}=je.getConfig();e&&qt.run().catch(t=>F.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",cp,!1);var mS=p(function(e){qt.parseError=e},"setParseErrorHandler"),da=[],Za=!1,hp=p(async()=>{if(!Za){for(Za=!0;da.length>0;){const e=da.shift();if(e)try{await e()}catch(t){F.error("Error executing queue",t)}}Za=!1}},"executeQueue"),yS=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((n,o)=>{je.parse(e,t).then(s=>{n(s),r(s)},s=>{var c;F.error("Error parsing",s),(c=qt.parseError)==null||c.call(qt,s),o(s),i(s)})}),"performCall");da.push(a),hp().catch(i)}),"parse"),up=p((e,t,r)=>new Promise((i,a)=>{const n=p(()=>new Promise((o,s)=>{je.render(e,t,r).then(c=>{o(c),i(c)},c=>{var l;F.error("Error parsing",c),(l=qt.parseError)==null||l.call(qt,c),s(c),a(c)})}),"performCall");da.push(n),hp().catch(a)}),"render"),xS=p(()=>Object.keys(Pe).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),qt={startOnLoad:!0,mermaidAPI:je,parse:yS,render:up,init:pS,run:op,registerExternalDiagrams:gS,registerLayoutLoaders:xf,initialize:lp,parseError:void 0,contentLoaded:cp,setParseErrorHandler:mS,detectType:Vn,registerIconPacks:WC,getRegisteredDiagramsMetadata:xS},Di=qt;/*! Check if previously processed *//*!
254
+ * Wait for document loaded before starting the execution
255
+ */const dp={light:{background:"#ffffff",primaryColor:"#e0e7ff",secondaryColor:"#ddd6fe",tertiaryColor:"#fce7f3",primaryTextColor:"#111827",secondaryTextColor:"#4b5563",primaryBorderColor:"#6366f1",lineColor:"#111827",pie1:"#3b82f6",pie2:"#8b5cf6",pie3:"#ec4899",pie4:"#f59e0b",pie5:"#10b981",pie6:"#06b6d4",pie7:"#6366f1",pie8:"#ef4444",pieStrokeColor:"#ffffff",pieStrokeWidth:"2px",pieTitleTextColor:"#111827",pieLegendTextColor:"#374151"},dark:{background:"#1e293b",primaryColor:"#3b82f6",secondaryColor:"#8b5cf6",tertiaryColor:"#6366f1",primaryTextColor:"#f1f5f9",secondaryTextColor:"#cbd5e1",primaryBorderColor:"#60a5fa",lineColor:"#f1f5f9",pie1:"#60a5fa",pie2:"#a78bfa",pie3:"#f472b6",pie4:"#fbbf24",pie5:"#34d399",pie6:"#22d3ee",pie7:"#818cf8",pie8:"#f87171",pieStrokeColor:"#1e293b",pieStrokeWidth:"2px",pieTitleTextColor:"#f1f5f9",pieLegendTextColor:"#e2e8f0"}};let nl=!1;const bS=()=>{if(!(typeof window>"u"||nl))try{Di.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",themeVariables:dp.light}),nl=!0}catch(e){console.warn("Failed to initialize Mermaid:",e)}},CS=e=>{let t="Failed to render Mermaid diagram";if(e instanceof Error){const r=e.message||"";if(r.includes("Syntax error")){const i=r.match(/line\s+(\d+)/i),a=r.match(/token\s+['"]([^'"]+)['"]/i),n=[];i&&n.push(`Line ${i[1]}`),a&&n.push(`Unexpected token: ${a[1]}`),t=`Syntax error${n.length?` (${n.join(", ")})`:""}`}else r&&(t=r.length>160?`${r.substring(0,157)}...`:r)}else typeof e=="string"&&(t=e);return t},xe=(e,t)=>{if(typeof window>"u"||!e)return;const r=window.getComputedStyle(e).getPropertyValue(t);if(!r)return;const i=r.trim();return i.length?i:void 0},wS=(e,t)=>{const r=dp[e];if(typeof window>"u"||!t)return r;const i={background:xe(t,"--md-bg-primary"),primaryColor:xe(t,"--md-bg-secondary"),secondaryColor:xe(t,"--md-bg-tertiary"),tertiaryColor:xe(t,"--md-bg-primary"),primaryTextColor:xe(t,"--md-text-primary"),secondaryTextColor:xe(t,"--md-text-secondary"),primaryBorderColor:xe(t,"--md-border-color"),lineColor:xe(t,"--md-text-primary")},a=Object.entries(i).filter(([,n])=>typeof n=="string"&&n.length);return a.length?{...r,...Object.fromEntries(a)}:r},sl=e=>{if(!e)return null;const t=e.getAttribute("data-theme");return t==="dark"?"dark":t==="light"?"light":e.classList.contains("dark")?"dark":e.classList.contains("light")?"light":null},kS=({code:e})=>{const t=jt.useRef(null),r=jt.useRef(null),i=jt.useRef(0),[a,n]=jt.useState(null),[o,s]=jt.useState(null),[c,l]=jt.useState(null),[h,u]=jt.useState(!1),[f,d]=jt.useState("light"),g=jt.useRef("light");jt.useEffect(()=>{var R;if(typeof window>"u")return;const x=t.current;if(!x)return;const b=x.closest(".markdown-content")??x,w=(R=window.matchMedia)==null?void 0:R.call(window,"(prefers-color-scheme: dark)"),_=()=>{const D=!!(w!=null&&w.matches);return sl(b)??sl(document.documentElement)??(D?"dark":"light")},k=()=>{const D=_();D!==g.current&&(g.current=D,d(D))};k();const C=new MutationObserver(k);C.observe(b,{attributes:!0,attributeFilter:["class","data-theme"]});let v=null;b!==document.documentElement&&(v=new MutationObserver(k),v.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}));const E=()=>k();return w==null||w.addEventListener("change",E),()=>{C.disconnect(),v==null||v.disconnect(),w==null||w.removeEventListener("change",E)}},[]),jt.useEffect(()=>{if(!e.trim()){s(null),n(null),l(null);return}return(async()=>{var w;const b=++i.current;try{bS();const _=`mermaid-${Math.random().toString(36).substring(2,11)}`;await Di.parse(e);const k=((w=t.current)==null?void 0:w.closest(".markdown-content"))??t.current,C=wS(f,k);Di.initialize({startOnLoad:!1,theme:f==="dark"?"dark":"default",securityLevel:"loose",themeVariables:C,flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",padding:15,nodeSpacing:50,rankSpacing:50},sequence:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:15,actorMargin:50,width:120,height:40,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:35,mirrorActors:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12,wrap:!0,wrapPadding:10},gantt:{useMaxWidth:!0,barHeight:24,barGap:4,topPadding:40,leftPadding:80,gridLineStartPadding:40,fontSize:12,sectionFontSize:13,numberSectionStyles:4},er:{useMaxWidth:!0,fontSize:12,entityPadding:15},pie:{useMaxWidth:!0,textPosition:.75},journey:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:20,leftMargin:100,width:120,height:50,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:30},gitGraph:{useMaxWidth:!0,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0}},class:{useMaxWidth:!0,padding:10},state:{useMaxWidth:!0,padding:8,dividerMargin:10},mindmap:{useMaxWidth:!0,padding:10},timeline:{useMaxWidth:!0,padding:10},quadrantChart:{useMaxWidth:!0},sankey:{useMaxWidth:!0}});const v=await Di.render(_,e);if(i.current!==b)return;s(v.svg),l(()=>v.bindFunctions?v.bindFunctions:null),n(null)}catch(_){if(i.current!==b)return;n(CS(_)),s(null),l(null),u(!1)}})(),()=>{i.current+=1}},[e,f]),jt.useEffect(()=>{if(!(!o||!c||!r.current))try{c(r.current)}catch(x){console.warn("Failed to bind Mermaid interactions:",x)}},[o,c]);const m=()=>kt.jsxs("div",{className:"graph-error",children:[kt.jsxs("div",{className:"graph-error-header",children:[kt.jsx("div",{className:"graph-error-icon",children:"⚠️"}),kt.jsxs("div",{className:"graph-error-content",children:[kt.jsx("div",{className:"graph-error-title",children:"Mermaid Diagram Error"}),kt.jsx("div",{className:"graph-error-message",children:a})]})]}),kt.jsxs("button",{className:"graph-error-toggle",onClick:()=>u(!h),type:"button",children:[h?"Hide":"Show"," Details"]}),h&&kt.jsxs("details",{className:"graph-error-details",open:!0,children:[kt.jsx("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:500},children:"Mermaid Code"}),kt.jsx("pre",{style:{marginTop:"8px",fontSize:"0.8em",opacity:.8,padding:"8px",background:"rgba(0, 0, 0, 0.05)",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},children:kt.jsx("code",{children:e})})]})]}),y=()=>a?m():o?kt.jsx("div",{ref:r,className:"mermaid-svg-container",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",overflow:"auto"},dangerouslySetInnerHTML:{__html:o}}):kt.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"30px 20px",color:"var(--md-text-secondary, #6b7280)",minHeight:"120px"},children:[kt.jsx("svg",{style:{animation:"spin 1s linear infinite",marginBottom:"10px",width:"28px",height:"28px"},viewBox:"0 0 24 24",fill:"none",children:kt.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"32",strokeLinecap:"round"})}),kt.jsx("span",{style:{fontWeight:500,fontSize:"14px"},children:"Rendering diagram..."}),kt.jsx("style",{children:`
256
+ @keyframes spin {
257
+ from { transform: rotate(0deg); }
258
+ to { transform: rotate(360deg); }
259
+ }
260
+ `})]});return kt.jsx("div",{className:"graph-container mermaid-container",ref:t,style:{padding:"16px",minHeight:"100px"},children:y()})},jS=Object.freeze(Object.defineProperty({__proto__:null,MermaidRenderer:kS},Symbol.toStringTag,{value:"Module"}));export{pw as $,qr as A,_p as B,_g as C,Ss as D,Sl as E,At as F,M2 as G,M0 as H,Gs as I,Ox as J,Np as K,HC as L,dr as M,LS as N,Ba as O,ag as P,Gn as Q,Zs as R,L2 as S,ai as T,dg as U,ii as V,W,U as X,Dl as Y,C2 as Z,p as _,xg as a,i1 as a$,pf as a0,zS as a1,Ix as a2,wt as a3,Te as a4,gs as a5,Nu as a6,Ue as a7,uu as a8,Q as a9,nu as aA,ru as aB,G1 as aC,j as aD,jh as aE,g2 as aF,l2 as aG,Xb as aH,ys as aI,H1 as aJ,b2 as aK,li as aL,wr as aM,Qi as aN,t2 as aO,Lk as aP,oi as aQ,ta as aR,U1 as aS,Zh as aT,Qb as aU,Jb as aV,Fe as aW,wo as aX,t1 as aY,xs as aZ,Kb as a_,ae as aa,nk as ab,NS as ac,WS as ad,IS as ae,Y as af,PS as ag,Ww as ah,Rw as ai,Ow as aj,m2 as ak,l1 as al,c2 as am,ms as an,tl as ao,BS as ap,hi as aq,WC as ar,zC as as,vp as at,Ye as au,y2 as av,iu as aw,ka as ax,Ta as ay,ea as az,yg as b,kr as b0,Se as b1,mo as b2,bs as b3,Qh as b4,Wn as b5,x2 as b6,Sa as b7,jS as b8,st as c,rt as d,El as e,bt as f,Cg as g,ge as h,Vt as i,Wx as j,br as k,F as l,fu as m,MS as n,HS as o,wg as p,kg as q,qS as r,bg as s,Rx as t,Zt as u,Fw as v,F2 as w,$S as x,mg as y,AS as z};