mio-previewer 0.2.4 → 0.2.6

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 (126) hide show
  1. package/README.md +21 -0
  2. package/dist/{_basePickBy-Ds916b4A.js → _basePickBy-Cvu7Iu4t.js} +2 -2
  3. package/dist/{_basePickBy-CchxaBwE.cjs → _basePickBy-knwkNz9F.cjs} +1 -1
  4. package/dist/{_baseUniq-whBxDDgs.cjs → _baseUniq-BKEAlJrZ.cjs} +1 -1
  5. package/dist/{_baseUniq-BxZhoo7H.js → _baseUniq-CoKmXiIw.js} +1 -1
  6. package/dist/{arc-RvMqCw5K.cjs → arc-BfjXrLnR.cjs} +1 -1
  7. package/dist/{arc-w_hCIKN-.js → arc-BsRKvhqb.js} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-Hbx8rp1l.cjs → architecture-O4VJ6CD3-DKKcPWid.cjs} +1 -1
  9. package/dist/{architecture-O4VJ6CD3-BtQXTxm0.js → architecture-O4VJ6CD3-DlitxIel.js} +1 -1
  10. package/dist/{architectureDiagram-VXUJARFQ-BNuD9gh0.js → architectureDiagram-VXUJARFQ-8GIkEy9U.js} +3 -3
  11. package/dist/{architectureDiagram-VXUJARFQ-T_lx5B0h.cjs → architectureDiagram-VXUJARFQ-DwTvTWFB.cjs} +1 -1
  12. package/dist/{blockDiagram-VD42YOAC-wo2IS6do.js → blockDiagram-VD42YOAC-DtIfTXmw.js} +5 -5
  13. package/dist/{blockDiagram-VD42YOAC-C6q1K50p.cjs → blockDiagram-VD42YOAC-tZpHwF_P.cjs} +1 -1
  14. package/dist/{c4Diagram-YG6GDRKO-BYVjZbLc.cjs → c4Diagram-YG6GDRKO-Cz3j8MTC.cjs} +1 -1
  15. package/dist/{c4Diagram-YG6GDRKO-BARgaZ6j.js → c4Diagram-YG6GDRKO-DZf99xT5.js} +2 -2
  16. package/dist/channel-Bbqi9ugt.cjs +1 -0
  17. package/dist/{channel-C81-sVNx.js → channel-DZBn438o.js} +1 -1
  18. package/dist/{chunk-4BX2VUAB-CKu8ehi_.js → chunk-4BX2VUAB-Dvc-GoPz.js} +1 -1
  19. package/dist/{chunk-4BX2VUAB-BoUcWquB.cjs → chunk-4BX2VUAB-_eF8ggdb.cjs} +1 -1
  20. package/dist/{chunk-55IACEB6-CqqSwg0o.js → chunk-55IACEB6-6yjykpr1.js} +1 -1
  21. package/dist/{chunk-55IACEB6-CYlo1Pby.cjs → chunk-55IACEB6-DmO5L9Gv.cjs} +1 -1
  22. package/dist/{chunk-B4BG7PRW-BvbLJPGX.cjs → chunk-B4BG7PRW-BYhHW-T1.cjs} +1 -1
  23. package/dist/{chunk-B4BG7PRW-BAxW-xMm.js → chunk-B4BG7PRW-Ct08Bj-m.js} +4 -4
  24. package/dist/{chunk-DI55MBZ5-DfANuNAw.js → chunk-DI55MBZ5-C3g3BX3L.js} +3 -3
  25. package/dist/{chunk-DI55MBZ5-BrdhY3HM.cjs → chunk-DI55MBZ5-CGUTXZFz.cjs} +1 -1
  26. package/dist/{chunk-FMBD7UC4-DI61pMYI.js → chunk-FMBD7UC4-B9snbeN7.js} +1 -1
  27. package/dist/{chunk-FMBD7UC4-Cy53k0uE.cjs → chunk-FMBD7UC4-u8JkSV8g.cjs} +1 -1
  28. package/dist/{chunk-QN33PNHL-DQojHaHz.js → chunk-QN33PNHL-CFMCEb4D.js} +1 -1
  29. package/dist/{chunk-QN33PNHL-CbA0TFT5.cjs → chunk-QN33PNHL-U6fNQFd3.cjs} +1 -1
  30. package/dist/{chunk-QZHKN3VN-BGoIJuaN.cjs → chunk-QZHKN3VN-CL8OjJgP.cjs} +1 -1
  31. package/dist/{chunk-QZHKN3VN-CQp-UwBA.js → chunk-QZHKN3VN-DAAMblgK.js} +1 -1
  32. package/dist/{chunk-TZMSLE5B-BMuysxv2.js → chunk-TZMSLE5B-DEcy899f.js} +1 -1
  33. package/dist/{chunk-TZMSLE5B-nafE0KGh.cjs → chunk-TZMSLE5B-DjIJI2Y-.cjs} +1 -1
  34. package/dist/{classDiagram-2ON5EDUG-BCC_pUko.cjs → classDiagram-2ON5EDUG-BOhHIGzd.cjs} +1 -1
  35. package/dist/{classDiagram-v2-WZHVMYZB-DguGS0Ee.js → classDiagram-2ON5EDUG-CpNYkLpu.js} +2 -2
  36. package/dist/{classDiagram-v2-WZHVMYZB-BCC_pUko.cjs → classDiagram-v2-WZHVMYZB-BOhHIGzd.cjs} +1 -1
  37. package/dist/{classDiagram-2ON5EDUG-DguGS0Ee.js → classDiagram-v2-WZHVMYZB-CpNYkLpu.js} +2 -2
  38. package/dist/{clone-CnPc6rbc.js → clone-0YTYNqyj.js} +1 -1
  39. package/dist/clone-BWf1bMJ2.cjs +1 -0
  40. package/dist/{cose-bilkent-S5V4N54A-1QsVgIrW.js → cose-bilkent-S5V4N54A-CBkmKAir.js} +1 -1
  41. package/dist/{cose-bilkent-S5V4N54A-C7BvuPwg.cjs → cose-bilkent-S5V4N54A-CXsWxbYE.cjs} +1 -1
  42. package/dist/{dagre-6UL2VRFP-BDO_6Xym.cjs → dagre-6UL2VRFP-BMc1dXqz.cjs} +1 -1
  43. package/dist/{dagre-6UL2VRFP-kHTRcvwc.js → dagre-6UL2VRFP-Drl27WRd.js} +6 -6
  44. package/dist/{diagram-PSM6KHXK-BC7MSdmh.cjs → diagram-PSM6KHXK-Czzv2tRq.cjs} +1 -1
  45. package/dist/{diagram-PSM6KHXK-DauewiNq.js → diagram-PSM6KHXK-hk7S3HaO.js} +4 -4
  46. package/dist/{diagram-QEK2KX5R-BGfUPO54.js → diagram-QEK2KX5R-CFisa_mz.js} +3 -3
  47. package/dist/{diagram-QEK2KX5R-DcJVSNI1.cjs → diagram-QEK2KX5R-X7uU2_mf.cjs} +1 -1
  48. package/dist/{diagram-S2PKOQOG-DO-Y8dIg.cjs → diagram-S2PKOQOG-CahM5LoL.cjs} +1 -1
  49. package/dist/{diagram-S2PKOQOG-D3SrMu20.js → diagram-S2PKOQOG-Dj25VCdV.js} +3 -3
  50. package/dist/{erDiagram-Q2GNP2WA-B3zHr6EH.js → erDiagram-Q2GNP2WA-BAJYThgQ.js} +4 -4
  51. package/dist/{erDiagram-Q2GNP2WA-DMI3tmxl.cjs → erDiagram-Q2GNP2WA-BcN7es5w.cjs} +1 -1
  52. package/dist/{flowDiagram-NV44I4VS-5A4_sBNY.cjs → flowDiagram-NV44I4VS-DSH4zSz8.cjs} +1 -1
  53. package/dist/{flowDiagram-NV44I4VS-DV2Tm_SV.js → flowDiagram-NV44I4VS-sDLidiZI.js} +5 -5
  54. package/dist/{ganttDiagram-LVOFAZNH-DNy0-tSg.js → ganttDiagram-LVOFAZNH-BOqH3ODt.js} +2 -2
  55. package/dist/{ganttDiagram-LVOFAZNH-Di_mSpM4.cjs → ganttDiagram-LVOFAZNH-DB-rPLnm.cjs} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-BXmCVlzv.js → gitGraph-ZV4HHKMB-CztmV0rG.js} +1 -1
  57. package/dist/{gitGraph-ZV4HHKMB-ClUpLCLy.cjs → gitGraph-ZV4HHKMB-gB1ESpsj.cjs} +1 -1
  58. package/dist/{gitGraphDiagram-NY62KEGX-D3eFVYzT.js → gitGraphDiagram-NY62KEGX-BAQ8jnrA.js} +4 -4
  59. package/dist/{gitGraphDiagram-NY62KEGX-Zo3VoU22.cjs → gitGraphDiagram-NY62KEGX-BBZujICZ.cjs} +1 -1
  60. package/dist/{graph-m7uOc_-F.cjs → graph-CQASZLoy.cjs} +1 -1
  61. package/dist/{graph-BppjhE7S.js → graph-OxVrrvxE.js} +2 -2
  62. package/dist/{info-63CPKGFF-leGTSLBn.cjs → info-63CPKGFF-BKVcTirE.cjs} +1 -1
  63. package/dist/info-63CPKGFF-DlFBOu7s.js +5 -0
  64. package/dist/{infoDiagram-F6ZHWCRC-CuWLV5GJ.js → infoDiagram-F6ZHWCRC-BoNJWkl-.js} +2 -2
  65. package/dist/{infoDiagram-F6ZHWCRC-Bo0BEUXt.cjs → infoDiagram-F6ZHWCRC-CCl9mvNx.cjs} +1 -1
  66. package/dist/{journeyDiagram-XKPGCS4Q-WqQqmIZQ.js → journeyDiagram-XKPGCS4Q-Jte0d65j.js} +4 -4
  67. package/dist/{journeyDiagram-XKPGCS4Q-DheOFUdb.cjs → journeyDiagram-XKPGCS4Q-Kbhog3Rq.cjs} +1 -1
  68. package/dist/{kanban-definition-3W4ZIXB7-q_cWMP1i.js → kanban-definition-3W4ZIXB7-WRSFo9Dq.js} +2 -2
  69. package/dist/{kanban-definition-3W4ZIXB7-a3IAMecl.cjs → kanban-definition-3W4ZIXB7-j6dPKa6V.cjs} +1 -1
  70. package/dist/{layout-DV16dSUq.cjs → layout-CUCO1yPf.cjs} +1 -1
  71. package/dist/{layout-DhMhVr5t.js → layout-DvLWn8fk.js} +4 -4
  72. package/dist/{linear-C5E6OAPI.cjs → linear-BUfiCrOq.cjs} +1 -1
  73. package/dist/{linear-8gMkkacL.js → linear-BxS2YLGD.js} +1 -1
  74. package/dist/loadCss-BbD6mdv-.cjs +1 -0
  75. package/dist/loadCss-DS0Fuaxe.js +8 -0
  76. package/dist/{mermaid-parser.core-9iy8B9V0.js → mermaid-parser.core-1I1w3Zgm.js} +11 -11
  77. package/dist/{mermaid-parser.core-DXuaRCas.cjs → mermaid-parser.core-4NX9G4IH.cjs} +2 -2
  78. package/dist/{mindmap-definition-VGOIOE7T-CjEd2rXr.cjs → mindmap-definition-VGOIOE7T-C8xxgKhK.cjs} +1 -1
  79. package/dist/{mindmap-definition-VGOIOE7T-B6t4cUlP.js → mindmap-definition-VGOIOE7T-DgzaZCK3.js} +3 -3
  80. package/dist/mio-previewer.cjs.js +2 -2
  81. package/dist/mio-previewer.css +1 -1
  82. package/dist/mio-previewer.es.js +327 -324
  83. package/dist/{packet-HUATNLJX-CYtkz2HS.cjs → packet-HUATNLJX-CfnSJe9e.cjs} +1 -1
  84. package/dist/{packet-HUATNLJX-CecbH2cP.js → packet-HUATNLJX-oxj0w6Sn.js} +1 -1
  85. package/dist/pie-WTHONI2E-ChPJLMIJ.js +5 -0
  86. package/dist/{pie-WTHONI2E-BVzJHGWL.cjs → pie-WTHONI2E-Ke2d-cd5.cjs} +1 -1
  87. package/dist/{pieDiagram-ADFJNKIX-CM-wBUyg.cjs → pieDiagram-ADFJNKIX-BXLT29rs.cjs} +1 -1
  88. package/dist/{pieDiagram-ADFJNKIX-DYzGKzSp.js → pieDiagram-ADFJNKIX-CjKZybqs.js} +4 -4
  89. package/dist/plugins/custom.cjs.js +1 -1
  90. package/dist/plugins/custom.es.js +2 -2
  91. package/dist/plugins/markdown-it.cjs.js +2 -2
  92. package/dist/plugins/markdown-it.es.js +71 -65
  93. package/dist/{quadrantDiagram-AYHSOK5B-Clw2nM_F.cjs → quadrantDiagram-AYHSOK5B-Bofh6KQl.cjs} +1 -1
  94. package/dist/{quadrantDiagram-AYHSOK5B-DkYY9pfA.js → quadrantDiagram-AYHSOK5B-gQcJ1QWD.js} +2 -2
  95. package/dist/{radar-NJJJXTRR-B8I5-yID.cjs → radar-NJJJXTRR-EmqSi7YJ.cjs} +1 -1
  96. package/dist/radar-NJJJXTRR-W7CAyBug.js +5 -0
  97. package/dist/{requirementDiagram-UZGBJVZJ-1-1thDpH.cjs → requirementDiagram-UZGBJVZJ-CiEGzFpl.cjs} +1 -1
  98. package/dist/{requirementDiagram-UZGBJVZJ-D4pp4uE_.js → requirementDiagram-UZGBJVZJ-CpDnEwpX.js} +3 -3
  99. package/dist/{sankeyDiagram-TZEHDZUN-D0u5zYJv.js → sankeyDiagram-TZEHDZUN-BS9xQbTO.js} +1 -1
  100. package/dist/{sankeyDiagram-TZEHDZUN-Bq9aHWZK.cjs → sankeyDiagram-TZEHDZUN-C78i3iVS.cjs} +1 -1
  101. package/dist/{sequenceDiagram-WL72ISMW--pd3fceR.js → sequenceDiagram-WL72ISMW-C7lWiaCu.js} +3 -3
  102. package/dist/{sequenceDiagram-WL72ISMW-BrHzXdLN.cjs → sequenceDiagram-WL72ISMW-gVgKh8qv.cjs} +1 -1
  103. package/dist/{stateDiagram-FKZM4ZOC-DWwZaiBT.cjs → stateDiagram-FKZM4ZOC-DffdRxr_.cjs} +1 -1
  104. package/dist/{stateDiagram-FKZM4ZOC-DfHT3KVT.js → stateDiagram-FKZM4ZOC-U0f1-N-V.js} +4 -4
  105. package/dist/{stateDiagram-v2-4FDKWEC3-1pP7FlNK.cjs → stateDiagram-v2-4FDKWEC3-1xCdWqps.cjs} +1 -1
  106. package/dist/{stateDiagram-v2-4FDKWEC3-C1fPJITj.js → stateDiagram-v2-4FDKWEC3-CZdj0Qdf.js} +2 -2
  107. package/dist/{timeline-definition-IT6M3QCI-BB_6kHnb.js → timeline-definition-IT6M3QCI-BvOTgc1D.js} +2 -2
  108. package/dist/{timeline-definition-IT6M3QCI-B0tadNst.cjs → timeline-definition-IT6M3QCI-jtIb5KKf.cjs} +1 -1
  109. package/dist/{treemap-75Q7IDZK-CgLssXEg.js → treemap-75Q7IDZK-CnpUZ5Rr.js} +1 -1
  110. package/dist/{treemap-75Q7IDZK-D90M2J-n.cjs → treemap-75Q7IDZK-Ct1uQXSD.cjs} +1 -1
  111. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +2 -0
  112. package/dist/types/plugins/custom/mermaidPlugin.d.ts +2 -0
  113. package/dist/types/plugins/markdown-it/index.d.ts +2 -1
  114. package/dist/types/plugins/markdown-it/katexPlugin.d.ts +5 -0
  115. package/dist/types/types.d.ts +8 -0
  116. package/dist/types/utils/loadCss.d.ts +1 -0
  117. package/dist/{viewer-Dx2UknAc.cjs → viewer-D_fHatZf.cjs} +49 -49
  118. package/dist/{viewer-B5_Hr-DQ.js → viewer-dmRgjht5.js} +2361 -2357
  119. package/dist/{xychartDiagram-PRI3JC2R-Dd_ozcYK.cjs → xychartDiagram-PRI3JC2R-CNg-5JJ5.cjs} +1 -1
  120. package/dist/{xychartDiagram-PRI3JC2R-B13oZeiR.js → xychartDiagram-PRI3JC2R-D43m_ZWr.js} +2 -2
  121. package/package.json +1 -1
  122. package/dist/channel-CAzdqsw9.cjs +0 -1
  123. package/dist/clone-CYnFnmYN.cjs +0 -1
  124. package/dist/info-63CPKGFF-DRrY45Pb.js +0 -5
  125. package/dist/pie-WTHONI2E-BzR8py1z.js +0 -5
  126. package/dist/radar-NJJJXTRR-CpMwqsqo.js +0 -5
@@ -1,12 +1,12 @@
1
- "use strict";const I=require("vue");var pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ms={exports:{}},gc;function yy(){return gc||(gc=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
1
+ "use strict";const I=require("vue"),iu=require("./loadCss-BbD6mdv-.cjs");var pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ms={exports:{}},gc;function by(){return gc||(gc=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
2
2
  * Prism: Lightweight, robust, elegant syntax highlighting
3
3
  *
4
4
  * @license MIT <https://opensource.org/licenses/MIT>
5
5
  * @author Lea Verou <https://lea.verou.me>
6
6
  * @namespace
7
7
  * @public
8
- */var r=(function(i){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function y(v){return v instanceof l?new l(v.type,y(v.content),v.alias):Array.isArray(v)?v.map(y):v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++a}),y.__id},clone:function y(v,_){_=_||{};var w,C;switch(s.util.type(v)){case"Object":if(C=s.util.objId(v),_[C])return _[C];w={},_[C]=w;for(var k in v)v.hasOwnProperty(k)&&(w[k]=y(v[k],_));return w;case"Array":return C=s.util.objId(v),_[C]?_[C]:(w=[],_[C]=w,v.forEach(function(F,$){w[$]=y(F,_)}),w);default:return v}},getLanguage:function(y){for(;y;){var v=n.exec(y.className);if(v)return v[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,v){y.className=y.className.replace(RegExp(n,"gi"),""),y.classList.add("language-"+v)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var v=document.getElementsByTagName("script");for(var _ in v)if(v[_].src==y)return v[_]}return null}},isActive:function(y,v,_){for(var w="no-"+v;y;){var C=y.classList;if(C.contains(v))return!0;if(C.contains(w))return!1;y=y.parentElement}return!!_}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,v){var _=s.util.clone(s.languages[y]);for(var w in v)_[w]=v[w];return _},insertBefore:function(y,v,_,w){w=w||s.languages;var C=w[y],k={};for(var F in C)if(C.hasOwnProperty(F)){if(F==v)for(var $ in _)_.hasOwnProperty($)&&(k[$]=_[$]);_.hasOwnProperty(F)||(k[F]=C[F])}var O=w[y];return w[y]=k,s.languages.DFS(s.languages,function(M,P){P===O&&M!=y&&(this[M]=k)}),k},DFS:function y(v,_,w,C){C=C||{};var k=s.util.objId;for(var F in v)if(v.hasOwnProperty(F)){_.call(v,F,v[F],w||F);var $=v[F],O=s.util.type($);O==="Object"&&!C[k($)]?(C[k($)]=!0,y($,_,null,C)):O==="Array"&&!C[k($)]&&(C[k($)]=!0,y($,_,F,C))}}},plugins:{},highlightAll:function(y,v){s.highlightAllUnder(document,y,v)},highlightAllUnder:function(y,v,_){var w={callback:_,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var C=0,k;k=w.elements[C++];)s.highlightElement(k,v===!0,w.callback)},highlightElement:function(y,v,_){var w=s.util.getLanguage(y),C=s.languages[w];s.util.setLanguage(y,w);var k=y.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(k,w);var F=y.textContent,$={element:y,language:w,grammar:C,code:F};function O(P){$.highlightedCode=P,s.hooks.run("before-insert",$),$.element.innerHTML=$.highlightedCode,s.hooks.run("after-highlight",$),s.hooks.run("complete",$),_&&_.call($.element)}if(s.hooks.run("before-sanity-check",$),k=$.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!$.code){s.hooks.run("complete",$),_&&_.call($.element);return}if(s.hooks.run("before-highlight",$),!$.grammar){O(s.util.encode($.code));return}if(v&&i.Worker){var M=new Worker(s.filename);M.onmessage=function(P){O(P.data)},M.postMessage(JSON.stringify({language:$.language,code:$.code,immediateClose:!0}))}else O(s.highlight($.code,$.grammar,$.language))},highlight:function(y,v,_){var w={code:y,grammar:v,language:_};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,v){var _=v.rest;if(_){for(var w in _)v[w]=_[w];delete v.rest}var C=new u;return d(C,C.head,y),h(y,C,v,C.head,0),g(C)},hooks:{all:{},add:function(y,v){var _=s.hooks.all;_[y]=_[y]||[],_[y].push(v)},run:function(y,v){var _=s.hooks.all[y];if(!(!_||!_.length))for(var w=0,C;C=_[w++];)C(v)}},Token:l};i.Prism=s;function l(y,v,_,w){this.type=y,this.content=v,this.alias=_,this.length=(w||"").length|0}l.stringify=function y(v,_){if(typeof v=="string")return v;if(Array.isArray(v)){var w="";return v.forEach(function(O){w+=y(O,_)}),w}var C={type:v.type,content:y(v.content,_),tag:"span",classes:["token",v.type],attributes:{},language:_},k=v.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(C.classes,k):C.classes.push(k)),s.hooks.run("wrap",C);var F="";for(var $ in C.attributes)F+=" "+$+'="'+(C.attributes[$]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+F+">"+C.content+"</"+C.tag+">"};function c(y,v,_,w){y.lastIndex=v;var C=y.exec(_);if(C&&w&&C[1]){var k=C[1].length;C.index+=k,C[0]=C[0].slice(k)}return C}function h(y,v,_,w,C,k){for(var F in _)if(!(!_.hasOwnProperty(F)||!_[F])){var $=_[F];$=Array.isArray($)?$:[$];for(var O=0;O<$.length;++O){if(k&&k.cause==F+","+O)return;var M=$[O],P=M.inside,N=!!M.lookbehind,E=!!M.greedy,T=M.alias;if(E&&!M.pattern.global){var A=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,A+"g")}for(var R=M.pattern||M,B=w.next,z=C;B!==v.tail&&!(k&&z>=k.reach);z+=B.value.length,B=B.next){var W=B.value;if(v.length>y.length)return;if(!(W instanceof l)){var Y=1,j;if(E){if(j=c(R,z,y,N),!j||j.index>=y.length)break;var yt=j.index,V=j.index+j[0].length,lt=z;for(lt+=B.value.length;yt>=lt;)B=B.next,lt+=B.value.length;if(lt-=B.value.length,z=lt,B.value instanceof l)continue;for(var et=B;et!==v.tail&&(lt<V||typeof et.value=="string");et=et.next)Y++,lt+=et.value.length;Y--,W=y.slice(z,lt),j.index-=z}else if(j=c(R,0,W,N),!j)continue;var yt=j.index,ct=j[0],Lt=W.slice(0,yt),Bt=W.slice(yt+ct.length),mt=z+W.length;k&&mt>k.reach&&(k.reach=mt);var Tt=B.prev;Lt&&(Tt=d(v,Tt,Lt),z+=Lt.length),f(v,Tt,Y);var It=new l(F,P?s.tokenize(ct,P):ct,T,ct);if(B=d(v,Tt,It),Bt&&d(v,B,Bt),Y>1){var Wt={cause:F+","+O,reach:mt};h(y,v,_,B.prev,z,Wt),k&&Wt.reach>k.reach&&(k.reach=Wt.reach)}}}}}}function u(){var y={value:null,prev:null,next:null},v={value:null,prev:y,next:null};y.next=v,this.head=y,this.tail=v,this.length=0}function d(y,v,_){var w=v.next,C={value:_,prev:v,next:w};return v.next=C,w.prev=C,y.length++,C}function f(y,v,_){for(var w=v.next,C=0;C<_&&w!==y.tail;C++)w=w.next;v.next=w,w.prev=v,y.length-=C}function g(y){for(var v=[],_=y.head.next;_!==y.tail;)v.push(_.value),_=_.next;return v}if(!i.document)return i.addEventListener&&(s.disableWorkerMessageHandler||i.addEventListener("message",function(y){var v=JSON.parse(y.data),_=v.language,w=v.code,C=v.immediateClose;i.postMessage(s.highlight(w,s.languages[_],_)),C&&i.close()},!1)),s;var m=s.util.currentScript();m&&(s.filename=m.src,m.hasAttribute("data-manual")&&(s.manual=!0));function b(){s.manual||s.highlightAll()}if(!s.manual){var x=document.readyState;x==="loading"||x==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return s})(t);e.exports&&(e.exports=r),typeof pc<"u"&&(pc.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&amp;/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,a){var o={};o["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[a]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:r.languages[a]};var l={};l[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:s},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(i,n){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:r.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(i){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var a=i.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",n=function(m,b){return"✖ Error "+m+" while fetching file: "+b},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",c="loaded",h="failed",u="pre[data-src]:not(["+s+'="'+c+'"]):not(['+s+'="'+l+'"])';function d(m,b,x){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?b(y.responseText):y.status>=400?x(n(y.status,y.statusText)):x(a))},y.send(null)}function f(m){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(b){var x=Number(b[1]),y=b[2],v=b[3];return y?v?[x,Number(v)]:[x,void 0]:[x,x]}}r.hooks.add("before-highlightall",function(m){m.selector+=", "+u}),r.hooks.add("before-sanity-check",function(m){var b=m.element;if(b.matches(u)){m.code="",b.setAttribute(s,l);var x=b.appendChild(document.createElement("CODE"));x.textContent=i;var y=b.getAttribute("data-src"),v=m.language;if(v==="none"){var _=(/\.(\w+)$/.exec(y)||[,"none"])[1];v=o[_]||_}r.util.setLanguage(x,v),r.util.setLanguage(b,v);var w=r.plugins.autoloader;w&&w.loadLanguages(v),d(y,function(C){b.setAttribute(s,c);var k=f(b.getAttribute("data-range"));if(k){var F=C.split(/\r\n?|\n/g),$=k[0],O=k[1]==null?F.length:k[1];$<0&&($+=F.length),$=Math.max(0,Math.min($-1,F.length)),O<0&&(O+=F.length),O=Math.max(0,Math.min(O,F.length)),C=F.slice($,O).join(`
9
- `),b.hasAttribute("data-start")||b.setAttribute("data-start",String($+1))}x.textContent=C,r.highlightElement(x)},function(C){b.setAttribute(s,h),x.textContent=C})}}),r.plugins.fileHighlight={highlight:function(b){for(var x=(b||document).querySelectorAll(u),y=0,v;v=x[y++];)r.highlightElement(v)}};var g=!1;r.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(ms)),ms.exports}var by=yy();const _n=jo(by);var mc={},yc;function xy(){return yc||(yc=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),mc}xy();Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,n=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(l,c){return l=l.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return n}),RegExp(l,c)}n=a(n).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(o).join(""):""},s=function(l){for(var c=[],h=0;h<l.length;h++){var u=l[h],d=!1;if(typeof u!="string"&&(u.type==="tag"&&u.content[0]&&u.content[0].type==="tag"?u.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===o(u.content[0].content[1])&&c.pop():u.content[u.content.length-1].content==="/>"||c.push({tagName:o(u.content[0].content[1]),openedBraces:0}):c.length>0&&u.type==="punctuation"&&u.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&u.type==="punctuation"&&u.content==="}"?c[c.length-1].openedBraces--:d=!0),(d||typeof u=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var f=o(u);h<l.length-1&&(typeof l[h+1]=="string"||l[h+1].type==="plain-text")&&(f+=o(l[h+1]),l.splice(h+1,1)),h>0&&(typeof l[h-1]=="string"||l[h-1].type==="plain-text")&&(f=o(l[h-1])+f,l.splice(h-1,1),h--),l[h]=new e.Token("plain-text",f,null,f)}u.content&&typeof u.content!="string"&&s(u.content)}};e.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||s(l.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;var bc={},xc;function vy(){return xc||(xc=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),bc}vy();(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},i={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:i},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:i},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:i.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:i.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var n=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=i.variable[1].inside,o=0;o<n.length;o++)a[n[o]]=e.languages.bash[n[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};n["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",a)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);var vc={},wc;function wy(){return wc||(wc=1,(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[i,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:i.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:i.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":i,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:i.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:i.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),vc}wy();Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;var _c={},Cc;function _y(){return Cc||(Cc=1,(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism)),_c}_y();Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];var kc={},Sc;function Cy(){return Sc||(Sc=1,(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism)),kc}Cy();(function(e){function t(r,i){return"___"+r.toUpperCase()+i+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,n,a){if(r.language===i){var o=r.tokenStack=[];r.code=r.code.replace(n,function(s){if(typeof a=="function"&&!a(s))return s;for(var l=o.length,c;r.code.indexOf(c=t(i,l))!==-1;)++l;return o[l]=s,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,i){if(r.language!==i||!r.tokenStack)return;r.grammar=e.languages[i];var n=0,a=Object.keys(r.tokenStack);function o(s){for(var l=0;l<s.length&&!(n>=a.length);l++){var c=s[l];if(typeof c=="string"||c.content&&typeof c.content=="string"){var h=a[n],u=r.tokenStack[h],d=typeof c=="string"?c:c.content,f=t(i,h),g=d.indexOf(f);if(g>-1){++n;var m=d.substring(0,g),b=new e.Token(i,e.tokenize(u,r.grammar),"language-"+i,u),x=d.substring(g+f.length),y=[];m&&y.push.apply(y,o([m])),y.push(b),x&&y.push.apply(y,o([x])),typeof c=="string"?s.splice.apply(s,[l,1].concat(y)):c.content=y}}else c.content&&o(c.content)}return s}o(r.tokens)}}})})(Prism);var Tc={},Ac;function ky(){return Ac||(Ac=1,(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:i,operator:n,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(l){if(/<\?/.test(l.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(l,"php",c)}}),e.hooks.add("after-tokenize",function(l){e.languages["markup-templating"].tokenizePlaceholders(l,"php")})})(Prism)),Tc}ky();var Ec={},Lc;function Sy(){return Lc||(Lc=1,(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",i=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+i),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+i+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism)),Ec}Sy();Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",n=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(s,l){l=(l||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return s});return RegExp(c,l)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+n+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(h){return h=h.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,n=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+n+a+"(?:"+n+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+n+a+")(?:"+n+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+n+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+n+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(h){["url","bold","italic","strike","code-snippet"].forEach(function(u){h!==u&&(e.languages.markdown[h].inside.content.inside[u]=e.languages.markdown[u])})}),e.hooks.add("after-tokenize",function(h){if(h.language!=="markdown"&&h.language!=="md")return;function u(d){if(!(!d||typeof d=="string"))for(var f=0,g=d.length;f<g;f++){var m=d[f];if(m.type!=="code"){u(m.content);continue}var b=m.content[1],x=m.content[3];if(b&&x&&b.type==="code-language"&&x.type==="code-block"&&typeof b.content=="string"){var y=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var v="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}u(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var u="",d=0,f=h.classes.length;d<f;d++){var g=h.classes[d],m=/language-(.+)/.exec(g);if(m){u=m[1];break}}var b=e.languages[u];if(b)h.content=e.highlight(c(h.content),b,u);else if(u&&u!=="none"&&e.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);h.attributes.id=x,e.plugins.autoloader.loadLanguages(u,function(){var y=document.getElementById(x);y&&(y.innerHTML=e.highlight(y.textContent,e.languages[u],u))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(h){var u=h.replace(o,"");return u=u.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,f){if(f=f.toLowerCase(),f[0]==="#"){var g;return f[1]==="x"?g=parseInt(f.slice(2),16):g=Number(f.slice(1)),l(g)}else{var m=s[f];return m||d}}),u}e.languages.md=e.languages.markdown})(Prism);const Ty=["data-lang"],Ay={class:"code-block-header"},Ey={class:"lang-label"},Ly={class:"op-btn-group"},By=["disabled","title"],My=["innerHTML"],$y=["srcdoc"],Fy='<svg width="16" height="16" viewBox="0 0 16 16"><path fill="currentColor" d="M4 2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2zm2 0v10h6V2H6zm-1 2V2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-8zm-2 2H2V14a2 2 0 0 0 2 2h6v-2a2 2 0 0 0-2-2H4V4zm0 0v10a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4H4z"/></svg>',Ry='<svg width="17" height="17" viewBox="0 0 20 20"><path fill="currentColor" d="M2 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5zm2 0v10h12V5H4zm3.6 3.55l1.4 1.45l-1.4 1.45L7 11.38l2-2l-2-2zm5.4.83l-1.4-1.45L13 6.62l2 2l-2 2z"/></svg>',Oy='<svg width="17" height="17" viewBox="0 0 20 20"><path fill="currentColor" d="M6.23 4.81a1 1 0 0 1 1.41 0L10 7.17l2.36-2.36a1 1 0 0 1 1.41 1.41L11.41 8.59l2.36 2.36a1 1 0 1 1-1.41 1.41L10 10l-2.36 2.36a1 1 0 0 1-1.41-1.41L8.59 8.59 6.23 6.23a1 1 0 0 1 0-1.41z"/></svg>',Iy='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg>',Dy='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>',Ny='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>',Py=I.defineComponent({__name:"CodeBlock",props:{code:{},language:{},publishUrl:{},onPublished:{type:Function}},setup(e){const t=e,r=I.ref(!1),i=I.ref(!1),n=I.ref(null),a=I.ref("300px"),o=I.ref(!1),s=I.ref(!1),l=I.ref(!1),c=I.ref(""),h=I.ref(!1),u=I.ref("0px"),d=I.ref("0px"),f=I.computed(()=>o.value?"正在发布...":s.value?"已发布成功":"发布 HTML"),g=`iframe-${Math.random().toString(36).substr(2,9)}-${Date.now()}`;function m(){return t.language.toLowerCase()==="html"||t.language.toLowerCase()==="markup"}function b(){const E=t.language||"plaintext";return _n.languages[E]?_n.highlight(t.code,_n.languages[E],E):_n.util.encode(t.code)}const x=I.ref(""),y=()=>{x.value=b()};y(),I.watch(()=>[t.code,t.language],()=>{y()});const v=()=>{i.value=!0},_=()=>{i.value=!1,a.value="300px"},w=(E,T,A=2e3)=>{if(!T){console.warn("showTooltip: button is null");return}c.value=E;const R=T.getBoundingClientRect(),B=R.left+R.width/2,z=R.top;u.value=`${B}px`,d.value=`${z}px`,console.log("Tooltip:",{message:E,left:B,top:z,visible:!0}),h.value=!0,setTimeout(()=>{h.value=!1},A)},C=async E=>{const T=E.currentTarget;try{await navigator.clipboard.writeText(t.code),r.value=!0,w("已复制",T),setTimeout(()=>{r.value=!1},1700)}catch(A){console.error("复制失败:",A),w("复制失败",T)}},k=async E=>{if(!t.publishUrl||o.value)return;const T=E.currentTarget;o.value=!0,s.value=!1,w("正在发布...",T,1e4);try{const R=await(await fetch(t.publishUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:t.code})})).json();R.code===0?(s.value=!0,t.onPublished&&R.url?(t.onPublished(R.url),w("已发布成功",T)):R.url?(await navigator.clipboard.writeText(R.url),w("已发布,URL 已复制",T)):w("已发布成功",T),setTimeout(()=>{s.value=!1},2e3)):(w(`发布失败: ${R.msg||"未知错误"}`,T),console.error("发布失败:",R.msg||"未知错误"))}catch(A){w("发布失败,请检查网络",T),console.error("发布失败:",A)}finally{o.value=!1}},F=()=>{l.value=!0,document.body.style.overflow="hidden"},$=()=>{l.value=!1,document.body.style.overflow=""},O=I.computed(()=>{const E=`
8
+ */var r=(function(i){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function y(v){return v instanceof l?new l(v.type,y(v.content),v.alias):Array.isArray(v)?v.map(y):v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++a}),y.__id},clone:function y(v,_){_=_||{};var w,C;switch(s.util.type(v)){case"Object":if(C=s.util.objId(v),_[C])return _[C];w={},_[C]=w;for(var k in v)v.hasOwnProperty(k)&&(w[k]=y(v[k],_));return w;case"Array":return C=s.util.objId(v),_[C]?_[C]:(w=[],_[C]=w,v.forEach(function(F,M){w[M]=y(F,_)}),w);default:return v}},getLanguage:function(y){for(;y;){var v=n.exec(y.className);if(v)return v[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,v){y.className=y.className.replace(RegExp(n,"gi"),""),y.classList.add("language-"+v)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var v=document.getElementsByTagName("script");for(var _ in v)if(v[_].src==y)return v[_]}return null}},isActive:function(y,v,_){for(var w="no-"+v;y;){var C=y.classList;if(C.contains(v))return!0;if(C.contains(w))return!1;y=y.parentElement}return!!_}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,v){var _=s.util.clone(s.languages[y]);for(var w in v)_[w]=v[w];return _},insertBefore:function(y,v,_,w){w=w||s.languages;var C=w[y],k={};for(var F in C)if(C.hasOwnProperty(F)){if(F==v)for(var M in _)_.hasOwnProperty(M)&&(k[M]=_[M]);_.hasOwnProperty(F)||(k[F]=C[F])}var O=w[y];return w[y]=k,s.languages.DFS(s.languages,function($,P){P===O&&$!=y&&(this[$]=k)}),k},DFS:function y(v,_,w,C){C=C||{};var k=s.util.objId;for(var F in v)if(v.hasOwnProperty(F)){_.call(v,F,v[F],w||F);var M=v[F],O=s.util.type(M);O==="Object"&&!C[k(M)]?(C[k(M)]=!0,y(M,_,null,C)):O==="Array"&&!C[k(M)]&&(C[k(M)]=!0,y(M,_,F,C))}}},plugins:{},highlightAll:function(y,v){s.highlightAllUnder(document,y,v)},highlightAllUnder:function(y,v,_){var w={callback:_,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var C=0,k;k=w.elements[C++];)s.highlightElement(k,v===!0,w.callback)},highlightElement:function(y,v,_){var w=s.util.getLanguage(y),C=s.languages[w];s.util.setLanguage(y,w);var k=y.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(k,w);var F=y.textContent,M={element:y,language:w,grammar:C,code:F};function O(P){M.highlightedCode=P,s.hooks.run("before-insert",M),M.element.innerHTML=M.highlightedCode,s.hooks.run("after-highlight",M),s.hooks.run("complete",M),_&&_.call(M.element)}if(s.hooks.run("before-sanity-check",M),k=M.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!M.code){s.hooks.run("complete",M),_&&_.call(M.element);return}if(s.hooks.run("before-highlight",M),!M.grammar){O(s.util.encode(M.code));return}if(v&&i.Worker){var $=new Worker(s.filename);$.onmessage=function(P){O(P.data)},$.postMessage(JSON.stringify({language:M.language,code:M.code,immediateClose:!0}))}else O(s.highlight(M.code,M.grammar,M.language))},highlight:function(y,v,_){var w={code:y,grammar:v,language:_};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,v){var _=v.rest;if(_){for(var w in _)v[w]=_[w];delete v.rest}var C=new u;return d(C,C.head,y),h(y,C,v,C.head,0),g(C)},hooks:{all:{},add:function(y,v){var _=s.hooks.all;_[y]=_[y]||[],_[y].push(v)},run:function(y,v){var _=s.hooks.all[y];if(!(!_||!_.length))for(var w=0,C;C=_[w++];)C(v)}},Token:l};i.Prism=s;function l(y,v,_,w){this.type=y,this.content=v,this.alias=_,this.length=(w||"").length|0}l.stringify=function y(v,_){if(typeof v=="string")return v;if(Array.isArray(v)){var w="";return v.forEach(function(O){w+=y(O,_)}),w}var C={type:v.type,content:y(v.content,_),tag:"span",classes:["token",v.type],attributes:{},language:_},k=v.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(C.classes,k):C.classes.push(k)),s.hooks.run("wrap",C);var F="";for(var M in C.attributes)F+=" "+M+'="'+(C.attributes[M]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+F+">"+C.content+"</"+C.tag+">"};function c(y,v,_,w){y.lastIndex=v;var C=y.exec(_);if(C&&w&&C[1]){var k=C[1].length;C.index+=k,C[0]=C[0].slice(k)}return C}function h(y,v,_,w,C,k){for(var F in _)if(!(!_.hasOwnProperty(F)||!_[F])){var M=_[F];M=Array.isArray(M)?M:[M];for(var O=0;O<M.length;++O){if(k&&k.cause==F+","+O)return;var $=M[O],P=$.inside,N=!!$.lookbehind,E=!!$.greedy,T=$.alias;if(E&&!$.pattern.global){var A=$.pattern.toString().match(/[imsuy]*$/)[0];$.pattern=RegExp($.pattern.source,A+"g")}for(var R=$.pattern||$,B=w.next,z=C;B!==v.tail&&!(k&&z>=k.reach);z+=B.value.length,B=B.next){var W=B.value;if(v.length>y.length)return;if(!(W instanceof l)){var Y=1,j;if(E){if(j=c(R,z,y,N),!j||j.index>=y.length)break;var yt=j.index,V=j.index+j[0].length,lt=z;for(lt+=B.value.length;yt>=lt;)B=B.next,lt+=B.value.length;if(lt-=B.value.length,z=lt,B.value instanceof l)continue;for(var et=B;et!==v.tail&&(lt<V||typeof et.value=="string");et=et.next)Y++,lt+=et.value.length;Y--,W=y.slice(z,lt),j.index-=z}else if(j=c(R,0,W,N),!j)continue;var yt=j.index,ct=j[0],Lt=W.slice(0,yt),Bt=W.slice(yt+ct.length),mt=z+W.length;k&&mt>k.reach&&(k.reach=mt);var Tt=B.prev;Lt&&(Tt=d(v,Tt,Lt),z+=Lt.length),f(v,Tt,Y);var It=new l(F,P?s.tokenize(ct,P):ct,T,ct);if(B=d(v,Tt,It),Bt&&d(v,B,Bt),Y>1){var Wt={cause:F+","+O,reach:mt};h(y,v,_,B.prev,z,Wt),k&&Wt.reach>k.reach&&(k.reach=Wt.reach)}}}}}}function u(){var y={value:null,prev:null,next:null},v={value:null,prev:y,next:null};y.next=v,this.head=y,this.tail=v,this.length=0}function d(y,v,_){var w=v.next,C={value:_,prev:v,next:w};return v.next=C,w.prev=C,y.length++,C}function f(y,v,_){for(var w=v.next,C=0;C<_&&w!==y.tail;C++)w=w.next;v.next=w,w.prev=v,y.length-=C}function g(y){for(var v=[],_=y.head.next;_!==y.tail;)v.push(_.value),_=_.next;return v}if(!i.document)return i.addEventListener&&(s.disableWorkerMessageHandler||i.addEventListener("message",function(y){var v=JSON.parse(y.data),_=v.language,w=v.code,C=v.immediateClose;i.postMessage(s.highlight(w,s.languages[_],_)),C&&i.close()},!1)),s;var m=s.util.currentScript();m&&(s.filename=m.src,m.hasAttribute("data-manual")&&(s.manual=!0));function b(){s.manual||s.highlightAll()}if(!s.manual){var x=document.readyState;x==="loading"||x==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return s})(t);e.exports&&(e.exports=r),typeof pc<"u"&&(pc.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&amp;/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,a){var o={};o["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[a]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var s={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:r.languages[a]};var l={};l[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:s},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(i,n){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:r.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(i){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var a=i.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",n=function(m,b){return"✖ Error "+m+" while fetching file: "+b},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",c="loaded",h="failed",u="pre[data-src]:not(["+s+'="'+c+'"]):not(['+s+'="'+l+'"])';function d(m,b,x){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?b(y.responseText):y.status>=400?x(n(y.status,y.statusText)):x(a))},y.send(null)}function f(m){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(b){var x=Number(b[1]),y=b[2],v=b[3];return y?v?[x,Number(v)]:[x,void 0]:[x,x]}}r.hooks.add("before-highlightall",function(m){m.selector+=", "+u}),r.hooks.add("before-sanity-check",function(m){var b=m.element;if(b.matches(u)){m.code="",b.setAttribute(s,l);var x=b.appendChild(document.createElement("CODE"));x.textContent=i;var y=b.getAttribute("data-src"),v=m.language;if(v==="none"){var _=(/\.(\w+)$/.exec(y)||[,"none"])[1];v=o[_]||_}r.util.setLanguage(x,v),r.util.setLanguage(b,v);var w=r.plugins.autoloader;w&&w.loadLanguages(v),d(y,function(C){b.setAttribute(s,c);var k=f(b.getAttribute("data-range"));if(k){var F=C.split(/\r\n?|\n/g),M=k[0],O=k[1]==null?F.length:k[1];M<0&&(M+=F.length),M=Math.max(0,Math.min(M-1,F.length)),O<0&&(O+=F.length),O=Math.max(0,Math.min(O,F.length)),C=F.slice(M,O).join(`
9
+ `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(M+1))}x.textContent=C,r.highlightElement(x)},function(C){b.setAttribute(s,h),x.textContent=C})}}),r.plugins.fileHighlight={highlight:function(b){for(var x=(b||document).querySelectorAll(u),y=0,v;v=x[y++];)r.highlightElement(v)}};var g=!1;r.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(ms)),ms.exports}var xy=by();const _n=jo(xy);var mc={},yc;function vy(){return yc||(yc=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),mc}vy();Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(e){var t=e.util.clone(e.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,n=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(l,c){return l=l.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return n}),RegExp(l,c)}n=a(n).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(o).join(""):""},s=function(l){for(var c=[],h=0;h<l.length;h++){var u=l[h],d=!1;if(typeof u!="string"&&(u.type==="tag"&&u.content[0]&&u.content[0].type==="tag"?u.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===o(u.content[0].content[1])&&c.pop():u.content[u.content.length-1].content==="/>"||c.push({tagName:o(u.content[0].content[1]),openedBraces:0}):c.length>0&&u.type==="punctuation"&&u.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&u.type==="punctuation"&&u.content==="}"?c[c.length-1].openedBraces--:d=!0),(d||typeof u=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var f=o(u);h<l.length-1&&(typeof l[h+1]=="string"||l[h+1].type==="plain-text")&&(f+=o(l[h+1]),l.splice(h+1,1)),h>0&&(typeof l[h-1]=="string"||l[h-1].type==="plain-text")&&(f=o(l[h-1])+f,l.splice(h-1,1),h--),l[h]=new e.Token("plain-text",f,null,f)}u.content&&typeof u.content!="string"&&s(u.content)}};e.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||s(l.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var r=e.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;var bc={},xc;function wy(){return xc||(xc=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),bc}wy();(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},i={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:i},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:i},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:i.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:i.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var n=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=i.variable[1].inside,o=0;o<n.length;o++)a[n[o]]=e.languages.bash[n[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};n["language-"+r]={pattern:/[\s\S]+/,inside:Prism.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",a)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);var vc={},wc;function _y(){return wc||(wc=1,(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[i,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:i.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:i.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":i,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:i.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:i.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),vc}_y();Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;var _c={},Cc;function Cy(){return Cc||(Cc=1,(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism)),_c}Cy();Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];var kc={},Sc;function ky(){return Sc||(Sc=1,(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism)),kc}ky();(function(e){function t(r,i){return"___"+r.toUpperCase()+i+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,n,a){if(r.language===i){var o=r.tokenStack=[];r.code=r.code.replace(n,function(s){if(typeof a=="function"&&!a(s))return s;for(var l=o.length,c;r.code.indexOf(c=t(i,l))!==-1;)++l;return o[l]=s,c}),r.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(r,i){if(r.language!==i||!r.tokenStack)return;r.grammar=e.languages[i];var n=0,a=Object.keys(r.tokenStack);function o(s){for(var l=0;l<s.length&&!(n>=a.length);l++){var c=s[l];if(typeof c=="string"||c.content&&typeof c.content=="string"){var h=a[n],u=r.tokenStack[h],d=typeof c=="string"?c:c.content,f=t(i,h),g=d.indexOf(f);if(g>-1){++n;var m=d.substring(0,g),b=new e.Token(i,e.tokenize(u,r.grammar),"language-"+i,u),x=d.substring(g+f.length),y=[];m&&y.push.apply(y,o([m])),y.push(b),x&&y.push.apply(y,o([x])),typeof c=="string"?s.splice.apply(s,[l,1].concat(y)):c.content=y}}else c.content&&o(c.content)}return s}o(r.tokens)}}})})(Prism);var Tc={},Ac;function Sy(){return Ac||(Ac=1,(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:i,operator:n,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(l){if(/<\?/.test(l.code)){var c=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(l,"php",c)}}),e.hooks.add("after-tokenize",function(l){e.languages["markup-templating"].tokenizePlaceholders(l,"php")})})(Prism)),Tc}Sy();var Ec={},Lc;function Ty(){return Lc||(Lc=1,(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",i=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+i),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+i+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism)),Ec}Ty();Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",n=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(s,l){l=(l||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return s});return RegExp(c,l)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+n+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(h){return h=h.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,n=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+n+a+"(?:"+n+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+n+a+")(?:"+n+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+n+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+n+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(h){["url","bold","italic","strike","code-snippet"].forEach(function(u){h!==u&&(e.languages.markdown[h].inside.content.inside[u]=e.languages.markdown[u])})}),e.hooks.add("after-tokenize",function(h){if(h.language!=="markdown"&&h.language!=="md")return;function u(d){if(!(!d||typeof d=="string"))for(var f=0,g=d.length;f<g;f++){var m=d[f];if(m.type!=="code"){u(m.content);continue}var b=m.content[1],x=m.content[3];if(b&&x&&b.type==="code-language"&&x.type==="code-block"&&typeof b.content=="string"){var y=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var v="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}u(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var u="",d=0,f=h.classes.length;d<f;d++){var g=h.classes[d],m=/language-(.+)/.exec(g);if(m){u=m[1];break}}var b=e.languages[u];if(b)h.content=e.highlight(c(h.content),b,u);else if(u&&u!=="none"&&e.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);h.attributes.id=x,e.plugins.autoloader.loadLanguages(u,function(){var y=document.getElementById(x);y&&(y.innerHTML=e.highlight(y.textContent,e.languages[u],u))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(h){var u=h.replace(o,"");return u=u.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,f){if(f=f.toLowerCase(),f[0]==="#"){var g;return f[1]==="x"?g=parseInt(f.slice(2),16):g=Number(f.slice(1)),l(g)}else{var m=s[f];return m||d}}),u}e.languages.md=e.languages.markdown})(Prism);const Ay=["data-lang"],Ey={class:"code-block-header"},Ly={class:"lang-label"},By={class:"op-btn-group"},My=["disabled","title"],$y=["innerHTML"],Fy=["srcdoc"],Ry='<svg width="16" height="16" viewBox="0 0 16 16"><path fill="currentColor" d="M4 2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2zm2 0v10h6V2H6zm-1 2V2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-8zm-2 2H2V14a2 2 0 0 0 2 2h6v-2a2 2 0 0 0-2-2H4V4zm0 0v10a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4H4z"/></svg>',Oy='<svg width="17" height="17" viewBox="0 0 20 20"><path fill="currentColor" d="M2 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5zm2 0v10h12V5H4zm3.6 3.55l1.4 1.45l-1.4 1.45L7 11.38l2-2l-2-2zm5.4.83l-1.4-1.45L13 6.62l2 2l-2 2z"/></svg>',Iy='<svg width="17" height="17" viewBox="0 0 20 20"><path fill="currentColor" d="M6.23 4.81a1 1 0 0 1 1.41 0L10 7.17l2.36-2.36a1 1 0 0 1 1.41 1.41L11.41 8.59l2.36 2.36a1 1 0 1 1-1.41 1.41L10 10l-2.36 2.36a1 1 0 0 1-1.41-1.41L8.59 8.59 6.23 6.23a1 1 0 0 1 0-1.41z"/></svg>',Dy='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg>',Ny='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>',Py='<svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>',zy=I.defineComponent({__name:"CodeBlock",props:{code:{},language:{},publishUrl:{},onPublished:{type:Function}},setup(e){const t=e,r=I.ref(!1),i=I.ref(!1),n=I.ref(null),a=I.ref("300px"),o=I.ref(!1),s=I.ref(!1),l=I.ref(!1),c=I.ref(""),h=I.ref(!1),u=I.ref("0px"),d=I.ref("0px"),f=I.computed(()=>o.value?"正在发布...":s.value?"已发布成功":"发布 HTML"),g=`iframe-${Math.random().toString(36).substr(2,9)}-${Date.now()}`;function m(){return t.language.toLowerCase()==="html"||t.language.toLowerCase()==="markup"}function b(){const E=t.language||"plaintext";return _n.languages[E]?_n.highlight(t.code,_n.languages[E],E):_n.util.encode(t.code)}const x=I.ref(""),y=()=>{x.value=b()};y(),I.watch(()=>[t.code,t.language],()=>{y()});const v=()=>{i.value=!0},_=()=>{i.value=!1,a.value="300px"},w=(E,T,A=2e3)=>{if(!T){console.warn("showTooltip: button is null");return}c.value=E;const R=T.getBoundingClientRect(),B=R.left+R.width/2,z=R.top;u.value=`${B}px`,d.value=`${z}px`,console.log("Tooltip:",{message:E,left:B,top:z,visible:!0}),h.value=!0,setTimeout(()=>{h.value=!1},A)},C=async E=>{const T=E.currentTarget;try{await navigator.clipboard.writeText(t.code),r.value=!0,w("已复制",T),setTimeout(()=>{r.value=!1},1700)}catch(A){console.error("复制失败:",A),w("复制失败",T)}},k=async E=>{if(!t.publishUrl||o.value)return;const T=E.currentTarget;o.value=!0,s.value=!1,w("正在发布...",T,1e4);try{const R=await(await fetch(t.publishUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:t.code})})).json();R.code===0?(s.value=!0,t.onPublished&&R.url?(t.onPublished(R.url),w("已发布成功",T)):R.url?(await navigator.clipboard.writeText(R.url),w("已发布,URL 已复制",T)):w("已发布成功",T),setTimeout(()=>{s.value=!1},2e3)):(w(`发布失败: ${R.msg||"未知错误"}`,T),console.error("发布失败:",R.msg||"未知错误"))}catch(A){w("发布失败,请检查网络",T),console.error("发布失败:",A)}finally{o.value=!1}},F=()=>{l.value=!0,document.body.style.overflow="hidden"},M=()=>{l.value=!1,document.body.style.overflow=""},O=I.computed(()=>{const E=`
10
10
  <script>
11
11
  (function() {
12
12
  const iframeId = '${g}';
@@ -48,9 +48,9 @@
48
48
  setInterval(sendHeight, 1000);
49
49
  })();
50
50
  <\/script>
51
- `;return t.code.toLowerCase().includes("</body>")?t.code.replace("</body>",`${E}</body>`):t.code+E}),M=()=>{},P=E=>{if(E.data&&E.data.type==="iframe-height"&&E.data.iframeId===g){const T=E.data.height,A=Math.max(100,Math.min(1e3,T));a.value=`${A}px`}},N=E=>{E.key==="Escape"&&l.value&&$()};return I.onMounted(()=>{window.addEventListener("message",P),window.addEventListener("keydown",N)}),I.onUnmounted(()=>{window.removeEventListener("message",P),window.removeEventListener("keydown",N),document.body.style.overflow=""}),(E,T)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["code-block-wrapper",{fullscreen:l.value}]),"data-lang":e.language},[(I.openBlock(),I.createBlock(I.Teleport,{to:"body"},[h.value?(I.openBlock(),I.createElementBlock("div",{key:0,class:"code-block-tooltip",style:I.normalizeStyle({left:u.value,top:d.value})},I.toDisplayString(c.value),5)):I.createCommentVNode("",!0)])),I.createElementVNode("div",Ay,[I.createElementVNode("span",Ey,I.toDisplayString(e.language.toUpperCase()),1),I.createElementVNode("div",Ly,[I.createElementVNode("button",{class:"copy-code-button",type:"button",title:"复制代码",onClick:C,innerHTML:Fy}),m()&&!i.value?(I.openBlock(),I.createElementBlock("button",{key:0,class:"preview-html-button",type:"button",title:"预览 HTML",onClick:v,innerHTML:Ry})):I.createCommentVNode("",!0),m()&&e.publishUrl?(I.openBlock(),I.createElementBlock("button",{key:1,class:"publish-html-button",disabled:o.value,type:"button",title:f.value,onClick:k,innerHTML:Iy},null,8,By)):I.createCommentVNode("",!0),l.value?I.createCommentVNode("",!0):(I.openBlock(),I.createElementBlock("button",{key:2,class:"fullscreen-button",type:"button",title:"全屏",onClick:F,innerHTML:Dy})),l.value?(I.openBlock(),I.createElementBlock("button",{key:3,class:"exit-fullscreen-button",type:"button",title:"退出全屏",onClick:$,innerHTML:Ny})):I.createCommentVNode("",!0),i.value?(I.openBlock(),I.createElementBlock("button",{key:4,class:"close-preview-button",type:"button",title:"关闭预览",onClick:_,innerHTML:Oy})):I.createCommentVNode("",!0)])]),I.withDirectives(I.createElementVNode("pre",{class:I.normalizeClass(`language-${e.language}`)},[I.createElementVNode("code",{class:I.normalizeClass(`language-${e.language}`),innerHTML:x.value},null,10,My)],2),[[I.vShow,!i.value]]),i.value?(I.openBlock(),I.createElementBlock("div",{key:0,class:"iframe-wrapper",style:I.normalizeStyle({height:a.value})},[I.createElementVNode("iframe",{ref_key:"previewIframe",ref:n,class:"html-preview-iframe",srcdoc:O.value,sandbox:"allow-scripts allow-forms allow-popups allow-modals allow-same-origin",onLoad:M},null,40,$y)],4)):I.createCommentVNode("",!0)],10,Ty))}}),La=(e,t)=>{const r=e.__vccOpts||e;for(const[i,n]of t)r[i]=n;return r},zy=La(Py,[["__scopeId","data-v-4d2b6871"]]);function qy(e){const{priority:t=70,languageAliases:r={},publishUrl:i,onPublished:n}=e||{};return{name:"codeblock",priority:t,test:a=>a.type!=="tag"||a.name!=="pre"?!1:!!a.children?.some(s=>s.type==="tag"&&s.name==="code"),render:(a,o,s,l)=>{const c=a.children?.find(m=>m.type==="tag"&&m.name==="code");if(!c)return I.h("pre",{},"");const u=(c.attribs?.class||"").match(/language-(\w+)/);let d=u?u[1]:"plaintext";r[d]&&(d=r[d]);const f=m=>m.type==="text"?m.data||"":m.children?m.children.map(f).join(""):"",g=f(c);return I.h(zy,{code:g,language:d,publishUrl:i,onPublished:n})}}}function Hy(e){const{priority:t=10,customEmojis:r={}}=e||{},n={...{":smile:":"😊",":heart:":"❤️",":fire:":"🔥",":rocket:":"🚀",":star:":"⭐",":thumbsup:":"👍",":tada:":"🎉",":check:":"✅",":cross:":"❌",":eyes:":"👀",":thinking:":"🤔",":100:":"💯"},...r};return{name:"emoji",priority:t,test:a=>a.type==="text"&&/:\w+:/g.test(a.data||""),render:(a,o,s,l)=>{let h=a.data||"";return Object.entries(n).forEach(([u,d])=>{h=h.replace(new RegExp(u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),d)}),h}}}var Ns={name:"mermaid",version:"11.12.0",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.11",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",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"}},On={exports:{}},Wy=On.exports,Bc;function jy(){return Bc||(Bc=1,(function(e,t){(function(r,i){e.exports=i()})(Wy,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",b=/^(\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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],A=E%100;return"["+E+(T[(A-20)%10]||T[A]||T[0])+"]"}},v=function(E,T,A){var R=String(E);return!R||R.length>=T?E:""+Array(T+1-R.length).join(A)+E},_={s:v,z:function(E){var T=-E.utcOffset(),A=Math.abs(T),R=Math.floor(A/60),B=A%60;return(T<=0?"+":"-")+v(R,2,"0")+":"+v(B,2,"0")},m:function E(T,A){if(T.date()<A.date())return-E(A,T);var R=12*(A.year()-T.year())+(A.month()-T.month()),B=T.clone().add(R,u),z=A-B<0,W=T.clone().add(R+(z?-1:1),u);return+(-(R+(A-B)/(z?B-W:W-B))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:f,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},w="en",C={};C[w]=y;var k="$isDayjsObject",F=function(E){return E instanceof P||!(!E||!E[k])},$=function E(T,A,R){var B;if(!T)return w;if(typeof T=="string"){var z=T.toLowerCase();C[z]&&(B=z),A&&(C[z]=A,B=z);var W=T.split("-");if(!B&&W.length>1)return E(W[0])}else{var Y=T.name;C[Y]=T,B=Y}return!R&&B&&(w=B),B||!R&&w},O=function(E,T){if(F(E))return E.clone();var A=typeof T=="object"?T:{};return A.date=E,A.args=arguments,new P(A)},M=_;M.l=$,M.i=F,M.w=function(E,T){return O(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var P=(function(){function E(A){this.$L=$(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[k]=!0}var T=E.prototype;return T.parse=function(A){this.$d=(function(R){var B=R.date,z=R.utc;if(B===null)return new Date(NaN);if(M.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var W=B.match(b);if(W){var Y=W[2]-1||0,j=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,j)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,j)}}return new Date(B)})(A),this.init()},T.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},T.$utils=function(){return M},T.isValid=function(){return this.$d.toString()!==m},T.isSame=function(A,R){var B=O(A);return this.startOf(R)<=B&&B<=this.endOf(R)},T.isAfter=function(A,R){return O(A)<this.startOf(R)},T.isBefore=function(A,R){return this.endOf(R)<O(A)},T.$g=function(A,R,B){return M.u(A)?this[R]:this.set(B,A)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(A,R){var B=this,z=!!M.u(R)||R,W=M.p(A),Y=function(Bt,mt){var Tt=M.w(B.$u?Date.UTC(B.$y,mt,Bt):new Date(B.$y,mt,Bt),B);return z?Tt:Tt.endOf(c)},j=function(Bt,mt){return M.w(B.toDate()[Bt].apply(B.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(mt)),B)},V=this.$W,lt=this.$M,et=this.$D,yt="set"+(this.$u?"UTC":"");switch(W){case f:return z?Y(1,0):Y(31,11);case u:return z?Y(1,lt):Y(0,lt+1);case h:var ct=this.$locale().weekStart||0,Lt=(V<ct?V+7:V)-ct;return Y(z?et-Lt:et+(6-Lt),lt);case c:case g:return j(yt+"Hours",0);case l:return j(yt+"Minutes",1);case s:return j(yt+"Seconds",2);case o:return j(yt+"Milliseconds",3);default:return this.clone()}},T.endOf=function(A){return this.startOf(A,!1)},T.$set=function(A,R){var B,z=M.p(A),W="set"+(this.$u?"UTC":""),Y=(B={},B[c]=W+"Date",B[g]=W+"Date",B[u]=W+"Month",B[f]=W+"FullYear",B[l]=W+"Hours",B[s]=W+"Minutes",B[o]=W+"Seconds",B[a]=W+"Milliseconds",B)[z],j=z===c?this.$D+(R-this.$W):R;if(z===u||z===f){var V=this.clone().set(g,1);V.$d[Y](j),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else Y&&this.$d[Y](j);return this.init(),this},T.set=function(A,R){return this.clone().$set(A,R)},T.get=function(A){return this[M.p(A)]()},T.add=function(A,R){var B,z=this;A=Number(A);var W=M.p(R),Y=function(lt){var et=O(z);return M.w(et.date(et.date()+Math.round(lt*A)),z)};if(W===u)return this.set(u,this.$M+A);if(W===f)return this.set(f,this.$y+A);if(W===c)return Y(1);if(W===h)return Y(7);var j=(B={},B[s]=i,B[l]=n,B[o]=r,B)[W]||1,V=this.$d.getTime()+A*j;return M.w(V,this)},T.subtract=function(A,R){return this.add(-1*A,R)},T.format=function(A){var R=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var z=A||"YYYY-MM-DDTHH:mm:ssZ",W=M.z(this),Y=this.$H,j=this.$m,V=this.$M,lt=B.weekdays,et=B.months,yt=B.meridiem,ct=function(mt,Tt,It,Wt){return mt&&(mt[Tt]||mt(R,z))||It[Tt].slice(0,Wt)},Lt=function(mt){return M.s(Y%12||12,mt,"0")},Bt=yt||function(mt,Tt,It){var Wt=mt<12?"AM":"PM";return It?Wt.toLowerCase():Wt};return z.replace(x,(function(mt,Tt){return Tt||(function(It){switch(It){case"YY":return String(R.$y).slice(-2);case"YYYY":return M.s(R.$y,4,"0");case"M":return V+1;case"MM":return M.s(V+1,2,"0");case"MMM":return ct(B.monthsShort,V,et,3);case"MMMM":return ct(et,V);case"D":return R.$D;case"DD":return M.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return ct(B.weekdaysMin,R.$W,lt,2);case"ddd":return ct(B.weekdaysShort,R.$W,lt,3);case"dddd":return lt[R.$W];case"H":return String(Y);case"HH":return M.s(Y,2,"0");case"h":return Lt(1);case"hh":return Lt(2);case"a":return Bt(Y,j,!0);case"A":return Bt(Y,j,!1);case"m":return String(j);case"mm":return M.s(j,2,"0");case"s":return String(R.$s);case"ss":return M.s(R.$s,2,"0");case"SSS":return M.s(R.$ms,3,"0");case"Z":return W}return null})(mt)||W.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(A,R,B){var z,W=this,Y=M.p(R),j=O(A),V=(j.utcOffset()-this.utcOffset())*i,lt=this-j,et=function(){return M.m(W,j)};switch(Y){case f:z=et()/12;break;case u:z=et();break;case d:z=et()/3;break;case h:z=(lt-V)/6048e5;break;case c:z=(lt-V)/864e5;break;case l:z=lt/n;break;case s:z=lt/i;break;case o:z=lt/r;break;default:z=lt}return B?z:M.a(z)},T.daysInMonth=function(){return this.endOf(u).$D},T.$locale=function(){return C[this.$L]},T.locale=function(A,R){if(!A)return this.$L;var B=this.clone(),z=$(A,R,!0);return z&&(B.$L=z),B},T.clone=function(){return M.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E})(),N=P.prototype;return O.prototype=N,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function(E){N[E[1]]=function(T){return this.$g(T,E[0],E[1])}})),O.extend=function(E,T){return E.$i||(E(T,P,O),E.$i=!0),O},O.locale=$,O.isDayjs=F,O.unix=function(E){return O(1e3*E)},O.en=C[w],O.Ls=C,O.p={},O}))})(On)),On.exports}var Uy=jy();const iu=jo(Uy);var nu=Object.defineProperty,p=(e,t)=>nu(e,"name",{value:t,configurable:!0}),au=(e,t)=>{for(var r in t)nu(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Uo=p(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Ee.fatal&&(D.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Ee.error&&(D.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Ee.warn&&(D.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Ee.info&&(D.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Ee.debug&&(D.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Ee.trace&&(D.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=p(e=>`%c${iu().format("ss.SSS")} : ${e} : `,"format");const In={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 n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return In.hue2rgb(a,n,e+1/3)*255;case"g":return In.hue2rgb(a,n,e)*255;case"b":return In.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){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}}},Yy={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},Gy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:In,lang:Yy,unit:Gy},je={};for(let e=0;e<=255;e++)je[e]=ot.unit.dec2hex(e);const Nt={ALL:0,RGB:1,HSL:2};class Vy{constructor(){this.type=Nt.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=Nt.ALL}is(t){return this.type===t}}class Xy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Vy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Nt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Nt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Nt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Nt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Nt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Nt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Nt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ba=new Xy({r:0,g:0,b:0,a:0},"transparent"),Nr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Nr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ba.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${je[Math.round(t)]}${je[Math.round(r)]}${je[Math.round(i)]}${je[Math.round(n*255)]}`:`#${je[Math.round(t)]}${je[Math.round(r)]}${je[Math.round(i)]}`}},lr={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(lr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(lr.re);if(!r)return;const[,i,n,a,o,s]=r;return Ba.set({h:lr._hue2deg(i),s:ot.channel.clamp.s(parseFloat(n)),l:ot.channel.clamp.l(parseFloat(a)),a:o?ot.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},zi={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=zi.colors[e];if(t)return Nr.parse(t)},stringify:e=>{const t=Nr.stringify(e);for(const r in zi.colors)if(zi.colors[r]===t)return r}},Mi={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(Mi.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Ba.set({r:ot.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ot.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},de={format:{keyword:zi,hex:Nr,rgb:Mi,rgba:Mi,hsl:lr,hsla:lr},parse:e=>{if(typeof e!="string")return e;const t=Nr.parse(e)||Mi.parse(e)||lr.parse(e)||zi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Nt.HSL)||e.data.r===void 0?lr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Mi.stringify(e):Nr.stringify(e)},su=(e,t)=>{const r=de.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return de.stringify(r)},Pr=(e,t,r=0,i=1)=>{if(typeof e!="number")return su(e,{a:t});const n=Ba.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return de.stringify(n)},Zy=e=>{const{r:t,g:r,b:i}=de.parse(e),n=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},Ky=e=>Zy(e)>=.5,ai=e=>!Ky(e),ou=(e,t,r)=>{const i=de.parse(e),n=i[t],a=ot.channel.clamp[t](n+r);return n!==a&&(i[t]=a),de.stringify(i)},G=(e,t)=>ou(e,"l",t),rt=(e,t)=>ou(e,"l",-t),L=(e,t)=>{const r=de.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return su(e,i)},Qy=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=de.parse(e),{r:s,g:l,b:c,a:h}=de.parse(t),u=r/100,d=u*2-1,f=o-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,b=1-m,x=i*m+s*b,y=n*m+l*b,v=a*m+c*b,_=o*u+h*(1-u);return Pr(x,y,v,_)},H=(e,t=100)=>{const r=de.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Qy(r,e,t)};/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */const{entries:lu,setPrototypeOf:Mc,isFrozen:Jy,getPrototypeOf:tb,getOwnPropertyDescriptor:eb}=Object;let{freeze:Xt,seal:se,create:cu}=Object,{apply:Ps,construct:zs}=typeof Reflect<"u"&&Reflect;Xt||(Xt=function(t){return t});se||(se=function(t){return t});Ps||(Ps=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});zs||(zs=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Cn=Zt(Array.prototype.forEach),rb=Zt(Array.prototype.lastIndexOf),$c=Zt(Array.prototype.pop),xi=Zt(Array.prototype.push),ib=Zt(Array.prototype.splice),Dn=Zt(String.prototype.toLowerCase),ys=Zt(String.prototype.toString),bs=Zt(String.prototype.match),vi=Zt(String.prototype.replace),nb=Zt(String.prototype.indexOf),ab=Zt(String.prototype.trim),le=Zt(Object.prototype.hasOwnProperty),jt=Zt(RegExp.prototype.test),wi=sb(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Ps(e,t,i)}}function sb(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return zs(e,r)}}function ht(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dn;Mc&&Mc(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Jy(t)||(t[i]=a),n=a)}e[n]=!0}return e}function ob(e){for(let t=0;t<e.length;t++)le(e,t)||(e[t]=null);return e}function Be(e){const t=cu(null);for(const[r,i]of lu(e))le(e,r)&&(Array.isArray(i)?t[r]=ob(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Be(i):t[r]=i);return t}function _i(e,t){for(;e!==null;){const i=eb(e,t);if(i){if(i.get)return Zt(i.get);if(typeof i.value=="function")return Zt(i.value)}e=tb(e)}function r(){return null}return r}const Fc=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xs=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vs=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),lb=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ws=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cb=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rc=Xt(["#text"]),Oc=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_s=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ic=Xt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kn=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hb=se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ub=se(/<%[\w\W]*|[\w\W]*%>/gm),db=se(/\$\{[\w\W]*/gm),fb=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),pb=se(/^aria-[\-\w]+$/),hu=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gb=se(/^(?:\w+script|data):/i),mb=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),uu=se(/^html$/i),yb=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dc=Object.freeze({__proto__:null,ARIA_ATTR:pb,ATTR_WHITESPACE:mb,CUSTOM_ELEMENT:yb,DATA_ATTR:fb,DOCTYPE_NAME:uu,ERB_EXPR:ub,IS_ALLOWED_URI:hu,IS_SCRIPT_OR_DATA:gb,MUSTACHE_EXPR:hb,TMPLIT_EXPR:db});const Ci={element:1,text:3,progressingInstruction:7,comment:8,document:9},bb=function(){return typeof window>"u"?null:window},xb=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Nc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function du(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bb();const t=it=>du(it);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==Ci.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:f}=e,g=l.prototype,m=_i(g,"cloneNode"),b=_i(g,"remove"),x=_i(g,"nextSibling"),y=_i(g,"childNodes"),v=_i(g,"parentNode");if(typeof o=="function"){const it=r.createElement("template");it.content&&it.content.ownerDocument&&(r=it.content.ownerDocument)}let _,w="";const{implementation:C,createNodeIterator:k,createDocumentFragment:F,getElementsByTagName:$}=r,{importNode:O}=i;let M=Nc();t.isSupported=typeof lu=="function"&&typeof v=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:N,TMPLIT_EXPR:E,DATA_ATTR:T,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:z}=Dc;let{IS_ALLOWED_URI:W}=Dc,Y=null;const j=ht({},[...Fc,...xs,...vs,...ws,...Rc]);let V=null;const lt=ht({},[...Oc,..._s,...Ic,...kn]);let et=Object.seal(cu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,ct=null,Lt=!0,Bt=!0,mt=!1,Tt=!0,It=!1,Wt=!0,ke=!1,pi=!1,gi=!1,We=!1,er=!1,rr=!1,mn=!0,yn=!1;const cs="user-content-";let mi=!0,yi=!1,Lr={},Br=null;const Ql=ht({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jl=null;const tc=ht({},["audio","video","img","source","image","track"]);let hs=null;const ec=ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bn="http://www.w3.org/1998/Math/MathML",xn="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let Mr=Se,us=!1,ds=null;const hy=ht({},[bn,xn,Se],ys);let vn=ht({},["mi","mo","mn","ms","mtext"]),wn=ht({},["annotation-xml"]);const uy=ht({},["title","style","font","a","script"]);let bi=null;const dy=["application/xhtml+xml","text/html"],fy="text/html";let Mt=null,$r=null;const py=r.createElement("form"),rc=function(S){return S instanceof RegExp||S instanceof Function},fs=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($r&&$r===S)){if((!S||typeof S!="object")&&(S={}),S=Be(S),bi=dy.indexOf(S.PARSER_MEDIA_TYPE)===-1?fy:S.PARSER_MEDIA_TYPE,Mt=bi==="application/xhtml+xml"?ys:Dn,Y=le(S,"ALLOWED_TAGS")?ht({},S.ALLOWED_TAGS,Mt):j,V=le(S,"ALLOWED_ATTR")?ht({},S.ALLOWED_ATTR,Mt):lt,ds=le(S,"ALLOWED_NAMESPACES")?ht({},S.ALLOWED_NAMESPACES,ys):hy,hs=le(S,"ADD_URI_SAFE_ATTR")?ht(Be(ec),S.ADD_URI_SAFE_ATTR,Mt):ec,Jl=le(S,"ADD_DATA_URI_TAGS")?ht(Be(tc),S.ADD_DATA_URI_TAGS,Mt):tc,Br=le(S,"FORBID_CONTENTS")?ht({},S.FORBID_CONTENTS,Mt):Ql,yt=le(S,"FORBID_TAGS")?ht({},S.FORBID_TAGS,Mt):Be({}),ct=le(S,"FORBID_ATTR")?ht({},S.FORBID_ATTR,Mt):Be({}),Lr=le(S,"USE_PROFILES")?S.USE_PROFILES:!1,Lt=S.ALLOW_ARIA_ATTR!==!1,Bt=S.ALLOW_DATA_ATTR!==!1,mt=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,It=S.SAFE_FOR_TEMPLATES||!1,Wt=S.SAFE_FOR_XML!==!1,ke=S.WHOLE_DOCUMENT||!1,We=S.RETURN_DOM||!1,er=S.RETURN_DOM_FRAGMENT||!1,rr=S.RETURN_TRUSTED_TYPE||!1,gi=S.FORCE_BODY||!1,mn=S.SANITIZE_DOM!==!1,yn=S.SANITIZE_NAMED_PROPS||!1,mi=S.KEEP_CONTENT!==!1,yi=S.IN_PLACE||!1,W=S.ALLOWED_URI_REGEXP||hu,Mr=S.NAMESPACE||Se,vn=S.MATHML_TEXT_INTEGRATION_POINTS||vn,wn=S.HTML_INTEGRATION_POINTS||wn,et=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&rc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&rc(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Bt=!1),er&&(We=!0),Lr&&(Y=ht({},Rc),V=[],Lr.html===!0&&(ht(Y,Fc),ht(V,Oc)),Lr.svg===!0&&(ht(Y,xs),ht(V,_s),ht(V,kn)),Lr.svgFilters===!0&&(ht(Y,vs),ht(V,_s),ht(V,kn)),Lr.mathMl===!0&&(ht(Y,ws),ht(V,Ic),ht(V,kn))),S.ADD_TAGS&&(Y===j&&(Y=Be(Y)),ht(Y,S.ADD_TAGS,Mt)),S.ADD_ATTR&&(V===lt&&(V=Be(V)),ht(V,S.ADD_ATTR,Mt)),S.ADD_URI_SAFE_ATTR&&ht(hs,S.ADD_URI_SAFE_ATTR,Mt),S.FORBID_CONTENTS&&(Br===Ql&&(Br=Be(Br)),ht(Br,S.FORBID_CONTENTS,Mt)),mi&&(Y["#text"]=!0),ke&&ht(Y,["html","head","body"]),Y.table&&(ht(Y,["tbody"]),delete yt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw wi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw wi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=S.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=xb(f,n)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));Xt&&Xt(S),$r=S}},ic=ht({},[...xs,...vs,...lb]),nc=ht({},[...ws,...cb]),gy=function(S){let q=v(S);(!q||!q.tagName)&&(q={namespaceURI:Mr,tagName:"template"});const J=Dn(S.tagName),xt=Dn(q.tagName);return ds[S.namespaceURI]?S.namespaceURI===xn?q.namespaceURI===Se?J==="svg":q.namespaceURI===bn?J==="svg"&&(xt==="annotation-xml"||vn[xt]):!!ic[J]:S.namespaceURI===bn?q.namespaceURI===Se?J==="math":q.namespaceURI===xn?J==="math"&&wn[xt]:!!nc[J]:S.namespaceURI===Se?q.namespaceURI===xn&&!wn[xt]||q.namespaceURI===bn&&!vn[xt]?!1:!nc[J]&&(uy[J]||!ic[J]):!!(bi==="application/xhtml+xml"&&ds[S.namespaceURI]):!1},pe=function(S){xi(t.removed,{element:S});try{v(S).removeChild(S)}catch{b(S)}},ir=function(S,q){try{xi(t.removed,{attribute:q.getAttributeNode(S),from:q})}catch{xi(t.removed,{attribute:null,from:q})}if(q.removeAttribute(S),S==="is")if(We||er)try{pe(q)}catch{}else try{q.setAttribute(S,"")}catch{}},ac=function(S){let q=null,J=null;if(gi)S="<remove></remove>"+S;else{const _t=bs(S,/^[\r\n\t ]+/);J=_t&&_t[0]}bi==="application/xhtml+xml"&&Mr===Se&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const xt=_?_.createHTML(S):S;if(Mr===Se)try{q=new d().parseFromString(xt,bi)}catch{}if(!q||!q.documentElement){q=C.createDocument(Mr,"template",null);try{q.documentElement.innerHTML=us?w:xt}catch{}}const Dt=q.body||q.documentElement;return S&&J&&Dt.insertBefore(r.createTextNode(J),Dt.childNodes[0]||null),Mr===Se?$.call(q,ke?"html":"body")[0]:ke?q.documentElement:Dt},sc=function(S){return k.call(S.ownerDocument||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ps=function(S){return S instanceof u&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof h)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},oc=function(S){return typeof s=="function"&&S instanceof s};function Te(it,S,q){Cn(it,J=>{J.call(t,S,q,$r)})}const lc=function(S){let q=null;if(Te(M.beforeSanitizeElements,S,null),ps(S))return pe(S),!0;const J=Mt(S.nodeName);if(Te(M.uponSanitizeElement,S,{tagName:J,allowedTags:Y}),Wt&&S.hasChildNodes()&&!oc(S.firstElementChild)&&jt(/<[/\w!]/g,S.innerHTML)&&jt(/<[/\w!]/g,S.textContent)||S.nodeType===Ci.progressingInstruction||Wt&&S.nodeType===Ci.comment&&jt(/<[/\w]/g,S.data))return pe(S),!0;if(!Y[J]||yt[J]){if(!yt[J]&&hc(J)&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J)))return!1;if(mi&&!Br[J]){const xt=v(S)||S.parentNode,Dt=y(S)||S.childNodes;if(Dt&&xt){const _t=Dt.length;for(let Kt=_t-1;Kt>=0;--Kt){const Ae=m(Dt[Kt],!0);Ae.__removalCount=(S.__removalCount||0)+1,xt.insertBefore(Ae,x(S))}}}return pe(S),!0}return S instanceof l&&!gy(S)||(J==="noscript"||J==="noembed"||J==="noframes")&&jt(/<\/no(script|embed|frames)/i,S.innerHTML)?(pe(S),!0):(It&&S.nodeType===Ci.text&&(q=S.textContent,Cn([P,N,E],xt=>{q=vi(q,xt," ")}),S.textContent!==q&&(xi(t.removed,{element:S.cloneNode()}),S.textContent=q)),Te(M.afterSanitizeElements,S,null),!1)},cc=function(S,q,J){if(mn&&(q==="id"||q==="name")&&(J in r||J in py))return!1;if(!(Bt&&!ct[q]&&jt(T,q))){if(!(Lt&&jt(A,q))){if(!V[q]||ct[q]){if(!(hc(S)&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,S)||et.tagNameCheck instanceof Function&&et.tagNameCheck(S))&&(et.attributeNameCheck instanceof RegExp&&jt(et.attributeNameCheck,q)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(q,S))||q==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J))))return!1}else if(!hs[q]){if(!jt(W,vi(J,B,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&S!=="script"&&nb(J,"data:")===0&&Jl[S])){if(!(mt&&!jt(R,vi(J,B,"")))){if(J)return!1}}}}}}return!0},hc=function(S){return S!=="annotation-xml"&&bs(S,z)},uc=function(S){Te(M.beforeSanitizeAttributes,S,null);const{attributes:q}=S;if(!q||ps(S))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let xt=q.length;for(;xt--;){const Dt=q[xt],{name:_t,namespaceURI:Kt,value:Ae}=Dt,Fr=Mt(_t),gs=Ae;let $t=_t==="value"?gs:ab(gs);if(J.attrName=Fr,J.attrValue=$t,J.keepAttr=!0,J.forceKeepAttr=void 0,Te(M.uponSanitizeAttribute,S,J),$t=J.attrValue,yn&&(Fr==="id"||Fr==="name")&&(ir(_t,S),$t=cs+$t),Wt&&jt(/((--!?|])>)|<\/(style|title|textarea)/i,$t)){ir(_t,S);continue}if(Fr==="attributename"&&bs($t,"href")){ir(_t,S);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){ir(_t,S);continue}if(!Tt&&jt(/\/>/i,$t)){ir(_t,S);continue}It&&Cn([P,N,E],fc=>{$t=vi($t,fc," ")});const dc=Mt(S.nodeName);if(!cc(dc,Fr,$t)){ir(_t,S);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kt)switch(f.getAttributeType(dc,Fr)){case"TrustedHTML":{$t=_.createHTML($t);break}case"TrustedScriptURL":{$t=_.createScriptURL($t);break}}if($t!==gs)try{Kt?S.setAttributeNS(Kt,_t,$t):S.setAttribute(_t,$t),ps(S)?pe(S):$c(t.removed)}catch{ir(_t,S)}}Te(M.afterSanitizeAttributes,S,null)},my=function it(S){let q=null;const J=sc(S);for(Te(M.beforeSanitizeShadowDOM,S,null);q=J.nextNode();)Te(M.uponSanitizeShadowNode,q,null),lc(q),uc(q),q.content instanceof a&&it(q.content);Te(M.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(it){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,J=null,xt=null,Dt=null;if(us=!it,us&&(it="<!-->"),typeof it!="string"&&!oc(it))if(typeof it.toString=="function"){if(it=it.toString(),typeof it!="string")throw wi("dirty is not a string, aborting")}else throw wi("toString is not a function");if(!t.isSupported)return it;if(pi||fs(S),t.removed=[],typeof it=="string"&&(yi=!1),yi){if(it.nodeName){const Ae=Mt(it.nodeName);if(!Y[Ae]||yt[Ae])throw wi("root node is forbidden and cannot be sanitized in-place")}}else if(it instanceof s)q=ac("<!---->"),J=q.ownerDocument.importNode(it,!0),J.nodeType===Ci.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?q=J:q.appendChild(J);else{if(!We&&!It&&!ke&&it.indexOf("<")===-1)return _&&rr?_.createHTML(it):it;if(q=ac(it),!q)return We?null:rr?w:""}q&&gi&&pe(q.firstChild);const _t=sc(yi?it:q);for(;xt=_t.nextNode();)lc(xt),uc(xt),xt.content instanceof a&&my(xt.content);if(yi)return it;if(We){if(er)for(Dt=F.call(q.ownerDocument);q.firstChild;)Dt.appendChild(q.firstChild);else Dt=q;return(V.shadowroot||V.shadowrootmode)&&(Dt=O.call(i,Dt,!0)),Dt}let Kt=ke?q.outerHTML:q.innerHTML;return ke&&Y["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&jt(uu,q.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
52
- `+Kt),It&&Cn([P,N,E],Ae=>{Kt=vi(Kt,Ae," ")}),_&&rr?_.createHTML(Kt):Kt},t.setConfig=function(){let it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fs(it),pi=!0},t.clearConfig=function(){$r=null,pi=!1},t.isValidAttribute=function(it,S,q){$r||fs({});const J=Mt(it),xt=Mt(S);return cc(J,xt,q)},t.addHook=function(it,S){typeof S=="function"&&xi(M[it],S)},t.removeHook=function(it,S){if(S!==void 0){const q=rb(M[it],S);return q===-1?void 0:ib(M[it],q,1)[0]}return $c(M[it])},t.removeHooks=function(it){M[it]=[]},t.removeAllHooks=function(){M=Nc()},t}var Zr=du(),fu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,qi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vb=/\s*%%.*\n/gm,Hr,pu=(Hr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Hr,"UnknownDiagramError"),Hr),gr={},Yo=p(function(e,t){e=e.replace(fu,"").replace(qi,"").replace(vb,`
53
- `);for(const[r,{detector:i}]of Object.entries(gr))if(i(e,t))return r;throw new pu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),qs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)gu(t,r,i)},"registerLazyLoadedDiagrams"),gu=p((e,t,r)=>{gr[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),gr[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),wb=p(e=>gr[e].loader,"getDiagramLoader"),Hs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Hs(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Hs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),kt=Hs,Ma="#ffffff",$a="#f2f2f2",Ut=p((e,t)=>t?L(e,{s:-40,l:10}):L(e,{s:-40,l:-10}),"mkBorder"),Wr,_b=(Wr=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||H(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||H(this.tertiaryColor),this.lineColor=this.lineColor||H(this.background),this.arrowheadColor=this.arrowheadColor||H(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?rt(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||rt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||H(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||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||rt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=rt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=rt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||H(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||G(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||rt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?rt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Wr,"Theme"),Wr),Cb=p(e=>{const t=new _b;return t.calculate(e),t},"getThemeVariables"),jr,kb=(jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(H("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Pr(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=rt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=rt(this.sectionBkgColor,10),this.taskBorderColor=Pr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Pr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||G(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||rt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=G(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=G(this.labelBackground,25),this.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=G(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||G(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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?rt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=G(this.secondaryColor,20),this.git1=G(this.pie2||this.secondaryColor,20),this.git2=G(this.pie3||this.tertiaryColor,20),this.git3=G(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||G(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||G(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(jr,"Theme"),jr),Sb=p(e=>{const t=new kb;return t.calculate(e),t},"getThemeVariables"),Ur,Tb=(Ur=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(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=Pr(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||rt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=rt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||H(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||H(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=G(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||G(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||G(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||rt(H(this.git0),25),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Ur,"Theme"),Ur),mu=p(e=>{const t=new Tb;return t.calculate(e),t},"getThemeVariables"),Yr,Ab=(Yr=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=G("#cde498",10),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.primaryColor),this.lineColor=H(this.background),this.textColor=H(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(){this.actorBorder=rt(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||rt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=rt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,s:-30,l:-(8+t*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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Yr,"Theme"),Yr),Eb=p(e=>{const t=new Ab;return t.calculate(e),t},"getThemeVariables"),Gr,Lb=(Gr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=G(this.contrast,55),this.border2=this.contrast,this.actorBorder=G(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||G(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{l:-(8+t*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=G(this.contrast,30),this.sectionBkgColor2=G(this.contrast,30),this.taskBorderColor=rt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=G(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=rt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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=rt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Gr,"Theme"),Gr),Bb=p(e=>{const t=new Lb;return t.calculate(e),t},"getThemeVariables"),Ie={base:{getThemeVariables:Cb},dark:{getThemeVariables:Sb},default:{getThemeVariables:mu},forest:{getThemeVariables:Eb},neutral:{getThemeVariables:Bb}},ge={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},yu={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ie.default.getThemeVariables(),sequence:{...ge.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:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.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:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},radar:{...ge.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},bu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...bu(e[i],"")]:[...r,t+i],[]),"keyify"),Mb=new Set(bu(yu,"")),Go=yu,Xn=p(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Xn(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Mb.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){D.debug("sanitizing object",t),Xn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=$b(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),$b=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"),Kr=Object.freeze(Go),Jt=kt({},Kr),Zn,mr=[],Hi=kt({},Kr),Fa=p((e,t)=>{let r=kt({},e),i={};for(const n of t)wu(n),i=kt(i,n);if(r=kt(r,i),i.theme&&i.theme in Ie){const n=kt({},Zn),a=kt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ie&&(r.themeVariables=Ie[r.theme].getThemeVariables(a))}return Hi=r,_u(Hi),Hi},"updateCurrentConfig"),Fb=p(e=>(Jt=kt({},Kr),Jt=kt(Jt,e),e.theme&&Ie[e.theme]&&(Jt.themeVariables=Ie[e.theme].getThemeVariables(e.themeVariables)),Fa(Jt,mr),Jt),"setSiteConfig"),Rb=p(e=>{Zn=kt({},e)},"saveConfigFromInitialize"),Ob=p(e=>(Jt=kt(Jt,e),Fa(Jt,mr),Jt),"updateSiteConfig"),xu=p(()=>kt({},Jt),"getSiteConfig"),vu=p(e=>(_u(e),kt(Hi,e),Ot()),"setConfig"),Ot=p(()=>kt({},Hi),"getConfig"),wu=p(e=>{e&&(["secure",...Jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.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"&&wu(e[t])}))},"sanitize"),Ib=p(e=>{Xn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),mr.push(e),Fa(Jt,mr)},"addDirective"),Kn=p((e=Jt)=>{mr=[],Fa(e,mr)},"reset"),Db={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pc={},Nb=p(e=>{Pc[e]||(D.warn(Db[e]),Pc[e]=!0)},"issueWarning"),_u=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Nb("LAZY_LOAD_DEPRECATED")},"checkConfig"),Pb=p(()=>{let e={};Zn&&(e=kt(e,Zn));for(const t of mr)e=kt(e,t);return e},"getUserDefinedConfig"),si=/<br\s*\/?>/gi,zb=p(e=>e?Su(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),qb=(()=>{let e=!1;return()=>{e||(Cu(),e=!0)}})();function Cu(){const e="data-temp-href-target";Zr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Zr.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(Cu,"setupDompurifyHooks");var ku=p(e=>(qb(),Zr.sanitize(e)),"removeScript"),zc=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=ku(e):r!=="loose"&&(e=Su(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Ub(e))}return e},"sanitizeMore"),re=p((e,t)=>e&&(t.dompurifyConfig?e=Zr.sanitize(zc(e,t),t.dompurifyConfig).toString():e=Zr.sanitize(zc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Hb=p((e,t)=>typeof e=="string"?re(e,t):e.flat().map(r=>re(r,t)),"sanitizeTextOrArray"),Wb=p(e=>si.test(e),"hasBreaks"),jb=p(e=>e.split(si),"splitBreaks"),Ub=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Su=p(e=>e.replace(si,"#br#"),"breakToPlaceholder"),Tu=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"),St=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Yb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Gb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ws=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];Vb(a,o)&&(n=a+","+o,i++,r.pop())}r.push(Xb(n))}return r.join("")},"parseGenericTypes"),js=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Vb=p((e,t)=>{const r=js(e,"~"),i=js(t,"~");return r===1&&i===1},"shouldCombineSets"),Xb=p(e=>{const t=js(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),qc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Us=/\$\$(.*)\$\$/g,yr=p(e=>(e.match(Us)?.length??0)>0,"hasKatex"),Zb=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ra(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Kb=p(async(e,t)=>{if(!yr(e))return e;if(!(qc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Us,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DEiiRhcn.cjs")),i=t.forceLegacyMathML||!qc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(si).map(n=>yr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Us,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ra=p(async(e,t)=>re(await Kb(e,t),t),"renderKatexSanitized"),Cr={getRows:zb,sanitizeText:re,sanitizeTextOrArray:Hb,hasBreaks:Wb,splitBreaks:jb,lineBreakRegex:si,removeScript:ku,getUrl:Tu,evaluate:St,getMax:Yb,getMin:Gb},Qb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Jb=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"),Vo=p(function(e,t,r,i){const n=Jb(t,r,i);Qb(e,n)},"configureSvgSize"),Au=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;D.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;D.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,D.info(`Calculated bounds: ${s}x${l}`),Vo(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Nn={},tx=p((e,t,r)=>{let i="";return e in Nn&&Nn[e]?i=Nn[e](r):D.warn(`No theme found for ${e}`),` & {
51
+ `;return t.code.toLowerCase().includes("</body>")?t.code.replace("</body>",`${E}</body>`):t.code+E}),$=()=>{},P=E=>{if(E.data&&E.data.type==="iframe-height"&&E.data.iframeId===g){const T=E.data.height,A=Math.max(100,Math.min(1e3,T));a.value=`${A}px`}},N=E=>{E.key==="Escape"&&l.value&&M()};return I.onMounted(()=>{window.addEventListener("message",P),window.addEventListener("keydown",N)}),I.onUnmounted(()=>{window.removeEventListener("message",P),window.removeEventListener("keydown",N),document.body.style.overflow=""}),(E,T)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["code-block-wrapper",{fullscreen:l.value}]),"data-lang":e.language},[(I.openBlock(),I.createBlock(I.Teleport,{to:"body"},[h.value?(I.openBlock(),I.createElementBlock("div",{key:0,class:"code-block-tooltip",style:I.normalizeStyle({left:u.value,top:d.value})},I.toDisplayString(c.value),5)):I.createCommentVNode("",!0)])),I.createElementVNode("div",Ey,[I.createElementVNode("span",Ly,I.toDisplayString(e.language.toUpperCase()),1),I.createElementVNode("div",By,[I.createElementVNode("button",{class:"copy-code-button",type:"button",title:"复制代码",onClick:C,innerHTML:Ry}),m()&&!i.value?(I.openBlock(),I.createElementBlock("button",{key:0,class:"preview-html-button",type:"button",title:"预览 HTML",onClick:v,innerHTML:Oy})):I.createCommentVNode("",!0),m()&&e.publishUrl?(I.openBlock(),I.createElementBlock("button",{key:1,class:"publish-html-button",disabled:o.value,type:"button",title:f.value,onClick:k,innerHTML:Dy},null,8,My)):I.createCommentVNode("",!0),l.value?I.createCommentVNode("",!0):(I.openBlock(),I.createElementBlock("button",{key:2,class:"fullscreen-button",type:"button",title:"全屏",onClick:F,innerHTML:Ny})),l.value?(I.openBlock(),I.createElementBlock("button",{key:3,class:"exit-fullscreen-button",type:"button",title:"退出全屏",onClick:M,innerHTML:Py})):I.createCommentVNode("",!0),i.value?(I.openBlock(),I.createElementBlock("button",{key:4,class:"close-preview-button",type:"button",title:"关闭预览",onClick:_,innerHTML:Iy})):I.createCommentVNode("",!0)])]),I.withDirectives(I.createElementVNode("pre",{class:I.normalizeClass(`language-${e.language}`)},[I.createElementVNode("code",{class:I.normalizeClass(`language-${e.language}`),innerHTML:x.value},null,10,$y)],2),[[I.vShow,!i.value]]),i.value?(I.openBlock(),I.createElementBlock("div",{key:0,class:"iframe-wrapper",style:I.normalizeStyle({height:a.value})},[I.createElementVNode("iframe",{ref_key:"previewIframe",ref:n,class:"html-preview-iframe",srcdoc:O.value,sandbox:"allow-scripts allow-forms allow-popups allow-modals allow-same-origin",onLoad:$},null,40,Fy)],4)):I.createCommentVNode("",!0)],10,Ay))}}),La=(e,t)=>{const r=e.__vccOpts||e;for(const[i,n]of t)r[i]=n;return r},qy=La(zy,[["__scopeId","data-v-4d2b6871"]]);function Hy(e){const{priority:t=70,languageAliases:r={},publishUrl:i,onPublished:n,cssUrl:a}=e||{};return a&&typeof window<"u"&&iu.loadCss(a),{name:"codeblock",priority:t,test:o=>o.type!=="tag"||o.name!=="pre"?!1:!!o.children?.some(l=>l.type==="tag"&&l.name==="code"),render:(o,s,l,c)=>{const h=o.children?.find(b=>b.type==="tag"&&b.name==="code");if(!h)return I.h("pre",{},"");const d=(h.attribs?.class||"").match(/language-(\w+)/);let f=d?d[1]:"plaintext";r[f]&&(f=r[f]);const g=b=>b.type==="text"?b.data||"":b.children?b.children.map(g).join(""):"",m=g(h);return I.h(qy,{code:m,language:f,publishUrl:i,onPublished:n})}}}function Wy(e){const{priority:t=10,customEmojis:r={}}=e||{},n={...{":smile:":"😊",":heart:":"❤️",":fire:":"🔥",":rocket:":"🚀",":star:":"⭐",":thumbsup:":"👍",":tada:":"🎉",":check:":"✅",":cross:":"❌",":eyes:":"👀",":thinking:":"🤔",":100:":"💯"},...r};return{name:"emoji",priority:t,test:a=>a.type==="text"&&/:\w+:/g.test(a.data||""),render:(a,o,s,l)=>{let h=a.data||"";return Object.entries(n).forEach(([u,d])=>{h=h.replace(new RegExp(u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),d)}),h}}}var Ns={name:"mermaid",version:"11.12.0",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.11",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",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"}},On={exports:{}},jy=On.exports,Bc;function Uy(){return Bc||(Bc=1,(function(e,t){(function(r,i){e.exports=i()})(jy,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",b=/^(\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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],A=E%100;return"["+E+(T[(A-20)%10]||T[A]||T[0])+"]"}},v=function(E,T,A){var R=String(E);return!R||R.length>=T?E:""+Array(T+1-R.length).join(A)+E},_={s:v,z:function(E){var T=-E.utcOffset(),A=Math.abs(T),R=Math.floor(A/60),B=A%60;return(T<=0?"+":"-")+v(R,2,"0")+":"+v(B,2,"0")},m:function E(T,A){if(T.date()<A.date())return-E(A,T);var R=12*(A.year()-T.year())+(A.month()-T.month()),B=T.clone().add(R,u),z=A-B<0,W=T.clone().add(R+(z?-1:1),u);return+(-(R+(A-B)/(z?B-W:W-B))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:f,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},w="en",C={};C[w]=y;var k="$isDayjsObject",F=function(E){return E instanceof P||!(!E||!E[k])},M=function E(T,A,R){var B;if(!T)return w;if(typeof T=="string"){var z=T.toLowerCase();C[z]&&(B=z),A&&(C[z]=A,B=z);var W=T.split("-");if(!B&&W.length>1)return E(W[0])}else{var Y=T.name;C[Y]=T,B=Y}return!R&&B&&(w=B),B||!R&&w},O=function(E,T){if(F(E))return E.clone();var A=typeof T=="object"?T:{};return A.date=E,A.args=arguments,new P(A)},$=_;$.l=M,$.i=F,$.w=function(E,T){return O(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var P=(function(){function E(A){this.$L=M(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[k]=!0}var T=E.prototype;return T.parse=function(A){this.$d=(function(R){var B=R.date,z=R.utc;if(B===null)return new Date(NaN);if($.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var W=B.match(b);if(W){var Y=W[2]-1||0,j=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,j)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,j)}}return new Date(B)})(A),this.init()},T.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},T.$utils=function(){return $},T.isValid=function(){return this.$d.toString()!==m},T.isSame=function(A,R){var B=O(A);return this.startOf(R)<=B&&B<=this.endOf(R)},T.isAfter=function(A,R){return O(A)<this.startOf(R)},T.isBefore=function(A,R){return this.endOf(R)<O(A)},T.$g=function(A,R,B){return $.u(A)?this[R]:this.set(B,A)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(A,R){var B=this,z=!!$.u(R)||R,W=$.p(A),Y=function(Bt,mt){var Tt=$.w(B.$u?Date.UTC(B.$y,mt,Bt):new Date(B.$y,mt,Bt),B);return z?Tt:Tt.endOf(c)},j=function(Bt,mt){return $.w(B.toDate()[Bt].apply(B.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(mt)),B)},V=this.$W,lt=this.$M,et=this.$D,yt="set"+(this.$u?"UTC":"");switch(W){case f:return z?Y(1,0):Y(31,11);case u:return z?Y(1,lt):Y(0,lt+1);case h:var ct=this.$locale().weekStart||0,Lt=(V<ct?V+7:V)-ct;return Y(z?et-Lt:et+(6-Lt),lt);case c:case g:return j(yt+"Hours",0);case l:return j(yt+"Minutes",1);case s:return j(yt+"Seconds",2);case o:return j(yt+"Milliseconds",3);default:return this.clone()}},T.endOf=function(A){return this.startOf(A,!1)},T.$set=function(A,R){var B,z=$.p(A),W="set"+(this.$u?"UTC":""),Y=(B={},B[c]=W+"Date",B[g]=W+"Date",B[u]=W+"Month",B[f]=W+"FullYear",B[l]=W+"Hours",B[s]=W+"Minutes",B[o]=W+"Seconds",B[a]=W+"Milliseconds",B)[z],j=z===c?this.$D+(R-this.$W):R;if(z===u||z===f){var V=this.clone().set(g,1);V.$d[Y](j),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else Y&&this.$d[Y](j);return this.init(),this},T.set=function(A,R){return this.clone().$set(A,R)},T.get=function(A){return this[$.p(A)]()},T.add=function(A,R){var B,z=this;A=Number(A);var W=$.p(R),Y=function(lt){var et=O(z);return $.w(et.date(et.date()+Math.round(lt*A)),z)};if(W===u)return this.set(u,this.$M+A);if(W===f)return this.set(f,this.$y+A);if(W===c)return Y(1);if(W===h)return Y(7);var j=(B={},B[s]=i,B[l]=n,B[o]=r,B)[W]||1,V=this.$d.getTime()+A*j;return $.w(V,this)},T.subtract=function(A,R){return this.add(-1*A,R)},T.format=function(A){var R=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var z=A||"YYYY-MM-DDTHH:mm:ssZ",W=$.z(this),Y=this.$H,j=this.$m,V=this.$M,lt=B.weekdays,et=B.months,yt=B.meridiem,ct=function(mt,Tt,It,Wt){return mt&&(mt[Tt]||mt(R,z))||It[Tt].slice(0,Wt)},Lt=function(mt){return $.s(Y%12||12,mt,"0")},Bt=yt||function(mt,Tt,It){var Wt=mt<12?"AM":"PM";return It?Wt.toLowerCase():Wt};return z.replace(x,(function(mt,Tt){return Tt||(function(It){switch(It){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return V+1;case"MM":return $.s(V+1,2,"0");case"MMM":return ct(B.monthsShort,V,et,3);case"MMMM":return ct(et,V);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return ct(B.weekdaysMin,R.$W,lt,2);case"ddd":return ct(B.weekdaysShort,R.$W,lt,3);case"dddd":return lt[R.$W];case"H":return String(Y);case"HH":return $.s(Y,2,"0");case"h":return Lt(1);case"hh":return Lt(2);case"a":return Bt(Y,j,!0);case"A":return Bt(Y,j,!1);case"m":return String(j);case"mm":return $.s(j,2,"0");case"s":return String(R.$s);case"ss":return $.s(R.$s,2,"0");case"SSS":return $.s(R.$ms,3,"0");case"Z":return W}return null})(mt)||W.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(A,R,B){var z,W=this,Y=$.p(R),j=O(A),V=(j.utcOffset()-this.utcOffset())*i,lt=this-j,et=function(){return $.m(W,j)};switch(Y){case f:z=et()/12;break;case u:z=et();break;case d:z=et()/3;break;case h:z=(lt-V)/6048e5;break;case c:z=(lt-V)/864e5;break;case l:z=lt/n;break;case s:z=lt/i;break;case o:z=lt/r;break;default:z=lt}return B?z:$.a(z)},T.daysInMonth=function(){return this.endOf(u).$D},T.$locale=function(){return C[this.$L]},T.locale=function(A,R){if(!A)return this.$L;var B=this.clone(),z=M(A,R,!0);return z&&(B.$L=z),B},T.clone=function(){return $.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E})(),N=P.prototype;return O.prototype=N,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function(E){N[E[1]]=function(T){return this.$g(T,E[0],E[1])}})),O.extend=function(E,T){return E.$i||(E(T,P,O),E.$i=!0),O},O.locale=M,O.isDayjs=F,O.unix=function(E){return O(1e3*E)},O.en=C[w],O.Ls=C,O.p={},O}))})(On)),On.exports}var Yy=Uy();const nu=jo(Yy);var au=Object.defineProperty,p=(e,t)=>au(e,"name",{value:t,configurable:!0}),su=(e,t)=>{for(var r in t)au(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Uo=p(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Ee.fatal&&(D.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Ee.error&&(D.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Ee.warn&&(D.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Ee.info&&(D.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Ee.debug&&(D.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Ee.trace&&(D.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=p(e=>`%c${nu().format("ss.SSS")} : ${e} : `,"format");const In={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 n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return In.hue2rgb(a,n,e+1/3)*255;case"g":return In.hue2rgb(a,n,e)*255;case"b":return In.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){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}}},Gy={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},Vy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:In,lang:Gy,unit:Vy},je={};for(let e=0;e<=255;e++)je[e]=ot.unit.dec2hex(e);const Nt={ALL:0,RGB:1,HSL:2};class Xy{constructor(){this.type=Nt.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=Nt.ALL}is(t){return this.type===t}}class Zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Xy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Nt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=ot.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ot.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=ot.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=ot.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ot.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=ot.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Nt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Nt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Nt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Nt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Nt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Nt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ba=new Zy({r:0,g:0,b:0,a:0},"transparent"),Nr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Nr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ba.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${je[Math.round(t)]}${je[Math.round(r)]}${je[Math.round(i)]}${je[Math.round(n*255)]}`:`#${je[Math.round(t)]}${je[Math.round(r)]}${je[Math.round(i)]}`}},lr={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(lr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(lr.re);if(!r)return;const[,i,n,a,o,s]=r;return Ba.set({h:lr._hue2deg(i),s:ot.channel.clamp.s(parseFloat(n)),l:ot.channel.clamp.l(parseFloat(a)),a:o?ot.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%, ${n})`:`hsl(${ot.lang.round(t)}, ${ot.lang.round(r)}%, ${ot.lang.round(i)}%)`}},zi={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=zi.colors[e];if(t)return Nr.parse(t)},stringify:e=>{const t=Nr.stringify(e);for(const r in zi.colors)if(zi.colors[r]===t)return r}},Mi={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(Mi.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Ba.set({r:ot.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ot.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ot.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)}, ${ot.lang.round(n)})`:`rgb(${ot.lang.round(t)}, ${ot.lang.round(r)}, ${ot.lang.round(i)})`}},de={format:{keyword:zi,hex:Nr,rgb:Mi,rgba:Mi,hsl:lr,hsla:lr},parse:e=>{if(typeof e!="string")return e;const t=Nr.parse(e)||Mi.parse(e)||lr.parse(e)||zi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Nt.HSL)||e.data.r===void 0?lr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Mi.stringify(e):Nr.stringify(e)},ou=(e,t)=>{const r=de.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return de.stringify(r)},Pr=(e,t,r=0,i=1)=>{if(typeof e!="number")return ou(e,{a:t});const n=Ba.set({r:ot.channel.clamp.r(e),g:ot.channel.clamp.g(t),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(i)});return de.stringify(n)},Ky=e=>{const{r:t,g:r,b:i}=de.parse(e),n=.2126*ot.channel.toLinear(t)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(i);return ot.lang.round(n)},Qy=e=>Ky(e)>=.5,ai=e=>!Qy(e),lu=(e,t,r)=>{const i=de.parse(e),n=i[t],a=ot.channel.clamp[t](n+r);return n!==a&&(i[t]=a),de.stringify(i)},G=(e,t)=>lu(e,"l",t),rt=(e,t)=>lu(e,"l",-t),L=(e,t)=>{const r=de.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return ou(e,i)},Jy=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=de.parse(e),{r:s,g:l,b:c,a:h}=de.parse(t),u=r/100,d=u*2-1,f=o-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,b=1-m,x=i*m+s*b,y=n*m+l*b,v=a*m+c*b,_=o*u+h*(1-u);return Pr(x,y,v,_)},H=(e,t=100)=>{const r=de.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Jy(r,e,t)};/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */const{entries:cu,setPrototypeOf:Mc,isFrozen:tb,getPrototypeOf:eb,getOwnPropertyDescriptor:rb}=Object;let{freeze:Xt,seal:se,create:hu}=Object,{apply:Ps,construct:zs}=typeof Reflect<"u"&&Reflect;Xt||(Xt=function(t){return t});se||(se=function(t){return t});Ps||(Ps=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});zs||(zs=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Cn=Zt(Array.prototype.forEach),ib=Zt(Array.prototype.lastIndexOf),$c=Zt(Array.prototype.pop),xi=Zt(Array.prototype.push),nb=Zt(Array.prototype.splice),Dn=Zt(String.prototype.toLowerCase),ys=Zt(String.prototype.toString),bs=Zt(String.prototype.match),vi=Zt(String.prototype.replace),ab=Zt(String.prototype.indexOf),sb=Zt(String.prototype.trim),le=Zt(Object.prototype.hasOwnProperty),jt=Zt(RegExp.prototype.test),wi=ob(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Ps(e,t,i)}}function ob(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return zs(e,r)}}function ht(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dn;Mc&&Mc(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(tb(t)||(t[i]=a),n=a)}e[n]=!0}return e}function lb(e){for(let t=0;t<e.length;t++)le(e,t)||(e[t]=null);return e}function Be(e){const t=hu(null);for(const[r,i]of cu(e))le(e,r)&&(Array.isArray(i)?t[r]=lb(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Be(i):t[r]=i);return t}function _i(e,t){for(;e!==null;){const i=rb(e,t);if(i){if(i.get)return Zt(i.get);if(typeof i.value=="function")return Zt(i.value)}e=eb(e)}function r(){return null}return r}const Fc=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xs=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vs=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),cb=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ws=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hb=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rc=Xt(["#text"]),Oc=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),_s=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ic=Xt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kn=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ub=se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),db=se(/<%[\w\W]*|[\w\W]*%>/gm),fb=se(/\$\{[\w\W]*/gm),pb=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),gb=se(/^aria-[\-\w]+$/),uu=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mb=se(/^(?:\w+script|data):/i),yb=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),du=se(/^html$/i),bb=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dc=Object.freeze({__proto__:null,ARIA_ATTR:gb,ATTR_WHITESPACE:yb,CUSTOM_ELEMENT:bb,DATA_ATTR:pb,DOCTYPE_NAME:du,ERB_EXPR:db,IS_ALLOWED_URI:uu,IS_SCRIPT_OR_DATA:mb,MUSTACHE_EXPR:ub,TMPLIT_EXPR:fb});const Ci={element:1,text:3,progressingInstruction:7,comment:8,document:9},xb=function(){return typeof window>"u"?null:window},vb=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Nc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function fu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xb();const t=it=>fu(it);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==Ci.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:f}=e,g=l.prototype,m=_i(g,"cloneNode"),b=_i(g,"remove"),x=_i(g,"nextSibling"),y=_i(g,"childNodes"),v=_i(g,"parentNode");if(typeof o=="function"){const it=r.createElement("template");it.content&&it.content.ownerDocument&&(r=it.content.ownerDocument)}let _,w="";const{implementation:C,createNodeIterator:k,createDocumentFragment:F,getElementsByTagName:M}=r,{importNode:O}=i;let $=Nc();t.isSupported=typeof cu=="function"&&typeof v=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:N,TMPLIT_EXPR:E,DATA_ATTR:T,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:z}=Dc;let{IS_ALLOWED_URI:W}=Dc,Y=null;const j=ht({},[...Fc,...xs,...vs,...ws,...Rc]);let V=null;const lt=ht({},[...Oc,..._s,...Ic,...kn]);let et=Object.seal(hu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,ct=null,Lt=!0,Bt=!0,mt=!1,Tt=!0,It=!1,Wt=!0,ke=!1,pi=!1,gi=!1,We=!1,er=!1,rr=!1,mn=!0,yn=!1;const cs="user-content-";let mi=!0,yi=!1,Lr={},Br=null;const Ql=ht({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Jl=null;const tc=ht({},["audio","video","img","source","image","track"]);let hs=null;const ec=ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bn="http://www.w3.org/1998/Math/MathML",xn="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let Mr=Se,us=!1,ds=null;const uy=ht({},[bn,xn,Se],ys);let vn=ht({},["mi","mo","mn","ms","mtext"]),wn=ht({},["annotation-xml"]);const dy=ht({},["title","style","font","a","script"]);let bi=null;const fy=["application/xhtml+xml","text/html"],py="text/html";let Mt=null,$r=null;const gy=r.createElement("form"),rc=function(S){return S instanceof RegExp||S instanceof Function},fs=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($r&&$r===S)){if((!S||typeof S!="object")&&(S={}),S=Be(S),bi=fy.indexOf(S.PARSER_MEDIA_TYPE)===-1?py:S.PARSER_MEDIA_TYPE,Mt=bi==="application/xhtml+xml"?ys:Dn,Y=le(S,"ALLOWED_TAGS")?ht({},S.ALLOWED_TAGS,Mt):j,V=le(S,"ALLOWED_ATTR")?ht({},S.ALLOWED_ATTR,Mt):lt,ds=le(S,"ALLOWED_NAMESPACES")?ht({},S.ALLOWED_NAMESPACES,ys):uy,hs=le(S,"ADD_URI_SAFE_ATTR")?ht(Be(ec),S.ADD_URI_SAFE_ATTR,Mt):ec,Jl=le(S,"ADD_DATA_URI_TAGS")?ht(Be(tc),S.ADD_DATA_URI_TAGS,Mt):tc,Br=le(S,"FORBID_CONTENTS")?ht({},S.FORBID_CONTENTS,Mt):Ql,yt=le(S,"FORBID_TAGS")?ht({},S.FORBID_TAGS,Mt):Be({}),ct=le(S,"FORBID_ATTR")?ht({},S.FORBID_ATTR,Mt):Be({}),Lr=le(S,"USE_PROFILES")?S.USE_PROFILES:!1,Lt=S.ALLOW_ARIA_ATTR!==!1,Bt=S.ALLOW_DATA_ATTR!==!1,mt=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,It=S.SAFE_FOR_TEMPLATES||!1,Wt=S.SAFE_FOR_XML!==!1,ke=S.WHOLE_DOCUMENT||!1,We=S.RETURN_DOM||!1,er=S.RETURN_DOM_FRAGMENT||!1,rr=S.RETURN_TRUSTED_TYPE||!1,gi=S.FORCE_BODY||!1,mn=S.SANITIZE_DOM!==!1,yn=S.SANITIZE_NAMED_PROPS||!1,mi=S.KEEP_CONTENT!==!1,yi=S.IN_PLACE||!1,W=S.ALLOWED_URI_REGEXP||uu,Mr=S.NAMESPACE||Se,vn=S.MATHML_TEXT_INTEGRATION_POINTS||vn,wn=S.HTML_INTEGRATION_POINTS||wn,et=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&rc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&rc(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Bt=!1),er&&(We=!0),Lr&&(Y=ht({},Rc),V=[],Lr.html===!0&&(ht(Y,Fc),ht(V,Oc)),Lr.svg===!0&&(ht(Y,xs),ht(V,_s),ht(V,kn)),Lr.svgFilters===!0&&(ht(Y,vs),ht(V,_s),ht(V,kn)),Lr.mathMl===!0&&(ht(Y,ws),ht(V,Ic),ht(V,kn))),S.ADD_TAGS&&(Y===j&&(Y=Be(Y)),ht(Y,S.ADD_TAGS,Mt)),S.ADD_ATTR&&(V===lt&&(V=Be(V)),ht(V,S.ADD_ATTR,Mt)),S.ADD_URI_SAFE_ATTR&&ht(hs,S.ADD_URI_SAFE_ATTR,Mt),S.FORBID_CONTENTS&&(Br===Ql&&(Br=Be(Br)),ht(Br,S.FORBID_CONTENTS,Mt)),mi&&(Y["#text"]=!0),ke&&ht(Y,["html","head","body"]),Y.table&&(ht(Y,["tbody"]),delete yt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw wi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw wi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=S.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=vb(f,n)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));Xt&&Xt(S),$r=S}},ic=ht({},[...xs,...vs,...cb]),nc=ht({},[...ws,...hb]),my=function(S){let q=v(S);(!q||!q.tagName)&&(q={namespaceURI:Mr,tagName:"template"});const J=Dn(S.tagName),xt=Dn(q.tagName);return ds[S.namespaceURI]?S.namespaceURI===xn?q.namespaceURI===Se?J==="svg":q.namespaceURI===bn?J==="svg"&&(xt==="annotation-xml"||vn[xt]):!!ic[J]:S.namespaceURI===bn?q.namespaceURI===Se?J==="math":q.namespaceURI===xn?J==="math"&&wn[xt]:!!nc[J]:S.namespaceURI===Se?q.namespaceURI===xn&&!wn[xt]||q.namespaceURI===bn&&!vn[xt]?!1:!nc[J]&&(dy[J]||!ic[J]):!!(bi==="application/xhtml+xml"&&ds[S.namespaceURI]):!1},pe=function(S){xi(t.removed,{element:S});try{v(S).removeChild(S)}catch{b(S)}},ir=function(S,q){try{xi(t.removed,{attribute:q.getAttributeNode(S),from:q})}catch{xi(t.removed,{attribute:null,from:q})}if(q.removeAttribute(S),S==="is")if(We||er)try{pe(q)}catch{}else try{q.setAttribute(S,"")}catch{}},ac=function(S){let q=null,J=null;if(gi)S="<remove></remove>"+S;else{const _t=bs(S,/^[\r\n\t ]+/);J=_t&&_t[0]}bi==="application/xhtml+xml"&&Mr===Se&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const xt=_?_.createHTML(S):S;if(Mr===Se)try{q=new d().parseFromString(xt,bi)}catch{}if(!q||!q.documentElement){q=C.createDocument(Mr,"template",null);try{q.documentElement.innerHTML=us?w:xt}catch{}}const Dt=q.body||q.documentElement;return S&&J&&Dt.insertBefore(r.createTextNode(J),Dt.childNodes[0]||null),Mr===Se?M.call(q,ke?"html":"body")[0]:ke?q.documentElement:Dt},sc=function(S){return k.call(S.ownerDocument||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ps=function(S){return S instanceof u&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof h)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},oc=function(S){return typeof s=="function"&&S instanceof s};function Te(it,S,q){Cn(it,J=>{J.call(t,S,q,$r)})}const lc=function(S){let q=null;if(Te($.beforeSanitizeElements,S,null),ps(S))return pe(S),!0;const J=Mt(S.nodeName);if(Te($.uponSanitizeElement,S,{tagName:J,allowedTags:Y}),Wt&&S.hasChildNodes()&&!oc(S.firstElementChild)&&jt(/<[/\w!]/g,S.innerHTML)&&jt(/<[/\w!]/g,S.textContent)||S.nodeType===Ci.progressingInstruction||Wt&&S.nodeType===Ci.comment&&jt(/<[/\w]/g,S.data))return pe(S),!0;if(!Y[J]||yt[J]){if(!yt[J]&&hc(J)&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J)))return!1;if(mi&&!Br[J]){const xt=v(S)||S.parentNode,Dt=y(S)||S.childNodes;if(Dt&&xt){const _t=Dt.length;for(let Kt=_t-1;Kt>=0;--Kt){const Ae=m(Dt[Kt],!0);Ae.__removalCount=(S.__removalCount||0)+1,xt.insertBefore(Ae,x(S))}}}return pe(S),!0}return S instanceof l&&!my(S)||(J==="noscript"||J==="noembed"||J==="noframes")&&jt(/<\/no(script|embed|frames)/i,S.innerHTML)?(pe(S),!0):(It&&S.nodeType===Ci.text&&(q=S.textContent,Cn([P,N,E],xt=>{q=vi(q,xt," ")}),S.textContent!==q&&(xi(t.removed,{element:S.cloneNode()}),S.textContent=q)),Te($.afterSanitizeElements,S,null),!1)},cc=function(S,q,J){if(mn&&(q==="id"||q==="name")&&(J in r||J in gy))return!1;if(!(Bt&&!ct[q]&&jt(T,q))){if(!(Lt&&jt(A,q))){if(!V[q]||ct[q]){if(!(hc(S)&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,S)||et.tagNameCheck instanceof Function&&et.tagNameCheck(S))&&(et.attributeNameCheck instanceof RegExp&&jt(et.attributeNameCheck,q)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(q,S))||q==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&jt(et.tagNameCheck,J)||et.tagNameCheck instanceof Function&&et.tagNameCheck(J))))return!1}else if(!hs[q]){if(!jt(W,vi(J,B,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&S!=="script"&&ab(J,"data:")===0&&Jl[S])){if(!(mt&&!jt(R,vi(J,B,"")))){if(J)return!1}}}}}}return!0},hc=function(S){return S!=="annotation-xml"&&bs(S,z)},uc=function(S){Te($.beforeSanitizeAttributes,S,null);const{attributes:q}=S;if(!q||ps(S))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let xt=q.length;for(;xt--;){const Dt=q[xt],{name:_t,namespaceURI:Kt,value:Ae}=Dt,Fr=Mt(_t),gs=Ae;let $t=_t==="value"?gs:sb(gs);if(J.attrName=Fr,J.attrValue=$t,J.keepAttr=!0,J.forceKeepAttr=void 0,Te($.uponSanitizeAttribute,S,J),$t=J.attrValue,yn&&(Fr==="id"||Fr==="name")&&(ir(_t,S),$t=cs+$t),Wt&&jt(/((--!?|])>)|<\/(style|title|textarea)/i,$t)){ir(_t,S);continue}if(Fr==="attributename"&&bs($t,"href")){ir(_t,S);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){ir(_t,S);continue}if(!Tt&&jt(/\/>/i,$t)){ir(_t,S);continue}It&&Cn([P,N,E],fc=>{$t=vi($t,fc," ")});const dc=Mt(S.nodeName);if(!cc(dc,Fr,$t)){ir(_t,S);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Kt)switch(f.getAttributeType(dc,Fr)){case"TrustedHTML":{$t=_.createHTML($t);break}case"TrustedScriptURL":{$t=_.createScriptURL($t);break}}if($t!==gs)try{Kt?S.setAttributeNS(Kt,_t,$t):S.setAttribute(_t,$t),ps(S)?pe(S):$c(t.removed)}catch{ir(_t,S)}}Te($.afterSanitizeAttributes,S,null)},yy=function it(S){let q=null;const J=sc(S);for(Te($.beforeSanitizeShadowDOM,S,null);q=J.nextNode();)Te($.uponSanitizeShadowNode,q,null),lc(q),uc(q),q.content instanceof a&&it(q.content);Te($.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(it){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,J=null,xt=null,Dt=null;if(us=!it,us&&(it="<!-->"),typeof it!="string"&&!oc(it))if(typeof it.toString=="function"){if(it=it.toString(),typeof it!="string")throw wi("dirty is not a string, aborting")}else throw wi("toString is not a function");if(!t.isSupported)return it;if(pi||fs(S),t.removed=[],typeof it=="string"&&(yi=!1),yi){if(it.nodeName){const Ae=Mt(it.nodeName);if(!Y[Ae]||yt[Ae])throw wi("root node is forbidden and cannot be sanitized in-place")}}else if(it instanceof s)q=ac("<!---->"),J=q.ownerDocument.importNode(it,!0),J.nodeType===Ci.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?q=J:q.appendChild(J);else{if(!We&&!It&&!ke&&it.indexOf("<")===-1)return _&&rr?_.createHTML(it):it;if(q=ac(it),!q)return We?null:rr?w:""}q&&gi&&pe(q.firstChild);const _t=sc(yi?it:q);for(;xt=_t.nextNode();)lc(xt),uc(xt),xt.content instanceof a&&yy(xt.content);if(yi)return it;if(We){if(er)for(Dt=F.call(q.ownerDocument);q.firstChild;)Dt.appendChild(q.firstChild);else Dt=q;return(V.shadowroot||V.shadowrootmode)&&(Dt=O.call(i,Dt,!0)),Dt}let Kt=ke?q.outerHTML:q.innerHTML;return ke&&Y["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&jt(du,q.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
52
+ `+Kt),It&&Cn([P,N,E],Ae=>{Kt=vi(Kt,Ae," ")}),_&&rr?_.createHTML(Kt):Kt},t.setConfig=function(){let it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fs(it),pi=!0},t.clearConfig=function(){$r=null,pi=!1},t.isValidAttribute=function(it,S,q){$r||fs({});const J=Mt(it),xt=Mt(S);return cc(J,xt,q)},t.addHook=function(it,S){typeof S=="function"&&xi($[it],S)},t.removeHook=function(it,S){if(S!==void 0){const q=ib($[it],S);return q===-1?void 0:nb($[it],q,1)[0]}return $c($[it])},t.removeHooks=function(it){$[it]=[]},t.removeAllHooks=function(){$=Nc()},t}var Zr=fu(),pu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,qi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wb=/\s*%%.*\n/gm,Hr,gu=(Hr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Hr,"UnknownDiagramError"),Hr),gr={},Yo=p(function(e,t){e=e.replace(pu,"").replace(qi,"").replace(wb,`
53
+ `);for(const[r,{detector:i}]of Object.entries(gr))if(i(e,t))return r;throw new gu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),qs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)mu(t,r,i)},"registerLazyLoadedDiagrams"),mu=p((e,t,r)=>{gr[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),gr[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),_b=p(e=>gr[e].loader,"getDiagramLoader"),Hs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Hs(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Hs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),kt=Hs,Ma="#ffffff",$a="#f2f2f2",Ut=p((e,t)=>t?L(e,{s:-40,l:10}):L(e,{s:-40,l:-10}),"mkBorder"),Wr,Cb=(Wr=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||L(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||L(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||H(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||H(this.tertiaryColor),this.lineColor=this.lineColor||H(this.background),this.arrowheadColor=this.arrowheadColor||H(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?rt(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||rt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||H(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||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||rt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||rt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=rt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=rt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||H(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||G(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||rt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||L(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||L(this.primaryColor,{h:64}),this.fillType3=this.fillType3||L(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||L(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||L(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||L(this.primaryColor,{h:128}),this.fillType7=this.fillType7||L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-10}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?rt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Wr,"Theme"),Wr),kb=p(e=>{const t=new Cb;return t.calculate(e),t},"getThemeVariables"),jr,Sb=(jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(H("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Pr(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=rt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=rt(this.sectionBkgColor,10),this.taskBorderColor=Pr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Pr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||G(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||rt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=G(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=G(this.labelBackground,25),this.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=G(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=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=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||G(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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?rt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=G(this.secondaryColor,20),this.git1=G(this.pie2||this.secondaryColor,20),this.git2=G(this.pie3||this.tertiaryColor,20),this.git3=G(this.pie4||L(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||L(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||L(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||L(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||L(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||G(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||G(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(jr,"Theme"),jr),Tb=p(e=>{const t=new Sb;return t.calculate(e),t},"getThemeVariables"),Ur,Ab=(Ur=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=L(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(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=Pr(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||rt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=rt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||H(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||H(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=G(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||G(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||G(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||L(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||L(this.primaryColor,{l:-10}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||L(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||rt(H(this.git0),25),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Ur,"Theme"),Ur),yu=p(e=>{const t=new Ab;return t.calculate(e),t},"getThemeVariables"),Yr,Eb=(Yr=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=G("#cde498",10),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.primaryColor),this.lineColor=H(this.background),this.textColor=H(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(){this.actorBorder=rt(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||L(this.primaryColor,{h:30}),this.cScale4=this.cScale4||L(this.primaryColor,{h:60}),this.cScale5=this.cScale5||L(this.primaryColor,{h:90}),this.cScale6=this.cScale6||L(this.primaryColor,{h:120}),this.cScale7=this.cScale7||L(this.primaryColor,{h:150}),this.cScale8=this.cScale8||L(this.primaryColor,{h:210}),this.cScale9=this.cScale9||L(this.primaryColor,{h:270}),this.cScale10=this.cScale10||L(this.primaryColor,{h:300}),this.cScale11=this.cScale11||L(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||rt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||rt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=rt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{h:30,s:-30,l:-(8+t*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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||L(this.primaryColor,{l:-30}),this.pie5=this.pie5||L(this.secondaryColor,{l:-30}),this.pie6=this.pie6||L(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||L(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||L(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||L(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||L(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||L(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||L(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||L(this.primaryColor,{h:-30}),this.git4=this.git4||L(this.primaryColor,{h:-60}),this.git5=this.git5||L(this.primaryColor,{h:-90}),this.git6=this.git6||L(this.primaryColor,{h:60}),this.git7=this.git7||L(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=rt(this.git0,25),this.git1=rt(this.git1,25),this.git2=rt(this.git2,25),this.git3=rt(this.git3,25),this.git4=rt(this.git4,25),this.git5=rt(this.git5,25),this.git6=rt(this.git6,25),this.git7=rt(this.git7,25)),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||H(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Yr,"Theme"),Yr),Lb=p(e=>{const t=new Eb;return t.calculate(e),t},"getThemeVariables"),Gr,Bb=(Gr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=L(this.primaryColor,{h:-160}),this.primaryBorderColor=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=H(this.primaryColor),this.secondaryTextColor=H(this.secondaryColor),this.tertiaryTextColor=H(this.tertiaryColor),this.lineColor=H(this.background),this.textColor=H(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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=G(this.contrast,55),this.border2=this.contrast,this.actorBorder=G(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||H(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||G(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||rt(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||L(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||L(this.mainBkg,{l:-(8+t*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=G(this.contrast,30),this.sectionBkgColor2=G(this.contrast,30),this.taskBorderColor=rt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=G(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=rt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=L(this.primaryColor,{h:64}),this.fillType3=L(this.secondaryColor,{h:64}),this.fillType4=L(this.primaryColor,{h:-64}),this.fillType5=L(this.secondaryColor,{h:-64}),this.fillType6=L(this.primaryColor,{h:128}),this.fillType7=L(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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||L(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||L(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||L(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||L(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||L(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||L(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ai(this.quadrant1Fill)?G(this.quadrant1Fill):rt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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=rt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||L(this.primaryColor,{h:-30}),this.git4=this.pie5||L(this.primaryColor,{h:-60}),this.git5=this.pie6||L(this.primaryColor,{h:-90}),this.git6=this.pie7||L(this.primaryColor,{h:60}),this.git7=this.pie8||L(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||H(this.git0),this.gitInv1=this.gitInv1||H(this.git1),this.gitInv2=this.gitInv2||H(this.git2),this.gitInv3=this.gitInv3||H(this.git3),this.gitInv4=this.gitInv4||H(this.git4),this.gitInv5=this.gitInv5||H(this.git5),this.gitInv6=this.gitInv6||H(this.git6),this.gitInv7=this.gitInv7||H(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||Ma,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$a}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(Gr,"Theme"),Gr),Mb=p(e=>{const t=new Bb;return t.calculate(e),t},"getThemeVariables"),Ie={base:{getThemeVariables:kb},dark:{getThemeVariables:Tb},default:{getThemeVariables:yu},forest:{getThemeVariables:Lb},neutral:{getThemeVariables:Mb}},ge={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},bu={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ie.default.getThemeVariables(),sequence:{...ge.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:{...ge.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ge.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ge.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:{...ge.pie,useWidth:984},xyChart:{...ge.xyChart,useWidth:void 0},requirement:{...ge.requirement,useWidth:void 0},packet:{...ge.packet},radar:{...ge.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},xu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...xu(e[i],"")]:[...r,t+i],[]),"keyify"),$b=new Set(xu(bu,"")),Go=bu,Xn=p(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Xn(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!$b.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){D.debug("sanitizing object",t),Xn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=Fb(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),Fb=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"),Kr=Object.freeze(Go),Jt=kt({},Kr),Zn,mr=[],Hi=kt({},Kr),Fa=p((e,t)=>{let r=kt({},e),i={};for(const n of t)_u(n),i=kt(i,n);if(r=kt(r,i),i.theme&&i.theme in Ie){const n=kt({},Zn),a=kt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ie&&(r.themeVariables=Ie[r.theme].getThemeVariables(a))}return Hi=r,Cu(Hi),Hi},"updateCurrentConfig"),Rb=p(e=>(Jt=kt({},Kr),Jt=kt(Jt,e),e.theme&&Ie[e.theme]&&(Jt.themeVariables=Ie[e.theme].getThemeVariables(e.themeVariables)),Fa(Jt,mr),Jt),"setSiteConfig"),Ob=p(e=>{Zn=kt({},e)},"saveConfigFromInitialize"),Ib=p(e=>(Jt=kt(Jt,e),Fa(Jt,mr),Jt),"updateSiteConfig"),vu=p(()=>kt({},Jt),"getSiteConfig"),wu=p(e=>(Cu(e),kt(Hi,e),Ot()),"setConfig"),Ot=p(()=>kt({},Hi),"getConfig"),_u=p(e=>{e&&(["secure",...Jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.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"&&_u(e[t])}))},"sanitize"),Db=p(e=>{Xn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),mr.push(e),Fa(Jt,mr)},"addDirective"),Kn=p((e=Jt)=>{mr=[],Fa(e,mr)},"reset"),Nb={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pc={},Pb=p(e=>{Pc[e]||(D.warn(Nb[e]),Pc[e]=!0)},"issueWarning"),Cu=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Pb("LAZY_LOAD_DEPRECATED")},"checkConfig"),zb=p(()=>{let e={};Zn&&(e=kt(e,Zn));for(const t of mr)e=kt(e,t);return e},"getUserDefinedConfig"),si=/<br\s*\/?>/gi,qb=p(e=>e?Tu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Hb=(()=>{let e=!1;return()=>{e||(ku(),e=!0)}})();function ku(){const e="data-temp-href-target";Zr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Zr.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(ku,"setupDompurifyHooks");var Su=p(e=>(Hb(),Zr.sanitize(e)),"removeScript"),zc=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Su(e):r!=="loose"&&(e=Tu(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Yb(e))}return e},"sanitizeMore"),re=p((e,t)=>e&&(t.dompurifyConfig?e=Zr.sanitize(zc(e,t),t.dompurifyConfig).toString():e=Zr.sanitize(zc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Wb=p((e,t)=>typeof e=="string"?re(e,t):e.flat().map(r=>re(r,t)),"sanitizeTextOrArray"),jb=p(e=>si.test(e),"hasBreaks"),Ub=p(e=>e.split(si),"splitBreaks"),Yb=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Tu=p(e=>e.replace(si,"#br#"),"breakToPlaceholder"),Au=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"),St=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Gb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Vb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ws=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];Xb(a,o)&&(n=a+","+o,i++,r.pop())}r.push(Zb(n))}return r.join("")},"parseGenericTypes"),js=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Xb=p((e,t)=>{const r=js(e,"~"),i=js(t,"~");return r===1&&i===1},"shouldCombineSets"),Zb=p(e=>{const t=js(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),qc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Us=/\$\$(.*)\$\$/g,yr=p(e=>(e.match(Us)?.length??0)>0,"hasKatex"),Kb=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ra(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Qb=p(async(e,t)=>{if(!yr(e))return e;if(!(qc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Us,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DEiiRhcn.cjs")),i=t.forceLegacyMathML||!qc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(si).map(n=>yr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Us,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ra=p(async(e,t)=>re(await Qb(e,t),t),"renderKatexSanitized"),Cr={getRows:qb,sanitizeText:re,sanitizeTextOrArray:Wb,hasBreaks:jb,splitBreaks:Ub,lineBreakRegex:si,removeScript:Su,getUrl:Au,evaluate:St,getMax:Gb,getMin:Vb},Jb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),tx=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"),Vo=p(function(e,t,r,i){const n=tx(t,r,i);Jb(e,n)},"configureSvgSize"),Eu=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;D.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;D.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,D.info(`Calculated bounds: ${s}x${l}`),Vo(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Nn={},ex=p((e,t,r)=>{let i="";return e in Nn&&Nn[e]?i=Nn[e](r):D.warn(`No theme found for ${e}`),` & {
54
54
  font-family: ${r.fontFamily};
55
55
  font-size: ${r.fontSize};
56
56
  fill: ${r.textColor}
@@ -126,48 +126,48 @@
126
126
  ${i}
127
127
 
128
128
  ${t}
129
- `},"getStyles"),ex=p((e,t)=>{t!==void 0&&(Nn[e]=t)},"addStylesForDiagram"),rx=tx,Xo={};au(Xo,{clear:()=>Eu,getAccDescription:()=>$u,getAccTitle:()=>Bu,getDiagramTitle:()=>Ru,setAccDescription:()=>Mu,setAccTitle:()=>Lu,setDiagramTitle:()=>Fu});var Zo="",Ko="",Qo="",Jo=p(e=>re(e,Ot()),"sanitizeText"),Eu=p(()=>{Zo="",Qo="",Ko=""},"clear"),Lu=p(e=>{Zo=Jo(e).replace(/^\s+/g,"")},"setAccTitle"),Bu=p(()=>Zo,"getAccTitle"),Mu=p(e=>{Qo=Jo(e).replace(/\n\s+/g,`
130
- `)},"setAccDescription"),$u=p(()=>Qo,"getAccDescription"),Fu=p(e=>{Ko=Jo(e)},"setDiagramTitle"),Ru=p(()=>Ko,"getDiagramTitle"),Hc=D,ix=Uo,ft=Ot,nx=vu,ax=Kr,tl=p(e=>re(e,ft()),"sanitizeText"),Ou=Au,sx=p(()=>Xo,"getCommonDb"),Qn={},Jn=p((e,t,r)=>{Qn[e]&&Hc.warn(`Diagram with id ${e} already registered. Overwriting.`),Qn[e]=t,r&&gu(e,r),ex(e,t.styles),t.injectUtils?.(Hc,ix,ft,tl,Ou,sx(),()=>{})},"registerDiagram"),Ys=p(e=>{if(e in Qn)return Qn[e];throw new ox(e)},"getDiagram"),Vr,ox=(Vr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Vr,"DiagramNotFoundError"),Vr),lx={value:()=>{}};function Iu(){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 Pn(r)}function Pn(e){this._=e}function cx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Pn.prototype=Iu.prototype={constructor:Pn,on:function(e,t){var r=this._,i=cx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=hx(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=Wc(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Wc(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Pn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[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],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function hx(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Wc(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=lx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Gs="http://www.w3.org/1999/xhtml";const jc={svg:"http://www.w3.org/2000/svg",xhtml:Gs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),jc.hasOwnProperty(t)?{space:jc[t],local:e}:e}function ux(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Gs&&t.documentElement.namespaceURI===Gs?t.createElement(e):t.createElementNS(r,e)}}function dx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Du(e){var t=Oa(e);return(t.local?dx:ux)(t)}function fx(){}function el(e){return e==null?fx:function(){return this.querySelector(e)}}function px(e){typeof e!="function"&&(e=el(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new ie(i,this._parents)}function gx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function mx(){return[]}function Nu(e){return e==null?mx:function(){return this.querySelectorAll(e)}}function yx(e){return function(){return gx(e.apply(this,arguments))}}function bx(e){typeof e=="function"?e=yx(e):e=Nu(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new ie(i,n)}function Pu(e){return function(){return this.matches(e)}}function zu(e){return function(t){return t.matches(e)}}var xx=Array.prototype.find;function vx(e){return function(){return xx.call(this.children,e)}}function wx(){return this.firstElementChild}function _x(e){return this.select(e==null?wx:vx(typeof e=="function"?e:zu(e)))}var Cx=Array.prototype.filter;function kx(){return Array.from(this.children)}function Sx(e){return function(){return Cx.call(this.children,e)}}function Tx(e){return this.selectAll(e==null?kx:Sx(typeof e=="function"?e:zu(e)))}function Ax(e){typeof e!="function"&&(e=Pu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new ie(i,this._parents)}function qu(e){return new Array(e.length)}function Ex(){return new ie(this._enter||this._groups.map(qu),this._parents)}function ta(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ta.prototype={constructor:ta,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 Lx(e){return function(){return e}}function Bx(e,t,r,i,n,a){for(var o=0,s,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new ta(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function Mx(e,t,r,i,n,a,o){var s,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(s=0;s<h;++s)(l=t[s])&&(d[s]=f=o.call(l,l.__data__,s,t)+"",c.has(f)?n[s]=l:c.set(f,l));for(s=0;s<u;++s)f=o.call(e,a[s],s,a)+"",(l=c.get(f))?(i[s]=l,l.__data__=a[s],c.delete(f)):r[s]=new ta(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(d[s])===l&&(n[s]=l)}function $x(e){return e.__data__}function Fx(e,t){if(!arguments.length)return Array.from(this,$x);var r=t?Mx:Bx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Lx(e));for(var a=n.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=Rx(e.call(h,h&&h.__data__,c,i)),g=f.length,m=s[c]=new Array(g),b=o[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,b,x,f,t);for(var y=0,v=0,_,w;y<g;++y)if(_=m[y]){for(y>=v&&(v=y+1);!(w=b[v])&&++v<g;);_._next=w||null}}return o=new ie(o,i),o._enter=s,o._exit=l,o}function Rx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ox(){return new ie(this._exit||this._groups.map(qu),this._parents)}function Ix(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function Dx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,d=s[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)s[l]=r[l];return new ie(s,this._parents)}function Nx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Px(e){e||(e=zx);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,l=n[a]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new ie(n,this._parents).order()}function zx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Hx(){return Array.from(this)}function Wx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function jx(){let e=0;for(const t of this)++e;return e}function Ux(){return!this.node()}function Yx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function Gx(e){return function(){this.removeAttribute(e)}}function Vx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xx(e,t){return function(){this.setAttribute(e,t)}}function Zx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Qx(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 Jx(e,t){var r=Oa(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?Vx:Gx:typeof t=="function"?r.local?Qx:Kx:r.local?Zx:Xx)(r,t))}function Hu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function t1(e){return function(){this.style.removeProperty(e)}}function e1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function r1(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function i1(e,t,r){return arguments.length>1?this.each((t==null?t1:typeof t=="function"?r1:e1)(e,t,r??"")):Qr(this.node(),e)}function Qr(e,t){return e.style.getPropertyValue(t)||Hu(e).getComputedStyle(e,null).getPropertyValue(t)}function n1(e){return function(){delete this[e]}}function a1(e,t){return function(){this[e]=t}}function s1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function o1(e,t){return arguments.length>1?this.each((t==null?n1:typeof t=="function"?s1:a1)(e,t)):this.node()[e]}function Wu(e){return e.trim().split(/^|\s+/)}function rl(e){return e.classList||new ju(e)}function ju(e){this._node=e,this._names=Wu(e.getAttribute("class")||"")}ju.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 Uu(e,t){for(var r=rl(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Yu(e,t){for(var r=rl(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function l1(e){return function(){Uu(this,e)}}function c1(e){return function(){Yu(this,e)}}function h1(e,t){return function(){(t.apply(this,arguments)?Uu:Yu)(this,e)}}function u1(e,t){var r=Wu(e+"");if(arguments.length<2){for(var i=rl(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?h1:t?l1:c1)(r,t))}function d1(){this.textContent=""}function f1(e){return function(){this.textContent=e}}function p1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function g1(e){return arguments.length?this.each(e==null?d1:(typeof e=="function"?p1:f1)(e)):this.node().textContent}function m1(){this.innerHTML=""}function y1(e){return function(){this.innerHTML=e}}function b1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function x1(e){return arguments.length?this.each(e==null?m1:(typeof e=="function"?b1:y1)(e)):this.node().innerHTML}function v1(){this.nextSibling&&this.parentNode.appendChild(this)}function w1(){return this.each(v1)}function _1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C1(){return this.each(_1)}function k1(e){var t=typeof e=="function"?e:Du(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function S1(){return null}function T1(e,t){var r=typeof e=="function"?e:Du(e),i=t==null?S1:typeof t=="function"?t:el(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function A1(){var e=this.parentNode;e&&e.removeChild(this)}function E1(){return this.each(A1)}function L1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function B1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M1(e){return this.select(e?B1:L1)}function $1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function F1(e){return function(t){e.call(this,t,this.__data__)}}function R1(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 O1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function I1(e,t,r){return function(){var i=this.__on,n,a=F1(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function D1(e,t,r){var i=R1(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(n=0,h=s[l];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?I1:O1,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Gu(e,t,r){var i=Hu(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function N1(e,t){return function(){return Gu(this,e,t)}}function P1(e,t){return function(){return Gu(this,e,t.apply(this,arguments))}}function z1(e,t){return this.each((typeof t=="function"?P1:N1)(e,t))}function*q1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Vu=[null];function ie(e,t){this._groups=e,this._parents=t}function ln(){return new ie([[document.documentElement]],Vu)}function H1(){return this}ie.prototype=ln.prototype={constructor:ie,select:px,selectAll:bx,selectChild:_x,selectChildren:Tx,filter:Ax,data:Fx,enter:Ex,exit:Ox,join:Ix,merge:Dx,selection:H1,order:Nx,sort:Px,call:qx,nodes:Hx,node:Wx,size:jx,empty:Ux,each:Yx,attr:Jx,style:i1,property:o1,classed:u1,text:g1,html:x1,raise:w1,lower:C1,append:k1,insert:T1,remove:E1,clone:M1,datum:$1,on:D1,dispatch:z1,[Symbol.iterator]:q1};function dt(e){return typeof e=="string"?new ie([[document.querySelector(e)]],[document.documentElement]):new ie([[e]],Vu)}function Ia(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function il(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function oi(){}var Yi=.7,ea=1/Yi,zr="\\s*([+-]?\\d+)\\s*",Gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W1=/^#([0-9a-f]{3,8})$/,j1=new RegExp(`^rgb\\(${zr},${zr},${zr}\\)$`),U1=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),Y1=new RegExp(`^rgba\\(${zr},${zr},${zr},${Gi}\\)$`),G1=new RegExp(`^rgba\\(${xe},${xe},${xe},${Gi}\\)$`),V1=new RegExp(`^hsl\\(${Gi},${xe},${xe}\\)$`),X1=new RegExp(`^hsla\\(${Gi},${xe},${xe},${Gi}\\)$`),Uc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ia(oi,Jr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yc,formatHex:Yc,formatHex8:Z1,formatHsl:K1,formatRgb:Gc,toString:Gc});function Yc(){return this.rgb().formatHex()}function Z1(){return this.rgb().formatHex8()}function K1(){return Zu(this).formatHsl()}function Gc(){return this.rgb().formatRgb()}function Jr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=W1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Vc(t):r===3?new Yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Sn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=j1.exec(e))?new Yt(t[1],t[2],t[3],1):(t=U1.exec(e))?new Yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Y1.exec(e))?Sn(t[1],t[2],t[3],t[4]):(t=G1.exec(e))?Sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=V1.exec(e))?Kc(t[1],t[2]/100,t[3]/100,1):(t=X1.exec(e))?Kc(t[1],t[2]/100,t[3]/100,t[4]):Uc.hasOwnProperty(e)?Vc(Uc[e]):e==="transparent"?new Yt(NaN,NaN,NaN,0):null}function Vc(e){return new Yt(e>>16&255,e>>8&255,e&255,1)}function Sn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Yt(e,t,r,i)}function Xu(e){return e instanceof oi||(e=Jr(e)),e?(e=e.rgb(),new Yt(e.r,e.g,e.b,e.opacity)):new Yt}function Vs(e,t,r,i){return arguments.length===1?Xu(e):new Yt(e,t,r,i??1)}function Yt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ia(Yt,Vs,il(oi,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yt(fr(this.r),fr(this.g),fr(this.b),ra(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xc,formatHex:Xc,formatHex8:Q1,formatRgb:Zc,toString:Zc}));function Xc(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}`}function Q1(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zc(){const e=ra(this.opacity);return`${e===1?"rgb(":"rgba("}${fr(this.r)}, ${fr(this.g)}, ${fr(this.b)}${e===1?")":`, ${e})`}`}function ra(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cr(e){return e=fr(e),(e<16?"0":"")+e.toString(16)}function Kc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function Zu(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof oi||(e=Jr(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new ce(o,s,l,e.opacity)}function J1(e,t,r,i){return arguments.length===1?Zu(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Ia(ce,J1,il(oi,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Yt(Cs(e>=240?e-240:e+120,n,i),Cs(e,n,i),Cs(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(Qc(this.h),Tn(this.s),Tn(this.l),ra(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ra(this.opacity);return`${e===1?"hsl(":"hsla("}${Qc(this.h)}, ${Tn(this.s)*100}%, ${Tn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Qc(e){return e=(e||0)%360,e<0?e+360:e}function Tn(e){return Math.max(0,Math.min(1,e||0))}function Cs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Da=e=>()=>e;function Ku(e,t){return function(r){return e+r*t}}function tv(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function ev(e,t){var r=t-e;return r?Ku(e,r>180||r<-180?r-360*Math.round(r/360):r):Da(isNaN(e)?t:e)}function rv(e){return(e=+e)==1?nl:function(t,r){return r-t?tv(t,r,e):Da(isNaN(t)?r:t)}}function nl(e,t){var r=t-e;return r?Ku(e,r):Da(isNaN(e)?t:e)}const Xs=(function e(t){var r=rv(t);function i(n,a){var o=r((n=Vs(n)).r,(a=Vs(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=nl(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function Fe(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Zs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ks=new RegExp(Zs.source,"g");function iv(e){return function(){return e}}function nv(e){return function(t){return e(t)+""}}function Qu(e,t){var r=Zs.lastIndex=ks.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Zs.exec(e))&&(n=ks.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Fe(i,n)})),r=ks.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?nv(l[0].x):iv(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)s[(u=l[h]).i]=u.x(c);return s.join("")})}var Jc=180/Math.PI,Ks={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ju(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Jc,skewX:Math.atan(l)*Jc,scaleX:o,scaleY:s}}var An;function av(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ks:Ju(t.a,t.b,t.c,t.d,t.e,t.f)}function sv(e){return e==null||(An||(An=document.createElementNS("http://www.w3.org/2000/svg","g")),An.setAttribute("transform",e),!(e=An.transform.baseVal.consolidate()))?Ks:(e=e.matrix,Ju(e.a,e.b,e.c,e.d,e.e,e.f))}function td(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:Fe(c,u)},{i:m-2,x:Fe(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function o(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Fe(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Fe(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:Fe(c,u)},{i:m-2,x:Fe(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),o(c.rotate,h.rotate,u,d),s(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,b;++g<m;)u[(b=d[g]).i]=b.x(f);return u.join("")}}}var ov=td(av,"px, ","px)","deg)"),lv=td(sv,", ",")",")"),ti=0,$i=0,ki=0,ed=1e3,ia,Fi,na=0,br=0,Na=0,Vi=typeof performance=="object"&&performance.now?performance:Date,rd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function al(){return br||(rd(cv),br=Vi.now()+Na)}function cv(){br=0}function aa(){this._call=this._time=this._next=null}aa.prototype=id.prototype={constructor:aa,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?al():+r)+(t==null?0:+t),!this._next&&Fi!==this&&(Fi?Fi._next=this:ia=this,Fi=this),this._call=e,this._time=r,Qs()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qs())}};function id(e,t,r){var i=new aa;return i.restart(e,t,r),i}function hv(){al(),++ti;for(var e=ia,t;e;)(t=br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ti}function th(){br=(na=Vi.now())+Na,ti=$i=0;try{hv()}finally{ti=0,dv(),br=0}}function uv(){var e=Vi.now(),t=e-na;t>ed&&(Na-=t,na=e)}function dv(){for(var e,t=ia,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:ia=r);Fi=e,Qs(i)}function Qs(e){if(!ti){$i&&($i=clearTimeout($i));var t=e-br;t>24?(e<1/0&&($i=setTimeout(th,e-Vi.now()-Na)),ki&&(ki=clearInterval(ki))):(ki||(na=Vi.now(),ki=setInterval(uv,ed)),ti=1,rd(th))}}function eh(e,t,r){var i=new aa;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var fv=Iu("start","end","cancel","interrupt"),pv=[],nd=0,rh=1,Js=2,zn=3,ih=4,to=5,qn=6;function Pa(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;gv(e,r,{name:t,index:i,group:n,on:fv,tween:pv,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:nd})}function sl(e,t){var r=fe(e,t);if(r.state>nd)throw new Error("too late; already scheduled");return r}function _e(e,t){var r=fe(e,t);if(r.state>zn)throw new Error("too late; already running");return r}function fe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function gv(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=id(a,0,r.time);function a(c){r.state=rh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,d,f;if(r.state!==rh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===zn)return eh(o);f.state===ih?(f.state=qn,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=qn,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(eh(function(){r.state===zn&&(r.state=ih,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Js,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Js){for(r.state=zn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=to,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===to&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=qn,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function mv(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>Js&&i.state<to,i.state=qn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function yv(e){return this.each(function(){mv(this,e)})}function bv(e,t){var r,i;return function(){var n=_e(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function xv(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=_e(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=s;break}l===c&&n.push(s)}a.tween=n}}function vv(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=fe(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?bv:xv)(r,e,t))}function ol(e,t,r){var i=e._id;return e.each(function(){var n=_e(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return fe(n,i).value[t]}}function ad(e,t){var r;return(typeof t=="number"?Fe:t instanceof Jr?Xs:(r=Jr(t))?(t=r,Xs):Qu)(e,t)}function wv(e){return function(){this.removeAttribute(e)}}function _v(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cv(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function kv(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function Sv(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function Tv(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function Av(e,t){var r=Oa(e),i=r==="transform"?lv:ad;return this.attrTween(e,typeof t=="function"?(r.local?Tv:Sv)(r,i,ol(this,"attr."+e,t)):t==null?(r.local?_v:wv)(r):(r.local?kv:Cv)(r,i,t))}function Ev(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Lv(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Bv(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Lv(e,a)),r}return n._value=t,n}function Mv(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ev(e,a)),r}return n._value=t,n}function $v(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=Oa(e);return this.tween(r,(i.local?Bv:Mv)(i,t))}function Fv(e,t){return function(){sl(this,e).delay=+t.apply(this,arguments)}}function Rv(e,t){return t=+t,function(){sl(this,e).delay=t}}function Ov(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fv:Rv)(t,e)):fe(this.node(),t).delay}function Iv(e,t){return function(){_e(this,e).duration=+t.apply(this,arguments)}}function Dv(e,t){return t=+t,function(){_e(this,e).duration=t}}function Nv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Iv:Dv)(t,e)):fe(this.node(),t).duration}function Pv(e,t){if(typeof t!="function")throw new Error;return function(){_e(this,e).ease=t}}function zv(e){var t=this._id;return arguments.length?this.each(Pv(t,e)):fe(this.node(),t).ease}function qv(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;_e(this,e).ease=r}}function Hv(e){if(typeof e!="function")throw new Error;return this.each(qv(this._id,e))}function Wv(e){typeof e!="function"&&(e=Pu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Ne(i,this._parents,this._name,this._id)}function jv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;s<i;++s)o[s]=t[s];return new Ne(o,this._parents,this._name,this._id)}function Uv(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 Yv(e,t,r){var i,n,a=Uv(t)?sl:_e;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function Gv(e,t){var r=this._id;return arguments.length<2?fe(this.node(),r).on.on(e):this.each(Yv(r,e,t))}function Vv(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Xv(){return this.on("end.remove",Vv(this._id))}function Zv(e){var t=this._name,r=this._id;typeof e!="function"&&(e=el(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],l=s.length,c=a[o]=new Array(l),h,u,d=0;d<l;++d)(h=s[d])&&(u=e.call(h,h.__data__,d,s))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,Pa(c[d],t,r,d,c,fe(h,r)));return new Ne(a,this._parents,t,r)}function Kv(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Nu(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=fe(h,r),m=0,b=d.length;m<b;++m)(f=d[m])&&Pa(f,t,r,m,d,g);a.push(d),o.push(h)}return new Ne(a,o,t,r)}var Qv=ln.prototype.constructor;function Jv(){return new Qv(this._groups,this._parents)}function tw(e,t){var r,i,n;return function(){var a=Qr(this,e),o=(this.style.removeProperty(e),Qr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function sd(e){return function(){this.style.removeProperty(e)}}function ew(e,t,r){var i,n=r+"",a;return function(){var o=Qr(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function rw(e,t,r){var i,n,a;return function(){var o=Qr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Qr(this,e))),o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s))}}function iw(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var l=_e(this,e),c=l.on,h=l.value[a]==null?s||(s=sd(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function nw(e,t,r){var i=(e+="")=="transform"?ov:ad;return t==null?this.styleTween(e,tw(e,i)).on("end.style."+e,sd(e)):typeof t=="function"?this.styleTween(e,rw(e,i,ol(this,"style."+e,t))).each(iw(this._id,e)):this.styleTween(e,ew(e,i,t),r).on("end.style."+e,null)}function aw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function sw(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&aw(e,o,r)),i}return a._value=t,a}function ow(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,sw(e,t,r??""))}function lw(e){return function(){this.textContent=e}}function cw(e){return function(){var t=e(this);this.textContent=t??""}}function hw(e){return this.tween("text",typeof e=="function"?cw(ol(this,"text",e)):lw(e==null?"":e+""))}function uw(e){return function(t){this.textContent=e.call(this,t)}}function dw(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&uw(n)),t}return i._value=e,i}function fw(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,dw(e))}function pw(){for(var e=this._name,t=this._id,r=od(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=fe(l,t);Pa(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ne(i,this._parents,e,r)}function gw(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--n===0&&a()}};r.each(function(){var c=_e(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),n===0&&a()})}var mw=0;function Ne(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function od(){return++mw}var Le=ln.prototype;Ne.prototype={constructor:Ne,select:Zv,selectAll:Kv,selectChild:Le.selectChild,selectChildren:Le.selectChildren,filter:Wv,merge:jv,selection:Jv,transition:pw,call:Le.call,nodes:Le.nodes,node:Le.node,size:Le.size,empty:Le.empty,each:Le.each,on:Gv,attr:Av,attrTween:$v,style:nw,styleTween:ow,text:hw,textTween:fw,remove:Xv,tween:vv,delay:Ov,duration:Nv,ease:zv,easeVarying:Hv,end:gw,[Symbol.iterator]:Le[Symbol.iterator]};function yw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bw={time:null,delay:0,duration:250,ease:yw};function xw(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 vw(e){var t,r;e instanceof Ne?(t=e._id,e=e._name):(t=od(),(r=bw).time=al(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&Pa(l,e,t,c,o,r||xw(l,t));return new Ne(i,this._parents,e,t)}ln.prototype.interrupt=yv;ln.prototype.transition=vw;const eo=Math.PI,ro=2*eo,ar=1e-6,ww=ro-ar;function ld(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function _w(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ld;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class Cw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ld:_w(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=i-t,c=n-r,h=o-t,u=s-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ar)if(!(Math.abs(u*l-c*h)>ar)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-o,g=n-s,m=l*l+c*c,b=f*f+g*g,x=Math.sqrt(m),y=Math.sqrt(d),v=a*Math.tan((eo-Math.acos((m+d-b)/(2*x*y)))/2),_=v/y,w=v/x;Math.abs(_-1)>ar&&this._append`L${t+_*h},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,d=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ar||Math.abs(this._y1-h)>ar)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%ro+ro),d>ww?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>ar&&this._append`A${i},${i},0,${+(d>=eo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function sr(e){return function(){return e}}const kw=Math.abs,Sw=Math.atan2,Tw=Math.cos,Aw=Math.max,Ew=Math.min,Lw=Math.sin,Bw=Math.sqrt,io=1e-12,za=Math.PI,no=za/2,Mw=2*za;function $w(e){return e>1?0:e<-1?za:Math.acos(e)}function Fw(e){return e>=1?no:e<=-1?-no:Math.asin(e)}function cd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Cw(t)}function hd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ud(e){this._context=e}ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function sa(e){return new ud(e)}function Rw(e){return e[0]}function Ow(e){return e[1]}function dd(e,t){var r=sr(!0),i=null,n=sa,a=null,o=cd(s);e=typeof e=="function"?e:e===void 0?Rw:sr(e),t=typeof t=="function"?t:t===void 0?Ow:sr(t);function s(l){var c,h=(l=hd(l)).length,u,d=!1,f;for(i==null&&(a=n(f=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:sr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:sr(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:sr(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),s):i},s}class fd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function pd(e){return new fd(e,!0)}function gd(e){return new fd(e,!1)}function Ge(){}function oa(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function qa(e){this._context=e}qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:oa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wi(e){return new qa(e)}function md(e){this._context=e}md.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iw(e){return new md(e)}function yd(e){this._context=e}yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dw(e){return new yd(e)}function bd(e,t){this._basis=new qa(e),this._beta=t}bd.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],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Nw=(function e(t){function r(i){return t===1?new qa(i):new bd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function la(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 ll(e,t){this._context=e,this._k=(1-t)/6}ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:la(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:la(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 xd=(function e(t){function r(i){return new ll(i,t)}return r.tension=function(i){return e(+i)},r})(0);function cl(e,t){this._context=e,this._k=(1-t)/6}cl.prototype={areaStart:Ge,areaEnd:Ge,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:la(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 Pw=(function e(t){function r(i){return new cl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function hl(e,t){this._context=e,this._k=(1-t)/6}hl.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:la(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 zw=(function e(t){function r(i){return new hl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ul(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>io){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>io){var c=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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function vd(e,t){this._context=e,this._alpha=t}vd.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:ul(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 wd=(function e(t){function r(i){return t?new vd(i,t):new ll(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function _d(e,t){this._context=e,this._alpha=t}_d.prototype={areaStart:Ge,areaEnd:Ge,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:ul(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 qw=(function e(t){function r(i){return t?new _d(i,t):new cl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cd(e,t){this._context=e,this._alpha=t}Cd.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:ul(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 Hw=(function e(t){function r(i){return t?new Cd(i,t):new hl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function kd(e){this._context=e}kd.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ww(e){return new kd(e)}function nh(e){return e<0?-1:1}function ah(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(nh(a)+nh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function sh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ss(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ca(e){this._context=e}ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ss(this,this._t0,sh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ss(this,sh(this,r=ah(this,e,t)),r);break;default:Ss(this,this._t0,r=ah(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Sd(e){this._context=new Td(e)}(Sd.prototype=Object.create(ca.prototype)).point=function(e,t){ca.prototype.point.call(this,t,e)};function Td(e){this._context=e}Td.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Ad(e){return new ca(e)}function Ed(e){return new Sd(e)}function Ld(e){this._context=e}Ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=oh(e),n=oh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function oh(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Bd(e){return new Ld(e)}function Ha(e,t){this._context=e,this._t=t}Ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Md(e){return new Ha(e,.5)}function $d(e){return new Ha(e,0)}function Fd(e){return new Ha(e,1)}function Ri(e,t,r){this.k=e,this.x=t,this.y=r}Ri.prototype={constructor:Ri,scale:function(e){return e===1?this:new Ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ri(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+")"}};Ri.prototype;var Rd=p(e=>{const{securityLevel:t}=ft();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`).node()?.contentDocument??document;r=dt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function dl(e){return typeof e>"u"||e===null}p(dl,"isNothing");function Od(e){return typeof e=="object"&&e!==null}p(Od,"isObject");function Id(e){return Array.isArray(e)?e:dl(e)?[]:[e]}p(Id,"toArray");function Dd(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Dd,"extend");function Nd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Nd,"repeat");function Pd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Pd,"isNegativeZero");var jw=dl,Uw=Od,Yw=Id,Gw=Nd,Vw=Pd,Xw=Dd,Et={isNothing:jw,isObject:Uw,toArray:Yw,repeat:Gw,isNegativeZero:Vw,extend:Xw};function fl(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+=`
129
+ `},"getStyles"),rx=p((e,t)=>{t!==void 0&&(Nn[e]=t)},"addStylesForDiagram"),ix=ex,Xo={};su(Xo,{clear:()=>Lu,getAccDescription:()=>Fu,getAccTitle:()=>Mu,getDiagramTitle:()=>Ou,setAccDescription:()=>$u,setAccTitle:()=>Bu,setDiagramTitle:()=>Ru});var Zo="",Ko="",Qo="",Jo=p(e=>re(e,Ot()),"sanitizeText"),Lu=p(()=>{Zo="",Qo="",Ko=""},"clear"),Bu=p(e=>{Zo=Jo(e).replace(/^\s+/g,"")},"setAccTitle"),Mu=p(()=>Zo,"getAccTitle"),$u=p(e=>{Qo=Jo(e).replace(/\n\s+/g,`
130
+ `)},"setAccDescription"),Fu=p(()=>Qo,"getAccDescription"),Ru=p(e=>{Ko=Jo(e)},"setDiagramTitle"),Ou=p(()=>Ko,"getDiagramTitle"),Hc=D,nx=Uo,ft=Ot,ax=wu,sx=Kr,tl=p(e=>re(e,ft()),"sanitizeText"),Iu=Eu,ox=p(()=>Xo,"getCommonDb"),Qn={},Jn=p((e,t,r)=>{Qn[e]&&Hc.warn(`Diagram with id ${e} already registered. Overwriting.`),Qn[e]=t,r&&mu(e,r),rx(e,t.styles),t.injectUtils?.(Hc,nx,ft,tl,Iu,ox(),()=>{})},"registerDiagram"),Ys=p(e=>{if(e in Qn)return Qn[e];throw new lx(e)},"getDiagram"),Vr,lx=(Vr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Vr,"DiagramNotFoundError"),Vr),cx={value:()=>{}};function Du(){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 Pn(r)}function Pn(e){this._=e}function hx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Pn.prototype=Du.prototype={constructor:Pn,on:function(e,t){var r=this._,i=hx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=ux(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=Wc(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Wc(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Pn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[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],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function ux(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Wc(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=cx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Gs="http://www.w3.org/1999/xhtml";const jc={svg:"http://www.w3.org/2000/svg",xhtml:Gs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),jc.hasOwnProperty(t)?{space:jc[t],local:e}:e}function dx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Gs&&t.documentElement.namespaceURI===Gs?t.createElement(e):t.createElementNS(r,e)}}function fx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nu(e){var t=Oa(e);return(t.local?fx:dx)(t)}function px(){}function el(e){return e==null?px:function(){return this.querySelector(e)}}function gx(e){typeof e!="function"&&(e=el(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new ie(i,this._parents)}function mx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yx(){return[]}function Pu(e){return e==null?yx:function(){return this.querySelectorAll(e)}}function bx(e){return function(){return mx(e.apply(this,arguments))}}function xx(e){typeof e=="function"?e=bx(e):e=Pu(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new ie(i,n)}function zu(e){return function(){return this.matches(e)}}function qu(e){return function(t){return t.matches(e)}}var vx=Array.prototype.find;function wx(e){return function(){return vx.call(this.children,e)}}function _x(){return this.firstElementChild}function Cx(e){return this.select(e==null?_x:wx(typeof e=="function"?e:qu(e)))}var kx=Array.prototype.filter;function Sx(){return Array.from(this.children)}function Tx(e){return function(){return kx.call(this.children,e)}}function Ax(e){return this.selectAll(e==null?Sx:Tx(typeof e=="function"?e:qu(e)))}function Ex(e){typeof e!="function"&&(e=zu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new ie(i,this._parents)}function Hu(e){return new Array(e.length)}function Lx(){return new ie(this._enter||this._groups.map(Hu),this._parents)}function ta(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ta.prototype={constructor:ta,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 Bx(e){return function(){return e}}function Mx(e,t,r,i,n,a){for(var o=0,s,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new ta(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function $x(e,t,r,i,n,a,o){var s,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(s=0;s<h;++s)(l=t[s])&&(d[s]=f=o.call(l,l.__data__,s,t)+"",c.has(f)?n[s]=l:c.set(f,l));for(s=0;s<u;++s)f=o.call(e,a[s],s,a)+"",(l=c.get(f))?(i[s]=l,l.__data__=a[s],c.delete(f)):r[s]=new ta(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(d[s])===l&&(n[s]=l)}function Fx(e){return e.__data__}function Rx(e,t){if(!arguments.length)return Array.from(this,Fx);var r=t?$x:Mx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Bx(e));for(var a=n.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=Ox(e.call(h,h&&h.__data__,c,i)),g=f.length,m=s[c]=new Array(g),b=o[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,b,x,f,t);for(var y=0,v=0,_,w;y<g;++y)if(_=m[y]){for(y>=v&&(v=y+1);!(w=b[v])&&++v<g;);_._next=w||null}}return o=new ie(o,i),o._enter=s,o._exit=l,o}function Ox(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ix(){return new ie(this._exit||this._groups.map(Hu),this._parents)}function Dx(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function Nx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,d=s[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)s[l]=r[l];return new ie(s,this._parents)}function Px(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function zx(e){e||(e=qx);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,l=n[a]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new ie(n,this._parents).order()}function qx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Wx(){return Array.from(this)}function jx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function Ux(){let e=0;for(const t of this)++e;return e}function Yx(){return!this.node()}function Gx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function Vx(e){return function(){this.removeAttribute(e)}}function Xx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zx(e,t){return function(){this.setAttribute(e,t)}}function Kx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Qx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Jx(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 t1(e,t){var r=Oa(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?Xx:Vx:typeof t=="function"?r.local?Jx:Qx:r.local?Kx:Zx)(r,t))}function Wu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function e1(e){return function(){this.style.removeProperty(e)}}function r1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function i1(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function n1(e,t,r){return arguments.length>1?this.each((t==null?e1:typeof t=="function"?i1:r1)(e,t,r??"")):Qr(this.node(),e)}function Qr(e,t){return e.style.getPropertyValue(t)||Wu(e).getComputedStyle(e,null).getPropertyValue(t)}function a1(e){return function(){delete this[e]}}function s1(e,t){return function(){this[e]=t}}function o1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function l1(e,t){return arguments.length>1?this.each((t==null?a1:typeof t=="function"?o1:s1)(e,t)):this.node()[e]}function ju(e){return e.trim().split(/^|\s+/)}function rl(e){return e.classList||new Uu(e)}function Uu(e){this._node=e,this._names=ju(e.getAttribute("class")||"")}Uu.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 Yu(e,t){for(var r=rl(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Gu(e,t){for(var r=rl(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function c1(e){return function(){Yu(this,e)}}function h1(e){return function(){Gu(this,e)}}function u1(e,t){return function(){(t.apply(this,arguments)?Yu:Gu)(this,e)}}function d1(e,t){var r=ju(e+"");if(arguments.length<2){for(var i=rl(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?u1:t?c1:h1)(r,t))}function f1(){this.textContent=""}function p1(e){return function(){this.textContent=e}}function g1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function m1(e){return arguments.length?this.each(e==null?f1:(typeof e=="function"?g1:p1)(e)):this.node().textContent}function y1(){this.innerHTML=""}function b1(e){return function(){this.innerHTML=e}}function x1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function v1(e){return arguments.length?this.each(e==null?y1:(typeof e=="function"?x1:b1)(e)):this.node().innerHTML}function w1(){this.nextSibling&&this.parentNode.appendChild(this)}function _1(){return this.each(w1)}function C1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function k1(){return this.each(C1)}function S1(e){var t=typeof e=="function"?e:Nu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function T1(){return null}function A1(e,t){var r=typeof e=="function"?e:Nu(e),i=t==null?T1:typeof t=="function"?t:el(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function E1(){var e=this.parentNode;e&&e.removeChild(this)}function L1(){return this.each(E1)}function B1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $1(e){return this.select(e?M1:B1)}function F1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function R1(e){return function(t){e.call(this,t,this.__data__)}}function O1(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 I1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function D1(e,t,r){return function(){var i=this.__on,n,a=R1(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function N1(e,t,r){var i=O1(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(n=0,h=s[l];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?D1:I1,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Vu(e,t,r){var i=Wu(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function P1(e,t){return function(){return Vu(this,e,t)}}function z1(e,t){return function(){return Vu(this,e,t.apply(this,arguments))}}function q1(e,t){return this.each((typeof t=="function"?z1:P1)(e,t))}function*H1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Xu=[null];function ie(e,t){this._groups=e,this._parents=t}function ln(){return new ie([[document.documentElement]],Xu)}function W1(){return this}ie.prototype=ln.prototype={constructor:ie,select:gx,selectAll:xx,selectChild:Cx,selectChildren:Ax,filter:Ex,data:Rx,enter:Lx,exit:Ix,join:Dx,merge:Nx,selection:W1,order:Px,sort:zx,call:Hx,nodes:Wx,node:jx,size:Ux,empty:Yx,each:Gx,attr:t1,style:n1,property:l1,classed:d1,text:m1,html:v1,raise:_1,lower:k1,append:S1,insert:A1,remove:L1,clone:$1,datum:F1,on:N1,dispatch:q1,[Symbol.iterator]:H1};function dt(e){return typeof e=="string"?new ie([[document.querySelector(e)]],[document.documentElement]):new ie([[e]],Xu)}function Ia(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function il(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function oi(){}var Yi=.7,ea=1/Yi,zr="\\s*([+-]?\\d+)\\s*",Gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",j1=/^#([0-9a-f]{3,8})$/,U1=new RegExp(`^rgb\\(${zr},${zr},${zr}\\)$`),Y1=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),G1=new RegExp(`^rgba\\(${zr},${zr},${zr},${Gi}\\)$`),V1=new RegExp(`^rgba\\(${xe},${xe},${xe},${Gi}\\)$`),X1=new RegExp(`^hsl\\(${Gi},${xe},${xe}\\)$`),Z1=new RegExp(`^hsla\\(${Gi},${xe},${xe},${Gi}\\)$`),Uc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ia(oi,Jr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yc,formatHex:Yc,formatHex8:K1,formatHsl:Q1,formatRgb:Gc,toString:Gc});function Yc(){return this.rgb().formatHex()}function K1(){return this.rgb().formatHex8()}function Q1(){return Ku(this).formatHsl()}function Gc(){return this.rgb().formatRgb()}function Jr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=j1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Vc(t):r===3?new Yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Sn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=U1.exec(e))?new Yt(t[1],t[2],t[3],1):(t=Y1.exec(e))?new Yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=G1.exec(e))?Sn(t[1],t[2],t[3],t[4]):(t=V1.exec(e))?Sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=X1.exec(e))?Kc(t[1],t[2]/100,t[3]/100,1):(t=Z1.exec(e))?Kc(t[1],t[2]/100,t[3]/100,t[4]):Uc.hasOwnProperty(e)?Vc(Uc[e]):e==="transparent"?new Yt(NaN,NaN,NaN,0):null}function Vc(e){return new Yt(e>>16&255,e>>8&255,e&255,1)}function Sn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Yt(e,t,r,i)}function Zu(e){return e instanceof oi||(e=Jr(e)),e?(e=e.rgb(),new Yt(e.r,e.g,e.b,e.opacity)):new Yt}function Vs(e,t,r,i){return arguments.length===1?Zu(e):new Yt(e,t,r,i??1)}function Yt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ia(Yt,Vs,il(oi,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yt(fr(this.r),fr(this.g),fr(this.b),ra(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xc,formatHex:Xc,formatHex8:J1,formatRgb:Zc,toString:Zc}));function Xc(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}`}function J1(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zc(){const e=ra(this.opacity);return`${e===1?"rgb(":"rgba("}${fr(this.r)}, ${fr(this.g)}, ${fr(this.b)}${e===1?")":`, ${e})`}`}function ra(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cr(e){return e=fr(e),(e<16?"0":"")+e.toString(16)}function Kc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function Ku(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof oi||(e=Jr(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new ce(o,s,l,e.opacity)}function tv(e,t,r,i){return arguments.length===1?Ku(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Ia(ce,tv,il(oi,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Yt(Cs(e>=240?e-240:e+120,n,i),Cs(e,n,i),Cs(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(Qc(this.h),Tn(this.s),Tn(this.l),ra(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ra(this.opacity);return`${e===1?"hsl(":"hsla("}${Qc(this.h)}, ${Tn(this.s)*100}%, ${Tn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Qc(e){return e=(e||0)%360,e<0?e+360:e}function Tn(e){return Math.max(0,Math.min(1,e||0))}function Cs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Da=e=>()=>e;function Qu(e,t){return function(r){return e+r*t}}function ev(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function rv(e,t){var r=t-e;return r?Qu(e,r>180||r<-180?r-360*Math.round(r/360):r):Da(isNaN(e)?t:e)}function iv(e){return(e=+e)==1?nl:function(t,r){return r-t?ev(t,r,e):Da(isNaN(t)?r:t)}}function nl(e,t){var r=t-e;return r?Qu(e,r):Da(isNaN(e)?t:e)}const Xs=(function e(t){var r=iv(t);function i(n,a){var o=r((n=Vs(n)).r,(a=Vs(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=nl(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function Fe(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Zs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ks=new RegExp(Zs.source,"g");function nv(e){return function(){return e}}function av(e){return function(t){return e(t)+""}}function Ju(e,t){var r=Zs.lastIndex=ks.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Zs.exec(e))&&(n=ks.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Fe(i,n)})),r=ks.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?av(l[0].x):nv(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)s[(u=l[h]).i]=u.x(c);return s.join("")})}var Jc=180/Math.PI,Ks={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function td(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Jc,skewX:Math.atan(l)*Jc,scaleX:o,scaleY:s}}var An;function sv(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ks:td(t.a,t.b,t.c,t.d,t.e,t.f)}function ov(e){return e==null||(An||(An=document.createElementNS("http://www.w3.org/2000/svg","g")),An.setAttribute("transform",e),!(e=An.transform.baseVal.consolidate()))?Ks:(e=e.matrix,td(e.a,e.b,e.c,e.d,e.e,e.f))}function ed(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:Fe(c,u)},{i:m-2,x:Fe(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function o(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:Fe(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:Fe(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:Fe(c,u)},{i:m-2,x:Fe(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),o(c.rotate,h.rotate,u,d),s(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,b;++g<m;)u[(b=d[g]).i]=b.x(f);return u.join("")}}}var lv=ed(sv,"px, ","px)","deg)"),cv=ed(ov,", ",")",")"),ti=0,$i=0,ki=0,rd=1e3,ia,Fi,na=0,br=0,Na=0,Vi=typeof performance=="object"&&performance.now?performance:Date,id=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function al(){return br||(id(hv),br=Vi.now()+Na)}function hv(){br=0}function aa(){this._call=this._time=this._next=null}aa.prototype=nd.prototype={constructor:aa,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?al():+r)+(t==null?0:+t),!this._next&&Fi!==this&&(Fi?Fi._next=this:ia=this,Fi=this),this._call=e,this._time=r,Qs()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qs())}};function nd(e,t,r){var i=new aa;return i.restart(e,t,r),i}function uv(){al(),++ti;for(var e=ia,t;e;)(t=br-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ti}function th(){br=(na=Vi.now())+Na,ti=$i=0;try{uv()}finally{ti=0,fv(),br=0}}function dv(){var e=Vi.now(),t=e-na;t>rd&&(Na-=t,na=e)}function fv(){for(var e,t=ia,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:ia=r);Fi=e,Qs(i)}function Qs(e){if(!ti){$i&&($i=clearTimeout($i));var t=e-br;t>24?(e<1/0&&($i=setTimeout(th,e-Vi.now()-Na)),ki&&(ki=clearInterval(ki))):(ki||(na=Vi.now(),ki=setInterval(dv,rd)),ti=1,id(th))}}function eh(e,t,r){var i=new aa;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var pv=Du("start","end","cancel","interrupt"),gv=[],ad=0,rh=1,Js=2,zn=3,ih=4,to=5,qn=6;function Pa(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;mv(e,r,{name:t,index:i,group:n,on:pv,tween:gv,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ad})}function sl(e,t){var r=fe(e,t);if(r.state>ad)throw new Error("too late; already scheduled");return r}function _e(e,t){var r=fe(e,t);if(r.state>zn)throw new Error("too late; already running");return r}function fe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function mv(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=nd(a,0,r.time);function a(c){r.state=rh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,d,f;if(r.state!==rh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===zn)return eh(o);f.state===ih?(f.state=qn,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=qn,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(eh(function(){r.state===zn&&(r.state=ih,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Js,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Js){for(r.state=zn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=to,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===to&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=qn,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function yv(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>Js&&i.state<to,i.state=qn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function bv(e){return this.each(function(){yv(this,e)})}function xv(e,t){var r,i;return function(){var n=_e(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function vv(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=_e(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=s;break}l===c&&n.push(s)}a.tween=n}}function wv(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=fe(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?xv:vv)(r,e,t))}function ol(e,t,r){var i=e._id;return e.each(function(){var n=_e(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return fe(n,i).value[t]}}function sd(e,t){var r;return(typeof t=="number"?Fe:t instanceof Jr?Xs:(r=Jr(t))?(t=r,Xs):Ju)(e,t)}function _v(e){return function(){this.removeAttribute(e)}}function Cv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kv(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function Sv(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function Tv(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function Av(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function Ev(e,t){var r=Oa(e),i=r==="transform"?cv:sd;return this.attrTween(e,typeof t=="function"?(r.local?Av:Tv)(r,i,ol(this,"attr."+e,t)):t==null?(r.local?Cv:_v)(r):(r.local?Sv:kv)(r,i,t))}function Lv(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Bv(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Mv(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Bv(e,a)),r}return n._value=t,n}function $v(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Lv(e,a)),r}return n._value=t,n}function Fv(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=Oa(e);return this.tween(r,(i.local?Mv:$v)(i,t))}function Rv(e,t){return function(){sl(this,e).delay=+t.apply(this,arguments)}}function Ov(e,t){return t=+t,function(){sl(this,e).delay=t}}function Iv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Rv:Ov)(t,e)):fe(this.node(),t).delay}function Dv(e,t){return function(){_e(this,e).duration=+t.apply(this,arguments)}}function Nv(e,t){return t=+t,function(){_e(this,e).duration=t}}function Pv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Dv:Nv)(t,e)):fe(this.node(),t).duration}function zv(e,t){if(typeof t!="function")throw new Error;return function(){_e(this,e).ease=t}}function qv(e){var t=this._id;return arguments.length?this.each(zv(t,e)):fe(this.node(),t).ease}function Hv(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;_e(this,e).ease=r}}function Wv(e){if(typeof e!="function")throw new Error;return this.each(Hv(this._id,e))}function jv(e){typeof e!="function"&&(e=zu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Ne(i,this._parents,this._name,this._id)}function Uv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;s<i;++s)o[s]=t[s];return new Ne(o,this._parents,this._name,this._id)}function Yv(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 Gv(e,t,r){var i,n,a=Yv(t)?sl:_e;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function Vv(e,t){var r=this._id;return arguments.length<2?fe(this.node(),r).on.on(e):this.each(Gv(r,e,t))}function Xv(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Zv(){return this.on("end.remove",Xv(this._id))}function Kv(e){var t=this._name,r=this._id;typeof e!="function"&&(e=el(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],l=s.length,c=a[o]=new Array(l),h,u,d=0;d<l;++d)(h=s[d])&&(u=e.call(h,h.__data__,d,s))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,Pa(c[d],t,r,d,c,fe(h,r)));return new Ne(a,this._parents,t,r)}function Qv(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Pu(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=fe(h,r),m=0,b=d.length;m<b;++m)(f=d[m])&&Pa(f,t,r,m,d,g);a.push(d),o.push(h)}return new Ne(a,o,t,r)}var Jv=ln.prototype.constructor;function tw(){return new Jv(this._groups,this._parents)}function ew(e,t){var r,i,n;return function(){var a=Qr(this,e),o=(this.style.removeProperty(e),Qr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function od(e){return function(){this.style.removeProperty(e)}}function rw(e,t,r){var i,n=r+"",a;return function(){var o=Qr(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function iw(e,t,r){var i,n,a;return function(){var o=Qr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Qr(this,e))),o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s))}}function nw(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var l=_e(this,e),c=l.on,h=l.value[a]==null?s||(s=od(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function aw(e,t,r){var i=(e+="")=="transform"?lv:sd;return t==null?this.styleTween(e,ew(e,i)).on("end.style."+e,od(e)):typeof t=="function"?this.styleTween(e,iw(e,i,ol(this,"style."+e,t))).each(nw(this._id,e)):this.styleTween(e,rw(e,i,t),r).on("end.style."+e,null)}function sw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function ow(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&sw(e,o,r)),i}return a._value=t,a}function lw(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,ow(e,t,r??""))}function cw(e){return function(){this.textContent=e}}function hw(e){return function(){var t=e(this);this.textContent=t??""}}function uw(e){return this.tween("text",typeof e=="function"?hw(ol(this,"text",e)):cw(e==null?"":e+""))}function dw(e){return function(t){this.textContent=e.call(this,t)}}function fw(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&dw(n)),t}return i._value=e,i}function pw(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,fw(e))}function gw(){for(var e=this._name,t=this._id,r=ld(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=fe(l,t);Pa(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ne(i,this._parents,e,r)}function mw(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--n===0&&a()}};r.each(function(){var c=_e(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),n===0&&a()})}var yw=0;function Ne(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function ld(){return++yw}var Le=ln.prototype;Ne.prototype={constructor:Ne,select:Kv,selectAll:Qv,selectChild:Le.selectChild,selectChildren:Le.selectChildren,filter:jv,merge:Uv,selection:tw,transition:gw,call:Le.call,nodes:Le.nodes,node:Le.node,size:Le.size,empty:Le.empty,each:Le.each,on:Vv,attr:Ev,attrTween:Fv,style:aw,styleTween:lw,text:uw,textTween:pw,remove:Zv,tween:wv,delay:Iv,duration:Pv,ease:qv,easeVarying:Wv,end:mw,[Symbol.iterator]:Le[Symbol.iterator]};function bw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xw={time:null,delay:0,duration:250,ease:bw};function vw(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 ww(e){var t,r;e instanceof Ne?(t=e._id,e=e._name):(t=ld(),(r=xw).time=al(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&Pa(l,e,t,c,o,r||vw(l,t));return new Ne(i,this._parents,e,t)}ln.prototype.interrupt=bv;ln.prototype.transition=ww;const eo=Math.PI,ro=2*eo,ar=1e-6,_w=ro-ar;function cd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Cw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cd;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class kw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?cd:Cw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=i-t,c=n-r,h=o-t,u=s-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ar)if(!(Math.abs(u*l-c*h)>ar)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-o,g=n-s,m=l*l+c*c,b=f*f+g*g,x=Math.sqrt(m),y=Math.sqrt(d),v=a*Math.tan((eo-Math.acos((m+d-b)/(2*x*y)))/2),_=v/y,w=v/x;Math.abs(_-1)>ar&&this._append`L${t+_*h},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,d=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ar||Math.abs(this._y1-h)>ar)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%ro+ro),d>_w?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>ar&&this._append`A${i},${i},0,${+(d>=eo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function sr(e){return function(){return e}}const Sw=Math.abs,Tw=Math.atan2,Aw=Math.cos,Ew=Math.max,Lw=Math.min,Bw=Math.sin,Mw=Math.sqrt,io=1e-12,za=Math.PI,no=za/2,$w=2*za;function Fw(e){return e>1?0:e<-1?za:Math.acos(e)}function Rw(e){return e>=1?no:e<=-1?-no:Math.asin(e)}function hd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new kw(t)}function ud(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dd(e){this._context=e}dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function sa(e){return new dd(e)}function Ow(e){return e[0]}function Iw(e){return e[1]}function fd(e,t){var r=sr(!0),i=null,n=sa,a=null,o=hd(s);e=typeof e=="function"?e:e===void 0?Ow:sr(e),t=typeof t=="function"?t:t===void 0?Iw:sr(t);function s(l){var c,h=(l=ud(l)).length,u,d=!1,f;for(i==null&&(a=n(f=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:sr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:sr(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:sr(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),s):i},s}class pd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function gd(e){return new pd(e,!0)}function md(e){return new pd(e,!1)}function Ge(){}function oa(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function qa(e){this._context=e}qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:oa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wi(e){return new qa(e)}function yd(e){this._context=e}yd.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dw(e){return new yd(e)}function bd(e){this._context=e}bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nw(e){return new bd(e)}function xd(e,t){this._basis=new qa(e),this._beta=t}xd.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],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Pw=(function e(t){function r(i){return t===1?new qa(i):new xd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function la(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 ll(e,t){this._context=e,this._k=(1-t)/6}ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:la(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:la(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 vd=(function e(t){function r(i){return new ll(i,t)}return r.tension=function(i){return e(+i)},r})(0);function cl(e,t){this._context=e,this._k=(1-t)/6}cl.prototype={areaStart:Ge,areaEnd:Ge,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:la(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 zw=(function e(t){function r(i){return new cl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function hl(e,t){this._context=e,this._k=(1-t)/6}hl.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:la(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 qw=(function e(t){function r(i){return new hl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ul(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>io){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>io){var c=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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function wd(e,t){this._context=e,this._alpha=t}wd.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:ul(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 _d=(function e(t){function r(i){return t?new wd(i,t):new ll(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cd(e,t){this._context=e,this._alpha=t}Cd.prototype={areaStart:Ge,areaEnd:Ge,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:ul(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 Hw=(function e(t){function r(i){return t?new Cd(i,t):new cl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function kd(e,t){this._context=e,this._alpha=t}kd.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:ul(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 Ww=(function e(t){function r(i){return t?new kd(i,t):new hl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Sd(e){this._context=e}Sd.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function jw(e){return new Sd(e)}function nh(e){return e<0?-1:1}function ah(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(nh(a)+nh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function sh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ss(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function ca(e){this._context=e}ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ss(this,this._t0,sh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ss(this,sh(this,r=ah(this,e,t)),r);break;default:Ss(this,this._t0,r=ah(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Td(e){this._context=new Ad(e)}(Td.prototype=Object.create(ca.prototype)).point=function(e,t){ca.prototype.point.call(this,t,e)};function Ad(e){this._context=e}Ad.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Ed(e){return new ca(e)}function Ld(e){return new Td(e)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=oh(e),n=oh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function oh(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function Md(e){return new Bd(e)}function Ha(e,t){this._context=e,this._t=t}Ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function $d(e){return new Ha(e,.5)}function Fd(e){return new Ha(e,0)}function Rd(e){return new Ha(e,1)}function Ri(e,t,r){this.k=e,this.x=t,this.y=r}Ri.prototype={constructor:Ri,scale:function(e){return e===1?this:new Ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ri(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+")"}};Ri.prototype;var Od=p(e=>{const{securityLevel:t}=ft();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`).node()?.contentDocument??document;r=dt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function dl(e){return typeof e>"u"||e===null}p(dl,"isNothing");function Id(e){return typeof e=="object"&&e!==null}p(Id,"isObject");function Dd(e){return Array.isArray(e)?e:dl(e)?[]:[e]}p(Dd,"toArray");function Nd(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Nd,"extend");function Pd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Pd,"repeat");function zd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(zd,"isNegativeZero");var Uw=dl,Yw=Id,Gw=Dd,Vw=Pd,Xw=zd,Zw=Nd,Et={isNothing:Uw,isObject:Yw,toArray:Gw,repeat:Vw,isNegativeZero:Xw,extend:Zw};function fl(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+=`
131
131
 
132
- `+e.mark.snippet),i+" "+r):i}p(fl,"formatError");function ei(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=fl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(ei,"YAMLException$1");ei.prototype=Object.create(Error.prototype);ei.prototype.constructor=ei;ei.prototype.toString=p(function(t){return this.name+": "+fl(this,t)},"toString");var te=ei;function Hn(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(Hn,"getLine");function Wn(e,t){return Et.repeat(" ",t-e.length)+e}p(Wn,"padStart");function zd(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],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Hn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=Et.repeat(" ",t.indent)+Wn((e.line-l+1).toString(),h)+" | "+c.str+`
132
+ `+e.mark.snippet),i+" "+r):i}p(fl,"formatError");function ei(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=fl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(ei,"YAMLException$1");ei.prototype=Object.create(Error.prototype);ei.prototype.constructor=ei;ei.prototype.toString=p(function(t){return this.name+": "+fl(this,t)},"toString");var te=ei;function Hn(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(Hn,"getLine");function Wn(e,t){return Et.repeat(" ",t-e.length)+e}p(Wn,"padStart");function qd(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],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=Hn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=Et.repeat(" ",t.indent)+Wn((e.line-l+1).toString(),h)+" | "+c.str+`
133
133
  `+s;for(c=Hn(e.buffer,i[o],n[o],e.position,u),s+=Et.repeat(" ",t.indent)+Wn((e.line+1).toString(),h)+" | "+c.str+`
134
134
  `,s+=Et.repeat("-",t.indent+h+3+c.pos)+`^
135
135
  `,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=Hn(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=Et.repeat(" ",t.indent)+Wn((e.line+l+1).toString(),h)+" | "+c.str+`
136
- `;return s.replace(/\n$/,"")}p(zd,"makeSnippet");var Zw=zd,Kw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Qw=["scalar","sequence","mapping"];function qd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(qd,"compileStyleAliases");function Hd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Kw.indexOf(r)===-1)throw new te('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=qd(t.styleAliases||null),Qw.indexOf(this.kind)===-1)throw new te('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Hd,"Type$1");var zt=Hd;function ao(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(ao,"compileList");function Wd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Wd,"compileMap");function ha(e){return this.extend(e)}p(ha,"Schema$1");ha.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof zt)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 te("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof zt))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new te("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new te("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof zt))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ha.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ao(n,"implicit"),n.compiledExplicit=ao(n,"explicit"),n.compiledTypeMap=Wd(n.compiledImplicit,n.compiledExplicit),n},"extend");var Jw=ha,t2=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),e2=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),r2=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),i2=new Jw({explicit:[t2,e2,r2]});function jd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(jd,"resolveYamlNull");function Ud(){return null}p(Ud,"constructYamlNull");function Yd(e){return e===null}p(Yd,"isNull");var n2=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:jd,construct:Ud,predicate:Yd,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 Gd(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(Gd,"resolveYamlBoolean");function Vd(e){return e==="true"||e==="True"||e==="TRUE"}p(Vd,"constructYamlBoolean");function Xd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Xd,"isBoolean");var a2=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gd,construct:Vd,predicate:Xd,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 Zd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Zd,"isHexCode");function Kd(e){return 48<=e&&e<=55}p(Kd,"isOctCode");function Qd(e){return 48<=e&&e<=57}p(Qd,"isDecCode");function Jd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Zd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Kd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Qd(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(Jd,"resolveYamlInteger");function tf(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(tf,"constructYamlInteger");function ef(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Et.isNegativeZero(e)}p(ef,"isInteger");var s2=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Jd,construct:tf,predicate:ef,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"]}}),o2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function rf(e){return!(e===null||!o2.test(e)||e[e.length-1]==="_")}p(rf,"resolveYamlFloat");function nf(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(nf,"constructYamlFloat");var l2=/^[-+]?[0-9]+e/;function af(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(Et.isNegativeZero(e))return"-0.0";return r=e.toString(10),l2.test(r)?r.replace("e",".e"):r}p(af,"representYamlFloat");function sf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Et.isNegativeZero(e))}p(sf,"isFloat");var c2=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:rf,construct:nf,predicate:sf,represent:af,defaultStyle:"lowercase"}),of=i2.extend({implicit:[n2,a2,s2,c2]}),h2=of,lf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cf=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 hf(e){return e===null?!1:lf.exec(e)!==null||cf.exec(e)!==null}p(hf,"resolveYamlTimestamp");function uf(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,d;if(t=lf.exec(e),t===null&&(t=cf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&d.setTime(d.getTime()-c),d}p(uf,"constructYamlTimestamp");function df(e){return e.toISOString()}p(df,"representYamlTimestamp");var u2=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hf,construct:uf,instanceOf:Date,represent:df});function ff(e){return e==="<<"||e===null}p(ff,"resolveYamlMerge");var d2=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ff}),pl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
- \r`;function pf(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=pl;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(pf,"resolveYamlBinary");function gf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=pl,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%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(gf,"constructYamlBinary");function mf(e){var t="",r=0,i,n,a=e.length,o=pl;for(i=0;i<a;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 n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(mf,"representYamlBinary");function yf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(yf,"isBinary");var f2=new zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pf,construct:gf,predicate:yf,represent:mf}),p2=Object.prototype.hasOwnProperty,g2=Object.prototype.toString;function bf(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,g2.call(n)!=="[object Object]")return!1;for(a in n)if(p2.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(bf,"resolveYamlOmap");function xf(e){return e!==null?e:[]}p(xf,"constructYamlOmap");var m2=new zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:bf,construct:xf}),y2=Object.prototype.toString;function vf(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],y2.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(vf,"resolveYamlPairs");function wf(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(wf,"constructYamlPairs");var b2=new zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:vf,construct:wf}),x2=Object.prototype.hasOwnProperty;function _f(e){if(e===null)return!0;var t,r=e;for(t in r)if(x2.call(r,t)&&r[t]!==null)return!1;return!0}p(_f,"resolveYamlSet");function Cf(e){return e!==null?e:{}}p(Cf,"constructYamlSet");var v2=new zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:_f,construct:Cf}),kf=h2.extend({implicit:[u2,d2],explicit:[f2,m2,b2,v2]}),Ve=Object.prototype.hasOwnProperty,ua=1,Sf=2,Tf=3,da=4,Ts=1,w2=2,lh=3,_2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C2=/[\x85\u2028\u2029]/,k2=/[,\[\]\{\}]/,Af=/^(?:!|!!|![a-z\-]+!)$/i,Ef=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function so(e){return Object.prototype.toString.call(e)}p(so,"_class");function he(e){return e===10||e===13}p(he,"is_EOL");function Ye(e){return e===9||e===32}p(Ye,"is_WHITE_SPACE");function Gt(e){return e===9||e===32||e===10||e===13}p(Gt,"is_WS_OR_EOL");function hr(e){return e===44||e===91||e===93||e===123||e===125}p(hr,"is_FLOW_INDICATOR");function Lf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Lf,"fromHexCode");function Bf(e){return e===120?2:e===117?4:e===85?8:0}p(Bf,"escapedHexLen");function Mf(e){return 48<=e&&e<=57?e-48:-1}p(Mf,"fromDecimalCode");function oo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
138
- `: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(oo,"simpleEscapeSequence");function $f(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p($f,"charFromCodepoint");var Ff=new Array(256),Rf=new Array(256);for(nr=0;nr<256;nr++)Ff[nr]=oo(nr)?1:0,Rf[nr]=oo(nr);var nr;function Of(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||kf,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(Of,"State$1");function gl(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=Zw(r),new te(t,r)}p(gl,"generateError");function tt(e,t){throw gl(e,t)}p(tt,"throwError");function Xi(e,t){e.onWarning&&e.onWarning.call(null,gl(e,t))}p(Xi,"throwWarning");var ch={YAML:p(function(t,r,i){var n,a,o;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Af.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ve.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Ef.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function De(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||tt(e,"expected valid JSON character");else _2.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}p(De,"captureSegment");function lo(e,t,r,i){var n,a,o,s;for(Et.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],Ve.call(t,a)||(t[a]=r[a],i[a]=!0)}p(lo,"mergeMappings");function ur(e,t,r,i,n,a,o,s,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&tt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&so(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&so(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)lo(e,t,a[c],r);else lo(e,t,a,r);else!e.json&&!Ve.call(r,n)&&Ve.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(ur,"storeMappingPair");function Wa(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++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Wa,"readLineBreak");function wt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ye(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(he(n))for(Wa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Xi(e,"deficient indentation"),i}p(wt,"skipSeparationSpace");function cn(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||Gt(r)))}p(cn,"testDocumentSeparator");function ja(e,t){t===1?e.result+=" ":t>1&&(e.result+=Et.repeat(`
139
- `,t-1))}p(ja,"writeFoldedLines");function If(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Gt(f)||hr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),Gt(n)||r&&hr(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),Gt(n)||r&&hr(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Gt(i))break}else{if(e.position===e.lineStart&&cn(e)||r&&hr(f))break;if(he(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,wt(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(De(e,a,o,!1),ja(e,e.line-l),a=o=e.position,s=!1),Ye(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return De(e,a,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(If,"readPlainScalar");function Df(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(De(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else he(r)?(De(e,i,n,!0),ja(e,wt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&cn(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Df,"readSingleQuotedScalar");function Nf(e,t){var r,i,n,a,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 De(e,r,e.position,!0),e.position++,!0;if(s===92){if(De(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),he(s))wt(e,!1,t);else if(s<256&&Ff[s])e.result+=Rf[s],e.position++;else if((o=Bf(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Lf(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=$f(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else he(s)?(De(e,r,i,!0),ja(e,wt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&cn(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Nf,"readDoubleQuotedScalar");function Pf(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,b,x,y;if(y=e.input.charCodeAt(e.position),y===91)h=93,f=!1,s=[];else if(y===123)h=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),y=e.input.charCodeAt(++e.position);y!==0;){if(wt(e,!0,t),y=e.input.charCodeAt(e.position),y===h)return e.position++,e.tag=o,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=s,!0;r?y===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),b=m=x=null,u=d=!1,y===63&&(c=e.input.charCodeAt(e.position+1),Gt(c)&&(u=d=!0,e.position++,wt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,xr(e,t,ua,!1,!0),b=e.tag,m=e.result,wt(e,!0,t),y=e.input.charCodeAt(e.position),(d||e.line===i)&&y===58&&(u=!0,y=e.input.charCodeAt(++e.position),wt(e,!0,t),xr(e,t,ua,!1,!0),x=e.result),f?ur(e,s,g,b,m,x,i,n,a):u?s.push(ur(e,null,g,b,m,x,i,n,a)):s.push(m),wt(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(r=!0,y=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(Pf,"readFlowCollection");function zf(e,t){var r,i,n=Ts,a=!1,o=!1,s=t,l=0,c=!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)Ts===n?n=u===43?lh:w2:tt(e,"repeat of a chomping mode identifier");else if((h=Mf(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?tt(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Ye(u)){do u=e.input.charCodeAt(++e.position);while(Ye(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!he(u)&&u!==0)}for(;u!==0;){for(Wa(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),he(u)){l++;continue}if(e.lineIndent<s){n===lh?e.result+=Et.repeat(`
136
+ `;return s.replace(/\n$/,"")}p(qd,"makeSnippet");var Kw=qd,Qw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Jw=["scalar","sequence","mapping"];function Hd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Hd,"compileStyleAliases");function Wd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Qw.indexOf(r)===-1)throw new te('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=Hd(t.styleAliases||null),Jw.indexOf(this.kind)===-1)throw new te('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Wd,"Type$1");var zt=Wd;function ao(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(ao,"compileList");function jd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(jd,"compileMap");function ha(e){return this.extend(e)}p(ha,"Schema$1");ha.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof zt)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 te("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof zt))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new te("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new te("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof zt))throw new te("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ha.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ao(n,"implicit"),n.compiledExplicit=ao(n,"explicit"),n.compiledTypeMap=jd(n.compiledImplicit,n.compiledExplicit),n},"extend");var t2=ha,e2=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),r2=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),i2=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),n2=new t2({explicit:[e2,r2,i2]});function Ud(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Ud,"resolveYamlNull");function Yd(){return null}p(Yd,"constructYamlNull");function Gd(e){return e===null}p(Gd,"isNull");var a2=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ud,construct:Yd,predicate:Gd,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 Vd(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(Vd,"resolveYamlBoolean");function Xd(e){return e==="true"||e==="True"||e==="TRUE"}p(Xd,"constructYamlBoolean");function Zd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Zd,"isBoolean");var s2=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Vd,construct:Xd,predicate:Zd,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 Kd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Kd,"isHexCode");function Qd(e){return 48<=e&&e<=55}p(Qd,"isOctCode");function Jd(e){return 48<=e&&e<=57}p(Jd,"isDecCode");function tf(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Kd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Qd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Jd(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(tf,"resolveYamlInteger");function ef(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(ef,"constructYamlInteger");function rf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Et.isNegativeZero(e)}p(rf,"isInteger");var o2=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:tf,construct:ef,predicate:rf,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"]}}),l2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function nf(e){return!(e===null||!l2.test(e)||e[e.length-1]==="_")}p(nf,"resolveYamlFloat");function af(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(af,"constructYamlFloat");var c2=/^[-+]?[0-9]+e/;function sf(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(Et.isNegativeZero(e))return"-0.0";return r=e.toString(10),c2.test(r)?r.replace("e",".e"):r}p(sf,"representYamlFloat");function of(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Et.isNegativeZero(e))}p(of,"isFloat");var h2=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:nf,construct:af,predicate:of,represent:sf,defaultStyle:"lowercase"}),lf=n2.extend({implicit:[a2,s2,o2,h2]}),u2=lf,cf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),hf=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 uf(e){return e===null?!1:cf.exec(e)!==null||hf.exec(e)!==null}p(uf,"resolveYamlTimestamp");function df(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,d;if(t=cf.exec(e),t===null&&(t=hf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&d.setTime(d.getTime()-c),d}p(df,"constructYamlTimestamp");function ff(e){return e.toISOString()}p(ff,"representYamlTimestamp");var d2=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:uf,construct:df,instanceOf:Date,represent:ff});function pf(e){return e==="<<"||e===null}p(pf,"resolveYamlMerge");var f2=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:pf}),pl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
+ \r`;function gf(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=pl;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(gf,"resolveYamlBinary");function mf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=pl,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%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(mf,"constructYamlBinary");function yf(e){var t="",r=0,i,n,a=e.length,o=pl;for(i=0;i<a;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 n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(yf,"representYamlBinary");function bf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(bf,"isBinary");var p2=new zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gf,construct:mf,predicate:bf,represent:yf}),g2=Object.prototype.hasOwnProperty,m2=Object.prototype.toString;function xf(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,m2.call(n)!=="[object Object]")return!1;for(a in n)if(g2.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(xf,"resolveYamlOmap");function vf(e){return e!==null?e:[]}p(vf,"constructYamlOmap");var y2=new zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xf,construct:vf}),b2=Object.prototype.toString;function wf(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],b2.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(wf,"resolveYamlPairs");function _f(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(_f,"constructYamlPairs");var x2=new zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:wf,construct:_f}),v2=Object.prototype.hasOwnProperty;function Cf(e){if(e===null)return!0;var t,r=e;for(t in r)if(v2.call(r,t)&&r[t]!==null)return!1;return!0}p(Cf,"resolveYamlSet");function kf(e){return e!==null?e:{}}p(kf,"constructYamlSet");var w2=new zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Cf,construct:kf}),Sf=u2.extend({implicit:[d2,f2],explicit:[p2,y2,x2,w2]}),Ve=Object.prototype.hasOwnProperty,ua=1,Tf=2,Af=3,da=4,Ts=1,_2=2,lh=3,C2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k2=/[\x85\u2028\u2029]/,S2=/[,\[\]\{\}]/,Ef=/^(?:!|!!|![a-z\-]+!)$/i,Lf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function so(e){return Object.prototype.toString.call(e)}p(so,"_class");function he(e){return e===10||e===13}p(he,"is_EOL");function Ye(e){return e===9||e===32}p(Ye,"is_WHITE_SPACE");function Gt(e){return e===9||e===32||e===10||e===13}p(Gt,"is_WS_OR_EOL");function hr(e){return e===44||e===91||e===93||e===123||e===125}p(hr,"is_FLOW_INDICATOR");function Bf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Bf,"fromHexCode");function Mf(e){return e===120?2:e===117?4:e===85?8:0}p(Mf,"escapedHexLen");function $f(e){return 48<=e&&e<=57?e-48:-1}p($f,"fromDecimalCode");function oo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
138
+ `: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(oo,"simpleEscapeSequence");function Ff(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Ff,"charFromCodepoint");var Rf=new Array(256),Of=new Array(256);for(nr=0;nr<256;nr++)Rf[nr]=oo(nr)?1:0,Of[nr]=oo(nr);var nr;function If(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Sf,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(If,"State$1");function gl(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=Kw(r),new te(t,r)}p(gl,"generateError");function tt(e,t){throw gl(e,t)}p(tt,"throwError");function Xi(e,t){e.onWarning&&e.onWarning.call(null,gl(e,t))}p(Xi,"throwWarning");var ch={YAML:p(function(t,r,i){var n,a,o;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Ef.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ve.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lf.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function De(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||tt(e,"expected valid JSON character");else C2.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}p(De,"captureSegment");function lo(e,t,r,i){var n,a,o,s;for(Et.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],Ve.call(t,a)||(t[a]=r[a],i[a]=!0)}p(lo,"mergeMappings");function ur(e,t,r,i,n,a,o,s,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&tt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&so(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&so(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)lo(e,t,a[c],r);else lo(e,t,a,r);else!e.json&&!Ve.call(r,n)&&Ve.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(ur,"storeMappingPair");function Wa(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++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Wa,"readLineBreak");function wt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ye(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(he(n))for(Wa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Xi(e,"deficient indentation"),i}p(wt,"skipSeparationSpace");function cn(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||Gt(r)))}p(cn,"testDocumentSeparator");function ja(e,t){t===1?e.result+=" ":t>1&&(e.result+=Et.repeat(`
139
+ `,t-1))}p(ja,"writeFoldedLines");function Df(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Gt(f)||hr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),Gt(n)||r&&hr(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),Gt(n)||r&&hr(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Gt(i))break}else{if(e.position===e.lineStart&&cn(e)||r&&hr(f))break;if(he(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,wt(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(De(e,a,o,!1),ja(e,e.line-l),a=o=e.position,s=!1),Ye(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return De(e,a,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Df,"readPlainScalar");function Nf(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(De(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else he(r)?(De(e,i,n,!0),ja(e,wt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&cn(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Nf,"readSingleQuotedScalar");function Pf(e,t){var r,i,n,a,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 De(e,r,e.position,!0),e.position++,!0;if(s===92){if(De(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),he(s))wt(e,!1,t);else if(s<256&&Rf[s])e.result+=Of[s],e.position++;else if((o=Mf(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Bf(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=Ff(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else he(s)?(De(e,r,i,!0),ja(e,wt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&cn(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Pf,"readDoubleQuotedScalar");function zf(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,b,x,y;if(y=e.input.charCodeAt(e.position),y===91)h=93,f=!1,s=[];else if(y===123)h=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),y=e.input.charCodeAt(++e.position);y!==0;){if(wt(e,!0,t),y=e.input.charCodeAt(e.position),y===h)return e.position++,e.tag=o,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=s,!0;r?y===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),b=m=x=null,u=d=!1,y===63&&(c=e.input.charCodeAt(e.position+1),Gt(c)&&(u=d=!0,e.position++,wt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,xr(e,t,ua,!1,!0),b=e.tag,m=e.result,wt(e,!0,t),y=e.input.charCodeAt(e.position),(d||e.line===i)&&y===58&&(u=!0,y=e.input.charCodeAt(++e.position),wt(e,!0,t),xr(e,t,ua,!1,!0),x=e.result),f?ur(e,s,g,b,m,x,i,n,a):u?s.push(ur(e,null,g,b,m,x,i,n,a)):s.push(m),wt(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(r=!0,y=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(zf,"readFlowCollection");function qf(e,t){var r,i,n=Ts,a=!1,o=!1,s=t,l=0,c=!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)Ts===n?n=u===43?lh:_2:tt(e,"repeat of a chomping mode identifier");else if((h=$f(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?tt(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Ye(u)){do u=e.input.charCodeAt(++e.position);while(Ye(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!he(u)&&u!==0)}for(;u!==0;){for(Wa(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),he(u)){l++;continue}if(e.lineIndent<s){n===lh?e.result+=Et.repeat(`
140
140
  `,a?1+l:l):n===Ts&&a&&(e.result+=`
141
141
  `);break}for(i?Ye(u)?(c=!0,e.result+=Et.repeat(`
142
142
  `,a?1+l:l)):c?(c=!1,e.result+=Et.repeat(`
143
143
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=Et.repeat(`
144
144
  `,l):e.result+=Et.repeat(`
145
- `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!he(u)&&u!==0;)u=e.input.charCodeAt(++e.position);De(e,r,e.position,!1)}return!0}p(zf,"readBlockScalar");function co(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Gt(o))));){if(s=!0,e.position++,wt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,xr(e,t,Tf,!1,!0),a.push(e.result),wt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(co,"readBlockSequence");function qf(e,t,r){var i,n,a,o,s,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,b=!1,x=!1,y;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),y=e.input.charCodeAt(e.position);y!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(y===63||y===58)&&Gt(i))y===63?(b&&(ur(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,b=!0,n=!0):b?(b=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=i;else{if(o=e.line,s=e.lineStart,l=e.position,!xr(e,r,Sf,!1,!0))break;if(e.line===a){for(y=e.input.charCodeAt(e.position);Ye(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Gt(y)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(ur(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,b=!1,n=!1,f=e.tag,g=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(b&&(o=e.line,s=e.lineStart,l=e.position),xr(e,t,da,!0,n)&&(b?g=e.result:m=e.result),b||(ur(e,u,d,f,g,m,o,s,l),f=g=m=null),wt(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&y!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&ur(e,u,d,f,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(qf,"readBlockMapping");function Hf(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&tt(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,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Gt(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Af.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),k2.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!Ef.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:Ve.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}p(Hf,"readTagProperty");function Wf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Gt(r)&&!hr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Wf,"readAnchorProperty");function jf(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&&!Gt(i)&&!hr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ve.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],wt(e,!0,-1),!0}p(jf,"readAlias");function xr(e,t,r,i,n){var a,o,s,l=1,c=!1,h=!1,u,d,f,g,m,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=da===r||Tf===r,i&&wt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Hf(e)||Wf(e);)wt(e,!0,-1)?(c=!0,s=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||da===r)&&(ua===r||Sf===r?m=t:m=t+1,b=e.position-e.lineStart,l===1?s&&(co(e,b)||qf(e,b,m))||Pf(e,m)?h=!0:(o&&zf(e,m)||Df(e,m)||Nf(e,m)?h=!0:jf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):If(e,m,ua===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&co(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;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(Ve.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(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)):tt(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(xr,"composeNode");function Uf(e){var t=e.position,r,i,n,a=!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&&(wt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");o!==0;){for(;Ye(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!he(o));break}if(he(o))break;for(r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Wa(e),Ve.call(ch,i)?ch[i](e,i,n):Xi(e,'unknown document directive "'+i+'"')}if(wt(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,wt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),xr(e,e.lineIndent-1,da,!1,!0),wt(e,!0,-1),e.checkLineBreaks&&C2.test(e.input.slice(t,e.position))&&Xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&cn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,wt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(Uf,"readDocument");function ml(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
146
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Of(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(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;)Uf(r);return r.documents}p(ml,"loadDocuments");function S2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=ml(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(S2,"loadAll$1");function Yf(e,t){var r=ml(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new te("expected a single document in the stream, but found more")}}p(Yf,"load$1");var T2=Yf,A2={load:T2},Gf=Object.prototype.toString,Vf=Object.prototype.hasOwnProperty,yl=65279,E2=9,Zi=10,L2=13,B2=32,M2=33,$2=34,ho=35,F2=37,R2=38,O2=39,I2=42,Xf=44,D2=45,fa=58,N2=61,P2=62,z2=63,q2=64,Zf=91,Kf=93,H2=96,Qf=123,W2=124,Jf=125,Ht={};Ht[0]="\\0";Ht[7]="\\a";Ht[8]="\\b";Ht[9]="\\t";Ht[10]="\\n";Ht[11]="\\v";Ht[12]="\\f";Ht[13]="\\r";Ht[27]="\\e";Ht[34]='\\"';Ht[92]="\\\\";Ht[133]="\\N";Ht[160]="\\_";Ht[8232]="\\L";Ht[8233]="\\P";var j2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],U2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function tp(e,t){var r,i,n,a,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Vf.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(tp,"compileStyleMap");function ep(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 te("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Et.repeat("0",i-t.length)+t}p(ep,"encodeHex");var Y2=1,Ki=2;function rp(e){this.schema=e.schema||kf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Et.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=tp(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==='"'?Ki:Y2,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(rp,"State");function uo(e,t){for(var r=Et.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
145
+ `,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!he(u)&&u!==0;)u=e.input.charCodeAt(++e.position);De(e,r,e.position,!1)}return!0}p(qf,"readBlockScalar");function co(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Gt(o))));){if(s=!0,e.position++,wt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,xr(e,t,Af,!1,!0),a.push(e.result),wt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(co,"readBlockSequence");function Hf(e,t,r){var i,n,a,o,s,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,b=!1,x=!1,y;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),y=e.input.charCodeAt(e.position);y!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(y===63||y===58)&&Gt(i))y===63?(b&&(ur(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,b=!0,n=!0):b?(b=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=i;else{if(o=e.line,s=e.lineStart,l=e.position,!xr(e,r,Tf,!1,!0))break;if(e.line===a){for(y=e.input.charCodeAt(e.position);Ye(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Gt(y)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(ur(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,b=!1,n=!1,f=e.tag,g=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(b&&(o=e.line,s=e.lineStart,l=e.position),xr(e,t,da,!0,n)&&(b?g=e.result:m=e.result),b||(ur(e,u,d,f,g,m,o,s,l),f=g=m=null),wt(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&y!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&ur(e,u,d,f,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(Hf,"readBlockMapping");function Wf(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&tt(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,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Gt(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Ef.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),S2.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!Lf.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:Ve.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}p(Wf,"readTagProperty");function jf(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Gt(r)&&!hr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(jf,"readAnchorProperty");function Uf(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&&!Gt(i)&&!hr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ve.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],wt(e,!0,-1),!0}p(Uf,"readAlias");function xr(e,t,r,i,n){var a,o,s,l=1,c=!1,h=!1,u,d,f,g,m,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=da===r||Af===r,i&&wt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Wf(e)||jf(e);)wt(e,!0,-1)?(c=!0,s=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||da===r)&&(ua===r||Tf===r?m=t:m=t+1,b=e.position-e.lineStart,l===1?s&&(co(e,b)||Hf(e,b,m))||zf(e,m)?h=!0:(o&&qf(e,m)||Nf(e,m)||Pf(e,m)?h=!0:Uf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Df(e,m,ua===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&co(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;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(Ve.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(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)):tt(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(xr,"composeNode");function Yf(e){var t=e.position,r,i,n,a=!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&&(wt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");o!==0;){for(;Ye(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!he(o));break}if(he(o))break;for(r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Wa(e),Ve.call(ch,i)?ch[i](e,i,n):Xi(e,'unknown document directive "'+i+'"')}if(wt(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,wt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),xr(e,e.lineIndent-1,da,!1,!0),wt(e,!0,-1),e.checkLineBreaks&&k2.test(e.input.slice(t,e.position))&&Xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&cn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,wt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(Yf,"readDocument");function ml(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
146
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new If(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(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;)Yf(r);return r.documents}p(ml,"loadDocuments");function T2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=ml(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(T2,"loadAll$1");function Gf(e,t){var r=ml(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new te("expected a single document in the stream, but found more")}}p(Gf,"load$1");var A2=Gf,E2={load:A2},Vf=Object.prototype.toString,Xf=Object.prototype.hasOwnProperty,yl=65279,L2=9,Zi=10,B2=13,M2=32,$2=33,F2=34,ho=35,R2=37,O2=38,I2=39,D2=42,Zf=44,N2=45,fa=58,P2=61,z2=62,q2=63,H2=64,Kf=91,Qf=93,W2=96,Jf=123,j2=124,tp=125,Ht={};Ht[0]="\\0";Ht[7]="\\a";Ht[8]="\\b";Ht[9]="\\t";Ht[10]="\\n";Ht[11]="\\v";Ht[12]="\\f";Ht[13]="\\r";Ht[27]="\\e";Ht[34]='\\"';Ht[92]="\\\\";Ht[133]="\\N";Ht[160]="\\_";Ht[8232]="\\L";Ht[8233]="\\P";var U2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Y2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ep(e,t){var r,i,n,a,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Xf.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(ep,"compileStyleMap");function rp(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 te("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Et.repeat("0",i-t.length)+t}p(rp,"encodeHex");var G2=1,Ki=2;function ip(e){this.schema=e.schema||Sf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Et.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ep(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==='"'?Ki:G2,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(ip,"State");function uo(e,t){for(var r=Et.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
147
147
  `,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
148
148
  `&&(a+=r),a+=o;return a}p(uo,"indentString");function pa(e,t){return`
149
- `+Et.repeat(" ",e.indent*t)}p(pa,"generateNextLine");function ip(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(ip,"testImplicitResolving");function Qi(e){return e===B2||e===E2}p(Qi,"isWhitespace");function ri(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yl||65536<=e&&e<=1114111}p(ri,"isPrintable");function fo(e){return ri(e)&&e!==yl&&e!==L2&&e!==Zi}p(fo,"isNsCharOrWhitespace");function po(e,t,r){var i=fo(e),n=i&&!Qi(e);return(r?i:i&&e!==Xf&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf)&&e!==ho&&!(t===fa&&!n)||fo(t)&&!Qi(t)&&e===ho||t===fa&&n}p(po,"isPlainSafe");function np(e){return ri(e)&&e!==yl&&!Qi(e)&&e!==D2&&e!==z2&&e!==fa&&e!==Xf&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf&&e!==ho&&e!==R2&&e!==I2&&e!==M2&&e!==W2&&e!==N2&&e!==P2&&e!==O2&&e!==$2&&e!==F2&&e!==q2&&e!==H2}p(np,"isPlainSafeFirst");function ap(e){return!Qi(e)&&e!==fa}p(ap,"isPlainSafeLast");function Dr(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(Dr,"codePointAt");function bl(e){var t=/^\n* /;return t.test(e)}p(bl,"needIndentIndicator");var sp=1,go=2,op=3,lp=4,Or=5;function cp(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=np(Dr(e,0))&&ap(Dr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),!ri(c))return Or;m=m&&po(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),c===Zi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ri(c))return Or;m=m&&po(c,h,s),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!n(e)?sp:a===Ki?Or:go:r>9&&bl(e)?Or:o?a===Ki?Or:go:d?lp:op}p(cp,"chooseScalarStyle");function hp(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Ki?'""':"''";if(!e.noCompatMode&&(j2.indexOf(t)!==-1||U2.test(t)))return e.quotingType===Ki?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ip(e,c)}switch(p(l,"testAmbiguity"),cp(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case sp:return t;case go:return"'"+t.replace(/'/g,"''")+"'";case op:return"|"+mo(t,e.indent)+yo(uo(t,a));case lp:return">"+mo(t,e.indent)+yo(uo(up(t,o),a));case Or:return'"'+dp(t)+'"';default:throw new te("impossible error: invalid scalar style")}})()}p(hp,"writeScalar");function mo(e,t){var r=bl(e)?String(t):"",i=e[e.length-1]===`
149
+ `+Et.repeat(" ",e.indent*t)}p(pa,"generateNextLine");function np(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(np,"testImplicitResolving");function Qi(e){return e===M2||e===L2}p(Qi,"isWhitespace");function ri(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yl||65536<=e&&e<=1114111}p(ri,"isPrintable");function fo(e){return ri(e)&&e!==yl&&e!==B2&&e!==Zi}p(fo,"isNsCharOrWhitespace");function po(e,t,r){var i=fo(e),n=i&&!Qi(e);return(r?i:i&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf&&e!==tp)&&e!==ho&&!(t===fa&&!n)||fo(t)&&!Qi(t)&&e===ho||t===fa&&n}p(po,"isPlainSafe");function ap(e){return ri(e)&&e!==yl&&!Qi(e)&&e!==N2&&e!==q2&&e!==fa&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf&&e!==tp&&e!==ho&&e!==O2&&e!==D2&&e!==$2&&e!==j2&&e!==P2&&e!==z2&&e!==I2&&e!==F2&&e!==R2&&e!==H2&&e!==W2}p(ap,"isPlainSafeFirst");function sp(e){return!Qi(e)&&e!==fa}p(sp,"isPlainSafeLast");function Dr(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(Dr,"codePointAt");function bl(e){var t=/^\n* /;return t.test(e)}p(bl,"needIndentIndicator");var op=1,go=2,lp=3,cp=4,Or=5;function hp(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=ap(Dr(e,0))&&sp(Dr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),!ri(c))return Or;m=m&&po(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Dr(e,l),c===Zi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ri(c))return Or;m=m&&po(c,h,s),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!n(e)?op:a===Ki?Or:go:r>9&&bl(e)?Or:o?a===Ki?Or:go:d?cp:lp}p(hp,"chooseScalarStyle");function up(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Ki?'""':"''";if(!e.noCompatMode&&(U2.indexOf(t)!==-1||Y2.test(t)))return e.quotingType===Ki?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return np(e,c)}switch(p(l,"testAmbiguity"),hp(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case op:return t;case go:return"'"+t.replace(/'/g,"''")+"'";case lp:return"|"+mo(t,e.indent)+yo(uo(t,a));case cp:return">"+mo(t,e.indent)+yo(uo(dp(t,o),a));case Or:return'"'+fp(t)+'"';default:throw new te("impossible error: invalid scalar style")}})()}p(up,"writeScalar");function mo(e,t){var r=bl(e)?String(t):"",i=e[e.length-1]===`
150
150
  `,n=i&&(e[e.length-2]===`
151
151
  `||e===`
152
152
  `),a=n?"+":i?"":"-";return r+a+`
153
153
  `}p(mo,"blockHeader");function yo(e){return e[e.length-1]===`
154
- `?e.slice(0,-1):e}p(yo,"dropEndingNewline");function up(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
154
+ `?e.slice(0,-1):e}p(yo,"dropEndingNewline");function dp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
155
155
  `);return c=c!==-1?c:e.length,r.lastIndex=c,bo(e.slice(0,c),t)})(),n=e[0]===`
156
156
  `||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?`
157
- `:"")+bo(l,t),n=a}return i}p(up,"foldString");function bo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=`
157
+ `:"")+bo(l,t),n=a}return i}p(dp,"foldString");function bo(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=`
158
158
  `+e.slice(n,a),n=a+1),o=s;return l+=`
159
159
  `,e.length-n>t&&o>n?l+=e.slice(n,o)+`
160
- `+e.slice(o+1):l+=e.slice(n),l.slice(1)}p(bo,"foldLine");function dp(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Dr(e,n),i=Ht[r],!i&&ri(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||ep(r);return t}p(dp,"escapeString");function fp(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ve(e,t,s,!1,!1)||typeof s>"u"&&ve(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(fp,"writeFlowSequence");function xo(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ve(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ve(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=pa(e,t)),e.dump&&Zi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(xo,"writeBlockSequence");function pp(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ve(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ve(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(pp,"writeFlowMapping");function gp(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new te("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)d="",(!i||n!=="")&&(d+=pa(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ve(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Zi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=pa(e,t)),ve(e,t+1,h,!0,u)&&(e.dump&&Zi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(gp,"writeBlockMapping");function vo(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(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(l=e.styleMap[s.tag]||s.defaultStyle,Gf.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(Vf.call(s.represent,l))i=s.represent[l](t,l);else throw new te("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(vo,"detectType");function ve(e,t,r,i,n,a,o){e.tag=null,e.dump=r,vo(e,r,!1)||vo(e,r,!0);var s=Gf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(gp(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(pp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?xo(e,t-1,e.dump,n):xo(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(fp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&hp(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new te("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ve,"writeNode");function mp(e,t){var r=[],i=[],n,a;for(ga(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(mp,"getDuplicateReferences");function ga(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)ga(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ga(e[i[n]],t,r)}p(ga,"inspectNode");function G2(e,t){t=t||{};var r=new rp(t);r.noRefs||mp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ve(r,0,i,!0,!0)?r.dump+`
161
- `:""}p(G2,"dump$1");function V2(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(V2,"renamed");var yp=of,bp=A2.load;/*! Bundled license information:
160
+ `+e.slice(o+1):l+=e.slice(n),l.slice(1)}p(bo,"foldLine");function fp(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Dr(e,n),i=Ht[r],!i&&ri(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||rp(r);return t}p(fp,"escapeString");function pp(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ve(e,t,s,!1,!1)||typeof s>"u"&&ve(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(pp,"writeFlowSequence");function xo(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ve(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ve(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=pa(e,t)),e.dump&&Zi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(xo,"writeBlockSequence");function gp(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ve(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ve(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(gp,"writeFlowMapping");function mp(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new te("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)d="",(!i||n!=="")&&(d+=pa(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ve(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Zi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=pa(e,t)),ve(e,t+1,h,!0,u)&&(e.dump&&Zi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(mp,"writeBlockMapping");function vo(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(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(l=e.styleMap[s.tag]||s.defaultStyle,Vf.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(Xf.call(s.represent,l))i=s.represent[l](t,l);else throw new te("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(vo,"detectType");function ve(e,t,r,i,n,a,o){e.tag=null,e.dump=r,vo(e,r,!1)||vo(e,r,!0);var s=Vf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(mp(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(gp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?xo(e,t-1,e.dump,n):xo(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(pp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&up(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new te("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ve,"writeNode");function yp(e,t){var r=[],i=[],n,a;for(ga(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(yp,"getDuplicateReferences");function ga(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)ga(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ga(e[i[n]],t,r)}p(ga,"inspectNode");function V2(e,t){t=t||{};var r=new ip(t);r.noRefs||yp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ve(r,0,i,!0,!0)?r.dump+`
161
+ `:""}p(V2,"dump$1");function X2(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(X2,"renamed");var bp=lf,xp=E2.load;/*! Bundled license information:
162
162
 
163
163
  js-yaml/dist/js-yaml.mjs:
164
164
  (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
165
- */var Pt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},hh={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Oi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=vt(e),t=vt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(Oi,"calculateDeltaAndAngle");var vt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),xp=p(e=>({x:p(function(t,r,i){let n=0;const a=vt(i[0]).x<vt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:f,deltaX:g}=Oi(i[0],i[1]);n=Pt[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:f,deltaX:g}=Oi(i[i.length-1],i[i.length-2]);n=Pt[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const o=Math.abs(vt(t).x-vt(i[i.length-1]).x),s=Math.abs(vt(t).y-vt(i[i.length-1]).y),l=Math.abs(vt(t).x-vt(i[0]).x),c=Math.abs(vt(t).y-vt(i[0]).y),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return vt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=vt(i[0]).y<vt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:f,deltaY:g}=Oi(i[0],i[1]);n=Pt[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:f,deltaY:g}=Oi(i[i.length-1],i[i.length-2]);n=Pt[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const o=Math.abs(vt(t).y-vt(i[i.length-1]).y),s=Math.abs(vt(t).x-vt(i[i.length-1]).x),l=Math.abs(vt(t).y-vt(i[0]).y),c=Math.abs(vt(t).x-vt(i[0]).x),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return vt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Ua=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),X2=p(e=>{const{handDrawnSeed:t}=ft();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),li=p(e=>{const t=Z2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Z2=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),xl=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"),X=p(e=>{const{stylesArray:t}=li(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];xl(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ft(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=li(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:K2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),K2=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Si={},At={},uh;function Q2(){return uh||(uh=1,Object.defineProperty(At,"__esModule",{value:!0}),At.BLANK_URL=At.relativeFirstCharacters=At.whitespaceEscapeCharsRegex=At.urlSchemeRegex=At.ctrlCharactersRegex=At.htmlCtrlEntityRegex=At.htmlEntitiesRegex=At.invalidProtocolRegex=void 0,At.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,At.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,At.htmlCtrlEntityRegex=/&(newline|tab);/gi,At.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,At.urlSchemeRegex=/^.+(:|&colon;)/gim,At.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,At.relativeFirstCharacters=[".","/"],At.BLANK_URL="about:blank"),At}var dh;function J2(){if(dh)return Si;dh=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.sanitizeUrl=void 0;var e=Q2();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var s,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return Si.sanitizeUrl=a,Si}var vp=J2(),wp=typeof global=="object"&&global&&global.Object===Object&&global,t_=typeof self=="object"&&self&&self.Object===Object&&self,Ce=wp||t_||Function("return this")(),Ji=Ce.Symbol,_p=Object.prototype,e_=_p.hasOwnProperty,r_=_p.toString,Ti=Ji?Ji.toStringTag:void 0;function i_(e){var t=e_.call(e,Ti),r=e[Ti];try{e[Ti]=void 0;var i=!0}catch{}var n=r_.call(e);return i&&(t?e[Ti]=r:delete e[Ti]),n}var n_=Object.prototype,a_=n_.toString;function s_(e){return a_.call(e)}var o_="[object Null]",l_="[object Undefined]",fh=Ji?Ji.toStringTag:void 0;function kr(e){return e==null?e===void 0?l_:o_:fh&&fh in Object(e)?i_(e):s_(e)}function Ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var c_="[object AsyncFunction]",h_="[object Function]",u_="[object GeneratorFunction]",d_="[object Proxy]";function Ya(e){if(!Ke(e))return!1;var t=kr(e);return t==h_||t==u_||t==c_||t==d_}var As=Ce["__core-js_shared__"],ph=(function(){var e=/[^.]+$/.exec(As&&As.keys&&As.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function f_(e){return!!ph&&ph in e}var p_=Function.prototype,g_=p_.toString;function Sr(e){if(e!=null){try{return g_.call(e)}catch{}try{return e+""}catch{}}return""}var m_=/[\\^$.*+?()[\]{}|]/g,y_=/^\[object .+?Constructor\]$/,b_=Function.prototype,x_=Object.prototype,v_=b_.toString,w_=x_.hasOwnProperty,__=RegExp("^"+v_.call(w_).replace(m_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function C_(e){if(!Ke(e)||f_(e))return!1;var t=Ya(e)?__:y_;return t.test(Sr(e))}function k_(e,t){return e?.[t]}function Tr(e,t){var r=k_(e,t);return C_(r)?r:void 0}var tn=Tr(Object,"create");function S_(){this.__data__=tn?tn(null):{},this.size=0}function T_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var A_="__lodash_hash_undefined__",E_=Object.prototype,L_=E_.hasOwnProperty;function B_(e){var t=this.__data__;if(tn){var r=t[e];return r===A_?void 0:r}return L_.call(t,e)?t[e]:void 0}var M_=Object.prototype,$_=M_.hasOwnProperty;function F_(e){var t=this.__data__;return tn?t[e]!==void 0:$_.call(t,e)}var R_="__lodash_hash_undefined__";function O_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tn&&t===void 0?R_:t,this}function vr(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])}}vr.prototype.clear=S_;vr.prototype.delete=T_;vr.prototype.get=B_;vr.prototype.has=F_;vr.prototype.set=O_;function I_(){this.__data__=[],this.size=0}function hn(e,t){return e===t||e!==e&&t!==t}function Ga(e,t){for(var r=e.length;r--;)if(hn(e[r][0],t))return r;return-1}var D_=Array.prototype,N_=D_.splice;function P_(e){var t=this.__data__,r=Ga(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():N_.call(t,r,1),--this.size,!0}function z_(e){var t=this.__data__,r=Ga(t,e);return r<0?void 0:t[r][1]}function q_(e){return Ga(this.__data__,e)>-1}function H_(e,t){var r=this.__data__,i=Ga(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ze(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])}}ze.prototype.clear=I_;ze.prototype.delete=P_;ze.prototype.get=z_;ze.prototype.has=q_;ze.prototype.set=H_;var en=Tr(Ce,"Map");function W_(){this.size=0,this.__data__={hash:new vr,map:new(en||ze),string:new vr}}function j_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Va(e,t){var r=e.__data__;return j_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function U_(e){var t=Va(this,e).delete(e);return this.size-=t?1:0,t}function Y_(e){return Va(this,e).get(e)}function G_(e){return Va(this,e).has(e)}function V_(e,t){var r=Va(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,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=W_;qe.prototype.delete=U_;qe.prototype.get=Y_;qe.prototype.has=G_;qe.prototype.set=V_;var X_="Expected a function";function ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(X_);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(ci.Cache||qe),r}ci.Cache=qe;function Z_(){this.__data__=new ze,this.size=0}function K_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Q_(e){return this.__data__.get(e)}function J_(e){return this.__data__.has(e)}var tC=200;function eC(e,t){var r=this.__data__;if(r instanceof ze){var i=r.__data__;if(!en||i.length<tC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new qe(i)}return r.set(e,t),this.size=r.size,this}function Ar(e){var t=this.__data__=new ze(e);this.size=t.size}Ar.prototype.clear=Z_;Ar.prototype.delete=K_;Ar.prototype.get=Q_;Ar.prototype.has=J_;Ar.prototype.set=eC;var ma=(function(){try{var e=Tr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Xa(e,t,r){t=="__proto__"&&ma?ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function wo(e,t,r){(r!==void 0&&!hn(e[t],r)||r===void 0&&!(t in e))&&Xa(e,t,r)}function rC(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var l=o[++n];if(r(a[l],l,a)===!1)break}return t}}var Cp=rC(),kp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gh=kp&&typeof module=="object"&&module&&!module.nodeType&&module,iC=gh&&gh.exports===kp,mh=iC?Ce.Buffer:void 0,yh=mh?mh.allocUnsafe:void 0;function Sp(e,t){if(t)return e.slice();var r=e.length,i=yh?yh(r):new e.constructor(r);return e.copy(i),i}var _o=Ce.Uint8Array;function Tp(e){var t=new e.constructor(e.byteLength);return new _o(t).set(new _o(e)),t}function Ap(e,t){var r=t?Tp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ep(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var bh=Object.create,nC=(function(){function e(){}return function(t){if(!Ke(t))return{};if(bh)return bh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Lp(e,t){return function(r){return e(t(r))}}var vl=Lp(Object.getPrototypeOf,Object),aC=Object.prototype;function un(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||aC;return e===r}function Bp(e){return typeof e.constructor=="function"&&!un(e)?nC(vl(e)):{}}function hi(e){return e!=null&&typeof e=="object"}var sC="[object Arguments]";function xh(e){return hi(e)&&kr(e)==sC}var Mp=Object.prototype,oC=Mp.hasOwnProperty,lC=Mp.propertyIsEnumerable,rn=xh((function(){return arguments})())?xh:function(e){return hi(e)&&oC.call(e,"callee")&&!lC.call(e,"callee")},nn=Array.isArray,cC=9007199254740991;function wl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cC}function dn(e){return e!=null&&wl(e.length)&&!Ya(e)}function $p(e){return hi(e)&&dn(e)}function hC(){return!1}var Fp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vh=Fp&&typeof module=="object"&&module&&!module.nodeType&&module,uC=vh&&vh.exports===Fp,wh=uC?Ce.Buffer:void 0,dC=wh?wh.isBuffer:void 0,Za=dC||hC,fC="[object Object]",pC=Function.prototype,gC=Object.prototype,Rp=pC.toString,mC=gC.hasOwnProperty,yC=Rp.call(Object);function bC(e){if(!hi(e)||kr(e)!=fC)return!1;var t=vl(e);if(t===null)return!0;var r=mC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Rp.call(r)==yC}var xC="[object Arguments]",vC="[object Array]",wC="[object Boolean]",_C="[object Date]",CC="[object Error]",kC="[object Function]",SC="[object Map]",TC="[object Number]",AC="[object Object]",EC="[object RegExp]",LC="[object Set]",BC="[object String]",MC="[object WeakMap]",$C="[object ArrayBuffer]",FC="[object DataView]",RC="[object Float32Array]",OC="[object Float64Array]",IC="[object Int8Array]",DC="[object Int16Array]",NC="[object Int32Array]",PC="[object Uint8Array]",zC="[object Uint8ClampedArray]",qC="[object Uint16Array]",HC="[object Uint32Array]",bt={};bt[RC]=bt[OC]=bt[IC]=bt[DC]=bt[NC]=bt[PC]=bt[zC]=bt[qC]=bt[HC]=!0;bt[xC]=bt[vC]=bt[$C]=bt[wC]=bt[FC]=bt[_C]=bt[CC]=bt[kC]=bt[SC]=bt[TC]=bt[AC]=bt[EC]=bt[LC]=bt[BC]=bt[MC]=!1;function WC(e){return hi(e)&&wl(e.length)&&!!bt[kr(e)]}function Op(e){return function(t){return e(t)}}var Ip=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ji=Ip&&typeof module=="object"&&module&&!module.nodeType&&module,jC=ji&&ji.exports===Ip,Es=jC&&wp.process,Co=(function(){try{var e=ji&&ji.require&&ji.require("util").types;return e||Es&&Es.binding&&Es.binding("util")}catch{}})(),_h=Co&&Co.isTypedArray,Ka=_h?Op(_h):WC;function ko(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var UC=Object.prototype,YC=UC.hasOwnProperty;function Dp(e,t,r){var i=e[t];(!(YC.call(e,t)&&hn(i,r))||r===void 0&&!(t in e))&&Xa(e,t,r)}function Np(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=void 0;l===void 0&&(l=e[s]),n?Xa(r,s,l):Dp(r,s,l)}return r}function GC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var VC=9007199254740991,XC=/^(?:0|[1-9]\d*)$/;function _l(e,t){var r=typeof e;return t=t??VC,!!t&&(r=="number"||r!="symbol"&&XC.test(e))&&e>-1&&e%1==0&&e<t}var ZC=Object.prototype,KC=ZC.hasOwnProperty;function Pp(e,t){var r=nn(e),i=!r&&rn(e),n=!r&&!i&&Za(e),a=!r&&!i&&!n&&Ka(e),o=r||i||n||a,s=o?GC(e.length,String):[],l=s.length;for(var c in e)(t||KC.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_l(c,l)))&&s.push(c);return s}function QC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var JC=Object.prototype,tk=JC.hasOwnProperty;function ek(e){if(!Ke(e))return QC(e);var t=un(e),r=[];for(var i in e)i=="constructor"&&(t||!tk.call(e,i))||r.push(i);return r}function Cl(e){return dn(e)?Pp(e,!0):ek(e)}function rk(e){return Np(e,Cl(e))}function ik(e,t,r,i,n,a,o){var s=ko(e,r),l=ko(t,r),c=o.get(l);if(c){wo(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=nn(l),f=!d&&Za(l),g=!d&&!f&&Ka(l);h=l,d||f||g?nn(s)?h=s:$p(s)?h=Ep(s):f?(u=!1,h=Sp(l,!0)):g?(u=!1,h=Ap(l,!0)):h=[]:bC(l)||rn(l)?(h=s,rn(s)?h=rk(s):(!Ke(s)||Ya(s))&&(h=Bp(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),wo(e,r,h)}function zp(e,t,r,i,n){e!==t&&Cp(t,function(a,o){if(n||(n=new Ar),Ke(a))ik(e,t,o,r,zp,i,n);else{var s=i?i(ko(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),wo(e,o,s)}},Cl)}function kl(e){return e}function nk(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 Ch=Math.max;function qp(e,t,r){return t=Ch(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Ch(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),nk(e,this,s)}}function Hp(e){return function(){return e}}var ak=ma?function(e,t){return ma(e,"toString",{configurable:!0,enumerable:!1,value:Hp(t),writable:!0})}:kl,sk=800,ok=16,lk=Date.now;function ck(e){var t=0,r=0;return function(){var i=lk(),n=ok-(i-r);if(r=i,n>0){if(++t>=sk)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wp=ck(ak);function jp(e,t){return Wp(qp(e,t,kl),e+"")}function Up(e,t,r){if(!Ke(r))return!1;var i=typeof t;return(i=="number"?dn(r)&&_l(t,r.length):i=="string"&&t in r)?hn(r[t],e):!1}function Yp(e){return jp(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Up(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var Gp=Yp(function(e,t,r){zp(e,t,r)}),Vp="​",hk={curveBasis:Wi,curveBasisClosed:Iw,curveBasisOpen:Dw,curveBumpX:pd,curveBumpY:gd,curveBundle:Nw,curveCardinalClosed:Pw,curveCardinalOpen:zw,curveCardinal:xd,curveCatmullRomClosed:qw,curveCatmullRomOpen:Hw,curveCatmullRom:wd,curveLinear:sa,curveLinearClosed:Ww,curveMonotoneX:Ad,curveMonotoneY:Ed,curveNatural:Bd,curveStep:Md,curveStepAfter:Fd,curveStepBefore:$d},uk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dk=p(function(e,t){const r=Xp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Xn(o),i=kt(i,[...o])}else i=r.args;if(!i)return;let n=Yo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Xp=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${uk.source})(?=[}][%]{2}).*
166
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=qi.exec(e))!==null;)if(i.index===qi.lastIndex&&qi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),fk=p(function(e){return e.replace(qi,"")},"removeDirectives"),pk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return hk[r]??t}p(Sl,"interpolateToCurve");function Zp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?vp.sanitizeUrl(r):r}p(Zp,"formatUrl");var gk=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){D.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Tl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Tl,"distance");function Kp(e){let t,r=0;e.forEach(n=>{r+=Tl(n,t),t=n});const i=r/2;return Al(e,i)}p(Kp,"traverseEdge");function Qp(e){return e.length===1?e[0]:Kp(e)}p(Qp,"calcLabelPosition");var kh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Al=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Tl(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:kh((1-o)*r.x+o*n.x,5),y:kh((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mk=p((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Al(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Jp(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Al(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}p(Jp,"calcTerminalLabelPosition");function El(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(El,"getStylesFromArray");var Sh=0,tg=p(()=>(Sh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Sh),"generateId");function eg(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(eg,"makeRandomHex");var rg=p(e=>eg(e.length),"random"),yk=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"),bk=p(function(e,t){const r=t.text.replace(Cr.lineBreakRegex," "),[,i]=fn(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),ig=ci((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Cr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=we(`${o} `,r),c=we(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=xk(o,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),xk=ci((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(we(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ll(e,t){return Bl(e,t).height}p(Ll,"calculateTextHeight");function we(e,t){return Bl(e,t).width}p(we,"calculateTextWidth");var Bl=ci((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=fn(r),o=["sans-serif",i],s=e.split(Cr.lineBreakRegex),l=[],c=dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const b=yk();b.text=m||Vp;const x=bk(h,b).style("font-size",a).style("font-weight",n).style("font-family",d),y=(x._groups||x)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),f=Math.round(y.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Xr,vk=(Xr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Xr,"InitIDGenerator"),Xr),En,wk=p(function(e){return En=En||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),En.innerHTML=e,unescape(En.textContent)},"entityDecode");function Ml(e){return"str"in e}p(Ml,"isDetailedError");var _k=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),fn=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 Qa(e,t){return Gp({},e,t)}p(Qa,"cleanAndMerge");var ae={assignWithDepth:kt,wrapLabel:ig,calculateTextHeight:Ll,calculateTextWidth:we,calculateTextDimensions:Bl,cleanAndMerge:Qa,detectInit:dk,detectDirective:Xp,isSubstringInArray:pk,interpolateToCurve:Sl,calcLabelPosition:Qp,calcCardinalityPosition:mk,calcTerminalLabelPosition:Jp,formatUrl:Zp,getStylesFromArray:El,generateId:tg,random:rg,runFunc:gk,entityDecode:wk,insertTitle:_k,isLabelCoordinateInPath:ng,parseFontSize:fn,InitIDGenerator:vk},Ck=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"),Qe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),kk=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function qt(e){return e??null}p(qt,"handleUndefinedAttr");function ng(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(ng,"isLabelCoordinateInPath");const Sk=Object.freeze({left:0,top:0,width:16,height:16}),ya=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ag=Object.freeze({...Sk,...ya}),Tk=Object.freeze({...ag,body:"",hidden:!1}),Ak=Object.freeze({width:null,height:null}),Ek=Object.freeze({...Ak,...ya}),Lk=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return Ls(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return Ls(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return Ls(s,r)?s:null}return null},Ls=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Bk(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 Th(e,t){const r=Bk(e,t);for(const i in Tk)i in ya?i in e&&!(i in r)&&(r[i]=ya[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Mk(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Ah(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Th(i[s]||n[s],a)}return o(t),r.forEach(o),Th(e,a)}function $k(e,t){if(e.icons[t])return Ah(e,t,[]);const r=Mk(e,[t])[t];return r?Ah(e,t,r):null}const Fk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Rk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Eh(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(Fk);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=Rk.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function Ok(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Ik(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Dk(e,t,r){const i=Ok(e);return Ik(i.defs,t+i.content+r)}const Nk=e=>e==="unset"||e==="undefined"||e==="none";function Pk(e,t){const r={...ag,...e},i={...Ek,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const b=[],x=m.hFlip,y=m.vFlip;let v=m.rotate;x?y?v+=2:(b.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),b.push("scale(-1 1)"),n.top=n.left=0):y&&(b.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),b.push("scale(1 -1)"),n.top=n.left=0);let _;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:_=n.height/2+n.top,b.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:_=n.width/2+n.left,b.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}v%2===1&&(n.left!==n.top&&(_=n.left,n.left=n.top,n.top=_),n.width!==n.height&&(_=n.width,n.width=n.height,n.height=_)),b.length&&(a=Dk(a,'<g transform="'+b.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Eh(u,l/c)):(h=o==="auto"?l:o,u=s===null?Eh(h,c/l):s==="auto"?c:s);const d={},f=(m,b)=>{Nk(b)||(d[m]=b.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const zk=/\sid="(\S+)"/g,qk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Hk=0;function Wk(e,t=qk){const r=[];let i;for(;i=zk.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(Hk++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function jk(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 $l(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Er=$l();function sg(e){Er=e}var Ui={exec:()=>null};function gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Vt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Vt={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")},Uk=/^(?:[ \t]*(?:\n|$))+/,Yk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Fl=/(?:[*+-]|\d{1,9}[.)])/,og=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lg=gt(og).replace(/bull/g,Fl).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(),Xk=gt(og).replace(/bull/g,Fl).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(),Rl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zk=/^[^\n]+/,Ol=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Kk=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ol).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qk=gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Fl).getRegex(),Ja="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",Il=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jk=gt("^ {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",Il).replace("tag",Ja).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cg=gt(Rl).replace("hr",pn).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",Ja).getRegex(),tS=gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cg).getRegex(),Dl={blockquote:tS,code:Yk,def:Kk,fences:Gk,heading:Vk,hr:pn,html:Jk,lheading:lg,list:Qk,newline:Uk,paragraph:cg,table:Ui,text:Zk},Lh=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",pn).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",Ja).getRegex(),eS={...Dl,lheading:Xk,table:Lh,paragraph:gt(Rl).replace("hr",pn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lh).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",Ja).getRegex()},rS={...Dl,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Il).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:Ui,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(Rl).replace("hr",pn).replace("heading",` *#{1,6} *[^
167
- ]`).replace("lheading",lg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},iS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hg=/^( {2,}|\\)\n(?!\s*$)/,aS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ts=/[\p{P}\p{S}]/u,Nl=/[\s\p{P}\p{S}]/u,ug=/[^\s\p{P}\p{S}]/u,sS=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nl).getRegex(),dg=/(?!~)[\p{P}\p{S}]/u,oS=/(?!~)[\s\p{P}\p{S}]/u,lS=/(?:[^\s\p{P}\p{S}]|~)/u,cS=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,fg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hS=gt(fg,"u").replace(/punct/g,ts).getRegex(),uS=gt(fg,"u").replace(/punct/g,dg).getRegex(),pg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dS=gt(pg,"gu").replace(/notPunctSpace/g,ug).replace(/punctSpace/g,Nl).replace(/punct/g,ts).getRegex(),fS=gt(pg,"gu").replace(/notPunctSpace/g,lS).replace(/punctSpace/g,oS).replace(/punct/g,dg).getRegex(),pS=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ug).replace(/punctSpace/g,Nl).replace(/punct/g,ts).getRegex(),gS=gt(/\\(punct)/,"gu").replace(/punct/g,ts).getRegex(),mS=gt(/^<(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(),yS=gt(Il).replace("(?:-->|$)","-->").getRegex(),bS=gt("^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",yS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,xS=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gg=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",ba).replace("ref",Ol).getRegex(),mg=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ol).getRegex(),vS=gt("reflink|nolink(?!\\()","g").replace("reflink",gg).replace("nolink",mg).getRegex(),Pl={_backpedal:Ui,anyPunctuation:gS,autolink:mS,blockSkip:cS,br:hg,code:nS,del:Ui,emStrongLDelim:hS,emStrongRDelimAst:dS,emStrongRDelimUnd:pS,escape:iS,link:xS,nolink:mg,punctuation:sS,reflink:gg,reflinkSearch:vS,tag:bS,text:aS,url:Ui},wS={...Pl,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",ba).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ba).getRegex()},So={...Pl,emStrongRDelimAst:fS,emStrongLDelim:uS,url:gt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},_S={...So,br:gt(hg).replace("{2,}","*").getRegex(),text:gt(So.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ln={normal:Dl,gfm:eS,pedantic:rS},Ai={normal:Pl,gfm:So,breaks:_S,pedantic:wS},CS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Bh=e=>CS[e];function me(e,t){if(t){if(Vt.escapeTest.test(e))return e.replace(Vt.escapeReplace,Bh)}else if(Vt.escapeTestNoEncode.test(e))return e.replace(Vt.escapeReplaceNoEncode,Bh);return e}function Mh(e){try{e=encodeURI(e).replace(Vt.percentDecode,"%")}catch{return null}return e}function $h(e,t){let r=e.replace(Vt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Vt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Vt.slashPipe,"|");return i}function Ei(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function kS(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 Fh(e,t,r,i,n){let a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function SS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
165
+ */var Pt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},hh={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Oi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=vt(e),t=vt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(Oi,"calculateDeltaAndAngle");var vt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vp=p(e=>({x:p(function(t,r,i){let n=0;const a=vt(i[0]).x<vt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:f,deltaX:g}=Oi(i[0],i[1]);n=Pt[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:f,deltaX:g}=Oi(i[i.length-1],i[i.length-2]);n=Pt[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const o=Math.abs(vt(t).x-vt(i[i.length-1]).x),s=Math.abs(vt(t).y-vt(i[i.length-1]).y),l=Math.abs(vt(t).x-vt(i[0]).x),c=Math.abs(vt(t).y-vt(i[0]).y),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return vt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=vt(i[0]).y<vt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Pt,e.arrowTypeStart)){const{angle:f,deltaY:g}=Oi(i[0],i[1]);n=Pt[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pt,e.arrowTypeEnd)){const{angle:f,deltaY:g}=Oi(i[i.length-1],i[i.length-2]);n=Pt[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const o=Math.abs(vt(t).y-vt(i[i.length-1]).y),s=Math.abs(vt(t).x-vt(i[i.length-1]).x),l=Math.abs(vt(t).y-vt(i[0]).y),c=Math.abs(vt(t).x-vt(i[0]).x),h=Pt[e.arrowTypeStart],u=Pt[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return vt(t).y+n},"y")}),"getLineFunctionsWithOffset"),Ua=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Z2=p(e=>{const{handDrawnSeed:t}=ft();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),li=p(e=>{const t=K2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),K2=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),xl=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"),X=p(e=>{const{stylesArray:t}=li(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];xl(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ft(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=li(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Q2(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Q2=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Si={},At={},uh;function J2(){return uh||(uh=1,Object.defineProperty(At,"__esModule",{value:!0}),At.BLANK_URL=At.relativeFirstCharacters=At.whitespaceEscapeCharsRegex=At.urlSchemeRegex=At.ctrlCharactersRegex=At.htmlCtrlEntityRegex=At.htmlEntitiesRegex=At.invalidProtocolRegex=void 0,At.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,At.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,At.htmlCtrlEntityRegex=/&(newline|tab);/gi,At.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,At.urlSchemeRegex=/^.+(:|&colon;)/gim,At.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,At.relativeFirstCharacters=[".","/"],At.BLANK_URL="about:blank"),At}var dh;function t_(){if(dh)return Si;dh=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.sanitizeUrl=void 0;var e=J2();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var s,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return Si.sanitizeUrl=a,Si}var wp=t_(),_p=typeof global=="object"&&global&&global.Object===Object&&global,e_=typeof self=="object"&&self&&self.Object===Object&&self,Ce=_p||e_||Function("return this")(),Ji=Ce.Symbol,Cp=Object.prototype,r_=Cp.hasOwnProperty,i_=Cp.toString,Ti=Ji?Ji.toStringTag:void 0;function n_(e){var t=r_.call(e,Ti),r=e[Ti];try{e[Ti]=void 0;var i=!0}catch{}var n=i_.call(e);return i&&(t?e[Ti]=r:delete e[Ti]),n}var a_=Object.prototype,s_=a_.toString;function o_(e){return s_.call(e)}var l_="[object Null]",c_="[object Undefined]",fh=Ji?Ji.toStringTag:void 0;function kr(e){return e==null?e===void 0?c_:l_:fh&&fh in Object(e)?n_(e):o_(e)}function Ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var h_="[object AsyncFunction]",u_="[object Function]",d_="[object GeneratorFunction]",f_="[object Proxy]";function Ya(e){if(!Ke(e))return!1;var t=kr(e);return t==u_||t==d_||t==h_||t==f_}var As=Ce["__core-js_shared__"],ph=(function(){var e=/[^.]+$/.exec(As&&As.keys&&As.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function p_(e){return!!ph&&ph in e}var g_=Function.prototype,m_=g_.toString;function Sr(e){if(e!=null){try{return m_.call(e)}catch{}try{return e+""}catch{}}return""}var y_=/[\\^$.*+?()[\]{}|]/g,b_=/^\[object .+?Constructor\]$/,x_=Function.prototype,v_=Object.prototype,w_=x_.toString,__=v_.hasOwnProperty,C_=RegExp("^"+w_.call(__).replace(y_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function k_(e){if(!Ke(e)||p_(e))return!1;var t=Ya(e)?C_:b_;return t.test(Sr(e))}function S_(e,t){return e?.[t]}function Tr(e,t){var r=S_(e,t);return k_(r)?r:void 0}var tn=Tr(Object,"create");function T_(){this.__data__=tn?tn(null):{},this.size=0}function A_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var E_="__lodash_hash_undefined__",L_=Object.prototype,B_=L_.hasOwnProperty;function M_(e){var t=this.__data__;if(tn){var r=t[e];return r===E_?void 0:r}return B_.call(t,e)?t[e]:void 0}var $_=Object.prototype,F_=$_.hasOwnProperty;function R_(e){var t=this.__data__;return tn?t[e]!==void 0:F_.call(t,e)}var O_="__lodash_hash_undefined__";function I_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tn&&t===void 0?O_:t,this}function vr(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])}}vr.prototype.clear=T_;vr.prototype.delete=A_;vr.prototype.get=M_;vr.prototype.has=R_;vr.prototype.set=I_;function D_(){this.__data__=[],this.size=0}function hn(e,t){return e===t||e!==e&&t!==t}function Ga(e,t){for(var r=e.length;r--;)if(hn(e[r][0],t))return r;return-1}var N_=Array.prototype,P_=N_.splice;function z_(e){var t=this.__data__,r=Ga(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():P_.call(t,r,1),--this.size,!0}function q_(e){var t=this.__data__,r=Ga(t,e);return r<0?void 0:t[r][1]}function H_(e){return Ga(this.__data__,e)>-1}function W_(e,t){var r=this.__data__,i=Ga(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ze(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])}}ze.prototype.clear=D_;ze.prototype.delete=z_;ze.prototype.get=q_;ze.prototype.has=H_;ze.prototype.set=W_;var en=Tr(Ce,"Map");function j_(){this.size=0,this.__data__={hash:new vr,map:new(en||ze),string:new vr}}function U_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Va(e,t){var r=e.__data__;return U_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Y_(e){var t=Va(this,e).delete(e);return this.size-=t?1:0,t}function G_(e){return Va(this,e).get(e)}function V_(e){return Va(this,e).has(e)}function X_(e,t){var r=Va(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,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=j_;qe.prototype.delete=Y_;qe.prototype.get=G_;qe.prototype.has=V_;qe.prototype.set=X_;var Z_="Expected a function";function ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Z_);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(ci.Cache||qe),r}ci.Cache=qe;function K_(){this.__data__=new ze,this.size=0}function Q_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function J_(e){return this.__data__.get(e)}function tC(e){return this.__data__.has(e)}var eC=200;function rC(e,t){var r=this.__data__;if(r instanceof ze){var i=r.__data__;if(!en||i.length<eC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new qe(i)}return r.set(e,t),this.size=r.size,this}function Ar(e){var t=this.__data__=new ze(e);this.size=t.size}Ar.prototype.clear=K_;Ar.prototype.delete=Q_;Ar.prototype.get=J_;Ar.prototype.has=tC;Ar.prototype.set=rC;var ma=(function(){try{var e=Tr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Xa(e,t,r){t=="__proto__"&&ma?ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function wo(e,t,r){(r!==void 0&&!hn(e[t],r)||r===void 0&&!(t in e))&&Xa(e,t,r)}function iC(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var l=o[++n];if(r(a[l],l,a)===!1)break}return t}}var kp=iC(),Sp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gh=Sp&&typeof module=="object"&&module&&!module.nodeType&&module,nC=gh&&gh.exports===Sp,mh=nC?Ce.Buffer:void 0,yh=mh?mh.allocUnsafe:void 0;function Tp(e,t){if(t)return e.slice();var r=e.length,i=yh?yh(r):new e.constructor(r);return e.copy(i),i}var _o=Ce.Uint8Array;function Ap(e){var t=new e.constructor(e.byteLength);return new _o(t).set(new _o(e)),t}function Ep(e,t){var r=t?Ap(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Lp(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var bh=Object.create,aC=(function(){function e(){}return function(t){if(!Ke(t))return{};if(bh)return bh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Bp(e,t){return function(r){return e(t(r))}}var vl=Bp(Object.getPrototypeOf,Object),sC=Object.prototype;function un(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||sC;return e===r}function Mp(e){return typeof e.constructor=="function"&&!un(e)?aC(vl(e)):{}}function hi(e){return e!=null&&typeof e=="object"}var oC="[object Arguments]";function xh(e){return hi(e)&&kr(e)==oC}var $p=Object.prototype,lC=$p.hasOwnProperty,cC=$p.propertyIsEnumerable,rn=xh((function(){return arguments})())?xh:function(e){return hi(e)&&lC.call(e,"callee")&&!cC.call(e,"callee")},nn=Array.isArray,hC=9007199254740991;function wl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hC}function dn(e){return e!=null&&wl(e.length)&&!Ya(e)}function Fp(e){return hi(e)&&dn(e)}function uC(){return!1}var Rp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vh=Rp&&typeof module=="object"&&module&&!module.nodeType&&module,dC=vh&&vh.exports===Rp,wh=dC?Ce.Buffer:void 0,fC=wh?wh.isBuffer:void 0,Za=fC||uC,pC="[object Object]",gC=Function.prototype,mC=Object.prototype,Op=gC.toString,yC=mC.hasOwnProperty,bC=Op.call(Object);function xC(e){if(!hi(e)||kr(e)!=pC)return!1;var t=vl(e);if(t===null)return!0;var r=yC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Op.call(r)==bC}var vC="[object Arguments]",wC="[object Array]",_C="[object Boolean]",CC="[object Date]",kC="[object Error]",SC="[object Function]",TC="[object Map]",AC="[object Number]",EC="[object Object]",LC="[object RegExp]",BC="[object Set]",MC="[object String]",$C="[object WeakMap]",FC="[object ArrayBuffer]",RC="[object DataView]",OC="[object Float32Array]",IC="[object Float64Array]",DC="[object Int8Array]",NC="[object Int16Array]",PC="[object Int32Array]",zC="[object Uint8Array]",qC="[object Uint8ClampedArray]",HC="[object Uint16Array]",WC="[object Uint32Array]",bt={};bt[OC]=bt[IC]=bt[DC]=bt[NC]=bt[PC]=bt[zC]=bt[qC]=bt[HC]=bt[WC]=!0;bt[vC]=bt[wC]=bt[FC]=bt[_C]=bt[RC]=bt[CC]=bt[kC]=bt[SC]=bt[TC]=bt[AC]=bt[EC]=bt[LC]=bt[BC]=bt[MC]=bt[$C]=!1;function jC(e){return hi(e)&&wl(e.length)&&!!bt[kr(e)]}function Ip(e){return function(t){return e(t)}}var Dp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ji=Dp&&typeof module=="object"&&module&&!module.nodeType&&module,UC=ji&&ji.exports===Dp,Es=UC&&_p.process,Co=(function(){try{var e=ji&&ji.require&&ji.require("util").types;return e||Es&&Es.binding&&Es.binding("util")}catch{}})(),_h=Co&&Co.isTypedArray,Ka=_h?Ip(_h):jC;function ko(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var YC=Object.prototype,GC=YC.hasOwnProperty;function Np(e,t,r){var i=e[t];(!(GC.call(e,t)&&hn(i,r))||r===void 0&&!(t in e))&&Xa(e,t,r)}function Pp(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=void 0;l===void 0&&(l=e[s]),n?Xa(r,s,l):Np(r,s,l)}return r}function VC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var XC=9007199254740991,ZC=/^(?:0|[1-9]\d*)$/;function _l(e,t){var r=typeof e;return t=t??XC,!!t&&(r=="number"||r!="symbol"&&ZC.test(e))&&e>-1&&e%1==0&&e<t}var KC=Object.prototype,QC=KC.hasOwnProperty;function zp(e,t){var r=nn(e),i=!r&&rn(e),n=!r&&!i&&Za(e),a=!r&&!i&&!n&&Ka(e),o=r||i||n||a,s=o?VC(e.length,String):[],l=s.length;for(var c in e)(t||QC.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_l(c,l)))&&s.push(c);return s}function JC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var tk=Object.prototype,ek=tk.hasOwnProperty;function rk(e){if(!Ke(e))return JC(e);var t=un(e),r=[];for(var i in e)i=="constructor"&&(t||!ek.call(e,i))||r.push(i);return r}function Cl(e){return dn(e)?zp(e,!0):rk(e)}function ik(e){return Pp(e,Cl(e))}function nk(e,t,r,i,n,a,o){var s=ko(e,r),l=ko(t,r),c=o.get(l);if(c){wo(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=nn(l),f=!d&&Za(l),g=!d&&!f&&Ka(l);h=l,d||f||g?nn(s)?h=s:Fp(s)?h=Lp(s):f?(u=!1,h=Tp(l,!0)):g?(u=!1,h=Ep(l,!0)):h=[]:xC(l)||rn(l)?(h=s,rn(s)?h=ik(s):(!Ke(s)||Ya(s))&&(h=Mp(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),wo(e,r,h)}function qp(e,t,r,i,n){e!==t&&kp(t,function(a,o){if(n||(n=new Ar),Ke(a))nk(e,t,o,r,qp,i,n);else{var s=i?i(ko(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),wo(e,o,s)}},Cl)}function kl(e){return e}function ak(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 Ch=Math.max;function Hp(e,t,r){return t=Ch(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Ch(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),ak(e,this,s)}}function Wp(e){return function(){return e}}var sk=ma?function(e,t){return ma(e,"toString",{configurable:!0,enumerable:!1,value:Wp(t),writable:!0})}:kl,ok=800,lk=16,ck=Date.now;function hk(e){var t=0,r=0;return function(){var i=ck(),n=lk-(i-r);if(r=i,n>0){if(++t>=ok)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var jp=hk(sk);function Up(e,t){return jp(Hp(e,t,kl),e+"")}function Yp(e,t,r){if(!Ke(r))return!1;var i=typeof t;return(i=="number"?dn(r)&&_l(t,r.length):i=="string"&&t in r)?hn(r[t],e):!1}function Gp(e){return Up(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Yp(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var Vp=Gp(function(e,t,r){qp(e,t,r)}),Xp="​",uk={curveBasis:Wi,curveBasisClosed:Dw,curveBasisOpen:Nw,curveBumpX:gd,curveBumpY:md,curveBundle:Pw,curveCardinalClosed:zw,curveCardinalOpen:qw,curveCardinal:vd,curveCatmullRomClosed:Hw,curveCatmullRomOpen:Ww,curveCatmullRom:_d,curveLinear:sa,curveLinearClosed:jw,curveMonotoneX:Ed,curveMonotoneY:Ld,curveNatural:Md,curveStep:$d,curveStepAfter:Rd,curveStepBefore:Fd},dk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fk=p(function(e,t){const r=Zp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);Xn(o),i=kt(i,[...o])}else i=r.args;if(!i)return;let n=Yo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Zp=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${dk.source})(?=[}][%]{2}).*
166
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=qi.exec(e))!==null;)if(i.index===qi.lastIndex&&qi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return D.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),pk=p(function(e){return e.replace(qi,"")},"removeDirectives"),gk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return uk[r]??t}p(Sl,"interpolateToCurve");function Kp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?wp.sanitizeUrl(r):r}p(Kp,"formatUrl");var mk=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){D.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Tl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Tl,"distance");function Qp(e){let t,r=0;e.forEach(n=>{r+=Tl(n,t),t=n});const i=r/2;return Al(e,i)}p(Qp,"traverseEdge");function Jp(e){return e.length===1?e[0]:Qp(e)}p(Jp,"calcLabelPosition");var kh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Al=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Tl(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:kh((1-o)*r.x+o*n.x,5),y:kh((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),yk=p((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Al(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function tg(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Al(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}p(tg,"calcTerminalLabelPosition");function El(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(El,"getStylesFromArray");var Sh=0,eg=p(()=>(Sh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Sh),"generateId");function rg(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(rg,"makeRandomHex");var ig=p(e=>rg(e.length),"random"),bk=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"),xk=p(function(e,t){const r=t.text.replace(Cr.lineBreakRegex," "),[,i]=fn(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),ng=ci((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Cr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=we(`${o} `,r),c=we(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=vk(o,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),vk=ci((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(we(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ll(e,t){return Bl(e,t).height}p(Ll,"calculateTextHeight");function we(e,t){return Bl(e,t).width}p(we,"calculateTextWidth");var Bl=ci((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=fn(r),o=["sans-serif",i],s=e.split(Cr.lineBreakRegex),l=[],c=dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const b=bk();b.text=m||Xp;const x=xk(h,b).style("font-size",a).style("font-weight",n).style("font-family",d),y=(x._groups||x)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),f=Math.round(y.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Xr,wk=(Xr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Xr,"InitIDGenerator"),Xr),En,_k=p(function(e){return En=En||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),En.innerHTML=e,unescape(En.textContent)},"entityDecode");function Ml(e){return"str"in e}p(Ml,"isDetailedError");var Ck=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),fn=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 Qa(e,t){return Vp({},e,t)}p(Qa,"cleanAndMerge");var ae={assignWithDepth:kt,wrapLabel:ng,calculateTextHeight:Ll,calculateTextWidth:we,calculateTextDimensions:Bl,cleanAndMerge:Qa,detectInit:fk,detectDirective:Zp,isSubstringInArray:gk,interpolateToCurve:Sl,calcLabelPosition:Jp,calcCardinalityPosition:yk,calcTerminalLabelPosition:tg,formatUrl:Kp,getStylesFromArray:El,generateId:eg,random:ig,runFunc:mk,entityDecode:_k,insertTitle:Ck,isLabelCoordinateInPath:ag,parseFontSize:fn,InitIDGenerator:wk},kk=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"),Qe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Sk=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function qt(e){return e??null}p(qt,"handleUndefinedAttr");function ag(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(ag,"isLabelCoordinateInPath");const Tk=Object.freeze({left:0,top:0,width:16,height:16}),ya=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sg=Object.freeze({...Tk,...ya}),Ak=Object.freeze({...sg,body:"",hidden:!1}),Ek=Object.freeze({width:null,height:null}),Lk=Object.freeze({...Ek,...ya}),Bk=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return Ls(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return Ls(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return Ls(s,r)?s:null}return null},Ls=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Mk(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 Th(e,t){const r=Mk(e,t);for(const i in Ak)i in ya?i in e&&!(i in r)&&(r[i]=ya[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function $k(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Ah(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Th(i[s]||n[s],a)}return o(t),r.forEach(o),Th(e,a)}function Fk(e,t){if(e.icons[t])return Ah(e,t,[]);const r=$k(e,[t])[t];return r?Ah(e,t,r):null}const Rk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ok=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Eh(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(Rk);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=Ok.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function Ik(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Dk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Nk(e,t,r){const i=Ik(e);return Dk(i.defs,t+i.content+r)}const Pk=e=>e==="unset"||e==="undefined"||e==="none";function zk(e,t){const r={...sg,...e},i={...Lk,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const b=[],x=m.hFlip,y=m.vFlip;let v=m.rotate;x?y?v+=2:(b.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),b.push("scale(-1 1)"),n.top=n.left=0):y&&(b.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),b.push("scale(1 -1)"),n.top=n.left=0);let _;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:_=n.height/2+n.top,b.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:_=n.width/2+n.left,b.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}v%2===1&&(n.left!==n.top&&(_=n.left,n.left=n.top,n.top=_),n.width!==n.height&&(_=n.width,n.width=n.height,n.height=_)),b.length&&(a=Nk(a,'<g transform="'+b.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Eh(u,l/c)):(h=o==="auto"?l:o,u=s===null?Eh(h,c/l):s==="auto"?c:s);const d={},f=(m,b)=>{Pk(b)||(d[m]=b.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const qk=/\sid="(\S+)"/g,Hk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Wk=0;function jk(e,t=Hk){const r=[];let i;for(;i=qk.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(Wk++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function Uk(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 $l(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Er=$l();function og(e){Er=e}var Ui={exec:()=>null};function gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Vt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Vt={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")},Yk=/^(?:[ \t]*(?:\n|$))+/,Gk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Fl=/(?:[*+-]|\d{1,9}[.)])/,lg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cg=gt(lg).replace(/bull/g,Fl).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(),Zk=gt(lg).replace(/bull/g,Fl).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(),Rl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Kk=/^[^\n]+/,Ol=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qk=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ol).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Jk=gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Fl).getRegex(),Ja="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",Il=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tS=gt("^ {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",Il).replace("tag",Ja).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),hg=gt(Rl).replace("hr",pn).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",Ja).getRegex(),eS=gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hg).getRegex(),Dl={blockquote:eS,code:Gk,def:Qk,fences:Vk,heading:Xk,hr:pn,html:tS,lheading:cg,list:Jk,newline:Yk,paragraph:hg,table:Ui,text:Kk},Lh=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",pn).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",Ja).getRegex(),rS={...Dl,lheading:Zk,table:Lh,paragraph:gt(Rl).replace("hr",pn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lh).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",Ja).getRegex()},iS={...Dl,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Il).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:Ui,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(Rl).replace("hr",pn).replace("heading",` *#{1,6} *[^
167
+ ]`).replace("lheading",cg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,aS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ug=/^( {2,}|\\)\n(?!\s*$)/,sS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ts=/[\p{P}\p{S}]/u,Nl=/[\s\p{P}\p{S}]/u,dg=/[^\s\p{P}\p{S}]/u,oS=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nl).getRegex(),fg=/(?!~)[\p{P}\p{S}]/u,lS=/(?!~)[\s\p{P}\p{S}]/u,cS=/(?:[^\s\p{P}\p{S}]|~)/u,hS=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,pg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,uS=gt(pg,"u").replace(/punct/g,ts).getRegex(),dS=gt(pg,"u").replace(/punct/g,fg).getRegex(),gg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fS=gt(gg,"gu").replace(/notPunctSpace/g,dg).replace(/punctSpace/g,Nl).replace(/punct/g,ts).getRegex(),pS=gt(gg,"gu").replace(/notPunctSpace/g,cS).replace(/punctSpace/g,lS).replace(/punct/g,fg).getRegex(),gS=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,dg).replace(/punctSpace/g,Nl).replace(/punct/g,ts).getRegex(),mS=gt(/\\(punct)/,"gu").replace(/punct/g,ts).getRegex(),yS=gt(/^<(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(),bS=gt(Il).replace("(?:-->|$)","-->").getRegex(),xS=gt("^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",bS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ba=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,vS=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ba).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mg=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",ba).replace("ref",Ol).getRegex(),yg=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ol).getRegex(),wS=gt("reflink|nolink(?!\\()","g").replace("reflink",mg).replace("nolink",yg).getRegex(),Pl={_backpedal:Ui,anyPunctuation:mS,autolink:yS,blockSkip:hS,br:ug,code:aS,del:Ui,emStrongLDelim:uS,emStrongRDelimAst:fS,emStrongRDelimUnd:gS,escape:nS,link:vS,nolink:yg,punctuation:oS,reflink:mg,reflinkSearch:wS,tag:xS,text:sS,url:Ui},_S={...Pl,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",ba).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ba).getRegex()},So={...Pl,emStrongRDelimAst:pS,emStrongLDelim:dS,url:gt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},CS={...So,br:gt(ug).replace("{2,}","*").getRegex(),text:gt(So.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ln={normal:Dl,gfm:rS,pedantic:iS},Ai={normal:Pl,gfm:So,breaks:CS,pedantic:_S},kS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Bh=e=>kS[e];function me(e,t){if(t){if(Vt.escapeTest.test(e))return e.replace(Vt.escapeReplace,Bh)}else if(Vt.escapeTestNoEncode.test(e))return e.replace(Vt.escapeReplaceNoEncode,Bh);return e}function Mh(e){try{e=encodeURI(e).replace(Vt.percentDecode,"%")}catch{return null}return e}function $h(e,t){let r=e.replace(Vt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Vt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Vt.slashPipe,"|");return i}function Ei(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function SS(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 Fh(e,t,r,i,n){let a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function TS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
168
168
  `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
169
169
  `)}var xa=class{options;rules;lexer;constructor(t){this.options=t||Er}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:Ei(i,`
170
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=SS(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:n}}}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 n=Ei(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Ei(r[0],`
170
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=TS(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:n}}}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 n=Ei(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Ei(r[0],`
171
171
  `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ei(r[0],`
172
172
  `).split(`
173
173
  `),n="",a="",o=[];for(;i.length>0;){let s=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
@@ -188,7 +188,7 @@ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
188
188
  `+f}!g&&!f.trim()&&(g=!0),h+=k+`
189
189
  `,t=t.substring(k.length+1),d=F.slice(m)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let b=null,x;this.options.gfm&&(b=this.rules.other.listIsTask.exec(u),b&&(x=b[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!b,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}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," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=$h(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
190
190
  `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<i.length;s++)o.header.push({text:i[s],tokens:this.lexer.inline(i[s]),header:!0,align:o.align[s]});for(let s of a)o.rows.push($h(s,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));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)===`
191
- `?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=Ei(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=kS(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 n=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Fh(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Fh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,o,s,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){l+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+s);if(Math.min(a,s)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(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,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}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}}}},Re=class To{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Er,this.options.tokenizer=this.options.tokenizer||new xa,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:Vt,block:Ln.normal,inline:Ai.normal};this.options.pedantic?(r.block=Ln.pedantic,r.inline=Ai.pedantic):this.options.gfm&&(r.block=Ln.gfm,this.options.breaks?r.inline=Ai.breaks:r.inline=Ai.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ln,inline:Ai}}static lex(t,r){return new To(r).lex(t)}static lexInline(t,r){return new To(r).inlineTokens(t)}lex(t){t=t.replace(Vt.carriageReturn,`
191
+ `?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=Ei(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=SS(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 n=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Fh(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Fh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,o,s,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){l+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+s);if(Math.min(a,s)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(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,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}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}}}},Re=class To{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Er,this.options.tokenizer=this.options.tokenizer||new xa,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:Vt,block:Ln.normal,inline:Ai.normal};this.options.pedantic?(r.block=Ln.pedantic,r.inline=Ai.pedantic):this.options.gfm&&(r.block=Ln.gfm,this.options.breaks?r.inline=Ai.breaks:r.inline=Ai.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ln,inline:Ai}}static lex(t,r){return new To(r).lex(t)}static lexInline(t,r){return new To(r).inlineTokens(t)}lex(t){t=t.replace(Vt.carriageReturn,`
192
192
  `),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){for(this.options.pedantic&&(t=t.replace(Vt.tabCharGlobal," ").replace(Vt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
193
193
  `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
194
194
  `)?"":`
@@ -221,28 +221,28 @@ ${this.parser.parse(t)}</blockquote>
221
221
  ${t}</tr>
222
222
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
223
223
  `}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>${me(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 n=this.parser.parseInline(i),a=Mh(t);if(a===null)return n;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+me(r)+'"'),o+=">"+n+"</a>",o}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=Mh(t);if(a===null)return me(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${me(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:me(t.text)}},zl=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""}},Oe=class Ao{options;renderer;textRenderer;constructor(t){this.options=t||Er,this.options.renderer=this.options.renderer||new va,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new zl}static parse(t,r){return new Ao(r).parse(t)}static parseInline(t,r){return new Ao(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){i+=l||"";continue}}let o=a;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"def":{i+=this.renderer.def(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let s=o,l=this.renderer.text(s);for(;n+1<t.length&&t[n+1].type==="text";)s=t[++n],l+=`
224
- `+this.renderer.text(s);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}let o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Ii=class{options;block;constructor(t){this.options=t||Er}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Re.lex:Re.lexInline}provideParser(){return this.block?Oe.parse:Oe.parseInline}},TS=class{defaults=$l();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Oe;Renderer=va;TextRenderer=zl;Lexer=Re;Tokenizer=xa;Hooks=Ii;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let o of a.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let s of o)i=i.concat(this.walkTokens(s.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let s=a[o].flat(1/0);i=i.concat(this.walkTokens(s,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new va(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=i.renderer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new xa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=i.tokenizer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Ii;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=i.hooks[s],c=a[s];Ii.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async&&Ii.passThroughHooksRespectAsync.has(o))return Promise.resolve(l.call(a,h)).then(d=>c.call(a,d));let u=l.call(a,h);return c.call(a,u)}:a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Re.lex(t,r??this.defaults)}parser(t,r){return Oe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.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"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let s=a.hooks?a.hooks.provideLexer():t?Re.lex:Re.lexInline,l=a.hooks?a.hooks.provideParser():t?Oe.parse:Oe.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(c=>s(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>l(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let c=s(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let h=l(c,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(c){return o(c)}}}onError(t,r){return i=>{if(i.message+=`
225
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+me(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},wr=new TS;function pt(e,t){return wr.parse(e,t)}pt.options=pt.setOptions=function(e){return wr.setOptions(e),pt.defaults=wr.defaults,sg(pt.defaults),pt};pt.getDefaults=$l;pt.defaults=Er;pt.use=function(...e){return wr.use(...e),pt.defaults=wr.defaults,sg(pt.defaults),pt};pt.walkTokens=function(e,t){return wr.walkTokens(e,t)};pt.parseInline=wr.parseInline;pt.Parser=Oe;pt.parser=Oe.parse;pt.Renderer=va;pt.TextRenderer=zl;pt.Lexer=Re;pt.lexer=Re.lex;pt.Tokenizer=xa;pt.Hooks=Ii;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;Oe.parse;Re.lex;function yg(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 n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):s},[]);if(n.length){var a=new RegExp(`
224
+ `+this.renderer.text(s);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}let o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Ii=class{options;block;constructor(t){this.options=t||Er}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Re.lex:Re.lexInline}provideParser(){return this.block?Oe.parse:Oe.parseInline}},AS=class{defaults=$l();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Oe;Renderer=va;TextRenderer=zl;Lexer=Re;Tokenizer=xa;Hooks=Ii;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let o of a.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let s of o)i=i.concat(this.walkTokens(s.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let s=a[o].flat(1/0);i=i.concat(this.walkTokens(s,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new va(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=i.renderer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new xa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=i.tokenizer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Ii;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=i.hooks[s],c=a[s];Ii.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async&&Ii.passThroughHooksRespectAsync.has(o))return Promise.resolve(l.call(a,h)).then(d=>c.call(a,d));let u=l.call(a,h);return c.call(a,u)}:a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Re.lex(t,r??this.defaults)}parser(t,r){return Oe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.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"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let s=a.hooks?a.hooks.provideLexer():t?Re.lex:Re.lexInline,l=a.hooks?a.hooks.provideParser():t?Oe.parse:Oe.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(c=>s(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>l(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let c=s(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let h=l(c,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(c){return o(c)}}}onError(t,r){return i=>{if(i.message+=`
225
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+me(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},wr=new AS;function pt(e,t){return wr.parse(e,t)}pt.options=pt.setOptions=function(e){return wr.setOptions(e),pt.defaults=wr.defaults,og(pt.defaults),pt};pt.getDefaults=$l;pt.defaults=Er;pt.use=function(...e){return wr.use(...e),pt.defaults=wr.defaults,og(pt.defaults),pt};pt.walkTokens=function(e,t){return wr.walkTokens(e,t)};pt.parseInline=wr.parseInline;pt.Parser=Oe;pt.parser=Oe.parse;pt.Renderer=va;pt.TextRenderer=zl;pt.Lexer=Re;pt.lexer=Re.lex;pt.Tokenizer=xa;pt.Hooks=Ii;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;Oe.parse;Re.lex;function bg(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 n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):s},[]);if(n.length){var a=new RegExp(`
226
226
  [ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
227
227
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=s;typeof s=="string"&&s.includes(`
228
228
  `)&&(u=String(s).split(`
229
229
  `).map(function(d,f){return f===0?d:""+h+d}).join(`
230
- `)),o+=u+i[l+1]}),o}var bg={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},Eo=new Map,xg=new Map,vg=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(D.debug("Registering icon pack:",t.name),"loader"in t)xg.set(t.name,t.loader);else if("icons"in t)Eo.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),wg=p(async(e,t)=>{const r=Lk(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 n=Eo.get(i);if(!n){const o=xg.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},Eo.set(i,n)}catch(s){throw D.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=$k(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),AS=p(async e=>{try{return await wg(e),!0}catch{return!1}},"isIconAvailable"),ui=p(async(e,t,r)=>{let i;try{i=await wg(e,t?.fallbackPrefix)}catch(o){D.error(o),i=bg}const n=Pk(i,t),a=jk(Wk(n.body),{...n.attributes,...r});return re(a,Ot())},"getIconSVG");function _g(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
230
+ `)),o+=u+i[l+1]}),o}var xg={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},Eo=new Map,vg=new Map,wg=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(D.debug("Registering icon pack:",t.name),"loader"in t)vg.set(t.name,t.loader);else if("icons"in t)Eo.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),_g=p(async(e,t)=>{const r=Bk(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 n=Eo.get(i);if(!n){const o=vg.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},Eo.set(i,n)}catch(s){throw D.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Fk(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),ES=p(async e=>{try{return await _g(e),!0}catch{return!1}},"isIconAvailable"),ui=p(async(e,t,r)=>{let i;try{i=await _g(e,t?.fallbackPrefix)}catch(o){D.error(o),i=xg}const n=zk(i,t),a=Uk(jk(n.body),{...n.attributes,...r});return re(a,Ot())},"getIconSVG");function Cg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
231
231
  `).replace(/\n{2,}/g,`
232
- `),n=yg(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(_g,"preprocessMarkdown");function Cg(e,t={}){const r=_g(e,t),i=pt.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
233
- `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&n[a].push({content:d,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"?n[a].push({content:s.text,type:"normal"}):n[a].push({content:s.raw,type:"normal"})}),n}p(Cg,"markdownToLines");function kg(e,{markdownAutoWrap:t}={}){const r=pt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(D.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(kg,"markdownToHTML");function Sg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sg,"splitTextToChars");function Tg(e,t){const r=Sg(t.content);return ql(e,[],r,t.type)}p(Tg,"splitWordToFitWidth");function ql(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?ql(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ql,"splitWordToFitWidthRecursion");function Ag(e,t){if(e.some(({content:r})=>r.includes(`
234
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wa(e,t)}p(Ag,"splitLineToFitWidth");function wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return wa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Tg(t,a);r.push([s]),l.content&&e.unshift(l)}return wa(e,t,r)}p(wa,"splitLineToFitWidthRecursion");function Lo(e,t){t&&e.attr("style",t)}p(Lo,"applyStyle");async function Eg(e,t,r,i,n=!1,a=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=yr(t.label)?await Ra(t.label.replace(Cr.lineBreakRegex,`
235
- `),a):re(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),Lo(h,t.labelStyle),h.attr("class",`${c} ${i}`),Lo(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"),n&&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(Eg,"addHtmlSpan");function es(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(es,"createTspan");function Lg(e,t,r){const i=e.append("text"),n=es(i,1,t);rs(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Lg,"computeWidthOfText");function Bg(e,t,r){const i=e.append("text"),n=es(i,1,t);rs(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Bg,"computeDimensionOfText");function Mg(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(d=>Lg(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:Ag(c,h);for(const d of u){const f=es(s,l,1.1);rs(f,d),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}p(Mg,"createFormattedText");function rs(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(rs,"updateTextContentAndStyles");async function Hl(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{const s=`${a}:${o}`;return await AS(s)?await ui(s,void 0,{class:"label-icon"}):`<i class='${re(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Hl,"replaceIconSubstring");var He=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(D.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=kg(t,c),u=await Hl(Qe(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:yr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await Eg(e,f,s,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=Cg(h.replace("<br>","<br/>"),c),d=Mg(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).select("text").attr("style",g)}return d}},"createText");function Bs(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function ES(e,t){return e[0]===t[0]&&e[1]===t[1]}function LS(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)Bs(c,s,n);const l=(function(c,h,u){const d=[];for(const y of c){const v=[...y];ES(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&d.push(v)}const f=[];h=Math.max(h,.1);const g=[];for(const y of d)for(let v=0;v<y.length-1;v++){const _=y[v],w=y[v+1];if(_[1]!==w[1]){const C=Math.min(_[1],w[1]);g.push({ymin:C,ymax:Math.max(_[1],w[1]),x:C===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(g.sort(((y,v)=>y.ymin<v.ymin?-1:y.ymin>v.ymin?1:y.x<v.x?-1:y.x>v.x?1:y.ymax===v.ymax?0:(y.ymax-v.ymax)/Math.abs(y.ymax-v.ymax))),!g.length)return f;let m=[],b=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let y=-1;for(let v=0;v<g.length&&!(g[v].ymin>b);v++)y=v;g.splice(0,y+1).forEach((v=>{m.push({s:b,edge:v})}))}if(m=m.filter((y=>!(y.edge.ymax<=b))),m.sort(((y,v)=>y.edge.x===v.edge.x?0:(y.edge.x-v.edge.x)/Math.abs(y.edge.x-v.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let y=0;y<m.length;y+=2){const v=y+1;if(v>=m.length)break;const _=m[y].edge,w=m[v].edge;f.push([[Math.round(_.x),b],[Math.round(w.x),b]])}b+=u,m.forEach((y=>{y.edge.x=y.edge.x+u*y.edge.islope})),x++}return f})(o,a,i);if(n){for(const c of o)Bs(c,s,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),Bs(d,h,u)})(l,s,-n)}return l}function gn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),LS(e,n,i,a||1)}class Wl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=gn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function is(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 BS extends Wl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=gn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)is([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class MS extends Wl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class $S{constructor(t){this.helper=t}fillPolygons(t,r){const i=gn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=is(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(s[0][0]+s[1][0])/2-n/4,f=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,b=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,y=this.helper.ellipse(b,x,a,a,r);i.push(...y.ops)}}return{type:"fillSketch",ops:i}}}class FS{constructor(t){this.helper=t}fillPolygons(t,r){const i=gn(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,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const s=is(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,b=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(b[0],b[1],x[0],x[1],r))}})),a}}class RS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=gn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const o=is(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],b=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],b[0],b[1],i))}})),n}}const Qt={};class OS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const IS=0,Ms=1,Rh=2,Bn={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 $s(e,t){return e.type===t}function jl(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:IS,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:Ms,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Rh,text:""},s})(e);let i="BOD",n=0,a=r[n];for(;!$s(a,Rh);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return jl("M0,0"+e);n++,o=Bn[a.text],i=a.text}else $s(a,Ms)?o=Bn[i]:(n++,o=Bn[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!$s(c,Ms))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Bn[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function $g(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Fg(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-s),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-s),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,b=n+2*(g-n)/3,x=u+2*(f-u)/3,y=d+2*(g-d)/3;t.push({key:"C",data:[m,b,x,y,u,d]}),s=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,b=n+2*(d-n)/3,x=f+2*(u-f)/3,y=g+2*(d-g)/3;t.push({key:"C",data:[m,b,x,y,f,g]}),s=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],b=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,b,x,b,x]}),i=b,n=x):(i!==b||n!==x)&&(Rg(i,n,b,x,u,d,f,g,m).forEach((function(y){t.push({key:"C",data:y})})),i=b,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function Li(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Rg(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,b=0;if(c)[f,g,m,b]=c;else{[e,t]=Li(e,t,-h),[r,i]=Li(r,i,-h);const N=(e-r)/2,E=(t-i)/2;let T=N*N/(n*n)+E*E/(a*a);T>1&&(T=Math.sqrt(T),n*=T,a*=T);const A=n*n,R=a*a,B=A*R-A*E*E-R*N*N,z=A*E*E+R*N*N,W=(s===l?-1:1)*Math.sqrt(Math.abs(B/z));m=W*n*E/a+(e+r)/2,b=W*-a*N/n+(t+i)/2,f=Math.asin(parseFloat(((t-b)/a).toFixed(9))),g=Math.asin(parseFloat(((i-b)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const N=g,E=r,T=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Rg(r=m+n*Math.cos(g),i=b+a*Math.sin(g),E,T,n,a,o,0,l,[g,N,m,b])}x=g-f;const y=Math.cos(f),v=Math.sin(f),_=Math.cos(g),w=Math.sin(g),C=Math.tan(x/4),k=4/3*n*C,F=4/3*a*C,$=[e,t],O=[e+k*v,t-F*y],M=[r+k*w,i-F*_],P=[r,i];if(O[0]=2*$[0]-O[0],O[1]=2*$[1]-O[1],c)return[O,M,P].concat(d);{d=[O,M,P].concat(d);const N=[];for(let E=0;E<d.length;E+=3){const T=Li(d[E][0],d[E][1],h),A=Li(d[E+1][0],d[E+1][1],h),R=Li(d[E+2][0],d[E+2][1],h);N.push([T[0],T[1],A[0],A[1],R[0],R[1]])}return N}}const DS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return _a(e,t,r)},ellipse:function(e,t,r,i,n){const a=Ig(r,i,n);return Bo(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Xe(e,t,r,i,n,!0)}};function Og(e,t,r,i,n){return{type:"path",ops:Xe(e,t,r,i,n)}}function jn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Xe(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Xe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Og(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function NS(e,t,r,i,n){return(function(a,o){return jn(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Oh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Mn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Mn(r[0],1.5*(1+.22*t.roughness),Nh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Mn(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Mn(o,1.5*(1+.22*t.roughness),Nh(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Ig(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=st(o*l,r),s+=st(s*l,r),{increment:a,rx:o,ry:s}}function Bo(e,t,r,i){const[n,a]=Ph(i.increment,e,t,i.rx,i.ry,1,i.increment*_a(.1,_a(.4,1,r),r),r);let o=Ca(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Ph(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ca(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Ih(e,t,r,i,n,a,o,s,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=st(.01*u,l),d+=st(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,b=Math.min(m/2,(g-f)/2),x=zh(b,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const y=zh(b,c,h,u,d,f,g,1.5,l);x.push(...y)}return o&&(s?x.push(...Xe(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Xe(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function Dh(e,t){const r=Fg($g(jl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Xe(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,d,f]=s;i.push(...PS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Xe(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Fs(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+st(n,t),i[0][1]+st(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+st(n,t),i[o][1]+st(n,t)]})}}return{type:"fillPath",ops:r}}function Rr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Qt[n])switch(n){case"zigzag":Qt[n]||(Qt[n]=new BS(i));break;case"cross-hatch":Qt[n]||(Qt[n]=new MS(i));break;case"dots":Qt[n]||(Qt[n]=new $S(i));break;case"dashed":Qt[n]||(Qt[n]=new FS(i));break;case"zigzag-line":Qt[n]||(Qt[n]=new RS(i));break;default:n="hachure",Qt[n]||(Qt[n]=new Wl(i))}return Qt[n]})(t,DS).fillPolygons(e,t)}function Nh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Dg(e){return e.randomizer||(e.randomizer=new OS(e.seed||0)),e.randomizer.next()}function _a(e,t,r,i=1){return r.roughness*i*(Dg(r)*(t-e)+e)}function st(e,t,r=1){return _a(-e,e,t,r)}function Xe(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Mo(e,t,r,i,n,!0,!1);if(o)return s;const l=Mo(e,t,r,i,n,!0,!0);return s.concat(l)}function Mo(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*Dg(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=st(f,n,c),g=st(g,n,c);const m=[],b=()=>st(u,n,c),x=()=>st(h,n,c),y=n.preserveVertices;return o?m.push({op:"move",data:[e+(y?0:b()),t+(y?0:b())]}):m.push({op:"move",data:[e+(y?0:st(h,n,c)),t+(y?0:st(h,n,c))]}),o?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+b(),g+t+(i-t)*d+b(),f+e+2*(r-e)*d+b(),g+t+2*(i-t)*d+b(),r+(y?0:b()),i+(y?0:b())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(y?0:x()),i+(y?0:x())]}),m}function Mn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+st(t,r),e[n][1]+st(t,r)]),n===e.length-1&&i.push([e[n][0]+st(t,r),e[n][1]+st(t,r)]);return Ca(i,null,r)}function Ca(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[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],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Mo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Ph(e,t,r,i,n,a,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=st(.5,s)-Math.PI/2;c.push([st(a,s)+t+.9*i*Math.cos(h-e),st(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[st(a,s)+t+i*Math.cos(d),st(a,s)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([st(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),st(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([st(a,s)+t+.98*i*Math.cos(h+o),st(a,s)+r+.98*n*Math.sin(h+o)]),c.push([st(a,s)+t+.9*i*Math.cos(h+.5*o),st(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function zh(e,t,r,i,n,a,o,s,l){const c=a+st(.1,l),h=[];h.push([st(s,l)+t+.9*i*Math.cos(c-e),st(s,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([st(s,l)+t+i*Math.cos(u),st(s,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),Ca(h,null,l)}function PS(e,t,r,i,n,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:st(c[0],s)),o[1]+(d?0:st(c[0],s))]}),h=d?[n,a]:[n+st(c[f],s),a+st(c[f],s)],l.push({op:"bcurveTo",data:[e+st(c[f],s),t+st(c[f],s),r+st(c[f],s),i+st(c[f],s),h[0],h[1]]});return l}function Bi(e){return[...e]}function qh(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(Bi(e[0]),Bi(e[1]),Bi(e[2]),Bi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(Bi(n[0]));for(let s=1;s+2<n.length;s++){const l=n[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*n[s+1][0]-o*n[s-1][0])/6,l[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function Un(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zS(e,t,r){const i=Un(t,r);if(i===0)return Un(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Un(e,or(t,r,n))}function or(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function $o(e,t,r,i){const n=i||[];if((function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],d=s[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let b=3*u[1]-2*d[1]-c[1];return b*=b,f<m&&(f=m),g<b&&(g=b),f+g})(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(Un(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=or(l,c,.5),f=or(c,h,.5),g=or(h,u,.5),m=or(d,f,.5),b=or(f,g,.5),x=or(m,b,.5);$o([l,d,m,x],0,r,n),$o([x,b,g,u],0,r,n)}var a,o;return n}function qS(e,t){return ka(e,0,e.length,t)}function ka(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=zS(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ka(e,t,c+1,i,a),ka(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Rs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)$o(e,3*a,t,i);return r&&r>0?ka(i,0,i.length,r):i}const ee="none";class Sa{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,n,a){const o=this._o(a);return this._d("line",[Og(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=NS(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(Fs([c],o)):s.push(Rr([c],o))}return o.stroke!==ee&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=Ig(i,n,o),c=Bo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Bo(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Rr([c.estimatedPoints],o));return o.stroke!==ee&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[jn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Ih(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Ih(t,r,i,n,a,o,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,b,x,y){const v=d,_=f;let w=Math.abs(g/2),C=Math.abs(m/2);w+=st(.01*w,y),C+=st(.01*C,y);let k=b,F=x;for(;k<0;)k+=2*Math.PI,F+=2*Math.PI;F-k>2*Math.PI&&(k=0,F=2*Math.PI);const $=(F-k)/y.curveStepCount,O=[];for(let M=k;M<=F;M+=$)O.push([v+w*Math.cos(M),_+C*Math.sin(M)]);return O.push([v+w*Math.cos(F),_+C*Math.sin(F)]),O.push([v,_]),Rr([O],y)})(t,r,i,n,a,o,c));return c.stroke!==ee&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Oh(t,i);if(i.fill&&i.fill!==ee)if(i.fillStyle==="solid"){const o=Oh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Rs(qh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Rs(qh(c),10,(1+i.roughness)/2))}o.length&&n.push(Rr([o],i))}return i.stroke!==ee&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=jn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Fs([t],i)):n.push(Rr([t],i))),i.stroke!==ee&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ee,o=i.stroke!==ee,s=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=Fg($g(jl(h))),g=[];let m=[],b=[0,0],x=[];const y=()=>{x.length>=4&&m.push(...Rs(x,u)),x=[]},v=()=>{y(),m.length&&(g.push(m),m=[])};for(const{key:w,data:C}of f)switch(w){case"M":v(),b=[C[0],C[1]],m.push(b);break;case"L":y(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const k=m.length?m[m.length-1]:b;x.push([k[0],k[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":y(),m.push([b[0],b[1]])}if(v(),!d)return g;const _=[];for(const w of g){const C=qS(w,d);C.length&&_.push(C)}return _})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Dh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Dh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Fs(l,i));else n.push(Rr(l,i));return o&&(s?l.forEach((h=>{n.push(jn(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ee};break;case"fillPath":o={d:this.opsToPath(a),stroke:ee,strokeWidth:0,fill:i.fill||ee};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ee,strokeWidth:i,fill:ee}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class HS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Sa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((s=>+s.toFixed(i))):a.data;switch(a.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(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}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,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}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 $n="http://www.w3.org/2000/svg";class WS{constructor(t,r){this.svg=t,this.gen=new Sa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS($n,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS($n,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS($n,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS($n,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}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,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}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 Z={canvas:(e,t)=>new HS(e,t),svg:(e,t)=>new WS(e,t),generator:e=>new Sa(e),newSeed:()=>Sa.newSeed()},at=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||St(ft()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await He(o,re(Qe(s),ft()),{useHtmlLabels:n,width:t.width||ft().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],d=dt(l),f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const y=ft().fontSize?ft().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[_=Go.fontSize]=fn(y),w=_*v+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";b(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),Os=p(async(e,t,r)=>{const i=r.useHtmlLabels||St(ft()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await He(n,re(Qe(t),ft()),{useHtmlLabels:i,width:r.width||ft()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(St(ft()?.flowchart?.htmlLabels)){const l=a.children[0],c=dt(a);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),nt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ut(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ut,"createPathFromPoints");function Ze(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,b=d+n*Math.sin(u*(m-e));o.push({x:m,y:b})}return o}p(Ze,"generateFullSineWavePoints");function an(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(an,"generateCirclePoints");var jS=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),di=jS;function Ng(e,t){t&&e.attr("style",t)}p(Ng,"applyStyle");async function Pg(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ft();let n=e.label;e.label&&yr(e.label)&&(n=await Ra(e.label.replace(Cr.lineBreakRegex,`
236
- `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(re(o,i)),Ng(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(Pg,"addHtmlLabel");var US=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),St(ft().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),D.info("vertexText"+n);const a={isNode:i,label:Qe(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Pg(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),dr=US,Je=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),zg=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=St(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await He(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],F=dt(g);m=k.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,y=t.x-b/2,v=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=Z.svg(u),F=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),$=k.path(Je(y,v,b,x,0),F);_=u.insert(()=>(D.debug("Rough node insert CXC",$),$),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",v).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=Ua(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const k=f.select("span");k&&k.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(k){return di(t,k)},{cluster:u,labelBBox:m}},"rect"),YS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return di(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),GS=p(async(e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=u.node().appendChild(await dr(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(St(r.flowchart.htmlLabels)){const $=f.children[0],O=dt(f);g=$.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const m=0*t.padding,b=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 y=t.height+m,v=t.height+m-g.height-6,_=t.x-x/2,w=t.y-y/2;t.width=x;const C=t.y-t.height/2-b+g.height+2;let k;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),O=Z.svg(c),M=t.rx||t.ry?O.path(Je(_,w,x,y,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(_,w,x,y,{seed:n});k=c.insert(()=>M,":first-child");const P=O.rectangle(_,C,x,v,{fill:$?a:o,fillStyle:$?"hachure":"solid",stroke:l,seed:n});k=c.insert(()=>M,":first-child"),d=c.insert(()=>P)}else k=h.insert("rect",":first-child"),k.attr("class","outer").attr("x",_).attr("y",w).attr("width",x).attr("height",y).attr("data-look",t.look),d.attr("class","inner").attr("x",_).attr("y",C).attr("width",x).attr("height",v);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(St(r.flowchart.htmlLabels)?0:3)})`);const F=k.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function($){return di(t,$)},{cluster:c,labelBBox:g}},"roundedWithTitle"),VS=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=St(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await He(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],F=dt(g);m=k.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,y=t.x-b/2,v=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=Z.svg(u),F=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),$=k.path(Je(y,v,b,x,t.rx),F);_=u.insert(()=>(D.debug("Rough node insert CXC",$),$),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",v).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=Ua(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const k=f.select("span");k&&k.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(k){return di(t,k)},{cluster:u,labelBBox:m}},"kanbanSection"),XS=p((e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const b=Z.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=o.insert(()=>b,":first-child")}else f=s.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return di(t,m)},{cluster:o,labelBBox:{}}},"divider"),ZS=zg,KS={rect:zg,squareRect:ZS,roundedWithTitle:GS,noteGroup:YS,divider:XS,kanbanSection:VS},qg=new Map,Hg=p(async(e,t)=>{const r=t.shape||"rect",i=await KS[r](e,t);return qg.set(t.id,i),i},"insertCluster"),QS=p(()=>{qg=new Map},"clear");function Wg(e,t){return e.intersect(t)}p(Wg,"intersectNode");var JS=Wg;function jg(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(jg,"intersectEllipse");var Ug=jg;function Yg(e,t,r){return Ug(e,t,t,r)}p(Yg,"intersectCircle");var tT=Yg;function Gg(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=n*r.x+a*r.y+o,l=n*i.x+a*i.y+o,c=1e-6;if(s!==0&&l!==0&&Fo(s,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&Fo(f,g))return;const m=n*u-h*a;if(m===0)return;const b=Math.abs(m/2);let x=a*d-u*o;const y=x<0?(x-b)/m:(x+b)/m;x=h*o-n*d;const v=x<0?(x-b)/m:(x+b)/m;return{x:y,y:v}}}p(Gg,"intersectLine");function Fo(e,t){return e*t>0}p(Fo,"sameSign");var eT=Gg;function Vg(e,t,r){let i=e.x,n=e.y,a=[],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 l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=eT(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,b=u.y-r.y,x=Math.sqrt(m*m+b*b);return g<x?-1:g===x?0:1}),a[0]):e}p(Vg,"intersectPolygon");var rT=Vg,U={node:JS,circle:tT,ellipse:Ug,polygon:rT,rect:di};function Xg(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=nt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=Z.svg(a),c=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",qt(s)),Q(t,u),t.intersect=function(d){return D.info("Circle intersect",t,o,d),U.circle(t,o,d)},a}p(Xg,"anchor");function Ro(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),x=l+b*a*Math.sin(h)*(o?-1:1),y=c-b*n*Math.cos(h)*(o?-1:1),v=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-v;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const F=k/19,$=v+F*w,O=x+n*Math.cos($),M=y+a*Math.sin($);C.push({x:O,y:M})}return C}p(Ro,"generateArcPoints");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Ro(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Ro(o/2,s/2,o/2,-s/2,c,l,!0)],d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ut(u),m=d.path(g,f),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${c/2}, 0)`),Q(t,b),t.intersect=function(x){return U.polygon(t,u,x)},n}p(Zg,"bowTieRect");function tr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(tr,"insertPolygonShape");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,d=0,f=[{x:c+s,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const b=Z.svg(n),x=K(t,{}),y=ut(f),v=b.path(y,x);g=n.insert(()=>v,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=tr(n,l,o,f);return i&&g.attr("style",i),Q(t,g),t.intersect=function(b){return U.polygon(t,f,b)},n}p(Kg,"card");function Qg(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ut(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return U.polygon(t,o,d)},i}p(Qg,"choice");async function Ul(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:s}=await at(e,t,nt(t)),l=r?.padding??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(a),f=K(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",qt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return U.circle(d,g,f)},t.intersect=function(d){return D.info("Circle intersect",t,c,d),U.circle(t,c,d)},a}p(Ul,"circle");function Jg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={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 ${a.x},${a.y} L ${s.x},${s.y}
237
- M ${n.x},${n.y} L ${o.x},${o.y}`}p(Jg,"createLine");function tm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=Z.svg(n),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=Jg(a),u=s.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Q(t,d),t.intersect=function(f){return D.info("crossedCircle intersect",t,{radius:a,point:f}),U.circle(t,a,f)},n}p(tm,"crossedCircle");function Me(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Me,"generateCirclePoints");async function em(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Me(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Me(s/2+c*2,-c,c,20,-180,-270),...Me(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Me(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Me(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Me(s/2+s*.1,-c,c,20,-180,-270),...Me(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Me(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ut(u).replace("Z",""),x=f.path(b,g),y=ut(d),v=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>v,":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(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,d,w)},n}p(em,"curlyBraceLeft");function $e(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:f,y:g})}return o}p($e,"generateCirclePoints");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...$e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...$e(s/2+c*2,-c,c,20,-180,-270),...$e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...$e(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...$e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...$e(s/2+c*2,-c,c,20,-180,-270),...$e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...$e(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ut(u).replace("Z",""),x=f.path(b,g),y=ut(d),v=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>v,":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(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,d,w)},n}p(rm,"curlyBraceRight");function Ft(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Ft,"generateCirclePoints");async function im(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ft(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Ft(s/2+c*2,-c,c,20,-180,-270),...Ft(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Ft(s/2,l/2,c,20,0,90)],d=[...Ft(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ft(-s/2-c/2,-c,c,20,0,90),...Ft(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ft(-s/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Ft(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Ft(s/2+c*2,-c,c,20,-180,-270),...Ft(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Ft(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Ft(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ft(-s/2-c/2,-c,c,20,0,90),...Ft(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ft(-s/2+c+c/2,l/2,c,30,-180,-270)],g=Z.svg(n),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ut(u).replace("Z",""),y=g.path(x,m),_=ut(d).replace("Z",""),w=g.path(_,m),C=ut(f),k=g.path(C,{...m}),F=n.insert("g",":first-child");return F.insert(()=>k,":first-child").attr("stroke-opacity",0),F.insert(()=>y,":first-child"),F.insert(()=>w,":first-child"),F.attr("class","text"),h&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,F),t.intersect=function($){return U.polygon(t,f,$)},n}p(im,"curlyBraces");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,b=g-h,x=m/4,y=[{x:b,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:b,y:m},...an(-b,-m/2,h,50,270,90)],v=ut(y),_=d.path(v,f),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,w),t.intersect=function(C){return U.polygon(t,y,C)},n}p(nm,"curvedTrapezoid");var iT=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),nT=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),aT=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function am(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=nT(0,0,s,h,l,c),m=aT(0,c,s,h,l,c),b=f.path(g,K(t,{})),x=f.path(m,K(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>b,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=iT(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",qt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=U.rect(t,f),m=g.x-(t.x??0);if(l!=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-c)){let b=c*c*(1-m*m/(l*l));b>0&&(b=Math.sqrt(b)),b=c-b,f.y-(t.y??0)>0&&(b=-b),g.y+=b}return g},n}p(am,"cylinder");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],b=f.polygon(m.map(y=>[y.x,y.y]),g),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},n}p(sm,"dividedRectangle");async function om(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await at(e,t,nt(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{roughness:.2,strokeWidth:2.5}),g=K(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),b=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",qt(t.cssClasses)).attr("style",qt(u)),h.node()?.appendChild(m),h.node()?.appendChild(b)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,h),t.intersect=function(d){return D.info("DoubleCircle intersect",t,l,d),U.circle(t,l,d)},n}p(om,"doublecircle");function lm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=Z.svg(a),{nodeBorder:c}=r,h=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Q(t,d),t.intersect=function(f){return D.info("filledCircle intersect",t,{radius:o,point:f}),U.circle(t,o,f)},a}p(lm,"filledCircle");async function cm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ut(h),m=d.path(g,f),b=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=s,t.height=l,Q(t,b),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return D.info("Triangle intersect",t,h,x),U.polygon(t,h,x)},n}p(cm,"flippedTriangle");function hm(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=X(t);t.label="";const o=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,d=Z.svg(o),f=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const b=i?.padding??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(x){return U.rect(t,x)},o}p(hm,"forkJoin");async function um(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await at(e,t,nt(t)),l=Math.max(n,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...an(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ut(g),b=d.path(m,f),x=o.insert(()=>b,":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),Q(t,x),t.intersect=function(y){return D.info("Pill intersect",t,{radius:h,point:y}),U.polygon(t,g,y)},o}p(um,"halfRoundedRectangle");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+(t.padding??0),s=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Z.svg(n),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const d=u/6;u=u+d;const f=o/2,g=f/2,m=u-g,b=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:u,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-u,y:0}],x=ut(b),y=c.path(x,h),v=n.insert(()=>y,":first-child");return v.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),t.width=s,t.height=o,Q(t,v),t.intersect=function(_){return U.polygon(t,b,_)},n}p(dm,"hexagon");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await at(e,t,nt(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=Z.svg(n),c=K(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ut(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(t,f),t.intersect=function(g){return D.info("Pill intersect",t,{points:h}),U.polygon(t,h,g)},n}p(fm,"hourglass");async function pm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),d=t.pos==="t",f=s,g=s,{nodeBorder:m}=r,{stylesMap:b}=li(t),x=-g/2,y=-f/2,v=t.label?8:0,_=Z.svg(c),w=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=_.rectangle(x,y,g,f,w),k=Math.max(g,h.width),F=f+h.height+v,$=_.rectangle(-k/2,-F/2,k,F,{...w,fill:"transparent",stroke:"none"}),O=c.insert(()=>C,":first-child"),M=c.insert(()=>$);if(t.icon){const P=c.append("g");P.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const N=P.node().getBBox(),E=N.width,T=N.height,A=N.x,R=N.y;P.attr("transform",`translate(${-E/2-A},${d?h.height/2+v/2-T/2-R:-h.height/2-v/2-T/2-R})`),P.attr("style",`color: ${b.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-F/2:F/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Q(t,M),t.intersect=function(P){if(D.info("iconSquare intersect",t,P),!t.label)return U.rect(t,P);const N=t.x??0,E=t.y??0,T=t.height??0;let A=[];return d?A=[{x:N-h.width/2,y:E-T/2},{x:N+h.width/2,y:E-T/2},{x:N+h.width/2,y:E-T/2+h.height+v},{x:N+g/2,y:E-T/2+h.height+v},{x:N+g/2,y:E+T/2},{x:N-g/2,y:E+T/2},{x:N-g/2,y:E-T/2+h.height+v},{x:N-h.width/2,y:E-T/2+h.height+v}]:A=[{x:N-g/2,y:E-T/2},{x:N+g/2,y:E-T/2},{x:N+g/2,y:E-T/2+f},{x:N+h.width/2,y:E-T/2+f},{x:N+h.width/2/2,y:E+T/2},{x:N-h.width/2,y:E+T/2},{x:N-h.width/2,y:E-T/2+f},{x:N-g/2,y:E-T/2+f}],U.polygon(t,A,P)},c}p(pm,"icon");async function gm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:b}=r,{stylesMap:x}=li(t),y=Z.svg(c),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=x.get("fill");v.stroke=_??b;const w=c.append("g");t.icon&&w.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=w.node().getBBox(),k=C.width,F=C.height,$=C.x,O=C.y,M=Math.max(k,F)*Math.SQRT2+d*2,P=y.circle(0,0,M,v),N=Math.max(M,h.width),E=M+h.height+f,T=y.rectangle(-N/2,-E/2,N,E,{...v,fill:"transparent",stroke:"none"}),A=c.insert(()=>P,":first-child"),R=c.insert(()=>T);return w.attr("transform",`translate(${-k/2-$},${g?h.height/2+f/2-F/2-O:-h.height/2-f/2-F/2-O})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-E/2:E/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),Q(t,R),t.intersect=function(B){return D.info("iconSquare intersect",t,B),U.rect(t,B)},c}p(gm,"iconCircle");async function mm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:b,mainBkg:x}=r,{stylesMap:y}=li(t),v=-m/2,_=-g/2,w=t.label?8:0,C=Z.svg(c),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const F=y.get("fill");k.stroke=F??x;const $=C.path(Je(v,_,m,g,5),k),O=Math.max(m,h.width),M=g+h.height+w,P=C.rectangle(-O/2,-M/2,O,M,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>$,":first-child").attr("class","icon-shape2"),E=c.insert(()=>P);if(t.icon){const T=c.append("g");T.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),R=A.width,B=A.height,z=A.x,W=A.y;T.attr("transform",`translate(${-R/2-z},${f?h.height/2+w/2-B/2-W:-h.height/2-w/2-B/2-W})`),T.attr("style",`color: ${y.get("stroke")??b};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-M/2:M/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Q(t,E),t.intersect=function(T){if(D.info("iconSquare intersect",t,T),!t.label)return U.rect(t,T);const A=t.x??0,R=t.y??0,B=t.height??0;let z=[];return f?z=[{x:A-h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2+h.height+w},{x:A+m/2,y:R-B/2+h.height+w},{x:A+m/2,y:R+B/2},{x:A-m/2,y:R+B/2},{x:A-m/2,y:R-B/2+h.height+w},{x:A-h.width/2,y:R-B/2+h.height+w}]:z=[{x:A-m/2,y:R-B/2},{x:A+m/2,y:R-B/2},{x:A+m/2,y:R-B/2+g},{x:A+h.width/2,y:R-B/2+g},{x:A+h.width/2/2,y:R+B/2},{x:A-h.width/2,y:R+B/2},{x:A-h.width/2,y:R-B/2+g},{x:A-m/2,y:R-B/2+g}],U.polygon(t,z,T)},c}p(mm,"iconRounded");async function ym(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:b,mainBkg:x}=r,{stylesMap:y}=li(t),v=-m/2,_=-g/2,w=t.label?8:0,C=Z.svg(c),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const F=y.get("fill");k.stroke=F??x;const $=C.path(Je(v,_,m,g,.1),k),O=Math.max(m,h.width),M=g+h.height+w,P=C.rectangle(-O/2,-M/2,O,M,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>$,":first-child"),E=c.insert(()=>P);if(t.icon){const T=c.append("g");T.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),R=A.width,B=A.height,z=A.x,W=A.y;T.attr("transform",`translate(${-R/2-z},${f?h.height/2+w/2-B/2-W:-h.height/2-w/2-B/2-W})`),T.attr("style",`color: ${y.get("stroke")??b};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-M/2:M/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Q(t,E),t.intersect=function(T){if(D.info("iconSquare intersect",t,T),!t.label)return U.rect(t,T);const A=t.x??0,R=t.y??0,B=t.height??0;let z=[];return f?z=[{x:A-h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2+h.height+w},{x:A+m/2,y:R-B/2+h.height+w},{x:A+m/2,y:R+B/2},{x:A-m/2,y:R+B/2},{x:A-m/2,y:R-B/2+h.height+w},{x:A-h.width/2,y:R-B/2+h.height+w}]:z=[{x:A-m/2,y:R-B/2},{x:A+m/2,y:R-B/2},{x:A+m/2,y:R-B/2+g},{x:A+h.width/2,y:R-B/2+g},{x:A+h.width/2/2,y:R+B/2},{x:A-h.width/2,y:R+B/2},{x:A-h.width/2,y:R-B/2+g},{x:A-m/2,y:R-B/2+g}],U.polygon(t,z,T)},c}p(ym,"iconSquare");async function bm(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=X(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?s??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:d,label:f}=await at(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,b=-h/2,x=t.label?8:0,y=Z.svg(u),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=y.rectangle(m,b,c,h,v),w=Math.max(c,d.width),C=h+d.height+x,k=y.rectangle(-w/2,-C/2,w,C,{...v,fill:"none",stroke:"none"}),F=u.insert(()=>_,":first-child"),$=u.insert(()=>k);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?C/2-h:-C/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),F.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Q(t,$),t.intersect=function(O){if(D.info("iconSquare intersect",t,O),!t.label)return U.rect(t,O);const M=t.x??0,P=t.y??0,N=t.height??0;let E=[];return g?E=[{x:M-d.width/2,y:P-N/2},{x:M+d.width/2,y:P-N/2},{x:M+d.width/2,y:P-N/2+d.height+x},{x:M+c/2,y:P-N/2+d.height+x},{x:M+c/2,y:P+N/2},{x:M-c/2,y:P+N/2},{x:M-c/2,y:P-N/2+d.height+x},{x:M-d.width/2,y:P-N/2+d.height+x}]:E=[{x:M-c/2,y:P-N/2},{x:M+c/2,y:P-N/2},{x:M+c/2,y:P-N/2+h},{x:M+d.width/2,y:P-N/2+h},{x:M+d.width/2/2,y:P+N/2},{x:M-d.width/2,y:P+N/2},{x:M-d.width/2,y:P-N/2+h},{x:M-c/2,y:P-N/2+h}],U.polygon(t,E,O)},u}p(bm,"imageSquare");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(xm,"inv_trapezoid");async function ns(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await at(e,t,nt(t)),s=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-s/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Z.svg(a),b=K(t,{}),x=d||f?m.path(Je(c,h,s,l,d||0),b):m.rectangle(c,h,s,l,b);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",qt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",qt(d)).attr("ry",qt(f)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Q(t,u),t.calcIntersect=function(m,b){return U.rect(m,b)},t.intersect=function(m){return U.rect(t,m)},a}p(ns,"drawRect");async function vm(e,t){const{shapeSvg:r,bbox:i,label:n}=await at(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return U.rect(t,l)},r}p(vm,"labelRect");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(wm,"lean_left");async function _m(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(_m,"lean_right");function Cm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ut(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Q(t,g),t.intersect=function(m){return D.info("lightningBolt intersect",t,m),U.polygon(t,c,m)},n}p(Cm,"lightningBolt");var sT=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oT=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lT=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function km(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=oT(0,0,s,h,l,c,u),b=lT(0,c,s,h,l,c),x=K(t,{}),y=g.path(m,x),v=g.path(b,x);n.insert(()=>v,":first-child").attr("class","line"),d=n.insert(()=>y,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=sT(0,0,s,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,d),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=U.rect(t,g),b=m.x-(t.x??0);if(l!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-b*b/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(km,"linedCylinder");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ze(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.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=d.polygon(g.map(x=>[x.x,x.y]),f),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(x){return U.polygon(t,g,x)},n}p(Sm,"linedWaveEdgedRect");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],b=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ut(m),y=f.path(x,g),v=ut(b),_=f.path(v,{...g,fill:"none"}),w=n.insert(()=>_,":first-child");return w.insert(()=>y,":first-child"),w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Q(t,w),t.intersect=function(C){return U.polygon(t,m,C)},n}p(Tm,"multiRect");async function Am(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-s/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ze(u-f,d+h+f,u+s-f,d+h+f,c,.8),b=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+s-f,y:b.y-f},{x:u+s,y:b.y-f},{x:u+s,y:b.y-2*f},{x:u+s+f,y:b.y-2*f},{x:u+s+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],y=[{x:u,y:d+f},{x:u+s-f,y:d+f},{x:u+s-f,y:b.y-f},{x:u+s,y:b.y-f},{x:u+s,y:d},{x:u,y:d}],v=Z.svg(n),_=K(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=ut(x),C=v.path(w,_),k=ut(y),F=v.path(k,_),$=n.insert(()=>C,":first-child");return $.insert(()=>F),$.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Q(t,$),t.intersect=function(O){return U.polygon(t,x,O)},n}p(Am,"multiWaveEdgedRectangle");async function Em(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i,t.useHtmlLabels||Ot().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await at(e,t,nt(t)),c=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=Z.svg(o),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=g.rectangle(u,d,c,h,m),x=o.insert(()=>b,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},o}p(Em,"note");var cT=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 Lm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=K(t,{}),m=cT(0,0,l),b=f.path(m,g);u=n.insert(()=>b,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=tr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(f,g){const m=f.width,b=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=U.polygon(f,b,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(Lm,"question");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-s/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ut(d),x=g.path(b,m),y=n.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(v){return U.polygon(t,d,v)},n}p(Bm,"rect_left_inv_arrow");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await dr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(St(ft()?.flowchart?.htmlLabels)){const F=h.children[0],$=dt(h);u=F.getBoundingClientRect(),$.attr("width",u.width),$.attr("height",u.height)}D.info("Text 2",l);const d=l||[],f=h.getBBox(),g=s.node().appendChild(await dr(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],b=dt(g);u=m.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height);const x=(t.padding||0)/2;dt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),dt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const y=u.width+(t.padding||0),v=u.height+(t.padding||0),_=-u.width/2-x,w=-u.height/2-x;let C,k;if(t.look==="handDrawn"){const F=Z.svg(a),$=K(t,{}),O=F.path(Je(_,w,y,v,t.rx||0),$),M=F.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,$);k=a.insert(()=>(D.debug("Rough node insert CXC",O),M),":first-child"),C=a.insert(()=>(D.debug("Rough node insert CXC",O),O),":first-child")}else C=o.insert("rect",":first-child"),k=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)),k.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Q(t,C),t.intersect=function(F){return U.rect(t,F)},a}p(Mm,"rectWithTitle");function Di(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),x=l+b*a*Math.sin(h)*(o?-1:1),y=c-b*n*Math.cos(h)*(o?-1:1),v=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-v;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const F=k/19,$=v+F*w,O=x+n*Math.cos($),M=y+a*Math.sin($);C.push({x:O,y:M})}return C}p(Di,"generateArcPoints");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=t?.padding??0,s=t?.padding??0,l=(t?.width?t?.width:a.width)+o*2,c=(t?.height?t?.height:a.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Di(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Di(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Di(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Di(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],b=ut(m),x=f.path(b,g),y=n.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(v){return U.polygon(t,m,v)},n}p($m,"roundedRect");async function Fm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],b=f.polygon(m.map(y=>[y.x,y.y]),g),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container").attr("style",qt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},n}p(Fm,"shadedProcess");async function Rm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ut(g),b=d.path(m,f),x=n.insert(()=>b,":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, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.polygon(t,g,y)},n}p(Rm,"slopedRect");async function Om(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ns(e,t,r)}p(Om,"squareRect");async function Im(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+t.padding,s=a.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...an(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...an(s/2-l,0,l,50,270,450)],f=ut(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Q(t,m),t.intersect=function(b){return U.polygon(t,d,b)},n}p(Im,"stadium");async function Dm(e,t){return ns(e,t,{rx:5,ry:5})}p(Dm,"state");function Nm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Z.svg(c),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),f=s??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(t,m),t.intersect=function(b){return U.circle(t,7,b)},c}p(Nm,"stateEnd");function Pm(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=Z.svg(n).circle(0,0,14,X2(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(t,a),t.intersect=function(o){return U.circle(t,7,o)},n}p(Pm,"stateStart");async function zm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=(t?.padding||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{}),g=d.rectangle(c-8,h,s+16,l,f),m=d.line(c,h,c,h+l,f),b=d.line(c+s,h,c+s,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>b,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:y}=t;x.attr("class","basic label-container").attr("style",qt(y)),Q(t,x)}else{const d=tr(n,s,l,u);i&&d.attr("style",i),Q(t,d)}return t.intersect=function(d){return U.polygon(t,u,d)},n}p(zm,"subroutine");async function qm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],b=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ut(m),y=f.path(x,g),v=ut(b),_=f.path(v,{...g,fillStyle:"solid"}),w=n.insert(()=>_,":first-child");return w.insert(()=>y,":first-child"),w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(C){return U.polygon(t,m,C)},n}p(qm,"taggedRect");async function Hm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*s,u=.2*l,d=l+c,{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:d/2},...Ze(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,c,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],x=-s/2+s/2*.1,y=-d/2-u*.4,v=[{x:x+s-h,y:(y+l)*1.4},{x:x+s,y:y+l-u},{x:x+s,y:(y+l)*.9},...Ze(x+s,(y+l)*1.3,x+s-h,(y+l)*1.5,-l*.03,.5)],_=ut(b),w=g.path(_,m),C=ut(v),k=g.path(C,{...m,fillStyle:"solid"}),F=n.insert(()=>k,":first-child");return F.insert(()=>w,":first-child"),F.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,F),t.intersect=function($){return U.polygon(t,b,$)},n}p(Hm,"taggedWaveEdgedRectangle");async function Wm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),Q(t,h),t.intersect=function(u){return U.rect(t,u)},n}p(Wm,"text");var hT=p((e,t,r,i,n,a)=>`M${e},${t}
232
+ `),n=bg(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(Cg,"preprocessMarkdown");function kg(e,t={}){const r=Cg(e,t),i=pt.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
233
+ `).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&n[a].push({content:d,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"?n[a].push({content:s.text,type:"normal"}):n[a].push({content:s.raw,type:"normal"})}),n}p(kg,"markdownToLines");function Sg(e,{markdownAutoWrap:t}={}){const r=pt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(D.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(Sg,"markdownToHTML");function Tg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Tg,"splitTextToChars");function Ag(e,t){const r=Tg(t.content);return ql(e,[],r,t.type)}p(Ag,"splitWordToFitWidth");function ql(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?ql(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ql,"splitWordToFitWidthRecursion");function Eg(e,t){if(e.some(({content:r})=>r.includes(`
234
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wa(e,t)}p(Eg,"splitLineToFitWidth");function wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return wa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Ag(t,a);r.push([s]),l.content&&e.unshift(l)}return wa(e,t,r)}p(wa,"splitLineToFitWidthRecursion");function Lo(e,t){t&&e.attr("style",t)}p(Lo,"applyStyle");async function Lg(e,t,r,i,n=!1,a=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=yr(t.label)?await Ra(t.label.replace(Cr.lineBreakRegex,`
235
+ `),a):re(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),Lo(h,t.labelStyle),h.attr("class",`${c} ${i}`),Lo(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"),n&&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(Lg,"addHtmlSpan");function es(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(es,"createTspan");function Bg(e,t,r){const i=e.append("text"),n=es(i,1,t);rs(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Bg,"computeWidthOfText");function Mg(e,t,r){const i=e.append("text"),n=es(i,1,t);rs(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Mg,"computeDimensionOfText");function $g(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(d=>Bg(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:Eg(c,h);for(const d of u){const f=es(s,l,1.1);rs(f,d),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}p($g,"createFormattedText");function rs(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(rs,"updateTextContentAndStyles");async function Hl(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{const s=`${a}:${o}`;return await ES(s)?await ui(s,void 0,{class:"label-icon"}):`<i class='${re(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Hl,"replaceIconSubstring");var He=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(D.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=Sg(t,c),u=await Hl(Qe(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:yr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await Lg(e,f,s,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=kg(h.replace("<br>","<br/>"),c),d=$g(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).select("text").attr("style",g)}return d}},"createText");function Bs(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function LS(e,t){return e[0]===t[0]&&e[1]===t[1]}function BS(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)Bs(c,s,n);const l=(function(c,h,u){const d=[];for(const y of c){const v=[...y];LS(v[0],v[v.length-1])||v.push([v[0][0],v[0][1]]),v.length>2&&d.push(v)}const f=[];h=Math.max(h,.1);const g=[];for(const y of d)for(let v=0;v<y.length-1;v++){const _=y[v],w=y[v+1];if(_[1]!==w[1]){const C=Math.min(_[1],w[1]);g.push({ymin:C,ymax:Math.max(_[1],w[1]),x:C===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(g.sort(((y,v)=>y.ymin<v.ymin?-1:y.ymin>v.ymin?1:y.x<v.x?-1:y.x>v.x?1:y.ymax===v.ymax?0:(y.ymax-v.ymax)/Math.abs(y.ymax-v.ymax))),!g.length)return f;let m=[],b=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let y=-1;for(let v=0;v<g.length&&!(g[v].ymin>b);v++)y=v;g.splice(0,y+1).forEach((v=>{m.push({s:b,edge:v})}))}if(m=m.filter((y=>!(y.edge.ymax<=b))),m.sort(((y,v)=>y.edge.x===v.edge.x?0:(y.edge.x-v.edge.x)/Math.abs(y.edge.x-v.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let y=0;y<m.length;y+=2){const v=y+1;if(v>=m.length)break;const _=m[y].edge,w=m[v].edge;f.push([[Math.round(_.x),b],[Math.round(w.x),b]])}b+=u,m.forEach((y=>{y.edge.x=y.edge.x+u*y.edge.islope})),x++}return f})(o,a,i);if(n){for(const c of o)Bs(c,s,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),Bs(d,h,u)})(l,s,-n)}return l}function gn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),BS(e,n,i,a||1)}class Wl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=gn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function is(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 MS extends Wl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=gn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)is([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class $S extends Wl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class FS{constructor(t){this.helper=t}fillPolygons(t,r){const i=gn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=is(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(s[0][0]+s[1][0])/2-n/4,f=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,b=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,y=this.helper.ellipse(b,x,a,a,r);i.push(...y.ops)}}return{type:"fillSketch",ops:i}}}class RS{constructor(t){this.helper=t}fillPolygons(t,r){const i=gn(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,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const s=is(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,b=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(b[0],b[1],x[0],x[1],r))}})),a}}class OS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=gn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const o=is(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],b=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],b[0],b[1],i))}})),n}}const Qt={};class IS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const DS=0,Ms=1,Rh=2,Bn={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 $s(e,t){return e.type===t}function jl(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:DS,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:Ms,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Rh,text:""},s})(e);let i="BOD",n=0,a=r[n];for(;!$s(a,Rh);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return jl("M0,0"+e);n++,o=Bn[a.text],i=a.text}else $s(a,Ms)?o=Bn[i]:(n++,o=Bn[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!$s(c,Ms))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Bn[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Fg(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Rg(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-s),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-s),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,b=n+2*(g-n)/3,x=u+2*(f-u)/3,y=d+2*(g-d)/3;t.push({key:"C",data:[m,b,x,y,u,d]}),s=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,b=n+2*(d-n)/3,x=f+2*(u-f)/3,y=g+2*(d-g)/3;t.push({key:"C",data:[m,b,x,y,f,g]}),s=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],b=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,b,x,b,x]}),i=b,n=x):(i!==b||n!==x)&&(Og(i,n,b,x,u,d,f,g,m).forEach((function(y){t.push({key:"C",data:y})})),i=b,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function Li(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Og(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,b=0;if(c)[f,g,m,b]=c;else{[e,t]=Li(e,t,-h),[r,i]=Li(r,i,-h);const N=(e-r)/2,E=(t-i)/2;let T=N*N/(n*n)+E*E/(a*a);T>1&&(T=Math.sqrt(T),n*=T,a*=T);const A=n*n,R=a*a,B=A*R-A*E*E-R*N*N,z=A*E*E+R*N*N,W=(s===l?-1:1)*Math.sqrt(Math.abs(B/z));m=W*n*E/a+(e+r)/2,b=W*-a*N/n+(t+i)/2,f=Math.asin(parseFloat(((t-b)/a).toFixed(9))),g=Math.asin(parseFloat(((i-b)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const N=g,E=r,T=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Og(r=m+n*Math.cos(g),i=b+a*Math.sin(g),E,T,n,a,o,0,l,[g,N,m,b])}x=g-f;const y=Math.cos(f),v=Math.sin(f),_=Math.cos(g),w=Math.sin(g),C=Math.tan(x/4),k=4/3*n*C,F=4/3*a*C,M=[e,t],O=[e+k*v,t-F*y],$=[r+k*w,i-F*_],P=[r,i];if(O[0]=2*M[0]-O[0],O[1]=2*M[1]-O[1],c)return[O,$,P].concat(d);{d=[O,$,P].concat(d);const N=[];for(let E=0;E<d.length;E+=3){const T=Li(d[E][0],d[E][1],h),A=Li(d[E+1][0],d[E+1][1],h),R=Li(d[E+2][0],d[E+2][1],h);N.push([T[0],T[1],A[0],A[1],R[0],R[1]])}return N}}const NS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return _a(e,t,r)},ellipse:function(e,t,r,i,n){const a=Dg(r,i,n);return Bo(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Xe(e,t,r,i,n,!0)}};function Ig(e,t,r,i,n){return{type:"path",ops:Xe(e,t,r,i,n)}}function jn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Xe(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Xe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Ig(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function PS(e,t,r,i,n){return(function(a,o){return jn(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Oh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Mn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Mn(r[0],1.5*(1+.22*t.roughness),Nh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Mn(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Mn(o,1.5*(1+.22*t.roughness),Nh(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function Dg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=st(o*l,r),s+=st(s*l,r),{increment:a,rx:o,ry:s}}function Bo(e,t,r,i){const[n,a]=Ph(i.increment,e,t,i.rx,i.ry,1,i.increment*_a(.1,_a(.4,1,r),r),r);let o=Ca(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Ph(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ca(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Ih(e,t,r,i,n,a,o,s,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=st(.01*u,l),d+=st(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,b=Math.min(m/2,(g-f)/2),x=zh(b,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const y=zh(b,c,h,u,d,f,g,1.5,l);x.push(...y)}return o&&(s?x.push(...Xe(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Xe(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function Dh(e,t){const r=Rg(Fg(jl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Xe(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,d,f]=s;i.push(...zS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Xe(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Fs(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+st(n,t),i[0][1]+st(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+st(n,t),i[o][1]+st(n,t)]})}}return{type:"fillPath",ops:r}}function Rr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Qt[n])switch(n){case"zigzag":Qt[n]||(Qt[n]=new MS(i));break;case"cross-hatch":Qt[n]||(Qt[n]=new $S(i));break;case"dots":Qt[n]||(Qt[n]=new FS(i));break;case"dashed":Qt[n]||(Qt[n]=new RS(i));break;case"zigzag-line":Qt[n]||(Qt[n]=new OS(i));break;default:n="hachure",Qt[n]||(Qt[n]=new Wl(i))}return Qt[n]})(t,NS).fillPolygons(e,t)}function Nh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ng(e){return e.randomizer||(e.randomizer=new IS(e.seed||0)),e.randomizer.next()}function _a(e,t,r,i=1){return r.roughness*i*(Ng(r)*(t-e)+e)}function st(e,t,r=1){return _a(-e,e,t,r)}function Xe(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Mo(e,t,r,i,n,!0,!1);if(o)return s;const l=Mo(e,t,r,i,n,!0,!0);return s.concat(l)}function Mo(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*Ng(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=st(f,n,c),g=st(g,n,c);const m=[],b=()=>st(u,n,c),x=()=>st(h,n,c),y=n.preserveVertices;return o?m.push({op:"move",data:[e+(y?0:b()),t+(y?0:b())]}):m.push({op:"move",data:[e+(y?0:st(h,n,c)),t+(y?0:st(h,n,c))]}),o?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+b(),g+t+(i-t)*d+b(),f+e+2*(r-e)*d+b(),g+t+2*(i-t)*d+b(),r+(y?0:b()),i+(y?0:b())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(y?0:x()),i+(y?0:x())]}),m}function Mn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+st(t,r),e[n][1]+st(t,r)]),n===e.length-1&&i.push([e[n][0]+st(t,r),e[n][1]+st(t,r)]);return Ca(i,null,r)}function Ca(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[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],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Mo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Ph(e,t,r,i,n,a,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=st(.5,s)-Math.PI/2;c.push([st(a,s)+t+.9*i*Math.cos(h-e),st(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[st(a,s)+t+i*Math.cos(d),st(a,s)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([st(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),st(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([st(a,s)+t+.98*i*Math.cos(h+o),st(a,s)+r+.98*n*Math.sin(h+o)]),c.push([st(a,s)+t+.9*i*Math.cos(h+.5*o),st(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function zh(e,t,r,i,n,a,o,s,l){const c=a+st(.1,l),h=[];h.push([st(s,l)+t+.9*i*Math.cos(c-e),st(s,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([st(s,l)+t+i*Math.cos(u),st(s,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),Ca(h,null,l)}function zS(e,t,r,i,n,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:st(c[0],s)),o[1]+(d?0:st(c[0],s))]}),h=d?[n,a]:[n+st(c[f],s),a+st(c[f],s)],l.push({op:"bcurveTo",data:[e+st(c[f],s),t+st(c[f],s),r+st(c[f],s),i+st(c[f],s),h[0],h[1]]});return l}function Bi(e){return[...e]}function qh(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(Bi(e[0]),Bi(e[1]),Bi(e[2]),Bi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(Bi(n[0]));for(let s=1;s+2<n.length;s++){const l=n[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*n[s+1][0]-o*n[s-1][0])/6,l[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function Un(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function qS(e,t,r){const i=Un(t,r);if(i===0)return Un(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Un(e,or(t,r,n))}function or(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function $o(e,t,r,i){const n=i||[];if((function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],d=s[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let b=3*u[1]-2*d[1]-c[1];return b*=b,f<m&&(f=m),g<b&&(g=b),f+g})(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(Un(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=or(l,c,.5),f=or(c,h,.5),g=or(h,u,.5),m=or(d,f,.5),b=or(f,g,.5),x=or(m,b,.5);$o([l,d,m,x],0,r,n),$o([x,b,g,u],0,r,n)}var a,o;return n}function HS(e,t){return ka(e,0,e.length,t)}function ka(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=qS(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ka(e,t,c+1,i,a),ka(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Rs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)$o(e,3*a,t,i);return r&&r>0?ka(i,0,i.length,r):i}const ee="none";class Sa{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,n,a){const o=this._o(a);return this._d("line",[Ig(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=PS(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(Fs([c],o)):s.push(Rr([c],o))}return o.stroke!==ee&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=Dg(i,n,o),c=Bo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Bo(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(Rr([c.estimatedPoints],o));return o.stroke!==ee&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[jn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Ih(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Ih(t,r,i,n,a,o,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,b,x,y){const v=d,_=f;let w=Math.abs(g/2),C=Math.abs(m/2);w+=st(.01*w,y),C+=st(.01*C,y);let k=b,F=x;for(;k<0;)k+=2*Math.PI,F+=2*Math.PI;F-k>2*Math.PI&&(k=0,F=2*Math.PI);const M=(F-k)/y.curveStepCount,O=[];for(let $=k;$<=F;$+=M)O.push([v+w*Math.cos($),_+C*Math.sin($)]);return O.push([v+w*Math.cos(F),_+C*Math.sin(F)]),O.push([v,_]),Rr([O],y)})(t,r,i,n,a,o,c));return c.stroke!==ee&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Oh(t,i);if(i.fill&&i.fill!==ee)if(i.fillStyle==="solid"){const o=Oh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Rs(qh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Rs(qh(c),10,(1+i.roughness)/2))}o.length&&n.push(Rr([o],i))}return i.stroke!==ee&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=jn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Fs([t],i)):n.push(Rr([t],i))),i.stroke!==ee&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ee,o=i.stroke!==ee,s=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=Rg(Fg(jl(h))),g=[];let m=[],b=[0,0],x=[];const y=()=>{x.length>=4&&m.push(...Rs(x,u)),x=[]},v=()=>{y(),m.length&&(g.push(m),m=[])};for(const{key:w,data:C}of f)switch(w){case"M":v(),b=[C[0],C[1]],m.push(b);break;case"L":y(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const k=m.length?m[m.length-1]:b;x.push([k[0],k[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":y(),m.push([b[0],b[1]])}if(v(),!d)return g;const _=[];for(const w of g){const C=HS(w,d);C.length&&_.push(C)}return _})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Dh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Dh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Fs(l,i));else n.push(Rr(l,i));return o&&(s?l.forEach((h=>{n.push(jn(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ee};break;case"fillPath":o={d:this.opsToPath(a),stroke:ee,strokeWidth:0,fill:i.fill||ee};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ee,strokeWidth:i,fill:ee}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class WS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Sa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((s=>+s.toFixed(i))):a.data;switch(a.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(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}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,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}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 $n="http://www.w3.org/2000/svg";class jS{constructor(t,r){this.svg=t,this.gen=new Sa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS($n,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS($n,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS($n,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS($n,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}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,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}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 Z={canvas:(e,t)=>new WS(e,t),svg:(e,t)=>new jS(e,t),generator:e=>new Sa(e),newSeed:()=>Sa.newSeed()},at=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||St(ft()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await He(o,re(Qe(s),ft()),{useHtmlLabels:n,width:t.width||ft().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],d=dt(l),f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const y=ft().fontSize?ft().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[_=Go.fontSize]=fn(y),w=_*v+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";b(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),Os=p(async(e,t,r)=>{const i=r.useHtmlLabels||St(ft()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await He(n,re(Qe(t),ft()),{useHtmlLabels:i,width:r.width||ft()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(St(ft()?.flowchart?.htmlLabels)){const l=a.children[0],c=dt(a);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),nt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ut(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ut,"createPathFromPoints");function Ze(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,b=d+n*Math.sin(u*(m-e));o.push({x:m,y:b})}return o}p(Ze,"generateFullSineWavePoints");function an(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(an,"generateCirclePoints");var US=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),di=US;function Pg(e,t){t&&e.attr("style",t)}p(Pg,"applyStyle");async function zg(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ft();let n=e.label;e.label&&yr(e.label)&&(n=await Ra(e.label.replace(Cr.lineBreakRegex,`
236
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(re(o,i)),Pg(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(zg,"addHtmlLabel");var YS=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),St(ft().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),D.info("vertexText"+n);const a={isNode:i,label:Qe(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await zg(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),dr=YS,Je=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),qg=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=St(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await He(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],F=dt(g);m=k.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,y=t.x-b/2,v=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=Z.svg(u),F=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),M=k.path(Je(y,v,b,x,0),F);_=u.insert(()=>(D.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",v).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=Ua(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const k=f.select("span");k&&k.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(k){return di(t,k)},{cluster:u,labelBBox:m}},"rect"),GS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return di(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),VS=p(async(e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=u.node().appendChild(await dr(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(St(r.flowchart.htmlLabels)){const M=f.children[0],O=dt(f);g=M.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const m=0*t.padding,b=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 y=t.height+m,v=t.height+m-g.height-6,_=t.x-x/2,w=t.y-y/2;t.width=x;const C=t.y-t.height/2-b+g.height+2;let k;if(t.look==="handDrawn"){const M=t.cssClasses.includes("statediagram-cluster-alt"),O=Z.svg(c),$=t.rx||t.ry?O.path(Je(_,w,x,y,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(_,w,x,y,{seed:n});k=c.insert(()=>$,":first-child");const P=O.rectangle(_,C,x,v,{fill:M?a:o,fillStyle:M?"hachure":"solid",stroke:l,seed:n});k=c.insert(()=>$,":first-child"),d=c.insert(()=>P)}else k=h.insert("rect",":first-child"),k.attr("class","outer").attr("x",_).attr("y",w).attr("width",x).attr("height",y).attr("data-look",t.look),d.attr("class","inner").attr("x",_).attr("y",C).attr("width",x).attr("height",v);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(St(r.flowchart.htmlLabels)?0:3)})`);const F=k.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(M){return di(t,M)},{cluster:c,labelBBox:g}},"roundedWithTitle"),XS=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=X(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=St(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await He(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],F=dt(g);m=k.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,y=t.x-b/2,v=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=Z.svg(u),F=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),M=k.path(Je(y,v,b,x,t.rx),F);_=u.insert(()=>(D.debug("Rough node insert CXC",M),M),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",v).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=Ua(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),s){const k=f.select("span");k&&k.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(k){return di(t,k)},{cluster:u,labelBBox:m}},"kanbanSection"),ZS=p((e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const b=Z.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=o.insert(()=>b,":first-child")}else f=s.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return di(t,m)},{cluster:o,labelBBox:{}}},"divider"),KS=qg,QS={rect:qg,squareRect:KS,roundedWithTitle:VS,noteGroup:GS,divider:ZS,kanbanSection:XS},Hg=new Map,Wg=p(async(e,t)=>{const r=t.shape||"rect",i=await QS[r](e,t);return Hg.set(t.id,i),i},"insertCluster"),JS=p(()=>{Hg=new Map},"clear");function jg(e,t){return e.intersect(t)}p(jg,"intersectNode");var tT=jg;function Ug(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Ug,"intersectEllipse");var Yg=Ug;function Gg(e,t,r){return Yg(e,t,t,r)}p(Gg,"intersectCircle");var eT=Gg;function Vg(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=n*r.x+a*r.y+o,l=n*i.x+a*i.y+o,c=1e-6;if(s!==0&&l!==0&&Fo(s,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&Fo(f,g))return;const m=n*u-h*a;if(m===0)return;const b=Math.abs(m/2);let x=a*d-u*o;const y=x<0?(x-b)/m:(x+b)/m;x=h*o-n*d;const v=x<0?(x-b)/m:(x+b)/m;return{x:y,y:v}}}p(Vg,"intersectLine");function Fo(e,t){return e*t>0}p(Fo,"sameSign");var rT=Vg;function Xg(e,t,r){let i=e.x,n=e.y,a=[],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 l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=rT(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,b=u.y-r.y,x=Math.sqrt(m*m+b*b);return g<x?-1:g===x?0:1}),a[0]):e}p(Xg,"intersectPolygon");var iT=Xg,U={node:tT,circle:eT,ellipse:Yg,polygon:iT,rect:di};function Zg(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=nt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=Z.svg(a),c=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",qt(s)),Q(t,u),t.intersect=function(d){return D.info("Circle intersect",t,o,d),U.circle(t,o,d)},a}p(Zg,"anchor");function Ro(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),x=l+b*a*Math.sin(h)*(o?-1:1),y=c-b*n*Math.cos(h)*(o?-1:1),v=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-v;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const F=k/19,M=v+F*w,O=x+n*Math.cos(M),$=y+a*Math.sin(M);C.push({x:O,y:$})}return C}p(Ro,"generateArcPoints");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Ro(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Ro(o/2,s/2,o/2,-s/2,c,l,!0)],d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ut(u),m=d.path(g,f),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${c/2}, 0)`),Q(t,b),t.intersect=function(x){return U.polygon(t,u,x)},n}p(Kg,"bowTieRect");function tr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(tr,"insertPolygonShape");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,d=0,f=[{x:c+s,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const b=Z.svg(n),x=K(t,{}),y=ut(f),v=b.path(y,x);g=n.insert(()=>v,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=tr(n,l,o,f);return i&&g.attr("style",i),Q(t,g),t.intersect=function(b){return U.polygon(t,f,b)},n}p(Qg,"card");function Jg(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ut(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return U.polygon(t,o,d)},i}p(Jg,"choice");async function Ul(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:s}=await at(e,t,nt(t)),l=r?.padding??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(a),f=K(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",qt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return U.circle(d,g,f)},t.intersect=function(d){return D.info("Circle intersect",t,c,d),U.circle(t,c,d)},a}p(Ul,"circle");function tm(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={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 ${a.x},${a.y} L ${s.x},${s.y}
237
+ M ${n.x},${n.y} L ${o.x},${o.y}`}p(tm,"createLine");function em(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=Z.svg(n),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=tm(a),u=s.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Q(t,d),t.intersect=function(f){return D.info("crossedCircle intersect",t,{radius:a,point:f}),U.circle(t,a,f)},n}p(em,"crossedCircle");function Me(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Me,"generateCirclePoints");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Me(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Me(s/2+c*2,-c,c,20,-180,-270),...Me(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Me(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Me(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Me(s/2+s*.1,-c,c,20,-180,-270),...Me(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Me(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ut(u).replace("Z",""),x=f.path(b,g),y=ut(d),v=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>v,":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(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,d,w)},n}p(rm,"curlyBraceLeft");function $e(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:f,y:g})}return o}p($e,"generateCirclePoints");async function im(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...$e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...$e(s/2+c*2,-c,c,20,-180,-270),...$e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...$e(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...$e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...$e(s/2+c*2,-c,c,20,-180,-270),...$e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...$e(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ut(u).replace("Z",""),x=f.path(b,g),y=ut(d),v=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>v,":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(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,d,w)},n}p(im,"curlyBraceRight");function Ft(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Ft,"generateCirclePoints");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ft(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Ft(s/2+c*2,-c,c,20,-180,-270),...Ft(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Ft(s/2,l/2,c,20,0,90)],d=[...Ft(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ft(-s/2-c/2,-c,c,20,0,90),...Ft(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ft(-s/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Ft(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Ft(s/2+c*2,-c,c,20,-180,-270),...Ft(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Ft(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Ft(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Ft(-s/2-c/2,-c,c,20,0,90),...Ft(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Ft(-s/2+c+c/2,l/2,c,30,-180,-270)],g=Z.svg(n),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ut(u).replace("Z",""),y=g.path(x,m),_=ut(d).replace("Z",""),w=g.path(_,m),C=ut(f),k=g.path(C,{...m}),F=n.insert("g",":first-child");return F.insert(()=>k,":first-child").attr("stroke-opacity",0),F.insert(()=>y,":first-child"),F.insert(()=>w,":first-child"),F.attr("class","text"),h&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,F),t.intersect=function(M){return U.polygon(t,f,M)},n}p(nm,"curlyBraces");async function am(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,b=g-h,x=m/4,y=[{x:b,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:b,y:m},...an(-b,-m/2,h,50,270,90)],v=ut(y),_=d.path(v,f),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,w),t.intersect=function(C){return U.polygon(t,y,C)},n}p(am,"curvedTrapezoid");var nT=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),aT=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),sT=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=aT(0,0,s,h,l,c),m=sT(0,c,s,h,l,c),b=f.path(g,K(t,{})),x=f.path(m,K(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>b,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=nT(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",qt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=U.rect(t,f),m=g.x-(t.x??0);if(l!=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-c)){let b=c*c*(1-m*m/(l*l));b>0&&(b=Math.sqrt(b)),b=c-b,f.y-(t.y??0)>0&&(b=-b),g.y+=b}return g},n}p(sm,"cylinder");async function om(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],b=f.polygon(m.map(y=>[y.x,y.y]),g),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},n}p(om,"dividedRectangle");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await at(e,t,nt(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{roughness:.2,strokeWidth:2.5}),g=K(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),b=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",qt(t.cssClasses)).attr("style",qt(u)),h.node()?.appendChild(m),h.node()?.appendChild(b)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,h),t.intersect=function(d){return D.info("DoubleCircle intersect",t,l,d),U.circle(t,l,d)},n}p(lm,"doublecircle");function cm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=Z.svg(a),{nodeBorder:c}=r,h=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Q(t,d),t.intersect=function(f){return D.info("filledCircle intersect",t,{radius:o,point:f}),U.circle(t,o,f)},a}p(cm,"filledCircle");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ut(h),m=d.path(g,f),b=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=s,t.height=l,Q(t,b),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return D.info("Triangle intersect",t,h,x),U.polygon(t,h,x)},n}p(hm,"flippedTriangle");function um(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=X(t);t.label="";const o=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,d=Z.svg(o),f=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const b=i?.padding??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(x){return U.rect(t,x)},o}p(um,"forkJoin");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await at(e,t,nt(t)),l=Math.max(n,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...an(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ut(g),b=d.path(m,f),x=o.insert(()=>b,":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),Q(t,x),t.intersect=function(y){return D.info("Pill intersect",t,{radius:h,point:y}),U.polygon(t,g,y)},o}p(dm,"halfRoundedRectangle");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+(t.padding??0),s=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Z.svg(n),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const d=u/6;u=u+d;const f=o/2,g=f/2,m=u-g,b=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:u,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-u,y:0}],x=ut(b),y=c.path(x,h),v=n.insert(()=>y,":first-child");return v.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),t.width=s,t.height=o,Q(t,v),t.intersect=function(_){return U.polygon(t,b,_)},n}p(fm,"hexagon");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await at(e,t,nt(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=Z.svg(n),c=K(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ut(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(t,f),t.intersect=function(g){return D.info("Pill intersect",t,{points:h}),U.polygon(t,h,g)},n}p(pm,"hourglass");async function gm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),d=t.pos==="t",f=s,g=s,{nodeBorder:m}=r,{stylesMap:b}=li(t),x=-g/2,y=-f/2,v=t.label?8:0,_=Z.svg(c),w=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=_.rectangle(x,y,g,f,w),k=Math.max(g,h.width),F=f+h.height+v,M=_.rectangle(-k/2,-F/2,k,F,{...w,fill:"transparent",stroke:"none"}),O=c.insert(()=>C,":first-child"),$=c.insert(()=>M);if(t.icon){const P=c.append("g");P.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const N=P.node().getBBox(),E=N.width,T=N.height,A=N.x,R=N.y;P.attr("transform",`translate(${-E/2-A},${d?h.height/2+v/2-T/2-R:-h.height/2-v/2-T/2-R})`),P.attr("style",`color: ${b.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-F/2:F/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(P){if(D.info("iconSquare intersect",t,P),!t.label)return U.rect(t,P);const N=t.x??0,E=t.y??0,T=t.height??0;let A=[];return d?A=[{x:N-h.width/2,y:E-T/2},{x:N+h.width/2,y:E-T/2},{x:N+h.width/2,y:E-T/2+h.height+v},{x:N+g/2,y:E-T/2+h.height+v},{x:N+g/2,y:E+T/2},{x:N-g/2,y:E+T/2},{x:N-g/2,y:E-T/2+h.height+v},{x:N-h.width/2,y:E-T/2+h.height+v}]:A=[{x:N-g/2,y:E-T/2},{x:N+g/2,y:E-T/2},{x:N+g/2,y:E-T/2+f},{x:N+h.width/2,y:E-T/2+f},{x:N+h.width/2/2,y:E+T/2},{x:N-h.width/2,y:E+T/2},{x:N-h.width/2,y:E-T/2+f},{x:N-g/2,y:E-T/2+f}],U.polygon(t,A,P)},c}p(gm,"icon");async function mm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await at(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:b}=r,{stylesMap:x}=li(t),y=Z.svg(c),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=x.get("fill");v.stroke=_??b;const w=c.append("g");t.icon&&w.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=w.node().getBBox(),k=C.width,F=C.height,M=C.x,O=C.y,$=Math.max(k,F)*Math.SQRT2+d*2,P=y.circle(0,0,$,v),N=Math.max($,h.width),E=$+h.height+f,T=y.rectangle(-N/2,-E/2,N,E,{...v,fill:"transparent",stroke:"none"}),A=c.insert(()=>P,":first-child"),R=c.insert(()=>T);return w.attr("transform",`translate(${-k/2-M},${g?h.height/2+f/2-F/2-O:-h.height/2-f/2-F/2-O})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-E/2:E/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),Q(t,R),t.intersect=function(B){return D.info("iconSquare intersect",t,B),U.rect(t,B)},c}p(mm,"iconCircle");async function ym(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:b,mainBkg:x}=r,{stylesMap:y}=li(t),v=-m/2,_=-g/2,w=t.label?8:0,C=Z.svg(c),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const F=y.get("fill");k.stroke=F??x;const M=C.path(Je(v,_,m,g,5),k),O=Math.max(m,h.width),$=g+h.height+w,P=C.rectangle(-O/2,-$/2,O,$,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>M,":first-child").attr("class","icon-shape2"),E=c.insert(()=>P);if(t.icon){const T=c.append("g");T.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),R=A.width,B=A.height,z=A.x,W=A.y;T.attr("transform",`translate(${-R/2-z},${f?h.height/2+w/2-B/2-W:-h.height/2-w/2-B/2-W})`),T.attr("style",`color: ${y.get("stroke")??b};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-$/2:$/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Q(t,E),t.intersect=function(T){if(D.info("iconSquare intersect",t,T),!t.label)return U.rect(t,T);const A=t.x??0,R=t.y??0,B=t.height??0;let z=[];return f?z=[{x:A-h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2+h.height+w},{x:A+m/2,y:R-B/2+h.height+w},{x:A+m/2,y:R+B/2},{x:A-m/2,y:R+B/2},{x:A-m/2,y:R-B/2+h.height+w},{x:A-h.width/2,y:R-B/2+h.height+w}]:z=[{x:A-m/2,y:R-B/2},{x:A+m/2,y:R-B/2},{x:A+m/2,y:R-B/2+g},{x:A+h.width/2,y:R-B/2+g},{x:A+h.width/2/2,y:R+B/2},{x:A-h.width/2,y:R+B/2},{x:A-h.width/2,y:R-B/2+g},{x:A-m/2,y:R-B/2+g}],U.polygon(t,z,T)},c}p(ym,"iconRounded");async function bm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=X(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:b,mainBkg:x}=r,{stylesMap:y}=li(t),v=-m/2,_=-g/2,w=t.label?8:0,C=Z.svg(c),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const F=y.get("fill");k.stroke=F??x;const M=C.path(Je(v,_,m,g,.1),k),O=Math.max(m,h.width),$=g+h.height+w,P=C.rectangle(-O/2,-$/2,O,$,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>M,":first-child"),E=c.insert(()=>P);if(t.icon){const T=c.append("g");T.html(`<g>${await ui(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=T.node().getBBox(),R=A.width,B=A.height,z=A.x,W=A.y;T.attr("transform",`translate(${-R/2-z},${f?h.height/2+w/2-B/2-W:-h.height/2-w/2-B/2-W})`),T.attr("style",`color: ${y.get("stroke")??b};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-$/2:$/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Q(t,E),t.intersect=function(T){if(D.info("iconSquare intersect",t,T),!t.label)return U.rect(t,T);const A=t.x??0,R=t.y??0,B=t.height??0;let z=[];return f?z=[{x:A-h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2},{x:A+h.width/2,y:R-B/2+h.height+w},{x:A+m/2,y:R-B/2+h.height+w},{x:A+m/2,y:R+B/2},{x:A-m/2,y:R+B/2},{x:A-m/2,y:R-B/2+h.height+w},{x:A-h.width/2,y:R-B/2+h.height+w}]:z=[{x:A-m/2,y:R-B/2},{x:A+m/2,y:R-B/2},{x:A+m/2,y:R-B/2+g},{x:A+h.width/2,y:R-B/2+g},{x:A+h.width/2/2,y:R+B/2},{x:A-h.width/2,y:R+B/2},{x:A-h.width/2,y:R-B/2+g},{x:A-m/2,y:R-B/2+g}],U.polygon(t,z,T)},c}p(bm,"iconSquare");async function xm(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=X(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?s??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:d,label:f}=await at(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,b=-h/2,x=t.label?8:0,y=Z.svg(u),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=y.rectangle(m,b,c,h,v),w=Math.max(c,d.width),C=h+d.height+x,k=y.rectangle(-w/2,-C/2,w,C,{...v,fill:"none",stroke:"none"}),F=u.insert(()=>_,":first-child"),M=u.insert(()=>k);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?C/2-h:-C/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),F.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Q(t,M),t.intersect=function(O){if(D.info("iconSquare intersect",t,O),!t.label)return U.rect(t,O);const $=t.x??0,P=t.y??0,N=t.height??0;let E=[];return g?E=[{x:$-d.width/2,y:P-N/2},{x:$+d.width/2,y:P-N/2},{x:$+d.width/2,y:P-N/2+d.height+x},{x:$+c/2,y:P-N/2+d.height+x},{x:$+c/2,y:P+N/2},{x:$-c/2,y:P+N/2},{x:$-c/2,y:P-N/2+d.height+x},{x:$-d.width/2,y:P-N/2+d.height+x}]:E=[{x:$-c/2,y:P-N/2},{x:$+c/2,y:P-N/2},{x:$+c/2,y:P-N/2+h},{x:$+d.width/2,y:P-N/2+h},{x:$+d.width/2/2,y:P+N/2},{x:$-d.width/2,y:P+N/2},{x:$-d.width/2,y:P-N/2+h},{x:$-c/2,y:P-N/2+h}],U.polygon(t,E,O)},u}p(xm,"imageSquare");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(vm,"inv_trapezoid");async function ns(e,t,r){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await at(e,t,nt(t)),s=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-s/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Z.svg(a),b=K(t,{}),x=d||f?m.path(Je(c,h,s,l,d||0),b):m.rectangle(c,h,s,l,b);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",qt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",qt(d)).attr("ry",qt(f)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Q(t,u),t.calcIntersect=function(m,b){return U.rect(m,b)},t.intersect=function(m){return U.rect(t,m)},a}p(ns,"drawRect");async function wm(e,t){const{shapeSvg:r,bbox:i,label:n}=await at(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return U.rect(t,l)},r}p(wm,"labelRect");async function _m(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(_m,"lean_left");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(Cm,"lean_right");function km(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ut(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Q(t,g),t.intersect=function(m){return D.info("lightningBolt intersect",t,m),U.polygon(t,c,m)},n}p(km,"lightningBolt");var oT=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),lT=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),cT=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=lT(0,0,s,h,l,c,u),b=cT(0,c,s,h,l,c),x=K(t,{}),y=g.path(m,x),v=g.path(b,x);n.insert(()=>v,":first-child").attr("class","line"),d=n.insert(()=>y,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=oT(0,0,s,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,d),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=U.rect(t,g),b=m.x-(t.x??0);if(l!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-b*b/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(Sm,"linedCylinder");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ze(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.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=d.polygon(g.map(x=>[x.x,x.y]),f),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(x){return U.polygon(t,g,x)},n}p(Tm,"linedWaveEdgedRect");async function Am(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],b=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ut(m),y=f.path(x,g),v=ut(b),_=f.path(v,{...g,fill:"none"}),w=n.insert(()=>_,":first-child");return w.insert(()=>y,":first-child"),w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Q(t,w),t.intersect=function(C){return U.polygon(t,m,C)},n}p(Am,"multiRect");async function Em(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-s/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ze(u-f,d+h+f,u+s-f,d+h+f,c,.8),b=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+s-f,y:b.y-f},{x:u+s,y:b.y-f},{x:u+s,y:b.y-2*f},{x:u+s+f,y:b.y-2*f},{x:u+s+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],y=[{x:u,y:d+f},{x:u+s-f,y:d+f},{x:u+s-f,y:b.y-f},{x:u+s,y:b.y-f},{x:u+s,y:d},{x:u,y:d}],v=Z.svg(n),_=K(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=ut(x),C=v.path(w,_),k=ut(y),F=v.path(k,_),M=n.insert(()=>C,":first-child");return M.insert(()=>F),M.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Q(t,M),t.intersect=function(O){return U.polygon(t,x,O)},n}p(Em,"multiWaveEdgedRectangle");async function Lm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i,t.useHtmlLabels||Ot().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await at(e,t,nt(t)),c=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=Z.svg(o),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=g.rectangle(u,d,c,h,m),x=o.insert(()=>b,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},o}p(Lm,"note");var hT=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 Bm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=K(t,{}),m=hT(0,0,l),b=f.path(m,g);u=n.insert(()=>b,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=tr(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(f,g){const m=f.width,b=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=U.polygon(f,b,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(Bm,"question");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-s/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ut(d),x=g.path(b,m),y=n.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(v){return U.polygon(t,d,v)},n}p(Mm,"rect_left_inv_arrow");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await dr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(St(ft()?.flowchart?.htmlLabels)){const F=h.children[0],M=dt(h);u=F.getBoundingClientRect(),M.attr("width",u.width),M.attr("height",u.height)}D.info("Text 2",l);const d=l||[],f=h.getBBox(),g=s.node().appendChild(await dr(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],b=dt(g);u=m.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height);const x=(t.padding||0)/2;dt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),dt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const y=u.width+(t.padding||0),v=u.height+(t.padding||0),_=-u.width/2-x,w=-u.height/2-x;let C,k;if(t.look==="handDrawn"){const F=Z.svg(a),M=K(t,{}),O=F.path(Je(_,w,y,v,t.rx||0),M),$=F.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,M);k=a.insert(()=>(D.debug("Rough node insert CXC",O),$),":first-child"),C=a.insert(()=>(D.debug("Rough node insert CXC",O),O),":first-child")}else C=o.insert("rect",":first-child"),k=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)),k.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Q(t,C),t.intersect=function(F){return U.rect(t,F)},a}p($m,"rectWithTitle");function Di(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-m**2),x=l+b*a*Math.sin(h)*(o?-1:1),y=c-b*n*Math.cos(h)*(o?-1:1),v=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-v;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const F=k/19,M=v+F*w,O=x+n*Math.cos(M),$=y+a*Math.sin(M);C.push({x:O,y:$})}return C}p(Di,"generateArcPoints");async function Fm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=t?.padding??0,s=t?.padding??0,l=(t?.width?t?.width:a.width)+o*2,c=(t?.height?t?.height:a.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...Di(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...Di(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...Di(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...Di(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],b=ut(m),x=f.path(b,g),y=n.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(v){return U.polygon(t,m,v)},n}p(Fm,"roundedRect");async function Rm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],b=f.polygon(m.map(y=>[y.x,y.y]),g),x=n.insert(()=>b,":first-child");return x.attr("class","basic label-container").attr("style",qt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.rect(t,y)},n}p(Rm,"shadedProcess");async function Om(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ut(g),b=d.path(m,f),x=n.insert(()=>b,":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, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(y){return U.polygon(t,g,y)},n}p(Om,"slopedRect");async function Im(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ns(e,t,r)}p(Im,"squareRect");async function Dm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.height+t.padding,s=a.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...an(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...an(s/2-l,0,l,50,270,450)],f=ut(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Q(t,m),t.intersect=function(b){return U.polygon(t,d,b)},n}p(Dm,"stadium");async function Nm(e,t){return ns(e,t,{rx:5,ry:5})}p(Nm,"state");function Pm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Z.svg(c),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),f=s??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(t,m),t.intersect=function(b){return U.circle(t,7,b)},c}p(Pm,"stateEnd");function zm(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=Z.svg(n).circle(0,0,14,Z2(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(t,a),t.intersect=function(o){return U.circle(t,7,o)},n}p(zm,"stateStart");async function qm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=(t?.padding||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{}),g=d.rectangle(c-8,h,s+16,l,f),m=d.line(c,h,c,h+l,f),b=d.line(c+s,h,c+s,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>b,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:y}=t;x.attr("class","basic label-container").attr("style",qt(y)),Q(t,x)}else{const d=tr(n,s,l,u);i&&d.attr("style",i),Q(t,d)}return t.intersect=function(d){return U.polygon(t,u,d)},n}p(qm,"subroutine");async function Hm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],b=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ut(m),y=f.path(x,g),v=ut(b),_=f.path(v,{...g,fillStyle:"solid"}),w=n.insert(()=>_,":first-child");return w.insert(()=>y,":first-child"),w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(C){return U.polygon(t,m,C)},n}p(Hm,"taggedRect");async function Wm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*s,u=.2*l,d=l+c,{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:d/2},...Ze(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,c,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],x=-s/2+s/2*.1,y=-d/2-u*.4,v=[{x:x+s-h,y:(y+l)*1.4},{x:x+s,y:y+l-u},{x:x+s,y:(y+l)*.9},...Ze(x+s,(y+l)*1.3,x+s-h,(y+l)*1.5,-l*.03,.5)],_=ut(b),w=g.path(_,m),C=ut(v),k=g.path(C,{...m,fillStyle:"solid"}),F=n.insert(()=>k,":first-child");return F.insert(()=>w,":first-child"),F.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,F),t.intersect=function(M){return U.polygon(t,b,M)},n}p(Wm,"taggedWaveEdgedRectangle");async function jm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),Q(t,h),t.intersect=function(u){return U.rect(t,u)},n}p(jm,"text");var uT=p((e,t,r,i,n,a)=>`M${e},${t}
238
238
  a${n},${a} 0,0,1 0,${-i}
239
239
  l${r},0
240
240
  a${n},${a} 0,0,1 0,${i}
241
241
  M${r},${-i}
242
242
  a${n},${a} 0,0,0 0,${i}
243
- l${-r},0`,"createCylinderPathD"),uT=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dT=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function jm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await at(e,t,nt(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(n),b=uT(0,0,d,c,u,h),x=dT(0,0,d,c,u,h),y=m.path(b,K(t,{})),v=m.path(x,K(t,{fill:"none"}));g=n.insert(()=>v,":first-child"),g=n.insert(()=>y,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=hT(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,g),t.intersect=function(m){const b=U.rect(t,m),x=b.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-u)){let y=u*u*(1-x*x/(h*h));y!=0&&(y=Math.sqrt(Math.abs(y))),y=u-y,m.x-(t.x??0)>0&&(y=-y),b.x+=y}return b},n}p(jm,"tiltedCylinder");async function Um(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(Um,"trapezoid");async function Ym(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Z.svg(n),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ut(f),m=u.path(g,d),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(x){return U.polygon(t,f,x)},n}p(Ym,"trapezoidalPentagon");async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=St(ft().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ut(u),b=f.path(m,g),x=n.insert(()=>b,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Q(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(y){return D.info("Triangle intersect",t,u,y),U.polygon(t,u,y)},n}p(Gm,"triangle");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-s,g=f>0?f/2:0,m=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ze(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],y=ut(x),v=m.path(y,b),_=n.insert(()=>v,":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,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,x,w)},n}p(Vm,"waveEdgedRectangle");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,o),d=Math.max(d,s);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,b=Z.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-u/2,y:g/2},...Ze(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ze(u/2,-g/2,-u/2,-g/2,f,-1)],v=ut(y),_=b.path(v,x),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(C){return U.polygon(t,y,C)},n}p(Xm,"waveRectangle");async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],b=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
243
+ l${-r},0`,"createCylinderPathD"),dT=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fT=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Um(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await at(e,t,nt(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(n),b=dT(0,0,d,c,u,h),x=fT(0,0,d,c,u,h),y=m.path(b,K(t,{})),v=m.path(x,K(t,{fill:"none"}));g=n.insert(()=>v,":first-child"),g=n.insert(()=>y,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=uT(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,g),t.intersect=function(m){const b=U.rect(t,m),x=b.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-u)){let y=u*u*(1-x*x/(h*h));y!=0&&(y=Math.sqrt(Math.abs(y))),y=u-y,m.x-(t.x??0)>0&&(y=-y),b.x+=y}return b},n}p(Um,"tiltedCylinder");async function Ym(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ut(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=tr(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return U.polygon(t,l,u)},n}p(Ym,"trapezoid");async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Z.svg(n),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ut(f),m=u.path(g,d),b=n.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(x){return U.polygon(t,f,x)},n}p(Gm,"trapezoidalPentagon");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=St(ft().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ut(u),b=f.path(m,g),x=n.insert(()=>b,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Q(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(y){return D.info("Triangle intersect",t,u,y),U.polygon(t,u,y)},n}p(Vm,"triangle");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-s,g=f>0?f/2:0,m=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ze(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],y=ut(x),v=m.path(y,b),_=n.insert(()=>v,":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,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Q(t,_),t.intersect=function(w){return U.polygon(t,x,w)},n}p(Xm,"waveEdgedRectangle");async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await at(e,t,nt(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,o),d=Math.max(d,s);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,b=Z.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-u/2,y:g/2},...Ze(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ze(u/2,-g/2,-u/2,-g/2,f,-1)],v=ut(y),_=b.path(v,x),w=n.insert(()=>_,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),Q(t,w),t.intersect=function(C){return U.polygon(t,y,C)},n}p(Zm,"waveRectangle");async function Km(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],b=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
244
244
  M${h-c},${u} L${h+s},${u}
245
- M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(b,g),y=n.insert(()=>x,":first-child");return y.attr("transform",`translate(${c/2}, ${c/2})`),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(v){return U.polygon(t,m,v)},n}p(Zm,"windowPane");async function Yl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:j}=Ot(),{background:V}=j,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Yl(e,lt)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=X(t);if(r.attributes.length===0&&t.label){const j={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};we(t.label,i)+j.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const V=await ns(e,t,j);if(!St(i.htmlLabels)){const lt=V.select("text"),et=lt.node()?.getBBox();lt.attr("transform",`translate(${-et.width/2}, 0)`)}return V}i.htmlLabels||(n*=1.25,a*=1.25);let c=nt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Ir(h,t.label??"",i,0,0,["name"],s);u.height+=a;let d=0;const f=[],g=[];let m=0,b=0,x=0,y=0,v=!0,_=!0;for(const j of r.attributes){const V=await Ir(h,j.type,i,0,d,["attribute-type"],s);m=Math.max(m,V.width+n);const lt=await Ir(h,j.name,i,0,d,["attribute-name"],s);b=Math.max(b,lt.width+n);const et=await Ir(h,j.keys.join(),i,0,d,["attribute-keys"],s);x=Math.max(x,et.width+n);const yt=await Ir(h,j.comment,i,0,d,["attribute-comment"],s);y=Math.max(y,yt.width+n);const ct=Math.max(V.height,lt.height,et.height,yt.height)+a;g.push({yOffset:d,rowHeight:ct}),d+=ct}let w=4;x<=n&&(v=!1,x=0,w--),y<=n&&(_=!1,y=0,w--);const C=h.node().getBBox();if(u.width+n*2-(m+b+x+y)>0){const j=u.width+n*2-(m+b+x+y);m+=j/w,b+=j/w,x>0&&(x+=j/w),y>0&&(y+=j/w)}const k=m+b+x+y,F=Z.svg(h),$=K(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((j,V)=>j+(V?.rowHeight??0),0));const M=Math.max(C.width+n*2,t?.width||0,k),P=Math.max((O??0)+u.height,t?.height||0),N=-M/2,E=-P/2;h.selectAll("g:not(:first-child)").each((j,V,lt)=>{const et=dt(lt[V]),yt=et.attr("transform");let ct=0,Lt=0;if(yt){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(yt);mt&&(ct=parseFloat(mt[1]),Lt=parseFloat(mt[2]),et.attr("class").includes("attribute-name")?ct+=m:et.attr("class").includes("attribute-keys")?ct+=m+b:et.attr("class").includes("attribute-comment")&&(ct+=m+b+x))}et.attr("transform",`translate(${N+n/2+ct}, ${Lt+E+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(E+a/2)+")");const T=F.rectangle(N,E,M,P,$),A=h.insert(()=>T,":first-child").attr("style",o.join("")),{themeVariables:R}=Ot(),{rowEven:B,rowOdd:z,nodeBorder:W}=R;f.push(0);for(const[j,V]of g.entries()){const et=(j+1)%2===0&&V.yOffset!==0,yt=F.rectangle(N,u.height+E+V?.yOffset,M,V?.rowHeight,{...$,fill:et?B:z,stroke:W});h.insert(()=>yt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${et?"even":"odd"}`)}let Y=F.line(N,u.height+E,M+N,u.height+E,$);h.insert(()=>Y).attr("class","divider"),Y=F.line(m+N,u.height+E,m+N,P+E,$),h.insert(()=>Y).attr("class","divider"),v&&(Y=F.line(m+b+N,u.height+E,m+b+N,P+E,$),h.insert(()=>Y).attr("class","divider")),_&&(Y=F.line(m+b+x+N,u.height+E,m+b+x+N,P+E,$),h.insert(()=>Y).attr("class","divider"));for(const j of f)Y=F.line(N,u.height+E+j,M+N,u.height+E+j,$),h.insert(()=>Y).attr("class","divider");if(Q(t,A),l&&t.look!=="handDrawn"){const V=l.split(";")?.filter(lt=>lt.includes("stroke"))?.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",V??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(j){return U.rect(t,j)},h}p(Yl,"erBox");async function Ir(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Ws(t)&&(t=Ws(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await He(s,t,{width:we(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.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 c=l.getBBox();if(St(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=dt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Ir,"addText");async function Km(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",nt(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,d=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const y=t.annotations[0];await Ni(s,{text:`«${y}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ni(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const y of t.members){const v=await Ni(c,y,m,[y.parseClassifier()]);m+=v+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=o.insert("g").attr("class","methods-group text");let b=0;for(const y of t.methods){const v=await Ni(h,y,b,[y.parseClassifier()]);b+=v+a}let x=o.node().getBBox();if(s!==null){const y=s.node().getBBox();s.attr("transform",`translate(${-y.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Km,"textHelper");async function Ni(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:St(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),yr(s)&&(o=!0);const l=await He(n,tl(Qe(s)),{width:we(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=dt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const y=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(y,10)*5+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";b(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.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=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Ni,"addText");async function Qm(e,t){const r=ft(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??St(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Km(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=X(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Z.svg(s),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let b=l.height;o.members.length===0&&o.methods.length===0?b+=n:o.members.length>0&&o.methods.length===0&&(b+=n*2);const x=-m/2,y=-b/2,v=f.rectangle(x-i,y-i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,b+2*i+(d?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),_=s.insert(()=>v,":first-child");_.attr("class","basic label-container");const w=_.node().getBBox();s.selectAll(".text").each(($,O,M)=>{const P=dt(M[O]),N=P.attr("transform");let E=0;if(N){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);B&&(E=parseFloat(B[2]))}let T=E+y+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(T-=4);let A=x;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(A=-P.node()?.getBBox().width/2||0,s.selectAll("text").each(function(R,B,z){window.getComputedStyle(z[B]).textAnchor==="middle"&&(A=0)})),P.attr("transform",`translate(${A}, ${T})`)});const C=s.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,k=s.select(".label-group").node().getBBox().height-(d?i/2:0)||0,F=s.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const $=f.line(w.x,C+k+y+i,w.x+w.width,C+k+y+i,g);s.insert(()=>$).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const $=f.line(w.x,C+k+F+y+n*2+i,w.x+w.width,C+k+F+y+i+n*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),!a){const $=RegExp(/color\s*:\s*([^;]*)/),O=$.exec(u);if(O){const M=O[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}else if(c){const M=$.exec(c);if(M){const P=M[0].replace("color","fill");s.selectAll("tspan").attr("style",P)}}}return Q(t,_),t.intersect=function($){return U.rect(t,$)},s}p(Qm,"classBox");async function Jm(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,l="verifyMethod"in t,c=nt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ye(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await ye(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=u;const f=await ye(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+s,l){const C=await ye(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=C;const k=await ye(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=k;const F=await ye(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=F,await ye(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const C=await ye(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=C,await ye(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,b=-g/2,x=-m/2,y=Z.svg(h),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=y.rectangle(b,x,g,m,v),w=h.insert(()=>_,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((C,k,F)=>{const $=dt(F[k]),O=$.attr("transform");let M=0,P=0;if(O){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);A&&(M=parseFloat(A[1]),P=parseFloat(A[2]))}const N=P-m/2;let E=b+o/2;(k===0||k===1)&&(E=M),$.attr("transform",`translate(${E}, ${N+o})`)}),d>u+f+s){const C=y.line(b,x+u+f+s,b+g,x+u+f+s,v);h.insert(()=>C).attr("style",i)}return Q(t,w),t.intersect=function(C){return U.rect(t,C)},h}p(Jm,"requirementBox");async function ye(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ft(),o=a.htmlLabels??!0,s=await He(n,tl(Qe(t)),{width:we(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=dt(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ye,"addText");var fT=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 t0(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await at(e,t,nt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Os(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await Os(s,"ticket"in t&&t.ticket||"",f);const{label:b,bbox:x}=await Os(s,"assigned"in t&&t.assigned||"",f);t.width=o;const y=10,v=t?.width||0,_=Math.max(m.height,x.height)/2,w=Math.max(l.height+y*2,t?.height||0)+_,C=-v/2,k=-w/2;c.attr("transform","translate("+(h-v/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-v/2)+", "+(-_+l.height/2)+")"),b.attr("transform","translate("+(h+v/2-x.width-2*a)+", "+(-_+l.height/2)+")");let F;const{rx:$,ry:O}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const P=Z.svg(s),N=K(t,{}),E=$||O?P.path(Je(C,k,v,w,$||0),N):P.rectangle(C,k,v,w,N);F=s.insert(()=>E,":first-child"),F.attr("class","basic label-container").attr("style",M||null)}else{F=s.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",n).attr("rx",$??5).attr("ry",O??5).attr("x",C).attr("y",k).attr("width",v).attr("height",w);const P="priority"in t&&t.priority;if(P){const N=s.append("line"),E=C+2,T=k+Math.floor(($??0)/2),A=k+w-Math.floor(($??0)/2);N.attr("x1",E).attr("y1",T).attr("x2",E).attr("y2",A).attr("stroke-width","4").attr("stroke",fT(P))}}return Q(t,F),t.height=w,t.intersect=function(P){return U.rect(t,P)},s}p(t0,"kanbanItem");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let b;const x=`M0 0
245
+ M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(b,g),y=n.insert(()=>x,":first-child");return y.attr("transform",`translate(${c/2}, ${c/2})`),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(v){return U.polygon(t,m,v)},n}p(Km,"windowPane");async function Yl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:j}=Ot(),{background:V}=j,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Yl(e,lt)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=X(t);if(r.attributes.length===0&&t.label){const j={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};we(t.label,i)+j.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const V=await ns(e,t,j);if(!St(i.htmlLabels)){const lt=V.select("text"),et=lt.node()?.getBBox();lt.attr("transform",`translate(${-et.width/2}, 0)`)}return V}i.htmlLabels||(n*=1.25,a*=1.25);let c=nt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Ir(h,t.label??"",i,0,0,["name"],s);u.height+=a;let d=0;const f=[],g=[];let m=0,b=0,x=0,y=0,v=!0,_=!0;for(const j of r.attributes){const V=await Ir(h,j.type,i,0,d,["attribute-type"],s);m=Math.max(m,V.width+n);const lt=await Ir(h,j.name,i,0,d,["attribute-name"],s);b=Math.max(b,lt.width+n);const et=await Ir(h,j.keys.join(),i,0,d,["attribute-keys"],s);x=Math.max(x,et.width+n);const yt=await Ir(h,j.comment,i,0,d,["attribute-comment"],s);y=Math.max(y,yt.width+n);const ct=Math.max(V.height,lt.height,et.height,yt.height)+a;g.push({yOffset:d,rowHeight:ct}),d+=ct}let w=4;x<=n&&(v=!1,x=0,w--),y<=n&&(_=!1,y=0,w--);const C=h.node().getBBox();if(u.width+n*2-(m+b+x+y)>0){const j=u.width+n*2-(m+b+x+y);m+=j/w,b+=j/w,x>0&&(x+=j/w),y>0&&(y+=j/w)}const k=m+b+x+y,F=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((j,V)=>j+(V?.rowHeight??0),0));const $=Math.max(C.width+n*2,t?.width||0,k),P=Math.max((O??0)+u.height,t?.height||0),N=-$/2,E=-P/2;h.selectAll("g:not(:first-child)").each((j,V,lt)=>{const et=dt(lt[V]),yt=et.attr("transform");let ct=0,Lt=0;if(yt){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(yt);mt&&(ct=parseFloat(mt[1]),Lt=parseFloat(mt[2]),et.attr("class").includes("attribute-name")?ct+=m:et.attr("class").includes("attribute-keys")?ct+=m+b:et.attr("class").includes("attribute-comment")&&(ct+=m+b+x))}et.attr("transform",`translate(${N+n/2+ct}, ${Lt+E+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(E+a/2)+")");const T=F.rectangle(N,E,$,P,M),A=h.insert(()=>T,":first-child").attr("style",o.join("")),{themeVariables:R}=Ot(),{rowEven:B,rowOdd:z,nodeBorder:W}=R;f.push(0);for(const[j,V]of g.entries()){const et=(j+1)%2===0&&V.yOffset!==0,yt=F.rectangle(N,u.height+E+V?.yOffset,$,V?.rowHeight,{...M,fill:et?B:z,stroke:W});h.insert(()=>yt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${et?"even":"odd"}`)}let Y=F.line(N,u.height+E,$+N,u.height+E,M);h.insert(()=>Y).attr("class","divider"),Y=F.line(m+N,u.height+E,m+N,P+E,M),h.insert(()=>Y).attr("class","divider"),v&&(Y=F.line(m+b+N,u.height+E,m+b+N,P+E,M),h.insert(()=>Y).attr("class","divider")),_&&(Y=F.line(m+b+x+N,u.height+E,m+b+x+N,P+E,M),h.insert(()=>Y).attr("class","divider"));for(const j of f)Y=F.line(N,u.height+E+j,$+N,u.height+E+j,M),h.insert(()=>Y).attr("class","divider");if(Q(t,A),l&&t.look!=="handDrawn"){const V=l.split(";")?.filter(lt=>lt.includes("stroke"))?.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",V??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(j){return U.rect(t,j)},h}p(Yl,"erBox");async function Ir(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==Ws(t)&&(t=Ws(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await He(s,t,{width:we(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.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 c=l.getBBox();if(St(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=dt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Ir,"addText");async function Qm(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",nt(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,d=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const y=t.annotations[0];await Ni(s,{text:`«${y}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Ni(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const y of t.members){const v=await Ni(c,y,m,[y.parseClassifier()]);m+=v+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=o.insert("g").attr("class","methods-group text");let b=0;for(const y of t.methods){const v=await Ni(h,y,b,[y.parseClassifier()]);b+=v+a}let x=o.node().getBBox();if(s!==null){const y=s.node().getBBox();s.attr("transform",`translate(${-y.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Qm,"textHelper");async function Ni(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:St(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),yr(s)&&(o=!0);const l=await He(n,tl(Qe(s)),{width:we(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=dt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(b=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const y=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(y,10)*5+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";b(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.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=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Ni,"addText");async function Jm(e,t){const r=ft(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??St(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Qm(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=X(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Z.svg(s),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let b=l.height;o.members.length===0&&o.methods.length===0?b+=n:o.members.length>0&&o.methods.length===0&&(b+=n*2);const x=-m/2,y=-b/2,v=f.rectangle(x-i,y-i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,b+2*i+(d?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),_=s.insert(()=>v,":first-child");_.attr("class","basic label-container");const w=_.node().getBBox();s.selectAll(".text").each((M,O,$)=>{const P=dt($[O]),N=P.attr("transform");let E=0;if(N){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);B&&(E=parseFloat(B[2]))}let T=E+y+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(T-=4);let A=x;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(A=-P.node()?.getBBox().width/2||0,s.selectAll("text").each(function(R,B,z){window.getComputedStyle(z[B]).textAnchor==="middle"&&(A=0)})),P.attr("transform",`translate(${A}, ${T})`)});const C=s.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,k=s.select(".label-group").node().getBBox().height-(d?i/2:0)||0,F=s.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const M=f.line(w.x,C+k+y+i,w.x+w.width,C+k+y+i,g);s.insert(()=>M).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const M=f.line(w.x,C+k+F+y+n*2+i,w.x+w.width,C+k+F+y+i+n*2,g);s.insert(()=>M).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),!a){const M=RegExp(/color\s*:\s*([^;]*)/),O=M.exec(u);if(O){const $=O[0].replace("color","fill");s.selectAll("tspan").attr("style",$)}else if(c){const $=M.exec(c);if($){const P=$[0].replace("color","fill");s.selectAll("tspan").attr("style",P)}}}return Q(t,_),t.intersect=function(M){return U.rect(t,M)},s}p(Jm,"classBox");async function t0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,l="verifyMethod"in t,c=nt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ye(h,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):u=await ye(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=u;const f=await ye(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+s,l){const C=await ye(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=C;const k=await ye(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=k;const F=await ye(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=F,await ye(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const C=await ye(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=C,await ye(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,b=-g/2,x=-m/2,y=Z.svg(h),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=y.rectangle(b,x,g,m,v),w=h.insert(()=>_,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((C,k,F)=>{const M=dt(F[k]),O=M.attr("transform");let $=0,P=0;if(O){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);A&&($=parseFloat(A[1]),P=parseFloat(A[2]))}const N=P-m/2;let E=b+o/2;(k===0||k===1)&&(E=$),M.attr("transform",`translate(${E}, ${N+o})`)}),d>u+f+s){const C=y.line(b,x+u+f+s,b+g,x+u+f+s,v);h.insert(()=>C).attr("style",i)}return Q(t,w),t.intersect=function(C){return U.rect(t,C)},h}p(t0,"requirementBox");async function ye(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ft(),o=a.htmlLabels??!0,s=await He(n,tl(Qe(t)),{width:we(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=dt(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ye,"addText");var pT=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 e0(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await at(e,t,nt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Os(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await Os(s,"ticket"in t&&t.ticket||"",f);const{label:b,bbox:x}=await Os(s,"assigned"in t&&t.assigned||"",f);t.width=o;const y=10,v=t?.width||0,_=Math.max(m.height,x.height)/2,w=Math.max(l.height+y*2,t?.height||0)+_,C=-v/2,k=-w/2;c.attr("transform","translate("+(h-v/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-v/2)+", "+(-_+l.height/2)+")"),b.attr("transform","translate("+(h+v/2-x.width-2*a)+", "+(-_+l.height/2)+")");let F;const{rx:M,ry:O}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const P=Z.svg(s),N=K(t,{}),E=M||O?P.path(Je(C,k,v,w,M||0),N):P.rectangle(C,k,v,w,N);F=s.insert(()=>E,":first-child"),F.attr("class","basic label-container").attr("style",$||null)}else{F=s.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",n).attr("rx",M??5).attr("ry",O??5).attr("x",C).attr("y",k).attr("width",v).attr("height",w);const P="priority"in t&&t.priority;if(P){const N=s.append("line"),E=C+2,T=k+Math.floor((M??0)/2),A=k+w-Math.floor((M??0)/2);N.attr("x1",E).attr("y1",T).attr("x2",E).attr("y2",A).attr("stroke-width","4").attr("stroke",pT(P))}}return Q(t,F),t.height=w,t.intersect=function(P){return U.rect(t,P)},s}p(e0,"kanbanItem");async function r0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let b;const x=`M0 0
246
246
  a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
247
247
  a${h},${h} 1 0,0 ${g*.25},0
248
248
  a${h},${h} 1 0,0 ${g*.25},0
@@ -260,7 +260,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
260
260
  a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
261
261
  a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
262
262
  a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
263
- H0 V0 Z`;if(t.look==="handDrawn"){const y=Z.svg(n),v=K(t,{}),_=y.path(x,v);b=n.insert(()=>_,":first-child"),b.attr("class","basic label-container").attr("style",qt(u))}else b=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return b.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,b),t.calcIntersect=function(y,v){return U.rect(y,v)},t.intersect=function(y){return D.info("Bang intersect",t,y),U.rect(t,y)},n}p(e0,"bang");async function r0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const b=`M0 0
263
+ H0 V0 Z`;if(t.look==="handDrawn"){const y=Z.svg(n),v=K(t,{}),_=y.path(x,v);b=n.insert(()=>_,":first-child"),b.attr("class","basic label-container").attr("style",qt(u))}else b=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return b.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,b),t.calcIntersect=function(y,v){return U.rect(y,v)},t.intersect=function(y){return D.info("Bang intersect",t,y),U.rect(t,y)},n}p(r0,"bang");async function i0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const b=`M0 0
264
264
  a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
265
265
  a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
266
266
  a${u},${u} 1 0,1 ${l*.35},${l*.2}
@@ -274,7 +274,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
274
274
 
275
275
  a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
276
276
  a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
277
- H0 V0 Z`;if(t.look==="handDrawn"){const x=Z.svg(n),y=K(t,{}),v=x.path(b,y);m=n.insert(()=>v,":first-child"),m.attr("class","basic label-container").attr("style",qt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(x,y){return U.rect(x,y)},t.intersect=function(x){return D.info("Cloud intersect",t,x),U.rect(t,x)},n}p(r0,"cloud");async function i0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=`
277
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=Z.svg(n),y=K(t,{}),v=x.path(b,y);m=n.insert(()=>v,":first-child"),m.attr("class","basic label-container").attr("style",qt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(x,y){return U.rect(x,y)},t.intersect=function(x){return D.info("Cloud intersect",t,x),U.rect(t,x)},n}p(i0,"cloud");async function n0(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await at(e,t,nt(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=`
278
278
  M${-l/2} ${c/2-h}
279
279
  v${-c+2*h}
280
280
  q0,-${h} ${h},-${h}
@@ -285,21 +285,21 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error
285
285
  h${-l+2*h}
286
286
  q-${h},0 -${h},-${h}
287
287
  Z
288
- `,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>s.node()),Q(t,d),t.calcIntersect=function(f,g){return U.rect(f,g)},t.intersect=function(f){return U.rect(t,f)},n}p(i0,"defaultMindmapNode");async function n0(e,t){const r={padding:t.padding??0};return Ul(e,t,r)}p(n0,"mindmapCircle");var pT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Om},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:$m},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Im},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:am},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ul},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:e0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:r0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Lm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:dm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_m},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:wm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Um},{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:xm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:om},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Wm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Kg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Fm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Pm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Nm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:em},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:im},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Cm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Vm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:um},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:km},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sm},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Gm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Zm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ym},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Rm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Am},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Tm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Zg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Hm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:qm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Xm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Bm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Sm}],gT=p(()=>{const t=[...Object.entries({state:Dm,choice:Qg,note:Em,rectWithTitle:Mm,labelRect:vm,iconSquare:ym,iconCircle:gm,icon:pm,iconRounded:mm,imageSquare:bm,anchor:Xg,kanbanItem:t0,mindmapCircle:n0,defaultMindmapNode:i0,classBox:Qm,erBox:Yl,requirementBox:Jm}),...pT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),a0=gT();function s0(e){return e in a0}p(s0,"isValidShape");var as=new Map;async function Gl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?a0[t.shape]:void 0;if(!a)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),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),as.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Gl,"insertNode");var mT=p((e,t)=>{as.set(t.id,e)},"setNodeElem"),yT=p(()=>{as.clear()},"clear"),bT=p(e=>{const t=as.get(e.id);D.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"),xT=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&Hh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Hh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),vT={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}},Hh=p((e,t,r,i,n,a,o)=>{const s=vT[r];if(!s){D.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",o),s.fill&&b.setAttribute("fill",o)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Ta=new Map,Rt=new Map,wT=p(()=>{Ta.clear(),Rt.clear()},"clear"),Fn=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),o0=p(async(e,t)=>{let r=St(ft().flowchart.htmlLabels);const{labelStyles:i}=X(t);t.labelStyle=i;const n=await He(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});D.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(n);let s=n.getBBox();if(r){const c=n.children[0],h=dt(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Ta.set(t.id,a),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await dr(t.startLabelLeft,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startLeft=h,Pi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await dr(t.startLabelRight,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startRight=h,Pi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await dr(t.endLabelLeft,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endLeft=h,Pi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await dr(t.endLabelRight,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endRight=h,Pi(l,t.endLabelRight)}return n},"insertEdgeLabel");function Pi(e,t){ft().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Pi,"setTerminalWidth");var l0=p((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,Ta.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ft(),{subGraphTitleTotalMargin:n}=Ua(i);if(e.label){const a=Ta.get(e.id);let o=e.x,s=e.y;if(r){const l=ae.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Rt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Rt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Rt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Rt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),_T=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),CT=p((e,t,r)=>{D.debug(`intersection calc abc89:
288
+ `,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>s.node()),Q(t,d),t.calcIntersect=function(f,g){return U.rect(f,g)},t.intersect=function(f){return U.rect(t,f)},n}p(n0,"defaultMindmapNode");async function a0(e,t){const r={padding:t.padding??0};return Ul(e,t,r)}p(a0,"mindmapCircle");var gT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Im},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Fm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Dm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:qm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:sm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ul},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:r0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:i0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Bm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Cm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_m},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ym},{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:vm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:jm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Qg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Rm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Pm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:um},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:rm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:im},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:km},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Xm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Um},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Sm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:am},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:om},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Vm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Km},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:cm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Gm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Om},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Em},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Am},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Kg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:em},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Wm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Hm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Zm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Mm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Tm}],mT=p(()=>{const t=[...Object.entries({state:Nm,choice:Jg,note:Lm,rectWithTitle:$m,labelRect:wm,iconSquare:bm,iconCircle:mm,icon:gm,iconRounded:ym,imageSquare:xm,anchor:Zg,kanbanItem:e0,mindmapCircle:a0,defaultMindmapNode:n0,classBox:Jm,erBox:Yl,requirementBox:t0}),...gT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),s0=mT();function o0(e){return e in s0}p(o0,"isValidShape");var as=new Map;async function Gl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?s0[t.shape]:void 0;if(!a)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),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),as.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Gl,"insertNode");var yT=p((e,t)=>{as.set(t.id,e)},"setNodeElem"),bT=p(()=>{as.clear()},"clear"),xT=p(e=>{const t=as.get(e.id);D.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"),vT=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&Hh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Hh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),wT={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}},Hh=p((e,t,r,i,n,a,o)=>{const s=wT[r];if(!s){D.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",o),s.fill&&b.setAttribute("fill",o)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Ta=new Map,Rt=new Map,_T=p(()=>{Ta.clear(),Rt.clear()},"clear"),Fn=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),l0=p(async(e,t)=>{let r=St(ft().flowchart.htmlLabels);const{labelStyles:i}=X(t);t.labelStyle=i;const n=await He(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});D.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(n);let s=n.getBBox();if(r){const c=n.children[0],h=dt(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Ta.set(t.id,a),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await dr(t.startLabelLeft,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startLeft=h,Pi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await dr(t.startLabelRight,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startRight=h,Pi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await dr(t.endLabelLeft,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endLeft=h,Pi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await dr(t.endLabelRight,Fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endRight=h,Pi(l,t.endLabelRight)}return n},"insertEdgeLabel");function Pi(e,t){ft().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Pi,"setTerminalWidth");var c0=p((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,Ta.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ft(),{subGraphTitleTotalMargin:n}=Ua(i);if(e.label){const a=Ta.get(e.id);let o=e.x,s=e.y;if(r){const l=ae.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Rt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Rt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Rt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Rt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),CT=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),kT=p((e,t,r)=>{D.debug(`intersection calc abc89:
289
289
  outsidePoint: ${JSON.stringify(t)}
290
290
  insidePoint : ${JSON.stringify(r)}
291
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;s=h*u/c;const d={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,d),d}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,d=r.x<t.x?r.x+h-s:r.x-h+s,f=r.y<t.y?r.y+u:r.y-u;return D.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:d,_y:f}),s===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),Wh=p((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(D.info("abc88 checking point",a,t),!_T(t,a)&&!n){const o=CT(t,i,a);D.debug("abc88 inside",a,i,o),D.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?D.warn("abc88 no intersect",o,r):r.push(o),n=!0}else D.warn("abc88 outside",a,i),i=a,n||r.push(a)}),D.debug("returning points",r),r},"cutPathAtIntersect");function c0(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(c0,"extractCornerPoints");var jh=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),kT=p(function(e){const{cornerPointPositions:t}=c0(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=jh(n,o,5),l=jh(a,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){D.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;o.x===s.x?d={x:c<0?s.x-f+u:s.x+f-u,y:h<0?s.y-u:s.y+u}:d={x:c<0?s.x-u:s.x+u,y:h<0?s.y-f+u:s.y+f-u}}else D.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),ST=p((e,t,r)=>{const i=e-t-r,n=2,a=2,o=n+a,s=Math.floor(i/o),l=Array(s).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),h0=p(function(e,t,r,i,n,a,o,s=!1){const{handDrawnSeed:l}=ft();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const E in t.cssCompiledStyles)xl(E)||f.push(t.cssCompiledStyles[E]);D.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),D.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),c=Wh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Wh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(E=>!Number.isNaN(E.y));m=kT(m);let b=Wi;switch(b=sa,t.curve){case"linear":b=sa;break;case"basis":b=Wi;break;case"cardinal":b=xd;break;case"bumpX":b=pd;break;case"bumpY":b=gd;break;case"catmullRom":b=wd;break;case"monotoneX":b=Ad;break;case"monotoneY":b=Ed;break;case"natural":b=Bd;break;case"step":b=Md;break;case"stepAfter":b=Fd;break;case"stepBefore":b=$d;break;default:b=Wi}const{x,y}=xp(t),v=dd().x(x).y(y).curve(b);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 w,C=t.curve==="rounded"?u0(d0(m,t),5):v(m);const k=Array.isArray(t.style)?t.style:[t.style];let F=k.find(E=>E?.startsWith("stroke:")),$=!1;if(t.look==="handDrawn"){const E=Z.svg(e);Object.assign([],m);const T=E.path(C,{roughness:.3,seed:l});_+=" transition",w=dt(T).select("path").attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")).attr("style",k?k.reduce((R,B)=>R+";"+B,""):"");let A=w.attr("d");w.attr("d",A),e.node().appendChild(w.node())}else{const E=f.join(";"),T=k?k.reduce((j,V)=>j+V+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const R=(E?E+";"+T+";":T)+";"+(k?k.reduce((j,V)=>j+";"+V,""):"");w=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(A??"")).attr("style",R),F=R.match(/stroke:([^;]+)/)?.[1],$=t.animate===!0||!!t.animation||E.includes("animation");const B=w.node(),z=typeof B.getTotalLength=="function"?B.getTotalLength():0,W=hh[t.arrowTypeStart]||0,Y=hh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const V=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ST(z,W,Y):`0 ${W} ${z-W-Y} ${Y}`}; stroke-dashoffset: 0;`;w.attr("style",V+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let O="";(ft().flowchart.arrowMarkerAbsolute||ft().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd),xT(w,t,O,o,i,F);const M=Math.floor(c.length/2),P=c[M];ae.isLabelCoordinateInPath(P,w.attr("d"))||(h=!0);let N={};return h&&(N.updatedPath=c),N.originalPath=t.points,N},"insertEdge");function u0(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const o=e[a],s=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,d=l.y-o.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${o.x},${o.y}`;continue}const m=c/f,b=h/f,x=u/g,y=d/g,v=m*x+b*y,_=Math.max(-1,Math.min(1,v)),w=Math.acos(_);if(w<n||Math.abs(Math.PI-w)<n){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(w/2),f/2,g/2),k=o.x-m*C,F=o.y-b*C,$=o.x+x*C,O=o.y+y*C;r+=`L${k},${F}`,r+=`Q${o.x},${o.y} ${$},${O}`}}return r}p(u0,"generateRoundedPath");function Oo(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(Oo,"calculateDeltaAndAngle");function d0(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Pt[t.arrowTypeStart]){const n=Pt[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=Oo(a,o),l=n*Math.cos(s),c=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Pt[t.arrowTypeEnd]){const n=Pt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:s}=Oo(o,a),l=n*Math.cos(s),c=n*Math.sin(s);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(d0,"applyMarkerOffsetsToPoints");var TT=p((e,t,r,i)=>{t.forEach(n=>{HT[n](e,r,i)})},"insertMarkers"),AT=p((e,t,r)=>{D.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"),ET=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"),LT=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"),BT=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"),MT=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"),$T=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"),FT=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"),RT=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"),OT=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"),IT=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"),DT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),NT=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"),PT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),zT=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
291
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;s=h*u/c;const d={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),D.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,d),d}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,d=r.x<t.x?r.x+h-s:r.x-h+s,f=r.y<t.y?r.y+u:r.y-u;return D.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:d,_y:f}),s===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),Wh=p((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(D.info("abc88 checking point",a,t),!CT(t,a)&&!n){const o=kT(t,i,a);D.debug("abc88 inside",a,i,o),D.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?D.warn("abc88 no intersect",o,r):r.push(o),n=!0}else D.warn("abc88 outside",a,i),i=a,n||r.push(a)}),D.debug("returning points",r),r},"cutPathAtIntersect");function h0(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(h0,"extractCornerPoints");var jh=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),ST=p(function(e){const{cornerPointPositions:t}=h0(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=jh(n,o,5),l=jh(a,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){D.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;o.x===s.x?d={x:c<0?s.x-f+u:s.x+f-u,y:h<0?s.y-u:s.y+u}:d={x:c<0?s.x-u:s.x+u,y:h<0?s.y-f+u:s.y+f-u}}else D.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),TT=p((e,t,r)=>{const i=e-t-r,n=2,a=2,o=n+a,s=Math.floor(i/o),l=Array(s).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),u0=p(function(e,t,r,i,n,a,o,s=!1){const{handDrawnSeed:l}=ft();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const E in t.cssCompiledStyles)xl(E)||f.push(t.cssCompiledStyles[E]);D.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),D.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),c=Wh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Wh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(E=>!Number.isNaN(E.y));m=ST(m);let b=Wi;switch(b=sa,t.curve){case"linear":b=sa;break;case"basis":b=Wi;break;case"cardinal":b=vd;break;case"bumpX":b=gd;break;case"bumpY":b=md;break;case"catmullRom":b=_d;break;case"monotoneX":b=Ed;break;case"monotoneY":b=Ld;break;case"natural":b=Md;break;case"step":b=$d;break;case"stepAfter":b=Rd;break;case"stepBefore":b=Fd;break;default:b=Wi}const{x,y}=vp(t),v=fd().x(x).y(y).curve(b);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 w,C=t.curve==="rounded"?d0(f0(m,t),5):v(m);const k=Array.isArray(t.style)?t.style:[t.style];let F=k.find(E=>E?.startsWith("stroke:")),M=!1;if(t.look==="handDrawn"){const E=Z.svg(e);Object.assign([],m);const T=E.path(C,{roughness:.3,seed:l});_+=" transition",w=dt(T).select("path").attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")).attr("style",k?k.reduce((R,B)=>R+";"+B,""):"");let A=w.attr("d");w.attr("d",A),e.node().appendChild(w.node())}else{const E=f.join(";"),T=k?k.reduce((j,V)=>j+V+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const R=(E?E+";"+T+";":T)+";"+(k?k.reduce((j,V)=>j+";"+V,""):"");w=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(A??"")).attr("style",R),F=R.match(/stroke:([^;]+)/)?.[1],M=t.animate===!0||!!t.animation||E.includes("animation");const B=w.node(),z=typeof B.getTotalLength=="function"?B.getTotalLength():0,W=hh[t.arrowTypeStart]||0,Y=hh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!M){const V=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?TT(z,W,Y):`0 ${W} ${z-W-Y} ${Y}`}; stroke-dashoffset: 0;`;w.attr("style",V+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let O="";(ft().flowchart.arrowMarkerAbsolute||ft().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd),vT(w,t,O,o,i,F);const $=Math.floor(c.length/2),P=c[$];ae.isLabelCoordinateInPath(P,w.attr("d"))||(h=!0);let N={};return h&&(N.updatedPath=c),N.originalPath=t.points,N},"insertEdge");function d0(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const o=e[a],s=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,d=l.y-o.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${o.x},${o.y}`;continue}const m=c/f,b=h/f,x=u/g,y=d/g,v=m*x+b*y,_=Math.max(-1,Math.min(1,v)),w=Math.acos(_);if(w<n||Math.abs(Math.PI-w)<n){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(w/2),f/2,g/2),k=o.x-m*C,F=o.y-b*C,M=o.x+x*C,O=o.y+y*C;r+=`L${k},${F}`,r+=`Q${o.x},${o.y} ${M},${O}`}}return r}p(d0,"generateRoundedPath");function Oo(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(Oo,"calculateDeltaAndAngle");function f0(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Pt[t.arrowTypeStart]){const n=Pt[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=Oo(a,o),l=n*Math.cos(s),c=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Pt[t.arrowTypeEnd]){const n=Pt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:s}=Oo(o,a),l=n*Math.cos(s),c=n*Math.sin(s);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(f0,"applyMarkerOffsetsToPoints");var AT=p((e,t,r,i)=>{t.forEach(n=>{WT[n](e,r,i)})},"insertMarkers"),ET=p((e,t,r)=>{D.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"),LT=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"),BT=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"),MT=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"),$T=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"),FT=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"),RT=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"),OT=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"),IT=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"),DT=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"),NT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),PT=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"),zT=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 n=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");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),qT=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
292
292
  L20,10
293
293
  M20,10
294
- L0,20`)},"requirement_arrow"),qT=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"),HT={extension:AT,composition:ET,aggregation:LT,dependency:BT,lollipop:MT,point:$T,circle:FT,cross:RT,barb:OT,only_one:IT,zero_or_one:DT,one_or_more:NT,zero_or_more:PT,requirement_arrow:zT,requirement_contains:qT},f0=TT,WT={common:Cr,getConfig:Ot,insertCluster:Hg,insertEdge:h0,insertEdgeLabel:o0,insertMarkers:f0,insertNode:Gl,interpolateToCurve:Sl,labelHelper:at,log:D,positionEdgeLabel:l0},sn={},p0=p(e=>{for(const t of e)sn[t.name]=t},"registerLayoutLoaders"),jT=p(()=>{p0([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-BDO_6Xym.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-C7BvuPwg.cjs")),"loader")}])},"registerDefaultLayoutLoaders");jT();var UT=p(async(e,t)=>{if(!(e.layoutAlgorithm in sn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=sn[e.layoutAlgorithm];return(await r.loader()).render(e,t,WT,{algorithm:r.algorithm})},"render"),YT=p((e="",{fallback:t="dagre"}={})=>{if(e in sn)return e;if(t in sn)return D.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"),g0="comm",m0="rule",y0="decl",GT="@import",VT="@namespace",XT="@keyframes",ZT="@layer",b0=Math.abs,Vl=String.fromCharCode;function x0(e){return e.trim()}function Yn(e,t,r){return e.replace(t,r)}function KT(e,t,r){return e.indexOf(t,r)}function qr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function be(e){return e.length}function QT(e){return e.length}function Rn(e,t){return t.push(e),e}var ss=1,ni=1,v0=0,oe=0,Ct=0,fi="";function Xl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:ss,column:ni,length:o,return:"",siblings:s}}function JT(){return Ct}function tA(){return Ct=oe>0?qr(fi,--oe):0,ni--,Ct===10&&(ni=1,ss--),Ct}function ue(){return Ct=oe<v0?qr(fi,oe++):0,ni++,Ct===10&&(ni=1,ss++),Ct}function Ue(){return qr(fi,oe)}function Gn(){return oe}function os(e,t){return ii(fi,e,t)}function on(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 eA(e){return ss=ni=1,v0=be(fi=e),oe=0,[]}function rA(e){return fi="",e}function Is(e){return x0(os(oe-1,Io(e===91?e+2:e===40?e+1:e)))}function iA(e){for(;(Ct=Ue())&&Ct<33;)ue();return on(e)>2||on(Ct)>3?"":" "}function nA(e,t){for(;--t&&ue()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return os(e,Gn()+(t<6&&Ue()==32&&ue()==32))}function Io(e){for(;ue();)switch(Ct){case e:return oe;case 34:case 39:e!==34&&e!==39&&Io(Ct);break;case 40:e===41&&Io(e);break;case 92:ue();break}return oe}function aA(e,t){for(;ue()&&e+Ct!==57;)if(e+Ct===84&&Ue()===47)break;return"/*"+os(t,oe-1)+"*"+Vl(e===47?e:ue())}function sA(e){for(;!on(Ue());)ue();return os(e,oe)}function oA(e){return rA(Vn("",null,null,null,[""],e=eA(e),0,[0],e))}function Vn(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,d=0,f=0,g=0,m=1,b=1,x=1,y=0,v="",_=n,w=a,C=i,k=v;b;)switch(g=y,y=ue()){case 40:if(g!=108&&qr(k,u-1)==58){KT(k+=Yn(Is(y),"&","&\f"),"&\f",b0(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Is(y);break;case 9:case 10:case 13:case 32:k+=iA(g);break;case 92:k+=nA(Gn()-1,7);continue;case 47:switch(Ue()){case 42:case 47:Rn(lA(aA(ue(),Gn()),t,r,l),l),(on(g||1)==5||on(Ue()||1)==5)&&be(k)&&ii(k,-1,void 0)!==" "&&(k+=" ");break;default:k+="/"}break;case 123*m:s[c++]=be(k)*x;case 125*m:case 59:case 0:switch(y){case 0:case 125:b=0;case 59+h:x==-1&&(k=Yn(k,/\f/g,"")),f>0&&(be(k)-u||m===0&&g===47)&&Rn(f>32?Yh(k+";",i,r,u-1,l):Yh(Yn(k," ","")+";",i,r,u-2,l),l);break;case 59:k+=";";default:if(Rn(C=Uh(k,t,r,c,h,n,s,v,_=[],w=[],u,a),a),y===123)if(h===0)Vn(k,t,C,C,_,a,u,s,w);else{switch(d){case 99:if(qr(k,3)===110)break;case 108:if(qr(k,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Vn(e,C,C,i&&Rn(Uh(e,C,C,0,0,n,s,v,n,_=[],u,w),w),n,w,u,s,i?_:w):Vn(k,C,C,C,[""],w,0,s,w)}}c=h=f=0,m=x=1,v=k="",u=o;break;case 58:u=1+be(k),f=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&tA()==125)continue}switch(k+=Vl(y),y*m){case 38:x=h>0?1:(k+="\f",-1);break;case 44:s[c++]=(be(k)-1)*x,x=1;break;case 64:Ue()===45&&(k+=Is(ue())),d=Ue(),h=u=be(v=k+=sA(Gn())),y++;break;case 45:g===45&&be(k)==2&&(m=0)}}return a}function Uh(e,t,r,i,n,a,o,s,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=QT(f),m=0,b=0,x=0;m<i;++m)for(var y=0,v=ii(e,d+1,d=b0(b=o[m])),_=e;y<g;++y)(_=x0(b>0?f[y]+" "+v:Yn(v,/&\f/g,f[y])))&&(l[x++]=_);return Xl(e,t,r,n===0?m0:s,l,c,h,u)}function lA(e,t,r,i){return Xl(e,t,r,g0,Vl(JT()),ii(e,2,-2),0,i)}function Yh(e,t,r,i,n){return Xl(e,t,r,y0,ii(e,0,i),ii(e,i+1,-1),i,n)}function Do(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function cA(e,t,r,i){switch(e.type){case ZT:if(e.children.length)break;case GT:case VT:case y0:return e.return=e.return||e.value;case g0:return"";case XT:return e.return=e.value+"{"+Do(e.children,i)+"}";case m0:if(!be(e.value=e.props.join(",")))return""}return be(r=Do(e.children,i))?e.return=e.value+"{"+r+"}":""}var hA=Lp(Object.keys,Object),uA=Object.prototype,dA=uA.hasOwnProperty;function w0(e){if(!un(e))return hA(e);var t=[];for(var r in Object(e))dA.call(e,r)&&r!="constructor"&&t.push(r);return t}var No=Tr(Ce,"DataView"),Po=Tr(Ce,"Promise"),Aa=Tr(Ce,"Set"),zo=Tr(Ce,"WeakMap"),Gh="[object Map]",fA="[object Object]",Vh="[object Promise]",Xh="[object Set]",Zh="[object WeakMap]",Kh="[object DataView]",pA=Sr(No),gA=Sr(en),mA=Sr(Po),yA=Sr(Aa),bA=Sr(zo);exports.getTag=kr;(No&&exports.getTag(new No(new ArrayBuffer(1)))!=Kh||en&&exports.getTag(new en)!=Gh||Po&&exports.getTag(Po.resolve())!=Vh||Aa&&exports.getTag(new Aa)!=Xh||zo&&exports.getTag(new zo)!=Zh)&&(exports.getTag=function(e){var t=kr(e),r=t==fA?e.constructor:void 0,i=r?Sr(r):"";if(i)switch(i){case pA:return Kh;case gA:return Gh;case mA:return Vh;case yA:return Xh;case bA:return Zh}return t});var xA="[object Map]",vA="[object Set]",wA=Object.prototype,_A=wA.hasOwnProperty;function qo(e){if(e==null)return!0;if(dn(e)&&(nn(e)||typeof e=="string"||typeof e.splice=="function"||Za(e)||Ka(e)||rn(e)))return!e.length;var t=exports.getTag(e);if(t==xA||t==vA)return!e.size;if(un(e))return!w0(e).length;for(var r in e)if(_A.call(e,r))return!1;return!0}var _0="c4",CA=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),kA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-BYVjZbLc.cjs"));return{id:_0,diagram:e}},"loader"),SA={id:_0,detector:CA,loader:kA},TA=SA,C0="flowchart",AA=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),EA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-5A4_sBNY.cjs"));return{id:C0,diagram:e}},"loader"),LA={id:C0,detector:AA,loader:EA},BA=LA,k0="flowchart-v2",MA=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),$A=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-5A4_sBNY.cjs"));return{id:k0,diagram:e}},"loader"),FA={id:k0,detector:MA,loader:$A},RA=FA,S0="er",OA=p(e=>/^\s*erDiagram/.test(e),"detector"),IA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-DMI3tmxl.cjs"));return{id:S0,diagram:e}},"loader"),DA={id:S0,detector:OA,loader:IA},NA=DA,T0="gitGraph",PA=p(e=>/^\s*gitGraph/.test(e),"detector"),zA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-Zo3VoU22.cjs"));return{id:T0,diagram:e}},"loader"),qA={id:T0,detector:PA,loader:zA},HA=qA,A0="gantt",WA=p(e=>/^\s*gantt/.test(e),"detector"),jA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-Di_mSpM4.cjs"));return{id:A0,diagram:e}},"loader"),UA={id:A0,detector:WA,loader:jA},YA=UA,E0="info",GA=p(e=>/^\s*info/.test(e),"detector"),VA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-Bo0BEUXt.cjs"));return{id:E0,diagram:e}},"loader"),XA={id:E0,detector:GA,loader:VA},L0="pie",ZA=p(e=>/^\s*pie/.test(e),"detector"),KA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-CM-wBUyg.cjs"));return{id:L0,diagram:e}},"loader"),QA={id:L0,detector:ZA,loader:KA},B0="quadrantChart",JA=p(e=>/^\s*quadrantChart/.test(e),"detector"),tE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-Clw2nM_F.cjs"));return{id:B0,diagram:e}},"loader"),eE={id:B0,detector:JA,loader:tE},rE=eE,M0="xychart",iE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),nE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-Dd_ozcYK.cjs"));return{id:M0,diagram:e}},"loader"),aE={id:M0,detector:iE,loader:nE},sE=aE,$0="requirement",oE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),lE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-1-1thDpH.cjs"));return{id:$0,diagram:e}},"loader"),cE={id:$0,detector:oE,loader:lE},hE=cE,F0="sequence",uE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),dE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-BrHzXdLN.cjs"));return{id:F0,diagram:e}},"loader"),fE={id:F0,detector:uE,loader:dE},pE=fE,R0="class",gE=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),mE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-BCC_pUko.cjs"));return{id:R0,diagram:e}},"loader"),yE={id:R0,detector:gE,loader:mE},bE=yE,O0="classDiagram",xE=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),vE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-BCC_pUko.cjs"));return{id:O0,diagram:e}},"loader"),wE={id:O0,detector:xE,loader:vE},_E=wE,I0="state",CE=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),kE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DWwZaiBT.cjs"));return{id:I0,diagram:e}},"loader"),SE={id:I0,detector:CE,loader:kE},TE=SE,D0="stateDiagram",AE=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),EE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-1pP7FlNK.cjs"));return{id:D0,diagram:e}},"loader"),LE={id:D0,detector:AE,loader:EE},BE=LE,N0="journey",ME=p(e=>/^\s*journey/.test(e),"detector"),$E=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-DheOFUdb.cjs"));return{id:N0,diagram:e}},"loader"),FE={id:N0,detector:ME,loader:$E},RE=FE,OE=p((e,t,r)=>{D.debug(`rendering svg for syntax error
295
- `);const i=Rd(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Vo(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),P0={draw:OE},IE=P0,DE={db:{},renderer:P0,parser:{parse:p(()=>{},"parse")}},NE=DE,z0="flowchart-elk",PE=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),zE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-5A4_sBNY.cjs"));return{id:z0,diagram:e}},"loader"),qE={id:z0,detector:PE,loader:zE},HE=qE,q0="timeline",WE=p(e=>/^\s*timeline/.test(e),"detector"),jE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-B0tadNst.cjs"));return{id:q0,diagram:e}},"loader"),UE={id:q0,detector:WE,loader:jE},YE=UE,H0="mindmap",GE=p(e=>/^\s*mindmap/.test(e),"detector"),VE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-CjEd2rXr.cjs"));return{id:H0,diagram:e}},"loader"),XE={id:H0,detector:GE,loader:VE},ZE=XE,W0="kanban",KE=p(e=>/^\s*kanban/.test(e),"detector"),QE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-a3IAMecl.cjs"));return{id:W0,diagram:e}},"loader"),JE={id:W0,detector:KE,loader:QE},tL=JE,j0="sankey",eL=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-Bq9aHWZK.cjs"));return{id:j0,diagram:e}},"loader"),iL={id:j0,detector:eL,loader:rL},nL=iL,U0="packet",aL=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-DO-Y8dIg.cjs"));return{id:U0,diagram:e}},"loader"),oL={id:U0,detector:aL,loader:sL},Y0="radar",lL=p(e=>/^\s*radar-beta/.test(e),"detector"),cL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-DcJVSNI1.cjs"));return{id:Y0,diagram:e}},"loader"),hL={id:Y0,detector:lL,loader:cL},G0="block",uL=p(e=>/^\s*block(-beta)?/.test(e),"detector"),dL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-C6q1K50p.cjs"));return{id:G0,diagram:e}},"loader"),fL={id:G0,detector:uL,loader:dL},pL=fL,V0="architecture",gL=p(e=>/^\s*architecture/.test(e),"detector"),mL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-T_lx5B0h.cjs"));return{id:V0,diagram:e}},"loader"),yL={id:V0,detector:gL,loader:mL},bL=yL,X0="treemap",xL=p(e=>/^\s*treemap/.test(e),"detector"),vL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-BC7MSdmh.cjs"));return{id:X0,diagram:e}},"loader"),wL={id:X0,detector:xL,loader:vL},Qh=!1,ls=p(()=>{Qh||(Qh=!0,Jn("error",NE,e=>e.toLowerCase().trim()==="error"),Jn("---",{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("---")),qs(HE,ZE,bL),qs(TA,tL,_E,bE,NA,YA,XA,QA,hE,pE,RA,BA,YE,HA,BE,TE,RE,rE,nL,oL,sE,pL,hL,wL))},"addDiagrams"),_L=p(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(gr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Ys(r)}catch{try{const{diagram:a,id:o}=await n();Jn(o,a,i)}catch(a){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete gr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CL="graphics-document document";function Z0(e,t){e.attr("role",CL),t!==""&&e.attr("aria-roledescription",t)}p(Z0,"setA11yDiagramInfo");function K0(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(K0,"addSVGa11yTitleDescription");var pr,Ho=(pr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Ot(),n=Yo(t,i);t=Ck(t)+`
296
- `;try{Ys(n)}catch{const c=wb(n);if(!c)throw new pu(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Jn(h,u)}const{db:a,parser:o,renderer:s,init:l}=Ys(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new pr(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(pr,"Diagram"),pr),Jh=[],kL=p(()=>{Jh.forEach(e=>{e()}),Jh=[]},"attachFunctions"),SL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Q0(e){const t=e.match(fu);if(!t)return{text:e,metadata:{}};let r=bp(t[1],{schema:yp})??{};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(Q0,"extractFrontMatter");var TL=p(e=>e.replace(/\r\n?/g,`
297
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),AL=p(e=>{const{text:t,metadata:r}=Q0(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),EL=p(e=>{const t=ae.detectInit(e)??{},r=ae.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:fk(e),directive:t}},"processDirectives");function Zl(e){const t=TL(e),r=AL(t),i=EL(r.text),n=Qa(r.config,i.directive);return e=SL(i.text),{code:e,title:r.title,config:n}}p(Zl,"preprocessDiagram");function J0(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(J0,"toBase64");var LL=5e4,BL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",ML="sandbox",$L="loose",FL="http://www.w3.org/2000/svg",RL="http://www.w3.org/1999/xlink",OL="http://www.w3.org/1999/xhtml",IL="100%",DL="100%",NL="border:0;margin:0;",PL="margin:0",zL="allow-top-navigation-by-user-activation allow-popups",qL='The "iframe" tag is not supported by your browser.',HL=["foreignobject"],WL=["dominant-baseline"];function Kl(e){const t=Zl(e);return Kn(),Ib(t.config??{}),t}p(Kl,"processAndSetConfigs");async function ty(e,t){ls();try{const{code:r,config:i}=Kl(e);return{diagramType:(await ry(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(ty,"parse");var tu=p((e,t,r=[])=>`
298
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),jL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
294
+ L0,20`)},"requirement_arrow"),HT=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"),WT={extension:ET,composition:LT,aggregation:BT,dependency:MT,lollipop:$T,point:FT,circle:RT,cross:OT,barb:IT,only_one:DT,zero_or_one:NT,one_or_more:PT,zero_or_more:zT,requirement_arrow:qT,requirement_contains:HT},p0=AT,jT={common:Cr,getConfig:Ot,insertCluster:Wg,insertEdge:u0,insertEdgeLabel:l0,insertMarkers:p0,insertNode:Gl,interpolateToCurve:Sl,labelHelper:at,log:D,positionEdgeLabel:c0},sn={},g0=p(e=>{for(const t of e)sn[t.name]=t},"registerLayoutLoaders"),UT=p(()=>{g0([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-BMc1dXqz.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-CXsWxbYE.cjs")),"loader")}])},"registerDefaultLayoutLoaders");UT();var YT=p(async(e,t)=>{if(!(e.layoutAlgorithm in sn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=sn[e.layoutAlgorithm];return(await r.loader()).render(e,t,jT,{algorithm:r.algorithm})},"render"),GT=p((e="",{fallback:t="dagre"}={})=>{if(e in sn)return e;if(t in sn)return D.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"),m0="comm",y0="rule",b0="decl",VT="@import",XT="@namespace",ZT="@keyframes",KT="@layer",x0=Math.abs,Vl=String.fromCharCode;function v0(e){return e.trim()}function Yn(e,t,r){return e.replace(t,r)}function QT(e,t,r){return e.indexOf(t,r)}function qr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function be(e){return e.length}function JT(e){return e.length}function Rn(e,t){return t.push(e),e}var ss=1,ni=1,w0=0,oe=0,Ct=0,fi="";function Xl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:ss,column:ni,length:o,return:"",siblings:s}}function tA(){return Ct}function eA(){return Ct=oe>0?qr(fi,--oe):0,ni--,Ct===10&&(ni=1,ss--),Ct}function ue(){return Ct=oe<w0?qr(fi,oe++):0,ni++,Ct===10&&(ni=1,ss++),Ct}function Ue(){return qr(fi,oe)}function Gn(){return oe}function os(e,t){return ii(fi,e,t)}function on(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 rA(e){return ss=ni=1,w0=be(fi=e),oe=0,[]}function iA(e){return fi="",e}function Is(e){return v0(os(oe-1,Io(e===91?e+2:e===40?e+1:e)))}function nA(e){for(;(Ct=Ue())&&Ct<33;)ue();return on(e)>2||on(Ct)>3?"":" "}function aA(e,t){for(;--t&&ue()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return os(e,Gn()+(t<6&&Ue()==32&&ue()==32))}function Io(e){for(;ue();)switch(Ct){case e:return oe;case 34:case 39:e!==34&&e!==39&&Io(Ct);break;case 40:e===41&&Io(e);break;case 92:ue();break}return oe}function sA(e,t){for(;ue()&&e+Ct!==57;)if(e+Ct===84&&Ue()===47)break;return"/*"+os(t,oe-1)+"*"+Vl(e===47?e:ue())}function oA(e){for(;!on(Ue());)ue();return os(e,oe)}function lA(e){return iA(Vn("",null,null,null,[""],e=rA(e),0,[0],e))}function Vn(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,d=0,f=0,g=0,m=1,b=1,x=1,y=0,v="",_=n,w=a,C=i,k=v;b;)switch(g=y,y=ue()){case 40:if(g!=108&&qr(k,u-1)==58){QT(k+=Yn(Is(y),"&","&\f"),"&\f",x0(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Is(y);break;case 9:case 10:case 13:case 32:k+=nA(g);break;case 92:k+=aA(Gn()-1,7);continue;case 47:switch(Ue()){case 42:case 47:Rn(cA(sA(ue(),Gn()),t,r,l),l),(on(g||1)==5||on(Ue()||1)==5)&&be(k)&&ii(k,-1,void 0)!==" "&&(k+=" ");break;default:k+="/"}break;case 123*m:s[c++]=be(k)*x;case 125*m:case 59:case 0:switch(y){case 0:case 125:b=0;case 59+h:x==-1&&(k=Yn(k,/\f/g,"")),f>0&&(be(k)-u||m===0&&g===47)&&Rn(f>32?Yh(k+";",i,r,u-1,l):Yh(Yn(k," ","")+";",i,r,u-2,l),l);break;case 59:k+=";";default:if(Rn(C=Uh(k,t,r,c,h,n,s,v,_=[],w=[],u,a),a),y===123)if(h===0)Vn(k,t,C,C,_,a,u,s,w);else{switch(d){case 99:if(qr(k,3)===110)break;case 108:if(qr(k,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Vn(e,C,C,i&&Rn(Uh(e,C,C,0,0,n,s,v,n,_=[],u,w),w),n,w,u,s,i?_:w):Vn(k,C,C,C,[""],w,0,s,w)}}c=h=f=0,m=x=1,v=k="",u=o;break;case 58:u=1+be(k),f=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&eA()==125)continue}switch(k+=Vl(y),y*m){case 38:x=h>0?1:(k+="\f",-1);break;case 44:s[c++]=(be(k)-1)*x,x=1;break;case 64:Ue()===45&&(k+=Is(ue())),d=Ue(),h=u=be(v=k+=oA(Gn())),y++;break;case 45:g===45&&be(k)==2&&(m=0)}}return a}function Uh(e,t,r,i,n,a,o,s,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=JT(f),m=0,b=0,x=0;m<i;++m)for(var y=0,v=ii(e,d+1,d=x0(b=o[m])),_=e;y<g;++y)(_=v0(b>0?f[y]+" "+v:Yn(v,/&\f/g,f[y])))&&(l[x++]=_);return Xl(e,t,r,n===0?y0:s,l,c,h,u)}function cA(e,t,r,i){return Xl(e,t,r,m0,Vl(tA()),ii(e,2,-2),0,i)}function Yh(e,t,r,i,n){return Xl(e,t,r,b0,ii(e,0,i),ii(e,i+1,-1),i,n)}function Do(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function hA(e,t,r,i){switch(e.type){case KT:if(e.children.length)break;case VT:case XT:case b0:return e.return=e.return||e.value;case m0:return"";case ZT:return e.return=e.value+"{"+Do(e.children,i)+"}";case y0:if(!be(e.value=e.props.join(",")))return""}return be(r=Do(e.children,i))?e.return=e.value+"{"+r+"}":""}var uA=Bp(Object.keys,Object),dA=Object.prototype,fA=dA.hasOwnProperty;function _0(e){if(!un(e))return uA(e);var t=[];for(var r in Object(e))fA.call(e,r)&&r!="constructor"&&t.push(r);return t}var No=Tr(Ce,"DataView"),Po=Tr(Ce,"Promise"),Aa=Tr(Ce,"Set"),zo=Tr(Ce,"WeakMap"),Gh="[object Map]",pA="[object Object]",Vh="[object Promise]",Xh="[object Set]",Zh="[object WeakMap]",Kh="[object DataView]",gA=Sr(No),mA=Sr(en),yA=Sr(Po),bA=Sr(Aa),xA=Sr(zo);exports.getTag=kr;(No&&exports.getTag(new No(new ArrayBuffer(1)))!=Kh||en&&exports.getTag(new en)!=Gh||Po&&exports.getTag(Po.resolve())!=Vh||Aa&&exports.getTag(new Aa)!=Xh||zo&&exports.getTag(new zo)!=Zh)&&(exports.getTag=function(e){var t=kr(e),r=t==pA?e.constructor:void 0,i=r?Sr(r):"";if(i)switch(i){case gA:return Kh;case mA:return Gh;case yA:return Vh;case bA:return Xh;case xA:return Zh}return t});var vA="[object Map]",wA="[object Set]",_A=Object.prototype,CA=_A.hasOwnProperty;function qo(e){if(e==null)return!0;if(dn(e)&&(nn(e)||typeof e=="string"||typeof e.splice=="function"||Za(e)||Ka(e)||rn(e)))return!e.length;var t=exports.getTag(e);if(t==vA||t==wA)return!e.size;if(un(e))return!_0(e).length;for(var r in e)if(CA.call(e,r))return!1;return!0}var C0="c4",kA=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),SA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-Cz3j8MTC.cjs"));return{id:C0,diagram:e}},"loader"),TA={id:C0,detector:kA,loader:SA},AA=TA,k0="flowchart",EA=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),LA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DSH4zSz8.cjs"));return{id:k0,diagram:e}},"loader"),BA={id:k0,detector:EA,loader:LA},MA=BA,S0="flowchart-v2",$A=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),FA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DSH4zSz8.cjs"));return{id:S0,diagram:e}},"loader"),RA={id:S0,detector:$A,loader:FA},OA=RA,T0="er",IA=p(e=>/^\s*erDiagram/.test(e),"detector"),DA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-BcN7es5w.cjs"));return{id:T0,diagram:e}},"loader"),NA={id:T0,detector:IA,loader:DA},PA=NA,A0="gitGraph",zA=p(e=>/^\s*gitGraph/.test(e),"detector"),qA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-BBZujICZ.cjs"));return{id:A0,diagram:e}},"loader"),HA={id:A0,detector:zA,loader:qA},WA=HA,E0="gantt",jA=p(e=>/^\s*gantt/.test(e),"detector"),UA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-DB-rPLnm.cjs"));return{id:E0,diagram:e}},"loader"),YA={id:E0,detector:jA,loader:UA},GA=YA,L0="info",VA=p(e=>/^\s*info/.test(e),"detector"),XA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-CCl9mvNx.cjs"));return{id:L0,diagram:e}},"loader"),ZA={id:L0,detector:VA,loader:XA},B0="pie",KA=p(e=>/^\s*pie/.test(e),"detector"),QA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-BXLT29rs.cjs"));return{id:B0,diagram:e}},"loader"),JA={id:B0,detector:KA,loader:QA},M0="quadrantChart",tE=p(e=>/^\s*quadrantChart/.test(e),"detector"),eE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-Bofh6KQl.cjs"));return{id:M0,diagram:e}},"loader"),rE={id:M0,detector:tE,loader:eE},iE=rE,$0="xychart",nE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),aE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-CNg-5JJ5.cjs"));return{id:$0,diagram:e}},"loader"),sE={id:$0,detector:nE,loader:aE},oE=sE,F0="requirement",lE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),cE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-CiEGzFpl.cjs"));return{id:F0,diagram:e}},"loader"),hE={id:F0,detector:lE,loader:cE},uE=hE,R0="sequence",dE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),fE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-gVgKh8qv.cjs"));return{id:R0,diagram:e}},"loader"),pE={id:R0,detector:dE,loader:fE},gE=pE,O0="class",mE=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),yE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-BOhHIGzd.cjs"));return{id:O0,diagram:e}},"loader"),bE={id:O0,detector:mE,loader:yE},xE=bE,I0="classDiagram",vE=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),wE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-BOhHIGzd.cjs"));return{id:I0,diagram:e}},"loader"),_E={id:I0,detector:vE,loader:wE},CE=_E,D0="state",kE=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),SE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DffdRxr_.cjs"));return{id:D0,diagram:e}},"loader"),TE={id:D0,detector:kE,loader:SE},AE=TE,N0="stateDiagram",EE=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),LE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-1xCdWqps.cjs"));return{id:N0,diagram:e}},"loader"),BE={id:N0,detector:EE,loader:LE},ME=BE,P0="journey",$E=p(e=>/^\s*journey/.test(e),"detector"),FE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-Kbhog3Rq.cjs"));return{id:P0,diagram:e}},"loader"),RE={id:P0,detector:$E,loader:FE},OE=RE,IE=p((e,t,r)=>{D.debug(`rendering svg for syntax error
295
+ `);const i=Od(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Vo(i,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),z0={draw:IE},DE=z0,NE={db:{},renderer:z0,parser:{parse:p(()=>{},"parse")}},PE=NE,q0="flowchart-elk",zE=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),qE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DSH4zSz8.cjs"));return{id:q0,diagram:e}},"loader"),HE={id:q0,detector:zE,loader:qE},WE=HE,H0="timeline",jE=p(e=>/^\s*timeline/.test(e),"detector"),UE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-jtIb5KKf.cjs"));return{id:H0,diagram:e}},"loader"),YE={id:H0,detector:jE,loader:UE},GE=YE,W0="mindmap",VE=p(e=>/^\s*mindmap/.test(e),"detector"),XE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-C8xxgKhK.cjs"));return{id:W0,diagram:e}},"loader"),ZE={id:W0,detector:VE,loader:XE},KE=ZE,j0="kanban",QE=p(e=>/^\s*kanban/.test(e),"detector"),JE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-j6dPKa6V.cjs"));return{id:j0,diagram:e}},"loader"),tL={id:j0,detector:QE,loader:JE},eL=tL,U0="sankey",rL=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-C78i3iVS.cjs"));return{id:U0,diagram:e}},"loader"),nL={id:U0,detector:rL,loader:iL},aL=nL,Y0="packet",sL=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),oL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-CahM5LoL.cjs"));return{id:Y0,diagram:e}},"loader"),lL={id:Y0,detector:sL,loader:oL},G0="radar",cL=p(e=>/^\s*radar-beta/.test(e),"detector"),hL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-X7uU2_mf.cjs"));return{id:G0,diagram:e}},"loader"),uL={id:G0,detector:cL,loader:hL},V0="block",dL=p(e=>/^\s*block(-beta)?/.test(e),"detector"),fL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-tZpHwF_P.cjs"));return{id:V0,diagram:e}},"loader"),pL={id:V0,detector:dL,loader:fL},gL=pL,X0="architecture",mL=p(e=>/^\s*architecture/.test(e),"detector"),yL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-DwTvTWFB.cjs"));return{id:X0,diagram:e}},"loader"),bL={id:X0,detector:mL,loader:yL},xL=bL,Z0="treemap",vL=p(e=>/^\s*treemap/.test(e),"detector"),wL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-Czzv2tRq.cjs"));return{id:Z0,diagram:e}},"loader"),_L={id:Z0,detector:vL,loader:wL},Qh=!1,ls=p(()=>{Qh||(Qh=!0,Jn("error",PE,e=>e.toLowerCase().trim()==="error"),Jn("---",{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("---")),qs(WE,KE,xL),qs(AA,eL,CE,xE,PA,GA,ZA,JA,uE,gE,OA,MA,GE,WA,ME,AE,OE,iE,aL,lL,oE,gL,uL,_L))},"addDiagrams"),CL=p(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(gr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Ys(r)}catch{try{const{diagram:a,id:o}=await n();Jn(o,a,i)}catch(a){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete gr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),kL="graphics-document document";function K0(e,t){e.attr("role",kL),t!==""&&e.attr("aria-roledescription",t)}p(K0,"setA11yDiagramInfo");function Q0(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(Q0,"addSVGa11yTitleDescription");var pr,Ho=(pr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Ot(),n=Yo(t,i);t=kk(t)+`
296
+ `;try{Ys(n)}catch{const c=_b(n);if(!c)throw new gu(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Jn(h,u)}const{db:a,parser:o,renderer:s,init:l}=Ys(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new pr(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(pr,"Diagram"),pr),Jh=[],SL=p(()=>{Jh.forEach(e=>{e()}),Jh=[]},"attachFunctions"),TL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function J0(e){const t=e.match(pu);if(!t)return{text:e,metadata:{}};let r=xp(t[1],{schema:bp})??{};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(J0,"extractFrontMatter");var AL=p(e=>e.replace(/\r\n?/g,`
297
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),EL=p(e=>{const{text:t,metadata:r}=J0(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),LL=p(e=>{const t=ae.detectInit(e)??{},r=ae.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:pk(e),directive:t}},"processDirectives");function Zl(e){const t=AL(e),r=EL(t),i=LL(r.text),n=Qa(r.config,i.directive);return e=TL(i.text),{code:e,title:r.title,config:n}}p(Zl,"preprocessDiagram");function ty(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(ty,"toBase64");var BL=5e4,ML="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",$L="sandbox",FL="loose",RL="http://www.w3.org/2000/svg",OL="http://www.w3.org/1999/xlink",IL="http://www.w3.org/1999/xhtml",DL="100%",NL="100%",PL="border:0;margin:0;",zL="margin:0",qL="allow-top-navigation-by-user-activation allow-popups",HL='The "iframe" tag is not supported by your browser.',WL=["foreignobject"],jL=["dominant-baseline"];function Kl(e){const t=Zl(e);return Kn(),Db(t.config??{}),t}p(Kl,"processAndSetConfigs");async function ey(e,t){ls();try{const{code:r,config:i}=Kl(e);return{diagramType:(await iy(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(ey,"parse");var tu=p((e,t,r=[])=>`
298
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),UL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
299
299
  ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
300
300
  :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
301
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{qo(s.styles)||o.forEach(l=>{r+=tu(s.id,l,s.styles)}),qo(s.textStyles)||(r+=tu(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),UL=p((e,t,r,i)=>{const n=jL(e,r),a=rx(t,n,e.themeVariables);return Do(oA(`${i}{${a}}`),cA)},"createUserStyles"),YL=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=Qe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),GL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":DL,i=J0(`<body style="${PL}">${e}</body>`);return`<iframe style="width:${IL};height:${r};${NL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${zL}">
302
- ${qL}
303
- </iframe>`},"putIntoIFrame"),eu=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",FL);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Wo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Wo,"sandboxedIframe");var VL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),XL=p(async function(e,t,r){ls();const i=Kl(t);t=i.code;const n=Ot();D.debug(n),t.length>(n?.maxTextSize??LL)&&(t=BL);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const N=dt(d?s:c).node();N&&"remove"in N&&N.remove()},"removeTempElements");let u=dt("body");const d=n.securityLevel===ML,f=n.securityLevel===$L,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const P=Wo(dt(r),o);u=dt(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt(r);eu(u,e,l,`font-family: ${g}`,RL)}else{if(VL(document,e,l,o),d){const P=Wo(dt("body"),o);u=dt(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt("body");eu(u,e,l)}let m,b;try{m=await Ho.fromText(t,{title:i.title})}catch(P){if(n.suppressErrorRendering)throw h(),P;m=await Ho.fromText("error"),b=P}const x=u.select(c).node(),y=m.type,v=x.firstChild,_=v.firstChild,w=m.renderer.getClasses?.(t,m),C=UL(n,y,w,a),k=document.createElement("style");k.innerHTML=C,v.insertBefore(k,_);try{await m.renderer.draw(t,e,Ns.version,m)}catch(P){throw n.suppressErrorRendering?h():IE.draw(t,e,Ns.version),P}const F=u.select(`${c} svg`),$=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();iy(y,F,$,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OL);let M=u.select(c).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),M=YL(M,d,St(n.arrowMarkerAbsolute)),d){const P=u.select(c+" svg").node();M=GL(M,P)}else f||(M=Zr.sanitize(M,{ADD_TAGS:HL,ADD_ATTR:WL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kL(),b)throw b;return h(),{diagramType:y,svg:M,bindFunctions:m.db.bindFunctions}},"render");function ey(e={}){const t=kt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Rb(t),t?.theme&&t.theme in Ie?t.themeVariables=Ie[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ie.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Fb(t):xu();Uo(r.logLevel),ls()}p(ey,"initialize");var ry=p((e,t={})=>{const{code:r}=Zl(e);return Ho.fromText(r,t)},"getDiagramFromText");function iy(e,t,r,i){Z0(t,e),K0(t,r,i,t.attr("id"))}p(iy,"addA11yInfo");var _r=Object.freeze({render:XL,parse:ty,getDiagramFromText:ry,initialize:ey,getConfig:Ot,setConfig:vu,getSiteConfig:xu,updateSiteConfig:Ob,reset:p(()=>{Kn()},"reset"),globalReset:p(()=>{Kn(Kr)},"globalReset"),defaultConfig:Kr});Uo(Ot().logLevel);Kn(Ot());var ZL=p((e,t,r)=>{D.warn(e),Ml(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"),ny=p(async function(e={querySelector:".mermaid"}){try{await KL(e)}catch(t){if(Ml(t)&&D.error(t.str),Pe.parseError&&Pe.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=_r.getConfig();D.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(D.debug("Start On Load: "+i?.startOnLoad),_r.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ae.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if(D.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=yg(ae.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ae.detectInit(o);h&&D.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await ly(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){ZL(u,s,Pe.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ay=p(function(e){_r.initialize(e)},"initialize"),QL=p(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&ay(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ny(i)},"init"),JL=p(async(e,{lazyLoad:t=!0}={})=>{ls(),qs(...e),t===!1&&await _L()},"registerExternalDiagrams"),sy=p(function(){if(Pe.startOnLoad){const{startOnLoad:e}=_r.getConfig();e&&Pe.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",sy,!1);var tB=p(function(e){Pe.parseError=e},"setParseErrorHandler"),Ea=[],Ds=!1,oy=p(async()=>{if(!Ds){for(Ds=!0;Ea.length>0;){const e=Ea.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}Ds=!1}},"executeQueue"),eB=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{_r.parse(e,t).then(s=>{a(s),r(s)},s=>{D.error("Error parsing",s),Pe.parseError?.(s),o(s),i(s)})}),"performCall");Ea.push(n),oy().catch(i)}),"parse"),ly=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{_r.render(e,t,r).then(l=>{o(l),i(l)},l=>{D.error("Error parsing",l),Pe.parseError?.(l),s(l),n(l)})}),"performCall");Ea.push(a),oy().catch(n)}),"render"),rB=p(()=>Object.keys(gr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Pe={startOnLoad:!0,mermaidAPI:_r,parse:eB,render:ly,init:QL,run:ny,registerExternalDiagrams:JL,registerLayoutLoaders:p0,initialize:ay,parseError:void 0,contentLoaded:sy,setParseErrorHandler:tB,detectType:Yo,registerIconPacks:vg,getRegisteredDiagramsMetadata:rB},ru=Pe;/*! Check if previously processed *//*!
301
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{qo(s.styles)||o.forEach(l=>{r+=tu(s.id,l,s.styles)}),qo(s.textStyles)||(r+=tu(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),YL=p((e,t,r,i)=>{const n=UL(e,r),a=ix(t,n,e.themeVariables);return Do(lA(`${i}{${a}}`),hA)},"createUserStyles"),GL=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=Qe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),VL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":NL,i=ty(`<body style="${zL}">${e}</body>`);return`<iframe style="width:${DL};height:${r};${PL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qL}">
302
+ ${HL}
303
+ </iframe>`},"putIntoIFrame"),eu=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",RL);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Wo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Wo,"sandboxedIframe");var XL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),ZL=p(async function(e,t,r){ls();const i=Kl(t);t=i.code;const n=Ot();D.debug(n),t.length>(n?.maxTextSize??BL)&&(t=ML);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const N=dt(d?s:c).node();N&&"remove"in N&&N.remove()},"removeTempElements");let u=dt("body");const d=n.securityLevel===$L,f=n.securityLevel===FL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const P=Wo(dt(r),o);u=dt(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt(r);eu(u,e,l,`font-family: ${g}`,OL)}else{if(XL(document,e,l,o),d){const P=Wo(dt("body"),o);u=dt(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=dt("body");eu(u,e,l)}let m,b;try{m=await Ho.fromText(t,{title:i.title})}catch(P){if(n.suppressErrorRendering)throw h(),P;m=await Ho.fromText("error"),b=P}const x=u.select(c).node(),y=m.type,v=x.firstChild,_=v.firstChild,w=m.renderer.getClasses?.(t,m),C=YL(n,y,w,a),k=document.createElement("style");k.innerHTML=C,v.insertBefore(k,_);try{await m.renderer.draw(t,e,Ns.version,m)}catch(P){throw n.suppressErrorRendering?h():DE.draw(t,e,Ns.version),P}const F=u.select(`${c} svg`),M=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();ny(y,F,M,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",IL);let $=u.select(c).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),$=GL($,d,St(n.arrowMarkerAbsolute)),d){const P=u.select(c+" svg").node();$=VL($,P)}else f||($=Zr.sanitize($,{ADD_TAGS:WL,ADD_ATTR:jL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(SL(),b)throw b;return h(),{diagramType:y,svg:$,bindFunctions:m.db.bindFunctions}},"render");function ry(e={}){const t=kt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Ob(t),t?.theme&&t.theme in Ie?t.themeVariables=Ie[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ie.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Rb(t):vu();Uo(r.logLevel),ls()}p(ry,"initialize");var iy=p((e,t={})=>{const{code:r}=Zl(e);return Ho.fromText(r,t)},"getDiagramFromText");function ny(e,t,r,i){K0(t,e),Q0(t,r,i,t.attr("id"))}p(ny,"addA11yInfo");var _r=Object.freeze({render:ZL,parse:ey,getDiagramFromText:iy,initialize:ry,getConfig:Ot,setConfig:wu,getSiteConfig:vu,updateSiteConfig:Ib,reset:p(()=>{Kn()},"reset"),globalReset:p(()=>{Kn(Kr)},"globalReset"),defaultConfig:Kr});Uo(Ot().logLevel);Kn(Ot());var KL=p((e,t,r)=>{D.warn(e),Ml(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"),ay=p(async function(e={querySelector:".mermaid"}){try{await QL(e)}catch(t){if(Ml(t)&&D.error(t.str),Pe.parseError&&Pe.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),QL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=_r.getConfig();D.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(D.debug("Start On Load: "+i?.startOnLoad),_r.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ae.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if(D.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=bg(ae.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ae.detectInit(o);h&&D.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await cy(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){KL(u,s,Pe.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),sy=p(function(e){_r.initialize(e)},"initialize"),JL=p(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&sy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ay(i)},"init"),tB=p(async(e,{lazyLoad:t=!0}={})=>{ls(),qs(...e),t===!1&&await CL()},"registerExternalDiagrams"),oy=p(function(){if(Pe.startOnLoad){const{startOnLoad:e}=_r.getConfig();e&&Pe.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",oy,!1);var eB=p(function(e){Pe.parseError=e},"setParseErrorHandler"),Ea=[],Ds=!1,ly=p(async()=>{if(!Ds){for(Ds=!0;Ea.length>0;){const e=Ea.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}Ds=!1}},"executeQueue"),rB=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{_r.parse(e,t).then(s=>{a(s),r(s)},s=>{D.error("Error parsing",s),Pe.parseError?.(s),o(s),i(s)})}),"performCall");Ea.push(n),ly().catch(i)}),"parse"),cy=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{_r.render(e,t,r).then(l=>{o(l),i(l)},l=>{D.error("Error parsing",l),Pe.parseError?.(l),s(l),n(l)})}),"performCall");Ea.push(a),ly().catch(n)}),"render"),iB=p(()=>Object.keys(gr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Pe={startOnLoad:!0,mermaidAPI:_r,parse:rB,render:cy,init:JL,run:ay,registerExternalDiagrams:tB,registerLayoutLoaders:g0,initialize:sy,parseError:void 0,contentLoaded:oy,setParseErrorHandler:eB,detectType:Yo,registerIconPacks:wg,getRegisteredDiagramsMetadata:iB},ru=Pe;/*! Check if previously processed *//*!
304
304
  * Wait for document loaded before starting the execution
305
- */const iB={class:"mermaid-diagram-wrapper"},nB={class:"mermaid-controls"},aB={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},sB={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},oB={class:"zoom-indicator"},lB={key:0,class:"mermaid-error"},cB=I.defineComponent({__name:"MermaidDiagram",props:{code:{},isStreaming:{type:Boolean}},setup(e){const t=e,r=I.ref(null),i=I.ref(null),n=I.ref(null),a=I.ref("default"),o=I.ref(1),s=I.ref(0),l=I.ref(0),c=I.ref(!1),h=I.ref(0),u=I.ref(0),d=I.ref(0),f=I.ref(0),g=I.ref(!1),m=I.ref(null),b=I.ref(null),x=()=>{const T=document.documentElement.classList.contains("theme-dark")||document.body.classList.contains("theme-dark"),A=document.documentElement.classList.contains("theme-light")||document.body.classList.contains("theme-light");return T?"dark":A?"default":window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"},y=T=>{ru.initialize({suppressErrorRendering:!0,startOnLoad:!1,theme:T,securityLevel:"loose",themeVariables:T==="dark"?{darkMode:!0,background:"#1e1e1e",primaryColor:"#4d94ff",primaryTextColor:"#e0e0e0",primaryBorderColor:"#6b9aff",lineColor:"#888",secondaryColor:"#2d3748",tertiaryColor:"#3d4858",mainBkg:"#2d3748",secondBkg:"#1e1e1e",mainContrastColor:"#e0e0e0",darkTextColor:"#e0e0e0",border1:"#555",border2:"#666",note:"#4a5568",noteBorder:"#6b9aff",noteBkg:"#2d3748",noteText:"#e0e0e0",actorBorder:"#6b9aff",actorBkg:"#2d3748",actorTextColor:"#e0e0e0",actorLineColor:"#888",labelBoxBkgColor:"#2d3748",labelBoxBorderColor:"#6b9aff",labelTextColor:"#e0e0e0",loopTextColor:"#e0e0e0",activationBorderColor:"#6b9aff",activationBkgColor:"#3d4858",sequenceNumberColor:"#1e1e1e"}:{}})},v=()=>{if(!m.value||!b.value)return;const T=b.value,A=T.width/o.value,R=T.height/o.value,B=(T.width-A)/2,z=(T.height-R)/2,W=T.x+B-s.value/o.value,Y=T.y+z-l.value/o.value;m.value.setAttribute("viewBox",`${W} ${Y} ${A} ${R}`)},_=T=>{if(!m.value||!i.value||!b.value)return;const A=T.deltaY>0?.9:1.1,R=o.value,B=Math.min(Math.max(.1,o.value*A),5);if(R===B)return;const z=i.value.getBoundingClientRect(),W=T.clientX-z.left,Y=T.clientY-z.top,j=m.value.getBoundingClientRect(),V=j.left-z.left,lt=j.top-z.top,et=W-V,yt=Y-lt,ct=b.value,Lt=ct.width/R,Bt=ct.height/R,mt=et/j.width,Tt=yt/j.height,It=(ct.width-Lt)/2,Wt=(ct.height-Bt)/2,ke=ct.x+It-s.value/R,pi=ct.y+Wt-l.value/R,gi=ke+mt*Lt,We=pi+Tt*Bt,er=ct.width/B,rr=ct.height/B,mn=gi-mt*er,yn=We-Tt*rr,cs=(ct.width-er)/2,mi=(ct.height-rr)/2;s.value=(ct.x+cs-mn)*B,l.value=(ct.y+mi-yn)*B,o.value=B,v()},w=T=>{c.value=!0,h.value=T.clientX,u.value=T.clientY,d.value=s.value,f.value=l.value,i.value&&(i.value.style.cursor="grabbing")},C=T=>{if(!c.value)return;const A=T.clientX-h.value,R=T.clientY-u.value;s.value=d.value+A,l.value=f.value+R,v()},k=()=>{c.value=!1,i.value&&(i.value.style.cursor="grab")},F=()=>{c.value&&(c.value=!1,i.value&&(i.value.style.cursor="grab"))},$=()=>{o.value=1,s.value=0,l.value=0,v()},O=()=>{i.value&&(g.value?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():i.value.requestFullscreen?i.value.requestFullscreen():i.value.webkitRequestFullscreen?i.value.webkitRequestFullscreen():i.value.mozRequestFullScreen?i.value.mozRequestFullScreen():i.value.msRequestFullscreen&&i.value.msRequestFullscreen())},M=()=>{const T=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);g.value=T,m.value&&(T?m.value.style.maxHeight="100vh":m.value.style.maxHeight="600px")},P=async()=>{if(!(!r.value||!t.code)){n.value=null,r.value.innerHTML="";try{const T=x();T!==a.value&&(a.value=T,y(T));const A=`mermaid-${Math.random().toString(36).substr(2,9)}`,{svg:R}=await ru.render(A,t.code);if(r.value.innerHTML=R,m.value=r.value.querySelector("svg"),m.value){const B=m.value.getAttribute("viewBox");if(B){const[z,W,Y,j]=B.split(" ").map(Number);b.value={x:z,y:W,width:Y,height:j}}else{const z=parseFloat(m.value.getAttribute("width")||"800"),W=parseFloat(m.value.getAttribute("height")||"600");b.value={x:0,y:0,width:z,height:W},m.value.setAttribute("viewBox",`0 0 ${z} ${W}`)}m.value.removeAttribute("width"),m.value.removeAttribute("height"),m.value.style.width="100%",m.value.style.height="100%",m.value.style.maxWidth="100%",m.value.style.maxHeight="600px",v()}}catch(T){t.isStreaming||(n.value=T?.message||String(T),console.error("Mermaid render error:",T)),console.log("Mermaid render skipped in streaming mode.")}}};let N=null;const E=()=>{P()};return I.onMounted(()=>{a.value=x(),y(a.value),P(),window.matchMedia&&(N=window.matchMedia("(prefers-color-scheme: dark)"),N.addEventListener("change",E));const T=new MutationObserver(()=>{P()});T.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),T.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r.value.__observer=T,document.addEventListener("fullscreenchange",M),document.addEventListener("webkitfullscreenchange",M),document.addEventListener("mozfullscreenchange",M),document.addEventListener("msfullscreenchange",M)}),I.onUnmounted(()=>{N&&N.removeEventListener("change",E),r.value&&r.value.__observer&&r.value.__observer.disconnect(),document.removeEventListener("fullscreenchange",M),document.removeEventListener("webkitfullscreenchange",M),document.removeEventListener("mozfullscreenchange",M),document.removeEventListener("msfullscreenchange",M)}),I.watch(()=>t.code,()=>{P()}),(T,A)=>(I.openBlock(),I.createElementBlock("div",iB,[I.createElementVNode("div",nB,[I.createElementVNode("button",{onClick:$,class:"control-btn",title:"重置缩放"},[...A[0]||(A[0]=[I.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},[I.createElementVNode("path",{d:"M8 3a5 5 0 1 0 0 10A5 5 0 0 0 8 3zM1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8z"}),I.createElementVNode("path",{d:"M8 4.5a.5.5 0 0 1 .5.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2A.5.5 0 0 1 8 4.5z"})],-1)])]),I.createElementVNode("button",{onClick:O,class:"control-btn",title:"全屏预览"},[g.value?(I.openBlock(),I.createElementBlock("svg",sB,[...A[2]||(A[2]=[I.createElementVNode("path",{d:"M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"},null,-1)])])):(I.openBlock(),I.createElementBlock("svg",aB,[...A[1]||(A[1]=[I.createElementVNode("path",{d:"M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"},null,-1)])]))]),I.createElementVNode("span",oB,I.toDisplayString(Math.round(o.value*100))+"%",1)]),I.createElementVNode("div",{ref_key:"containerRef",ref:i,class:I.normalizeClass(["mermaid-diagram",{"is-fullscreen":g.value,"is-dragging":c.value}]),onWheel:I.withModifiers(_,["prevent"]),onMousedown:w,onMousemove:C,onMouseup:k,onMouseleave:F},[I.createElementVNode("div",{ref_key:"diagramRef",ref:r,class:"mermaid-diagram-content"},null,512)],34),n.value&&!e.isStreaming?(I.openBlock(),I.createElementBlock("div",lB,[A[3]||(A[3]=I.createElementVNode("strong",null,"Mermaid 渲染错误:",-1)),I.createElementVNode("pre",null,I.toDisplayString(n.value),1)])):I.createCommentVNode("",!0)]))}}),hB=La(cB,[["__scopeId","data-v-aa62da2c"]]);function uB(e){if(e.type!=="tag"||e.name!=="code")return null;const r=(e.attribs?.class||"").match(/language-(\w+)/);return r?r[1]:null}function cy(e){return!e.children||e.children.length===0?"":e.children.map(t=>t.type==="text"?t.data:t.children?cy(t):"").join("")}function dB(e){const{priority:t=80,theme:r}=e||{};return{name:"mermaid",priority:t,test:i=>{if(i.type==="tag"&&i.name==="pre"){const n=i.children?.find(a=>a.type==="tag"&&a.name==="code");if(n)return uB(n)==="mermaid"}return!1},render:(i,n,a,o)=>{const s=i.children?.find(h=>h.type==="tag"&&h.name==="code");if(!s)return I.h("div",{class:"mermaid-error"},"No code content found");const c={code:cy(s),isStreaming:o?.isStreaming||!1};return r&&(c.theme=r),I.h(hB,c)}}}const fB=I.defineComponent({__name:"BlinkingCursor",props:{shape:{default:"square"},color:{default:"#333"}},setup(e){const t=e,r=I.computed(()=>({backgroundColor:t.color}));return(i,n)=>(I.openBlock(),I.createElementBlock("span",{class:I.normalizeClass(["blinking-cursor",`cursor-${e.shape}`]),style:I.normalizeStyle(r.value)},null,6))}}),pB=La(fB,[["__scopeId","data-v-0d4d5123"]]);function gB(e={}){const{shape:t="square",color:r,priority:i=100}=e;return{name:"cursor",priority:i,test:n=>n.type==="component"&&n.name==="cursor",render:(n,a,o,s)=>{const l={...n.attribs,shape:t,...r&&{color:r}};return I.h(pB,l)}}}exports.Color=de;exports.Color$1=oi;exports.JSON_SCHEMA=yp;exports.MapCache=qe;exports.Rgb=Yt;exports.Set=Aa;exports.Stack=Ar;exports.Symbol=Ji;exports.Uint8Array=_o;exports.Utils=ot;exports.ZERO_WIDTH_SPACE=Vp;exports.__export=au;exports.__name=p;exports._export_sfc=La;exports.abs=kw;exports.acos=$w;exports.array=hd;exports.arrayLikeKeys=Pp;exports.asin=Fw;exports.assignValue=Dp;exports.assignWithDepth_default=kt;exports.atan2=Sw;exports.baseAssignValue=Xa;exports.baseFor=Cp;exports.baseGetTag=kr;exports.baseKeys=w0;exports.baseRest=jp;exports.baseUnary=Op;exports.calculateMathMLDimensions=Zb;exports.calculateTextHeight=Ll;exports.calculateTextWidth=we;exports.cleanAndMerge=Qa;exports.clear=Eu;exports.clear$1=wT;exports.clear$2=QS;exports.clear2=yT;exports.cloneArrayBuffer=Tp;exports.cloneBuffer=Sp;exports.cloneTypedArray=Ap;exports.codeBlockPlugin=qy;exports.color=Jr;exports.commonDb_exports=Xo;exports.common_default=Cr;exports.computeDimensionOfText=Bg;exports.configureSvgSize=Vo;exports.constant=sr;exports.constant$1=Hp;exports.constant$2=Da;exports.copyArray=Ep;exports.copyObject=Np;exports.cos=Tw;exports.createAssigner=Yp;exports.createText=He;exports.cursorPlugin=gB;exports.curveBasis=Wi;exports.darken=rt;exports.dayjs2=iu;exports.decodeEntities=Qe;exports.defaultConfig2=ax;exports.defaultConfig_default=Go;exports.define=Ia;exports.distExports=vp;exports.emojiPlugin=Hy;exports.epsilon=io;exports.eq=hn;exports.evaluate=St;exports.extend=il;exports.generateId=tg;exports.getAccDescription=$u;exports.getAccTitle=Bu;exports.getConfig=Ot;exports.getConfig2=ft;exports.getDefaultExportFromCjs=jo;exports.getDiagramTitle=Ru;exports.getEdgeId=kk;exports.getIconSVG=ui;exports.getLineFunctionsWithOffset=xp;exports.getPrototype=vl;exports.getRegisteredLayoutAlgorithm=YT;exports.getStylesFromArray=El;exports.getSubGraphTitleMargins=Ua;exports.getThemeVariables3=mu;exports.getUrl=Tu;exports.getUserDefinedConfig=Pb;exports.halfPi=no;exports.hasKatex=yr;exports.hue=ev;exports.identity=kl;exports.initCloneObject=Bp;exports.insertCluster=Hg;exports.insertEdge=h0;exports.insertEdgeLabel=o0;exports.insertNode=Gl;exports.interpolateNumber=Fe;exports.interpolateRgb=Xs;exports.interpolateString=Qu;exports.isArguments=rn;exports.isArray=nn;exports.isArrayLike=dn;exports.isArrayLikeObject=$p;exports.isBuffer=Za;exports.isDark=ai;exports.isEmpty=qo;exports.isFunction=Ya;exports.isIndex=_l;exports.isIterateeCall=Up;exports.isLabelStyle=xl;exports.isLength=wl;exports.isObject=Ke;exports.isObjectLike=hi;exports.isPrototype=un;exports.isTypedArray=Ka;exports.isValidShape=s0;exports.keysIn=Cl;exports.lighten=G;exports.line=dd;exports.lineBreakRegex=si;exports.load=bp;exports.log=D;exports.markers_default=f0;exports.max=Aw;exports.memoize=ci;exports.merge=Gp;exports.mermaidPlugin=dB;exports.min=Ew;exports.nodeUtil=Co;exports.nogamma=nl;exports.overRest=qp;exports.package_default=Ns;exports.parseFontSize=fn;exports.parseGenericTypes=Ws;exports.pi=za;exports.positionEdgeLabel=l0;exports.positionNode=bT;exports.random=rg;exports.registerIconPacks=vg;exports.render=UT;exports.renderKatexSanitized=Ra;exports.replaceIconSubstring=Hl;exports.rgbConvert=Xu;exports.rgba=Pr;exports.sanitizeText=re;exports.select=dt;exports.selectSvgElement=Rd;exports.setAccDescription=Mu;exports.setAccTitle=Lu;exports.setConfig2=nx;exports.setDiagramTitle=Fu;exports.setNodeElem=mT;exports.setToString=Wp;exports.setupGraphViewbox=Au;exports.setupGraphViewbox2=Ou;exports.sin=Lw;exports.sqrt=Bw;exports.styles2String=X;exports.tau=Mw;exports.unknownIcon=bg;exports.updateNodeBounds=Q;exports.utils_default=ae;exports.withPath=cd;exports.wrapLabel=ig;
305
+ */const nB={class:"mermaid-diagram-wrapper"},aB={class:"mermaid-controls"},sB={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},oB={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},lB={class:"zoom-indicator"},cB={key:0,class:"mermaid-error"},hB=I.defineComponent({__name:"MermaidDiagram",props:{code:{},isStreaming:{type:Boolean}},setup(e){const t=e,r=I.ref(null),i=I.ref(null),n=I.ref(null),a=I.ref("default"),o=I.ref(1),s=I.ref(0),l=I.ref(0),c=I.ref(!1),h=I.ref(0),u=I.ref(0),d=I.ref(0),f=I.ref(0),g=I.ref(!1),m=I.ref(null),b=I.ref(null),x=()=>{const T=document.documentElement.classList.contains("theme-dark")||document.body.classList.contains("theme-dark"),A=document.documentElement.classList.contains("theme-light")||document.body.classList.contains("theme-light");return T?"dark":A?"default":window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"},y=T=>{ru.initialize({suppressErrorRendering:!0,startOnLoad:!1,theme:T,securityLevel:"loose",themeVariables:T==="dark"?{darkMode:!0,background:"#1e1e1e",primaryColor:"#4d94ff",primaryTextColor:"#e0e0e0",primaryBorderColor:"#6b9aff",lineColor:"#888",secondaryColor:"#2d3748",tertiaryColor:"#3d4858",mainBkg:"#2d3748",secondBkg:"#1e1e1e",mainContrastColor:"#e0e0e0",darkTextColor:"#e0e0e0",border1:"#555",border2:"#666",note:"#4a5568",noteBorder:"#6b9aff",noteBkg:"#2d3748",noteText:"#e0e0e0",actorBorder:"#6b9aff",actorBkg:"#2d3748",actorTextColor:"#e0e0e0",actorLineColor:"#888",labelBoxBkgColor:"#2d3748",labelBoxBorderColor:"#6b9aff",labelTextColor:"#e0e0e0",loopTextColor:"#e0e0e0",activationBorderColor:"#6b9aff",activationBkgColor:"#3d4858",sequenceNumberColor:"#1e1e1e"}:{}})},v=()=>{if(!m.value||!b.value)return;const T=b.value,A=T.width/o.value,R=T.height/o.value,B=(T.width-A)/2,z=(T.height-R)/2,W=T.x+B-s.value/o.value,Y=T.y+z-l.value/o.value;m.value.setAttribute("viewBox",`${W} ${Y} ${A} ${R}`)},_=T=>{if(!m.value||!i.value||!b.value)return;const A=T.deltaY>0?.9:1.1,R=o.value,B=Math.min(Math.max(.1,o.value*A),5);if(R===B)return;const z=i.value.getBoundingClientRect(),W=T.clientX-z.left,Y=T.clientY-z.top,j=m.value.getBoundingClientRect(),V=j.left-z.left,lt=j.top-z.top,et=W-V,yt=Y-lt,ct=b.value,Lt=ct.width/R,Bt=ct.height/R,mt=et/j.width,Tt=yt/j.height,It=(ct.width-Lt)/2,Wt=(ct.height-Bt)/2,ke=ct.x+It-s.value/R,pi=ct.y+Wt-l.value/R,gi=ke+mt*Lt,We=pi+Tt*Bt,er=ct.width/B,rr=ct.height/B,mn=gi-mt*er,yn=We-Tt*rr,cs=(ct.width-er)/2,mi=(ct.height-rr)/2;s.value=(ct.x+cs-mn)*B,l.value=(ct.y+mi-yn)*B,o.value=B,v()},w=T=>{c.value=!0,h.value=T.clientX,u.value=T.clientY,d.value=s.value,f.value=l.value,i.value&&(i.value.style.cursor="grabbing")},C=T=>{if(!c.value)return;const A=T.clientX-h.value,R=T.clientY-u.value;s.value=d.value+A,l.value=f.value+R,v()},k=()=>{c.value=!1,i.value&&(i.value.style.cursor="grab")},F=()=>{c.value&&(c.value=!1,i.value&&(i.value.style.cursor="grab"))},M=()=>{o.value=1,s.value=0,l.value=0,v()},O=()=>{i.value&&(g.value?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():i.value.requestFullscreen?i.value.requestFullscreen():i.value.webkitRequestFullscreen?i.value.webkitRequestFullscreen():i.value.mozRequestFullScreen?i.value.mozRequestFullScreen():i.value.msRequestFullscreen&&i.value.msRequestFullscreen())},$=()=>{const T=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);g.value&&!T&&M(),g.value=T,m.value&&(T?m.value.style.maxHeight="100vh":m.value.style.maxHeight="600px")},P=async()=>{if(!(!r.value||!t.code)){n.value=null,r.value.innerHTML="";try{const T=x();T!==a.value&&(a.value=T,y(T));const A=`mermaid-${Math.random().toString(36).substr(2,9)}`,{svg:R}=await ru.render(A,t.code);if(r.value.innerHTML=R,m.value=r.value.querySelector("svg"),m.value){const B=m.value.getAttribute("viewBox");if(B){const[z,W,Y,j]=B.split(" ").map(Number);b.value={x:z,y:W,width:Y,height:j}}else{const z=parseFloat(m.value.getAttribute("width")||"800"),W=parseFloat(m.value.getAttribute("height")||"600");b.value={x:0,y:0,width:z,height:W},m.value.setAttribute("viewBox",`0 0 ${z} ${W}`)}m.value.removeAttribute("width"),m.value.removeAttribute("height"),m.value.style.width="100%",m.value.style.height="100%",m.value.style.maxWidth="100%",m.value.style.maxHeight="600px",v()}}catch(T){t.isStreaming||(n.value=T?.message||String(T),console.error("Mermaid render error:",T)),console.log("Mermaid render skipped in streaming mode.")}}};let N=null;const E=()=>{P()};return I.onMounted(()=>{a.value=x(),y(a.value),P(),window.matchMedia&&(N=window.matchMedia("(prefers-color-scheme: dark)"),N.addEventListener("change",E));const T=new MutationObserver(()=>{P()});T.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),T.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r.value.__observer=T,document.addEventListener("fullscreenchange",$),document.addEventListener("webkitfullscreenchange",$),document.addEventListener("mozfullscreenchange",$),document.addEventListener("msfullscreenchange",$)}),I.onUnmounted(()=>{N&&N.removeEventListener("change",E),r.value&&r.value.__observer&&r.value.__observer.disconnect(),document.removeEventListener("fullscreenchange",$),document.removeEventListener("webkitfullscreenchange",$),document.removeEventListener("mozfullscreenchange",$),document.removeEventListener("msfullscreenchange",$)}),I.watch(()=>t.code,()=>{P()}),(T,A)=>(I.openBlock(),I.createElementBlock("div",nB,[I.createElementVNode("div",aB,[I.createElementVNode("button",{onClick:M,class:"control-btn",title:"重置缩放"},[...A[0]||(A[0]=[I.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},[I.createElementVNode("path",{d:"M8 3a5 5 0 1 0 0 10A5 5 0 0 0 8 3zM1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8z"}),I.createElementVNode("path",{d:"M8 4.5a.5.5 0 0 1 .5.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2A.5.5 0 0 1 8 4.5z"})],-1)])]),I.createElementVNode("button",{onClick:O,class:"control-btn",title:"全屏预览"},[g.value?(I.openBlock(),I.createElementBlock("svg",oB,[...A[2]||(A[2]=[I.createElementVNode("path",{d:"M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"},null,-1)])])):(I.openBlock(),I.createElementBlock("svg",sB,[...A[1]||(A[1]=[I.createElementVNode("path",{d:"M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"},null,-1)])]))]),I.createElementVNode("span",lB,I.toDisplayString(Math.round(o.value*100))+"%",1)]),I.createElementVNode("div",{ref_key:"containerRef",ref:i,class:I.normalizeClass(["mermaid-diagram",{"is-fullscreen":g.value,"is-dragging":c.value}]),onWheel:I.withModifiers(_,["prevent"]),onMousedown:w,onMousemove:C,onMouseup:k,onMouseleave:F},[I.createElementVNode("div",{ref_key:"diagramRef",ref:r,class:"mermaid-diagram-content"},null,512)],34),n.value&&!e.isStreaming?(I.openBlock(),I.createElementBlock("div",cB,[A[3]||(A[3]=I.createElementVNode("strong",null,"Mermaid 渲染错误:",-1)),I.createElementVNode("pre",null,I.toDisplayString(n.value),1)])):I.createCommentVNode("",!0)]))}}),uB=La(hB,[["__scopeId","data-v-d873f163"]]);function dB(e){if(e.type!=="tag"||e.name!=="code")return null;const r=(e.attribs?.class||"").match(/language-(\w+)/);return r?r[1]:null}function hy(e){return!e.children||e.children.length===0?"":e.children.map(t=>t.type==="text"?t.data:t.children?hy(t):"").join("")}function fB(e){const{priority:t=80,theme:r,cssUrl:i}=e||{};return i&&typeof window<"u"&&iu.loadCss(i),{name:"mermaid",priority:t,test:n=>{if(n.type==="tag"&&n.name==="pre"){const a=n.children?.find(o=>o.type==="tag"&&o.name==="code");if(a)return dB(a)==="mermaid"}return!1},render:(n,a,o,s)=>{const l=n.children?.find(u=>u.type==="tag"&&u.name==="code");if(!l)return I.h("div",{class:"mermaid-error"},"No code content found");const h={code:hy(l),isStreaming:s?.isStreaming||!1};return r&&(h.theme=r),I.h(uB,h)}}}const pB=I.defineComponent({__name:"BlinkingCursor",props:{shape:{default:"square"},color:{default:"#333"}},setup(e){const t=e,r=I.computed(()=>({backgroundColor:t.color}));return(i,n)=>(I.openBlock(),I.createElementBlock("span",{class:I.normalizeClass(["blinking-cursor",`cursor-${e.shape}`]),style:I.normalizeStyle(r.value)},null,6))}}),gB=La(pB,[["__scopeId","data-v-0d4d5123"]]);function mB(e={}){const{shape:t="square",color:r,priority:i=100}=e;return{name:"cursor",priority:i,test:n=>n.type==="component"&&n.name==="cursor",render:(n,a,o,s)=>{const l={...n.attribs,shape:t,...r&&{color:r}};return I.h(gB,l)}}}exports.Color=de;exports.Color$1=oi;exports.JSON_SCHEMA=bp;exports.MapCache=qe;exports.Rgb=Yt;exports.Set=Aa;exports.Stack=Ar;exports.Symbol=Ji;exports.Uint8Array=_o;exports.Utils=ot;exports.ZERO_WIDTH_SPACE=Xp;exports.__export=su;exports.__name=p;exports._export_sfc=La;exports.abs=Sw;exports.acos=Fw;exports.array=ud;exports.arrayLikeKeys=zp;exports.asin=Rw;exports.assignValue=Np;exports.assignWithDepth_default=kt;exports.atan2=Tw;exports.baseAssignValue=Xa;exports.baseFor=kp;exports.baseGetTag=kr;exports.baseKeys=_0;exports.baseRest=Up;exports.baseUnary=Ip;exports.calculateMathMLDimensions=Kb;exports.calculateTextHeight=Ll;exports.calculateTextWidth=we;exports.cleanAndMerge=Qa;exports.clear=Lu;exports.clear$1=_T;exports.clear$2=JS;exports.clear2=bT;exports.cloneArrayBuffer=Ap;exports.cloneBuffer=Tp;exports.cloneTypedArray=Ep;exports.codeBlockPlugin=Hy;exports.color=Jr;exports.commonDb_exports=Xo;exports.common_default=Cr;exports.computeDimensionOfText=Mg;exports.configureSvgSize=Vo;exports.constant=sr;exports.constant$1=Wp;exports.constant$2=Da;exports.copyArray=Lp;exports.copyObject=Pp;exports.cos=Aw;exports.createAssigner=Gp;exports.createText=He;exports.cursorPlugin=mB;exports.curveBasis=Wi;exports.darken=rt;exports.dayjs2=nu;exports.decodeEntities=Qe;exports.defaultConfig2=sx;exports.defaultConfig_default=Go;exports.define=Ia;exports.distExports=wp;exports.emojiPlugin=Wy;exports.epsilon=io;exports.eq=hn;exports.evaluate=St;exports.extend=il;exports.generateId=eg;exports.getAccDescription=Fu;exports.getAccTitle=Mu;exports.getConfig=Ot;exports.getConfig2=ft;exports.getDefaultExportFromCjs=jo;exports.getDiagramTitle=Ou;exports.getEdgeId=Sk;exports.getIconSVG=ui;exports.getLineFunctionsWithOffset=vp;exports.getPrototype=vl;exports.getRegisteredLayoutAlgorithm=GT;exports.getStylesFromArray=El;exports.getSubGraphTitleMargins=Ua;exports.getThemeVariables3=yu;exports.getUrl=Au;exports.getUserDefinedConfig=zb;exports.halfPi=no;exports.hasKatex=yr;exports.hue=rv;exports.identity=kl;exports.initCloneObject=Mp;exports.insertCluster=Wg;exports.insertEdge=u0;exports.insertEdgeLabel=l0;exports.insertNode=Gl;exports.interpolateNumber=Fe;exports.interpolateRgb=Xs;exports.interpolateString=Ju;exports.isArguments=rn;exports.isArray=nn;exports.isArrayLike=dn;exports.isArrayLikeObject=Fp;exports.isBuffer=Za;exports.isDark=ai;exports.isEmpty=qo;exports.isFunction=Ya;exports.isIndex=_l;exports.isIterateeCall=Yp;exports.isLabelStyle=xl;exports.isLength=wl;exports.isObject=Ke;exports.isObjectLike=hi;exports.isPrototype=un;exports.isTypedArray=Ka;exports.isValidShape=o0;exports.keysIn=Cl;exports.lighten=G;exports.line=fd;exports.lineBreakRegex=si;exports.load=xp;exports.log=D;exports.markers_default=p0;exports.max=Ew;exports.memoize=ci;exports.merge=Vp;exports.mermaidPlugin=fB;exports.min=Lw;exports.nodeUtil=Co;exports.nogamma=nl;exports.overRest=Hp;exports.package_default=Ns;exports.parseFontSize=fn;exports.parseGenericTypes=Ws;exports.pi=za;exports.positionEdgeLabel=c0;exports.positionNode=xT;exports.random=ig;exports.registerIconPacks=wg;exports.render=YT;exports.renderKatexSanitized=Ra;exports.replaceIconSubstring=Hl;exports.rgbConvert=Zu;exports.rgba=Pr;exports.sanitizeText=re;exports.select=dt;exports.selectSvgElement=Od;exports.setAccDescription=$u;exports.setAccTitle=Bu;exports.setConfig2=ax;exports.setDiagramTitle=Ru;exports.setNodeElem=yT;exports.setToString=jp;exports.setupGraphViewbox=Eu;exports.setupGraphViewbox2=Iu;exports.sin=Bw;exports.sqrt=Mw;exports.styles2String=X;exports.tau=$w;exports.unknownIcon=xg;exports.updateNodeBounds=Q;exports.utils_default=ae;exports.withPath=hd;exports.wrapLabel=ng;