mio-previewer 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/{_basePickBy-DcS5DfHY.js → _basePickBy-CX-mLXsu.js} +2 -2
  2. package/dist/{_basePickBy-DX8HyU0P.cjs → _basePickBy-urpTzVZD.cjs} +1 -1
  3. package/dist/{_baseUniq-l83jS7_4.js → _baseUniq-DsUDZaFa.js} +1 -1
  4. package/dist/{_baseUniq-vU0U1MCI.cjs → _baseUniq-U5kNBxwK.cjs} +1 -1
  5. package/dist/{arc-B70jSpTY.cjs → arc-Bjm4TIVX.cjs} +1 -1
  6. package/dist/{arc-bi7W8tLs.js → arc-CVKhWeEF.js} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-C8ByyxUN.js → architecture-O4VJ6CD3-CJc0FOi7.js} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-jex9YPqE.cjs → architecture-O4VJ6CD3-CgMb2YtT.cjs} +1 -1
  9. package/dist/{architectureDiagram-VXUJARFQ-b-BL2UdP.js → architectureDiagram-VXUJARFQ-C8PGCDIr.js} +3 -3
  10. package/dist/{architectureDiagram-VXUJARFQ-BSJVVbTt.cjs → architectureDiagram-VXUJARFQ-DcQUiatt.cjs} +1 -1
  11. package/dist/{blockDiagram-VD42YOAC-D4nmxP-J.cjs → blockDiagram-VD42YOAC-BN4KQiQ7.cjs} +1 -1
  12. package/dist/{blockDiagram-VD42YOAC-DhCRAnFr.js → blockDiagram-VD42YOAC-IsMZa3vr.js} +5 -5
  13. package/dist/{c4Diagram-YG6GDRKO-Bp_YQG1M.cjs → c4Diagram-YG6GDRKO-CyfIsG2z.cjs} +1 -1
  14. package/dist/{c4Diagram-YG6GDRKO-CM4iNQrU.js → c4Diagram-YG6GDRKO-DzzVW7jK.js} +2 -2
  15. package/dist/{channel-C7wjr4b0.js → channel-CN8h6xU_.js} +1 -1
  16. package/dist/channel-DUmsSONu.cjs +1 -0
  17. package/dist/{chunk-4BX2VUAB-DN9_7iVV.cjs → chunk-4BX2VUAB-Cdx32BxH.cjs} +1 -1
  18. package/dist/{chunk-4BX2VUAB-InZ28TEE.js → chunk-4BX2VUAB-JNdXbpsg.js} +1 -1
  19. package/dist/{chunk-55IACEB6-BssN5TPL.cjs → chunk-55IACEB6-ChDY-hQ2.cjs} +1 -1
  20. package/dist/{chunk-55IACEB6-DuQdcZe5.js → chunk-55IACEB6-RfPhYPFr.js} +1 -1
  21. package/dist/{chunk-B4BG7PRW-BLtyK5WN.cjs → chunk-B4BG7PRW-Br5fnbV_.cjs} +1 -1
  22. package/dist/{chunk-B4BG7PRW-CZmD1mOP.js → chunk-B4BG7PRW-BzGeYXT2.js} +4 -4
  23. package/dist/{chunk-DI55MBZ5-BhYOpZgL.js → chunk-DI55MBZ5-DbKESJsP.js} +3 -3
  24. package/dist/{chunk-DI55MBZ5-Cq5UKCn9.cjs → chunk-DI55MBZ5-DcmIzfb_.cjs} +1 -1
  25. package/dist/{chunk-FMBD7UC4-D8L83VzX.cjs → chunk-FMBD7UC4-DrtarXp7.cjs} +1 -1
  26. package/dist/{chunk-FMBD7UC4-DieuQ34J.js → chunk-FMBD7UC4-mgrp3Xzq.js} +1 -1
  27. package/dist/{chunk-QN33PNHL-D-qtZN_m.js → chunk-QN33PNHL-69lDw2xI.js} +1 -1
  28. package/dist/{chunk-QN33PNHL-BVzK2uit.cjs → chunk-QN33PNHL-DaKmotz5.cjs} +1 -1
  29. package/dist/{chunk-QZHKN3VN-BVy_lsPP.cjs → chunk-QZHKN3VN-BVpCNzfF.cjs} +1 -1
  30. package/dist/{chunk-QZHKN3VN-iq-B0BYI.js → chunk-QZHKN3VN-BlgqiAXs.js} +1 -1
  31. package/dist/{chunk-TZMSLE5B-CLskNwI1.js → chunk-TZMSLE5B-BgC-944J.js} +1 -1
  32. package/dist/{chunk-TZMSLE5B-BdG0scu4.cjs → chunk-TZMSLE5B-DTXcUMHE.cjs} +1 -1
  33. package/dist/{classDiagram-v2-WZHVMYZB-CRW-UrMH.js → classDiagram-2ON5EDUG-DPVHJvsD.js} +2 -2
  34. package/dist/{classDiagram-2ON5EDUG-DynvEPIH.cjs → classDiagram-2ON5EDUG-cuoCp-v5.cjs} +1 -1
  35. package/dist/{classDiagram-2ON5EDUG-CRW-UrMH.js → classDiagram-v2-WZHVMYZB-DPVHJvsD.js} +2 -2
  36. package/dist/{classDiagram-v2-WZHVMYZB-DynvEPIH.cjs → classDiagram-v2-WZHVMYZB-cuoCp-v5.cjs} +1 -1
  37. package/dist/{clone-BTfuqUhz.js → clone-BkWyaIyB.js} +1 -1
  38. package/dist/clone-D8mB1P8Y.cjs +1 -0
  39. package/dist/{cose-bilkent-S5V4N54A-BayjyXzv.cjs → cose-bilkent-S5V4N54A-oCWhY7Ll.cjs} +1 -1
  40. package/dist/{cose-bilkent-S5V4N54A-DWvW5ZH-.js → cose-bilkent-S5V4N54A-z5IYPDTN.js} +1 -1
  41. package/dist/{dagre-6UL2VRFP-CqJhtHGg.cjs → dagre-6UL2VRFP-C6YnNTzz.cjs} +1 -1
  42. package/dist/{dagre-6UL2VRFP-CyO_II0i.js → dagre-6UL2VRFP-f5Ujw3dX.js} +6 -6
  43. package/dist/{diagram-PSM6KHXK-Deqqk-7H.cjs → diagram-PSM6KHXK-D9lriSYY.cjs} +1 -1
  44. package/dist/{diagram-PSM6KHXK-vEG2EZir.js → diagram-PSM6KHXK-Np9cmKuG.js} +4 -4
  45. package/dist/{diagram-QEK2KX5R-CcthhOYo.js → diagram-QEK2KX5R-DURiBdry.js} +3 -3
  46. package/dist/{diagram-QEK2KX5R-CyVwjmz8.cjs → diagram-QEK2KX5R-Dozy-9vi.cjs} +1 -1
  47. package/dist/{diagram-S2PKOQOG-D5cCXDLc.cjs → diagram-S2PKOQOG-BNeUIro1.cjs} +1 -1
  48. package/dist/{diagram-S2PKOQOG-C1nkRl8o.js → diagram-S2PKOQOG-FGKcZjPA.js} +3 -3
  49. package/dist/{erDiagram-Q2GNP2WA-BOk9K4o8.cjs → erDiagram-Q2GNP2WA-DljpeQJy.cjs} +1 -1
  50. package/dist/{erDiagram-Q2GNP2WA-DYZDQY9P.js → erDiagram-Q2GNP2WA-nWhpj3p-.js} +4 -4
  51. package/dist/{flowDiagram-NV44I4VS-CbBS7kpH.cjs → flowDiagram-NV44I4VS-BubEnXnn.cjs} +1 -1
  52. package/dist/{flowDiagram-NV44I4VS-Cm5rGHKr.js → flowDiagram-NV44I4VS-DkAcCUXM.js} +5 -5
  53. package/dist/{ganttDiagram-LVOFAZNH-C9H8dTYM.js → ganttDiagram-LVOFAZNH-Bv37u-oU.js} +2 -2
  54. package/dist/{ganttDiagram-LVOFAZNH-grl-NYJD.cjs → ganttDiagram-LVOFAZNH-KM7sw86k.cjs} +1 -1
  55. package/dist/{gitGraph-ZV4HHKMB-BMRuODZ5.js → gitGraph-ZV4HHKMB-BEAz60uR.js} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-DQol4cxY.cjs → gitGraph-ZV4HHKMB-x3XPILYX.cjs} +1 -1
  57. package/dist/{gitGraphDiagram-NY62KEGX-XHIAsakR.cjs → gitGraphDiagram-NY62KEGX-2Q9c3IQF.cjs} +1 -1
  58. package/dist/{gitGraphDiagram-NY62KEGX-C8kfg2Wb.js → gitGraphDiagram-NY62KEGX-DQrRhvAi.js} +4 -4
  59. package/dist/{graph-BP4aclXr.cjs → graph-DugVR1xD.cjs} +1 -1
  60. package/dist/{graph-Cmal1ypF.js → graph-jB52z1_8.js} +2 -2
  61. package/dist/{info-63CPKGFF-CxN4GUYe.cjs → info-63CPKGFF-DV0XoHHS.cjs} +1 -1
  62. package/dist/info-63CPKGFF-IACMtt-5.js +5 -0
  63. package/dist/{infoDiagram-F6ZHWCRC-DgwWwR_a.cjs → infoDiagram-F6ZHWCRC-BT1d1nZL.cjs} +1 -1
  64. package/dist/{infoDiagram-F6ZHWCRC-D2_K2jLW.js → infoDiagram-F6ZHWCRC-DOWflOKL.js} +2 -2
  65. package/dist/{journeyDiagram-XKPGCS4Q-BNauHD12.js → journeyDiagram-XKPGCS4Q-KWHEtC_b.js} +4 -4
  66. package/dist/{journeyDiagram-XKPGCS4Q-Cd1ptemy.cjs → journeyDiagram-XKPGCS4Q-TW53KiCV.cjs} +1 -1
  67. package/dist/{kanban-definition-3W4ZIXB7-aXwg7GQC.js → kanban-definition-3W4ZIXB7-Cl8W02NN.js} +2 -2
  68. package/dist/{kanban-definition-3W4ZIXB7-BsVJ9Zr_.cjs → kanban-definition-3W4ZIXB7-kIHRY6TW.cjs} +1 -1
  69. package/dist/{layout-CNXo_UYD.js → layout-BNnK4XyW.js} +4 -4
  70. package/dist/{layout-UdmmrcAy.cjs → layout-DATQG8F5.cjs} +1 -1
  71. package/dist/{linear-BJYenDkp.js → linear-BndYBFdO.js} +1 -1
  72. package/dist/{linear-yobfjqoN.cjs → linear-D56OtEai.cjs} +1 -1
  73. package/dist/{mermaid-parser.core-D65Eg7MW.js → mermaid-parser.core-CXOlD-aB.js} +11 -11
  74. package/dist/{mermaid-parser.core-BGNM1z13.cjs → mermaid-parser.core-KWNt3GZ-.cjs} +2 -2
  75. package/dist/{mindmap-definition-VGOIOE7T-Cj2T7UQL.js → mindmap-definition-VGOIOE7T-BZ42QXPz.js} +3 -3
  76. package/dist/{mindmap-definition-VGOIOE7T-BWwajGM9.cjs → mindmap-definition-VGOIOE7T-uC_u8r_K.cjs} +1 -1
  77. package/dist/mio-previewer.cjs.js +1 -1
  78. package/dist/mio-previewer.css +1 -1
  79. package/dist/mio-previewer.es.js +1 -1
  80. package/dist/{packet-HUATNLJX-Ckyin10q.cjs → packet-HUATNLJX-B1uUKGsE.cjs} +1 -1
  81. package/dist/{packet-HUATNLJX-14SEU0O4.js → packet-HUATNLJX-R_YjQiG3.js} +1 -1
  82. package/dist/pie-WTHONI2E-DfmUXKgN.js +5 -0
  83. package/dist/{pie-WTHONI2E-BtmYKmK7.cjs → pie-WTHONI2E-z63rIpoA.cjs} +1 -1
  84. package/dist/{pieDiagram-ADFJNKIX-DqeDsWS0.cjs → pieDiagram-ADFJNKIX-CDwSV8K9.cjs} +1 -1
  85. package/dist/{pieDiagram-ADFJNKIX-BWiplVXs.js → pieDiagram-ADFJNKIX-srMF_eR7.js} +4 -4
  86. package/dist/plugins/custom.cjs.js +1 -1
  87. package/dist/plugins/custom.es.js +2 -2
  88. package/dist/{quadrantDiagram-AYHSOK5B-FXg2sS-E.js → quadrantDiagram-AYHSOK5B-BmyTFcQb.js} +2 -2
  89. package/dist/{quadrantDiagram-AYHSOK5B-Bminc_qJ.cjs → quadrantDiagram-AYHSOK5B-oxSuUMDn.cjs} +1 -1
  90. package/dist/radar-NJJJXTRR-DMxayGt_.js +5 -0
  91. package/dist/{radar-NJJJXTRR-Dbtyn_33.cjs → radar-NJJJXTRR-VkFzX6jv.cjs} +1 -1
  92. package/dist/{requirementDiagram-UZGBJVZJ-Ct1bmEYE.cjs → requirementDiagram-UZGBJVZJ-BDkuEktn.cjs} +1 -1
  93. package/dist/{requirementDiagram-UZGBJVZJ-Ciz2mLOm.js → requirementDiagram-UZGBJVZJ-DhsGzzde.js} +3 -3
  94. package/dist/{sankeyDiagram-TZEHDZUN-B2xkf9t6.js → sankeyDiagram-TZEHDZUN-BqlTgfku.js} +1 -1
  95. package/dist/{sankeyDiagram-TZEHDZUN-TSSR-gzu.cjs → sankeyDiagram-TZEHDZUN-CB7iwmhw.cjs} +1 -1
  96. package/dist/{sequenceDiagram-WL72ISMW-DIpwERDr.js → sequenceDiagram-WL72ISMW-D8yYA86f.js} +3 -3
  97. package/dist/{sequenceDiagram-WL72ISMW-DtCHtJNZ.cjs → sequenceDiagram-WL72ISMW-Dq9F44sf.cjs} +1 -1
  98. package/dist/{stateDiagram-FKZM4ZOC-B1VqtZxH.cjs → stateDiagram-FKZM4ZOC-BJy9g6Xs.cjs} +1 -1
  99. package/dist/{stateDiagram-FKZM4ZOC-DSCBCFG_.js → stateDiagram-FKZM4ZOC-DiQRSUKz.js} +4 -4
  100. package/dist/{stateDiagram-v2-4FDKWEC3-CH9hsq70.cjs → stateDiagram-v2-4FDKWEC3-C8yasgQD.cjs} +1 -1
  101. package/dist/{stateDiagram-v2-4FDKWEC3-DeOAmcI6.js → stateDiagram-v2-4FDKWEC3-CK62t72a.js} +2 -2
  102. package/dist/{timeline-definition-IT6M3QCI-Da0A3jAO.cjs → timeline-definition-IT6M3QCI-Bdrd_qt2.cjs} +1 -1
  103. package/dist/{timeline-definition-IT6M3QCI-C2CJErQP.js → timeline-definition-IT6M3QCI-DtLPlh-V.js} +2 -2
  104. package/dist/{treemap-75Q7IDZK-BMEJe5sG.js → treemap-75Q7IDZK-CUSGqXo-.js} +1 -1
  105. package/dist/{treemap-75Q7IDZK-obpm_ohS.cjs → treemap-75Q7IDZK-CnVmsTr_.cjs} +1 -1
  106. package/dist/types/main-benchmark-high-freq.d.ts +1 -0
  107. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +11 -0
  108. package/dist/{viewer-3haLPWOp.cjs → viewer-Tg0uKPoW.cjs} +54 -54
  109. package/dist/{viewer-BVjz3IFH.js → viewer-u-cGW4li.js} +4471 -4325
  110. package/dist/{xychartDiagram-PRI3JC2R-DkdcvnXd.cjs → xychartDiagram-PRI3JC2R-C3tAeydN.cjs} +1 -1
  111. package/dist/{xychartDiagram-PRI3JC2R-ttlQ38E3.js → xychartDiagram-PRI3JC2R-DakZCvYc.js} +2 -2
  112. package/package.json +3 -2
  113. package/dist/channel-Bt4_zqKM.cjs +0 -1
  114. package/dist/clone-Tk5CWuEC.cjs +0 -1
  115. package/dist/info-63CPKGFF-BbRjNBBe.js +0 -5
  116. package/dist/pie-WTHONI2E-C6yV7-lW.js +0 -5
  117. package/dist/radar-NJJJXTRR-CF8VuBoZ.js +0 -5
  118. package/dist/types/entries/plugin-alert.d.ts +0 -1
  119. package/dist/types/entries/plugin-codeblock.d.ts +0 -1
  120. package/dist/types/entries/plugin-emoji.d.ts +0 -1
  121. package/dist/types/entries/plugin-katex.d.ts +0 -1
  122. package/dist/types/entries/plugin-mermaid.d.ts +0 -1
@@ -1,15 +1,15 @@
1
- "use strict";const U=require("vue");var fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fs={exports:{}},pc;function y0(){return pc||(pc=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
1
+ "use strict";const N=require("vue");var fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fs={exports:{}},pc;function yy(){return pc||(pc=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(_){return _ instanceof l?new l(_.type,y(_.content),_.alias):Array.isArray(_)?_.map(y):_.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(_,C){C=C||{};var w,v;switch(s.util.type(_)){case"Object":if(v=s.util.objId(_),C[v])return C[v];w={},C[v]=w;for(var k in _)_.hasOwnProperty(k)&&(w[k]=y(_[k],C));return w;case"Array":return v=s.util.objId(_),C[v]?C[v]:(w=[],C[v]=w,_.forEach(function($,E){w[E]=y($,C)}),w);default:return _}},getLanguage:function(y){for(;y;){var _=n.exec(y.className);if(_)return _[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,_){y.className=y.className.replace(RegExp(n,"gi"),""),y.classList.add("language-"+_)},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 _=document.getElementsByTagName("script");for(var C in _)if(_[C].src==y)return _[C]}return null}},isActive:function(y,_,C){for(var w="no-"+_;y;){var v=y.classList;if(v.contains(_))return!0;if(v.contains(w))return!1;y=y.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,_){var C=s.util.clone(s.languages[y]);for(var w in _)C[w]=_[w];return C},insertBefore:function(y,_,C,w){w=w||s.languages;var v=w[y],k={};for(var $ in v)if(v.hasOwnProperty($)){if($==_)for(var E in C)C.hasOwnProperty(E)&&(k[E]=C[E]);C.hasOwnProperty($)||(k[$]=v[$])}var R=w[y];return w[y]=k,s.languages.DFS(s.languages,function(M,N){N===R&&M!=y&&(this[M]=k)}),k},DFS:function y(_,C,w,v){v=v||{};var k=s.util.objId;for(var $ in _)if(_.hasOwnProperty($)){C.call(_,$,_[$],w||$);var E=_[$],R=s.util.type(E);R==="Object"&&!v[k(E)]?(v[k(E)]=!0,y(E,C,null,v)):R==="Array"&&!v[k(E)]&&(v[k(E)]=!0,y(E,C,$,v))}}},plugins:{},highlightAll:function(y,_){s.highlightAllUnder(document,y,_)},highlightAllUnder:function(y,_,C){var w={callback:C,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 v=0,k;k=w.elements[v++];)s.highlightElement(k,_===!0,w.callback)},highlightElement:function(y,_,C){var w=s.util.getLanguage(y),v=s.languages[w];s.util.setLanguage(y,w);var k=y.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(k,w);var $=y.textContent,E={element:y,language:w,grammar:v,code:$};function R(N){E.highlightedCode=N,s.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,s.hooks.run("after-highlight",E),s.hooks.run("complete",E),C&&C.call(E.element)}if(s.hooks.run("before-sanity-check",E),k=E.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!E.code){s.hooks.run("complete",E),C&&C.call(E.element);return}if(s.hooks.run("before-highlight",E),!E.grammar){R(s.util.encode(E.code));return}if(_&&i.Worker){var M=new Worker(s.filename);M.onmessage=function(N){R(N.data)},M.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else R(s.highlight(E.code,E.grammar,E.language))},highlight:function(y,_,C){var w={code:y,grammar:_,language:C};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,_){var C=_.rest;if(C){for(var w in C)_[w]=C[w];delete _.rest}var v=new u;return d(v,v.head,y),h(y,v,_,v.head,0),g(v)},hooks:{all:{},add:function(y,_){var C=s.hooks.all;C[y]=C[y]||[],C[y].push(_)},run:function(y,_){var C=s.hooks.all[y];if(!(!C||!C.length))for(var w=0,v;v=C[w++];)v(_)}},Token:l};i.Prism=s;function l(y,_,C,w){this.type=y,this.content=_,this.alias=C,this.length=(w||"").length|0}l.stringify=function y(_,C){if(typeof _=="string")return _;if(Array.isArray(_)){var w="";return _.forEach(function(R){w+=y(R,C)}),w}var v={type:_.type,content:y(_.content,C),tag:"span",classes:["token",_.type],attributes:{},language:C},k=_.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(v.classes,k):v.classes.push(k)),s.hooks.run("wrap",v);var $="";for(var E in v.attributes)$+=" "+E+'="'+(v.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+v.tag+' class="'+v.classes.join(" ")+'"'+$+">"+v.content+"</"+v.tag+">"};function c(y,_,C,w){y.lastIndex=_;var v=y.exec(C);if(v&&w&&v[1]){var k=v[1].length;v.index+=k,v[0]=v[0].slice(k)}return v}function h(y,_,C,w,v,k){for(var $ in C)if(!(!C.hasOwnProperty($)||!C[$])){var E=C[$];E=Array.isArray(E)?E:[E];for(var R=0;R<E.length;++R){if(k&&k.cause==$+","+R)return;var M=E[R],N=M.inside,D=!!M.lookbehind,L=!!M.greedy,F=M.alias;if(L&&!M.pattern.global){var A=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,A+"g")}for(var O=M.pattern||M,B=w.next,q=v;B!==_.tail&&!(k&&q>=k.reach);q+=B.value.length,B=B.next){var H=B.value;if(_.length>y.length)return;if(!(H instanceof l)){var Y=1,j;if(L){if(j=c(O,q,y,D),!j||j.index>=y.length)break;var gt=j.index,Q=j.index+j[0].length,lt=q;for(lt+=B.value.length;gt>=lt;)B=B.next,lt+=B.value.length;if(lt-=B.value.length,q=lt,B.value instanceof l)continue;for(var it=B;it!==_.tail&&(lt<Q||typeof it.value=="string");it=it.next)Y++,lt+=it.value.length;Y--,H=y.slice(q,lt),j.index-=q}else if(j=c(O,0,H,D),!j)continue;var gt=j.index,mt=j[0],zt=H.slice(0,gt),qt=H.slice(gt+mt.length),yt=q+H.length;k&&yt>k.reach&&(k.reach=yt);var Ft=B.prev;zt&&(Ft=d(_,Ft,zt),q+=zt.length),f(_,Ft,Y);var Vt=new l($,N?s.tokenize(mt,N):mt,F,mt);if(B=d(_,Ft,Vt),qt&&d(_,B,qt),Y>1){var te={cause:$+","+R,reach:yt};h(y,_,C,B.prev,q,te),k&&te.reach>k.reach&&(k.reach=te.reach)}}}}}}function u(){var y={value:null,prev:null,next:null},_={value:null,prev:y,next:null};y.next=_,this.head=y,this.tail=_,this.length=0}function d(y,_,C){var w=_.next,v={value:C,prev:_,next:w};return _.next=v,w.prev=v,y.length++,v}function f(y,_,C){for(var w=_.next,v=0;v<C&&w!==y.tail;v++)w=w.next;_.next=w,w.prev=_,y.length-=v}function g(y){for(var _=[],C=y.head.next;C!==y.tail;)_.push(C.value),C=C.next;return _}if(!i.document)return i.addEventListener&&(s.disableWorkerMessageHandler||i.addEventListener("message",function(y){var _=JSON.parse(y.data),C=_.language,w=_.code,v=_.immediateClose;i.postMessage(s.highlight(w,s.languages[C],C)),v&&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 fc<"u"&&(fc.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],_=b[3];return y?_?[x,Number(_)]:[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"),_=m.language;if(_==="none"){var C=(/\.(\w+)$/.exec(y)||[,"none"])[1];_=o[C]||C}r.util.setLanguage(x,_),r.util.setLanguage(b,_);var w=r.plugins.autoloader;w&&w.loadLanguages(_),d(y,function(v){b.setAttribute(s,c);var k=f(b.getAttribute("data-range"));if(k){var $=v.split(/\r\n?|\n/g),E=k[0],R=k[1]==null?$.length:k[1];E<0&&(E+=$.length),E=Math.max(0,Math.min(E-1,$.length)),R<0&&(R+=$.length),R=Math.max(0,Math.min(R,$.length)),v=$.slice(E,R).join(`
9
- `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(E+1))}x.textContent=v,r.highlightElement(x)},function(v){b.setAttribute(s,h),x.textContent=v})}}),r.plugins.fileHighlight={highlight:function(b){for(var x=(b||document).querySelectorAll(u),y=0,_;_=x[y++];)r.highlightElement(_)}};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)}})()})(fs)),fs.exports}var b0=y0();const yn=qo(b0);var gc={},mc;function x0(){return mc||(mc=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)),gc}x0();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 yc={},bc;function _0(){return bc||(bc=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),yc}_0();(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 xc={},_c;function w0(){return _c||(_c=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)),xc}w0();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 wc={},Cc;function C0(){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)),wc}C0();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 vc={},kc;function v0(){return kc||(kc=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)),vc}v0();(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 Sc={},Tc;function k0(){return Tc||(Tc=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)),Sc}k0();var Ac={},Ec;function S0(){return Ec||(Ec=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)),Ac}S0();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 _="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,_]:x.alias.push(_):x.alias=[_]}}}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 T0=["data-lang"],A0={class:"code-block-header"},E0={class:"lang-label"},L0={class:"op-btn-group"},B0={key:1},M0=["innerHTML"],$0=["srcdoc"],F0='<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>',R0='<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>',O0='<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>',I0=U.defineComponent({__name:"CodeBlock",props:{code:{},language:{}},setup(e){const t=e,r=U.ref(!1),i=U.ref(!1),n=U.ref(null),a=U.ref("300px"),o=`iframe-${Math.random().toString(36).substr(2,9)}-${Date.now()}`;function s(){return t.language.toLowerCase()==="html"||t.language.toLowerCase()==="markup"}function l(){const x=t.language||"plaintext";return yn.languages[x]?yn.highlight(t.code,yn.languages[x],x):yn.util.encode(t.code)}const c=U.ref(""),h=()=>{c.value=l()};h(),U.watch(()=>[t.code,t.language],()=>{h()});const u=async()=>{try{await navigator.clipboard.writeText(t.code),r.value=!0,setTimeout(()=>{r.value=!1},1700)}catch(x){console.error("复制失败:",x)}},d=()=>{i.value=!0},f=()=>{i.value=!1,a.value="300px"},g=U.computed(()=>{const x=`
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(w){return w instanceof l?new l(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.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(w,_){_=_||{};var v,C;switch(s.util.type(w)){case"Object":if(C=s.util.objId(w),_[C])return _[C];v={},_[C]=v;for(var k in w)w.hasOwnProperty(k)&&(v[k]=y(w[k],_));return v;case"Array":return C=s.util.objId(w),_[C]?_[C]:(v=[],_[C]=v,w.forEach(function(B,L){v[L]=y(B,_)}),v);default:return w}},getLanguage:function(y){for(;y;){var w=n.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(n,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(v){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(v.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var _ in w)if(w[_].src==y)return w[_]}return null}},isActive:function(y,w,_){for(var v="no-"+w;y;){var C=y.classList;if(C.contains(w))return!0;if(C.contains(v))return!1;y=y.parentElement}return!!_}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,w){var _=s.util.clone(s.languages[y]);for(var v in w)_[v]=w[v];return _},insertBefore:function(y,w,_,v){v=v||s.languages;var C=v[y],k={};for(var B in C)if(C.hasOwnProperty(B)){if(B==w)for(var L in _)_.hasOwnProperty(L)&&(k[L]=_[L]);_.hasOwnProperty(B)||(k[B]=C[B])}var O=v[y];return v[y]=k,s.languages.DFS(s.languages,function($,I){I===O&&$!=y&&(this[$]=k)}),k},DFS:function y(w,_,v,C){C=C||{};var k=s.util.objId;for(var B in w)if(w.hasOwnProperty(B)){_.call(w,B,w[B],v||B);var L=w[B],O=s.util.type(L);O==="Object"&&!C[k(L)]?(C[k(L)]=!0,y(L,_,null,C)):O==="Array"&&!C[k(L)]&&(C[k(L)]=!0,y(L,_,B,C))}}},plugins:{},highlightAll:function(y,w){s.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,_){var v={callback:_,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",v),v.elements=Array.prototype.slice.apply(v.container.querySelectorAll(v.selector)),s.hooks.run("before-all-elements-highlight",v);for(var C=0,k;k=v.elements[C++];)s.highlightElement(k,w===!0,v.callback)},highlightElement:function(y,w,_){var v=s.util.getLanguage(y),C=s.languages[v];s.util.setLanguage(y,v);var k=y.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(k,v);var B=y.textContent,L={element:y,language:v,grammar:C,code:B};function O(I){L.highlightedCode=I,s.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,s.hooks.run("after-highlight",L),s.hooks.run("complete",L),_&&_.call(L.element)}if(s.hooks.run("before-sanity-check",L),k=L.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!L.code){s.hooks.run("complete",L),_&&_.call(L.element);return}if(s.hooks.run("before-highlight",L),!L.grammar){O(s.util.encode(L.code));return}if(w&&i.Worker){var $=new Worker(s.filename);$.onmessage=function(I){O(I.data)},$.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else O(s.highlight(L.code,L.grammar,L.language))},highlight:function(y,w,_){var v={code:y,grammar:w,language:_};if(s.hooks.run("before-tokenize",v),!v.grammar)throw new Error('The language "'+v.language+'" has no grammar.');return v.tokens=s.tokenize(v.code,v.grammar),s.hooks.run("after-tokenize",v),l.stringify(s.util.encode(v.tokens),v.language)},tokenize:function(y,w){var _=w.rest;if(_){for(var v in _)w[v]=_[v];delete w.rest}var C=new u;return d(C,C.head,y),h(y,C,w,C.head,0),g(C)},hooks:{all:{},add:function(y,w){var _=s.hooks.all;_[y]=_[y]||[],_[y].push(w)},run:function(y,w){var _=s.hooks.all[y];if(!(!_||!_.length))for(var v=0,C;C=_[v++];)C(w)}},Token:l};i.Prism=s;function l(y,w,_,v){this.type=y,this.content=w,this.alias=_,this.length=(v||"").length|0}l.stringify=function y(w,_){if(typeof w=="string")return w;if(Array.isArray(w)){var v="";return w.forEach(function(O){v+=y(O,_)}),v}var C={type:w.type,content:y(w.content,_),tag:"span",classes:["token",w.type],attributes:{},language:_},k=w.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(C.classes,k):C.classes.push(k)),s.hooks.run("wrap",C);var B="";for(var L in C.attributes)B+=" "+L+'="'+(C.attributes[L]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+B+">"+C.content+"</"+C.tag+">"};function c(y,w,_,v){y.lastIndex=w;var C=y.exec(_);if(C&&v&&C[1]){var k=C[1].length;C.index+=k,C[0]=C[0].slice(k)}return C}function h(y,w,_,v,C,k){for(var B in _)if(!(!_.hasOwnProperty(B)||!_[B])){var L=_[B];L=Array.isArray(L)?L:[L];for(var O=0;O<L.length;++O){if(k&&k.cause==B+","+O)return;var $=L[O],I=$.inside,D=!!$.lookbehind,T=!!$.greedy,M=$.alias;if(T&&!$.pattern.global){var E=$.pattern.toString().match(/[imsuy]*$/)[0];$.pattern=RegExp($.pattern.source,E+"g")}for(var R=$.pattern||$,F=v.next,q=C;F!==w.tail&&!(k&&q>=k.reach);q+=F.value.length,F=F.next){var j=F.value;if(w.length>y.length)return;if(!(j instanceof l)){var Y=1,U;if(T){if(U=c(R,q,y,D),!U||U.index>=y.length)break;var gt=U.index,Q=U.index+U[0].length,lt=q;for(lt+=F.value.length;gt>=lt;)F=F.next,lt+=F.value.length;if(lt-=F.value.length,q=lt,F.value instanceof l)continue;for(var it=F;it!==w.tail&&(lt<Q||typeof it.value=="string");it=it.next)Y++,lt+=it.value.length;Y--,j=y.slice(q,lt),U.index-=q}else if(U=c(R,0,j,D),!U)continue;var gt=U.index,mt=U[0],zt=j.slice(0,gt),qt=j.slice(gt+mt.length),yt=q+j.length;k&&yt>k.reach&&(k.reach=yt);var Ft=F.prev;zt&&(Ft=d(w,Ft,zt),q+=zt.length),f(w,Ft,Y);var Xt=new l(B,I?s.tokenize(mt,I):mt,M,mt);if(F=d(w,Ft,Xt),qt&&d(w,F,qt),Y>1){var te={cause:B+","+O,reach:yt};h(y,w,_,F.prev,q,te),k&&te.reach>k.reach&&(k.reach=te.reach)}}}}}}function u(){var y={value:null,prev:null,next:null},w={value:null,prev:y,next:null};y.next=w,this.head=y,this.tail=w,this.length=0}function d(y,w,_){var v=w.next,C={value:_,prev:w,next:v};return w.next=C,v.prev=C,y.length++,C}function f(y,w,_){for(var v=w.next,C=0;C<_&&v!==y.tail;C++)v=v.next;w.next=v,v.prev=w,y.length-=C}function g(y){for(var w=[],_=y.head.next;_!==y.tail;)w.push(_.value),_=_.next;return w}if(!i.document)return i.addEventListener&&(s.disableWorkerMessageHandler||i.addEventListener("message",function(y){var w=JSON.parse(y.data),_=w.language,v=w.code,C=w.immediateClose;i.postMessage(s.highlight(v,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 fc<"u"&&(fc.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],w=b[3];return y?w?[x,Number(w)]:[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"),w=m.language;if(w==="none"){var _=(/\.(\w+)$/.exec(y)||[,"none"])[1];w=o[_]||_}r.util.setLanguage(x,w),r.util.setLanguage(b,w);var v=r.plugins.autoloader;v&&v.loadLanguages(w),d(y,function(C){b.setAttribute(s,c);var k=f(b.getAttribute("data-range"));if(k){var B=C.split(/\r\n?|\n/g),L=k[0],O=k[1]==null?B.length:k[1];L<0&&(L+=B.length),L=Math.max(0,Math.min(L-1,B.length)),O<0&&(O+=B.length),O=Math.max(0,Math.min(O,B.length)),C=B.slice(L,O).join(`
9
+ `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+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,w;w=x[y++];)r.highlightElement(w)}};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)}})()})(fs)),fs.exports}var by=yy();const yn=qo(by);var gc={},mc;function xy(){return mc||(mc=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)),gc}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 yc={},bc;function wy(){return bc||(bc=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),yc}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 xc={},wc;function vy(){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)),xc}vy();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 vc={},_c;function _y(){return _c||(_c=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)),vc}_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 Cc={},kc;function Cy(){return kc||(kc=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)),Cc}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 Sc={},Tc;function ky(){return Tc||(Tc=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)),Sc}ky();var Ac={},Ec;function Sy(){return Ec||(Ec=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)),Ac}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 w="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,w]:x.alias.push(w):x.alias=[w]}}}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=N.defineComponent({__name:"CodeBlock",props:{code:{},language:{},publishUrl:{},onPublished:{type:Function}},setup(e){const t=e,r=N.ref(!1),i=N.ref(!1),n=N.ref(null),a=N.ref("300px"),o=N.ref(!1),s=N.ref(!1),l=N.ref(!1),c=N.ref(""),h=N.ref(!1),u=N.ref("0px"),d=N.ref("0px"),f=N.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 T=t.language||"plaintext";return yn.languages[T]?yn.highlight(t.code,yn.languages[T],T):yn.util.encode(t.code)}const x=N.ref(""),y=()=>{x.value=b()};y(),N.watch(()=>[t.code,t.language],()=>{y()});const w=()=>{i.value=!0},_=()=>{i.value=!1,a.value="300px"},v=(T,M,E=2e3)=>{if(!M){console.warn("showTooltip: button is null");return}c.value=T;const R=M.getBoundingClientRect(),F=R.left+R.width/2,q=R.top;u.value=`${F}px`,d.value=`${q}px`,console.log("Tooltip:",{message:T,left:F,top:q,visible:!0}),h.value=!0,setTimeout(()=>{h.value=!1},E)},C=async T=>{const M=T.currentTarget;try{await navigator.clipboard.writeText(t.code),r.value=!0,v("已复制",M),setTimeout(()=>{r.value=!1},1700)}catch(E){console.error("复制失败:",E),v("复制失败",M)}},k=async T=>{if(!t.publishUrl||o.value)return;const M=T.currentTarget;o.value=!0,s.value=!1,v("正在发布...",M,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),v("已发布成功",M)):R.url?(await navigator.clipboard.writeText(R.url),v("已发布,URL 已复制",M)):v("已发布成功",M),setTimeout(()=>{s.value=!1},2e3)):(v(`发布失败: ${R.msg||"未知错误"}`,M),console.error("发布失败:",R.msg||"未知错误"))}catch(E){v("发布失败,请检查网络",M),console.error("发布失败:",E)}finally{o.value=!1}},B=()=>{l.value=!0,document.body.style.overflow="hidden"},L=()=>{l.value=!1,document.body.style.overflow=""},O=N.computed(()=>{const T=`
10
10
  <script>
11
11
  (function() {
12
- const iframeId = '${o}';
12
+ const iframeId = '${g}';
13
13
 
14
14
  function sendHeight() {
15
15
  const height = Math.max(
@@ -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>",`${x}</body>`):t.code+x}),m=()=>{},b=x=>{if(x.data&&x.data.type==="iframe-height"&&x.data.iframeId===o){const y=x.data.height,_=Math.max(100,Math.min(1e3,y));a.value=`${_}px`}};return U.onMounted(()=>{window.addEventListener("message",b)}),U.onUnmounted(()=>{window.removeEventListener("message",b)}),(x,y)=>(U.openBlock(),U.createElementBlock("div",{class:"code-block-wrapper","data-lang":e.language},[U.createElementVNode("div",A0,[U.createElementVNode("span",E0,U.toDisplayString(e.language.toUpperCase()),1),U.createElementVNode("div",L0,[U.createElementVNode("button",{class:U.normalizeClass(["copy-code-button",{copied:r.value}]),type:"button",title:"复制代码",onClick:u},[r.value?(U.openBlock(),U.createElementBlock("span",B0,"已复制")):(U.openBlock(),U.createElementBlock("span",{key:0,innerHTML:F0}))],2),s()&&!i.value?(U.openBlock(),U.createElementBlock("button",{key:0,class:"preview-html-button",type:"button",title:"预览 HTML",onClick:d,innerHTML:R0})):U.createCommentVNode("",!0),i.value?(U.openBlock(),U.createElementBlock("button",{key:1,class:"close-preview-button",type:"button",title:"关闭预览",onClick:f,innerHTML:O0})):U.createCommentVNode("",!0)])]),U.withDirectives(U.createElementVNode("pre",{class:U.normalizeClass(`language-${e.language}`)},[U.createElementVNode("code",{class:U.normalizeClass(`language-${e.language}`),innerHTML:c.value},null,10,M0)],2),[[U.vShow,!i.value]]),i.value?(U.openBlock(),U.createElementBlock("div",{key:0,class:"iframe-wrapper",style:U.normalizeStyle({height:a.value})},[U.createElementVNode("iframe",{ref_key:"previewIframe",ref:n,class:"html-preview-iframe",srcdoc:g.value,sandbox:"allow-scripts allow-forms allow-popups allow-modals allow-same-origin",onLoad:m},null,40,$0)],4)):U.createCommentVNode("",!0)],8,T0))}}),ka=(e,t)=>{const r=e.__vccOpts||e;for(const[i,n]of t)r[i]=n;return r},D0=ka(I0,[["__scopeId","data-v-30130c79"]]);function N0(e){const{priority:t=70,languageAliases:r={}}=e||{};return{name:"codeblock",priority:t,test:i=>i.type!=="tag"||i.name!=="pre"?!1:!!i.children?.some(a=>a.type==="tag"&&a.name==="code"),render:(i,n,a,o)=>{const s=i.children?.find(f=>f.type==="tag"&&f.name==="code");if(!s)return U.h("pre",{},"");const c=(s.attribs?.class||"").match(/language-(\w+)/);let h=c?c[1]:"plaintext";r[h]&&(h=r[h]);const u=f=>f.type==="text"?f.data||"":f.children?f.children.map(u).join(""):"",d=u(s);return U.h(D0,{code:d,language:h})}}}function P0(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 Os={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"}},Bn={exports:{}},z0=Bn.exports,Lc;function q0(){return Lc||(Lc=1,(function(e,t){(function(r,i){e.exports=i()})(z0,(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(L){var F=["th","st","nd","rd"],A=L%100;return"["+L+(F[(A-20)%10]||F[A]||F[0])+"]"}},_=function(L,F,A){var O=String(L);return!O||O.length>=F?L:""+Array(F+1-O.length).join(A)+L},C={s:_,z:function(L){var F=-L.utcOffset(),A=Math.abs(F),O=Math.floor(A/60),B=A%60;return(F<=0?"+":"-")+_(O,2,"0")+":"+_(B,2,"0")},m:function L(F,A){if(F.date()<A.date())return-L(A,F);var O=12*(A.year()-F.year())+(A.month()-F.month()),B=F.clone().add(O,u),q=A-B<0,H=F.clone().add(O+(q?-1:1),u);return+(-(O+(A-B)/(q?B-H:H-B))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:f,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:d}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},w="en",v={};v[w]=y;var k="$isDayjsObject",$=function(L){return L instanceof N||!(!L||!L[k])},E=function L(F,A,O){var B;if(!F)return w;if(typeof F=="string"){var q=F.toLowerCase();v[q]&&(B=q),A&&(v[q]=A,B=q);var H=F.split("-");if(!B&&H.length>1)return L(H[0])}else{var Y=F.name;v[Y]=F,B=Y}return!O&&B&&(w=B),B||!O&&w},R=function(L,F){if($(L))return L.clone();var A=typeof F=="object"?F:{};return A.date=L,A.args=arguments,new N(A)},M=C;M.l=E,M.i=$,M.w=function(L,F){return R(L,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var N=(function(){function L(A){this.$L=E(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[k]=!0}var F=L.prototype;return F.parse=function(A){this.$d=(function(O){var B=O.date,q=O.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 H=B.match(b);if(H){var Y=H[2]-1||0,j=(H[7]||"0").substring(0,3);return q?new Date(Date.UTC(H[1],Y,H[3]||1,H[4]||0,H[5]||0,H[6]||0,j)):new Date(H[1],Y,H[3]||1,H[4]||0,H[5]||0,H[6]||0,j)}}return new Date(B)})(A),this.init()},F.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()},F.$utils=function(){return M},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(A,O){var B=R(A);return this.startOf(O)<=B&&B<=this.endOf(O)},F.isAfter=function(A,O){return R(A)<this.startOf(O)},F.isBefore=function(A,O){return this.endOf(O)<R(A)},F.$g=function(A,O,B){return M.u(A)?this[O]:this.set(B,A)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(A,O){var B=this,q=!!M.u(O)||O,H=M.p(A),Y=function(qt,yt){var Ft=M.w(B.$u?Date.UTC(B.$y,yt,qt):new Date(B.$y,yt,qt),B);return q?Ft:Ft.endOf(c)},j=function(qt,yt){return M.w(B.toDate()[qt].apply(B.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(yt)),B)},Q=this.$W,lt=this.$M,it=this.$D,gt="set"+(this.$u?"UTC":"");switch(H){case f:return q?Y(1,0):Y(31,11);case u:return q?Y(1,lt):Y(0,lt+1);case h:var mt=this.$locale().weekStart||0,zt=(Q<mt?Q+7:Q)-mt;return Y(q?it-zt:it+(6-zt),lt);case c:case g:return j(gt+"Hours",0);case l:return j(gt+"Minutes",1);case s:return j(gt+"Seconds",2);case o:return j(gt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(A){return this.startOf(A,!1)},F.$set=function(A,O){var B,q=M.p(A),H="set"+(this.$u?"UTC":""),Y=(B={},B[c]=H+"Date",B[g]=H+"Date",B[u]=H+"Month",B[f]=H+"FullYear",B[l]=H+"Hours",B[s]=H+"Minutes",B[o]=H+"Seconds",B[a]=H+"Milliseconds",B)[q],j=q===c?this.$D+(O-this.$W):O;if(q===u||q===f){var Q=this.clone().set(g,1);Q.$d[Y](j),Q.init(),this.$d=Q.set(g,Math.min(this.$D,Q.daysInMonth())).$d}else Y&&this.$d[Y](j);return this.init(),this},F.set=function(A,O){return this.clone().$set(A,O)},F.get=function(A){return this[M.p(A)]()},F.add=function(A,O){var B,q=this;A=Number(A);var H=M.p(O),Y=function(lt){var it=R(q);return M.w(it.date(it.date()+Math.round(lt*A)),q)};if(H===u)return this.set(u,this.$M+A);if(H===f)return this.set(f,this.$y+A);if(H===c)return Y(1);if(H===h)return Y(7);var j=(B={},B[s]=i,B[l]=n,B[o]=r,B)[H]||1,Q=this.$d.getTime()+A*j;return M.w(Q,this)},F.subtract=function(A,O){return this.add(-1*A,O)},F.format=function(A){var O=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var q=A||"YYYY-MM-DDTHH:mm:ssZ",H=M.z(this),Y=this.$H,j=this.$m,Q=this.$M,lt=B.weekdays,it=B.months,gt=B.meridiem,mt=function(yt,Ft,Vt,te){return yt&&(yt[Ft]||yt(O,q))||Vt[Ft].slice(0,te)},zt=function(yt){return M.s(Y%12||12,yt,"0")},qt=gt||function(yt,Ft,Vt){var te=yt<12?"AM":"PM";return Vt?te.toLowerCase():te};return q.replace(x,(function(yt,Ft){return Ft||(function(Vt){switch(Vt){case"YY":return String(O.$y).slice(-2);case"YYYY":return M.s(O.$y,4,"0");case"M":return Q+1;case"MM":return M.s(Q+1,2,"0");case"MMM":return mt(B.monthsShort,Q,it,3);case"MMMM":return mt(it,Q);case"D":return O.$D;case"DD":return M.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return mt(B.weekdaysMin,O.$W,lt,2);case"ddd":return mt(B.weekdaysShort,O.$W,lt,3);case"dddd":return lt[O.$W];case"H":return String(Y);case"HH":return M.s(Y,2,"0");case"h":return zt(1);case"hh":return zt(2);case"a":return qt(Y,j,!0);case"A":return qt(Y,j,!1);case"m":return String(j);case"mm":return M.s(j,2,"0");case"s":return String(O.$s);case"ss":return M.s(O.$s,2,"0");case"SSS":return M.s(O.$ms,3,"0");case"Z":return H}return null})(yt)||H.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(A,O,B){var q,H=this,Y=M.p(O),j=R(A),Q=(j.utcOffset()-this.utcOffset())*i,lt=this-j,it=function(){return M.m(H,j)};switch(Y){case f:q=it()/12;break;case u:q=it();break;case d:q=it()/3;break;case h:q=(lt-Q)/6048e5;break;case c:q=(lt-Q)/864e5;break;case l:q=lt/n;break;case s:q=lt/i;break;case o:q=lt/r;break;default:q=lt}return B?q:M.a(q)},F.daysInMonth=function(){return this.endOf(u).$D},F.$locale=function(){return v[this.$L]},F.locale=function(A,O){if(!A)return this.$L;var B=this.clone(),q=E(A,O,!0);return q&&(B.$L=q),B},F.clone=function(){return M.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},L})(),D=N.prototype;return R.prototype=D,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function(L){D[L[1]]=function(F){return this.$g(F,L[0],L[1])}})),R.extend=function(L,F){return L.$i||(L(F,N,R),L.$i=!0),R},R.locale=E,R.isDayjs=$,R.unix=function(L){return R(1e3*L)},R.en=v[w],R.Ls=v,R.p={},R}))})(Bn)),Bn.exports}var W0=q0();const ru=qo(W0);var iu=Object.defineProperty,p=(e,t)=>iu(e,"name",{value:t,configurable:!0}),nu=(e,t)=>{for(var r in t)iu(e,r,{get:t[r],enumerable:!0})},Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Wo=p(function(e="fatal"){let t=Ae.fatal;typeof e=="string"?e.toLowerCase()in Ae&&(t=Ae[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=Ae.fatal&&(I.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Ae.error&&(I.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Ae.warn&&(I.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Ae.info&&(I.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Ae.debug&&(I.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Ae.trace&&(I.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=p(e=>`%c${ru().format("ss.SSS")} : ${e} : `,"format");const Mn={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 Mn.hue2rgb(a,n,e+1/3)*255;case"g":return Mn.hue2rgb(a,n,e)*255;case"b":return Mn.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}}},H0={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},j0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:Mn,lang:H0,unit:j0},We={};for(let e=0;e<=255;e++)We[e]=ot.unit.dec2hex(e);const Ot={ALL:0,RGB:1,HSL:2};class U0{constructor(){this.type=Ot.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=Ot.ALL}is(t){return this.type===t}}class G0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new U0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ot.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(Ot.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(Ot.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(Ot.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(Ot.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(Ot.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(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ot.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ot.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ot.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ot.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ot.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ot.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Sa=new G0({r:0,g:0,b:0,a:0},"transparent"),Ir={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ir.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 Sa.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?`#${We[Math.round(t)]}${We[Math.round(r)]}${We[Math.round(i)]}${We[Math.round(n*255)]}`:`#${We[Math.round(t)]}${We[Math.round(r)]}${We[Math.round(i)]}`}},ar={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(ar.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(ar.re);if(!r)return;const[,i,n,a,o,s]=r;return Sa.set({h:ar._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)}%)`}},Oi={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=Oi.colors[e];if(t)return Ir.parse(t)},stringify:e=>{const t=Ir.stringify(e);for(const r in Oi.colors)if(Oi.colors[r]===t)return r}},Ti={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(Ti.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Sa.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:Oi,hex:Ir,rgb:Ti,rgba:Ti,hsl:ar,hsla:ar},parse:e=>{if(typeof e!="string")return e;const t=Ir.parse(e)||Ti.parse(e)||ar.parse(e)||Oi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ot.HSL)||e.data.r===void 0?ar.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ti.stringify(e):Ir.stringify(e)},au=(e,t)=>{const r=de.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return de.stringify(r)},Dr=(e,t,r=0,i=1)=>{if(typeof e!="number")return au(e,{a:t});const n=Sa.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)},Y0=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)},X0=e=>Y0(e)>=.5,ii=e=>!X0(e),su=(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)=>su(e,"l",t),et=(e,t)=>su(e,"l",-t),T=(e,t)=>{const r=de.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return au(e,i)},V0=(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,_=a*m+c*b,C=o*u+h*(1-u);return Dr(x,y,_,C)},z=(e,t=100)=>{const r=de.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,V0(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:ou,setPrototypeOf:Bc,isFrozen:Z0,getPrototypeOf:K0,getOwnPropertyDescriptor:Q0}=Object;let{freeze:Yt,seal:se,create:lu}=Object,{apply:Is,construct:Ds}=typeof Reflect<"u"&&Reflect;Yt||(Yt=function(t){return t});se||(se=function(t){return t});Is||(Is=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)});Ds||(Ds=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 bn=Xt(Array.prototype.forEach),J0=Xt(Array.prototype.lastIndexOf),Mc=Xt(Array.prototype.pop),pi=Xt(Array.prototype.push),tb=Xt(Array.prototype.splice),$n=Xt(String.prototype.toLowerCase),ps=Xt(String.prototype.toString),gs=Xt(String.prototype.match),gi=Xt(String.prototype.replace),eb=Xt(String.prototype.indexOf),rb=Xt(String.prototype.trim),le=Xt(Object.prototype.hasOwnProperty),Wt=Xt(RegExp.prototype.test),mi=ib(TypeError);function Xt(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 Is(e,t,i)}}function ib(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ds(e,r)}}function ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$n;Bc&&Bc(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(Z0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function nb(e){for(let t=0;t<e.length;t++)le(e,t)||(e[t]=null);return e}function Le(e){const t=lu(null);for(const[r,i]of ou(e))le(e,r)&&(Array.isArray(i)?t[r]=nb(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Le(i):t[r]=i);return t}function yi(e,t){for(;e!==null;){const i=Q0(e,t);if(i){if(i.get)return Xt(i.get);if(typeof i.value=="function")return Xt(i.value)}e=K0(e)}function r(){return null}return r}const $c=Yt(["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"]),ms=Yt(["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"]),ys=Yt(["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"]),ab=Yt(["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"]),bs=Yt(["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"]),sb=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fc=Yt(["#text"]),Rc=Yt(["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"]),xs=Yt(["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"]),Oc=Yt(["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"]),xn=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ob=se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),lb=se(/<%[\w\W]*|[\w\W]*%>/gm),cb=se(/\$\{[\w\W]*/gm),hb=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),ub=se(/^aria-[\-\w]+$/),cu=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),db=se(/^(?:\w+script|data):/i),fb=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hu=se(/^html$/i),pb=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ic=Object.freeze({__proto__:null,ARIA_ATTR:ub,ATTR_WHITESPACE:fb,CUSTOM_ELEMENT:pb,DATA_ATTR:hb,DOCTYPE_NAME:hu,ERB_EXPR:lb,IS_ALLOWED_URI:cu,IS_SCRIPT_OR_DATA:db,MUSTACHE_EXPR:ob,TMPLIT_EXPR:cb});const bi={element:1,text:3,progressingInstruction:7,comment:8,document:9},gb=function(){return typeof window>"u"?null:window},mb=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}},Dc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gb();const t=rt=>uu(rt);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==bi.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=yi(g,"cloneNode"),b=yi(g,"remove"),x=yi(g,"nextSibling"),y=yi(g,"childNodes"),_=yi(g,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let C,w="";const{implementation:v,createNodeIterator:k,createDocumentFragment:$,getElementsByTagName:E}=r,{importNode:R}=i;let M=Dc();t.isSupported=typeof ou=="function"&&typeof _=="function"&&v&&v.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:D,TMPLIT_EXPR:L,DATA_ATTR:F,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:q}=Ic;let{IS_ALLOWED_URI:H}=Ic,Y=null;const j=ct({},[...$c,...ms,...ys,...bs,...Fc]);let Q=null;const lt=ct({},[...Rc,...xs,...Oc,...xn]);let it=Object.seal(lu(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}})),gt=null,mt=null,zt=!0,qt=!0,yt=!1,Ft=!0,Vt=!1,te=!0,Je=!1,ns=!1,as=!1,Tr=!1,un=!1,dn=!1,Vl=!0,Zl=!1;const c0="user-content-";let ss=!0,di=!1,Ar={},Er=null;const Kl=ct({},["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 Ql=null;const Jl=ct({},["audio","video","img","source","image","track"]);let os=null;const tc=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fn="http://www.w3.org/1998/Math/MathML",pn="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let Lr=ke,ls=!1,cs=null;const h0=ct({},[fn,pn,ke],ps);let gn=ct({},["mi","mo","mn","ms","mtext"]),mn=ct({},["annotation-xml"]);const u0=ct({},["title","style","font","a","script"]);let fi=null;const d0=["application/xhtml+xml","text/html"],f0="text/html";let Et=null,Br=null;const p0=r.createElement("form"),ec=function(S){return S instanceof RegExp||S instanceof Function},hs=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Br&&Br===S)){if((!S||typeof S!="object")&&(S={}),S=Le(S),fi=d0.indexOf(S.PARSER_MEDIA_TYPE)===-1?f0:S.PARSER_MEDIA_TYPE,Et=fi==="application/xhtml+xml"?ps:$n,Y=le(S,"ALLOWED_TAGS")?ct({},S.ALLOWED_TAGS,Et):j,Q=le(S,"ALLOWED_ATTR")?ct({},S.ALLOWED_ATTR,Et):lt,cs=le(S,"ALLOWED_NAMESPACES")?ct({},S.ALLOWED_NAMESPACES,ps):h0,os=le(S,"ADD_URI_SAFE_ATTR")?ct(Le(tc),S.ADD_URI_SAFE_ATTR,Et):tc,Ql=le(S,"ADD_DATA_URI_TAGS")?ct(Le(Jl),S.ADD_DATA_URI_TAGS,Et):Jl,Er=le(S,"FORBID_CONTENTS")?ct({},S.FORBID_CONTENTS,Et):Kl,gt=le(S,"FORBID_TAGS")?ct({},S.FORBID_TAGS,Et):Le({}),mt=le(S,"FORBID_ATTR")?ct({},S.FORBID_ATTR,Et):Le({}),Ar=le(S,"USE_PROFILES")?S.USE_PROFILES:!1,zt=S.ALLOW_ARIA_ATTR!==!1,qt=S.ALLOW_DATA_ATTR!==!1,yt=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vt=S.SAFE_FOR_TEMPLATES||!1,te=S.SAFE_FOR_XML!==!1,Je=S.WHOLE_DOCUMENT||!1,Tr=S.RETURN_DOM||!1,un=S.RETURN_DOM_FRAGMENT||!1,dn=S.RETURN_TRUSTED_TYPE||!1,as=S.FORCE_BODY||!1,Vl=S.SANITIZE_DOM!==!1,Zl=S.SANITIZE_NAMED_PROPS||!1,ss=S.KEEP_CONTENT!==!1,di=S.IN_PLACE||!1,H=S.ALLOWED_URI_REGEXP||cu,Lr=S.NAMESPACE||ke,gn=S.MATHML_TEXT_INTEGRATION_POINTS||gn,mn=S.HTML_INTEGRATION_POINTS||mn,it=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&ec(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(it.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&ec(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(it.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Vt&&(qt=!1),un&&(Tr=!0),Ar&&(Y=ct({},Fc),Q=[],Ar.html===!0&&(ct(Y,$c),ct(Q,Rc)),Ar.svg===!0&&(ct(Y,ms),ct(Q,xs),ct(Q,xn)),Ar.svgFilters===!0&&(ct(Y,ys),ct(Q,xs),ct(Q,xn)),Ar.mathMl===!0&&(ct(Y,bs),ct(Q,Oc),ct(Q,xn))),S.ADD_TAGS&&(Y===j&&(Y=Le(Y)),ct(Y,S.ADD_TAGS,Et)),S.ADD_ATTR&&(Q===lt&&(Q=Le(Q)),ct(Q,S.ADD_ATTR,Et)),S.ADD_URI_SAFE_ATTR&&ct(os,S.ADD_URI_SAFE_ATTR,Et),S.FORBID_CONTENTS&&(Er===Kl&&(Er=Le(Er)),ct(Er,S.FORBID_CONTENTS,Et)),ss&&(Y["#text"]=!0),Je&&ct(Y,["html","head","body"]),Y.table&&(ct(Y,["tbody"]),delete gt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw mi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw mi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=S.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else C===void 0&&(C=mb(f,n)),C!==null&&typeof w=="string"&&(w=C.createHTML(""));Yt&&Yt(S),Br=S}},rc=ct({},[...ms,...ys,...ab]),ic=ct({},[...bs,...sb]),g0=function(S){let P=_(S);(!P||!P.tagName)&&(P={namespaceURI:Lr,tagName:"template"});const J=$n(S.tagName),xt=$n(P.tagName);return cs[S.namespaceURI]?S.namespaceURI===pn?P.namespaceURI===ke?J==="svg":P.namespaceURI===fn?J==="svg"&&(xt==="annotation-xml"||gn[xt]):!!rc[J]:S.namespaceURI===fn?P.namespaceURI===ke?J==="math":P.namespaceURI===pn?J==="math"&&mn[xt]:!!ic[J]:S.namespaceURI===ke?P.namespaceURI===pn&&!mn[xt]||P.namespaceURI===fn&&!gn[xt]?!1:!ic[J]&&(u0[J]||!rc[J]):!!(fi==="application/xhtml+xml"&&cs[S.namespaceURI]):!1},pe=function(S){pi(t.removed,{element:S});try{_(S).removeChild(S)}catch{b(S)}},tr=function(S,P){try{pi(t.removed,{attribute:P.getAttributeNode(S),from:P})}catch{pi(t.removed,{attribute:null,from:P})}if(P.removeAttribute(S),S==="is")if(Tr||un)try{pe(P)}catch{}else try{P.setAttribute(S,"")}catch{}},nc=function(S){let P=null,J=null;if(as)S="<remove></remove>"+S;else{const Ct=gs(S,/^[\r\n\t ]+/);J=Ct&&Ct[0]}fi==="application/xhtml+xml"&&Lr===ke&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const xt=C?C.createHTML(S):S;if(Lr===ke)try{P=new d().parseFromString(xt,fi)}catch{}if(!P||!P.documentElement){P=v.createDocument(Lr,"template",null);try{P.documentElement.innerHTML=ls?w:xt}catch{}}const Rt=P.body||P.documentElement;return S&&J&&Rt.insertBefore(r.createTextNode(J),Rt.childNodes[0]||null),Lr===ke?E.call(P,Je?"html":"body")[0]:Je?P.documentElement:Rt},ac=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)},us=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")},sc=function(S){return typeof s=="function"&&S instanceof s};function Se(rt,S,P){bn(rt,J=>{J.call(t,S,P,Br)})}const oc=function(S){let P=null;if(Se(M.beforeSanitizeElements,S,null),us(S))return pe(S),!0;const J=Et(S.nodeName);if(Se(M.uponSanitizeElement,S,{tagName:J,allowedTags:Y}),te&&S.hasChildNodes()&&!sc(S.firstElementChild)&&Wt(/<[/\w!]/g,S.innerHTML)&&Wt(/<[/\w!]/g,S.textContent)||S.nodeType===bi.progressingInstruction||te&&S.nodeType===bi.comment&&Wt(/<[/\w]/g,S.data))return pe(S),!0;if(!Y[J]||gt[J]){if(!gt[J]&&cc(J)&&(it.tagNameCheck instanceof RegExp&&Wt(it.tagNameCheck,J)||it.tagNameCheck instanceof Function&&it.tagNameCheck(J)))return!1;if(ss&&!Er[J]){const xt=_(S)||S.parentNode,Rt=y(S)||S.childNodes;if(Rt&&xt){const Ct=Rt.length;for(let Zt=Ct-1;Zt>=0;--Zt){const Te=m(Rt[Zt],!0);Te.__removalCount=(S.__removalCount||0)+1,xt.insertBefore(Te,x(S))}}}return pe(S),!0}return S instanceof l&&!g0(S)||(J==="noscript"||J==="noembed"||J==="noframes")&&Wt(/<\/no(script|embed|frames)/i,S.innerHTML)?(pe(S),!0):(Vt&&S.nodeType===bi.text&&(P=S.textContent,bn([N,D,L],xt=>{P=gi(P,xt," ")}),S.textContent!==P&&(pi(t.removed,{element:S.cloneNode()}),S.textContent=P)),Se(M.afterSanitizeElements,S,null),!1)},lc=function(S,P,J){if(Vl&&(P==="id"||P==="name")&&(J in r||J in p0))return!1;if(!(qt&&!mt[P]&&Wt(F,P))){if(!(zt&&Wt(A,P))){if(!Q[P]||mt[P]){if(!(cc(S)&&(it.tagNameCheck instanceof RegExp&&Wt(it.tagNameCheck,S)||it.tagNameCheck instanceof Function&&it.tagNameCheck(S))&&(it.attributeNameCheck instanceof RegExp&&Wt(it.attributeNameCheck,P)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(P,S))||P==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Wt(it.tagNameCheck,J)||it.tagNameCheck instanceof Function&&it.tagNameCheck(J))))return!1}else if(!os[P]){if(!Wt(H,gi(J,B,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&S!=="script"&&eb(J,"data:")===0&&Ql[S])){if(!(yt&&!Wt(O,gi(J,B,"")))){if(J)return!1}}}}}}return!0},cc=function(S){return S!=="annotation-xml"&&gs(S,q)},hc=function(S){Se(M.beforeSanitizeAttributes,S,null);const{attributes:P}=S;if(!P||us(S))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let xt=P.length;for(;xt--;){const Rt=P[xt],{name:Ct,namespaceURI:Zt,value:Te}=Rt,Mr=Et(Ct),ds=Te;let Lt=Ct==="value"?ds:rb(ds);if(J.attrName=Mr,J.attrValue=Lt,J.keepAttr=!0,J.forceKeepAttr=void 0,Se(M.uponSanitizeAttribute,S,J),Lt=J.attrValue,Zl&&(Mr==="id"||Mr==="name")&&(tr(Ct,S),Lt=c0+Lt),te&&Wt(/((--!?|])>)|<\/(style|title|textarea)/i,Lt)){tr(Ct,S);continue}if(Mr==="attributename"&&gs(Lt,"href")){tr(Ct,S);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){tr(Ct,S);continue}if(!Ft&&Wt(/\/>/i,Lt)){tr(Ct,S);continue}Vt&&bn([N,D,L],dc=>{Lt=gi(Lt,dc," ")});const uc=Et(S.nodeName);if(!lc(uc,Mr,Lt)){tr(Ct,S);continue}if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Zt)switch(f.getAttributeType(uc,Mr)){case"TrustedHTML":{Lt=C.createHTML(Lt);break}case"TrustedScriptURL":{Lt=C.createScriptURL(Lt);break}}if(Lt!==ds)try{Zt?S.setAttributeNS(Zt,Ct,Lt):S.setAttribute(Ct,Lt),us(S)?pe(S):Mc(t.removed)}catch{tr(Ct,S)}}Se(M.afterSanitizeAttributes,S,null)},m0=function rt(S){let P=null;const J=ac(S);for(Se(M.beforeSanitizeShadowDOM,S,null);P=J.nextNode();)Se(M.uponSanitizeShadowNode,P,null),oc(P),hc(P),P.content instanceof a&&rt(P.content);Se(M.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(rt){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,J=null,xt=null,Rt=null;if(ls=!rt,ls&&(rt="<!-->"),typeof rt!="string"&&!sc(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw mi("dirty is not a string, aborting")}else throw mi("toString is not a function");if(!t.isSupported)return rt;if(ns||hs(S),t.removed=[],typeof rt=="string"&&(di=!1),di){if(rt.nodeName){const Te=Et(rt.nodeName);if(!Y[Te]||gt[Te])throw mi("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof s)P=nc("<!---->"),J=P.ownerDocument.importNode(rt,!0),J.nodeType===bi.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?P=J:P.appendChild(J);else{if(!Tr&&!Vt&&!Je&&rt.indexOf("<")===-1)return C&&dn?C.createHTML(rt):rt;if(P=nc(rt),!P)return Tr?null:dn?w:""}P&&as&&pe(P.firstChild);const Ct=ac(di?rt:P);for(;xt=Ct.nextNode();)oc(xt),hc(xt),xt.content instanceof a&&m0(xt.content);if(di)return rt;if(Tr){if(un)for(Rt=$.call(P.ownerDocument);P.firstChild;)Rt.appendChild(P.firstChild);else Rt=P;return(Q.shadowroot||Q.shadowrootmode)&&(Rt=R.call(i,Rt,!0)),Rt}let Zt=Je?P.outerHTML:P.innerHTML;return Je&&Y["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&Wt(hu,P.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
52
- `+Zt),Vt&&bn([N,D,L],Te=>{Zt=gi(Zt,Te," ")}),C&&dn?C.createHTML(Zt):Zt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hs(rt),ns=!0},t.clearConfig=function(){Br=null,ns=!1},t.isValidAttribute=function(rt,S,P){Br||hs({});const J=Et(rt),xt=Et(S);return lc(J,xt,P)},t.addHook=function(rt,S){typeof S=="function"&&pi(M[rt],S)},t.removeHook=function(rt,S){if(S!==void 0){const P=J0(M[rt],S);return P===-1?void 0:tb(M[rt],P,1)[0]}return Mc(M[rt])},t.removeHooks=function(rt){M[rt]=[]},t.removeAllHooks=function(){M=Dc()},t}var Xr=uu(),du=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ii=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,yb=/\s*%%.*\n/gm,zr,fu=(zr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(zr,"UnknownDiagramError"),zr),dr={},Ho=p(function(e,t){e=e.replace(du,"").replace(Ii,"").replace(yb,`
53
- `);for(const[r,{detector:i}]of Object.entries(dr))if(i(e,t))return r;throw new fu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ns=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)pu(t,r,i)},"registerLazyLoadedDiagrams"),pu=p((e,t,r)=>{dr[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),dr[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),bb=p(e=>dr[e].loader,"getDiagramLoader"),Ps=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=>Ps(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]=Ps(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=Ps,Ta="#ffffff",Aa="#f2f2f2",Ht=p((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),qr,xb=(qr=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||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||z(this.tertiaryColor),this.lineColor=this.lineColor||z(this.background),this.arrowheadColor=this.arrowheadColor||z(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?et(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||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||z(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||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||z(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]||et(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]||T(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||T(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||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(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||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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?et(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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(qr,"Theme"),qr),_b=p(e=>{const t=new xb;return t.calculate(e),t},"getThemeVariables"),Wr,wb=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=z(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Dr(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=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=Dr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Dr(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||et(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(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]||T(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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?et(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||T(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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(Wr,"Theme"),Wr),Cb=p(e=>{const t=new wb;return t.calculate(e),t},"getThemeVariables"),Hr,vb=(Hr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(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=Dr(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||T(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||T(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||T(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||z(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||z(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(z(this.git0),25),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(Hr,"Theme"),Hr),gu=p(e=>{const t=new vb;return t.calculate(e),t},"getThemeVariables"),jr,kb=(jr=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=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.primaryColor),this.lineColor=z(this.background),this.textColor=z(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=et(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||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||T(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]||T(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||T(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(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]||z(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]||et(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]||T(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||T(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=et(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=et(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=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(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||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(Ur,"Theme"),Ur),Ab=p(e=>{const t=new Tb;return t.calculate(e),t},"getThemeVariables"),Oe={base:{getThemeVariables:_b},dark:{getThemeVariables:Cb},default:{getThemeVariables:gu},forest:{getThemeVariables:Sb},neutral:{getThemeVariables:Ab}},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},mu={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Oe.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:","}},yu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...yu(e[i],"")]:[...r,t+i],[]),"keyify"),Eb=new Set(yu(mu,"")),jo=mu,jn=p(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>jn(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Eb.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){I.debug("sanitizing object",t),jn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Lb(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]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Lb=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"),Vr=Object.freeze(jo),Qt=kt({},Vr),Un,fr=[],Di=kt({},Vr),Ea=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 Oe){const n=kt({},Un),a=kt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Oe&&(r.themeVariables=Oe[r.theme].getThemeVariables(a))}return Di=r,wu(Di),Di},"updateCurrentConfig"),Bb=p(e=>(Qt=kt({},Vr),Qt=kt(Qt,e),e.theme&&Oe[e.theme]&&(Qt.themeVariables=Oe[e.theme].getThemeVariables(e.themeVariables)),Ea(Qt,fr),Qt),"setSiteConfig"),Mb=p(e=>{Un=kt({},e)},"saveConfigFromInitialize"),$b=p(e=>(Qt=kt(Qt,e),Ea(Qt,fr),Qt),"updateSiteConfig"),bu=p(()=>kt({},Qt),"getSiteConfig"),xu=p(e=>(wu(e),kt(Di,e),$t()),"setConfig"),$t=p(()=>kt({},Di),"getConfig"),_u=p(e=>{e&&(["secure",...Qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.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"),Fb=p(e=>{jn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fr.push(e),Ea(Qt,fr)},"addDirective"),Gn=p((e=Qt)=>{fr=[],Ea(e,fr)},"reset"),Rb={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Nc={},Ob=p(e=>{Nc[e]||(I.warn(Rb[e]),Nc[e]=!0)},"issueWarning"),wu=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ob("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ib=p(()=>{let e={};Un&&(e=kt(e,Un));for(const t of fr)e=kt(e,t);return e},"getUserDefinedConfig"),ni=/<br\s*\/?>/gi,Db=p(e=>e?ku(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Nb=(()=>{let e=!1;return()=>{e||(Cu(),e=!0)}})();function Cu(){const e="data-temp-href-target";Xr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Xr.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 vu=p(e=>(Nb(),Xr.sanitize(e)),"removeScript"),Pc=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=vu(e):r!=="loose"&&(e=ku(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Wb(e))}return e},"sanitizeMore"),re=p((e,t)=>e&&(t.dompurifyConfig?e=Xr.sanitize(Pc(e,t),t.dompurifyConfig).toString():e=Xr.sanitize(Pc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Pb=p((e,t)=>typeof e=="string"?re(e,t):e.flat().map(r=>re(r,t)),"sanitizeTextOrArray"),zb=p(e=>ni.test(e),"hasBreaks"),qb=p(e=>e.split(ni),"splitBreaks"),Wb=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ku=p(e=>e.replace(ni,"#br#"),"breakToPlaceholder"),Su=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"),Hb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),jb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zs=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];Ub(a,o)&&(n=a+","+o,i++,r.pop())}r.push(Gb(n))}return r.join("")},"parseGenericTypes"),qs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Ub=p((e,t)=>{const r=qs(e,"~"),i=qs(t,"~");return r===1&&i===1},"shouldCombineSets"),Gb=p(e=>{const t=qs(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"),zc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ws=/\$\$(.*)\$\$/g,pr=p(e=>(e.match(Ws)?.length??0)>0,"hasKatex"),Yb=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await La(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"),Xb=p(async(e,t)=>{if(!pr(e))return e;if(!(zc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ws,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DEiiRhcn.cjs")),i=t.forceLegacyMathML||!zc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ni).map(n=>pr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Ws,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),La=p(async(e,t)=>re(await Xb(e,t),t),"renderKatexSanitized"),_r={getRows:Db,sanitizeText:re,sanitizeTextOrArray:Pb,hasBreaks:zb,splitBreaks:qb,lineBreakRegex:ni,removeScript:vu,getUrl:Su,evaluate:St,getMax:Hb,getMin:jb},Vb=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Zb=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"),Uo=p(function(e,t,r,i){const n=Zb(t,r,i);Vb(e,n)},"configureSvgSize"),Tu=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;I.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;I.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,I.info(`Calculated bounds: ${s}x${l}`),Uo(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"),Fn={},Kb=p((e,t,r)=>{let i="";return e in Fn&&Fn[e]?i=Fn[e](r):I.warn(`No theme found for ${e}`),` & {
51
+ `;return t.code.toLowerCase().includes("</body>")?t.code.replace("</body>",`${T}</body>`):t.code+T}),$=()=>{},I=T=>{if(T.data&&T.data.type==="iframe-height"&&T.data.iframeId===g){const M=T.data.height,E=Math.max(100,Math.min(1e3,M));a.value=`${E}px`}},D=T=>{T.key==="Escape"&&l.value&&L()};return N.onMounted(()=>{window.addEventListener("message",I),window.addEventListener("keydown",D)}),N.onUnmounted(()=>{window.removeEventListener("message",I),window.removeEventListener("keydown",D),document.body.style.overflow=""}),(T,M)=>(N.openBlock(),N.createElementBlock("div",{class:N.normalizeClass(["code-block-wrapper",{fullscreen:l.value}]),"data-lang":e.language},[(N.openBlock(),N.createBlock(N.Teleport,{to:"body"},[h.value?(N.openBlock(),N.createElementBlock("div",{key:0,class:"code-block-tooltip",style:N.normalizeStyle({left:u.value,top:d.value})},N.toDisplayString(c.value),5)):N.createCommentVNode("",!0)])),N.createElementVNode("div",Ay,[N.createElementVNode("span",Ey,N.toDisplayString(e.language.toUpperCase()),1),N.createElementVNode("div",Ly,[N.createElementVNode("button",{class:"copy-code-button",type:"button",title:"复制代码",onClick:C,innerHTML:Fy}),m()&&!i.value?(N.openBlock(),N.createElementBlock("button",{key:0,class:"preview-html-button",type:"button",title:"预览 HTML",onClick:w,innerHTML:Ry})):N.createCommentVNode("",!0),m()&&e.publishUrl?(N.openBlock(),N.createElementBlock("button",{key:1,class:"publish-html-button",disabled:o.value,type:"button",title:f.value,onClick:k,innerHTML:Iy},null,8,By)):N.createCommentVNode("",!0),l.value?N.createCommentVNode("",!0):(N.openBlock(),N.createElementBlock("button",{key:2,class:"fullscreen-button",type:"button",title:"全屏",onClick:B,innerHTML:Dy})),l.value?(N.openBlock(),N.createElementBlock("button",{key:3,class:"exit-fullscreen-button",type:"button",title:"退出全屏",onClick:L,innerHTML:Ny})):N.createCommentVNode("",!0),i.value?(N.openBlock(),N.createElementBlock("button",{key:4,class:"close-preview-button",type:"button",title:"关闭预览",onClick:_,innerHTML:Oy})):N.createCommentVNode("",!0)])]),N.withDirectives(N.createElementVNode("pre",{class:N.normalizeClass(`language-${e.language}`)},[N.createElementVNode("code",{class:N.normalizeClass(`language-${e.language}`),innerHTML:x.value},null,10,My)],2),[[N.vShow,!i.value]]),i.value?(N.openBlock(),N.createElementBlock("div",{key:0,class:"iframe-wrapper",style:N.normalizeStyle({height:a.value})},[N.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,$y)],4)):N.createCommentVNode("",!0)],10,Ty))}}),ka=(e,t)=>{const r=e.__vccOpts||e;for(const[i,n]of t)r[i]=n;return r},zy=ka(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 N.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 N.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 Os={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"}},Bn={exports:{}},Wy=Bn.exports,Lc;function jy(){return Lc||(Lc=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(T){var M=["th","st","nd","rd"],E=T%100;return"["+T+(M[(E-20)%10]||M[E]||M[0])+"]"}},w=function(T,M,E){var R=String(T);return!R||R.length>=M?T:""+Array(M+1-R.length).join(E)+T},_={s:w,z:function(T){var M=-T.utcOffset(),E=Math.abs(M),R=Math.floor(E/60),F=E%60;return(M<=0?"+":"-")+w(R,2,"0")+":"+w(F,2,"0")},m:function T(M,E){if(M.date()<E.date())return-T(E,M);var R=12*(E.year()-M.year())+(E.month()-M.month()),F=M.clone().add(R,u),q=E-F<0,j=M.clone().add(R+(q?-1:1),u);return+(-(R+(E-F)/(q?F-j:j-F))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:u,y:f,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:d}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},v="en",C={};C[v]=y;var k="$isDayjsObject",B=function(T){return T instanceof I||!(!T||!T[k])},L=function T(M,E,R){var F;if(!M)return v;if(typeof M=="string"){var q=M.toLowerCase();C[q]&&(F=q),E&&(C[q]=E,F=q);var j=M.split("-");if(!F&&j.length>1)return T(j[0])}else{var Y=M.name;C[Y]=M,F=Y}return!R&&F&&(v=F),F||!R&&v},O=function(T,M){if(B(T))return T.clone();var E=typeof M=="object"?M:{};return E.date=T,E.args=arguments,new I(E)},$=_;$.l=L,$.i=B,$.w=function(T,M){return O(T,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var I=(function(){function T(E){this.$L=L(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[k]=!0}var M=T.prototype;return M.parse=function(E){this.$d=(function(R){var F=R.date,q=R.utc;if(F===null)return new Date(NaN);if($.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var j=F.match(b);if(j){var Y=j[2]-1||0,U=(j[7]||"0").substring(0,3);return q?new Date(Date.UTC(j[1],Y,j[3]||1,j[4]||0,j[5]||0,j[6]||0,U)):new Date(j[1],Y,j[3]||1,j[4]||0,j[5]||0,j[6]||0,U)}}return new Date(F)})(E),this.init()},M.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},M.$utils=function(){return $},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(E,R){var F=O(E);return this.startOf(R)<=F&&F<=this.endOf(R)},M.isAfter=function(E,R){return O(E)<this.startOf(R)},M.isBefore=function(E,R){return this.endOf(R)<O(E)},M.$g=function(E,R,F){return $.u(E)?this[R]:this.set(F,E)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(E,R){var F=this,q=!!$.u(R)||R,j=$.p(E),Y=function(qt,yt){var Ft=$.w(F.$u?Date.UTC(F.$y,yt,qt):new Date(F.$y,yt,qt),F);return q?Ft:Ft.endOf(c)},U=function(qt,yt){return $.w(F.toDate()[qt].apply(F.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(yt)),F)},Q=this.$W,lt=this.$M,it=this.$D,gt="set"+(this.$u?"UTC":"");switch(j){case f:return q?Y(1,0):Y(31,11);case u:return q?Y(1,lt):Y(0,lt+1);case h:var mt=this.$locale().weekStart||0,zt=(Q<mt?Q+7:Q)-mt;return Y(q?it-zt:it+(6-zt),lt);case c:case g:return U(gt+"Hours",0);case l:return U(gt+"Minutes",1);case s:return U(gt+"Seconds",2);case o:return U(gt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(E){return this.startOf(E,!1)},M.$set=function(E,R){var F,q=$.p(E),j="set"+(this.$u?"UTC":""),Y=(F={},F[c]=j+"Date",F[g]=j+"Date",F[u]=j+"Month",F[f]=j+"FullYear",F[l]=j+"Hours",F[s]=j+"Minutes",F[o]=j+"Seconds",F[a]=j+"Milliseconds",F)[q],U=q===c?this.$D+(R-this.$W):R;if(q===u||q===f){var Q=this.clone().set(g,1);Q.$d[Y](U),Q.init(),this.$d=Q.set(g,Math.min(this.$D,Q.daysInMonth())).$d}else Y&&this.$d[Y](U);return this.init(),this},M.set=function(E,R){return this.clone().$set(E,R)},M.get=function(E){return this[$.p(E)]()},M.add=function(E,R){var F,q=this;E=Number(E);var j=$.p(R),Y=function(lt){var it=O(q);return $.w(it.date(it.date()+Math.round(lt*E)),q)};if(j===u)return this.set(u,this.$M+E);if(j===f)return this.set(f,this.$y+E);if(j===c)return Y(1);if(j===h)return Y(7);var U=(F={},F[s]=i,F[l]=n,F[o]=r,F)[j]||1,Q=this.$d.getTime()+E*U;return $.w(Q,this)},M.subtract=function(E,R){return this.add(-1*E,R)},M.format=function(E){var R=this,F=this.$locale();if(!this.isValid())return F.invalidDate||m;var q=E||"YYYY-MM-DDTHH:mm:ssZ",j=$.z(this),Y=this.$H,U=this.$m,Q=this.$M,lt=F.weekdays,it=F.months,gt=F.meridiem,mt=function(yt,Ft,Xt,te){return yt&&(yt[Ft]||yt(R,q))||Xt[Ft].slice(0,te)},zt=function(yt){return $.s(Y%12||12,yt,"0")},qt=gt||function(yt,Ft,Xt){var te=yt<12?"AM":"PM";return Xt?te.toLowerCase():te};return q.replace(x,(function(yt,Ft){return Ft||(function(Xt){switch(Xt){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return Q+1;case"MM":return $.s(Q+1,2,"0");case"MMM":return mt(F.monthsShort,Q,it,3);case"MMMM":return mt(it,Q);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return mt(F.weekdaysMin,R.$W,lt,2);case"ddd":return mt(F.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 zt(1);case"hh":return zt(2);case"a":return qt(Y,U,!0);case"A":return qt(Y,U,!1);case"m":return String(U);case"mm":return $.s(U,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 j}return null})(yt)||j.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(E,R,F){var q,j=this,Y=$.p(R),U=O(E),Q=(U.utcOffset()-this.utcOffset())*i,lt=this-U,it=function(){return $.m(j,U)};switch(Y){case f:q=it()/12;break;case u:q=it();break;case d:q=it()/3;break;case h:q=(lt-Q)/6048e5;break;case c:q=(lt-Q)/864e5;break;case l:q=lt/n;break;case s:q=lt/i;break;case o:q=lt/r;break;default:q=lt}return F?q:$.a(q)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return C[this.$L]},M.locale=function(E,R){if(!E)return this.$L;var F=this.clone(),q=L(E,R,!0);return q&&(F.$L=q),F},M.clone=function(){return $.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},T})(),D=I.prototype;return O.prototype=D,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function(T){D[T[1]]=function(M){return this.$g(M,T[0],T[1])}})),O.extend=function(T,M){return T.$i||(T(M,I,O),T.$i=!0),O},O.locale=L,O.isDayjs=B,O.unix=function(T){return O(1e3*T)},O.en=C[v],O.Ls=C,O.p={},O}))})(Bn)),Bn.exports}var Uy=jy();const ru=qo(Uy);var iu=Object.defineProperty,p=(e,t)=>iu(e,"name",{value:t,configurable:!0}),nu=(e,t)=>{for(var r in t)iu(e,r,{get:t[r],enumerable:!0})},Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Ho=p(function(e="fatal"){let t=Ae.fatal;typeof e=="string"?e.toLowerCase()in Ae&&(t=Ae[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Ae.fatal&&(P.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Ae.error&&(P.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Ae.warn&&(P.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Ae.info&&(P.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Ae.debug&&(P.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Ae.trace&&(P.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=p(e=>`%c${ru().format("ss.SSS")} : ${e} : `,"format");const Mn={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 Mn.hue2rgb(a,n,e+1/3)*255;case"g":return Mn.hue2rgb(a,n,e)*255;case"b":return Mn.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},Yy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ot={channel:Mn,lang:Gy,unit:Yy},He={};for(let e=0;e<=255;e++)He[e]=ot.unit.dec2hex(e);const Ot={ALL:0,RGB:1,HSL:2};class Vy{constructor(){this.type=Ot.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=Ot.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=Ot.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(Ot.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(Ot.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(Ot.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(Ot.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(Ot.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(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ot.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ot.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ot.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ot.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ot.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ot.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Sa=new Xy({r:0,g:0,b:0,a:0},"transparent"),Ir={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ir.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 Sa.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?`#${He[Math.round(t)]}${He[Math.round(r)]}${He[Math.round(i)]}${He[Math.round(n*255)]}`:`#${He[Math.round(t)]}${He[Math.round(r)]}${He[Math.round(i)]}`}},ar={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(ar.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(ar.re);if(!r)return;const[,i,n,a,o,s]=r;return Sa.set({h:ar._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)}%)`}},Oi={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=Oi.colors[e];if(t)return Ir.parse(t)},stringify:e=>{const t=Ir.stringify(e);for(const r in Oi.colors)if(Oi.colors[r]===t)return r}},Ti={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(Ti.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Sa.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:Oi,hex:Ir,rgb:Ti,rgba:Ti,hsl:ar,hsla:ar},parse:e=>{if(typeof e!="string")return e;const t=Ir.parse(e)||Ti.parse(e)||ar.parse(e)||Oi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ot.HSL)||e.data.r===void 0?ar.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ti.stringify(e):Ir.stringify(e)},au=(e,t)=>{const r=de.parse(e);for(const i in t)r[i]=ot.channel.clamp[i](t[i]);return de.stringify(r)},Dr=(e,t,r=0,i=1)=>{if(typeof e!="number")return au(e,{a:t});const n=Sa.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,ii=e=>!Ky(e),su=(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)=>su(e,"l",t),et=(e,t)=>su(e,"l",-t),A=(e,t)=>{const r=de.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return au(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,w=a*m+c*b,_=o*u+h*(1-u);return Dr(x,y,w,_)},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:ou,setPrototypeOf:Bc,isFrozen:Jy,getPrototypeOf:tb,getOwnPropertyDescriptor:eb}=Object;let{freeze:Yt,seal:se,create:lu}=Object,{apply:Is,construct:Ds}=typeof Reflect<"u"&&Reflect;Yt||(Yt=function(t){return t});se||(se=function(t){return t});Is||(Is=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)});Ds||(Ds=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 bn=Vt(Array.prototype.forEach),rb=Vt(Array.prototype.lastIndexOf),Mc=Vt(Array.prototype.pop),pi=Vt(Array.prototype.push),ib=Vt(Array.prototype.splice),$n=Vt(String.prototype.toLowerCase),ps=Vt(String.prototype.toString),gs=Vt(String.prototype.match),gi=Vt(String.prototype.replace),nb=Vt(String.prototype.indexOf),ab=Vt(String.prototype.trim),le=Vt(Object.prototype.hasOwnProperty),Ht=Vt(RegExp.prototype.test),mi=sb(TypeError);function Vt(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 Is(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 Ds(e,r)}}function ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$n;Bc&&Bc(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 Le(e){const t=lu(null);for(const[r,i]of ou(e))le(e,r)&&(Array.isArray(i)?t[r]=ob(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Le(i):t[r]=i);return t}function yi(e,t){for(;e!==null;){const i=eb(e,t);if(i){if(i.get)return Vt(i.get);if(typeof i.value=="function")return Vt(i.value)}e=tb(e)}function r(){return null}return r}const $c=Yt(["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"]),ms=Yt(["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"]),ys=Yt(["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=Yt(["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"]),bs=Yt(["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=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fc=Yt(["#text"]),Rc=Yt(["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"]),xs=Yt(["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"]),Oc=Yt(["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"]),xn=Yt(["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]+$/),cu=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),hu=se(/^html$/i),yb=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ic=Object.freeze({__proto__:null,ARIA_ATTR:pb,ATTR_WHITESPACE:mb,CUSTOM_ELEMENT:yb,DATA_ATTR:fb,DOCTYPE_NAME:hu,ERB_EXPR:ub,IS_ALLOWED_URI:cu,IS_SCRIPT_OR_DATA:gb,MUSTACHE_EXPR:hb,TMPLIT_EXPR:db});const bi={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}},Dc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function uu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bb();const t=rt=>uu(rt);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==bi.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=yi(g,"cloneNode"),b=yi(g,"remove"),x=yi(g,"nextSibling"),y=yi(g,"childNodes"),w=yi(g,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let _,v="";const{implementation:C,createNodeIterator:k,createDocumentFragment:B,getElementsByTagName:L}=r,{importNode:O}=i;let $=Dc();t.isSupported=typeof ou=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:I,ERB_EXPR:D,TMPLIT_EXPR:T,DATA_ATTR:M,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:q}=Ic;let{IS_ALLOWED_URI:j}=Ic,Y=null;const U=ct({},[...$c,...ms,...ys,...bs,...Fc]);let Q=null;const lt=ct({},[...Rc,...xs,...Oc,...xn]);let it=Object.seal(lu(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}})),gt=null,mt=null,zt=!0,qt=!0,yt=!1,Ft=!0,Xt=!1,te=!0,Je=!1,ns=!1,as=!1,Tr=!1,un=!1,dn=!1,Xl=!0,Zl=!1;const cy="user-content-";let ss=!0,di=!1,Ar={},Er=null;const Kl=ct({},["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 Ql=null;const Jl=ct({},["audio","video","img","source","image","track"]);let os=null;const tc=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fn="http://www.w3.org/1998/Math/MathML",pn="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let Lr=ke,ls=!1,cs=null;const hy=ct({},[fn,pn,ke],ps);let gn=ct({},["mi","mo","mn","ms","mtext"]),mn=ct({},["annotation-xml"]);const uy=ct({},["title","style","font","a","script"]);let fi=null;const dy=["application/xhtml+xml","text/html"],fy="text/html";let Et=null,Br=null;const py=r.createElement("form"),ec=function(S){return S instanceof RegExp||S instanceof Function},hs=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Br&&Br===S)){if((!S||typeof S!="object")&&(S={}),S=Le(S),fi=dy.indexOf(S.PARSER_MEDIA_TYPE)===-1?fy:S.PARSER_MEDIA_TYPE,Et=fi==="application/xhtml+xml"?ps:$n,Y=le(S,"ALLOWED_TAGS")?ct({},S.ALLOWED_TAGS,Et):U,Q=le(S,"ALLOWED_ATTR")?ct({},S.ALLOWED_ATTR,Et):lt,cs=le(S,"ALLOWED_NAMESPACES")?ct({},S.ALLOWED_NAMESPACES,ps):hy,os=le(S,"ADD_URI_SAFE_ATTR")?ct(Le(tc),S.ADD_URI_SAFE_ATTR,Et):tc,Ql=le(S,"ADD_DATA_URI_TAGS")?ct(Le(Jl),S.ADD_DATA_URI_TAGS,Et):Jl,Er=le(S,"FORBID_CONTENTS")?ct({},S.FORBID_CONTENTS,Et):Kl,gt=le(S,"FORBID_TAGS")?ct({},S.FORBID_TAGS,Et):Le({}),mt=le(S,"FORBID_ATTR")?ct({},S.FORBID_ATTR,Et):Le({}),Ar=le(S,"USE_PROFILES")?S.USE_PROFILES:!1,zt=S.ALLOW_ARIA_ATTR!==!1,qt=S.ALLOW_DATA_ATTR!==!1,yt=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xt=S.SAFE_FOR_TEMPLATES||!1,te=S.SAFE_FOR_XML!==!1,Je=S.WHOLE_DOCUMENT||!1,Tr=S.RETURN_DOM||!1,un=S.RETURN_DOM_FRAGMENT||!1,dn=S.RETURN_TRUSTED_TYPE||!1,as=S.FORCE_BODY||!1,Xl=S.SANITIZE_DOM!==!1,Zl=S.SANITIZE_NAMED_PROPS||!1,ss=S.KEEP_CONTENT!==!1,di=S.IN_PLACE||!1,j=S.ALLOWED_URI_REGEXP||cu,Lr=S.NAMESPACE||ke,gn=S.MATHML_TEXT_INTEGRATION_POINTS||gn,mn=S.HTML_INTEGRATION_POINTS||mn,it=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&ec(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(it.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&ec(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(it.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xt&&(qt=!1),un&&(Tr=!0),Ar&&(Y=ct({},Fc),Q=[],Ar.html===!0&&(ct(Y,$c),ct(Q,Rc)),Ar.svg===!0&&(ct(Y,ms),ct(Q,xs),ct(Q,xn)),Ar.svgFilters===!0&&(ct(Y,ys),ct(Q,xs),ct(Q,xn)),Ar.mathMl===!0&&(ct(Y,bs),ct(Q,Oc),ct(Q,xn))),S.ADD_TAGS&&(Y===U&&(Y=Le(Y)),ct(Y,S.ADD_TAGS,Et)),S.ADD_ATTR&&(Q===lt&&(Q=Le(Q)),ct(Q,S.ADD_ATTR,Et)),S.ADD_URI_SAFE_ATTR&&ct(os,S.ADD_URI_SAFE_ATTR,Et),S.FORBID_CONTENTS&&(Er===Kl&&(Er=Le(Er)),ct(Er,S.FORBID_CONTENTS,Et)),ss&&(Y["#text"]=!0),Je&&ct(Y,["html","head","body"]),Y.table&&(ct(Y,["tbody"]),delete gt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw mi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw mi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=S.TRUSTED_TYPES_POLICY,v=_.createHTML("")}else _===void 0&&(_=xb(f,n)),_!==null&&typeof v=="string"&&(v=_.createHTML(""));Yt&&Yt(S),Br=S}},rc=ct({},[...ms,...ys,...lb]),ic=ct({},[...bs,...cb]),gy=function(S){let z=w(S);(!z||!z.tagName)&&(z={namespaceURI:Lr,tagName:"template"});const J=$n(S.tagName),xt=$n(z.tagName);return cs[S.namespaceURI]?S.namespaceURI===pn?z.namespaceURI===ke?J==="svg":z.namespaceURI===fn?J==="svg"&&(xt==="annotation-xml"||gn[xt]):!!rc[J]:S.namespaceURI===fn?z.namespaceURI===ke?J==="math":z.namespaceURI===pn?J==="math"&&mn[xt]:!!ic[J]:S.namespaceURI===ke?z.namespaceURI===pn&&!mn[xt]||z.namespaceURI===fn&&!gn[xt]?!1:!ic[J]&&(uy[J]||!rc[J]):!!(fi==="application/xhtml+xml"&&cs[S.namespaceURI]):!1},pe=function(S){pi(t.removed,{element:S});try{w(S).removeChild(S)}catch{b(S)}},tr=function(S,z){try{pi(t.removed,{attribute:z.getAttributeNode(S),from:z})}catch{pi(t.removed,{attribute:null,from:z})}if(z.removeAttribute(S),S==="is")if(Tr||un)try{pe(z)}catch{}else try{z.setAttribute(S,"")}catch{}},nc=function(S){let z=null,J=null;if(as)S="<remove></remove>"+S;else{const _t=gs(S,/^[\r\n\t ]+/);J=_t&&_t[0]}fi==="application/xhtml+xml"&&Lr===ke&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const xt=_?_.createHTML(S):S;if(Lr===ke)try{z=new d().parseFromString(xt,fi)}catch{}if(!z||!z.documentElement){z=C.createDocument(Lr,"template",null);try{z.documentElement.innerHTML=ls?v:xt}catch{}}const Rt=z.body||z.documentElement;return S&&J&&Rt.insertBefore(r.createTextNode(J),Rt.childNodes[0]||null),Lr===ke?L.call(z,Je?"html":"body")[0]:Je?z.documentElement:Rt},ac=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)},us=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")},sc=function(S){return typeof s=="function"&&S instanceof s};function Se(rt,S,z){bn(rt,J=>{J.call(t,S,z,Br)})}const oc=function(S){let z=null;if(Se($.beforeSanitizeElements,S,null),us(S))return pe(S),!0;const J=Et(S.nodeName);if(Se($.uponSanitizeElement,S,{tagName:J,allowedTags:Y}),te&&S.hasChildNodes()&&!sc(S.firstElementChild)&&Ht(/<[/\w!]/g,S.innerHTML)&&Ht(/<[/\w!]/g,S.textContent)||S.nodeType===bi.progressingInstruction||te&&S.nodeType===bi.comment&&Ht(/<[/\w]/g,S.data))return pe(S),!0;if(!Y[J]||gt[J]){if(!gt[J]&&cc(J)&&(it.tagNameCheck instanceof RegExp&&Ht(it.tagNameCheck,J)||it.tagNameCheck instanceof Function&&it.tagNameCheck(J)))return!1;if(ss&&!Er[J]){const xt=w(S)||S.parentNode,Rt=y(S)||S.childNodes;if(Rt&&xt){const _t=Rt.length;for(let Zt=_t-1;Zt>=0;--Zt){const Te=m(Rt[Zt],!0);Te.__removalCount=(S.__removalCount||0)+1,xt.insertBefore(Te,x(S))}}}return pe(S),!0}return S instanceof l&&!gy(S)||(J==="noscript"||J==="noembed"||J==="noframes")&&Ht(/<\/no(script|embed|frames)/i,S.innerHTML)?(pe(S),!0):(Xt&&S.nodeType===bi.text&&(z=S.textContent,bn([I,D,T],xt=>{z=gi(z,xt," ")}),S.textContent!==z&&(pi(t.removed,{element:S.cloneNode()}),S.textContent=z)),Se($.afterSanitizeElements,S,null),!1)},lc=function(S,z,J){if(Xl&&(z==="id"||z==="name")&&(J in r||J in py))return!1;if(!(qt&&!mt[z]&&Ht(M,z))){if(!(zt&&Ht(E,z))){if(!Q[z]||mt[z]){if(!(cc(S)&&(it.tagNameCheck instanceof RegExp&&Ht(it.tagNameCheck,S)||it.tagNameCheck instanceof Function&&it.tagNameCheck(S))&&(it.attributeNameCheck instanceof RegExp&&Ht(it.attributeNameCheck,z)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(z,S))||z==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Ht(it.tagNameCheck,J)||it.tagNameCheck instanceof Function&&it.tagNameCheck(J))))return!1}else if(!os[z]){if(!Ht(j,gi(J,F,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&S!=="script"&&nb(J,"data:")===0&&Ql[S])){if(!(yt&&!Ht(R,gi(J,F,"")))){if(J)return!1}}}}}}return!0},cc=function(S){return S!=="annotation-xml"&&gs(S,q)},hc=function(S){Se($.beforeSanitizeAttributes,S,null);const{attributes:z}=S;if(!z||us(S))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let xt=z.length;for(;xt--;){const Rt=z[xt],{name:_t,namespaceURI:Zt,value:Te}=Rt,Mr=Et(_t),ds=Te;let Lt=_t==="value"?ds:ab(ds);if(J.attrName=Mr,J.attrValue=Lt,J.keepAttr=!0,J.forceKeepAttr=void 0,Se($.uponSanitizeAttribute,S,J),Lt=J.attrValue,Zl&&(Mr==="id"||Mr==="name")&&(tr(_t,S),Lt=cy+Lt),te&&Ht(/((--!?|])>)|<\/(style|title|textarea)/i,Lt)){tr(_t,S);continue}if(Mr==="attributename"&&gs(Lt,"href")){tr(_t,S);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){tr(_t,S);continue}if(!Ft&&Ht(/\/>/i,Lt)){tr(_t,S);continue}Xt&&bn([I,D,T],dc=>{Lt=gi(Lt,dc," ")});const uc=Et(S.nodeName);if(!lc(uc,Mr,Lt)){tr(_t,S);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Zt)switch(f.getAttributeType(uc,Mr)){case"TrustedHTML":{Lt=_.createHTML(Lt);break}case"TrustedScriptURL":{Lt=_.createScriptURL(Lt);break}}if(Lt!==ds)try{Zt?S.setAttributeNS(Zt,_t,Lt):S.setAttribute(_t,Lt),us(S)?pe(S):Mc(t.removed)}catch{tr(_t,S)}}Se($.afterSanitizeAttributes,S,null)},my=function rt(S){let z=null;const J=ac(S);for(Se($.beforeSanitizeShadowDOM,S,null);z=J.nextNode();)Se($.uponSanitizeShadowNode,z,null),oc(z),hc(z),z.content instanceof a&&rt(z.content);Se($.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(rt){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,J=null,xt=null,Rt=null;if(ls=!rt,ls&&(rt="<!-->"),typeof rt!="string"&&!sc(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw mi("dirty is not a string, aborting")}else throw mi("toString is not a function");if(!t.isSupported)return rt;if(ns||hs(S),t.removed=[],typeof rt=="string"&&(di=!1),di){if(rt.nodeName){const Te=Et(rt.nodeName);if(!Y[Te]||gt[Te])throw mi("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof s)z=nc("<!---->"),J=z.ownerDocument.importNode(rt,!0),J.nodeType===bi.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?z=J:z.appendChild(J);else{if(!Tr&&!Xt&&!Je&&rt.indexOf("<")===-1)return _&&dn?_.createHTML(rt):rt;if(z=nc(rt),!z)return Tr?null:dn?v:""}z&&as&&pe(z.firstChild);const _t=ac(di?rt:z);for(;xt=_t.nextNode();)oc(xt),hc(xt),xt.content instanceof a&&my(xt.content);if(di)return rt;if(Tr){if(un)for(Rt=B.call(z.ownerDocument);z.firstChild;)Rt.appendChild(z.firstChild);else Rt=z;return(Q.shadowroot||Q.shadowrootmode)&&(Rt=O.call(i,Rt,!0)),Rt}let Zt=Je?z.outerHTML:z.innerHTML;return Je&&Y["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&Ht(hu,z.ownerDocument.doctype.name)&&(Zt="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
52
+ `+Zt),Xt&&bn([I,D,T],Te=>{Zt=gi(Zt,Te," ")}),_&&dn?_.createHTML(Zt):Zt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hs(rt),ns=!0},t.clearConfig=function(){Br=null,ns=!1},t.isValidAttribute=function(rt,S,z){Br||hs({});const J=Et(rt),xt=Et(S);return lc(J,xt,z)},t.addHook=function(rt,S){typeof S=="function"&&pi($[rt],S)},t.removeHook=function(rt,S){if(S!==void 0){const z=rb($[rt],S);return z===-1?void 0:ib($[rt],z,1)[0]}return Mc($[rt])},t.removeHooks=function(rt){$[rt]=[]},t.removeAllHooks=function(){$=Dc()},t}var Vr=uu(),du=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ii=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wb=/\s*%%.*\n/gm,zr,fu=(zr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(zr,"UnknownDiagramError"),zr),dr={},Wo=p(function(e,t){e=e.replace(du,"").replace(Ii,"").replace(wb,`
53
+ `);for(const[r,{detector:i}]of Object.entries(dr))if(i(e,t))return r;throw new fu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ns=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)pu(t,r,i)},"registerLazyLoadedDiagrams"),pu=p((e,t,r)=>{dr[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),dr[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),vb=p(e=>dr[e].loader,"getDiagramLoader"),Ps=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=>Ps(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]=Ps(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=Ps,Ta="#ffffff",Aa="#f2f2f2",Wt=p((e,t)=>t?A(e,{s:-40,l:10}):A(e,{s:-40,l:-10}),"mkBorder"),qr,_b=(qr=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||A(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||A(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(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?et(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||et(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||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(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||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(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]||et(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]||A(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||A(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||A(this.primaryColor,{h:64}),this.fillType3=this.fillType3||A(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||A(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||A(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||A(this.primaryColor,{h:128}),this.fillType7=this.fillType7||A(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||A(this.primaryColor,{l:-10}),this.pie5=this.pie5||A(this.secondaryColor,{l:-10}),this.pie6=this.pie6||A(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||A(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||A(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||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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?et(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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(qr,"Theme"),qr),Cb=p(e=>{const t=new _b;return t.calculate(e),t},"getThemeVariables"),Hr,kb=(Hr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(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=Dr(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=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=Dr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Dr(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||et(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(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||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(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]||A(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||A(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||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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?et(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||A(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||A(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||A(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||A(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||A(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(Hr,"Theme"),Hr),Sb=p(e=>{const t=new kb;return t.calculate(e),t},"getThemeVariables"),Wr,Tb=(Wr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=A(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(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=Dr(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||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||A(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||A(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||A(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||A(this.primaryColor,{l:-10}),this.pie5=this.pie5||A(this.secondaryColor,{l:-30}),this.pie6=this.pie6||A(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||A(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||A(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||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(Wr,"Theme"),Wr),gu=p(e=>{const t=new Tb;return t.calculate(e),t},"getThemeVariables"),jr,Ab=(jr=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=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(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=et(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||A(this.primaryColor,{h:30}),this.cScale4=this.cScale4||A(this.primaryColor,{h:60}),this.cScale5=this.cScale5||A(this.primaryColor,{h:90}),this.cScale6=this.cScale6||A(this.primaryColor,{h:120}),this.cScale7=this.cScale7||A(this.primaryColor,{h:150}),this.cScale8=this.cScale8||A(this.primaryColor,{h:210}),this.cScale9=this.cScale9||A(this.primaryColor,{h:270}),this.cScale10=this.cScale10||A(this.primaryColor,{h:300}),this.cScale11=this.cScale11||A(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||A(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]||A(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||A(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(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||A(this.primaryColor,{l:-30}),this.pie5=this.pie5||A(this.secondaryColor,{l:-30}),this.pie6=this.pie6||A(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||A(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||A(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||A(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||A(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||A(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||A(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||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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||A(this.primaryColor,{h:-30}),this.git4=this.git4||A(this.primaryColor,{h:-60}),this.git5=this.git5||A(this.primaryColor,{h:-90}),this.git6=this.git6||A(this.primaryColor,{h:60}),this.git7=this.git7||A(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=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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),Eb=p(e=>{const t=new Ab;return t.calculate(e),t},"getThemeVariables"),Ur,Lb=(Ur=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=A(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(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]||et(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]||A(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||A(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=et(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=et(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=A(this.primaryColor,{h:64}),this.fillType3=A(this.secondaryColor,{h:64}),this.fillType4=A(this.primaryColor,{h:-64}),this.fillType5=A(this.secondaryColor,{h:-64}),this.fillType6=A(this.primaryColor,{h:128}),this.fillType7=A(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||A(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||A(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||A(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||A(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||A(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||A(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ii(this.quadrant1Fill)?G(this.quadrant1Fill):et(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=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||A(this.primaryColor,{h:-30}),this.git4=this.pie5||A(this.primaryColor,{h:-60}),this.git5=this.pie6||A(this.primaryColor,{h:-90}),this.git6=this.pie7||A(this.primaryColor,{h:60}),this.git7=this.pie8||A(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||Ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Aa}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(Ur,"Theme"),Ur),Bb=p(e=>{const t=new Lb;return t.calculate(e),t},"getThemeVariables"),Oe={base:{getThemeVariables:Cb},dark:{getThemeVariables:Sb},default:{getThemeVariables:gu},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},mu={...ge,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Oe.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:","}},yu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...yu(e[i],"")]:[...r,t+i],[]),"keyify"),Mb=new Set(yu(mu,"")),jo=mu,jn=p(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>jn(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Mb.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),jn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.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]="")}P.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"),Xr=Object.freeze(jo),Qt=kt({},Xr),Un,fr=[],Di=kt({},Xr),Ea=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 Oe){const n=kt({},Un),a=kt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Oe&&(r.themeVariables=Oe[r.theme].getThemeVariables(a))}return Di=r,vu(Di),Di},"updateCurrentConfig"),Fb=p(e=>(Qt=kt({},Xr),Qt=kt(Qt,e),e.theme&&Oe[e.theme]&&(Qt.themeVariables=Oe[e.theme].getThemeVariables(e.themeVariables)),Ea(Qt,fr),Qt),"setSiteConfig"),Rb=p(e=>{Un=kt({},e)},"saveConfigFromInitialize"),Ob=p(e=>(Qt=kt(Qt,e),Ea(Qt,fr),Qt),"updateSiteConfig"),bu=p(()=>kt({},Qt),"getSiteConfig"),xu=p(e=>(vu(e),kt(Di,e),$t()),"setConfig"),$t=p(()=>kt({},Di),"getConfig"),wu=p(e=>{e&&(["secure",...Qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.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=>{jn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fr.push(e),Ea(Qt,fr)},"addDirective"),Gn=p((e=Qt)=>{fr=[],Ea(e,fr)},"reset"),Db={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Nc={},Nb=p(e=>{Nc[e]||(P.warn(Db[e]),Nc[e]=!0)},"issueWarning"),vu=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Nb("LAZY_LOAD_DEPRECATED")},"checkConfig"),Pb=p(()=>{let e={};Un&&(e=kt(e,Un));for(const t of fr)e=kt(e,t);return e},"getUserDefinedConfig"),ni=/<br\s*\/?>/gi,zb=p(e=>e?ku(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),qb=(()=>{let e=!1;return()=>{e||(_u(),e=!0)}})();function _u(){const e="data-temp-href-target";Vr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Vr.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(_u,"setupDompurifyHooks");var Cu=p(e=>(qb(),Vr.sanitize(e)),"removeScript"),Pc=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Cu(e):r!=="loose"&&(e=ku(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=Vr.sanitize(Pc(e,t),t.dompurifyConfig).toString():e=Vr.sanitize(Pc(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=>ni.test(e),"hasBreaks"),jb=p(e=>e.split(ni),"splitBreaks"),Ub=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ku=p(e=>e.replace(ni,"#br#"),"breakToPlaceholder"),Su=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"),Yb=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zs=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let 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"),qs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Vb=p((e,t)=>{const r=qs(e,"~"),i=qs(t,"~");return r===1&&i===1},"shouldCombineSets"),Xb=p(e=>{const t=qs(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"),zc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Hs=/\$\$(.*)\$\$/g,pr=p(e=>(e.match(Hs)?.length??0)>0,"hasKatex"),Zb=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await La(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(!pr(e))return e;if(!(zc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Hs,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DEiiRhcn.cjs")),i=t.forceLegacyMathML||!zc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ni).map(n=>pr(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(Hs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),La=p(async(e,t)=>re(await Kb(e,t),t),"renderKatexSanitized"),wr={getRows:zb,sanitizeText:re,sanitizeTextOrArray:Hb,hasBreaks:Wb,splitBreaks:jb,lineBreakRegex:ni,removeScript:Cu,getUrl:Su,evaluate:St,getMax:Gb,getMin:Yb},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"),Uo=p(function(e,t,r,i){const n=Jb(t,r,i);Qb(e,n)},"configureSvgSize"),Tu=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;P.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;P.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,P.info(`Calculated bounds: ${s}x${l}`),Uo(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"),Fn={},tx=p((e,t,r)=>{let i="";return e in Fn&&Fn[e]?i=Fn[e](r):P.warn(`No theme found for ${e}`),` & {
54
54
  font-family: ${r.fontFamily};
55
55
  font-size: ${r.fontSize};
56
56
  fill: ${r.textColor}
@@ -126,27 +126,27 @@
126
126
  ${i}
127
127
 
128
128
  ${t}
129
- `},"getStyles"),Qb=p((e,t)=>{t!==void 0&&(Fn[e]=t)},"addStylesForDiagram"),Jb=Kb,Go={};nu(Go,{clear:()=>Au,getAccDescription:()=>Mu,getAccTitle:()=>Lu,getDiagramTitle:()=>Fu,setAccDescription:()=>Bu,setAccTitle:()=>Eu,setDiagramTitle:()=>$u});var Yo="",Xo="",Vo="",Zo=p(e=>re(e,$t()),"sanitizeText"),Au=p(()=>{Yo="",Vo="",Xo=""},"clear"),Eu=p(e=>{Yo=Zo(e).replace(/^\s+/g,"")},"setAccTitle"),Lu=p(()=>Yo,"getAccTitle"),Bu=p(e=>{Vo=Zo(e).replace(/\n\s+/g,`
130
- `)},"setAccDescription"),Mu=p(()=>Vo,"getAccDescription"),$u=p(e=>{Xo=Zo(e)},"setDiagramTitle"),Fu=p(()=>Xo,"getDiagramTitle"),qc=I,tx=Wo,dt=$t,ex=xu,rx=Vr,Ko=p(e=>re(e,dt()),"sanitizeText"),Ru=Tu,ix=p(()=>Go,"getCommonDb"),Yn={},Xn=p((e,t,r)=>{Yn[e]&&qc.warn(`Diagram with id ${e} already registered. Overwriting.`),Yn[e]=t,r&&pu(e,r),Qb(e,t.styles),t.injectUtils?.(qc,tx,dt,Ko,Ru,ix(),()=>{})},"registerDiagram"),Hs=p(e=>{if(e in Yn)return Yn[e];throw new nx(e)},"getDiagram"),Gr,nx=(Gr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Gr,"DiagramNotFoundError"),Gr),ax={value:()=>{}};function Ou(){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 Rn(r)}function Rn(e){this._=e}function sx(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}})}Rn.prototype=Ou.prototype={constructor:Rn,on:function(e,t){var r=this._,i=sx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=ox(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 Rn(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 ox(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]=ax,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var js="http://www.w3.org/1999/xhtml";const Hc={svg:"http://www.w3.org/2000/svg",xhtml:js,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ba(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Hc.hasOwnProperty(t)?{space:Hc[t],local:e}:e}function lx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===js&&t.documentElement.namespaceURI===js?t.createElement(e):t.createElementNS(r,e)}}function cx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Iu(e){var t=Ba(e);return(t.local?cx:lx)(t)}function hx(){}function Qo(e){return e==null?hx:function(){return this.querySelector(e)}}function ux(e){typeof e!="function"&&(e=Qo(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 dx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fx(){return[]}function Du(e){return e==null?fx:function(){return this.querySelectorAll(e)}}function px(e){return function(){return dx(e.apply(this,arguments))}}function gx(e){typeof e=="function"?e=px(e):e=Du(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 Nu(e){return function(){return this.matches(e)}}function Pu(e){return function(t){return t.matches(e)}}var mx=Array.prototype.find;function yx(e){return function(){return mx.call(this.children,e)}}function bx(){return this.firstElementChild}function xx(e){return this.select(e==null?bx:yx(typeof e=="function"?e:Pu(e)))}var _x=Array.prototype.filter;function wx(){return Array.from(this.children)}function Cx(e){return function(){return _x.call(this.children,e)}}function vx(e){return this.selectAll(e==null?wx:Cx(typeof e=="function"?e:Pu(e)))}function kx(e){typeof e!="function"&&(e=Nu(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 zu(e){return new Array(e.length)}function Sx(){return new ie(this._enter||this._groups.map(zu),this._parents)}function Vn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vn.prototype={constructor:Vn,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 Tx(e){return function(){return e}}function Ax(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 Vn(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function Ex(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 Vn(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(d[s])===l&&(n[s]=l)}function Lx(e){return e.__data__}function Bx(e,t){if(!arguments.length)return Array.from(this,Lx);var r=t?Ex:Ax,i=this._parents,n=this._groups;typeof e!="function"&&(e=Tx(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=Mx(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,_=0,C,w;y<g;++y)if(C=m[y]){for(y>=_&&(_=y+1);!(w=b[_])&&++_<g;);C._next=w||null}}return o=new ie(o,i),o._enter=s,o._exit=l,o}function Mx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $x(){return new ie(this._exit||this._groups.map(zu),this._parents)}function Fx(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 Rx(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 Ox(){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 Ix(e){e||(e=Dx);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 Dx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Nx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Px(){return Array.from(this)}function zx(){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 qx(){let e=0;for(const t of this)++e;return e}function Wx(){return!this.node()}function Hx(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 jx(e){return function(){this.removeAttribute(e)}}function Ux(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gx(e,t){return function(){this.setAttribute(e,t)}}function Yx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Vx(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 Zx(e,t){var r=Ba(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?Ux:jx:typeof t=="function"?r.local?Vx:Xx:r.local?Yx:Gx)(r,t))}function qu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Kx(e){return function(){this.style.removeProperty(e)}}function Qx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Jx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function t1(e,t,r){return arguments.length>1?this.each((t==null?Kx:typeof t=="function"?Jx:Qx)(e,t,r??"")):Zr(this.node(),e)}function Zr(e,t){return e.style.getPropertyValue(t)||qu(e).getComputedStyle(e,null).getPropertyValue(t)}function e1(e){return function(){delete this[e]}}function r1(e,t){return function(){this[e]=t}}function i1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function n1(e,t){return arguments.length>1?this.each((t==null?e1:typeof t=="function"?i1:r1)(e,t)):this.node()[e]}function Wu(e){return e.trim().split(/^|\s+/)}function Jo(e){return e.classList||new Hu(e)}function Hu(e){this._node=e,this._names=Wu(e.getAttribute("class")||"")}Hu.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 ju(e,t){for(var r=Jo(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Uu(e,t){for(var r=Jo(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function a1(e){return function(){ju(this,e)}}function s1(e){return function(){Uu(this,e)}}function o1(e,t){return function(){(t.apply(this,arguments)?ju:Uu)(this,e)}}function l1(e,t){var r=Wu(e+"");if(arguments.length<2){for(var i=Jo(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?o1:t?a1:s1)(r,t))}function c1(){this.textContent=""}function h1(e){return function(){this.textContent=e}}function u1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function d1(e){return arguments.length?this.each(e==null?c1:(typeof e=="function"?u1:h1)(e)):this.node().textContent}function f1(){this.innerHTML=""}function p1(e){return function(){this.innerHTML=e}}function g1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function m1(e){return arguments.length?this.each(e==null?f1:(typeof e=="function"?g1:p1)(e)):this.node().innerHTML}function y1(){this.nextSibling&&this.parentNode.appendChild(this)}function b1(){return this.each(y1)}function x1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _1(){return this.each(x1)}function w1(e){var t=typeof e=="function"?e:Iu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function C1(){return null}function v1(e,t){var r=typeof e=="function"?e:Iu(e),i=t==null?C1:typeof t=="function"?t:Qo(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function k1(){var e=this.parentNode;e&&e.removeChild(this)}function S1(){return this.each(k1)}function T1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function E1(e){return this.select(e?A1:T1)}function L1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function B1(e){return function(t){e.call(this,t,this.__data__)}}function M1(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 $1(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 F1(e,t,r){return function(){var i=this.__on,n,a=B1(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 R1(e,t,r){var i=M1(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?F1:$1,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Gu(e,t,r){var i=qu(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 O1(e,t){return function(){return Gu(this,e,t)}}function I1(e,t){return function(){return Gu(this,e,t.apply(this,arguments))}}function D1(e,t){return this.each((typeof t=="function"?I1:O1)(e,t))}function*N1(){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 Yu=[null];function ie(e,t){this._groups=e,this._parents=t}function rn(){return new ie([[document.documentElement]],Yu)}function P1(){return this}ie.prototype=rn.prototype={constructor:ie,select:ux,selectAll:gx,selectChild:xx,selectChildren:vx,filter:kx,data:Bx,enter:Sx,exit:$x,join:Fx,merge:Rx,selection:P1,order:Ox,sort:Ix,call:Nx,nodes:Px,node:zx,size:qx,empty:Wx,each:Hx,attr:Zx,style:t1,property:n1,classed:l1,text:d1,html:m1,raise:b1,lower:_1,append:w1,insert:v1,remove:S1,clone:E1,datum:L1,on:R1,dispatch:D1,[Symbol.iterator]:N1};function ut(e){return typeof e=="string"?new ie([[document.querySelector(e)]],[document.documentElement]):new ie([[e]],Yu)}function Ma(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function tl(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ai(){}var qi=.7,Zn=1/qi,Nr="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z1=/^#([0-9a-f]{3,8})$/,q1=new RegExp(`^rgb\\(${Nr},${Nr},${Nr}\\)$`),W1=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),H1=new RegExp(`^rgba\\(${Nr},${Nr},${Nr},${Wi}\\)$`),j1=new RegExp(`^rgba\\(${xe},${xe},${xe},${Wi}\\)$`),U1=new RegExp(`^hsl\\(${Wi},${xe},${xe}\\)$`),G1=new RegExp(`^hsla\\(${Wi},${xe},${xe},${Wi}\\)$`),jc={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};Ma(ai,Kr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uc,formatHex:Uc,formatHex8:Y1,formatHsl:X1,formatRgb:Gc,toString:Gc});function Uc(){return this.rgb().formatHex()}function Y1(){return this.rgb().formatHex8()}function X1(){return Vu(this).formatHsl()}function Gc(){return this.rgb().formatRgb()}function Kr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=z1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Yc(t):r===3?new jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?_n(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?_n(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=q1.exec(e))?new jt(t[1],t[2],t[3],1):(t=W1.exec(e))?new jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H1.exec(e))?_n(t[1],t[2],t[3],t[4]):(t=j1.exec(e))?_n(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=U1.exec(e))?Zc(t[1],t[2]/100,t[3]/100,1):(t=G1.exec(e))?Zc(t[1],t[2]/100,t[3]/100,t[4]):jc.hasOwnProperty(e)?Yc(jc[e]):e==="transparent"?new jt(NaN,NaN,NaN,0):null}function Yc(e){return new jt(e>>16&255,e>>8&255,e&255,1)}function _n(e,t,r,i){return i<=0&&(e=t=r=NaN),new jt(e,t,r,i)}function Xu(e){return e instanceof ai||(e=Kr(e)),e?(e=e.rgb(),new jt(e.r,e.g,e.b,e.opacity)):new jt}function Us(e,t,r,i){return arguments.length===1?Xu(e):new jt(e,t,r,i??1)}function jt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ma(jt,Us,tl(ai,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jt(hr(this.r),hr(this.g),hr(this.b),Kn(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:V1,formatRgb:Vc,toString:Vc}));function Xc(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function V1(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vc(){const e=Kn(this.opacity);return`${e===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${e===1?")":`, ${e})`}`}function Kn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sr(e){return e=hr(e),(e<16?"0":"")+e.toString(16)}function Zc(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 Vu(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof ai||(e=Kr(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 Z1(e,t,r,i){return arguments.length===1?Vu(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}Ma(ce,Z1,tl(ai,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,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 jt(_s(e>=240?e-240:e+120,n,i),_s(e,n,i),_s(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(Kc(this.h),wn(this.s),wn(this.l),Kn(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=Kn(this.opacity);return`${e===1?"hsl(":"hsla("}${Kc(this.h)}, ${wn(this.s)*100}%, ${wn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kc(e){return e=(e||0)%360,e<0?e+360:e}function wn(e){return Math.max(0,Math.min(1,e||0))}function _s(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 $a=e=>()=>e;function Zu(e,t){return function(r){return e+r*t}}function K1(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 Q1(e,t){var r=t-e;return r?Zu(e,r>180||r<-180?r-360*Math.round(r/360):r):$a(isNaN(e)?t:e)}function J1(e){return(e=+e)==1?el:function(t,r){return r-t?K1(t,r,e):$a(isNaN(t)?r:t)}}function el(e,t){var r=t-e;return r?Zu(e,r):$a(isNaN(e)?t:e)}const Gs=(function e(t){var r=J1(t);function i(n,a){var o=r((n=Us(n)).r,(a=Us(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=el(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 $e(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ys=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ws=new RegExp(Ys.source,"g");function t2(e){return function(){return e}}function e2(e){return function(t){return e(t)+""}}function Ku(e,t){var r=Ys.lastIndex=ws.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Ys.exec(e))&&(n=ws.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:$e(i,n)})),r=ws.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?e2(l[0].x):t2(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 Qc=180/Math.PI,Xs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qu(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)*Qc,skewX:Math.atan(l)*Qc,scaleX:o,scaleY:s}}var Cn;function r2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Xs:Qu(t.a,t.b,t.c,t.d,t.e,t.f)}function i2(e){return e==null||(Cn||(Cn=document.createElementNS("http://www.w3.org/2000/svg","g")),Cn.setAttribute("transform",e),!(e=Cn.transform.baseVal.consolidate()))?Xs:(e=e.matrix,Qu(e.a,e.b,e.c,e.d,e.e,e.f))}function Ju(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:$e(c,u)},{i:m-2,x:$e(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:$e(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:$e(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:$e(c,u)},{i:m-2,x:$e(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 n2=Ju(r2,"px, ","px)","deg)"),a2=Ju(i2,", ",")",")"),Qr=0,Ai=0,xi=0,td=1e3,Qn,Ei,Jn=0,gr=0,Fa=0,Hi=typeof performance=="object"&&performance.now?performance:Date,ed=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function rl(){return gr||(ed(s2),gr=Hi.now()+Fa)}function s2(){gr=0}function ta(){this._call=this._time=this._next=null}ta.prototype=rd.prototype={constructor:ta,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?rl():+r)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:Qn=this,Ei=this),this._call=e,this._time=r,Vs()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vs())}};function rd(e,t,r){var i=new ta;return i.restart(e,t,r),i}function o2(){rl(),++Qr;for(var e=Qn,t;e;)(t=gr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qr}function Jc(){gr=(Jn=Hi.now())+Fa,Qr=Ai=0;try{o2()}finally{Qr=0,c2(),gr=0}}function l2(){var e=Hi.now(),t=e-Jn;t>td&&(Fa-=t,Jn=e)}function c2(){for(var e,t=Qn,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:Qn=r);Ei=e,Vs(i)}function Vs(e){if(!Qr){Ai&&(Ai=clearTimeout(Ai));var t=e-gr;t>24?(e<1/0&&(Ai=setTimeout(Jc,e-Hi.now()-Fa)),xi&&(xi=clearInterval(xi))):(xi||(Jn=Hi.now(),xi=setInterval(l2,td)),Qr=1,ed(Jc))}}function th(e,t,r){var i=new ta;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var h2=Ou("start","end","cancel","interrupt"),u2=[],id=0,eh=1,Zs=2,On=3,rh=4,Ks=5,In=6;function Ra(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;d2(e,r,{name:t,index:i,group:n,on:h2,tween:u2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:id})}function il(e,t){var r=fe(e,t);if(r.state>id)throw new Error("too late; already scheduled");return r}function Ce(e,t){var r=fe(e,t);if(r.state>On)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 d2(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=rd(a,0,r.time);function a(c){r.state=eh,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!==eh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===On)return th(o);f.state===rh?(f.state=In,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=In,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(th(function(){r.state===On&&(r.state=rh,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Zs,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Zs){for(r.state=On,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=Ks,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===Ks&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=In,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function f2(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>Zs&&i.state<Ks,i.state=In,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function p2(e){return this.each(function(){f2(this,e)})}function g2(e,t){var r,i;return function(){var n=Ce(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 m2(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=Ce(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 y2(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?g2:m2)(r,e,t))}function nl(e,t,r){var i=e._id;return e.each(function(){var n=Ce(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return fe(n,i).value[t]}}function nd(e,t){var r;return(typeof t=="number"?$e:t instanceof Kr?Gs:(r=Kr(t))?(t=r,Gs):Ku)(e,t)}function b2(e){return function(){this.removeAttribute(e)}}function x2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _2(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 w2(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 C2(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 v2(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 k2(e,t){var r=Ba(e),i=r==="transform"?a2:nd;return this.attrTween(e,typeof t=="function"?(r.local?v2:C2)(r,i,nl(this,"attr."+e,t)):t==null?(r.local?x2:b2)(r):(r.local?w2:_2)(r,i,t))}function S2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function T2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function A2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&T2(e,a)),r}return n._value=t,n}function E2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&S2(e,a)),r}return n._value=t,n}function L2(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=Ba(e);return this.tween(r,(i.local?A2:E2)(i,t))}function B2(e,t){return function(){il(this,e).delay=+t.apply(this,arguments)}}function M2(e,t){return t=+t,function(){il(this,e).delay=t}}function $2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?B2:M2)(t,e)):fe(this.node(),t).delay}function F2(e,t){return function(){Ce(this,e).duration=+t.apply(this,arguments)}}function R2(e,t){return t=+t,function(){Ce(this,e).duration=t}}function O2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?F2:R2)(t,e)):fe(this.node(),t).duration}function I2(e,t){if(typeof t!="function")throw new Error;return function(){Ce(this,e).ease=t}}function D2(e){var t=this._id;return arguments.length?this.each(I2(t,e)):fe(this.node(),t).ease}function N2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ce(this,e).ease=r}}function P2(e){if(typeof e!="function")throw new Error;return this.each(N2(this._id,e))}function z2(e){typeof e!="function"&&(e=Nu(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 De(i,this._parents,this._name,this._id)}function q2(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 De(o,this._parents,this._name,this._id)}function W2(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 H2(e,t,r){var i,n,a=W2(t)?il:Ce;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function j2(e,t){var r=this._id;return arguments.length<2?fe(this.node(),r).on.on(e):this.each(H2(r,e,t))}function U2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function G2(){return this.on("end.remove",U2(this._id))}function Y2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Qo(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,Ra(c[d],t,r,d,c,fe(h,r)));return new De(a,this._parents,t,r)}function X2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Du(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])&&Ra(f,t,r,m,d,g);a.push(d),o.push(h)}return new De(a,o,t,r)}var V2=rn.prototype.constructor;function Z2(){return new V2(this._groups,this._parents)}function K2(e,t){var r,i,n;return function(){var a=Zr(this,e),o=(this.style.removeProperty(e),Zr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function ad(e){return function(){this.style.removeProperty(e)}}function Q2(e,t,r){var i,n=r+"",a;return function(){var o=Zr(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function J2(e,t,r){var i,n,a;return function(){var o=Zr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Zr(this,e))),o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s))}}function t_(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var l=Ce(this,e),c=l.on,h=l.value[a]==null?s||(s=ad(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function e_(e,t,r){var i=(e+="")=="transform"?n2:nd;return t==null?this.styleTween(e,K2(e,i)).on("end.style."+e,ad(e)):typeof t=="function"?this.styleTween(e,J2(e,i,nl(this,"style."+e,t))).each(t_(this._id,e)):this.styleTween(e,Q2(e,i,t),r).on("end.style."+e,null)}function r_(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function i_(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&r_(e,o,r)),i}return a._value=t,a}function n_(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,i_(e,t,r??""))}function a_(e){return function(){this.textContent=e}}function s_(e){return function(){var t=e(this);this.textContent=t??""}}function o_(e){return this.tween("text",typeof e=="function"?s_(nl(this,"text",e)):a_(e==null?"":e+""))}function l_(e){return function(t){this.textContent=e.call(this,t)}}function c_(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&l_(n)),t}return i._value=e,i}function h_(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,c_(e))}function u_(){for(var e=this._name,t=this._id,r=sd(),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);Ra(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new De(i,this._parents,e,r)}function d_(){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=Ce(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 f_=0;function De(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function sd(){return++f_}var Ee=rn.prototype;De.prototype={constructor:De,select:Y2,selectAll:X2,selectChild:Ee.selectChild,selectChildren:Ee.selectChildren,filter:z2,merge:q2,selection:Z2,transition:u_,call:Ee.call,nodes:Ee.nodes,node:Ee.node,size:Ee.size,empty:Ee.empty,each:Ee.each,on:j2,attr:k2,attrTween:L2,style:e_,styleTween:n_,text:o_,textTween:h_,remove:G2,tween:y2,delay:$2,duration:O2,ease:D2,easeVarying:P2,end:d_,[Symbol.iterator]:Ee[Symbol.iterator]};function p_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var g_={time:null,delay:0,duration:250,ease:p_};function m_(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 y_(e){var t,r;e instanceof De?(t=e._id,e=e._name):(t=sd(),(r=g_).time=rl(),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])&&Ra(l,e,t,c,o,r||m_(l,t));return new De(i,this._parents,e,t)}rn.prototype.interrupt=p2;rn.prototype.transition=y_;const Qs=Math.PI,Js=2*Qs,rr=1e-6,b_=Js-rr;function od(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function x_(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return od;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 __{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?od:x_(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>rr)if(!(Math.abs(u*l-c*h)>rr)||!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),_=a*Math.tan((Qs-Math.acos((m+d-b)/(2*x*y)))/2),C=_/y,w=_/x;Math.abs(C-1)>rr&&this._append`L${t+C*h},${r+C*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)>rr||Math.abs(this._y1-h)>rr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Js+Js),d>b_?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>rr&&this._append`A${i},${i},0,${+(d>=Qs)},${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 ir(e){return function(){return e}}const w_=Math.abs,C_=Math.atan2,v_=Math.cos,k_=Math.max,S_=Math.min,T_=Math.sin,A_=Math.sqrt,to=1e-12,Oa=Math.PI,eo=Oa/2,E_=2*Oa;function L_(e){return e>1?0:e<-1?Oa:Math.acos(e)}function B_(e){return e>=1?eo:e<=-1?-eo:Math.asin(e)}function ld(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 __(t)}function cd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hd(e){this._context=e}hd.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 ea(e){return new hd(e)}function M_(e){return e[0]}function $_(e){return e[1]}function ud(e,t){var r=ir(!0),i=null,n=ea,a=null,o=ld(s);e=typeof e=="function"?e:e===void 0?M_:ir(e),t=typeof t=="function"?t:t===void 0?$_:ir(t);function s(l){var c,h=(l=cd(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:ir(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ir(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ir(!!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 dd{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 fd(e){return new dd(e,!0)}function pd(e){return new dd(e,!1)}function Ue(){}function ra(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 Ia(e){this._context=e}Ia.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:ra(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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ni(e){return new Ia(e)}function gd(e){this._context=e}gd.prototype={areaStart:Ue,areaEnd:Ue,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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function F_(e){return new gd(e)}function md(e){this._context=e}md.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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function R_(e){return new md(e)}function yd(e,t){this._basis=new Ia(e),this._beta=t}yd.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 O_=(function e(t){function r(i){return t===1?new Ia(i):new yd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ia(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 al(e,t){this._context=e,this._k=(1-t)/6}al.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:ia(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:ia(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 bd=(function e(t){function r(i){return new al(i,t)}return r.tension=function(i){return e(+i)},r})(0);function sl(e,t){this._context=e,this._k=(1-t)/6}sl.prototype={areaStart:Ue,areaEnd:Ue,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:ia(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 I_=(function e(t){function r(i){return new sl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ol(e,t){this._context=e,this._k=(1-t)/6}ol.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:ia(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 D_=(function e(t){function r(i){return new ol(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ll(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>to){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>to){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 xd(e,t){this._context=e,this._alpha=t}xd.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:ll(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 xd(i,t):new al(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function wd(e,t){this._context=e,this._alpha=t}wd.prototype={areaStart:Ue,areaEnd:Ue,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:ll(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 N_=(function e(t){function r(i){return t?new wd(i,t):new sl(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:ll(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 P_=(function e(t){function r(i){return t?new Cd(i,t):new ol(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function vd(e){this._context=e}vd.prototype={areaStart:Ue,areaEnd:Ue,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 z_(e){return new vd(e)}function ih(e){return e<0?-1:1}function nh(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(ih(a)+ih(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ah(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Cs(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 na(e){this._context=e}na.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:Cs(this,this._t0,ah(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,Cs(this,ah(this,r=nh(this,e,t)),r);break;default:Cs(this,this._t0,r=nh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kd(e){this._context=new Sd(e)}(kd.prototype=Object.create(na.prototype)).point=function(e,t){na.prototype.point.call(this,t,e)};function Sd(e){this._context=e}Sd.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 Td(e){return new na(e)}function Ad(e){return new kd(e)}function Ed(e){this._context=e}Ed.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=sh(e),n=sh(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 sh(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 Ld(e){return new Ed(e)}function Da(e,t){this._context=e,this._t=t}Da.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 Bd(e){return new Da(e,.5)}function Md(e){return new Da(e,0)}function $d(e){return new Da(e,1)}function Li(e,t,r){this.k=e,this.x=t,this.y=r}Li.prototype={constructor:Li,scale:function(e){return e===1?this:new Li(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Li(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+")"}};Li.prototype;var Fd=p(e=>{const{securityLevel:t}=dt();let r=ut("body");if(t==="sandbox"){const a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement");function cl(e){return typeof e>"u"||e===null}p(cl,"isNothing");function Rd(e){return typeof e=="object"&&e!==null}p(Rd,"isObject");function Od(e){return Array.isArray(e)?e:cl(e)?[]:[e]}p(Od,"toArray");function Id(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(Id,"extend");function Dd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Dd,"repeat");function Nd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Nd,"isNegativeZero");var q_=cl,W_=Rd,H_=Od,j_=Dd,U_=Nd,G_=Id,At={isNothing:q_,isObject:W_,toArray:H_,repeat:j_,isNegativeZero:U_,extend:G_};function hl(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"),ex=p((e,t)=>{t!==void 0&&(Fn[e]=t)},"addStylesForDiagram"),rx=tx,Go={};nu(Go,{clear:()=>Au,getAccDescription:()=>Mu,getAccTitle:()=>Lu,getDiagramTitle:()=>Fu,setAccDescription:()=>Bu,setAccTitle:()=>Eu,setDiagramTitle:()=>$u});var Yo="",Vo="",Xo="",Zo=p(e=>re(e,$t()),"sanitizeText"),Au=p(()=>{Yo="",Xo="",Vo=""},"clear"),Eu=p(e=>{Yo=Zo(e).replace(/^\s+/g,"")},"setAccTitle"),Lu=p(()=>Yo,"getAccTitle"),Bu=p(e=>{Xo=Zo(e).replace(/\n\s+/g,`
130
+ `)},"setAccDescription"),Mu=p(()=>Xo,"getAccDescription"),$u=p(e=>{Vo=Zo(e)},"setDiagramTitle"),Fu=p(()=>Vo,"getDiagramTitle"),qc=P,ix=Ho,dt=$t,nx=xu,ax=Xr,Ko=p(e=>re(e,dt()),"sanitizeText"),Ru=Tu,sx=p(()=>Go,"getCommonDb"),Yn={},Vn=p((e,t,r)=>{Yn[e]&&qc.warn(`Diagram with id ${e} already registered. Overwriting.`),Yn[e]=t,r&&pu(e,r),ex(e,t.styles),t.injectUtils?.(qc,ix,dt,Ko,Ru,sx(),()=>{})},"registerDiagram"),Ws=p(e=>{if(e in Yn)return Yn[e];throw new ox(e)},"getDiagram"),Gr,ox=(Gr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Gr,"DiagramNotFoundError"),Gr),lx={value:()=>{}};function Ou(){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 Rn(r)}function Rn(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}})}Rn.prototype=Ou.prototype={constructor:Rn,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]=Hc(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Hc(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 Rn(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 Hc(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 js="http://www.w3.org/1999/xhtml";const Wc={svg:"http://www.w3.org/2000/svg",xhtml:js,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ba(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Wc.hasOwnProperty(t)?{space:Wc[t],local:e}:e}function ux(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===js&&t.documentElement.namespaceURI===js?t.createElement(e):t.createElementNS(r,e)}}function dx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Iu(e){var t=Ba(e);return(t.local?dx:ux)(t)}function fx(){}function Qo(e){return e==null?fx:function(){return this.querySelector(e)}}function px(e){typeof e!="function"&&(e=Qo(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 Du(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=Du(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 Nu(e){return function(){return this.matches(e)}}function Pu(e){return function(t){return t.matches(e)}}var xx=Array.prototype.find;function wx(e){return function(){return xx.call(this.children,e)}}function vx(){return this.firstElementChild}function _x(e){return this.select(e==null?vx:wx(typeof e=="function"?e:Pu(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:Pu(e)))}function Ax(e){typeof e!="function"&&(e=Nu(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 zu(e){return new Array(e.length)}function Ex(){return new ie(this._enter||this._groups.map(zu),this._parents)}function Xn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xn.prototype={constructor:Xn,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 Xn(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 Xn(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,w=0,_,v;y<g;++y)if(_=m[y]){for(y>=w&&(w=y+1);!(v=b[w])&&++w<g;);_._next=v||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(zu),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 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 Yx(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=Ba(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:Yx:typeof t=="function"?r.local?Qx:Kx:r.local?Zx:Xx)(r,t))}function qu(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??"")):Zr(this.node(),e)}function Zr(e,t){return e.style.getPropertyValue(t)||qu(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 Hu(e){return e.trim().split(/^|\s+/)}function Jo(e){return e.classList||new Wu(e)}function Wu(e){this._node=e,this._names=Hu(e.getAttribute("class")||"")}Wu.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 ju(e,t){for(var r=Jo(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Uu(e,t){for(var r=Jo(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function l1(e){return function(){ju(this,e)}}function c1(e){return function(){Uu(this,e)}}function h1(e,t){return function(){(t.apply(this,arguments)?ju:Uu)(this,e)}}function u1(e,t){var r=Hu(e+"");if(arguments.length<2){for(var i=Jo(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 w1(){this.nextSibling&&this.parentNode.appendChild(this)}function v1(){return this.each(w1)}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:Iu(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:Iu(e),i=t==null?S1:typeof t=="function"?t:Qo(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=qu(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 Yu=[null];function ie(e,t){this._groups=e,this._parents=t}function rn(){return new ie([[document.documentElement]],Yu)}function H1(){return this}ie.prototype=rn.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:Gx,attr:Jx,style:i1,property:o1,classed:u1,text:g1,html:x1,raise:v1,lower:C1,append:k1,insert:T1,remove:E1,clone:M1,datum:$1,on:D1,dispatch:z1,[Symbol.iterator]:q1};function ut(e){return typeof e=="string"?new ie([[document.querySelector(e)]],[document.documentElement]):new ie([[e]],Yu)}function Ma(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function tl(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ai(){}var qi=.7,Zn=1/qi,Nr="\\s*([+-]?\\d+)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W1=/^#([0-9a-f]{3,8})$/,j1=new RegExp(`^rgb\\(${Nr},${Nr},${Nr}\\)$`),U1=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),G1=new RegExp(`^rgba\\(${Nr},${Nr},${Nr},${Hi}\\)$`),Y1=new RegExp(`^rgba\\(${xe},${xe},${xe},${Hi}\\)$`),V1=new RegExp(`^hsl\\(${Hi},${xe},${xe}\\)$`),X1=new RegExp(`^hsla\\(${Hi},${xe},${xe},${Hi}\\)$`),jc={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};Ma(ai,Kr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uc,formatHex:Uc,formatHex8:Z1,formatHsl:K1,formatRgb:Gc,toString:Gc});function Uc(){return this.rgb().formatHex()}function Z1(){return this.rgb().formatHex8()}function K1(){return Xu(this).formatHsl()}function Gc(){return this.rgb().formatRgb()}function Kr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=W1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Yc(t):r===3?new jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?wn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?wn(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 jt(t[1],t[2],t[3],1):(t=U1.exec(e))?new jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=G1.exec(e))?wn(t[1],t[2],t[3],t[4]):(t=Y1.exec(e))?wn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=V1.exec(e))?Zc(t[1],t[2]/100,t[3]/100,1):(t=X1.exec(e))?Zc(t[1],t[2]/100,t[3]/100,t[4]):jc.hasOwnProperty(e)?Yc(jc[e]):e==="transparent"?new jt(NaN,NaN,NaN,0):null}function Yc(e){return new jt(e>>16&255,e>>8&255,e&255,1)}function wn(e,t,r,i){return i<=0&&(e=t=r=NaN),new jt(e,t,r,i)}function Vu(e){return e instanceof ai||(e=Kr(e)),e?(e=e.rgb(),new jt(e.r,e.g,e.b,e.opacity)):new jt}function Us(e,t,r,i){return arguments.length===1?Vu(e):new jt(e,t,r,i??1)}function jt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ma(jt,Us,tl(ai,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jt(hr(this.r),hr(this.g),hr(this.b),Kn(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:Vc,formatHex:Vc,formatHex8:Q1,formatRgb:Xc,toString:Xc}));function Vc(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function Q1(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xc(){const e=Kn(this.opacity);return`${e===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${e===1?")":`, ${e})`}`}function Kn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sr(e){return e=hr(e),(e<16?"0":"")+e.toString(16)}function Zc(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 Xu(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof ai||(e=Kr(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?Xu(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}Ma(ce,J1,tl(ai,{brighter(e){return e=e==null?Zn:Math.pow(Zn,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,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 jt(ws(e>=240?e-240:e+120,n,i),ws(e,n,i),ws(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(Kc(this.h),vn(this.s),vn(this.l),Kn(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=Kn(this.opacity);return`${e===1?"hsl(":"hsla("}${Kc(this.h)}, ${vn(this.s)*100}%, ${vn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kc(e){return e=(e||0)%360,e<0?e+360:e}function vn(e){return Math.max(0,Math.min(1,e||0))}function ws(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 $a=e=>()=>e;function Zu(e,t){return function(r){return e+r*t}}function t2(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 e2(e,t){var r=t-e;return r?Zu(e,r>180||r<-180?r-360*Math.round(r/360):r):$a(isNaN(e)?t:e)}function r2(e){return(e=+e)==1?el:function(t,r){return r-t?t2(t,r,e):$a(isNaN(t)?r:t)}}function el(e,t){var r=t-e;return r?Zu(e,r):$a(isNaN(e)?t:e)}const Gs=(function e(t){var r=r2(t);function i(n,a){var o=r((n=Us(n)).r,(a=Us(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=el(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 $e(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ys=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vs=new RegExp(Ys.source,"g");function i2(e){return function(){return e}}function n2(e){return function(t){return e(t)+""}}function Ku(e,t){var r=Ys.lastIndex=vs.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=Ys.exec(e))&&(n=vs.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:$e(i,n)})),r=vs.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?n2(l[0].x):i2(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 Qc=180/Math.PI,Vs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qu(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)*Qc,skewX:Math.atan(l)*Qc,scaleX:o,scaleY:s}}var _n;function a2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Vs:Qu(t.a,t.b,t.c,t.d,t.e,t.f)}function s2(e){return e==null||(_n||(_n=document.createElementNS("http://www.w3.org/2000/svg","g")),_n.setAttribute("transform",e),!(e=_n.transform.baseVal.consolidate()))?Vs:(e=e.matrix,Qu(e.a,e.b,e.c,e.d,e.e,e.f))}function Ju(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:$e(c,u)},{i:m-2,x:$e(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:$e(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:$e(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:$e(c,u)},{i:m-2,x:$e(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 o2=Ju(a2,"px, ","px)","deg)"),l2=Ju(s2,", ",")",")"),Qr=0,Ai=0,xi=0,td=1e3,Qn,Ei,Jn=0,gr=0,Fa=0,Wi=typeof performance=="object"&&performance.now?performance:Date,ed=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function rl(){return gr||(ed(c2),gr=Wi.now()+Fa)}function c2(){gr=0}function ta(){this._call=this._time=this._next=null}ta.prototype=rd.prototype={constructor:ta,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?rl():+r)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:Qn=this,Ei=this),this._call=e,this._time=r,Xs()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xs())}};function rd(e,t,r){var i=new ta;return i.restart(e,t,r),i}function h2(){rl(),++Qr;for(var e=Qn,t;e;)(t=gr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qr}function Jc(){gr=(Jn=Wi.now())+Fa,Qr=Ai=0;try{h2()}finally{Qr=0,d2(),gr=0}}function u2(){var e=Wi.now(),t=e-Jn;t>td&&(Fa-=t,Jn=e)}function d2(){for(var e,t=Qn,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:Qn=r);Ei=e,Xs(i)}function Xs(e){if(!Qr){Ai&&(Ai=clearTimeout(Ai));var t=e-gr;t>24?(e<1/0&&(Ai=setTimeout(Jc,e-Wi.now()-Fa)),xi&&(xi=clearInterval(xi))):(xi||(Jn=Wi.now(),xi=setInterval(u2,td)),Qr=1,ed(Jc))}}function th(e,t,r){var i=new ta;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var f2=Ou("start","end","cancel","interrupt"),p2=[],id=0,eh=1,Zs=2,On=3,rh=4,Ks=5,In=6;function Ra(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;g2(e,r,{name:t,index:i,group:n,on:f2,tween:p2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:id})}function il(e,t){var r=fe(e,t);if(r.state>id)throw new Error("too late; already scheduled");return r}function _e(e,t){var r=fe(e,t);if(r.state>On)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 g2(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=rd(a,0,r.time);function a(c){r.state=eh,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!==eh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===On)return th(o);f.state===rh?(f.state=In,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=In,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(th(function(){r.state===On&&(r.state=rh,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Zs,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Zs){for(r.state=On,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=Ks,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===Ks&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=In,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function m2(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>Zs&&i.state<Ks,i.state=In,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function y2(e){return this.each(function(){m2(this,e)})}function b2(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 x2(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 w2(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?b2:x2)(r,e,t))}function nl(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 nd(e,t){var r;return(typeof t=="number"?$e:t instanceof Kr?Gs:(r=Kr(t))?(t=r,Gs):Ku)(e,t)}function v2(e){return function(){this.removeAttribute(e)}}function _2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2(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 k2(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 S2(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 T2(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 A2(e,t){var r=Ba(e),i=r==="transform"?l2:nd;return this.attrTween(e,typeof t=="function"?(r.local?T2:S2)(r,i,nl(this,"attr."+e,t)):t==null?(r.local?_2:v2)(r):(r.local?k2:C2)(r,i,t))}function E2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function L2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function B2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&L2(e,a)),r}return n._value=t,n}function M2(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&E2(e,a)),r}return n._value=t,n}function $2(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=Ba(e);return this.tween(r,(i.local?B2:M2)(i,t))}function F2(e,t){return function(){il(this,e).delay=+t.apply(this,arguments)}}function R2(e,t){return t=+t,function(){il(this,e).delay=t}}function O2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?F2:R2)(t,e)):fe(this.node(),t).delay}function I2(e,t){return function(){_e(this,e).duration=+t.apply(this,arguments)}}function D2(e,t){return t=+t,function(){_e(this,e).duration=t}}function N2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?I2:D2)(t,e)):fe(this.node(),t).duration}function P2(e,t){if(typeof t!="function")throw new Error;return function(){_e(this,e).ease=t}}function z2(e){var t=this._id;return arguments.length?this.each(P2(t,e)):fe(this.node(),t).ease}function q2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;_e(this,e).ease=r}}function H2(e){if(typeof e!="function")throw new Error;return this.each(q2(this._id,e))}function W2(e){typeof e!="function"&&(e=Nu(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 De(i,this._parents,this._name,this._id)}function j2(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 De(o,this._parents,this._name,this._id)}function U2(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 G2(e,t,r){var i,n,a=U2(t)?il:_e;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function Y2(e,t){var r=this._id;return arguments.length<2?fe(this.node(),r).on.on(e):this.each(G2(r,e,t))}function V2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function X2(){return this.on("end.remove",V2(this._id))}function Z2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Qo(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,Ra(c[d],t,r,d,c,fe(h,r)));return new De(a,this._parents,t,r)}function K2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Du(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])&&Ra(f,t,r,m,d,g);a.push(d),o.push(h)}return new De(a,o,t,r)}var Q2=rn.prototype.constructor;function J2(){return new Q2(this._groups,this._parents)}function tw(e,t){var r,i,n;return function(){var a=Zr(this,e),o=(this.style.removeProperty(e),Zr(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function ad(e){return function(){this.style.removeProperty(e)}}function ew(e,t,r){var i,n=r+"",a;return function(){var o=Zr(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=Zr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Zr(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=ad(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"?o2:nd;return t==null?this.styleTween(e,tw(e,i)).on("end.style."+e,ad(e)):typeof t=="function"?this.styleTween(e,rw(e,i,nl(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(nl(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=sd(),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);Ra(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new De(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 De(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function sd(){return++mw}var Ee=rn.prototype;De.prototype={constructor:De,select:Z2,selectAll:K2,selectChild:Ee.selectChild,selectChildren:Ee.selectChildren,filter:W2,merge:j2,selection:J2,transition:pw,call:Ee.call,nodes:Ee.nodes,node:Ee.node,size:Ee.size,empty:Ee.empty,each:Ee.each,on:Y2,attr:A2,attrTween:$2,style:nw,styleTween:ow,text:hw,textTween:fw,remove:X2,tween:w2,delay:O2,duration:N2,ease:z2,easeVarying:H2,end:gw,[Symbol.iterator]:Ee[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 ww(e){var t,r;e instanceof De?(t=e._id,e=e._name):(t=sd(),(r=bw).time=rl(),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])&&Ra(l,e,t,c,o,r||xw(l,t));return new De(i,this._parents,e,t)}rn.prototype.interrupt=y2;rn.prototype.transition=ww;const Qs=Math.PI,Js=2*Qs,rr=1e-6,vw=Js-rr;function od(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 od;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?od:_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>rr)if(!(Math.abs(u*l-c*h)>rr)||!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),w=a*Math.tan((Qs-Math.acos((m+d-b)/(2*x*y)))/2),_=w/y,v=w/x;Math.abs(_-1)>rr&&this._append`L${t+_*h},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+v*l},${this._y1=r+v*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)>rr||Math.abs(this._y1-h)>rr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Js+Js),d>vw?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>rr&&this._append`A${i},${i},0,${+(d>=Qs)},${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 ir(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,to=1e-12,Oa=Math.PI,eo=Oa/2,Mw=2*Oa;function $w(e){return e>1?0:e<-1?Oa:Math.acos(e)}function Fw(e){return e>=1?eo:e<=-1?-eo:Math.asin(e)}function ld(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 cd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hd(e){this._context=e}hd.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 ea(e){return new hd(e)}function Rw(e){return e[0]}function Ow(e){return e[1]}function ud(e,t){var r=ir(!0),i=null,n=ea,a=null,o=ld(s);e=typeof e=="function"?e:e===void 0?Rw:ir(e),t=typeof t=="function"?t:t===void 0?Ow:ir(t);function s(l){var c,h=(l=cd(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:ir(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ir(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ir(!!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 dd{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 fd(e){return new dd(e,!0)}function pd(e){return new dd(e,!1)}function Ue(){}function ra(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 Ia(e){this._context=e}Ia.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:ra(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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ni(e){return new Ia(e)}function gd(e){this._context=e}gd.prototype={areaStart:Ue,areaEnd:Ue,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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Iw(e){return new gd(e)}function md(e){this._context=e}md.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:ra(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dw(e){return new md(e)}function yd(e,t){this._basis=new Ia(e),this._beta=t}yd.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 Ia(i):new yd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ia(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 al(e,t){this._context=e,this._k=(1-t)/6}al.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:ia(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:ia(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 bd=(function e(t){function r(i){return new al(i,t)}return r.tension=function(i){return e(+i)},r})(0);function sl(e,t){this._context=e,this._k=(1-t)/6}sl.prototype={areaStart:Ue,areaEnd:Ue,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:ia(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 sl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ol(e,t){this._context=e,this._k=(1-t)/6}ol.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:ia(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 ol(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ll(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>to){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>to){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 xd(e,t){this._context=e,this._alpha=t}xd.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:ll(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 xd(i,t):new al(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function vd(e,t){this._context=e,this._alpha=t}vd.prototype={areaStart:Ue,areaEnd:Ue,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:ll(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 vd(i,t):new sl(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: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:ll(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 _d(i,t):new ol(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cd(e){this._context=e}Cd.prototype={areaStart:Ue,areaEnd:Ue,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 Cd(e)}function ih(e){return e<0?-1:1}function nh(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(ih(a)+ih(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ah(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _s(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 na(e){this._context=e}na.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:_s(this,this._t0,ah(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,_s(this,ah(this,r=nh(this,e,t)),r);break;default:_s(this,this._t0,r=nh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kd(e){this._context=new Sd(e)}(kd.prototype=Object.create(na.prototype)).point=function(e,t){na.prototype.point.call(this,t,e)};function Sd(e){this._context=e}Sd.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 Td(e){return new na(e)}function Ad(e){return new kd(e)}function Ed(e){this._context=e}Ed.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=sh(e),n=sh(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 sh(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 Ld(e){return new Ed(e)}function Da(e,t){this._context=e,this._t=t}Da.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 Bd(e){return new Da(e,.5)}function Md(e){return new Da(e,0)}function $d(e){return new Da(e,1)}function Li(e,t,r){this.k=e,this.x=t,this.y=r}Li.prototype={constructor:Li,scale:function(e){return e===1?this:new Li(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Li(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+")"}};Li.prototype;var Fd=p(e=>{const{securityLevel:t}=dt();let r=ut("body");if(t==="sandbox"){const a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement");function cl(e){return typeof e>"u"||e===null}p(cl,"isNothing");function Rd(e){return typeof e=="object"&&e!==null}p(Rd,"isObject");function Od(e){return Array.isArray(e)?e:cl(e)?[]:[e]}p(Od,"toArray");function Id(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(Id,"extend");function Dd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Dd,"repeat");function Nd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Nd,"isNegativeZero");var jw=cl,Uw=Rd,Gw=Od,Yw=Dd,Vw=Nd,Xw=Id,At={isNothing:jw,isObject:Uw,toArray:Gw,repeat:Yw,isNegativeZero:Vw,extend:Xw};function hl(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
132
  `+e.mark.snippet),i+" "+r):i}p(hl,"formatError");function Jr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=hl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Jr,"YAMLException$1");Jr.prototype=Object.create(Error.prototype);Jr.prototype.constructor=Jr;Jr.prototype.toString=p(function(t){return this.name+": "+hl(this,t)},"toString");var Jt=Jr;function Dn(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(Dn,"getLine");function Nn(e,t){return At.repeat(" ",t-e.length)+e}p(Nn,"padStart");function Pd(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=Dn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=At.repeat(" ",t.indent)+Nn((e.line-l+1).toString(),h)+" | "+c.str+`
133
133
  `+s;for(c=Dn(e.buffer,i[o],n[o],e.position,u),s+=At.repeat(" ",t.indent)+Nn((e.line+1).toString(),h)+" | "+c.str+`
134
134
  `,s+=At.repeat("-",t.indent+h+3+c.pos)+`^
135
135
  `,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=Dn(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=At.repeat(" ",t.indent)+Nn((e.line+l+1).toString(),h)+" | "+c.str+`
136
- `;return s.replace(/\n$/,"")}p(Pd,"makeSnippet");var Y_=Pd,X_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],V_=["scalar","sequence","mapping"];function zd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(zd,"compileStyleAliases");function qd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(X_.indexOf(r)===-1)throw new Jt('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=zd(t.styleAliases||null),V_.indexOf(this.kind)===-1)throw new Jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(qd,"Type$1");var Dt=qd;function ro(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(ro,"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 aa(e){return this.extend(e)}p(aa,"Schema$1");aa.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Dt)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 Jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Dt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Jt("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 Jt("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 Dt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(aa.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ro(n,"implicit"),n.compiledExplicit=ro(n,"explicit"),n.compiledTypeMap=Wd(n.compiledImplicit,n.compiledExplicit),n},"extend");var Z_=aa,K_=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Q_=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),J_=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),tw=new Z_({explicit:[K_,Q_,J_]});function Hd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Hd,"resolveYamlNull");function jd(){return null}p(jd,"constructYamlNull");function Ud(e){return e===null}p(Ud,"isNull");var ew=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hd,construct:jd,predicate:Ud,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 Yd(e){return e==="true"||e==="True"||e==="TRUE"}p(Yd,"constructYamlBoolean");function Xd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Xd,"isBoolean");var rw=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gd,construct:Yd,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 Vd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Vd,"isHexCode");function Zd(e){return 48<=e&&e<=55}p(Zd,"isOctCode");function Kd(e){return 48<=e&&e<=57}p(Kd,"isDecCode");function Qd(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(!Vd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Zd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Kd(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(Qd,"resolveYamlInteger");function Jd(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(Jd,"constructYamlInteger");function tf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!At.isNegativeZero(e)}p(tf,"isInteger");var iw=new Dt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Qd,construct:Jd,predicate:tf,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"]}}),nw=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ef(e){return!(e===null||!nw.test(e)||e[e.length-1]==="_")}p(ef,"resolveYamlFloat");function rf(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(rf,"constructYamlFloat");var aw=/^[-+]?[0-9]+e/;function nf(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(At.isNegativeZero(e))return"-0.0";return r=e.toString(10),aw.test(r)?r.replace("e",".e"):r}p(nf,"representYamlFloat");function af(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||At.isNegativeZero(e))}p(af,"isFloat");var sw=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:ef,construct:rf,predicate:af,represent:nf,defaultStyle:"lowercase"}),sf=tw.extend({implicit:[ew,rw,iw,sw]}),ow=sf,of=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),lf=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 cf(e){return e===null?!1:of.exec(e)!==null||lf.exec(e)!==null}p(cf,"resolveYamlTimestamp");function hf(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,d;if(t=of.exec(e),t===null&&(t=lf.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(hf,"constructYamlTimestamp");function uf(e){return e.toISOString()}p(uf,"representYamlTimestamp");var lw=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cf,construct:hf,instanceOf:Date,represent:uf});function df(e){return e==="<<"||e===null}p(df,"resolveYamlMerge");var cw=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:df}),ul=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
- \r`;function ff(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=ul;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(ff,"resolveYamlBinary");function pf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=ul,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(pf,"constructYamlBinary");function gf(e){var t="",r=0,i,n,a=e.length,o=ul;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(gf,"representYamlBinary");function mf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(mf,"isBinary");var hw=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ff,construct:pf,predicate:mf,represent:gf}),uw=Object.prototype.hasOwnProperty,dw=Object.prototype.toString;function yf(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,dw.call(n)!=="[object Object]")return!1;for(a in n)if(uw.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(yf,"resolveYamlOmap");function bf(e){return e!==null?e:[]}p(bf,"constructYamlOmap");var fw=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:yf,construct:bf}),pw=Object.prototype.toString;function xf(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],pw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(xf,"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 gw=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:xf,construct:_f}),mw=Object.prototype.hasOwnProperty;function wf(e){if(e===null)return!0;var t,r=e;for(t in r)if(mw.call(r,t)&&r[t]!==null)return!1;return!0}p(wf,"resolveYamlSet");function Cf(e){return e!==null?e:{}}p(Cf,"constructYamlSet");var yw=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:wf,construct:Cf}),vf=ow.extend({implicit:[lw,cw],explicit:[hw,fw,gw,yw]}),Ge=Object.prototype.hasOwnProperty,sa=1,kf=2,Sf=3,oa=4,vs=1,bw=2,oh=3,xw=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_w=/[\x85\u2028\u2029]/,ww=/[,\[\]\{\}]/,Tf=/^(?:!|!!|![a-z\-]+!)$/i,Af=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function io(e){return Object.prototype.toString.call(e)}p(io,"_class");function he(e){return e===10||e===13}p(he,"is_EOL");function je(e){return e===9||e===32}p(je,"is_WHITE_SPACE");function Ut(e){return e===9||e===32||e===10||e===13}p(Ut,"is_WS_OR_EOL");function or(e){return e===44||e===91||e===93||e===123||e===125}p(or,"is_FLOW_INDICATOR");function Ef(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Ef,"fromHexCode");function Lf(e){return e===120?2:e===117?4:e===85?8:0}p(Lf,"escapedHexLen");function Bf(e){return 48<=e&&e<=57?e-48:-1}p(Bf,"fromDecimalCode");function no(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(no,"simpleEscapeSequence");function Mf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Mf,"charFromCodepoint");var $f=new Array(256),Ff=new Array(256);for(er=0;er<256;er++)$f[er]=no(er)?1:0,Ff[er]=no(er);var er;function Rf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||vf,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(Rf,"State$1");function dl(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=Y_(r),new Jt(t,r)}p(dl,"generateError");function tt(e,t){throw dl(e,t)}p(tt,"throwError");function ji(e,t){e.onWarning&&e.onWarning.call(null,dl(e,t))}p(ji,"throwWarning");var lh={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&&ji(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],Tf.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ge.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Af.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 Ie(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 xw.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}p(Ie,"captureSegment");function ao(e,t,r,i){var n,a,o,s;for(At.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],Ge.call(t,a)||(t[a]=r[a],i[a]=!0)}p(ao,"mergeMappings");function lr(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"&&io(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&io(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)ao(e,t,a[c],r);else ao(e,t,a,r);else!e.json&&!Ge.call(r,n)&&Ge.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(lr,"storeMappingPair");function Na(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(Na,"readLineBreak");function wt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;je(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(Na(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&&ji(e,"deficient indentation"),i}p(wt,"skipSeparationSpace");function nn(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||Ut(r)))}p(nn,"testDocumentSeparator");function Pa(e,t){t===1?e.result+=" ":t>1&&(e.result+=At.repeat(`
139
- `,t-1))}p(Pa,"writeFoldedLines");function Of(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),Ut(f)||or(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),Ut(n)||r&&or(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),Ut(n)||r&&or(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Ut(i))break}else{if(e.position===e.lineStart&&nn(e)||r&&or(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&&(Ie(e,a,o,!1),Pa(e,e.line-l),a=o=e.position,s=!1),je(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return Ie(e,a,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Of,"readPlainScalar");function If(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(Ie(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)?(Ie(e,i,n,!0),Pa(e,wt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&nn(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(If,"readSingleQuotedScalar");function Df(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 Ie(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ie(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),he(s))wt(e,!1,t);else if(s<256&&$f[s])e.result+=Ff[s],e.position++;else if((o=Lf(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Ef(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=Mf(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else he(s)?(Ie(e,r,i,!0),Pa(e,wt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&nn(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(Df,"readDoubleQuotedScalar");function Nf(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),Ut(c)&&(u=d=!0,e.position++,wt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,mr(e,t,sa,!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),mr(e,t,sa,!1,!0),x=e.result),f?lr(e,s,g,b,m,x,i,n,a):u?s.push(lr(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(Nf,"readFlowCollection");function Pf(e,t){var r,i,n=vs,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)vs===n?n=u===43?oh:bw:tt(e,"repeat of a chomping mode identifier");else if((h=Bf(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(je(u)){do u=e.input.charCodeAt(++e.position);while(je(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!he(u)&&u!==0)}for(;u!==0;){for(Na(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===oh?e.result+=At.repeat(`
140
- `,a?1+l:l):n===vs&&a&&(e.result+=`
136
+ `;return s.replace(/\n$/,"")}p(Pd,"makeSnippet");var Zw=Pd,Kw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Qw=["scalar","sequence","mapping"];function zd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(zd,"compileStyleAliases");function qd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Kw.indexOf(r)===-1)throw new Jt('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=zd(t.styleAliases||null),Qw.indexOf(this.kind)===-1)throw new Jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(qd,"Type$1");var Dt=qd;function ro(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(ro,"compileList");function Hd(){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(Hd,"compileMap");function aa(e){return this.extend(e)}p(aa,"Schema$1");aa.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Dt)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 Jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Dt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Jt("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 Jt("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 Dt))throw new Jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(aa.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ro(n,"implicit"),n.compiledExplicit=ro(n,"explicit"),n.compiledTypeMap=Hd(n.compiledImplicit,n.compiledExplicit),n},"extend");var Jw=aa,tv=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),ev=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),rv=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),iv=new Jw({explicit:[tv,ev,rv]});function Wd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Wd,"resolveYamlNull");function jd(){return null}p(jd,"constructYamlNull");function Ud(e){return e===null}p(Ud,"isNull");var nv=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Wd,construct:jd,predicate:Ud,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 Yd(e){return e==="true"||e==="True"||e==="TRUE"}p(Yd,"constructYamlBoolean");function Vd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Vd,"isBoolean");var av=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gd,construct:Yd,predicate:Vd,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 Xd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Xd,"isHexCode");function Zd(e){return 48<=e&&e<=55}p(Zd,"isOctCode");function Kd(e){return 48<=e&&e<=57}p(Kd,"isDecCode");function Qd(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(!Xd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Zd(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Kd(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(Qd,"resolveYamlInteger");function Jd(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(Jd,"constructYamlInteger");function tf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!At.isNegativeZero(e)}p(tf,"isInteger");var sv=new Dt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Qd,construct:Jd,predicate:tf,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"]}}),ov=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ef(e){return!(e===null||!ov.test(e)||e[e.length-1]==="_")}p(ef,"resolveYamlFloat");function rf(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(rf,"constructYamlFloat");var lv=/^[-+]?[0-9]+e/;function nf(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(At.isNegativeZero(e))return"-0.0";return r=e.toString(10),lv.test(r)?r.replace("e",".e"):r}p(nf,"representYamlFloat");function af(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||At.isNegativeZero(e))}p(af,"isFloat");var cv=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:ef,construct:rf,predicate:af,represent:nf,defaultStyle:"lowercase"}),sf=iv.extend({implicit:[nv,av,sv,cv]}),hv=sf,of=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),lf=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 cf(e){return e===null?!1:of.exec(e)!==null||lf.exec(e)!==null}p(cf,"resolveYamlTimestamp");function hf(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,d;if(t=of.exec(e),t===null&&(t=lf.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(hf,"constructYamlTimestamp");function uf(e){return e.toISOString()}p(uf,"representYamlTimestamp");var uv=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cf,construct:hf,instanceOf:Date,represent:uf});function df(e){return e==="<<"||e===null}p(df,"resolveYamlMerge");var dv=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:df}),ul=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
+ \r`;function ff(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=ul;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(ff,"resolveYamlBinary");function pf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=ul,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(pf,"constructYamlBinary");function gf(e){var t="",r=0,i,n,a=e.length,o=ul;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(gf,"representYamlBinary");function mf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(mf,"isBinary");var fv=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ff,construct:pf,predicate:mf,represent:gf}),pv=Object.prototype.hasOwnProperty,gv=Object.prototype.toString;function yf(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,gv.call(n)!=="[object Object]")return!1;for(a in n)if(pv.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(yf,"resolveYamlOmap");function bf(e){return e!==null?e:[]}p(bf,"constructYamlOmap");var mv=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:yf,construct:bf}),yv=Object.prototype.toString;function xf(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],yv.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(xf,"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 bv=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:xf,construct:wf}),xv=Object.prototype.hasOwnProperty;function vf(e){if(e===null)return!0;var t,r=e;for(t in r)if(xv.call(r,t)&&r[t]!==null)return!1;return!0}p(vf,"resolveYamlSet");function _f(e){return e!==null?e:{}}p(_f,"constructYamlSet");var wv=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:vf,construct:_f}),Cf=hv.extend({implicit:[uv,dv],explicit:[fv,mv,bv,wv]}),Ge=Object.prototype.hasOwnProperty,sa=1,kf=2,Sf=3,oa=4,Cs=1,vv=2,oh=3,_v=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cv=/[\x85\u2028\u2029]/,kv=/[,\[\]\{\}]/,Tf=/^(?:!|!!|![a-z\-]+!)$/i,Af=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function io(e){return Object.prototype.toString.call(e)}p(io,"_class");function he(e){return e===10||e===13}p(he,"is_EOL");function je(e){return e===9||e===32}p(je,"is_WHITE_SPACE");function Ut(e){return e===9||e===32||e===10||e===13}p(Ut,"is_WS_OR_EOL");function or(e){return e===44||e===91||e===93||e===123||e===125}p(or,"is_FLOW_INDICATOR");function Ef(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Ef,"fromHexCode");function Lf(e){return e===120?2:e===117?4:e===85?8:0}p(Lf,"escapedHexLen");function Bf(e){return 48<=e&&e<=57?e-48:-1}p(Bf,"fromDecimalCode");function no(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(no,"simpleEscapeSequence");function Mf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Mf,"charFromCodepoint");var $f=new Array(256),Ff=new Array(256);for(er=0;er<256;er++)$f[er]=no(er)?1:0,Ff[er]=no(er);var er;function Rf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Cf,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(Rf,"State$1");function dl(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 Jt(t,r)}p(dl,"generateError");function tt(e,t){throw dl(e,t)}p(tt,"throwError");function ji(e,t){e.onWarning&&e.onWarning.call(null,dl(e,t))}p(ji,"throwWarning");var lh={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&&ji(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],Tf.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ge.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Af.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 Ie(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 _v.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}p(Ie,"captureSegment");function ao(e,t,r,i){var n,a,o,s;for(At.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],Ge.call(t,a)||(t[a]=r[a],i[a]=!0)}p(ao,"mergeMappings");function lr(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"&&io(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&io(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)ao(e,t,a[c],r);else ao(e,t,a,r);else!e.json&&!Ge.call(r,n)&&Ge.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(lr,"storeMappingPair");function Na(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(Na,"readLineBreak");function vt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;je(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(Na(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&&ji(e,"deficient indentation"),i}p(vt,"skipSeparationSpace");function nn(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||Ut(r)))}p(nn,"testDocumentSeparator");function Pa(e,t){t===1?e.result+=" ":t>1&&(e.result+=At.repeat(`
139
+ `,t-1))}p(Pa,"writeFoldedLines");function Of(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),Ut(f)||or(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),Ut(n)||r&&or(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),Ut(n)||r&&or(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Ut(i))break}else{if(e.position===e.lineStart&&nn(e)||r&&or(f))break;if(he(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,vt(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&&(Ie(e,a,o,!1),Pa(e,e.line-l),a=o=e.position,s=!1),je(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return Ie(e,a,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Of,"readPlainScalar");function If(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(Ie(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)?(Ie(e,i,n,!0),Pa(e,vt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&nn(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(If,"readSingleQuotedScalar");function Df(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 Ie(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ie(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),he(s))vt(e,!1,t);else if(s<256&&$f[s])e.result+=Ff[s],e.position++;else if((o=Lf(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Ef(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=Mf(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else he(s)?(Ie(e,r,i,!0),Pa(e,vt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&nn(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(Df,"readDoubleQuotedScalar");function Nf(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(vt(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),Ut(c)&&(u=d=!0,e.position++,vt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,mr(e,t,sa,!1,!0),b=e.tag,m=e.result,vt(e,!0,t),y=e.input.charCodeAt(e.position),(d||e.line===i)&&y===58&&(u=!0,y=e.input.charCodeAt(++e.position),vt(e,!0,t),mr(e,t,sa,!1,!0),x=e.result),f?lr(e,s,g,b,m,x,i,n,a):u?s.push(lr(e,null,g,b,m,x,i,n,a)):s.push(m),vt(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(Nf,"readFlowCollection");function Pf(e,t){var r,i,n=Cs,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)Cs===n?n=u===43?oh:vv:tt(e,"repeat of a chomping mode identifier");else if((h=Bf(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(je(u)){do u=e.input.charCodeAt(++e.position);while(je(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!he(u)&&u!==0)}for(;u!==0;){for(Na(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===oh?e.result+=At.repeat(`
140
+ `,a?1+l:l):n===Cs&&a&&(e.result+=`
141
141
  `);break}for(i?je(u)?(c=!0,e.result+=At.repeat(`
142
142
  `,a?1+l:l)):c?(c=!1,e.result+=At.repeat(`
143
143
  `,l+1)):l===0?a&&(e.result+=" "):e.result+=At.repeat(`
144
144
  `,l):e.result+=At.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);Ie(e,r,e.position,!1)}return!0}p(Pf,"readBlockScalar");function so(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),!Ut(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,mr(e,t,Sf,!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(so,"readBlockSequence");function zf(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)&&Ut(i))y===63?(b&&(lr(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,!mr(e,r,kf,!1,!0))break;if(e.line===a){for(y=e.input.charCodeAt(e.position);je(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Ut(y)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(lr(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),mr(e,t,oa,!0,n)&&(b?g=e.result:m=e.result),b||(lr(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&&lr(e,u,d,f,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(zf,"readBlockMapping");function qf(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&&!Ut(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Tf.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),ww.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!Af.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:Ge.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(qf,"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&&!Ut(r)&&!or(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 Hf(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&&!Ut(i)&&!or(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),Ge.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],wt(e,!0,-1),!0}p(Hf,"readAlias");function mr(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=oa===r||Sf===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(;qf(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||oa===r)&&(sa===r||kf===r?m=t:m=t+1,b=e.position-e.lineStart,l===1?s&&(so(e,b)||zf(e,b,m))||Nf(e,m)?h=!0:(o&&Pf(e,m)||If(e,m)||Df(e,m)?h=!0:Hf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Of(e,m,sa===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&so(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(Ge.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(mr,"composeNode");function jf(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&&!Ut(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(;je(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&&!Ut(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Na(e),Ge.call(lh,i)?lh[i](e,i,n):ji(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"),mr(e,e.lineIndent-1,oa,!1,!0),wt(e,!0,-1),e.checkLineBreaks&&_w.test(e.input.slice(t,e.position))&&ji(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&nn(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(jf,"readDocument");function fl(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 Rf(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;)jf(r);return r.documents}p(fl,"loadDocuments");function Cw(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=fl(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Cw,"loadAll$1");function Uf(e,t){var r=fl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Jt("expected a single document in the stream, but found more")}}p(Uf,"load$1");var vw=Uf,kw={load:vw},Gf=Object.prototype.toString,Yf=Object.prototype.hasOwnProperty,pl=65279,Sw=9,Ui=10,Tw=13,Aw=32,Ew=33,Lw=34,oo=35,Bw=37,Mw=38,$w=39,Fw=42,Xf=44,Rw=45,la=58,Ow=61,Iw=62,Dw=63,Nw=64,Vf=91,Zf=93,Pw=96,Kf=123,zw=124,Qf=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var qw=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ww=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jf(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&&Yf.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(Jf,"compileStyleMap");function tp(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 Jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+At.repeat("0",i-t.length)+t}p(tp,"encodeHex");var Hw=1,Gi=2;function ep(e){this.schema=e.schema||vf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=At.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Jf(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==='"'?Gi:Hw,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(ep,"State");function lo(e,t){for(var r=At.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);Ie(e,r,e.position,!1)}return!0}p(Pf,"readBlockScalar");function so(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),!Ut(o))));){if(s=!0,e.position++,vt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,mr(e,t,Sf,!1,!0),a.push(e.result),vt(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(so,"readBlockSequence");function zf(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)&&Ut(i))y===63?(b&&(lr(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,!mr(e,r,kf,!1,!0))break;if(e.line===a){for(y=e.input.charCodeAt(e.position);je(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Ut(y)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(lr(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),mr(e,t,oa,!0,n)&&(b?g=e.result:m=e.result),b||(lr(e,u,d,f,g,m,o,s,l),f=g=m=null),vt(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&&lr(e,u,d,f,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(zf,"readBlockMapping");function qf(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&&!Ut(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Tf.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),kv.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!Af.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:Ge.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(qf,"readTagProperty");function Hf(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&&!Ut(r)&&!or(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(Hf,"readAnchorProperty");function Wf(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&&!Ut(i)&&!or(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),Ge.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],vt(e,!0,-1),!0}p(Wf,"readAlias");function mr(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=oa===r||Sf===r,i&&vt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;qf(e)||Hf(e);)vt(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||oa===r)&&(sa===r||kf===r?m=t:m=t+1,b=e.position-e.lineStart,l===1?s&&(so(e,b)||zf(e,b,m))||Nf(e,m)?h=!0:(o&&Pf(e,m)||If(e,m)||Df(e,m)?h=!0:Wf(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Of(e,m,sa===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&so(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(Ge.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(mr,"composeNode");function jf(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&&(vt(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&&!Ut(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(;je(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&&!Ut(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&Na(e),Ge.call(lh,i)?lh[i](e,i,n):ji(e,'unknown document directive "'+i+'"')}if(vt(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,vt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),mr(e,e.lineIndent-1,oa,!1,!0),vt(e,!0,-1),e.checkLineBreaks&&Cv.test(e.input.slice(t,e.position))&&ji(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&nn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,vt(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(jf,"readDocument");function fl(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 Rf(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;)jf(r);return r.documents}p(fl,"loadDocuments");function Sv(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=fl(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Sv,"loadAll$1");function Uf(e,t){var r=fl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Jt("expected a single document in the stream, but found more")}}p(Uf,"load$1");var Tv=Uf,Av={load:Tv},Gf=Object.prototype.toString,Yf=Object.prototype.hasOwnProperty,pl=65279,Ev=9,Ui=10,Lv=13,Bv=32,Mv=33,$v=34,oo=35,Fv=37,Rv=38,Ov=39,Iv=42,Vf=44,Dv=45,la=58,Nv=61,Pv=62,zv=63,qv=64,Xf=91,Zf=93,Hv=96,Kf=123,Wv=124,Qf=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var jv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Uv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jf(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&&Yf.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(Jf,"compileStyleMap");function tp(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 Jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+At.repeat("0",i-t.length)+t}p(tp,"encodeHex");var Gv=1,Gi=2;function ep(e){this.schema=e.schema||Cf,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=At.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Jf(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==='"'?Gi:Gv,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(ep,"State");function lo(e,t){for(var r=At.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(lo,"indentString");function ca(e,t){return`
149
- `+At.repeat(" ",e.indent*t)}p(ca,"generateNextLine");function rp(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(rp,"testImplicitResolving");function Yi(e){return e===Aw||e===Sw}p(Yi,"isWhitespace");function ti(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==pl||65536<=e&&e<=1114111}p(ti,"isPrintable");function co(e){return ti(e)&&e!==pl&&e!==Tw&&e!==Ui}p(co,"isNsCharOrWhitespace");function ho(e,t,r){var i=co(e),n=i&&!Yi(e);return(r?i:i&&e!==Xf&&e!==Vf&&e!==Zf&&e!==Kf&&e!==Qf)&&e!==oo&&!(t===la&&!n)||co(t)&&!Yi(t)&&e===oo||t===la&&n}p(ho,"isPlainSafe");function ip(e){return ti(e)&&e!==pl&&!Yi(e)&&e!==Rw&&e!==Dw&&e!==la&&e!==Xf&&e!==Vf&&e!==Zf&&e!==Kf&&e!==Qf&&e!==oo&&e!==Mw&&e!==Fw&&e!==Ew&&e!==zw&&e!==Ow&&e!==Iw&&e!==$w&&e!==Lw&&e!==Bw&&e!==Nw&&e!==Pw}p(ip,"isPlainSafeFirst");function np(e){return!Yi(e)&&e!==la}p(np,"isPlainSafeLast");function Or(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(Or,"codePointAt");function gl(e){var t=/^\n* /;return t.test(e)}p(gl,"needIndentIndicator");var ap=1,uo=2,sp=3,op=4,Fr=5;function lp(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=ip(Or(e,0))&&np(Or(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),!ti(c))return Fr;m=m&&ho(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),c===Ui)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ti(c))return Fr;m=m&&ho(c,h,s),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!n(e)?ap:a===Gi?Fr:uo:r>9&&gl(e)?Fr:o?a===Gi?Fr:uo:d?op:sp}p(lp,"chooseScalarStyle");function cp(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Gi?'""':"''";if(!e.noCompatMode&&(qw.indexOf(t)!==-1||Ww.test(t)))return e.quotingType===Gi?'"'+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 rp(e,c)}switch(p(l,"testAmbiguity"),lp(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case ap:return t;case uo:return"'"+t.replace(/'/g,"''")+"'";case sp:return"|"+fo(t,e.indent)+po(lo(t,a));case op:return">"+fo(t,e.indent)+po(lo(hp(t,o),a));case Fr:return'"'+up(t)+'"';default:throw new Jt("impossible error: invalid scalar style")}})()}p(cp,"writeScalar");function fo(e,t){var r=gl(e)?String(t):"",i=e[e.length-1]===`
149
+ `+At.repeat(" ",e.indent*t)}p(ca,"generateNextLine");function rp(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(rp,"testImplicitResolving");function Yi(e){return e===Bv||e===Ev}p(Yi,"isWhitespace");function ti(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==pl||65536<=e&&e<=1114111}p(ti,"isPrintable");function co(e){return ti(e)&&e!==pl&&e!==Lv&&e!==Ui}p(co,"isNsCharOrWhitespace");function ho(e,t,r){var i=co(e),n=i&&!Yi(e);return(r?i:i&&e!==Vf&&e!==Xf&&e!==Zf&&e!==Kf&&e!==Qf)&&e!==oo&&!(t===la&&!n)||co(t)&&!Yi(t)&&e===oo||t===la&&n}p(ho,"isPlainSafe");function ip(e){return ti(e)&&e!==pl&&!Yi(e)&&e!==Dv&&e!==zv&&e!==la&&e!==Vf&&e!==Xf&&e!==Zf&&e!==Kf&&e!==Qf&&e!==oo&&e!==Rv&&e!==Iv&&e!==Mv&&e!==Wv&&e!==Nv&&e!==Pv&&e!==Ov&&e!==$v&&e!==Fv&&e!==qv&&e!==Hv}p(ip,"isPlainSafeFirst");function np(e){return!Yi(e)&&e!==la}p(np,"isPlainSafeLast");function Or(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(Or,"codePointAt");function gl(e){var t=/^\n* /;return t.test(e)}p(gl,"needIndentIndicator");var ap=1,uo=2,sp=3,op=4,Fr=5;function lp(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=ip(Or(e,0))&&np(Or(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),!ti(c))return Fr;m=m&&ho(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),c===Ui)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!ti(c))return Fr;m=m&&ho(c,h,s),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!n(e)?ap:a===Gi?Fr:uo:r>9&&gl(e)?Fr:o?a===Gi?Fr:uo:d?op:sp}p(lp,"chooseScalarStyle");function cp(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Gi?'""':"''";if(!e.noCompatMode&&(jv.indexOf(t)!==-1||Uv.test(t)))return e.quotingType===Gi?'"'+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 rp(e,c)}switch(p(l,"testAmbiguity"),lp(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case ap:return t;case uo:return"'"+t.replace(/'/g,"''")+"'";case sp:return"|"+fo(t,e.indent)+po(lo(t,a));case op:return">"+fo(t,e.indent)+po(lo(hp(t,o),a));case Fr:return'"'+up(t)+'"';default:throw new Jt("impossible error: invalid scalar style")}})()}p(cp,"writeScalar");function fo(e,t){var r=gl(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+`
@@ -157,18 +157,18 @@
157
157
  `:"")+go(l,t),n=a}return i}p(hp,"foldString");function go(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(go,"foldLine");function up(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Or(e,n),i=Pt[r],!i&&ti(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||tp(r);return t}p(up,"escapeString");function dp(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)),(_e(e,t,s,!1,!1)||typeof s>"u"&&_e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(dp,"writeFlowSequence");function mo(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)),(_e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&_e(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=ca(e,t)),e.dump&&Ui===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(mo,"writeBlockSequence");function fp(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)),_e(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),_e(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(fp,"writeFlowMapping");function pp(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 Jt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)d="",(!i||n!=="")&&(d+=ca(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),_e(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ui===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=ca(e,t)),_e(e,t+1,h,!0,u)&&(e.dump&&Ui===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(pp,"writeBlockMapping");function yo(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(Yf.call(s.represent,l))i=s.represent[l](t,l);else throw new Jt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(yo,"detectType");function _e(e,t,r,i,n,a,o){e.tag=null,e.dump=r,yo(e,r,!1)||yo(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?(pp(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 Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?mo(e,t-1,e.dump,n):mo(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(dp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&cp(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Jt("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(_e,"writeNode");function gp(e,t){var r=[],i=[],n,a;for(ha(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(gp,"getDuplicateReferences");function ha(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)ha(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ha(e[i[n]],t,r)}p(ha,"inspectNode");function jw(e,t){t=t||{};var r=new ep(t);r.noRefs||gp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),_e(r,0,i,!0,!0)?r.dump+`
161
- `:""}p(jw,"dump$1");function Uw(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(Uw,"renamed");var mp=sf,yp=kw.load;/*! Bundled license information:
160
+ `+e.slice(o+1):l+=e.slice(n),l.slice(1)}p(go,"foldLine");function up(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Or(e,n),i=Pt[r],!i&&ti(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||tp(r);return t}p(up,"escapeString");function dp(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)),(we(e,t,s,!1,!1)||typeof s>"u"&&we(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(dp,"writeFlowSequence");function mo(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)),(we(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&we(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=ca(e,t)),e.dump&&Ui===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(mo,"writeBlockSequence");function fp(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)),we(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),we(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(fp,"writeFlowMapping");function pp(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 Jt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)d="",(!i||n!=="")&&(d+=ca(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),we(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ui===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=ca(e,t)),we(e,t+1,h,!0,u)&&(e.dump&&Ui===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(pp,"writeBlockMapping");function yo(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(Yf.call(s.represent,l))i=s.represent[l](t,l);else throw new Jt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(yo,"detectType");function we(e,t,r,i,n,a,o){e.tag=null,e.dump=r,yo(e,r,!1)||yo(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?(pp(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 Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?mo(e,t-1,e.dump,n):mo(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(dp(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&cp(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Jt("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(we,"writeNode");function gp(e,t){var r=[],i=[],n,a;for(ha(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(gp,"getDuplicateReferences");function ha(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)ha(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)ha(e[i[n]],t,r)}p(ha,"inspectNode");function Yv(e,t){t=t||{};var r=new ep(t);r.noRefs||gp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),we(r,0,i,!0,!0)?r.dump+`
161
+ `:""}p(Yv,"dump$1");function Vv(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(Vv,"renamed");var mp=sf,yp=Av.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 It={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},ch={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Bi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(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(Bi,"calculateDeltaAndAngle");var _t=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),bp=p(e=>({x:p(function(t,r,i){let n=0;const a=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:f,deltaX:g}=Bi(i[0],i[1]);n=It[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:f,deltaX:g}=Bi(i[i.length-1],i[i.length-2]);n=It[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const o=Math.abs(_t(t).x-_t(i[i.length-1]).x),s=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=It[e.arrowTypeStart],u=It[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 _t(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:f,deltaY:g}=Bi(i[0],i[1]);n=It[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:f,deltaY:g}=Bi(i[i.length-1],i[i.length-2]);n=It[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const o=Math.abs(_t(t).y-_t(i[i.length-1]).y),s=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=It[e.arrowTypeStart],u=It[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 _t(t).y+n},"y")}),"getLineFunctionsWithOffset"),za=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"),Gw=p(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),si=p(e=>{const t=Yw([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Yw=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),ml=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}=si(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];ml(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"),Z=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=si(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:Xw(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Xw=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"),_i={},Tt={},hh;function Vw(){return hh||(hh=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|&colon;)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt}var uh;function Zw(){if(uh)return _i;uh=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.sanitizeUrl=void 0;var e=Vw();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 _i.sanitizeUrl=a,_i}var xp=Zw(),_p=typeof global=="object"&&global&&global.Object===Object&&global,Kw=typeof self=="object"&&self&&self.Object===Object&&self,ve=_p||Kw||Function("return this")(),Xi=ve.Symbol,wp=Object.prototype,Qw=wp.hasOwnProperty,Jw=wp.toString,wi=Xi?Xi.toStringTag:void 0;function tC(e){var t=Qw.call(e,wi),r=e[wi];try{e[wi]=void 0;var i=!0}catch{}var n=Jw.call(e);return i&&(t?e[wi]=r:delete e[wi]),n}var eC=Object.prototype,rC=eC.toString;function iC(e){return rC.call(e)}var nC="[object Null]",aC="[object Undefined]",dh=Xi?Xi.toStringTag:void 0;function wr(e){return e==null?e===void 0?aC:nC:dh&&dh in Object(e)?tC(e):iC(e)}function Ve(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sC="[object AsyncFunction]",oC="[object Function]",lC="[object GeneratorFunction]",cC="[object Proxy]";function qa(e){if(!Ve(e))return!1;var t=wr(e);return t==oC||t==lC||t==sC||t==cC}var ks=ve["__core-js_shared__"],fh=(function(){var e=/[^.]+$/.exec(ks&&ks.keys&&ks.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function hC(e){return!!fh&&fh in e}var uC=Function.prototype,dC=uC.toString;function Cr(e){if(e!=null){try{return dC.call(e)}catch{}try{return e+""}catch{}}return""}var fC=/[\\^$.*+?()[\]{}|]/g,pC=/^\[object .+?Constructor\]$/,gC=Function.prototype,mC=Object.prototype,yC=gC.toString,bC=mC.hasOwnProperty,xC=RegExp("^"+yC.call(bC).replace(fC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _C(e){if(!Ve(e)||hC(e))return!1;var t=qa(e)?xC:pC;return t.test(Cr(e))}function wC(e,t){return e?.[t]}function vr(e,t){var r=wC(e,t);return _C(r)?r:void 0}var Vi=vr(Object,"create");function CC(){this.__data__=Vi?Vi(null):{},this.size=0}function vC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kC="__lodash_hash_undefined__",SC=Object.prototype,TC=SC.hasOwnProperty;function AC(e){var t=this.__data__;if(Vi){var r=t[e];return r===kC?void 0:r}return TC.call(t,e)?t[e]:void 0}var EC=Object.prototype,LC=EC.hasOwnProperty;function BC(e){var t=this.__data__;return Vi?t[e]!==void 0:LC.call(t,e)}var MC="__lodash_hash_undefined__";function $C(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Vi&&t===void 0?MC:t,this}function yr(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])}}yr.prototype.clear=CC;yr.prototype.delete=vC;yr.prototype.get=AC;yr.prototype.has=BC;yr.prototype.set=$C;function FC(){this.__data__=[],this.size=0}function an(e,t){return e===t||e!==e&&t!==t}function Wa(e,t){for(var r=e.length;r--;)if(an(e[r][0],t))return r;return-1}var RC=Array.prototype,OC=RC.splice;function IC(e){var t=this.__data__,r=Wa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():OC.call(t,r,1),--this.size,!0}function DC(e){var t=this.__data__,r=Wa(t,e);return r<0?void 0:t[r][1]}function NC(e){return Wa(this.__data__,e)>-1}function PC(e,t){var r=this.__data__,i=Wa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Pe(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])}}Pe.prototype.clear=FC;Pe.prototype.delete=IC;Pe.prototype.get=DC;Pe.prototype.has=NC;Pe.prototype.set=PC;var Zi=vr(ve,"Map");function zC(){this.size=0,this.__data__={hash:new yr,map:new(Zi||Pe),string:new yr}}function qC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ha(e,t){var r=e.__data__;return qC(t)?r[typeof t=="string"?"string":"hash"]:r.map}function WC(e){var t=Ha(this,e).delete(e);return this.size-=t?1:0,t}function HC(e){return Ha(this,e).get(e)}function jC(e){return Ha(this,e).has(e)}function UC(e,t){var r=Ha(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,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=zC;ze.prototype.delete=WC;ze.prototype.get=HC;ze.prototype.has=jC;ze.prototype.set=UC;var GC="Expected a function";function oi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(GC);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(oi.Cache||ze),r}oi.Cache=ze;function YC(){this.__data__=new Pe,this.size=0}function XC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function VC(e){return this.__data__.get(e)}function ZC(e){return this.__data__.has(e)}var KC=200;function QC(e,t){var r=this.__data__;if(r instanceof Pe){var i=r.__data__;if(!Zi||i.length<KC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new ze(i)}return r.set(e,t),this.size=r.size,this}function kr(e){var t=this.__data__=new Pe(e);this.size=t.size}kr.prototype.clear=YC;kr.prototype.delete=XC;kr.prototype.get=VC;kr.prototype.has=ZC;kr.prototype.set=QC;var ua=(function(){try{var e=vr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function ja(e,t,r){t=="__proto__"&&ua?ua(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function bo(e,t,r){(r!==void 0&&!an(e[t],r)||r===void 0&&!(t in e))&&ja(e,t,r)}function JC(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=JC(),vp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=vp&&typeof module=="object"&&module&&!module.nodeType&&module,tv=ph&&ph.exports===vp,gh=tv?ve.Buffer:void 0,mh=gh?gh.allocUnsafe:void 0;function kp(e,t){if(t)return e.slice();var r=e.length,i=mh?mh(r):new e.constructor(r);return e.copy(i),i}var xo=ve.Uint8Array;function Sp(e){var t=new e.constructor(e.byteLength);return new xo(t).set(new xo(e)),t}function Tp(e,t){var r=t?Sp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ap(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var yh=Object.create,ev=(function(){function e(){}return function(t){if(!Ve(t))return{};if(yh)return yh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Ep(e,t){return function(r){return e(t(r))}}var yl=Ep(Object.getPrototypeOf,Object),rv=Object.prototype;function sn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||rv;return e===r}function Lp(e){return typeof e.constructor=="function"&&!sn(e)?ev(yl(e)):{}}function li(e){return e!=null&&typeof e=="object"}var iv="[object Arguments]";function bh(e){return li(e)&&wr(e)==iv}var Bp=Object.prototype,nv=Bp.hasOwnProperty,av=Bp.propertyIsEnumerable,Ki=bh((function(){return arguments})())?bh:function(e){return li(e)&&nv.call(e,"callee")&&!av.call(e,"callee")},Qi=Array.isArray,sv=9007199254740991;function bl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sv}function on(e){return e!=null&&bl(e.length)&&!qa(e)}function Mp(e){return li(e)&&on(e)}function ov(){return!1}var $p=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xh=$p&&typeof module=="object"&&module&&!module.nodeType&&module,lv=xh&&xh.exports===$p,_h=lv?ve.Buffer:void 0,cv=_h?_h.isBuffer:void 0,Ua=cv||ov,hv="[object Object]",uv=Function.prototype,dv=Object.prototype,Fp=uv.toString,fv=dv.hasOwnProperty,pv=Fp.call(Object);function gv(e){if(!li(e)||wr(e)!=hv)return!1;var t=yl(e);if(t===null)return!0;var r=fv.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Fp.call(r)==pv}var mv="[object Arguments]",yv="[object Array]",bv="[object Boolean]",xv="[object Date]",_v="[object Error]",wv="[object Function]",Cv="[object Map]",vv="[object Number]",kv="[object Object]",Sv="[object RegExp]",Tv="[object Set]",Av="[object String]",Ev="[object WeakMap]",Lv="[object ArrayBuffer]",Bv="[object DataView]",Mv="[object Float32Array]",$v="[object Float64Array]",Fv="[object Int8Array]",Rv="[object Int16Array]",Ov="[object Int32Array]",Iv="[object Uint8Array]",Dv="[object Uint8ClampedArray]",Nv="[object Uint16Array]",Pv="[object Uint32Array]",bt={};bt[Mv]=bt[$v]=bt[Fv]=bt[Rv]=bt[Ov]=bt[Iv]=bt[Dv]=bt[Nv]=bt[Pv]=!0;bt[mv]=bt[yv]=bt[Lv]=bt[bv]=bt[Bv]=bt[xv]=bt[_v]=bt[wv]=bt[Cv]=bt[vv]=bt[kv]=bt[Sv]=bt[Tv]=bt[Av]=bt[Ev]=!1;function zv(e){return li(e)&&bl(e.length)&&!!bt[wr(e)]}function Rp(e){return function(t){return e(t)}}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pi=Op&&typeof module=="object"&&module&&!module.nodeType&&module,qv=Pi&&Pi.exports===Op,Ss=qv&&_p.process,_o=(function(){try{var e=Pi&&Pi.require&&Pi.require("util").types;return e||Ss&&Ss.binding&&Ss.binding("util")}catch{}})(),wh=_o&&_o.isTypedArray,Ga=wh?Rp(wh):zv;function wo(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Wv=Object.prototype,Hv=Wv.hasOwnProperty;function Ip(e,t,r){var i=e[t];(!(Hv.call(e,t)&&an(i,r))||r===void 0&&!(t in e))&&ja(e,t,r)}function Dp(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?ja(r,s,l):Ip(r,s,l)}return r}function jv(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Uv=9007199254740991,Gv=/^(?:0|[1-9]\d*)$/;function xl(e,t){var r=typeof e;return t=t??Uv,!!t&&(r=="number"||r!="symbol"&&Gv.test(e))&&e>-1&&e%1==0&&e<t}var Yv=Object.prototype,Xv=Yv.hasOwnProperty;function Np(e,t){var r=Qi(e),i=!r&&Ki(e),n=!r&&!i&&Ua(e),a=!r&&!i&&!n&&Ga(e),o=r||i||n||a,s=o?jv(e.length,String):[],l=s.length;for(var c in e)(t||Xv.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xl(c,l)))&&s.push(c);return s}function Vv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Zv=Object.prototype,Kv=Zv.hasOwnProperty;function Qv(e){if(!Ve(e))return Vv(e);var t=sn(e),r=[];for(var i in e)i=="constructor"&&(t||!Kv.call(e,i))||r.push(i);return r}function _l(e){return on(e)?Np(e,!0):Qv(e)}function Jv(e){return Dp(e,_l(e))}function tk(e,t,r,i,n,a,o){var s=wo(e,r),l=wo(t,r),c=o.get(l);if(c){bo(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=Qi(l),f=!d&&Ua(l),g=!d&&!f&&Ga(l);h=l,d||f||g?Qi(s)?h=s:Mp(s)?h=Ap(s):f?(u=!1,h=kp(l,!0)):g?(u=!1,h=Tp(l,!0)):h=[]:gv(l)||Ki(l)?(h=s,Ki(s)?h=Jv(s):(!Ve(s)||qa(s))&&(h=Lp(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),bo(e,r,h)}function Pp(e,t,r,i,n){e!==t&&Cp(t,function(a,o){if(n||(n=new kr),Ve(a))tk(e,t,o,r,Pp,i,n);else{var s=i?i(wo(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),bo(e,o,s)}},_l)}function wl(e){return e}function ek(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 zp(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),ek(e,this,s)}}function qp(e){return function(){return e}}var rk=ua?function(e,t){return ua(e,"toString",{configurable:!0,enumerable:!1,value:qp(t),writable:!0})}:wl,ik=800,nk=16,ak=Date.now;function sk(e){var t=0,r=0;return function(){var i=ak(),n=nk-(i-r);if(r=i,n>0){if(++t>=ik)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wp=sk(rk);function Hp(e,t){return Wp(zp(e,t,wl),e+"")}function jp(e,t,r){if(!Ve(r))return!1;var i=typeof t;return(i=="number"?on(r)&&xl(t,r.length):i=="string"&&t in r)?an(r[t],e):!1}function Up(e){return Hp(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&&jp(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=Up(function(e,t,r){Pp(e,t,r)}),Yp="​",ok={curveBasis:Ni,curveBasisClosed:F_,curveBasisOpen:R_,curveBumpX:fd,curveBumpY:pd,curveBundle:O_,curveCardinalClosed:I_,curveCardinalOpen:D_,curveCardinal:bd,curveCatmullRomClosed:N_,curveCatmullRomOpen:P_,curveCatmullRom:_d,curveLinear:ea,curveLinearClosed:z_,curveMonotoneX:Td,curveMonotoneY:Ad,curveNatural:Ld,curveStep:Bd,curveStepAfter:$d,curveStepBefore:Md},lk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ck=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);jn(o),i=kt(i,[...o])}else i=r.args;if(!i)return;let n=Ho(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}(?![{]${lk.source})(?=[}][%]{2}).*
166
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Ii.exec(e))!==null;)if(i.index===Ii.lastIndex&&Ii.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 I.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),hk=p(function(e){return e.replace(Ii,"")},"removeDirectives"),uk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Cl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return ok[r]??t}p(Cl,"interpolateToCurve");function Vp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?xp.sanitizeUrl(r):r}p(Vp,"formatUrl");var dk=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){I.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function vl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(vl,"distance");function Zp(e){let t,r=0;e.forEach(n=>{r+=vl(n,t),t=n});const i=r/2;return kl(e,i)}p(Zp,"traverseEdge");function Kp(e){return e.length===1?e[0]:Zp(e)}p(Kp,"calcLabelPosition");var vh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),kl=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=vl(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:vh((1-o)*r.x+o*n.x,5),y:vh((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),fk=p((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=kl(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 Qp(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=kl(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(Qp,"calcTerminalLabelPosition");function Sl(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(Sl,"getStylesFromArray");var kh=0,Jp=p(()=>(kh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kh),"generateId");function tg(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(tg,"makeRandomHex");var eg=p(e=>tg(e.length),"random"),pk=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"),gk=p(function(e,t){const r=t.text.replace(_r.lineBreakRegex," "),[,i]=ln(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"),rg=oi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),_r.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}=mk(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}`),mk=oi((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 Tl(e,t){return Al(e,t).height}p(Tl,"calculateTextHeight");function we(e,t){return Al(e,t).width}p(we,"calculateTextWidth");var Al=oi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=ln(r),o=["sans-serif",i],s=e.split(_r.lineBreakRegex),l=[],c=ut("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=pk();b.text=m||Yp;const x=gk(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}`),Yr,yk=(Yr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Yr,"InitIDGenerator"),Yr),vn,bk=p(function(e){return vn=vn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vn.innerHTML=e,unescape(vn.textContent)},"entityDecode");function El(e){return"str"in e}p(El,"isDetailedError");var xk=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"),ln=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 Ya(e,t){return Gp({},e,t)}p(Ya,"cleanAndMerge");var ae={assignWithDepth:kt,wrapLabel:rg,calculateTextHeight:Tl,calculateTextWidth:we,calculateTextDimensions:Al,cleanAndMerge:Ya,detectInit:ck,detectDirective:Xp,isSubstringInArray:uk,interpolateToCurve:Cl,calcLabelPosition:Kp,calcCardinalityPosition:fk,calcTerminalLabelPosition:Qp,formatUrl:Vp,getStylesFromArray:Sl,generateId:Jp,random:eg,runFunc:dk,entityDecode:bk,insertTitle:xk,isLabelCoordinateInPath:ig,parseFontSize:ln,InitIDGenerator:yk},_k=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"),Ze=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),wk=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Nt(e){return e??null}p(Nt,"handleUndefinedAttr");function ig(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(ig,"isLabelCoordinateInPath");const Ck=Object.freeze({left:0,top:0,width:16,height:16}),da=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ng=Object.freeze({...Ck,...da}),vk=Object.freeze({...ng,body:"",hidden:!1}),kk=Object.freeze({width:null,height:null}),Sk=Object.freeze({...kk,...da}),Tk=(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 Ts(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 Ts(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return Ts(s,r)?s:null}return null},Ts=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Ak(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 Sh(e,t){const r=Ak(e,t);for(const i in vk)i in da?i in e&&!(i in r)&&(r[i]=da[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Ek(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 Th(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Sh(i[s]||n[s],a)}return o(t),r.forEach(o),Sh(e,a)}function Lk(e,t){if(e.icons[t])return Th(e,t,[]);const r=Ek(e,[t])[t];return r?Th(e,t,r):null}const Bk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Mk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ah(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(Bk);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=Mk.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 $k(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 Fk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Rk(e,t,r){const i=$k(e);return Fk(i.defs,t+i.content+r)}const Ok=e=>e==="unset"||e==="undefined"||e==="none";function Ik(e,t){const r={...ng,...e},i={...Sk,...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 _=m.rotate;x?y?_+=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 C;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:C=n.height/2+n.top,b.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,b.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}_%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),b.length&&(a=Rk(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=Ah(u,l/c)):(h=o==="auto"?l:o,u=s===null?Ah(h,c/l):s==="auto"?c:s);const d={},f=(m,b)=>{Ok(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 Dk=/\sid="(\S+)"/g,Nk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Pk=0;function zk(e,t=Nk){const r=[];let i;for(;i=Dk.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+(Pk++).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 qk(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 Ll(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Sr=Ll();function ag(e){Sr=e}var zi={exec:()=>null};function pt(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(Gt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Gt={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")},Wk=/^(?:[ \t]*(?:\n|$))+/,Hk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Uk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bl=/(?:[*+-]|\d{1,9}[.)])/,sg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,og=pt(sg).replace(/bull/g,Bl).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(),Gk=pt(sg).replace(/bull/g,Bl).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(),Ml=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yk=/^[^\n]+/,$l=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Xk=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vk=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bl).getRegex(),Xa="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",Fl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zk=pt("^ {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",Fl).replace("tag",Xa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lg=pt(Ml).replace("hr",cn).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",Xa).getRegex(),Kk=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lg).getRegex(),Rl={blockquote:Kk,code:Hk,def:Xk,fences:jk,heading:Uk,hr:cn,html:Zk,lheading:og,list:Vk,newline:Wk,paragraph:lg,table:zi,text:Yk},Eh=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cn).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",Xa).getRegex(),Qk={...Rl,lheading:Gk,table:Eh,paragraph:pt(Ml).replace("hr",cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Eh).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",Xa).getRegex()},Jk={...Rl,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fl).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:zi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(Ml).replace("hr",cn).replace("heading",` *#{1,6} *[^
167
- ]`).replace("lheading",og).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cg=/^( {2,}|\\)\n(?!\s*$)/,rS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Va=/[\p{P}\p{S}]/u,Ol=/[\s\p{P}\p{S}]/u,hg=/[^\s\p{P}\p{S}]/u,iS=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ol).getRegex(),ug=/(?!~)[\p{P}\p{S}]/u,nS=/(?!~)[\s\p{P}\p{S}]/u,aS=/(?:[^\s\p{P}\p{S}]|~)/u,sS=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,dg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,oS=pt(dg,"u").replace(/punct/g,Va).getRegex(),lS=pt(dg,"u").replace(/punct/g,ug).getRegex(),fg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cS=pt(fg,"gu").replace(/notPunctSpace/g,hg).replace(/punctSpace/g,Ol).replace(/punct/g,Va).getRegex(),hS=pt(fg,"gu").replace(/notPunctSpace/g,aS).replace(/punctSpace/g,nS).replace(/punct/g,ug).getRegex(),uS=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hg).replace(/punctSpace/g,Ol).replace(/punct/g,Va).getRegex(),dS=pt(/\\(punct)/,"gu").replace(/punct/g,Va).getRegex(),fS=pt(/^<(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(),pS=pt(Fl).replace("(?:-->|$)","-->").getRegex(),gS=pt("^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",pS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,mS=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",fa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pg=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",fa).replace("ref",$l).getRegex(),gg=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",$l).getRegex(),yS=pt("reflink|nolink(?!\\()","g").replace("reflink",pg).replace("nolink",gg).getRegex(),Il={_backpedal:zi,anyPunctuation:dS,autolink:fS,blockSkip:sS,br:cg,code:eS,del:zi,emStrongLDelim:oS,emStrongRDelimAst:cS,emStrongRDelimUnd:uS,escape:tS,link:mS,nolink:gg,punctuation:iS,reflink:pg,reflinkSearch:yS,tag:gS,text:rS,url:zi},bS={...Il,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",fa).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fa).getRegex()},Co={...Il,emStrongRDelimAst:hS,emStrongLDelim:lS,url:pt(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},xS={...Co,br:pt(cg).replace("{2,}","*").getRegex(),text:pt(Co.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},kn={normal:Rl,gfm:Qk,pedantic:Jk},Ci={normal:Il,gfm:Co,breaks:xS,pedantic:bS},_S={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lh=e=>_S[e];function me(e,t){if(t){if(Gt.escapeTest.test(e))return e.replace(Gt.escapeReplace,Lh)}else if(Gt.escapeTestNoEncode.test(e))return e.replace(Gt.escapeReplaceNoEncode,Lh);return e}function Bh(e){try{e=encodeURI(e).replace(Gt.percentDecode,"%")}catch{return null}return e}function Mh(e,t){let r=e.replace(Gt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Gt.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(Gt.slashPipe,"|");return i}function vi(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 wS(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 $h(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 CS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
165
+ */var It={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},ch={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Bi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wt(e),t=wt(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(Bi,"calculateDeltaAndAngle");var wt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),bp=p(e=>({x:p(function(t,r,i){let n=0;const a=wt(i[0]).x<wt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:f,deltaX:g}=Bi(i[0],i[1]);n=It[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:f,deltaX:g}=Bi(i[i.length-1],i[i.length-2]);n=It[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const o=Math.abs(wt(t).x-wt(i[i.length-1]).x),s=Math.abs(wt(t).y-wt(i[i.length-1]).y),l=Math.abs(wt(t).x-wt(i[0]).x),c=Math.abs(wt(t).y-wt(i[0]).y),h=It[e.arrowTypeStart],u=It[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 wt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=wt(i[0]).y<wt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:f,deltaY:g}=Bi(i[0],i[1]);n=It[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:f,deltaY:g}=Bi(i[i.length-1],i[i.length-2]);n=It[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const o=Math.abs(wt(t).y-wt(i[i.length-1]).y),s=Math.abs(wt(t).x-wt(i[i.length-1]).x),l=Math.abs(wt(t).y-wt(i[0]).y),c=Math.abs(wt(t).x-wt(i[0]).x),h=It[e.arrowTypeStart],u=It[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 wt(t).y+n},"y")}),"getLineFunctionsWithOffset"),za=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"),Xv=p(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),si=p(e=>{const t=Zv([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Zv=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),ml=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"),V=p(e=>{const{stylesArray:t}=si(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];ml(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"),Z=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=si(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:Kv(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Kv=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"),wi={},Tt={},hh;function Qv(){return hh||(hh=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|&colon;)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt}var uh;function Jv(){if(uh)return wi;uh=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.sanitizeUrl=void 0;var e=Qv();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 wi.sanitizeUrl=a,wi}var xp=Jv(),wp=typeof global=="object"&&global&&global.Object===Object&&global,t_=typeof self=="object"&&self&&self.Object===Object&&self,Ce=wp||t_||Function("return this")(),Vi=Ce.Symbol,vp=Object.prototype,e_=vp.hasOwnProperty,r_=vp.toString,vi=Vi?Vi.toStringTag:void 0;function i_(e){var t=e_.call(e,vi),r=e[vi];try{e[vi]=void 0;var i=!0}catch{}var n=r_.call(e);return i&&(t?e[vi]=r:delete e[vi]),n}var n_=Object.prototype,a_=n_.toString;function s_(e){return a_.call(e)}var o_="[object Null]",l_="[object Undefined]",dh=Vi?Vi.toStringTag:void 0;function vr(e){return e==null?e===void 0?l_:o_:dh&&dh in Object(e)?i_(e):s_(e)}function Xe(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 qa(e){if(!Xe(e))return!1;var t=vr(e);return t==h_||t==u_||t==c_||t==d_}var ks=Ce["__core-js_shared__"],fh=(function(){var e=/[^.]+$/.exec(ks&&ks.keys&&ks.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function f_(e){return!!fh&&fh in e}var p_=Function.prototype,g_=p_.toString;function _r(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,w_=b_.toString,v_=x_.hasOwnProperty,__=RegExp("^"+w_.call(v_).replace(m_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function C_(e){if(!Xe(e)||f_(e))return!1;var t=qa(e)?__:y_;return t.test(_r(e))}function k_(e,t){return e?.[t]}function Cr(e,t){var r=k_(e,t);return C_(r)?r:void 0}var Xi=Cr(Object,"create");function S_(){this.__data__=Xi?Xi(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(Xi){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 Xi?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]=Xi&&t===void 0?R_:t,this}function yr(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])}}yr.prototype.clear=S_;yr.prototype.delete=T_;yr.prototype.get=B_;yr.prototype.has=F_;yr.prototype.set=O_;function I_(){this.__data__=[],this.size=0}function an(e,t){return e===t||e!==e&&t!==t}function Ha(e,t){for(var r=e.length;r--;)if(an(e[r][0],t))return r;return-1}var D_=Array.prototype,N_=D_.splice;function P_(e){var t=this.__data__,r=Ha(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=Ha(t,e);return r<0?void 0:t[r][1]}function q_(e){return Ha(this.__data__,e)>-1}function H_(e,t){var r=this.__data__,i=Ha(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Pe(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])}}Pe.prototype.clear=I_;Pe.prototype.delete=P_;Pe.prototype.get=z_;Pe.prototype.has=q_;Pe.prototype.set=H_;var Zi=Cr(Ce,"Map");function W_(){this.size=0,this.__data__={hash:new yr,map:new(Zi||Pe),string:new yr}}function j_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wa(e,t){var r=e.__data__;return j_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function U_(e){var t=Wa(this,e).delete(e);return this.size-=t?1:0,t}function G_(e){return Wa(this,e).get(e)}function Y_(e){return Wa(this,e).has(e)}function V_(e,t){var r=Wa(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,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=W_;ze.prototype.delete=U_;ze.prototype.get=G_;ze.prototype.has=Y_;ze.prototype.set=V_;var X_="Expected a function";function oi(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(oi.Cache||ze),r}oi.Cache=ze;function Z_(){this.__data__=new Pe,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 Pe){var i=r.__data__;if(!Zi||i.length<tC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new ze(i)}return r.set(e,t),this.size=r.size,this}function kr(e){var t=this.__data__=new Pe(e);this.size=t.size}kr.prototype.clear=Z_;kr.prototype.delete=K_;kr.prototype.get=Q_;kr.prototype.has=J_;kr.prototype.set=eC;var ua=(function(){try{var e=Cr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function ja(e,t,r){t=="__proto__"&&ua?ua(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function bo(e,t,r){(r!==void 0&&!an(e[t],r)||r===void 0&&!(t in e))&&ja(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 _p=rC(),Cp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ph=Cp&&typeof module=="object"&&module&&!module.nodeType&&module,iC=ph&&ph.exports===Cp,gh=iC?Ce.Buffer:void 0,mh=gh?gh.allocUnsafe:void 0;function kp(e,t){if(t)return e.slice();var r=e.length,i=mh?mh(r):new e.constructor(r);return e.copy(i),i}var xo=Ce.Uint8Array;function Sp(e){var t=new e.constructor(e.byteLength);return new xo(t).set(new xo(e)),t}function Tp(e,t){var r=t?Sp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ap(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var yh=Object.create,nC=(function(){function e(){}return function(t){if(!Xe(t))return{};if(yh)return yh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Ep(e,t){return function(r){return e(t(r))}}var yl=Ep(Object.getPrototypeOf,Object),aC=Object.prototype;function sn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||aC;return e===r}function Lp(e){return typeof e.constructor=="function"&&!sn(e)?nC(yl(e)):{}}function li(e){return e!=null&&typeof e=="object"}var sC="[object Arguments]";function bh(e){return li(e)&&vr(e)==sC}var Bp=Object.prototype,oC=Bp.hasOwnProperty,lC=Bp.propertyIsEnumerable,Ki=bh((function(){return arguments})())?bh:function(e){return li(e)&&oC.call(e,"callee")&&!lC.call(e,"callee")},Qi=Array.isArray,cC=9007199254740991;function bl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cC}function on(e){return e!=null&&bl(e.length)&&!qa(e)}function Mp(e){return li(e)&&on(e)}function hC(){return!1}var $p=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xh=$p&&typeof module=="object"&&module&&!module.nodeType&&module,uC=xh&&xh.exports===$p,wh=uC?Ce.Buffer:void 0,dC=wh?wh.isBuffer:void 0,Ua=dC||hC,fC="[object Object]",pC=Function.prototype,gC=Object.prototype,Fp=pC.toString,mC=gC.hasOwnProperty,yC=Fp.call(Object);function bC(e){if(!li(e)||vr(e)!=fC)return!1;var t=yl(e);if(t===null)return!0;var r=mC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Fp.call(r)==yC}var xC="[object Arguments]",wC="[object Array]",vC="[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[wC]=bt[$C]=bt[vC]=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 li(e)&&bl(e.length)&&!!bt[vr(e)]}function Rp(e){return function(t){return e(t)}}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pi=Op&&typeof module=="object"&&module&&!module.nodeType&&module,jC=Pi&&Pi.exports===Op,Ss=jC&&wp.process,wo=(function(){try{var e=Pi&&Pi.require&&Pi.require("util").types;return e||Ss&&Ss.binding&&Ss.binding("util")}catch{}})(),vh=wo&&wo.isTypedArray,Ga=vh?Rp(vh):WC;function vo(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var UC=Object.prototype,GC=UC.hasOwnProperty;function Ip(e,t,r){var i=e[t];(!(GC.call(e,t)&&an(i,r))||r===void 0&&!(t in e))&&ja(e,t,r)}function Dp(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?ja(r,s,l):Ip(r,s,l)}return r}function YC(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 xl(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 Np(e,t){var r=Qi(e),i=!r&&Ki(e),n=!r&&!i&&Ua(e),a=!r&&!i&&!n&&Ga(e),o=r||i||n||a,s=o?YC(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")||xl(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(!Xe(e))return QC(e);var t=sn(e),r=[];for(var i in e)i=="constructor"&&(t||!tk.call(e,i))||r.push(i);return r}function wl(e){return on(e)?Np(e,!0):ek(e)}function rk(e){return Dp(e,wl(e))}function ik(e,t,r,i,n,a,o){var s=vo(e,r),l=vo(t,r),c=o.get(l);if(c){bo(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=Qi(l),f=!d&&Ua(l),g=!d&&!f&&Ga(l);h=l,d||f||g?Qi(s)?h=s:Mp(s)?h=Ap(s):f?(u=!1,h=kp(l,!0)):g?(u=!1,h=Tp(l,!0)):h=[]:bC(l)||Ki(l)?(h=s,Ki(s)?h=rk(s):(!Xe(s)||qa(s))&&(h=Lp(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),bo(e,r,h)}function Pp(e,t,r,i,n){e!==t&&_p(t,function(a,o){if(n||(n=new kr),Xe(a))ik(e,t,o,r,Pp,i,n);else{var s=i?i(vo(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),bo(e,o,s)}},wl)}function vl(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 _h=Math.max;function zp(e,t,r){return t=_h(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=_h(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 qp(e){return function(){return e}}var ak=ua?function(e,t){return ua(e,"toString",{configurable:!0,enumerable:!1,value:qp(t),writable:!0})}:vl,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 Hp=ck(ak);function Wp(e,t){return Hp(zp(e,t,vl),e+"")}function jp(e,t,r){if(!Xe(r))return!1;var i=typeof t;return(i=="number"?on(r)&&xl(t,r.length):i=="string"&&t in r)?an(r[t],e):!1}function Up(e){return Wp(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&&jp(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=Up(function(e,t,r){Pp(e,t,r)}),Yp="​",hk={curveBasis:Ni,curveBasisClosed:Iw,curveBasisOpen:Dw,curveBumpX:fd,curveBumpY:pd,curveBundle:Nw,curveCardinalClosed:Pw,curveCardinalOpen:zw,curveCardinal:bd,curveCatmullRomClosed:qw,curveCatmullRomOpen:Hw,curveCatmullRom:wd,curveLinear:ea,curveLinearClosed:Ww,curveMonotoneX:Td,curveMonotoneY:Ad,curveNatural:Ld,curveStep:Bd,curveStepAfter:$d,curveStepBefore:Md},uk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dk=p(function(e,t){const r=Vp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);jn(o),i=kt(i,[...o])}else i=r.args;if(!i)return;let n=Wo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Vp=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${uk.source})(?=[}][%]{2}).*
166
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Ii.exec(e))!==null;)if(i.index===Ii.lastIndex&&Ii.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 P.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(Ii,"")},"removeDirectives"),pk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function _l(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return hk[r]??t}p(_l,"interpolateToCurve");function Xp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?xp.sanitizeUrl(r):r}p(Xp,"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){P.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Cl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Cl,"distance");function Zp(e){let t,r=0;e.forEach(n=>{r+=Cl(n,t),t=n});const i=r/2;return kl(e,i)}p(Zp,"traverseEdge");function Kp(e){return e.length===1?e[0]:Zp(e)}p(Kp,"calcLabelPosition");var Ch=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),kl=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Cl(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:Ch((1-o)*r.x+o*n.x,5),y:Ch((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)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=kl(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 Qp(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=kl(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(Qp,"calcTerminalLabelPosition");function Sl(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(Sl,"getStylesFromArray");var kh=0,Jp=p(()=>(kh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kh),"generateId");function tg(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(tg,"makeRandomHex");var eg=p(e=>tg(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(wr.lineBreakRegex," "),[,i]=ln(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"),rg=oi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),wr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=ve(`${o} `,r),c=ve(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=oi((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(ve(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 Tl(e,t){return Al(e,t).height}p(Tl,"calculateTextHeight");function ve(e,t){return Al(e,t).width}p(ve,"calculateTextWidth");var Al=oi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=ln(r),o=["sans-serif",i],s=e.split(wr.lineBreakRegex),l=[],c=ut("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||Yp;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}`),Yr,wk=(Yr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Yr,"InitIDGenerator"),Yr),Cn,vk=p(function(e){return Cn=Cn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Cn.innerHTML=e,unescape(Cn.textContent)},"entityDecode");function El(e){return"str"in e}p(El,"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"),ln=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 Ya(e,t){return Gp({},e,t)}p(Ya,"cleanAndMerge");var ae={assignWithDepth:kt,wrapLabel:rg,calculateTextHeight:Tl,calculateTextWidth:ve,calculateTextDimensions:Al,cleanAndMerge:Ya,detectInit:dk,detectDirective:Vp,isSubstringInArray:pk,interpolateToCurve:_l,calcLabelPosition:Kp,calcCardinalityPosition:mk,calcTerminalLabelPosition:Qp,formatUrl:Xp,getStylesFromArray:Sl,generateId:Jp,random:eg,runFunc:gk,entityDecode:vk,insertTitle:_k,isLabelCoordinateInPath:ig,parseFontSize:ln,InitIDGenerator:wk},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"),Ze=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 Nt(e){return e??null}p(Nt,"handleUndefinedAttr");function ig(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(ig,"isLabelCoordinateInPath");const Sk=Object.freeze({left:0,top:0,width:16,height:16}),da=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ng=Object.freeze({...Sk,...da}),Tk=Object.freeze({...ng,body:"",hidden:!1}),Ak=Object.freeze({width:null,height:null}),Ek=Object.freeze({...Ak,...da}),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 Ts(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 Ts(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return Ts(s,r)?s:null}return null},Ts=(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 Sh(e,t){const r=Bk(e,t);for(const i in Tk)i in da?i in e&&!(i in r)&&(r[i]=da[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 Th(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Sh(i[s]||n[s],a)}return o(t),r.forEach(o),Sh(e,a)}function $k(e,t){if(e.icons[t])return Th(e,t,[]);const r=Mk(e,[t])[t];return r?Th(e,t,r):null}const Fk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Rk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ah(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={...ng,...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 w=m.rotate;x?y?w+=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(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){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}w%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=Ah(u,l/c)):(h=o==="auto"?l:o,u=s===null?Ah(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 Ll(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Sr=Ll();function ag(e){Sr=e}var zi={exec:()=>null};function pt(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(Gt.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var Gt={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|$))+/,Gk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bl=/(?:[*+-]|\d{1,9}[.)])/,sg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,og=pt(sg).replace(/bull/g,Bl).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=pt(sg).replace(/bull/g,Bl).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(),Ml=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zk=/^[^\n]+/,$l=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Kk=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qk=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bl).getRegex(),Va="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",Fl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jk=pt("^ {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",Fl).replace("tag",Va).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lg=pt(Ml).replace("hr",cn).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",Va).getRegex(),tS=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lg).getRegex(),Rl={blockquote:tS,code:Gk,def:Kk,fences:Yk,heading:Vk,hr:cn,html:Jk,lheading:og,list:Qk,newline:Uk,paragraph:lg,table:zi,text:Zk},Eh=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cn).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",Va).getRegex(),eS={...Rl,lheading:Xk,table:Eh,paragraph:pt(Ml).replace("hr",cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Eh).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",Va).getRegex()},rS={...Rl,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fl).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:zi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(Ml).replace("hr",cn).replace("heading",` *#{1,6} *[^
167
+ ]`).replace("lheading",og).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},iS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cg=/^( {2,}|\\)\n(?!\s*$)/,aS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xa=/[\p{P}\p{S}]/u,Ol=/[\s\p{P}\p{S}]/u,hg=/[^\s\p{P}\p{S}]/u,sS=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ol).getRegex(),ug=/(?!~)[\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,dg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hS=pt(dg,"u").replace(/punct/g,Xa).getRegex(),uS=pt(dg,"u").replace(/punct/g,ug).getRegex(),fg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dS=pt(fg,"gu").replace(/notPunctSpace/g,hg).replace(/punctSpace/g,Ol).replace(/punct/g,Xa).getRegex(),fS=pt(fg,"gu").replace(/notPunctSpace/g,lS).replace(/punctSpace/g,oS).replace(/punct/g,ug).getRegex(),pS=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hg).replace(/punctSpace/g,Ol).replace(/punct/g,Xa).getRegex(),gS=pt(/\\(punct)/,"gu").replace(/punct/g,Xa).getRegex(),mS=pt(/^<(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=pt(Fl).replace("(?:-->|$)","-->").getRegex(),bS=pt("^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(),fa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,xS=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",fa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pg=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",fa).replace("ref",$l).getRegex(),gg=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",$l).getRegex(),wS=pt("reflink|nolink(?!\\()","g").replace("reflink",pg).replace("nolink",gg).getRegex(),Il={_backpedal:zi,anyPunctuation:gS,autolink:mS,blockSkip:cS,br:cg,code:nS,del:zi,emStrongLDelim:hS,emStrongRDelimAst:dS,emStrongRDelimUnd:pS,escape:iS,link:xS,nolink:gg,punctuation:sS,reflink:pg,reflinkSearch:wS,tag:bS,text:aS,url:zi},vS={...Il,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",fa).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fa).getRegex()},_o={...Il,emStrongRDelimAst:fS,emStrongLDelim:uS,url:pt(/^((?: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={..._o,br:pt(cg).replace("{2,}","*").getRegex(),text:pt(_o.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},kn={normal:Rl,gfm:eS,pedantic:rS},_i={normal:Il,gfm:_o,breaks:_S,pedantic:vS},CS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lh=e=>CS[e];function me(e,t){if(t){if(Gt.escapeTest.test(e))return e.replace(Gt.escapeReplace,Lh)}else if(Gt.escapeTestNoEncode.test(e))return e.replace(Gt.escapeReplaceNoEncode,Lh);return e}function Bh(e){try{e=encodeURI(e).replace(Gt.percentDecode,"%")}catch{return null}return e}function Mh(e,t){let r=e.replace(Gt.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Gt.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(Gt.slashPipe,"|");return i}function Ci(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 $h(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(`
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
- `)}var pa=class{options;rules;lexer;constructor(t){this.options=t||Sr}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:vi(i,`
170
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=CS(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=vi(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:vi(r[0],`
171
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=vi(r[0],`
169
+ `)}var pa=class{options;rules;lexer;constructor(t){this.options=t||Sr}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:Ci(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=Ci(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:Ci(r[0],`
171
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ci(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(`
174
174
  `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
@@ -182,13 +182,13 @@ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
182
182
  `);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
183
183
  `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),f=t.split(`
184
184
  `,1)[0],g=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(h+=f+`
185
- `,t=t.substring(f.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),C=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){let k=t.split(`
186
- `,1)[0],$;if(f=k,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),$=f):$=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||w.test(f)||v.test(f)||y.test(f)||_.test(f))break;if($.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
187
- `+$.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||w.test(d)||_.test(d))break;u+=`
185
+ `,t=t.substring(f.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),_=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let k=t.split(`
186
+ `,1)[0],B;if(f=k,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),B=f):B=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||v.test(f)||C.test(f)||y.test(f)||w.test(f))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
187
+ `+B.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(d)||v.test(d)||w.test(d))break;u+=`
188
188
  `+f}!g&&!f.trim()&&(g=!0),h+=k+`
189
- `,t=t.substring(k.length+1),d=$.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=Mh(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
189
+ `,t=t.substring(k.length+1),d=B.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=Mh(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(Mh(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=vi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=wS(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)),$h(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 $h(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}}}},Fe=class vo{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Sr,this.options.tokenizer=this.options.tokenizer||new pa,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:Gt,block:kn.normal,inline:Ci.normal};this.options.pedantic?(r.block=kn.pedantic,r.inline=Ci.pedantic):this.options.gfm&&(r.block=kn.gfm,this.options.breaks?r.inline=Ci.breaks:r.inline=Ci.gfm),this.tokenizer.rules=r}static get rules(){return{block:kn,inline:Ci}}static lex(t,r){return new vo(r).lex(t)}static lexInline(t,r){return new vo(r).inlineTokens(t)}lex(t){t=t.replace(Gt.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=Ci(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)),$h(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 $h(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}}}},Fe=class Co{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Sr,this.options.tokenizer=this.options.tokenizer||new pa,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:Gt,block:kn.normal,inline:_i.normal};this.options.pedantic?(r.block=kn.pedantic,r.inline=_i.pedantic):this.options.gfm&&(r.block=kn.gfm,this.options.breaks?r.inline=_i.breaks:r.inline=_i.gfm),this.tokenizer.rules=r}static get rules(){return{block:kn,inline:_i}}static lex(t,r){return new Co(r).lex(t)}static lexInline(t,r){return new Co(r).inlineTokens(t)}lex(t){t=t.replace(Gt.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(Gt.tabCharGlobal," ").replace(Gt.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=Bh(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=Bh(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)}},Dl=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""}},Re=class ko{options;renderer;textRenderer;constructor(t){this.options=t||Sr,this.options.renderer=this.options.renderer||new ga,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dl}static parse(t,r){return new ko(r).parse(t)}static parseInline(t,r){return new ko(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}},Mi=class{options;block;constructor(t){this.options=t||Sr}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?Fe.lex:Fe.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},vS=class{defaults=Ll();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Re;Renderer=ga;TextRenderer=Dl;Lexer=Fe;Tokenizer=pa;Hooks=Mi;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 ga(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 pa(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 Mi;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];Mi.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async&&Mi.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 Fe.lex(t,r??this.defaults)}parser(t,r){return Re.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?Fe.lex:Fe.lexInline,l=a.hooks?a.hooks.provideParser():t?Re.parse:Re.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}}},br=new vS;function ft(e,t){return br.parse(e,t)}ft.options=ft.setOptions=function(e){return br.setOptions(e),ft.defaults=br.defaults,ag(ft.defaults),ft};ft.getDefaults=Ll;ft.defaults=Sr;ft.use=function(...e){return br.use(...e),ft.defaults=br.defaults,ag(ft.defaults),ft};ft.walkTokens=function(e,t){return br.walkTokens(e,t)};ft.parseInline=br.parseInline;ft.Parser=Re;ft.parser=Re.parse;ft.Renderer=ga;ft.TextRenderer=Dl;ft.Lexer=Fe;ft.lexer=Fe.lex;ft.Tokenizer=pa;ft.Hooks=Mi;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;Re.parse;Fe.lex;function mg(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}},Mi=class{options;block;constructor(t){this.options=t||Sr}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?Fe.lex:Fe.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},TS=class{defaults=Ll();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Re;Renderer=ga;TextRenderer=Dl;Lexer=Fe;Tokenizer=pa;Hooks=Mi;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 ga(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 pa(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 Mi;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];Mi.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async&&Mi.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 Fe.lex(t,r??this.defaults)}parser(t,r){return Re.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?Fe.lex:Fe.lexInline,l=a.hooks?a.hooks.provideParser():t?Re.parse:Re.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}}},br=new TS;function ft(e,t){return br.parse(e,t)}ft.options=ft.setOptions=function(e){return br.setOptions(e),ft.defaults=br.defaults,ag(ft.defaults),ft};ft.getDefaults=Ll;ft.defaults=Sr;ft.use=function(...e){return br.use(...e),ft.defaults=br.defaults,ag(ft.defaults),ft};ft.walkTokens=function(e,t){return br.walkTokens(e,t)};ft.parseInline=br.parseInline;ft.Parser=Re;ft.parser=Re.parse;ft.Renderer=ga;ft.TextRenderer=Dl;ft.Lexer=Fe;ft.lexer=Fe.lex;ft.Tokenizer=pa;ft.Hooks=Mi;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;Re.parse;Fe.lex;function mg(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 yg={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},So=new Map,bg=new Map,xg=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(I.debug("Registering icon pack:",t.name),"loader"in t)bg.set(t.name,t.loader);else if("icons"in t)So.set(t.name,t.icons);else throw I.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=Tk(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=So.get(i);if(!n){const o=bg.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},So.set(i,n)}catch(s){throw I.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Lk(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),kS=p(async e=>{try{return await _g(e),!0}catch{return!1}},"isIconAvailable"),ci=p(async(e,t,r)=>{let i;try{i=await _g(e,t?.fallbackPrefix)}catch(o){I.error(o),i=yg}const n=Ik(i,t),a=qk(zk(n.body),{...n.attributes,...r});return re(a,$t())},"getIconSVG");function wg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
230
+ `)),o+=u+i[l+1]}),o}var yg={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},So=new Map,bg=new Map,xg=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(P.debug("Registering icon pack:",t.name),"loader"in t)bg.set(t.name,t.loader);else if("icons"in t)So.set(t.name,t.icons);else throw P.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=So.get(i);if(!n){const o=bg.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},So.set(i,n)}catch(s){throw P.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"),ci=p(async(e,t,r)=>{let i;try{i=await wg(e,t?.fallbackPrefix)}catch(o){P.error(o),i=yg}const n=Pk(i,t),a=jk(Wk(n.body),{...n.attributes,...r});return re(a,$t())},"getIconSVG");function vg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
231
231
  `).replace(/\n{2,}/g,`
232
- `),n=mg(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(wg,"preprocessMarkdown");function Cg(e,t={}){const r=wg(e,t),i=ft.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 vg(e,{markdownAutoWrap:t}={}){const r=ft.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:(I.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(vg,"markdownToHTML");function kg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(kg,"splitTextToChars");function Sg(e,t){const r=kg(t.content);return Nl(e,[],r,t.type)}p(Sg,"splitWordToFitWidth");function Nl(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}])?Nl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Nl,"splitWordToFitWidthRecursion");function Tg(e,t){if(e.some(({content:r})=>r.includes(`
234
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ma(e,t)}p(Tg,"splitLineToFitWidth");function ma(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 ma(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Sg(t,a);r.push([s]),l.content&&e.unshift(l)}return ma(e,t,r)}p(ma,"splitLineToFitWidthRecursion");function To(e,t){t&&e.attr("style",t)}p(To,"applyStyle");async function Ag(e,t,r,i,n=!1,a=$t()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=pr(t.label)?await La(t.label.replace(_r.lineBreakRegex,`
235
- `),a):re(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),To(h,t.labelStyle),h.attr("class",`${c} ${i}`),To(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(Ag,"addHtmlSpan");function Za(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(Za,"createTspan");function Eg(e,t,r){const i=e.append("text"),n=Za(i,1,t);Ka(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Eg,"computeWidthOfText");function Lg(e,t,r){const i=e.append("text"),n=Za(i,1,t);Ka(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Lg,"computeDimensionOfText");function Bg(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=>Eg(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:Tg(c,h);for(const d of u){const f=Za(s,l,1.1);Ka(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(Bg,"createFormattedText");function Ka(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(Ka,"updateTextContentAndStyles");async function Pl(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{const s=`${a}:${o}`;return await kS(s)?await ci(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(Pl,"replaceIconSubstring");var qe=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(I.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=vg(t,c),u=await Pl(Ze(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:pr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await Ag(e,f,s,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=Cg(h.replace("<br>","<br/>"),c),d=Bg(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:");ut(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(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:");ut(d).select("text").attr("style",g)}return d}},"createText");function As(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 SS(e,t){return e[0]===t[0]&&e[1]===t[1]}function TS(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)As(c,s,n);const l=(function(c,h,u){const d=[];for(const y of c){const _=[...y];SS(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&d.push(_)}const f=[];h=Math.max(h,.1);const g=[];for(const y of d)for(let _=0;_<y.length-1;_++){const C=y[_],w=y[_+1];if(C[1]!==w[1]){const v=Math.min(C[1],w[1]);g.push({ymin:v,ymax:Math.max(C[1],w[1]),x:v===C[1]?C[0]:w[0],islope:(w[0]-C[0])/(w[1]-C[1])})}}if(g.sort(((y,_)=>y.ymin<_.ymin?-1:y.ymin>_.ymin?1:y.x<_.x?-1:y.x>_.x?1:y.ymax===_.ymax?0:(y.ymax-_.ymax)/Math.abs(y.ymax-_.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 _=0;_<g.length&&!(g[_].ymin>b);_++)y=_;g.splice(0,y+1).forEach((_=>{m.push({s:b,edge:_})}))}if(m=m.filter((y=>!(y.edge.ymax<=b))),m.sort(((y,_)=>y.edge.x===_.edge.x?0:(y.edge.x-_.edge.x)/Math.abs(y.edge.x-_.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let y=0;y<m.length;y+=2){const _=y+1;if(_>=m.length)break;const C=m[y].edge,w=m[_].edge;f.push([[Math.round(C.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)As(c,s,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),As(d,h,u)})(l,s,-n)}return l}function hn(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),TS(e,n,i,a||1)}class zl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=hn(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 Qa(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 AS extends zl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=hn(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)Qa([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 ES extends zl{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 LS{constructor(t){this.helper=t}fillPolygons(t,r){const i=hn(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=Qa(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 BS{constructor(t){this.helper=t}fillPolygons(t,r){const i=hn(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=Qa(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 MS{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=hn(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=Qa(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 Kt={};class $S{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const FS=0,Es=1,Fh=2,Sn={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 Ls(e,t){return e.type===t}function ql(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:FS,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:Es,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Fh,text:""},s})(e);let i="BOD",n=0,a=r[n];for(;!Ls(a,Fh);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ql("M0,0"+e);n++,o=Sn[a.text],i=a.text}else Ls(a,Es)?o=Sn[i]:(n++,o=Sn[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(!Ls(c,Es))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Sn[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 Mg(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 $g(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)&&(Fg(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 ki(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Fg(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]=ki(e,t,-h),[r,i]=ki(r,i,-h);const D=(e-r)/2,L=(t-i)/2;let F=D*D/(n*n)+L*L/(a*a);F>1&&(F=Math.sqrt(F),n*=F,a*=F);const A=n*n,O=a*a,B=A*O-A*L*L-O*D*D,q=A*L*L+O*D*D,H=(s===l?-1:1)*Math.sqrt(Math.abs(B/q));m=H*n*L/a+(e+r)/2,b=H*-a*D/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 D=g,L=r,F=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Fg(r=m+n*Math.cos(g),i=b+a*Math.sin(g),L,F,n,a,o,0,l,[g,D,m,b])}x=g-f;const y=Math.cos(f),_=Math.sin(f),C=Math.cos(g),w=Math.sin(g),v=Math.tan(x/4),k=4/3*n*v,$=4/3*a*v,E=[e,t],R=[e+k*_,t-$*y],M=[r+k*w,i-$*C],N=[r,i];if(R[0]=2*E[0]-R[0],R[1]=2*E[1]-R[1],c)return[R,M,N].concat(d);{d=[R,M,N].concat(d);const D=[];for(let L=0;L<d.length;L+=3){const F=ki(d[L][0],d[L][1],h),A=ki(d[L+1][0],d[L+1][1],h),O=ki(d[L+2][0],d[L+2][1],h);D.push([F[0],F[1],A[0],A[1],O[0],O[1]])}return D}}const RS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return ya(e,t,r)},ellipse:function(e,t,r,i,n){const a=Og(r,i,n);return Ao(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Ye(e,t,r,i,n,!0)}};function Rg(e,t,r,i,n){return{type:"path",ops:Ye(e,t,r,i,n)}}function Pn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Ye(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Ye(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Rg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function OS(e,t,r,i,n){return(function(a,o){return Pn(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Rh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Tn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Tn(r[0],1.5*(1+.22*t.roughness),Dh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Tn(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Tn(o,1.5*(1+.22*t.roughness),Dh(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 Og(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 Ao(e,t,r,i){const[n,a]=Nh(i.increment,e,t,i.rx,i.ry,1,i.increment*ya(.1,ya(.4,1,r),r),r);let o=ba(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Nh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ba(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Oh(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=Ph(b,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const y=Ph(b,c,h,u,d,f,g,1.5,l);x.push(...y)}return o&&(s?x.push(...Ye(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Ye(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 Ih(e,t){const r=$g(Mg(ql(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(...Ye(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(...IS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Ye(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Bs(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 $r(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Kt[n])switch(n){case"zigzag":Kt[n]||(Kt[n]=new AS(i));break;case"cross-hatch":Kt[n]||(Kt[n]=new ES(i));break;case"dots":Kt[n]||(Kt[n]=new LS(i));break;case"dashed":Kt[n]||(Kt[n]=new BS(i));break;case"zigzag-line":Kt[n]||(Kt[n]=new MS(i));break;default:n="hachure",Kt[n]||(Kt[n]=new zl(i))}return Kt[n]})(t,RS).fillPolygons(e,t)}function Dh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ig(e){return e.randomizer||(e.randomizer=new $S(e.seed||0)),e.randomizer.next()}function ya(e,t,r,i=1){return r.roughness*i*(Ig(r)*(t-e)+e)}function st(e,t,r=1){return ya(-e,e,t,r)}function Ye(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Eo(e,t,r,i,n,!0,!1);if(o)return s;const l=Eo(e,t,r,i,n,!0,!0);return s.concat(l)}function Eo(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*Ig(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 Tn(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 ba(i,null,r)}function ba(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(...Eo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Nh(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 Ph(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)]),ba(h,null,l)}function IS(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 Si(e){return[...e]}function zh(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(Si(e[0]),Si(e[1]),Si(e[2]),Si(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(Si(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 zn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function DS(e,t,r){const i=zn(t,r);if(i===0)return zn(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)),zn(e,nr(t,r,n))}function nr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Lo(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(zn(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=nr(l,c,.5),f=nr(c,h,.5),g=nr(h,u,.5),m=nr(d,f,.5),b=nr(f,g,.5),x=nr(m,b,.5);Lo([l,d,m,x],0,r,n),Lo([x,b,g,u],0,r,n)}var a,o;return n}function NS(e,t){return xa(e,0,e.length,t)}function xa(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=DS(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(xa(e,t,c+1,i,a),xa(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Ms(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)Lo(e,3*a,t,i);return r&&r>0?xa(i,0,i.length,r):i}const ee="none";class _a{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",[Rg(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=OS(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(Bs([c],o)):s.push($r([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=Og(i,n,o),c=Ao(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Ao(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push($r([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",[Pn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Oh(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=Oh(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 _=d,C=f;let w=Math.abs(g/2),v=Math.abs(m/2);w+=st(.01*w,y),v+=st(.01*v,y);let k=b,$=x;for(;k<0;)k+=2*Math.PI,$+=2*Math.PI;$-k>2*Math.PI&&(k=0,$=2*Math.PI);const E=($-k)/y.curveStepCount,R=[];for(let M=k;M<=$;M+=E)R.push([_+w*Math.cos(M),C+v*Math.sin(M)]);return R.push([_+w*Math.cos($),C+v*Math.sin($)]),R.push([_,C]),$r([R],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=Rh(t,i);if(i.fill&&i.fill!==ee)if(i.fillStyle==="solid"){const o=Rh(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(...Ms(zh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Ms(zh(c),10,(1+i.roughness)/2))}o.length&&n.push($r([o],i))}return i.stroke!==ee&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Pn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Bs([t],i)):n.push($r([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=$g(Mg(ql(h))),g=[];let m=[],b=[0,0],x=[];const y=()=>{x.length>=4&&m.push(...Ms(x,u)),x=[]},_=()=>{y(),m.length&&(g.push(m),m=[])};for(const{key:w,data:v}of f)switch(w){case"M":_(),b=[v[0],v[1]],m.push(b);break;case"L":y(),m.push([v[0],v[1]]);break;case"C":if(!x.length){const k=m.length?m[m.length-1]:b;x.push([k[0],k[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":y(),m.push([b[0],b[1]])}if(_(),!d)return g;const C=[];for(const w of g){const v=NS(w,d);v.length&&C.push(v)}return C})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Ih(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Ih(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(Bs(l,i));else n.push($r(l,i));return o&&(s?l.forEach((h=>{n.push(Pn(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 PS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(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 An="http://www.w3.org/2000/svg";class zS{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(An,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(An,"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(An,"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(An,"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 V={canvas:(e,t)=>new PS(e,t),svg:(e,t)=>new zS(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},at=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||St(dt()?.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",Nt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await qe(o,re(Ze(s),dt()),{useHtmlLabels:n,width:t.width||dt().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=ut(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=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[C=jo.fontSize]=ln(y),w=C*_+"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"),$s=p(async(e,t,r)=>{const i=r.useHtmlLabels||St(dt()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await qe(n,re(Ze(t),dt()),{useHtmlLabels:i,width:r.width||dt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(St(dt()?.flowchart?.htmlLabels)){const l=a.children[0],c=ut(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"),K=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 ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ht,"createPathFromPoints");function Xe(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(Xe,"generateFullSineWavePoints");function Ji(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(Ji,"generateCirclePoints");var qS=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"),hi=qS;function Dg(e,t){t&&e.attr("style",t)}p(Dg,"applyStyle");async function Ng(e){const t=ut(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let n=e.label;e.label&&pr(e.label)&&(n=await La(e.label.replace(_r.lineBreakRegex,`
236
- `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(re(o,i)),Dg(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(Ng,"addHtmlLabel");var WS=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),St(dt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),I.info("vertexText"+n);const a={isNode:i,label:Ze(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Ng(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"),cr=WS,Ke=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"),Pg=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=dt(),{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 qe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],$=ut(g);m=k.getBoundingClientRect(),$.attr("width",m.width),$.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,_=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const k=V.svg(u),$=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),E=k.path(Ke(y,_,b,x,0),$);C=u.insert(()=>(I.debug("Rough node insert CXC",E),E),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",_).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=za(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 v=C.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(k){return hi(t,k)},{cluster:u,labelBBox:m}},"rect"),HS=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 hi(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),jS=p(async(e,t)=>{const r=dt(),{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 cr(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(St(r.flowchart.htmlLabels)){const E=f.children[0],R=ut(f);g=E.getBoundingClientRect(),R.attr("width",g.width),R.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,_=t.height+m-g.height-6,C=t.x-x/2,w=t.y-y/2;t.width=x;const v=t.y-t.height/2-b+g.height+2;let k;if(t.look==="handDrawn"){const E=t.cssClasses.includes("statediagram-cluster-alt"),R=V.svg(c),M=t.rx||t.ry?R.path(Ke(C,w,x,y,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):R.rectangle(C,w,x,y,{seed:n});k=c.insert(()=>M,":first-child");const N=R.rectangle(C,v,x,_,{fill:E?a:o,fillStyle:E?"hachure":"solid",stroke:l,seed:n});k=c.insert(()=>M,":first-child"),d=c.insert(()=>N)}else k=h.insert("rect",":first-child"),k.attr("class","outer").attr("x",C).attr("y",w).attr("width",x).attr("height",y).attr("data-look",t.look),d.attr("class","inner").attr("x",C).attr("y",v).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(St(r.flowchart.htmlLabels)?0:3)})`);const $=k.node().getBBox();return t.height=$.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(E){return hi(t,E)},{cluster:c,labelBBox:g}},"roundedWithTitle"),US=p(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=dt(),{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 qe(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],$=ut(g);m=k.getBoundingClientRect(),$.attr("width",m.width),$.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,_=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const k=V.svg(u),$=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),E=k.path(Ke(y,_,b,x,t.rx),$);C=u.insert(()=>(I.debug("Rough node insert CXC",E),E),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",y).attr("y",_).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:w}=za(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 v=C.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(k){return hi(t,k)},{cluster:u,labelBBox:m}},"kanbanSection"),GS=p((e,t)=>{const r=dt(),{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=V.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 hi(t,m)},{cluster:o,labelBBox:{}}},"divider"),YS=Pg,XS={rect:Pg,squareRect:YS,roundedWithTitle:jS,noteGroup:HS,divider:GS,kanbanSection:US},zg=new Map,qg=p(async(e,t)=>{const r=t.shape||"rect",i=await XS[r](e,t);return zg.set(t.id,i),i},"insertCluster"),VS=p(()=>{zg=new Map},"clear");function Wg(e,t){return e.intersect(t)}p(Wg,"intersectNode");var ZS=Wg;function Hg(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(Hg,"intersectEllipse");var jg=Hg;function Ug(e,t,r){return jg(e,t,t,r)}p(Ug,"intersectCircle");var KS=Ug;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&&Bo(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&&Bo(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 _=x<0?(x-b)/m:(x+b)/m;return{x:y,y:_}}}p(Gg,"intersectLine");function Bo(e,t){return e*t>0}p(Bo,"sameSign");var QS=Gg;function Yg(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=QS(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(Yg,"intersectPolygon");var JS=Yg,W={node:ZS,circle:KS,ellipse:jg,polygon:JS,rect:hi};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=V.svg(a),c=Z(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",Nt(s)),K(t,u),t.intersect=function(d){return I.info("Circle intersect",t,o,d),W.circle(t,o,d)},a}p(Xg,"anchor");function Mo(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),_=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-_;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let k=0;k<20;k++){const $=k/19,E=_+$*w,R=x+n*Math.cos(E),M=y+a*Math.sin(E);v.push({x:R,y:M})}return v}p(Mo,"generateArcPoints");async function Vg(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},...Mo(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Mo(o/2,s/2,o/2,-s/2,c,l,!0)],d=V.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(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)`),K(t,b),t.intersect=function(x){return W.polygon(t,u,x)},n}p(Vg,"bowTieRect");function Qe(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(Qe,"insertPolygonShape");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.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=V.svg(n),x=Z(t,{}),y=ht(f),_=b.path(y,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Qe(n,l,o,f);return i&&g.attr("style",i),K(t,g),t.intersect=function(b){return W.polygon(t,f,b)},n}p(Zg,"card");function Kg(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=V.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ht(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 W.polygon(t,o,d)},i}p(Kg,"choice");async function Wl(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=V.svg(a),f=Z(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Nt(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 K(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return W.circle(d,g,f)},t.intersect=function(d){return I.info("Circle intersect",t,c,d),W.circle(t,c,d)},a}p(Wl,"circle");function Qg(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(Qg,"createLine");function Jg(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=V.svg(n),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=Qg(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),K(t,d),t.intersect=function(f){return I.info("crossedCircle intersect",t,{radius:a,point:f}),W.circle(t,a,f)},n}p(Jg,"crossedCircle");function Be(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(Be,"generateCirclePoints");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=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Be(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Be(s/2+c*2,-c,c,20,-180,-270),...Be(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Be(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Be(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Be(s/2+s*.1,-c,c,20,-180,-270),...Be(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Be(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],f=V.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ht(u).replace("Z",""),x=f.path(b,g),y=ht(d),_=f.path(y,{...g}),C=n.insert("g",":first-child");return C.insert(()=>_,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.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))})`),K(t,C),t.intersect=function(w){return W.polygon(t,d,w)},n}p(tm,"curlyBraceLeft");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,20,-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+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),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],f=V.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ht(u).replace("Z",""),x=f.path(b,g),y=ht(d),_=f.path(y,{...g}),C=n.insert("g",":first-child");return C.insert(()=>_,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.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))})`),K(t,C),t.intersect=function(w){return W.polygon(t,d,w)},n}p(em,"curlyBraceRight");function Bt(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(Bt,"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=[...Bt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Bt(s/2,l/2,c,20,0,90)],d=[...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-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},...Bt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Bt(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},...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=V.svg(n),m=Z(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ht(u).replace("Z",""),y=g.path(x,m),C=ht(d).replace("Z",""),w=g.path(C,m),v=ht(f),k=g.path(v,{...m}),$=n.insert("g",":first-child");return $.insert(()=>k,":first-child").attr("stroke-opacity",0),$.insert(()=>y,":first-child"),$.insert(()=>w,":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-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))})`),K(t,$),t.intersect=function(E){return W.polygon(t,f,E)},n}p(rm,"curlyBraces");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=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=V.svg(n),f=Z(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},...Ji(-b,-m/2,h,50,270,90)],_=ht(y),C=d.path(_,f),w=n.insert(()=>C,":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})`),K(t,w),t.intersect=function(v){return W.polygon(t,y,v)},n}p(im,"curvedTrapezoid");var tT=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"),eT=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"),rT=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 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=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=V.svg(n),g=eT(0,0,s,h,l,c),m=rT(0,c,s,h,l,c),b=f.path(g,Z(t,{})),x=f.path(m,Z(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=tT(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),K(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=W.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(nm,"cylinder");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=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:d}=t,f=V.svg(n),g=Z(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},n}p(am,"dividedRectangle");async function sm(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=V.svg(n),f=Z(t,{roughness:.2,strokeWidth:2.5}),g=Z(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",Nt(t.cssClasses)).attr("style",Nt(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 K(t,h),t.intersect=function(d){return I.info("DoubleCircle intersect",t,l,d),W.circle(t,l,d)},n}p(sm,"doublecircle");function om(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=V.svg(a),{nodeBorder:c}=r,h=Z(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),K(t,d),t.intersect=function(f){return I.info("filledCircle intersect",t,{radius:o,point:f}),W.circle(t,o,f)},a}p(om,"filledCircle");async function lm(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=V.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(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,K(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 I.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},n}p(lm,"flippedTriangle");function cm(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=V.svg(o),f=Z(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),K(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 W.rect(t,x)},o}p(cm,"forkJoin");async function hm(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=V.svg(o),f=Z(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},...Ji(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ht(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),K(t,x),t.intersect=function(y){return I.info("Pill intersect",t,{radius:h,point:y}),W.polygon(t,g,y)},o}p(hm,"halfRoundedRectangle");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.height+(t.padding??0),s=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=V.svg(n),h=Z(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=ht(b),y=c.path(x,h),_=n.insert(()=>y,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=s,t.height=o,K(t,_),t.intersect=function(C){return W.polygon(t,b,C)},n}p(um,"hexagon");async function dm(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=V.svg(n),c=Z(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=ht(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})`),K(t,f),t.intersect=function(g){return I.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},n}p(dm,"hourglass");async function fm(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}=si(t),x=-g/2,y=-f/2,_=t.label?8:0,C=V.svg(c),w=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=C.rectangle(x,y,g,f,w),k=Math.max(g,h.width),$=f+h.height+_,E=C.rectangle(-k/2,-$/2,k,$,{...w,fill:"transparent",stroke:"none"}),R=c.insert(()=>v,":first-child"),M=c.insert(()=>E);if(t.icon){const N=c.append("g");N.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const D=N.node().getBBox(),L=D.width,F=D.height,A=D.x,O=D.y;N.attr("transform",`translate(${-L/2-A},${d?h.height/2+_/2-F/2-O:-h.height/2-_/2-F/2-O})`),N.attr("style",`color: ${b.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-$/2:$/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+_/2:-h.height/2-_/2})`),K(t,M),t.intersect=function(N){if(I.info("iconSquare intersect",t,N),!t.label)return W.rect(t,N);const D=t.x??0,L=t.y??0,F=t.height??0;let A=[];return d?A=[{x:D-h.width/2,y:L-F/2},{x:D+h.width/2,y:L-F/2},{x:D+h.width/2,y:L-F/2+h.height+_},{x:D+g/2,y:L-F/2+h.height+_},{x:D+g/2,y:L+F/2},{x:D-g/2,y:L+F/2},{x:D-g/2,y:L-F/2+h.height+_},{x:D-h.width/2,y:L-F/2+h.height+_}]:A=[{x:D-g/2,y:L-F/2},{x:D+g/2,y:L-F/2},{x:D+g/2,y:L-F/2+f},{x:D+h.width/2,y:L-F/2+f},{x:D+h.width/2/2,y:L+F/2},{x:D-h.width/2,y:L+F/2},{x:D-h.width/2,y:L-F/2+f},{x:D-g/2,y:L-F/2+f}],W.polygon(t,A,N)},c}p(fm,"icon");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=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:b}=r,{stylesMap:x}=si(t),y=V.svg(c),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=x.get("fill");_.stroke=C??b;const w=c.append("g");t.icon&&w.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),k=v.width,$=v.height,E=v.x,R=v.y,M=Math.max(k,$)*Math.SQRT2+d*2,N=y.circle(0,0,M,_),D=Math.max(M,h.width),L=M+h.height+f,F=y.rectangle(-D/2,-L/2,D,L,{..._,fill:"transparent",stroke:"none"}),A=c.insert(()=>N,":first-child"),O=c.insert(()=>F);return w.attr("transform",`translate(${-k/2-E},${g?h.height/2+f/2-$/2-R:-h.height/2-f/2-$/2-R})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-L/2:L/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),K(t,O),t.intersect=function(B){return I.info("iconSquare intersect",t,B),W.rect(t,B)},c}p(pm,"iconCircle");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,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}=si(t),_=-m/2,C=-g/2,w=t.label?8:0,v=V.svg(c),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const $=y.get("fill");k.stroke=$??x;const E=v.path(Ke(_,C,m,g,5),k),R=Math.max(m,h.width),M=g+h.height+w,N=v.rectangle(-R/2,-M/2,R,M,{...k,fill:"transparent",stroke:"none"}),D=c.insert(()=>E,":first-child").attr("class","icon-shape2"),L=c.insert(()=>N);if(t.icon){const F=c.append("g");F.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=F.node().getBBox(),O=A.width,B=A.height,q=A.x,H=A.y;F.attr("transform",`translate(${-O/2-q},${f?h.height/2+w/2-B/2-H:-h.height/2-w/2-B/2-H})`),F.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})`),D.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),K(t,L),t.intersect=function(F){if(I.info("iconSquare intersect",t,F),!t.label)return W.rect(t,F);const A=t.x??0,O=t.y??0,B=t.height??0;let q=[];return f?q=[{x:A-h.width/2,y:O-B/2},{x:A+h.width/2,y:O-B/2},{x:A+h.width/2,y:O-B/2+h.height+w},{x:A+m/2,y:O-B/2+h.height+w},{x:A+m/2,y:O+B/2},{x:A-m/2,y:O+B/2},{x:A-m/2,y:O-B/2+h.height+w},{x:A-h.width/2,y:O-B/2+h.height+w}]:q=[{x:A-m/2,y:O-B/2},{x:A+m/2,y:O-B/2},{x:A+m/2,y:O-B/2+g},{x:A+h.width/2,y:O-B/2+g},{x:A+h.width/2/2,y:O+B/2},{x:A-h.width/2,y:O+B/2},{x:A-h.width/2,y:O-B/2+g},{x:A-m/2,y:O-B/2+g}],W.polygon(t,q,F)},c}p(gm,"iconRounded");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}=si(t),_=-m/2,C=-g/2,w=t.label?8:0,v=V.svg(c),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const $=y.get("fill");k.stroke=$??x;const E=v.path(Ke(_,C,m,g,.1),k),R=Math.max(m,h.width),M=g+h.height+w,N=v.rectangle(-R/2,-M/2,R,M,{...k,fill:"transparent",stroke:"none"}),D=c.insert(()=>E,":first-child"),L=c.insert(()=>N);if(t.icon){const F=c.append("g");F.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const A=F.node().getBBox(),O=A.width,B=A.height,q=A.x,H=A.y;F.attr("transform",`translate(${-O/2-q},${f?h.height/2+w/2-B/2-H:-h.height/2-w/2-B/2-H})`),F.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})`),D.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),K(t,L),t.intersect=function(F){if(I.info("iconSquare intersect",t,F),!t.label)return W.rect(t,F);const A=t.x??0,O=t.y??0,B=t.height??0;let q=[];return f?q=[{x:A-h.width/2,y:O-B/2},{x:A+h.width/2,y:O-B/2},{x:A+h.width/2,y:O-B/2+h.height+w},{x:A+m/2,y:O-B/2+h.height+w},{x:A+m/2,y:O+B/2},{x:A-m/2,y:O+B/2},{x:A-m/2,y:O-B/2+h.height+w},{x:A-h.width/2,y:O-B/2+h.height+w}]:q=[{x:A-m/2,y:O-B/2},{x:A+m/2,y:O-B/2},{x:A+m/2,y:O-B/2+g},{x:A+h.width/2,y:O-B/2+g},{x:A+h.width/2/2,y:O+B/2},{x:A-h.width/2,y:O+B/2},{x:A-h.width/2,y:O-B/2+g},{x:A-m/2,y:O-B/2+g}],W.polygon(t,q,F)},c}p(mm,"iconSquare");async function ym(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=V.svg(u),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=y.rectangle(m,b,c,h,_),w=Math.max(c,d.width),v=h+d.height+x,k=y.rectangle(-w/2,-v/2,w,v,{..._,fill:"none",stroke:"none"}),$=u.insert(()=>C,":first-child"),E=u.insert(()=>k);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?v/2-h:-v/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})`),$.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),K(t,E),t.intersect=function(R){if(I.info("iconSquare intersect",t,R),!t.label)return W.rect(t,R);const M=t.x??0,N=t.y??0,D=t.height??0;let L=[];return g?L=[{x:M-d.width/2,y:N-D/2},{x:M+d.width/2,y:N-D/2},{x:M+d.width/2,y:N-D/2+d.height+x},{x:M+c/2,y:N-D/2+d.height+x},{x:M+c/2,y:N+D/2},{x:M-c/2,y:N+D/2},{x:M-c/2,y:N-D/2+d.height+x},{x:M-d.width/2,y:N-D/2+d.height+x}]:L=[{x:M-c/2,y:N-D/2},{x:M+c/2,y:N-D/2},{x:M+c/2,y:N-D/2+h},{x:M+d.width/2,y:N-D/2+h},{x:M+d.width/2/2,y:N+D/2},{x:M-d.width/2,y:N+D/2},{x:M-d.width/2,y:N-D/2+h},{x:M-c/2,y:N-D/2+h}],W.polygon(t,L,R)},u}p(ym,"imageSquare");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=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=V.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(bm,"inv_trapezoid");async function Ja(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=V.svg(a),b=Z(t,{}),x=d||f?m.path(Ke(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",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Nt(d)).attr("ry",Nt(f)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return K(t,u),t.calcIntersect=function(m,b){return W.rect(m,b)},t.intersect=function(m){return W.rect(t,m)},a}p(Ja,"drawRect");async function xm(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))})`),K(t,a),t.intersect=function(l){return W.rect(t,l)},r}p(xm,"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=V.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(_m,"lean_left");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:-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=V.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(wm,"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=V.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ht(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})`),K(t,g),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},n}p(Cm,"lightningBolt");var iT=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"),nT=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"),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 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),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=V.svg(n),m=nT(0,0,s,h,l,c,u),b=aT(0,c,s,h,l,c),x=Z(t,{}),y=g.path(m,x),_=g.path(b,x);n.insert(()=>_,":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=iT(0,0,s,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),K(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=W.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(vm,"linedCylinder");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=l/4,h=l+c,{cssStyles:u}=t,d=V.svg(n),f=Z(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},...Xe(-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))})`),K(t,b),t.intersect=function(x){return W.polygon(t,g,x)},n}p(km,"linedWaveEdgedRect");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=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=V.svg(n),g=Z(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=ht(m),y=f.path(x,g),_=ht(b),C=f.path(_,{...g,fill:"none"}),w=n.insert(()=>C,":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))})`),K(t,w),t.intersect=function(v){return W.polygon(t,m,v)},n}p(Sm,"multiRect");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,u=-s/2,d=-h/2,f=5,{cssStyles:g}=t,m=Xe(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.svg(n),C=Z(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=ht(x),v=_.path(w,C),k=ht(y),$=_.path(k,C),E=n.insert(()=>v,":first-child");return E.insert(()=>$),E.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.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))})`),K(t,E),t.intersect=function(R){return W.polygon(t,x,R)},n}p(Tm,"multiWaveEdgedRectangle");async function Am(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=X(t);t.labelStyle=i,t.useHtmlLabels||$t().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=V.svg(o),m=Z(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},o}p(Am,"note");var sT=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 Em(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=V.svg(n),g=Z(t,{}),m=sT(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=Qe(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),K(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=W.polygon(f,b,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(Em,"question");async function Lm(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=V.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ht(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))})`),K(t,y),t.intersect=function(_){return W.polygon(t,d,_)},n}p(Lm,"rect_left_inv_arrow");async function Bm(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 cr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(St(dt()?.flowchart?.htmlLabels)){const $=h.children[0],E=ut(h);u=$.getBoundingClientRect(),E.attr("width",u.width),E.attr("height",u.height)}I.info("Text 2",l);const d=l||[],f=h.getBBox(),g=s.node().appendChild(await cr(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],b=ut(g);u=m.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height);const x=(t.padding||0)/2;ut(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),ut(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),_=u.height+(t.padding||0),C=-u.width/2-x,w=-u.height/2-x;let v,k;if(t.look==="handDrawn"){const $=V.svg(a),E=Z(t,{}),R=$.path(Ke(C,w,y,_,t.rx||0),E),M=$.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,E);k=a.insert(()=>(I.debug("Rough node insert CXC",R),M),":first-child"),v=a.insert(()=>(I.debug("Rough node insert CXC",R),R),":first-child")}else v=o.insert("rect",":first-child"),k=o.insert("line"),v.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 K(t,v),t.intersect=function($){return W.rect(t,$)},a}p(Bm,"rectWithTitle");function $i(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),_=Math.atan2((t-y)/a,(e-x)/n);let w=Math.atan2((i-y)/a,(r-x)/n)-_;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let k=0;k<20;k++){const $=k/19,E=_+$*w,R=x+n*Math.cos(E),M=y+a*Math.sin(E);v.push({x:R,y:M})}return v}p($i,"generateArcPoints");async function Mm(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=V.svg(n),g=Z(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},...$i(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},...$i(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},...$i(-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},...$i(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],b=ht(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),K(t,y),t.intersect=function(_){return W.polygon(t,m,_)},n}p(Mm,"roundedRect");async function $m(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=V.svg(n),g=Z(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",Nt(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},n}p($m,"shadedProcess");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=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=V.svg(n),f=Z(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=ht(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))})`),K(t,x),t.intersect=function(y){return W.polygon(t,g,y)},n}p(Fm,"slopedRect");async function Rm(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Ja(e,t,r)}p(Rm,"squareRect");async function Om(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=V.svg(n),u=Z(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},...Ji(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...Ji(s/2-l,0,l,50,270,450)],f=ht(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),K(t,m),t.intersect=function(b){return W.polygon(t,d,b)},n}p(Om,"stadium");async function Im(e,t){return Ja(e,t,{rx:5,ry:5})}p(Im,"state");function Dm(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=V.svg(c),u=Z(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),K(t,m),t.intersect=function(b){return W.circle(t,7,b)},c}p(Dm,"stateEnd");function Nm(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=V.svg(n).circle(0,0,14,Gw(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 K(t,a),t.intersect=function(o){return W.circle(t,7,o)},n}p(Nm,"stateStart");async function Pm(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=V.svg(n),f=Z(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",Nt(y)),K(t,x)}else{const d=Qe(n,s,l,u);i&&d.attr("style",i),K(t,d)}return t.intersect=function(d){return W.polygon(t,u,d)},n}p(Pm,"subroutine");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=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=V.svg(n),g=Z(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=ht(m),y=f.path(x,g),_=ht(b),C=f.path(_,{...g,fillStyle:"solid"}),w=n.insert(()=>C,":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),K(t,w),t.intersect=function(v){return W.polygon(t,m,v)},n}p(zm,"taggedRect");async function qm(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=V.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:d/2},...Xe(-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,_=[{x:x+s-h,y:(y+l)*1.4},{x:x+s,y:y+l-u},{x:x+s,y:(y+l)*.9},...Xe(x+s,(y+l)*1.3,x+s-h,(y+l)*1.5,-l*.03,.5)],C=ht(b),w=g.path(C,m),v=ht(_),k=g.path(v,{...m,fillStyle:"solid"}),$=n.insert(()=>k,":first-child");return $.insert(()=>w,":first-child"),$.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",f),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/2-(a.y-(a.top??0))})`),K(t,$),t.intersect=function(E){return W.polygon(t,b,E)},n}p(qm,"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),K(t,h),t.intersect=function(u){return W.rect(t,u)},n}p(Wm,"text");var oT=p((e,t,r,i,n,a)=>`M${e},${t}
232
+ `),n=mg(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(vg,"preprocessMarkdown");function _g(e,t={}){const r=vg(e,t),i=ft.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(_g,"markdownToLines");function Cg(e,{markdownAutoWrap:t}={}){const r=ft.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:(P.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(Cg,"markdownToHTML");function kg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(kg,"splitTextToChars");function Sg(e,t){const r=kg(t.content);return Nl(e,[],r,t.type)}p(Sg,"splitWordToFitWidth");function Nl(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}])?Nl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Nl,"splitWordToFitWidthRecursion");function Tg(e,t){if(e.some(({content:r})=>r.includes(`
234
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ma(e,t)}p(Tg,"splitLineToFitWidth");function ma(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 ma(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Sg(t,a);r.push([s]),l.content&&e.unshift(l)}return ma(e,t,r)}p(ma,"splitLineToFitWidthRecursion");function To(e,t){t&&e.attr("style",t)}p(To,"applyStyle");async function Ag(e,t,r,i,n=!1,a=$t()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=pr(t.label)?await La(t.label.replace(wr.lineBreakRegex,`
235
+ `),a):re(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),To(h,t.labelStyle),h.attr("class",`${c} ${i}`),To(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(Ag,"addHtmlSpan");function Za(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(Za,"createTspan");function Eg(e,t,r){const i=e.append("text"),n=Za(i,1,t);Ka(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Eg,"computeWidthOfText");function Lg(e,t,r){const i=e.append("text"),n=Za(i,1,t);Ka(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Lg,"computeDimensionOfText");function Bg(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=>Eg(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:Tg(c,h);for(const d of u){const f=Za(s,l,1.1);Ka(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(Bg,"createFormattedText");function Ka(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(Ka,"updateTextContentAndStyles");async function Pl(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 ci(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(Pl,"replaceIconSubstring");var qe=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(P.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=Cg(t,c),u=await Pl(Ze(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:pr(t)?d:u,labelStyle:r.replace("fill:","color:")};return await Ag(e,f,s,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=_g(h.replace("<br>","<br/>"),c),d=Bg(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:");ut(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(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:");ut(d).select("text").attr("style",g)}return d}},"createText");function As(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)As(c,s,n);const l=(function(c,h,u){const d=[];for(const y of c){const w=[...y];ES(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const g=[];for(const y of d)for(let w=0;w<y.length-1;w++){const _=y[w],v=y[w+1];if(_[1]!==v[1]){const C=Math.min(_[1],v[1]);g.push({ymin:C,ymax:Math.max(_[1],v[1]),x:C===_[1]?_[0]:v[0],islope:(v[0]-_[0])/(v[1]-_[1])})}}if(g.sort(((y,w)=>y.ymin<w.ymin?-1:y.ymin>w.ymin?1:y.x<w.x?-1:y.x>w.x?1:y.ymax===w.ymax?0:(y.ymax-w.ymax)/Math.abs(y.ymax-w.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 w=0;w<g.length&&!(g[w].ymin>b);w++)y=w;g.splice(0,y+1).forEach((w=>{m.push({s:b,edge:w})}))}if(m=m.filter((y=>!(y.edge.ymax<=b))),m.sort(((y,w)=>y.edge.x===w.edge.x?0:(y.edge.x-w.edge.x)/Math.abs(y.edge.x-w.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let y=0;y<m.length;y+=2){const w=y+1;if(w>=m.length)break;const _=m[y].edge,v=m[w].edge;f.push([[Math.round(_.x),b],[Math.round(v.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)As(c,s,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),As(d,h,u)})(l,s,-n)}return l}function hn(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 zl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=hn(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 Qa(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 zl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=hn(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)Qa([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 zl{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=hn(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=Qa(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=hn(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=Qa(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=hn(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=Qa(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 Kt={};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,Es=1,Fh=2,Sn={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 Ls(e,t){return e.type===t}function ql(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:Es,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:Fh,text:""},s})(e);let i="BOD",n=0,a=r[n];for(;!Ls(a,Fh);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ql("M0,0"+e);n++,o=Sn[a.text],i=a.text}else Ls(a,Es)?o=Sn[i]:(n++,o=Sn[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(!Ls(c,Es))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Sn[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 Mg(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 $g(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)&&(Fg(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 ki(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Fg(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]=ki(e,t,-h),[r,i]=ki(r,i,-h);const D=(e-r)/2,T=(t-i)/2;let M=D*D/(n*n)+T*T/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const E=n*n,R=a*a,F=E*R-E*T*T-R*D*D,q=E*T*T+R*D*D,j=(s===l?-1:1)*Math.sqrt(Math.abs(F/q));m=j*n*T/a+(e+r)/2,b=j*-a*D/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 D=g,T=r,M=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Fg(r=m+n*Math.cos(g),i=b+a*Math.sin(g),T,M,n,a,o,0,l,[g,D,m,b])}x=g-f;const y=Math.cos(f),w=Math.sin(f),_=Math.cos(g),v=Math.sin(g),C=Math.tan(x/4),k=4/3*n*C,B=4/3*a*C,L=[e,t],O=[e+k*w,t-B*y],$=[r+k*v,i-B*_],I=[r,i];if(O[0]=2*L[0]-O[0],O[1]=2*L[1]-O[1],c)return[O,$,I].concat(d);{d=[O,$,I].concat(d);const D=[];for(let T=0;T<d.length;T+=3){const M=ki(d[T][0],d[T][1],h),E=ki(d[T+1][0],d[T+1][1],h),R=ki(d[T+2][0],d[T+2][1],h);D.push([M[0],M[1],E[0],E[1],R[0],R[1]])}return D}}const DS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return ya(e,t,r)},ellipse:function(e,t,r,i,n){const a=Og(r,i,n);return Ao(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Ye(e,t,r,i,n,!0)}};function Rg(e,t,r,i,n){return{type:"path",ops:Ye(e,t,r,i,n)}}function Pn(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Ye(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Ye(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Rg(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 Pn(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function Rh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Tn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Tn(r[0],1.5*(1+.22*t.roughness),Dh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Tn(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Tn(o,1.5*(1+.22*t.roughness),Dh(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 Og(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 Ao(e,t,r,i){const[n,a]=Nh(i.increment,e,t,i.rx,i.ry,1,i.increment*ya(.1,ya(.4,1,r),r),r);let o=ba(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Nh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ba(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Oh(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=Ph(b,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const y=Ph(b,c,h,u,d,f,g,1.5,l);x.push(...y)}return o&&(s?x.push(...Ye(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Ye(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 Ih(e,t){const r=$g(Mg(ql(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(...Ye(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(...Ye(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Bs(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 $r(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Kt[n])switch(n){case"zigzag":Kt[n]||(Kt[n]=new BS(i));break;case"cross-hatch":Kt[n]||(Kt[n]=new MS(i));break;case"dots":Kt[n]||(Kt[n]=new $S(i));break;case"dashed":Kt[n]||(Kt[n]=new FS(i));break;case"zigzag-line":Kt[n]||(Kt[n]=new RS(i));break;default:n="hachure",Kt[n]||(Kt[n]=new zl(i))}return Kt[n]})(t,DS).fillPolygons(e,t)}function Dh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ig(e){return e.randomizer||(e.randomizer=new OS(e.seed||0)),e.randomizer.next()}function ya(e,t,r,i=1){return r.roughness*i*(Ig(r)*(t-e)+e)}function st(e,t,r=1){return ya(-e,e,t,r)}function Ye(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Eo(e,t,r,i,n,!0,!1);if(o)return s;const l=Eo(e,t,r,i,n,!0,!0);return s.concat(l)}function Eo(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*Ig(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 Tn(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 ba(i,null,r)}function ba(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(...Eo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function Nh(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 Ph(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)]),ba(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 Si(e){return[...e]}function zh(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(Si(e[0]),Si(e[1]),Si(e[2]),Si(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(Si(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 zn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function zS(e,t,r){const i=zn(t,r);if(i===0)return zn(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)),zn(e,nr(t,r,n))}function nr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Lo(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(zn(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=nr(l,c,.5),f=nr(c,h,.5),g=nr(h,u,.5),m=nr(d,f,.5),b=nr(f,g,.5),x=nr(m,b,.5);Lo([l,d,m,x],0,r,n),Lo([x,b,g,u],0,r,n)}var a,o;return n}function qS(e,t){return xa(e,0,e.length,t)}function xa(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?(xa(e,t,c+1,i,a),xa(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Ms(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)Lo(e,3*a,t,i);return r&&r>0?xa(i,0,i.length,r):i}const ee="none";class wa{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",[Rg(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(Bs([c],o)):s.push($r([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=Og(i,n,o),c=Ao(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Ao(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push($r([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",[Pn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Oh(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=Oh(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 w=d,_=f;let v=Math.abs(g/2),C=Math.abs(m/2);v+=st(.01*v,y),C+=st(.01*C,y);let k=b,B=x;for(;k<0;)k+=2*Math.PI,B+=2*Math.PI;B-k>2*Math.PI&&(k=0,B=2*Math.PI);const L=(B-k)/y.curveStepCount,O=[];for(let $=k;$<=B;$+=L)O.push([w+v*Math.cos($),_+C*Math.sin($)]);return O.push([w+v*Math.cos(B),_+C*Math.sin(B)]),O.push([w,_]),$r([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=Rh(t,i);if(i.fill&&i.fill!==ee)if(i.fillStyle==="solid"){const o=Rh(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(...Ms(zh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Ms(zh(c),10,(1+i.roughness)/2))}o.length&&n.push($r([o],i))}return i.stroke!==ee&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Pn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Bs([t],i)):n.push($r([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=$g(Mg(ql(h))),g=[];let m=[],b=[0,0],x=[];const y=()=>{x.length>=4&&m.push(...Ms(x,u)),x=[]},w=()=>{y(),m.length&&(g.push(m),m=[])};for(const{key:v,data:C}of f)switch(v){case"M":w(),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(w(),!d)return g;const _=[];for(const v of g){const C=qS(v,d);C.length&&_.push(C)}return _})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Ih(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Ih(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(Bs(l,i));else n.push($r(l,i));return o&&(s?l.forEach((h=>{n.push(Pn(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 wa(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 An="http://www.w3.org/2000/svg";class WS{constructor(t,r){this.svg=t,this.gen=new wa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(An,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(An,"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(An,"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(An,"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 X={canvas:(e,t)=>new HS(e,t),svg:(e,t)=>new WS(e,t),generator:e=>new wa(e),newSeed:()=>wa.newSeed()},at=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||St(dt()?.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",Nt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await qe(o,re(Ze(s),dt()),{useHtmlLabels:n,width:t.width||dt().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=ut(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=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=jo.fontSize]=ln(y),v=_*w+"px";m.style.minWidth=v,m.style.maxWidth=v}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"),$s=p(async(e,t,r)=>{const i=r.useHtmlLabels||St(dt()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await qe(n,re(Ze(t),dt()),{useHtmlLabels:i,width:r.width||dt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(St(dt()?.flowchart?.htmlLabels)){const l=a.children[0],c=ut(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"),K=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 ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ht,"createPathFromPoints");function Ve(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(Ve,"generateFullSineWavePoints");function Ji(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(Ji,"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"),hi=jS;function Dg(e,t){t&&e.attr("style",t)}p(Dg,"applyStyle");async function Ng(e){const t=ut(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=dt();let n=e.label;e.label&&pr(e.label)&&(n=await La(e.label.replace(wr.lineBreakRegex,`
236
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(re(o,i)),Dg(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(Ng,"addHtmlLabel");var US=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),St(dt().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),P.info("vertexText"+n);const a={isNode:i,label:Ze(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Ng(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"),cr=US,Ke=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"),Pg=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(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 qe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(St(r.flowchart.htmlLabels)){const k=g.children[0],B=ut(g);m=k.getBoundingClientRect(),B.attr("width",m.width),B.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,w=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=X.svg(u),B=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),L=k.path(Ke(y,w,b,x,0),B);_=u.insert(()=>(P.debug("Rough node insert CXC",L),L),":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",w).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:v}=za(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),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 hi(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 hi(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),YS=p(async(e,t)=>{const r=dt(),{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 cr(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(St(r.flowchart.htmlLabels)){const L=f.children[0],O=ut(f);g=L.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,w=t.height+m-g.height-6,_=t.x-x/2,v=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 L=t.cssClasses.includes("statediagram-cluster-alt"),O=X.svg(c),$=t.rx||t.ry?O.path(Ke(_,v,x,y,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(_,v,x,y,{seed:n});k=c.insert(()=>$,":first-child");const I=O.rectangle(_,C,x,w,{fill:L?a:o,fillStyle:L?"hachure":"solid",stroke:l,seed:n});k=c.insert(()=>$,":first-child"),d=c.insert(()=>I)}else k=h.insert("rect",":first-child"),k.attr("class","outer").attr("x",_).attr("y",v).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",w);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(St(r.flowchart.htmlLabels)?0:3)})`);const B=k.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(L){return hi(t,L)},{cluster:c,labelBBox:g}},"roundedWithTitle"),VS=p(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(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 qe(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],B=ut(g);m=k.getBoundingClientRect(),B.attr("width",m.width),B.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,w=t.y-x/2;P.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const k=X.svg(u),B=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),L=k.path(Ke(y,w,b,x,t.rx),B);_=u.insert(()=>(P.debug("Rough node insert CXC",L),L),":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",w).attr("width",b).attr("height",x);const{subGraphTitleTopMargin:v}=za(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),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 hi(t,k)},{cluster:u,labelBBox:m}},"kanbanSection"),XS=p((e,t)=>{const r=dt(),{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=X.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 hi(t,m)},{cluster:o,labelBBox:{}}},"divider"),ZS=Pg,KS={rect:Pg,squareRect:ZS,roundedWithTitle:YS,noteGroup:GS,divider:XS,kanbanSection:VS},zg=new Map,qg=p(async(e,t)=>{const r=t.shape||"rect",i=await KS[r](e,t);return zg.set(t.id,i),i},"insertCluster"),QS=p(()=>{zg=new Map},"clear");function Hg(e,t){return e.intersect(t)}p(Hg,"intersectNode");var JS=Hg;function Wg(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(Wg,"intersectEllipse");var jg=Wg;function Ug(e,t,r){return jg(e,t,t,r)}p(Ug,"intersectCircle");var tT=Ug;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&&Bo(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&&Bo(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 w=x<0?(x-b)/m:(x+b)/m;return{x:y,y:w}}}p(Gg,"intersectLine");function Bo(e,t){return e*t>0}p(Bo,"sameSign");var eT=Gg;function Yg(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(Yg,"intersectPolygon");var rT=Yg,W={node:JS,circle:tT,ellipse:jg,polygon:rT,rect:hi};function Vg(e,t){const{labelStyles:r}=V(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=X.svg(a),c=Z(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",Nt(s)),K(t,u),t.intersect=function(d){return P.info("Circle intersect",t,o,d),W.circle(t,o,d)},a}p(Vg,"anchor");function Mo(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),w=Math.atan2((t-y)/a,(e-x)/n);let v=Math.atan2((i-y)/a,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const B=k/19,L=w+B*v,O=x+n*Math.cos(L),$=y+a*Math.sin(L);C.push({x:O,y:$})}return C}p(Mo,"generateArcPoints");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=V(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},...Mo(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Mo(o/2,s/2,o/2,-s/2,c,l,!0)],d=X.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(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)`),K(t,b),t.intersect=function(x){return W.polygon(t,u,x)},n}p(Xg,"bowTieRect");function Qe(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(Qe,"insertPolygonShape");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),x=Z(t,{}),y=ht(f),w=b.path(y,x);g=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Qe(n,l,o,f);return i&&g.attr("style",i),K(t,g),t.intersect=function(b){return W.polygon(t,f,b)},n}p(Zg,"card");function Kg(e,t){const{nodeStyles:r}=V(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=X.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ht(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 W.polygon(t,o,d)},i}p(Kg,"choice");async function Hl(e,t,r){const{labelStyles:i,nodeStyles:n}=V(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=X.svg(a),f=Z(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Nt(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 K(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return W.circle(d,g,f)},t.intersect=function(d){return P.info("Circle intersect",t,c,d),W.circle(t,c,d)},a}p(Hl,"circle");function Qg(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(Qg,"createLine");function Jg(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=Qg(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),K(t,d),t.intersect=function(f){return P.info("crossedCircle intersect",t,{radius:a,point:f}),W.circle(t,a,f)},n}p(Jg,"crossedCircle");function Be(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(Be,"generateCirclePoints");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=[...Be(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Be(s/2+c*2,-c,c,20,-180,-270),...Be(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Be(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Be(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Be(s/2+s*.1,-c,c,20,-180,-270),...Be(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Be(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],f=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ht(u).replace("Z",""),x=f.path(b,g),y=ht(d),w=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${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))})`),K(t,_),t.intersect=function(v){return W.polygon(t,d,v)},n}p(tm,"curlyBraceLeft");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}=V(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,20,-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+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),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],f=X.svg(n),g=Z(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=ht(u).replace("Z",""),x=f.path(b,g),y=ht(d),w=f.path(y,{...g}),_=n.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.attr("class","text"),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-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))})`),K(t,_),t.intersect=function(v){return W.polygon(t,d,v)},n}p(em,"curlyBraceRight");function Bt(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(Bt,"generateCirclePoints");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=[...Bt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Bt(s/2,l/2,c,20,0,90)],d=[...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-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},...Bt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Bt(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},...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=X.svg(n),m=Z(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ht(u).replace("Z",""),y=g.path(x,m),_=ht(d).replace("Z",""),v=g.path(_,m),C=ht(f),k=g.path(C,{...m}),B=n.insert("g",":first-child");return B.insert(()=>k,":first-child").attr("stroke-opacity",0),B.insert(()=>y,":first-child"),B.insert(()=>v,":first-child"),B.attr("class","text"),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-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))})`),K(t,B),t.intersect=function(L){return W.polygon(t,f,L)},n}p(rm,"curlyBraces");async function im(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(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},...Ji(-b,-m/2,h,50,270,90)],w=ht(y),_=d.path(w,f),v=n.insert(()=>_,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),K(t,v),t.intersect=function(C){return W.polygon(t,y,C)},n}p(im,"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 nm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=nT(0,0,s,h,l,c),m=aT(0,c,s,h,l,c),b=f.path(g,Z(t,{})),x=f.path(m,Z(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",Nt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),K(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=W.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(nm,"cylinder");async function am(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},n}p(am,"dividedRectangle");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(t,{roughness:.2,strokeWidth:2.5}),g=Z(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",Nt(t.cssClasses)).attr("style",Nt(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 K(t,h),t.intersect=function(d){return P.info("DoubleCircle intersect",t,l,d),W.circle(t,l,d)},n}p(sm,"doublecircle");function om(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(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=X.svg(a),{nodeBorder:c}=r,h=Z(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),K(t,d),t.intersect=function(f){return P.info("filledCircle intersect",t,{radius:o,point:f}),W.circle(t,o,f)},a}p(om,"filledCircle");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(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,K(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 P.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},n}p(lm,"flippedTriangle");function cm(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=V(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=X.svg(o),f=Z(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),K(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 W.rect(t,x)},o}p(cm,"forkJoin");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(o),f=Z(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},...Ji(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ht(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),K(t,x),t.intersect=function(y){return P.info("Pill intersect",t,{radius:h,point:y}),W.polygon(t,g,y)},o}p(hm,"halfRoundedRectangle");async function um(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),h=Z(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=ht(b),y=c.path(x,h),w=n.insert(()=>y,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=s,t.height=o,K(t,w),t.intersect=function(_){return W.polygon(t,b,_)},n}p(um,"hexagon");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),c=Z(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=ht(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})`),K(t,f),t.intersect=function(g){return P.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},n}p(dm,"hourglass");async function fm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(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}=si(t),x=-g/2,y=-f/2,w=t.label?8:0,_=X.svg(c),v=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=_.rectangle(x,y,g,f,v),k=Math.max(g,h.width),B=f+h.height+w,L=_.rectangle(-k/2,-B/2,k,B,{...v,fill:"transparent",stroke:"none"}),O=c.insert(()=>C,":first-child"),$=c.insert(()=>L);if(t.icon){const I=c.append("g");I.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const D=I.node().getBBox(),T=D.width,M=D.height,E=D.x,R=D.y;I.attr("transform",`translate(${-T/2-E},${d?h.height/2+w/2-M/2-R:-h.height/2-w/2-M/2-R})`),I.attr("style",`color: ${b.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),K(t,$),t.intersect=function(I){if(P.info("iconSquare intersect",t,I),!t.label)return W.rect(t,I);const D=t.x??0,T=t.y??0,M=t.height??0;let E=[];return d?E=[{x:D-h.width/2,y:T-M/2},{x:D+h.width/2,y:T-M/2},{x:D+h.width/2,y:T-M/2+h.height+w},{x:D+g/2,y:T-M/2+h.height+w},{x:D+g/2,y:T+M/2},{x:D-g/2,y:T+M/2},{x:D-g/2,y:T-M/2+h.height+w},{x:D-h.width/2,y:T-M/2+h.height+w}]:E=[{x:D-g/2,y:T-M/2},{x:D+g/2,y:T-M/2},{x:D+g/2,y:T-M/2+f},{x:D+h.width/2,y:T-M/2+f},{x:D+h.width/2/2,y:T+M/2},{x:D-h.width/2,y:T+M/2},{x:D-h.width/2,y:T-M/2+f},{x:D-g/2,y:T-M/2+f}],W.polygon(t,E,I)},c}p(fm,"icon");async function pm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(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}=si(t),y=X.svg(c),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=x.get("fill");w.stroke=_??b;const v=c.append("g");t.icon&&v.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=v.node().getBBox(),k=C.width,B=C.height,L=C.x,O=C.y,$=Math.max(k,B)*Math.SQRT2+d*2,I=y.circle(0,0,$,w),D=Math.max($,h.width),T=$+h.height+f,M=y.rectangle(-D/2,-T/2,D,T,{...w,fill:"transparent",stroke:"none"}),E=c.insert(()=>I,":first-child"),R=c.insert(()=>M);return v.attr("transform",`translate(${-k/2-L},${g?h.height/2+f/2-B/2-O:-h.height/2-f/2-B/2-O})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-T/2:T/2-h.height})`),E.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),K(t,R),t.intersect=function(F){return P.info("iconSquare intersect",t,F),W.rect(t,F)},c}p(pm,"iconCircle");async function gm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(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}=si(t),w=-m/2,_=-g/2,v=t.label?8:0,C=X.svg(c),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=y.get("fill");k.stroke=B??x;const L=C.path(Ke(w,_,m,g,5),k),O=Math.max(m,h.width),$=g+h.height+v,I=C.rectangle(-O/2,-$/2,O,$,{...k,fill:"transparent",stroke:"none"}),D=c.insert(()=>L,":first-child").attr("class","icon-shape2"),T=c.insert(()=>I);if(t.icon){const M=c.append("g");M.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const E=M.node().getBBox(),R=E.width,F=E.height,q=E.x,j=E.y;M.attr("transform",`translate(${-R/2-q},${f?h.height/2+v/2-F/2-j:-h.height/2-v/2-F/2-j})`),M.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})`),D.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),K(t,T),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return W.rect(t,M);const E=t.x??0,R=t.y??0,F=t.height??0;let q=[];return f?q=[{x:E-h.width/2,y:R-F/2},{x:E+h.width/2,y:R-F/2},{x:E+h.width/2,y:R-F/2+h.height+v},{x:E+m/2,y:R-F/2+h.height+v},{x:E+m/2,y:R+F/2},{x:E-m/2,y:R+F/2},{x:E-m/2,y:R-F/2+h.height+v},{x:E-h.width/2,y:R-F/2+h.height+v}]:q=[{x:E-m/2,y:R-F/2},{x:E+m/2,y:R-F/2},{x:E+m/2,y:R-F/2+g},{x:E+h.width/2,y:R-F/2+g},{x:E+h.width/2/2,y:R+F/2},{x:E-h.width/2,y:R+F/2},{x:E-h.width/2,y:R-F/2+g},{x:E-m/2,y:R-F/2+g}],W.polygon(t,q,M)},c}p(gm,"iconRounded");async function mm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(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}=si(t),w=-m/2,_=-g/2,v=t.label?8:0,C=X.svg(c),k=Z(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=y.get("fill");k.stroke=B??x;const L=C.path(Ke(w,_,m,g,.1),k),O=Math.max(m,h.width),$=g+h.height+v,I=C.rectangle(-O/2,-$/2,O,$,{...k,fill:"transparent",stroke:"none"}),D=c.insert(()=>L,":first-child"),T=c.insert(()=>I);if(t.icon){const M=c.append("g");M.html(`<g>${await ci(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const E=M.node().getBBox(),R=E.width,F=E.height,q=E.x,j=E.y;M.attr("transform",`translate(${-R/2-q},${f?h.height/2+v/2-F/2-j:-h.height/2-v/2-F/2-j})`),M.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})`),D.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),K(t,T),t.intersect=function(M){if(P.info("iconSquare intersect",t,M),!t.label)return W.rect(t,M);const E=t.x??0,R=t.y??0,F=t.height??0;let q=[];return f?q=[{x:E-h.width/2,y:R-F/2},{x:E+h.width/2,y:R-F/2},{x:E+h.width/2,y:R-F/2+h.height+v},{x:E+m/2,y:R-F/2+h.height+v},{x:E+m/2,y:R+F/2},{x:E-m/2,y:R+F/2},{x:E-m/2,y:R-F/2+h.height+v},{x:E-h.width/2,y:R-F/2+h.height+v}]:q=[{x:E-m/2,y:R-F/2},{x:E+m/2,y:R-F/2},{x:E+m/2,y:R-F/2+g},{x:E+h.width/2,y:R-F/2+g},{x:E+h.width/2/2,y:R+F/2},{x:E-h.width/2,y:R+F/2},{x:E-h.width/2,y:R-F/2+g},{x:E-m/2,y:R-F/2+g}],W.polygon(t,q,M)},c}p(mm,"iconSquare");async function ym(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}=V(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=X.svg(u),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=y.rectangle(m,b,c,h,w),v=Math.max(c,d.width),C=h+d.height+x,k=y.rectangle(-v/2,-C/2,v,C,{...w,fill:"none",stroke:"none"}),B=u.insert(()=>_,":first-child"),L=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})`),B.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),K(t,L),t.intersect=function(O){if(P.info("iconSquare intersect",t,O),!t.label)return W.rect(t,O);const $=t.x??0,I=t.y??0,D=t.height??0;let T=[];return g?T=[{x:$-d.width/2,y:I-D/2},{x:$+d.width/2,y:I-D/2},{x:$+d.width/2,y:I-D/2+d.height+x},{x:$+c/2,y:I-D/2+d.height+x},{x:$+c/2,y:I+D/2},{x:$-c/2,y:I+D/2},{x:$-c/2,y:I-D/2+d.height+x},{x:$-d.width/2,y:I-D/2+d.height+x}]:T=[{x:$-c/2,y:I-D/2},{x:$+c/2,y:I-D/2},{x:$+c/2,y:I-D/2+h},{x:$+d.width/2,y:I-D/2+h},{x:$+d.width/2/2,y:I+D/2},{x:$-d.width/2,y:I+D/2},{x:$-d.width/2,y:I-D/2+h},{x:$-c/2,y:I-D/2+h}],W.polygon(t,T,O)},u}p(ym,"imageSquare");async function bm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(bm,"inv_trapezoid");async function Ja(e,t,r){const{labelStyles:i,nodeStyles:n}=V(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=X.svg(a),b=Z(t,{}),x=d||f?m.path(Ke(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",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Nt(d)).attr("ry",Nt(f)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return K(t,u),t.calcIntersect=function(m,b){return W.rect(m,b)},t.intersect=function(m){return W.rect(t,m)},a}p(Ja,"drawRect");async function xm(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))})`),K(t,a),t.intersect=function(l){return W.rect(t,l)},r}p(xm,"labelRect");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(wm,"lean_left");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(vm,"lean_right");function _m(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ht(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})`),K(t,g),t.intersect=function(m){return P.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},n}p(_m,"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 Cm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),m=oT(0,0,s,h,l,c,u),b=lT(0,c,s,h,l,c),x=Z(t,{}),y=g.path(m,x),w=g.path(b,x);n.insert(()=>w,":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",Nt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),K(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=W.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(Cm,"linedCylinder");async function km(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(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},...Ve(-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))})`),K(t,b),t.intersect=function(x){return W.polygon(t,g,x)},n}p(km,"linedWaveEdgedRect");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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=ht(m),y=f.path(x,g),w=ht(b),_=f.path(w,{...g,fill:"none"}),v=n.insert(()=>_,":first-child");return v.insert(()=>y,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.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))})`),K(t,v),t.intersect=function(C){return W.polygon(t,m,C)},n}p(Sm,"multiRect");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=Ve(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}],w=X.svg(n),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=ht(x),C=w.path(v,_),k=ht(y),B=w.path(k,_),L=n.insert(()=>C,":first-child");return L.insert(()=>B),L.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.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))})`),K(t,L),t.intersect=function(O){return W.polygon(t,x,O)},n}p(Tm,"multiWaveEdgedRectangle");async function Am(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i,t.useHtmlLabels||$t().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=X.svg(o),m=Z(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},o}p(Am,"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 Em(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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=Qe(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),K(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=W.polygon(f,b,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(Em,"question");async function Lm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ht(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))})`),K(t,y),t.intersect=function(w){return W.polygon(t,d,w)},n}p(Lm,"rect_left_inv_arrow");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=V(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 cr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(St(dt()?.flowchart?.htmlLabels)){const B=h.children[0],L=ut(h);u=B.getBoundingClientRect(),L.attr("width",u.width),L.attr("height",u.height)}P.info("Text 2",l);const d=l||[],f=h.getBBox(),g=s.node().appendChild(await cr(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],b=ut(g);u=m.getBoundingClientRect(),b.attr("width",u.width),b.attr("height",u.height);const x=(t.padding||0)/2;ut(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),ut(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),w=u.height+(t.padding||0),_=-u.width/2-x,v=-u.height/2-x;let C,k;if(t.look==="handDrawn"){const B=X.svg(a),L=Z(t,{}),O=B.path(Ke(_,v,y,w,t.rx||0),L),$=B.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,L);k=a.insert(()=>(P.debug("Rough node insert CXC",O),$),":first-child"),C=a.insert(()=>(P.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 K(t,C),t.intersect=function(B){return W.rect(t,B)},a}p(Bm,"rectWithTitle");function $i(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),w=Math.atan2((t-y)/a,(e-x)/n);let v=Math.atan2((i-y)/a,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const C=[];for(let k=0;k<20;k++){const B=k/19,L=w+B*v,O=x+n*Math.cos(L),$=y+a*Math.sin(L);C.push({x:O,y:$})}return C}p($i,"generateArcPoints");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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},...$i(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},...$i(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},...$i(-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},...$i(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],b=ht(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),K(t,y),t.intersect=function(w){return W.polygon(t,m,w)},n}p(Mm,"roundedRect");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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",Nt(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))})`),K(t,x),t.intersect=function(y){return W.rect(t,y)},n}p($m,"shadedProcess");async function Fm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(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=ht(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))})`),K(t,x),t.intersect=function(y){return W.polygon(t,g,y)},n}p(Fm,"slopedRect");async function Rm(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Ja(e,t,r)}p(Rm,"squareRect");async function Om(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),u=Z(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},...Ji(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...Ji(s/2-l,0,l,50,270,450)],f=ht(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),K(t,m),t.intersect=function(b){return W.polygon(t,d,b)},n}p(Om,"stadium");async function Im(e,t){return Ja(e,t,{rx:5,ry:5})}p(Im,"state");function Dm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(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=X.svg(c),u=Z(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),K(t,m),t.intersect=function(b){return W.circle(t,7,b)},c}p(Dm,"stateEnd");function Nm(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=X.svg(n).circle(0,0,14,Xv(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 K(t,a),t.intersect=function(o){return W.circle(t,7,o)},n}p(Nm,"stateStart");async function Pm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),f=Z(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",Nt(y)),K(t,x)}else{const d=Qe(n,s,l,u);i&&d.attr("style",i),K(t,d)}return t.intersect=function(d){return W.polygon(t,u,d)},n}p(Pm,"subroutine");async function zm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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=ht(m),y=f.path(x,g),w=ht(b),_=f.path(w,{...g,fillStyle:"solid"}),v=n.insert(()=>_,":first-child");return v.insert(()=>y,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),K(t,v),t.intersect=function(C){return W.polygon(t,m,C)},n}p(zm,"taggedRect");async function qm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:d/2},...Ve(-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,w=[{x:x+s-h,y:(y+l)*1.4},{x:x+s,y:y+l-u},{x:x+s,y:(y+l)*.9},...Ve(x+s,(y+l)*1.3,x+s-h,(y+l)*1.5,-l*.03,.5)],_=ht(b),v=g.path(_,m),C=ht(w),k=g.path(C,{...m,fillStyle:"solid"}),B=n.insert(()=>k,":first-child");return B.insert(()=>v,":first-child"),B.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.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))})`),K(t,B),t.intersect=function(L){return W.polygon(t,b,L)},n}p(qm,"taggedWaveEdgedRectangle");async function Hm(e,t){const{labelStyles:r,nodeStyles:i}=V(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),K(t,h),t.intersect=function(u){return W.rect(t,u)},n}p(Hm,"text");var hT=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"),lT=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"),cT=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 Hm(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=V.svg(n),b=lT(0,0,d,c,u,h),x=cT(0,0,d,c,u,h),y=m.path(b,Z(t,{})),_=m.path(x,Z(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>y,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=oT(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(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))})`),K(t,g),t.intersect=function(m){const b=W.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(Hm,"tiltedCylinder");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=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=V.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(jm,"trapezoid");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=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=V.svg(n),d=Z(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=ht(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),K(t,b),t.intersect=function(x){return W.polygon(t,f,x)},n}p(Um,"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(dt().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=V.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(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,K(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 I.info("Triangle intersect",t,u,y),W.polygon(t,u,y)},n}p(Gm,"triangle");async function Ym(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=V.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Xe(-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=ht(x),_=m.path(y,b),C=n.insert(()=>_,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.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))})`),K(t,C),t.intersect=function(w){return W.polygon(t,x,w)},n}p(Ym,"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=V.svg(n),x=Z(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-u/2,y:g/2},...Xe(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Xe(u/2,-g/2,-u/2,-g/2,f,-1)],_=ht(y),C=b.path(_,x),w=n.insert(()=>C,":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),K(t,w),t.intersect=function(v){return W.polygon(t,y,v)},n}p(Xm,"waveRectangle");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=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=V.svg(n),g=Z(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"),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 Wm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),b=uT(0,0,d,c,u,h),x=dT(0,0,d,c,u,h),y=m.path(b,Z(t,{})),w=m.path(x,Z(t,{fill:"none"}));g=n.insert(()=>w,":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",Nt(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))})`),K(t,g),t.intersect=function(m){const b=W.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(Wm,"tiltedCylinder");async function jm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),d=Z(t,{}),f=ht(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=Qe(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,K(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(jm,"trapezoid");async function Um(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),d=Z(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=ht(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),K(t,b),t.intersect=function(x){return W.polygon(t,f,x)},n}p(Um,"trapezoidalPentagon");async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await at(e,t,nt(t)),s=St(dt().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=X.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(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,K(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 P.info("Triangle intersect",t,u,y),W.polygon(t,u,y)},n}p(Gm,"triangle");async function Ym(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ve(-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=ht(x),w=m.path(y,b),_=n.insert(()=>w,":first-child");return _.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-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))})`),K(t,_),t.intersect=function(v){return W.polygon(t,x,v)},n}p(Ym,"waveEdgedRectangle");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),x=Z(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-u/2,y:g/2},...Ve(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ve(u/2,-g/2,-u/2,-g/2,f,-1)],w=ht(y),_=b.path(w,x),v=n.insert(()=>_,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),K(t,v),t.intersect=function(C){return W.polygon(t,y,C)},n}p(Vm,"waveRectangle");async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=V(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=X.svg(n),g=Z(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))})`),K(t,y),t.intersect=function(_){return W.polygon(t,m,_)},n}p(Vm,"windowPane");async function Hl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:j}=$t(),{background:Q}=j,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Q}`]};await Hl(e,lt)}const i=$t();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 Q=await Ja(e,t,j);if(!St(i.htmlLabels)){const lt=Q.select("text"),it=lt.node()?.getBBox();lt.attr("transform",`translate(${-it.width/2}, 0)`)}return Q}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 Rr(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,_=!0,C=!0;for(const j of r.attributes){const Q=await Rr(h,j.type,i,0,d,["attribute-type"],s);m=Math.max(m,Q.width+n);const lt=await Rr(h,j.name,i,0,d,["attribute-name"],s);b=Math.max(b,lt.width+n);const it=await Rr(h,j.keys.join(),i,0,d,["attribute-keys"],s);x=Math.max(x,it.width+n);const gt=await Rr(h,j.comment,i,0,d,["attribute-comment"],s);y=Math.max(y,gt.width+n);const mt=Math.max(Q.height,lt.height,it.height,gt.height)+a;g.push({yOffset:d,rowHeight:mt}),d+=mt}let w=4;x<=n&&(_=!1,x=0,w--),y<=n&&(C=!1,y=0,w--);const v=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,$=V.svg(h),E=Z(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((j,Q)=>j+(Q?.rowHeight??0),0));const M=Math.max(v.width+n*2,t?.width||0,k),N=Math.max((R??0)+u.height,t?.height||0),D=-M/2,L=-N/2;h.selectAll("g:not(:first-child)").each((j,Q,lt)=>{const it=ut(lt[Q]),gt=it.attr("transform");let mt=0,zt=0;if(gt){const yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(gt);yt&&(mt=parseFloat(yt[1]),zt=parseFloat(yt[2]),it.attr("class").includes("attribute-name")?mt+=m:it.attr("class").includes("attribute-keys")?mt+=m+b:it.attr("class").includes("attribute-comment")&&(mt+=m+b+x))}it.attr("transform",`translate(${D+n/2+mt}, ${zt+L+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(L+a/2)+")");const F=$.rectangle(D,L,M,N,E),A=h.insert(()=>F,":first-child").attr("style",o.join("")),{themeVariables:O}=$t(),{rowEven:B,rowOdd:q,nodeBorder:H}=O;f.push(0);for(const[j,Q]of g.entries()){const it=(j+1)%2===0&&Q.yOffset!==0,gt=$.rectangle(D,u.height+L+Q?.yOffset,M,Q?.rowHeight,{...E,fill:it?B:q,stroke:H});h.insert(()=>gt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${it?"even":"odd"}`)}let Y=$.line(D,u.height+L,M+D,u.height+L,E);h.insert(()=>Y).attr("class","divider"),Y=$.line(m+D,u.height+L,m+D,N+L,E),h.insert(()=>Y).attr("class","divider"),_&&(Y=$.line(m+b+D,u.height+L,m+b+D,N+L,E),h.insert(()=>Y).attr("class","divider")),C&&(Y=$.line(m+b+x+D,u.height+L,m+b+x+D,N+L,E),h.insert(()=>Y).attr("class","divider"));for(const j of f)Y=$.line(D,u.height+L+j,M+D,u.height+L+j,E),h.insert(()=>Y).attr("class","divider");if(K(t,A),l&&t.look!=="handDrawn"){const Q=l.split(";")?.filter(lt=>lt.includes("stroke"))?.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",Q??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(j){return W.rect(t,j)},h}p(Hl,"erBox");async function Rr(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!==zs(t)&&(t=zs(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await qe(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=ut(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Rr,"addText");async function Zm(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 Fi(s,{text:`«${y}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Fi(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 _=await Fi(c,y,m,[y.parseClassifier()]);m+=_+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 _=await Fi(h,y,b,[y.parseClassifier()]);b+=_+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(Zm,"textHelper");async function Fi(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=$t();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)),pr(s)&&(o=!0);const l=await qe(n,Ko(Ze(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=ut(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,C=parseInt(y,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}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")&&ut(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(Fi,"addText");async function Km(e,t){const r=dt(),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 Zm(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=V.svg(s),g=Z(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,_=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),C=s.insert(()=>_,":first-child");C.attr("class","basic label-container");const w=C.node().getBBox();s.selectAll(".text").each((E,R,M)=>{const N=ut(M[R]),D=N.attr("transform");let L=0;if(D){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);B&&(L=parseFloat(B[2]))}let F=L+y+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(F-=4);let A=x;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(A=-N.node()?.getBBox().width/2||0,s.selectAll("text").each(function(O,B,q){window.getComputedStyle(q[B]).textAnchor==="middle"&&(A=0)})),N.attr("transform",`translate(${A}, ${F})`)});const v=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,$=s.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const E=f.line(w.x,v+k+y+i,w.x+w.width,v+k+y+i,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const E=f.line(w.x,v+k+$+y+n*2+i,w.x+w.width,v+k+$+y+i+n*2,g);s.insert(()=>E).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),C.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 E=RegExp(/color\s*:\s*([^;]*)/),R=E.exec(u);if(R){const M=R[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}else if(c){const M=E.exec(c);if(M){const N=M[0].replace("color","fill");s.selectAll("tspan").attr("style",N)}}}return K(t,C),t.intersect=function(E){return W.rect(t,E)},s}p(Km,"classBox");async function Qm(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 v=await ye(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=v;const k=await ye(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=k;const $=await ye(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=$,await ye(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const v=await ye(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=v,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=V.svg(h),_=Z(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=y.rectangle(b,x,g,m,_),w=h.insert(()=>C,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((v,k,$)=>{const E=ut($[k]),R=E.attr("transform");let M=0,N=0;if(R){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);A&&(M=parseFloat(A[1]),N=parseFloat(A[2]))}const D=N-m/2;let L=b+o/2;(k===0||k===1)&&(L=M),E.attr("transform",`translate(${L}, ${D+o})`)}),d>u+f+s){const v=y.line(b,x+u+f+s,b+g,x+u+f+s,_);h.insert(()=>v).attr("style",i)}return K(t,w),t.intersect=function(v){return W.rect(t,v)},h}p(Qm,"requirementBox");async function ye(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=dt(),o=a.htmlLabels??!0,s=await qe(n,Ko(Ze(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=ut(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 hT=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 Jm(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 $s(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await $s(s,"ticket"in t&&t.ticket||"",f);const{label:b,bbox:x}=await $s(s,"assigned"in t&&t.assigned||"",f);t.width=o;const y=10,_=t?.width||0,C=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-_/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-C+l.height/2)+")"),b.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-C+l.height/2)+")");let $;const{rx:E,ry:R}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const N=V.svg(s),D=Z(t,{}),L=E||R?N.path(Ke(v,k,_,w,E||0),D):N.rectangle(v,k,_,w,D);$=s.insert(()=>L,":first-child"),$.attr("class","basic label-container").attr("style",M||null)}else{$=s.insert("rect",":first-child"),$.attr("class","basic label-container __APA__").attr("style",n).attr("rx",E??5).attr("ry",R??5).attr("x",v).attr("y",k).attr("width",_).attr("height",w);const N="priority"in t&&t.priority;if(N){const D=s.append("line"),L=v+2,F=k+Math.floor((E??0)/2),A=k+w-Math.floor((E??0)/2);D.attr("x1",L).attr("y1",F).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",hT(N))}}return K(t,$),t.height=w,t.intersect=function(N){return W.rect(t,N)},s}p(Jm,"kanbanItem");async function ty(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))})`),K(t,y),t.intersect=function(w){return W.polygon(t,m,w)},n}p(Xm,"windowPane");async function Wl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:U}=$t(),{background:Q}=U,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Q}`]};await Wl(e,lt)}const i=$t();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=V(t);if(r.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};ve(t.label,i)+U.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const Q=await Ja(e,t,U);if(!St(i.htmlLabels)){const lt=Q.select("text"),it=lt.node()?.getBBox();lt.attr("transform",`translate(${-it.width/2}, 0)`)}return Q}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 Rr(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,w=!0,_=!0;for(const U of r.attributes){const Q=await Rr(h,U.type,i,0,d,["attribute-type"],s);m=Math.max(m,Q.width+n);const lt=await Rr(h,U.name,i,0,d,["attribute-name"],s);b=Math.max(b,lt.width+n);const it=await Rr(h,U.keys.join(),i,0,d,["attribute-keys"],s);x=Math.max(x,it.width+n);const gt=await Rr(h,U.comment,i,0,d,["attribute-comment"],s);y=Math.max(y,gt.width+n);const mt=Math.max(Q.height,lt.height,it.height,gt.height)+a;g.push({yOffset:d,rowHeight:mt}),d+=mt}let v=4;x<=n&&(w=!1,x=0,v--),y<=n&&(_=!1,y=0,v--);const C=h.node().getBBox();if(u.width+n*2-(m+b+x+y)>0){const U=u.width+n*2-(m+b+x+y);m+=U/v,b+=U/v,x>0&&(x+=U/v),y>0&&(y+=U/v)}const k=m+b+x+y,B=X.svg(h),L=Z(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((U,Q)=>U+(Q?.rowHeight??0),0));const $=Math.max(C.width+n*2,t?.width||0,k),I=Math.max((O??0)+u.height,t?.height||0),D=-$/2,T=-I/2;h.selectAll("g:not(:first-child)").each((U,Q,lt)=>{const it=ut(lt[Q]),gt=it.attr("transform");let mt=0,zt=0;if(gt){const yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(gt);yt&&(mt=parseFloat(yt[1]),zt=parseFloat(yt[2]),it.attr("class").includes("attribute-name")?mt+=m:it.attr("class").includes("attribute-keys")?mt+=m+b:it.attr("class").includes("attribute-comment")&&(mt+=m+b+x))}it.attr("transform",`translate(${D+n/2+mt}, ${zt+T+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(T+a/2)+")");const M=B.rectangle(D,T,$,I,L),E=h.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:R}=$t(),{rowEven:F,rowOdd:q,nodeBorder:j}=R;f.push(0);for(const[U,Q]of g.entries()){const it=(U+1)%2===0&&Q.yOffset!==0,gt=B.rectangle(D,u.height+T+Q?.yOffset,$,Q?.rowHeight,{...L,fill:it?F:q,stroke:j});h.insert(()=>gt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${it?"even":"odd"}`)}let Y=B.line(D,u.height+T,$+D,u.height+T,L);h.insert(()=>Y).attr("class","divider"),Y=B.line(m+D,u.height+T,m+D,I+T,L),h.insert(()=>Y).attr("class","divider"),w&&(Y=B.line(m+b+D,u.height+T,m+b+D,I+T,L),h.insert(()=>Y).attr("class","divider")),_&&(Y=B.line(m+b+x+D,u.height+T,m+b+x+D,I+T,L),h.insert(()=>Y).attr("class","divider"));for(const U of f)Y=B.line(D,u.height+T+U,$+D,u.height+T+U,L),h.insert(()=>Y).attr("class","divider");if(K(t,E),l&&t.look!=="handDrawn"){const Q=l.split(";")?.filter(lt=>lt.includes("stroke"))?.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",Q??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(U){return W.rect(t,U)},h}p(Wl,"erBox");async function Rr(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!==zs(t)&&(t=zs(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await qe(s,t,{width:ve(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=ut(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Rr,"addText");async function Zm(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 Fi(s,{text:`«${y}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Fi(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 w=await Fi(c,y,m,[y.parseClassifier()]);m+=w+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 w=await Fi(h,y,b,[y.parseClassifier()]);b+=w+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(Zm,"textHelper");async function Fi(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=$t();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)),pr(s)&&(o=!0);const l=await qe(n,Ko(Ze(s)),{width:ve(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=ut(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")&&ut(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(Fi,"addText");async function Km(e,t){const r=dt(),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 Zm(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=V(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=X.svg(s),g=Z(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,w=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(()=>w,":first-child");_.attr("class","basic label-container");const v=_.node().getBBox();s.selectAll(".text").each((L,O,$)=>{const I=ut($[O]),D=I.attr("transform");let T=0;if(D){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);F&&(T=parseFloat(F[2]))}let M=T+y+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(M-=4);let E=x;(I.attr("class").includes("label-group")||I.attr("class").includes("annotation-group"))&&(E=-I.node()?.getBBox().width/2||0,s.selectAll("text").each(function(R,F,q){window.getComputedStyle(q[F]).textAnchor==="middle"&&(E=0)})),I.attr("transform",`translate(${E}, ${M})`)});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,B=s.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const L=f.line(v.x,C+k+y+i,v.x+v.width,C+k+y+i,g);s.insert(()=>L).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const L=f.line(v.x,C+k+B+y+n*2+i,v.x+v.width,C+k+B+y+i+n*2,g);s.insert(()=>L).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 L=RegExp(/color\s*:\s*([^;]*)/),O=L.exec(u);if(O){const $=O[0].replace("color","fill");s.selectAll("tspan").attr("style",$)}else if(c){const $=L.exec(c);if($){const I=$[0].replace("color","fill");s.selectAll("tspan").attr("style",I)}}}return K(t,_),t.intersect=function(L){return W.rect(t,L)},s}p(Km,"classBox");async function Qm(e,t){const{labelStyles:r,nodeStyles:i}=V(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 B=await ye(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=B,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=X.svg(h),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=y.rectangle(b,x,g,m,w),v=h.insert(()=>_,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((C,k,B)=>{const L=ut(B[k]),O=L.attr("transform");let $=0,I=0;if(O){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);E&&($=parseFloat(E[1]),I=parseFloat(E[2]))}const D=I-m/2;let T=b+o/2;(k===0||k===1)&&(T=$),L.attr("transform",`translate(${T}, ${D+o})`)}),d>u+f+s){const C=y.line(b,x+u+f+s,b+g,x+u+f+s,w);h.insert(()=>C).attr("style",i)}return K(t,v),t.intersect=function(C){return W.rect(t,C)},h}p(Qm,"requirementBox");async function ye(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=dt(),o=a.htmlLabels??!0,s=await qe(n,Ko(Ze(t)),{width:ve(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=ut(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 Jm(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=V(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 $s(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await $s(s,"ticket"in t&&t.ticket||"",f);const{label:b,bbox:x}=await $s(s,"assigned"in t&&t.assigned||"",f);t.width=o;const y=10,w=t?.width||0,_=Math.max(m.height,x.height)/2,v=Math.max(l.height+y*2,t?.height||0)+_,C=-w/2,k=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-_+l.height/2)+")"),b.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-_+l.height/2)+")");let B;const{rx:L,ry:O}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const I=X.svg(s),D=Z(t,{}),T=L||O?I.path(Ke(C,k,w,v,L||0),D):I.rectangle(C,k,w,v,D);B=s.insert(()=>T,":first-child"),B.attr("class","basic label-container").attr("style",$||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",n).attr("rx",L??5).attr("ry",O??5).attr("x",C).attr("y",k).attr("width",w).attr("height",v);const I="priority"in t&&t.priority;if(I){const D=s.append("line"),T=C+2,M=k+Math.floor((L??0)/2),E=k+v-Math.floor((L??0)/2);D.attr("x1",T).attr("y1",M).attr("x2",T).attr("y2",E).attr("stroke-width","4").attr("stroke",fT(I))}}return K(t,B),t.height=v,t.intersect=function(I){return W.rect(t,I)},s}p(Jm,"kanbanItem");async function t0(e,t){const{labelStyles:r,nodeStyles:i}=V(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=V.svg(n),_=Z(t,{}),C=y.path(x,_);b=n.insert(()=>C,":first-child"),b.attr("class","basic label-container").attr("style",Nt(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})`),K(t,b),t.calcIntersect=function(y,_){return W.rect(y,_)},t.intersect=function(y){return I.info("Bang intersect",t,y),W.rect(t,y)},n}p(ty,"bang");async function ey(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=X.svg(n),w=Z(t,{}),_=y.path(x,w);b=n.insert(()=>_,":first-child"),b.attr("class","basic label-container").attr("style",Nt(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})`),K(t,b),t.calcIntersect=function(y,w){return W.rect(y,w)},t.intersect=function(y){return P.info("Bang intersect",t,y),W.rect(t,y)},n}p(t0,"bang");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=V(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=V.svg(n),y=Z(t,{}),_=x.path(b,y);m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Nt(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})`),K(t,m),t.calcIntersect=function(x,y){return W.rect(x,y)},t.intersect=function(x){return I.info("Cloud intersect",t,x),W.rect(t,x)},n}p(ey,"cloud");async function ry(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=X.svg(n),y=Z(t,{}),w=x.path(b,y);m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Nt(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})`),K(t,m),t.calcIntersect=function(x,y){return W.rect(x,y)},t.intersect=function(x){return P.info("Cloud intersect",t,x),W.rect(t,x)},n}p(e0,"cloud");async function r0(e,t){const{labelStyles:r,nodeStyles:i}=V(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()),K(t,d),t.calcIntersect=function(f,g){return W.rect(f,g)},t.intersect=function(f){return W.rect(t,f)},n}p(ry,"defaultMindmapNode");async function iy(e,t){const r={padding:t.padding??0};return Wl(e,t,r)}p(iy,"mindmapCircle");var uT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Rm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Mm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Om},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Pm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Wl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ty},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ey},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Em},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:um},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:_m},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:jm},{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:bm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Wm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Zg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$m},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Nm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Dm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:em},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rm},{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:Ym},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Hm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:im},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:am},{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:Vm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:om},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Um},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Fm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Tm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Sm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Vg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Jg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zm},{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:Lm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:km}],dT=p(()=>{const t=[...Object.entries({state:Im,choice:Kg,note:Am,rectWithTitle:Bm,labelRect:xm,iconSquare:mm,iconCircle:pm,icon:fm,iconRounded:gm,imageSquare:ym,anchor:Xg,kanbanItem:Jm,mindmapCircle:iy,defaultMindmapNode:ry,classBox:Km,erBox:Hl,requirementBox:Qm}),...uT.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ny=dT();function ay(e){return e in ny}p(ay,"isValidShape");var ts=new Map;async function jl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?ny[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),ts.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(jl,"insertNode");var fT=p((e,t)=>{ts.set(t.id,e)},"setNodeElem"),pT=p(()=>{ts.clear()},"clear"),gT=p(e=>{const t=ts.get(e.id);I.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"),mT=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&qh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&qh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),yT={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}},qh=p((e,t,r,i,n,a,o)=>{const s=yT[r];if(!s){I.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"),wa=new Map,Mt=new Map,bT=p(()=>{wa.clear(),Mt.clear()},"clear"),En=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),sy=p(async(e,t)=>{let r=St(dt().flowchart.htmlLabels);const{labelStyles:i}=X(t);t.labelStyle=i;const n=await qe(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});I.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=ut(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),wa.set(t.id,a),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await cr(t.startLabelLeft,En(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+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startLeft=h,Ri(l,t.startLabelLeft)}if(t.startLabelRight){const c=await cr(t.startLabelRight,En(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+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startRight=h,Ri(l,t.startLabelRight)}if(t.endLabelLeft){const c=await cr(t.endLabelLeft,En(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),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endLeft=h,Ri(l,t.endLabelLeft)}if(t.endLabelRight){const c=await cr(t.endLabelRight,En(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),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endRight=h,Ri(l,t.endLabelRight)}return n},"insertEdgeLabel");function Ri(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ri,"setTerminalWidth");var oy=p((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,wa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:n}=za(i);if(e.label){const a=wa.get(e.id);let o=e.x,s=e.y;if(r){const l=ae.calcLabelPosition(r);I.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=Mt.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=Mt.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=Mt.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=Mt.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"),xT=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"),_T=p((e,t,r)=>{I.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()),K(t,d),t.calcIntersect=function(f,g){return W.rect(f,g)},t.intersect=function(f){return W.rect(t,f)},n}p(r0,"defaultMindmapNode");async function i0(e,t){const r={padding:t.padding??0};return Hl(e,t,r)}p(i0,"mindmapCircle");var pT=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Rm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Mm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Om},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Pm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Hl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:t0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:e0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Em},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:um},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:vm},{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:jm},{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:bm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Hm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Zg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$m},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Nm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Dm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:em},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:_m},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ym},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Wm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Cm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:im},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:am},{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:Xm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:om},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Um},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Fm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Tm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Sm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Jg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Vm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Lm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:km}],gT=p(()=>{const t=[...Object.entries({state:Im,choice:Kg,note:Am,rectWithTitle:Bm,labelRect:xm,iconSquare:mm,iconCircle:pm,icon:fm,iconRounded:gm,imageSquare:ym,anchor:Vg,kanbanItem:Jm,mindmapCircle:i0,defaultMindmapNode:r0,classBox:Km,erBox:Wl,requirementBox:Qm}),...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"),n0=gT();function a0(e){return e in n0}p(a0,"isValidShape");var ts=new Map;async function jl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?n0[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),ts.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(jl,"insertNode");var mT=p((e,t)=>{ts.set(t.id,e)},"setNodeElem"),yT=p(()=>{ts.clear()},"clear"),bT=p(e=>{const t=ts.get(e.id);P.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&&qh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&qh(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}},qh=p((e,t,r,i,n,a,o)=>{const s=wT[r];if(!s){P.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"),va=new Map,Mt=new Map,vT=p(()=>{va.clear(),Mt.clear()},"clear"),En=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),s0=p(async(e,t)=>{let r=St(dt().flowchart.htmlLabels);const{labelStyles:i}=V(t);t.labelStyle=i;const n=await qe(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});P.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=ut(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),va.set(t.id,a),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await cr(t.startLabelLeft,En(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+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startLeft=h,Ri(l,t.startLabelLeft)}if(t.startLabelRight){const c=await cr(t.startLabelRight,En(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+")"),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startRight=h,Ri(l,t.startLabelRight)}if(t.endLabelLeft){const c=await cr(t.endLabelLeft,En(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),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endLeft=h,Ri(l,t.endLabelLeft)}if(t.endLabelRight){const c=await cr(t.endLabelRight,En(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),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endRight=h,Ri(l,t.endLabelRight)}return n},"insertEdgeLabel");function Ri(e,t){dt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ri,"setTerminalWidth");var o0=p((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,va.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:n}=za(i);if(e.label){const a=va.get(e.id);let o=e.x,s=e.y;if(r){const l=ae.calcLabelPosition(r);P.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=Mt.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=Mt.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=Mt.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=Mt.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)=>{P.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),I.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 I.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)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!xT(t,a)&&!n){const o=_T(t,i,a);I.debug("abc88 inside",a,i,o),I.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)?I.warn("abc88 no intersect",o,r):r.push(o),n=!0}else I.warn("abc88 outside",a,i),i=a,n||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function ly(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(ly,"extractCornerPoints");var Hh=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"),wT=p(function(e){const{cornerPointPositions:t}=ly(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=Hh(n,o,5),l=Hh(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){I.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 I.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"),CT=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"),cy=p(function(e,t,r,i,n,a,o,s=!1){const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const L in t.cssCompiledStyles)ml(L)||f.push(t.cssCompiledStyles[L]);I.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])),I.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&&(I.info("to cluster abc88",r.get(t.toCluster)),c=Wh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(I.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(L=>!Number.isNaN(L.y));m=wT(m);let b=Ni;switch(b=ea,t.curve){case"linear":b=ea;break;case"basis":b=Ni;break;case"cardinal":b=bd;break;case"bumpX":b=fd;break;case"bumpY":b=pd;break;case"catmullRom":b=_d;break;case"monotoneX":b=Td;break;case"monotoneY":b=Ad;break;case"natural":b=Ld;break;case"step":b=Bd;break;case"stepAfter":b=$d;break;case"stepBefore":b=Md;break;default:b=Ni}const{x,y}=bp(t),_=ud().x(x).y(y).curve(b);let C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let w,v=t.curve==="rounded"?hy(uy(m,t),5):_(m);const k=Array.isArray(t.style)?t.style:[t.style];let $=k.find(L=>L?.startsWith("stroke:")),E=!1;if(t.look==="handDrawn"){const L=V.svg(e);Object.assign([],m);const F=L.path(v,{roughness:.3,seed:l});C+=" transition",w=ut(F).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",k?k.reduce((O,B)=>O+";"+B,""):"");let A=w.attr("d");w.attr("d",A),e.node().appendChild(w.node())}else{const L=f.join(";"),F=k?k.reduce((j,Q)=>j+Q+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const O=(L?L+";"+F+";":F)+";"+(k?k.reduce((j,Q)=>j+";"+Q,""):"");w=e.append("path").attr("d",v).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(A??"")).attr("style",O),$=O.match(/stroke:([^;]+)/)?.[1],E=t.animate===!0||!!t.animation||L.includes("animation");const B=w.node(),q=typeof B.getTotalLength=="function"?B.getTotalLength():0,H=ch[t.arrowTypeStart]||0,Y=ch[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const Q=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?CT(q,H,Y):`0 ${H} ${q-H-Y} ${Y}`}; stroke-dashoffset: 0;`;w.attr("style",Q+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(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let R="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd),mT(w,t,R,o,i,$);const M=Math.floor(c.length/2),N=c[M];ae.isLabelCoordinateInPath(N,w.attr("d"))||(h=!0);let D={};return h&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge");function hy(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,_=m*x+b*y,C=Math.max(-1,Math.min(1,_)),w=Math.acos(C);if(w<n||Math.abs(Math.PI-w)<n){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(w/2),f/2,g/2),k=o.x-m*v,$=o.y-b*v,E=o.x+x*v,R=o.y+y*v;r+=`L${k},${$}`,r+=`Q${o.x},${o.y} ${E},${R}`}}return r}p(hy,"generateRoundedPath");function $o(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($o,"calculateDeltaAndAngle");function uy(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&It[t.arrowTypeStart]){const n=It[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=$o(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&&It[t.arrowTypeEnd]){const n=It[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:s}=$o(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(uy,"applyMarkerOffsetsToPoints");var vT=p((e,t,r,i)=>{t.forEach(n=>{PT[n](e,r,i)})},"insertMarkers"),kT=p((e,t,r)=>{I.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"),ST=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"),TT=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"),AT=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"),ET=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"),LT=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"),BT=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"),MT=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"),$T=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"),FT=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"),RT=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"),OT=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"),IT=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"),DT=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),P.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 P.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"),Hh=p((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(P.info("abc88 checking point",a,t),!_T(t,a)&&!n){const o=CT(t,i,a);P.debug("abc88 inside",a,i,o),P.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)?P.warn("abc88 no intersect",o,r):r.push(o),n=!0}else P.warn("abc88 outside",a,i),i=a,n||r.push(a)}),P.debug("returning points",r),r},"cutPathAtIntersect");function l0(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(l0,"extractCornerPoints");var Wh=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}=l0(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=Wh(n,o,5),l=Wh(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){P.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 P.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"),c0=p(function(e,t,r,i,n,a,o,s=!1){const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const T in t.cssCompiledStyles)ml(T)||f.push(t.cssCompiledStyles[T]);P.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])),P.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&&(P.info("to cluster abc88",r.get(t.toCluster)),c=Hh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Hh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(T=>!Number.isNaN(T.y));m=kT(m);let b=Ni;switch(b=ea,t.curve){case"linear":b=ea;break;case"basis":b=Ni;break;case"cardinal":b=bd;break;case"bumpX":b=fd;break;case"bumpY":b=pd;break;case"catmullRom":b=wd;break;case"monotoneX":b=Td;break;case"monotoneY":b=Ad;break;case"natural":b=Ld;break;case"step":b=Bd;break;case"stepAfter":b=$d;break;case"stepBefore":b=Md;break;default:b=Ni}const{x,y}=bp(t),w=ud().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 v,C=t.curve==="rounded"?h0(u0(m,t),5):w(m);const k=Array.isArray(t.style)?t.style:[t.style];let B=k.find(T=>T?.startsWith("stroke:")),L=!1;if(t.look==="handDrawn"){const T=X.svg(e);Object.assign([],m);const M=T.path(C,{roughness:.3,seed:l});_+=" transition",v=ut(M).select("path").attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")).attr("style",k?k.reduce((R,F)=>R+";"+F,""):"");let E=v.attr("d");v.attr("d",E),e.node().appendChild(v.node())}else{const T=f.join(";"),M=k?k.reduce((U,Q)=>U+Q+";",""):"";let E="";t.animate&&(E=" edge-animation-fast"),t.animation&&(E=" edge-animation-"+t.animation);const R=(T?T+";"+M+";":M)+";"+(k?k.reduce((U,Q)=>U+";"+Q,""):"");v=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(E??"")).attr("style",R),B=R.match(/stroke:([^;]+)/)?.[1],L=t.animate===!0||!!t.animation||T.includes("animation");const F=v.node(),q=typeof F.getTotalLength=="function"?F.getTotalLength():0,j=ch[t.arrowTypeStart]||0,Y=ch[t.arrowTypeEnd]||0;if(t.look==="neo"&&!L){const Q=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ST(q,j,Y):`0 ${j} ${q-j-Y} ${Y}`}; stroke-dashoffset: 0;`;v.attr("style",Q+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),t.showPoints&&m.forEach(T=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",T.x).attr("cy",T.y)});let O="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd),xT(v,t,O,o,i,B);const $=Math.floor(c.length/2),I=c[$];ae.isLabelCoordinateInPath(I,v.attr("d"))||(h=!0);let D={};return h&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge");function h0(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,w=m*x+b*y,_=Math.max(-1,Math.min(1,w)),v=Math.acos(_);if(v<n||Math.abs(Math.PI-v)<n){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(v/2),f/2,g/2),k=o.x-m*C,B=o.y-b*C,L=o.x+x*C,O=o.y+y*C;r+=`L${k},${B}`,r+=`Q${o.x},${o.y} ${L},${O}`}}return r}p(h0,"generateRoundedPath");function $o(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($o,"calculateDeltaAndAngle");function u0(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&It[t.arrowTypeStart]){const n=It[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=$o(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&&It[t.arrowTypeEnd]){const n=It[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:s}=$o(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(u0,"applyMarkerOffsetsToPoints");var TT=p((e,t,r,i)=>{t.forEach(n=>{HT[n](e,r,i)})},"insertMarkers"),AT=p((e,t,r)=>{P.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
292
292
  L20,10
293
293
  M20,10
294
- L0,20`)},"requirement_arrow"),NT=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"),PT={extension:kT,composition:ST,aggregation:TT,dependency:AT,lollipop:ET,point:LT,circle:BT,cross:MT,barb:$T,only_one:FT,zero_or_one:RT,one_or_more:OT,zero_or_more:IT,requirement_arrow:DT,requirement_contains:NT},dy=vT,zT={common:_r,getConfig:$t,insertCluster:qg,insertEdge:cy,insertEdgeLabel:sy,insertMarkers:dy,insertNode:jl,interpolateToCurve:Cl,labelHelper:at,log:I,positionEdgeLabel:oy},tn={},fy=p(e=>{for(const t of e)tn[t.name]=t},"registerLayoutLoaders"),qT=p(()=>{fy([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-CqJhtHGg.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-BayjyXzv.cjs")),"loader")}])},"registerDefaultLayoutLoaders");qT();var WT=p(async(e,t)=>{if(!(e.layoutAlgorithm in tn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=tn[e.layoutAlgorithm];return(await r.loader()).render(e,t,zT,{algorithm:r.algorithm})},"render"),HT=p((e="",{fallback:t="dagre"}={})=>{if(e in tn)return e;if(t in tn)return I.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"),py="comm",gy="rule",my="decl",jT="@import",UT="@namespace",GT="@keyframes",YT="@layer",yy=Math.abs,Ul=String.fromCharCode;function by(e){return e.trim()}function qn(e,t,r){return e.replace(t,r)}function XT(e,t,r){return e.indexOf(t,r)}function Pr(e,t){return e.charCodeAt(t)|0}function ei(e,t,r){return e.slice(t,r)}function be(e){return e.length}function VT(e){return e.length}function Ln(e,t){return t.push(e),e}var es=1,ri=1,xy=0,oe=0,vt=0,ui="";function Gl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:es,column:ri,length:o,return:"",siblings:s}}function ZT(){return vt}function KT(){return vt=oe>0?Pr(ui,--oe):0,ri--,vt===10&&(ri=1,es--),vt}function ue(){return vt=oe<xy?Pr(ui,oe++):0,ri++,vt===10&&(ri=1,es++),vt}function He(){return Pr(ui,oe)}function Wn(){return oe}function rs(e,t){return ei(ui,e,t)}function en(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 QT(e){return es=ri=1,xy=be(ui=e),oe=0,[]}function JT(e){return ui="",e}function Fs(e){return by(rs(oe-1,Fo(e===91?e+2:e===40?e+1:e)))}function tA(e){for(;(vt=He())&&vt<33;)ue();return en(e)>2||en(vt)>3?"":" "}function eA(e,t){for(;--t&&ue()&&!(vt<48||vt>102||vt>57&&vt<65||vt>70&&vt<97););return rs(e,Wn()+(t<6&&He()==32&&ue()==32))}function Fo(e){for(;ue();)switch(vt){case e:return oe;case 34:case 39:e!==34&&e!==39&&Fo(vt);break;case 40:e===41&&Fo(e);break;case 92:ue();break}return oe}function rA(e,t){for(;ue()&&e+vt!==57;)if(e+vt===84&&He()===47)break;return"/*"+rs(t,oe-1)+"*"+Ul(e===47?e:ue())}function iA(e){for(;!en(He());)ue();return rs(e,oe)}function nA(e){return JT(Hn("",null,null,null,[""],e=QT(e),0,[0],e))}function Hn(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,_="",C=n,w=a,v=i,k=_;b;)switch(g=y,y=ue()){case 40:if(g!=108&&Pr(k,u-1)==58){XT(k+=qn(Fs(y),"&","&\f"),"&\f",yy(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Fs(y);break;case 9:case 10:case 13:case 32:k+=tA(g);break;case 92:k+=eA(Wn()-1,7);continue;case 47:switch(He()){case 42:case 47:Ln(aA(rA(ue(),Wn()),t,r,l),l),(en(g||1)==5||en(He()||1)==5)&&be(k)&&ei(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=qn(k,/\f/g,"")),f>0&&(be(k)-u||m===0&&g===47)&&Ln(f>32?Uh(k+";",i,r,u-1,l):Uh(qn(k," ","")+";",i,r,u-2,l),l);break;case 59:k+=";";default:if(Ln(v=jh(k,t,r,c,h,n,s,_,C=[],w=[],u,a),a),y===123)if(h===0)Hn(k,t,v,v,C,a,u,s,w);else{switch(d){case 99:if(Pr(k,3)===110)break;case 108:if(Pr(k,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Hn(e,v,v,i&&Ln(jh(e,v,v,0,0,n,s,_,n,C=[],u,w),w),n,w,u,s,i?C:w):Hn(k,v,v,v,[""],w,0,s,w)}}c=h=f=0,m=x=1,_=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&&KT()==125)continue}switch(k+=Ul(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:He()===45&&(k+=Fs(ue())),d=He(),h=u=be(_=k+=iA(Wn())),y++;break;case 45:g===45&&be(k)==2&&(m=0)}}return a}function jh(e,t,r,i,n,a,o,s,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=VT(f),m=0,b=0,x=0;m<i;++m)for(var y=0,_=ei(e,d+1,d=yy(b=o[m])),C=e;y<g;++y)(C=by(b>0?f[y]+" "+_:qn(_,/&\f/g,f[y])))&&(l[x++]=C);return Gl(e,t,r,n===0?gy:s,l,c,h,u)}function aA(e,t,r,i){return Gl(e,t,r,py,Ul(ZT()),ei(e,2,-2),0,i)}function Uh(e,t,r,i,n){return Gl(e,t,r,my,ei(e,0,i),ei(e,i+1,-1),i,n)}function Ro(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function sA(e,t,r,i){switch(e.type){case YT:if(e.children.length)break;case jT:case UT:case my:return e.return=e.return||e.value;case py:return"";case GT:return e.return=e.value+"{"+Ro(e.children,i)+"}";case gy:if(!be(e.value=e.props.join(",")))return""}return be(r=Ro(e.children,i))?e.return=e.value+"{"+r+"}":""}var oA=Ep(Object.keys,Object),lA=Object.prototype,cA=lA.hasOwnProperty;function _y(e){if(!sn(e))return oA(e);var t=[];for(var r in Object(e))cA.call(e,r)&&r!="constructor"&&t.push(r);return t}var Oo=vr(ve,"DataView"),Io=vr(ve,"Promise"),Ca=vr(ve,"Set"),Do=vr(ve,"WeakMap"),Gh="[object Map]",hA="[object Object]",Yh="[object Promise]",Xh="[object Set]",Vh="[object WeakMap]",Zh="[object DataView]",uA=Cr(Oo),dA=Cr(Zi),fA=Cr(Io),pA=Cr(Ca),gA=Cr(Do);exports.getTag=wr;(Oo&&exports.getTag(new Oo(new ArrayBuffer(1)))!=Zh||Zi&&exports.getTag(new Zi)!=Gh||Io&&exports.getTag(Io.resolve())!=Yh||Ca&&exports.getTag(new Ca)!=Xh||Do&&exports.getTag(new Do)!=Vh)&&(exports.getTag=function(e){var t=wr(e),r=t==hA?e.constructor:void 0,i=r?Cr(r):"";if(i)switch(i){case uA:return Zh;case dA:return Gh;case fA:return Yh;case pA:return Xh;case gA:return Vh}return t});var mA="[object Map]",yA="[object Set]",bA=Object.prototype,xA=bA.hasOwnProperty;function No(e){if(e==null)return!0;if(on(e)&&(Qi(e)||typeof e=="string"||typeof e.splice=="function"||Ua(e)||Ga(e)||Ki(e)))return!e.length;var t=exports.getTag(e);if(t==mA||t==yA)return!e.size;if(sn(e))return!_y(e).length;for(var r in e)if(xA.call(e,r))return!1;return!0}var wy="c4",_A=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),wA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-Bp_YQG1M.cjs"));return{id:wy,diagram:e}},"loader"),CA={id:wy,detector:_A,loader:wA},vA=CA,Cy="flowchart",kA=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),SA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CbBS7kpH.cjs"));return{id:Cy,diagram:e}},"loader"),TA={id:Cy,detector:kA,loader:SA},AA=TA,vy="flowchart-v2",EA=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"),LA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CbBS7kpH.cjs"));return{id:vy,diagram:e}},"loader"),BA={id:vy,detector:EA,loader:LA},MA=BA,ky="er",$A=p(e=>/^\s*erDiagram/.test(e),"detector"),FA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-BOk9K4o8.cjs"));return{id:ky,diagram:e}},"loader"),RA={id:ky,detector:$A,loader:FA},OA=RA,Sy="gitGraph",IA=p(e=>/^\s*gitGraph/.test(e),"detector"),DA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-XHIAsakR.cjs"));return{id:Sy,diagram:e}},"loader"),NA={id:Sy,detector:IA,loader:DA},PA=NA,Ty="gantt",zA=p(e=>/^\s*gantt/.test(e),"detector"),qA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-grl-NYJD.cjs"));return{id:Ty,diagram:e}},"loader"),WA={id:Ty,detector:zA,loader:qA},HA=WA,Ay="info",jA=p(e=>/^\s*info/.test(e),"detector"),UA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-DgwWwR_a.cjs"));return{id:Ay,diagram:e}},"loader"),GA={id:Ay,detector:jA,loader:UA},Ey="pie",YA=p(e=>/^\s*pie/.test(e),"detector"),XA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-DqeDsWS0.cjs"));return{id:Ey,diagram:e}},"loader"),VA={id:Ey,detector:YA,loader:XA},Ly="quadrantChart",ZA=p(e=>/^\s*quadrantChart/.test(e),"detector"),KA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-Bminc_qJ.cjs"));return{id:Ly,diagram:e}},"loader"),QA={id:Ly,detector:ZA,loader:KA},JA=QA,By="xychart",tE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),eE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-DkdcvnXd.cjs"));return{id:By,diagram:e}},"loader"),rE={id:By,detector:tE,loader:eE},iE=rE,My="requirement",nE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),aE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-Ct1bmEYE.cjs"));return{id:My,diagram:e}},"loader"),sE={id:My,detector:nE,loader:aE},oE=sE,$y="sequence",lE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),cE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-DtCHtJNZ.cjs"));return{id:$y,diagram:e}},"loader"),hE={id:$y,detector:lE,loader:cE},uE=hE,Fy="class",dE=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),fE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-DynvEPIH.cjs"));return{id:Fy,diagram:e}},"loader"),pE={id:Fy,detector:dE,loader:fE},gE=pE,Ry="classDiagram",mE=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),yE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-DynvEPIH.cjs"));return{id:Ry,diagram:e}},"loader"),bE={id:Ry,detector:mE,loader:yE},xE=bE,Oy="state",_E=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),wE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-B1VqtZxH.cjs"));return{id:Oy,diagram:e}},"loader"),CE={id:Oy,detector:_E,loader:wE},vE=CE,Iy="stateDiagram",kE=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),SE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-CH9hsq70.cjs"));return{id:Iy,diagram:e}},"loader"),TE={id:Iy,detector:kE,loader:SE},AE=TE,Dy="journey",EE=p(e=>/^\s*journey/.test(e),"detector"),LE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-Cd1ptemy.cjs"));return{id:Dy,diagram:e}},"loader"),BE={id:Dy,detector:EE,loader:LE},ME=BE,$E=p((e,t,r)=>{I.debug(`rendering svg for syntax error
295
- `);const i=Fd(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Uo(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"),Ny={draw:$E},FE=Ny,RE={db:{},renderer:Ny,parser:{parse:p(()=>{},"parse")}},OE=RE,Py="flowchart-elk",IE=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),DE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-CbBS7kpH.cjs"));return{id:Py,diagram:e}},"loader"),NE={id:Py,detector:IE,loader:DE},PE=NE,zy="timeline",zE=p(e=>/^\s*timeline/.test(e),"detector"),qE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-Da0A3jAO.cjs"));return{id:zy,diagram:e}},"loader"),WE={id:zy,detector:zE,loader:qE},HE=WE,qy="mindmap",jE=p(e=>/^\s*mindmap/.test(e),"detector"),UE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-BWwajGM9.cjs"));return{id:qy,diagram:e}},"loader"),GE={id:qy,detector:jE,loader:UE},YE=GE,Wy="kanban",XE=p(e=>/^\s*kanban/.test(e),"detector"),VE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-BsVJ9Zr_.cjs"));return{id:Wy,diagram:e}},"loader"),ZE={id:Wy,detector:XE,loader:VE},KE=ZE,Hy="sankey",QE=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),JE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-TSSR-gzu.cjs"));return{id:Hy,diagram:e}},"loader"),tL={id:Hy,detector:QE,loader:JE},eL=tL,jy="packet",rL=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-D5cCXDLc.cjs"));return{id:jy,diagram:e}},"loader"),nL={id:jy,detector:rL,loader:iL},Uy="radar",aL=p(e=>/^\s*radar-beta/.test(e),"detector"),sL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-CyVwjmz8.cjs"));return{id:Uy,diagram:e}},"loader"),oL={id:Uy,detector:aL,loader:sL},Gy="block",lL=p(e=>/^\s*block(-beta)?/.test(e),"detector"),cL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-D4nmxP-J.cjs"));return{id:Gy,diagram:e}},"loader"),hL={id:Gy,detector:lL,loader:cL},uL=hL,Yy="architecture",dL=p(e=>/^\s*architecture/.test(e),"detector"),fL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-BSJVVbTt.cjs"));return{id:Yy,diagram:e}},"loader"),pL={id:Yy,detector:dL,loader:fL},gL=pL,Xy="treemap",mL=p(e=>/^\s*treemap/.test(e),"detector"),yL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-Deqqk-7H.cjs"));return{id:Xy,diagram:e}},"loader"),bL={id:Xy,detector:mL,loader:yL},Kh=!1,is=p(()=>{Kh||(Kh=!0,Xn("error",OE,e=>e.toLowerCase().trim()==="error"),Xn("---",{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("---")),Ns(PE,YE,gL),Ns(vA,KE,xE,gE,OA,HA,GA,VA,oE,uE,MA,AA,HE,PA,AE,vE,ME,JA,eL,nL,iE,uL,oL,bL))},"addDiagrams"),xL=p(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(dr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Hs(r)}catch{try{const{diagram:a,id:o}=await n();Xn(o,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete dr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),_L="graphics-document document";function Vy(e,t){e.attr("role",_L),t!==""&&e.attr("aria-roledescription",t)}p(Vy,"setA11yDiagramInfo");function Zy(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(Zy,"addSVGa11yTitleDescription");var ur,Po=(ur=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=$t(),n=Ho(t,i);t=_k(t)+`
296
- `;try{Hs(n)}catch{const c=bb(n);if(!c)throw new fu(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Xn(h,u)}const{db:a,parser:o,renderer:s,init:l}=Hs(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new ur(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(ur,"Diagram"),ur),Qh=[],wL=p(()=>{Qh.forEach(e=>{e()}),Qh=[]},"attachFunctions"),CL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ky(e){const t=e.match(du);if(!t)return{text:e,metadata:{}};let r=yp(t[1],{schema:mp})??{};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(Ky,"extractFrontMatter");var vL=p(e=>e.replace(/\r\n?/g,`
297
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),kL=p(e=>{const{text:t,metadata:r}=Ky(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"),SL=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:hk(e),directive:t}},"processDirectives");function Yl(e){const t=vL(e),r=kL(t),i=SL(r.text),n=Ya(r.config,i.directive);return e=CL(i.text),{code:e,title:r.title,config:n}}p(Yl,"preprocessDiagram");function Qy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Qy,"toBase64");var TL=5e4,AL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",EL="sandbox",LL="loose",BL="http://www.w3.org/2000/svg",ML="http://www.w3.org/1999/xlink",$L="http://www.w3.org/1999/xhtml",FL="100%",RL="100%",OL="border:0;margin:0;",IL="margin:0",DL="allow-top-navigation-by-user-activation allow-popups",NL='The "iframe" tag is not supported by your browser.',PL=["foreignobject"],zL=["dominant-baseline"];function Xl(e){const t=Yl(e);return Gn(),Fb(t.config??{}),t}p(Xl,"processAndSetConfigs");async function Jy(e,t){is();try{const{code:r,config:i}=Xl(e);return{diagramType:(await e0(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Jy,"parse");var Jh=p((e,t,r=[])=>`
298
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),qL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
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},d0=TT,WT={common:wr,getConfig:$t,insertCluster:qg,insertEdge:c0,insertEdgeLabel:s0,insertMarkers:d0,insertNode:jl,interpolateToCurve:_l,labelHelper:at,log:P,positionEdgeLabel:o0},tn={},f0=p(e=>{for(const t of e)tn[t.name]=t},"registerLayoutLoaders"),jT=p(()=>{f0([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-C6YnNTzz.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-oCWhY7Ll.cjs")),"loader")}])},"registerDefaultLayoutLoaders");jT();var UT=p(async(e,t)=>{if(!(e.layoutAlgorithm in tn))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=tn[e.layoutAlgorithm];return(await r.loader()).render(e,t,WT,{algorithm:r.algorithm})},"render"),GT=p((e="",{fallback:t="dagre"}={})=>{if(e in tn)return e;if(t in tn)return P.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"),p0="comm",g0="rule",m0="decl",YT="@import",VT="@namespace",XT="@keyframes",ZT="@layer",y0=Math.abs,Ul=String.fromCharCode;function b0(e){return e.trim()}function qn(e,t,r){return e.replace(t,r)}function KT(e,t,r){return e.indexOf(t,r)}function Pr(e,t){return e.charCodeAt(t)|0}function ei(e,t,r){return e.slice(t,r)}function be(e){return e.length}function QT(e){return e.length}function Ln(e,t){return t.push(e),e}var es=1,ri=1,x0=0,oe=0,Ct=0,ui="";function Gl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:es,column:ri,length:o,return:"",siblings:s}}function JT(){return Ct}function tA(){return Ct=oe>0?Pr(ui,--oe):0,ri--,Ct===10&&(ri=1,es--),Ct}function ue(){return Ct=oe<x0?Pr(ui,oe++):0,ri++,Ct===10&&(ri=1,es++),Ct}function We(){return Pr(ui,oe)}function Hn(){return oe}function rs(e,t){return ei(ui,e,t)}function en(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 es=ri=1,x0=be(ui=e),oe=0,[]}function rA(e){return ui="",e}function Fs(e){return b0(rs(oe-1,Fo(e===91?e+2:e===40?e+1:e)))}function iA(e){for(;(Ct=We())&&Ct<33;)ue();return en(e)>2||en(Ct)>3?"":" "}function nA(e,t){for(;--t&&ue()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return rs(e,Hn()+(t<6&&We()==32&&ue()==32))}function Fo(e){for(;ue();)switch(Ct){case e:return oe;case 34:case 39:e!==34&&e!==39&&Fo(Ct);break;case 40:e===41&&Fo(e);break;case 92:ue();break}return oe}function aA(e,t){for(;ue()&&e+Ct!==57;)if(e+Ct===84&&We()===47)break;return"/*"+rs(t,oe-1)+"*"+Ul(e===47?e:ue())}function sA(e){for(;!en(We());)ue();return rs(e,oe)}function oA(e){return rA(Wn("",null,null,null,[""],e=eA(e),0,[0],e))}function Wn(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,w="",_=n,v=a,C=i,k=w;b;)switch(g=y,y=ue()){case 40:if(g!=108&&Pr(k,u-1)==58){KT(k+=qn(Fs(y),"&","&\f"),"&\f",y0(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:k+=Fs(y);break;case 9:case 10:case 13:case 32:k+=iA(g);break;case 92:k+=nA(Hn()-1,7);continue;case 47:switch(We()){case 42:case 47:Ln(lA(aA(ue(),Hn()),t,r,l),l),(en(g||1)==5||en(We()||1)==5)&&be(k)&&ei(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=qn(k,/\f/g,"")),f>0&&(be(k)-u||m===0&&g===47)&&Ln(f>32?Uh(k+";",i,r,u-1,l):Uh(qn(k," ","")+";",i,r,u-2,l),l);break;case 59:k+=";";default:if(Ln(C=jh(k,t,r,c,h,n,s,w,_=[],v=[],u,a),a),y===123)if(h===0)Wn(k,t,C,C,_,a,u,s,v);else{switch(d){case 99:if(Pr(k,3)===110)break;case 108:if(Pr(k,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Wn(e,C,C,i&&Ln(jh(e,C,C,0,0,n,s,w,n,_=[],u,v),v),n,v,u,s,i?_:v):Wn(k,C,C,C,[""],v,0,s,v)}}c=h=f=0,m=x=1,w=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+=Ul(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:We()===45&&(k+=Fs(ue())),d=We(),h=u=be(w=k+=sA(Hn())),y++;break;case 45:g===45&&be(k)==2&&(m=0)}}return a}function jh(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,w=ei(e,d+1,d=y0(b=o[m])),_=e;y<g;++y)(_=b0(b>0?f[y]+" "+w:qn(w,/&\f/g,f[y])))&&(l[x++]=_);return Gl(e,t,r,n===0?g0:s,l,c,h,u)}function lA(e,t,r,i){return Gl(e,t,r,p0,Ul(JT()),ei(e,2,-2),0,i)}function Uh(e,t,r,i,n){return Gl(e,t,r,m0,ei(e,0,i),ei(e,i+1,-1),i,n)}function Ro(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 YT:case VT:case m0:return e.return=e.return||e.value;case p0:return"";case XT:return e.return=e.value+"{"+Ro(e.children,i)+"}";case g0:if(!be(e.value=e.props.join(",")))return""}return be(r=Ro(e.children,i))?e.return=e.value+"{"+r+"}":""}var hA=Ep(Object.keys,Object),uA=Object.prototype,dA=uA.hasOwnProperty;function w0(e){if(!sn(e))return hA(e);var t=[];for(var r in Object(e))dA.call(e,r)&&r!="constructor"&&t.push(r);return t}var Oo=Cr(Ce,"DataView"),Io=Cr(Ce,"Promise"),_a=Cr(Ce,"Set"),Do=Cr(Ce,"WeakMap"),Gh="[object Map]",fA="[object Object]",Yh="[object Promise]",Vh="[object Set]",Xh="[object WeakMap]",Zh="[object DataView]",pA=_r(Oo),gA=_r(Zi),mA=_r(Io),yA=_r(_a),bA=_r(Do);exports.getTag=vr;(Oo&&exports.getTag(new Oo(new ArrayBuffer(1)))!=Zh||Zi&&exports.getTag(new Zi)!=Gh||Io&&exports.getTag(Io.resolve())!=Yh||_a&&exports.getTag(new _a)!=Vh||Do&&exports.getTag(new Do)!=Xh)&&(exports.getTag=function(e){var t=vr(e),r=t==fA?e.constructor:void 0,i=r?_r(r):"";if(i)switch(i){case pA:return Zh;case gA:return Gh;case mA:return Yh;case yA:return Vh;case bA:return Xh}return t});var xA="[object Map]",wA="[object Set]",vA=Object.prototype,_A=vA.hasOwnProperty;function No(e){if(e==null)return!0;if(on(e)&&(Qi(e)||typeof e=="string"||typeof e.splice=="function"||Ua(e)||Ga(e)||Ki(e)))return!e.length;var t=exports.getTag(e);if(t==xA||t==wA)return!e.size;if(sn(e))return!w0(e).length;for(var r in e)if(_A.call(e,r))return!1;return!0}var v0="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-CyfIsG2z.cjs"));return{id:v0,diagram:e}},"loader"),SA={id:v0,detector:CA,loader:kA},TA=SA,_0="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-BubEnXnn.cjs"));return{id:_0,diagram:e}},"loader"),LA={id:_0,detector:AA,loader:EA},BA=LA,C0="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-BubEnXnn.cjs"));return{id:C0,diagram:e}},"loader"),FA={id:C0,detector:MA,loader:$A},RA=FA,k0="er",OA=p(e=>/^\s*erDiagram/.test(e),"detector"),IA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-DljpeQJy.cjs"));return{id:k0,diagram:e}},"loader"),DA={id:k0,detector:OA,loader:IA},NA=DA,S0="gitGraph",PA=p(e=>/^\s*gitGraph/.test(e),"detector"),zA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-2Q9c3IQF.cjs"));return{id:S0,diagram:e}},"loader"),qA={id:S0,detector:PA,loader:zA},HA=qA,T0="gantt",WA=p(e=>/^\s*gantt/.test(e),"detector"),jA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-KM7sw86k.cjs"));return{id:T0,diagram:e}},"loader"),UA={id:T0,detector:WA,loader:jA},GA=UA,A0="info",YA=p(e=>/^\s*info/.test(e),"detector"),VA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-F6ZHWCRC-BT1d1nZL.cjs"));return{id:A0,diagram:e}},"loader"),XA={id:A0,detector:YA,loader:VA},E0="pie",ZA=p(e=>/^\s*pie/.test(e),"detector"),KA=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-CDwSV8K9.cjs"));return{id:E0,diagram:e}},"loader"),QA={id:E0,detector:ZA,loader:KA},L0="quadrantChart",JA=p(e=>/^\s*quadrantChart/.test(e),"detector"),tE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-oxSuUMDn.cjs"));return{id:L0,diagram:e}},"loader"),eE={id:L0,detector:JA,loader:tE},rE=eE,B0="xychart",iE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),nE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-C3tAeydN.cjs"));return{id:B0,diagram:e}},"loader"),aE={id:B0,detector:iE,loader:nE},sE=aE,M0="requirement",oE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),lE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-BDkuEktn.cjs"));return{id:M0,diagram:e}},"loader"),cE={id:M0,detector:oE,loader:lE},hE=cE,$0="sequence",uE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),dE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-Dq9F44sf.cjs"));return{id:$0,diagram:e}},"loader"),fE={id:$0,detector:uE,loader:dE},pE=fE,F0="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-cuoCp-v5.cjs"));return{id:F0,diagram:e}},"loader"),yE={id:F0,detector:gE,loader:mE},bE=yE,R0="classDiagram",xE=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-cuoCp-v5.cjs"));return{id:R0,diagram:e}},"loader"),vE={id:R0,detector:xE,loader:wE},_E=vE,O0="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-BJy9g6Xs.cjs"));return{id:O0,diagram:e}},"loader"),SE={id:O0,detector:CE,loader:kE},TE=SE,I0="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-C8yasgQD.cjs"));return{id:I0,diagram:e}},"loader"),LE={id:I0,detector:AE,loader:EE},BE=LE,D0="journey",ME=p(e=>/^\s*journey/.test(e),"detector"),$E=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-TW53KiCV.cjs"));return{id:D0,diagram:e}},"loader"),FE={id:D0,detector:ME,loader:$E},RE=FE,OE=p((e,t,r)=>{P.debug(`rendering svg for syntax error
295
+ `);const i=Fd(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Uo(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"),N0={draw:OE},IE=N0,DE={db:{},renderer:N0,parser:{parse:p(()=>{},"parse")}},NE=DE,P0="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-BubEnXnn.cjs"));return{id:P0,diagram:e}},"loader"),qE={id:P0,detector:PE,loader:zE},HE=qE,z0="timeline",WE=p(e=>/^\s*timeline/.test(e),"detector"),jE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-Bdrd_qt2.cjs"));return{id:z0,diagram:e}},"loader"),UE={id:z0,detector:WE,loader:jE},GE=UE,q0="mindmap",YE=p(e=>/^\s*mindmap/.test(e),"detector"),VE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-uC_u8r_K.cjs"));return{id:q0,diagram:e}},"loader"),XE={id:q0,detector:YE,loader:VE},ZE=XE,H0="kanban",KE=p(e=>/^\s*kanban/.test(e),"detector"),QE=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-kIHRY6TW.cjs"));return{id:H0,diagram:e}},"loader"),JE={id:H0,detector:KE,loader:QE},tL=JE,W0="sankey",eL=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-CB7iwmhw.cjs"));return{id:W0,diagram:e}},"loader"),iL={id:W0,detector:eL,loader:rL},nL=iL,j0="packet",aL=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-BNeUIro1.cjs"));return{id:j0,diagram:e}},"loader"),oL={id:j0,detector:aL,loader:sL},U0="radar",lL=p(e=>/^\s*radar-beta/.test(e),"detector"),cL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-Dozy-9vi.cjs"));return{id:U0,diagram:e}},"loader"),hL={id:U0,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-BN4KQiQ7.cjs"));return{id:G0,diagram:e}},"loader"),fL={id:G0,detector:uL,loader:dL},pL=fL,Y0="architecture",gL=p(e=>/^\s*architecture/.test(e),"detector"),mL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-DcQUiatt.cjs"));return{id:Y0,diagram:e}},"loader"),yL={id:Y0,detector:gL,loader:mL},bL=yL,V0="treemap",xL=p(e=>/^\s*treemap/.test(e),"detector"),wL=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-D9lriSYY.cjs"));return{id:V0,diagram:e}},"loader"),vL={id:V0,detector:xL,loader:wL},Kh=!1,is=p(()=>{Kh||(Kh=!0,Vn("error",NE,e=>e.toLowerCase().trim()==="error"),Vn("---",{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("---")),Ns(HE,ZE,bL),Ns(TA,tL,_E,bE,NA,GA,XA,QA,hE,pE,RA,BA,GE,HA,BE,TE,RE,rE,nL,oL,sE,pL,hL,vL))},"addDiagrams"),_L=p(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(dr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Ws(r)}catch{try{const{diagram:a,id:o}=await n();Vn(o,a,i)}catch(a){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete dr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CL="graphics-document document";function X0(e,t){e.attr("role",CL),t!==""&&e.attr("aria-roledescription",t)}p(X0,"setA11yDiagramInfo");function Z0(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(Z0,"addSVGa11yTitleDescription");var ur,Po=(ur=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=$t(),n=Wo(t,i);t=Ck(t)+`
296
+ `;try{Ws(n)}catch{const c=vb(n);if(!c)throw new fu(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Vn(h,u)}const{db:a,parser:o,renderer:s,init:l}=Ws(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new ur(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(ur,"Diagram"),ur),Qh=[],kL=p(()=>{Qh.forEach(e=>{e()}),Qh=[]},"attachFunctions"),SL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function K0(e){const t=e.match(du);if(!t)return{text:e,metadata:{}};let r=yp(t[1],{schema:mp})??{};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(K0,"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}=K0(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 Yl(e){const t=TL(e),r=AL(t),i=EL(r.text),n=Ya(r.config,i.directive);return e=SL(i.text),{code:e,title:r.title,config:n}}p(Yl,"preprocessDiagram");function Q0(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Q0,"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 Vl(e){const t=Yl(e);return Gn(),Ib(t.config??{}),t}p(Vl,"processAndSetConfigs");async function J0(e,t){is();try{const{code:r,config:i}=Vl(e);return{diagramType:(await ey(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(J0,"parse");var Jh=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+=`
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=>{No(s.styles)||o.forEach(l=>{r+=Jh(s.id,l,s.styles)}),No(s.textStyles)||(r+=Jh(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),WL=p((e,t,r,i)=>{const n=qL(e,r),a=Jb(t,n,e.themeVariables);return Ro(nA(`${i}{${a}}`),sA)},"createUserStyles"),HL=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=Ze(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),jL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":RL,i=Qy(`<body style="${IL}">${e}</body>`);return`<iframe style="width:${FL};height:${r};${OL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${DL}">
302
- ${NL}
303
- </iframe>`},"putIntoIFrame"),tu=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",BL);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function zo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(zo,"sandboxedIframe");var UL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),GL=p(async function(e,t,r){is();const i=Xl(t);t=i.code;const n=$t();I.debug(n),t.length>(n?.maxTextSize??TL)&&(t=AL);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const D=ut(d?s:c).node();D&&"remove"in D&&D.remove()},"removeTempElements");let u=ut("body");const d=n.securityLevel===EL,f=n.securityLevel===LL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const N=zo(ut(r),o);u=ut(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut(r);tu(u,e,l,`font-family: ${g}`,ML)}else{if(UL(document,e,l,o),d){const N=zo(ut("body"),o);u=ut(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut("body");tu(u,e,l)}let m,b;try{m=await Po.fromText(t,{title:i.title})}catch(N){if(n.suppressErrorRendering)throw h(),N;m=await Po.fromText("error"),b=N}const x=u.select(c).node(),y=m.type,_=x.firstChild,C=_.firstChild,w=m.renderer.getClasses?.(t,m),v=WL(n,y,w,a),k=document.createElement("style");k.innerHTML=v,_.insertBefore(k,C);try{await m.renderer.draw(t,e,Os.version,m)}catch(N){throw n.suppressErrorRendering?h():FE.draw(t,e,Os.version),N}const $=u.select(`${c} svg`),E=m.db.getAccTitle?.(),R=m.db.getAccDescription?.();r0(y,$,E,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",$L);let M=u.select(c).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),M=HL(M,d,St(n.arrowMarkerAbsolute)),d){const N=u.select(c+" svg").node();M=jL(M,N)}else f||(M=Xr.sanitize(M,{ADD_TAGS:PL,ADD_ATTR:zL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(wL(),b)throw b;return h(),{diagramType:y,svg:M,bindFunctions:m.db.bindFunctions}},"render");function t0(e={}){const t=kt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Mb(t),t?.theme&&t.theme in Oe?t.themeVariables=Oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Bb(t):bu();Wo(r.logLevel),is()}p(t0,"initialize");var e0=p((e,t={})=>{const{code:r}=Yl(e);return Po.fromText(r,t)},"getDiagramFromText");function r0(e,t,r,i){Vy(t,e),Zy(t,r,i,t.attr("id"))}p(r0,"addA11yInfo");var xr=Object.freeze({render:GL,parse:Jy,getDiagramFromText:e0,initialize:t0,getConfig:$t,setConfig:xu,getSiteConfig:bu,updateSiteConfig:$b,reset:p(()=>{Gn()},"reset"),globalReset:p(()=>{Gn(Vr)},"globalReset"),defaultConfig:Vr});Wo($t().logLevel);Gn($t());var YL=p((e,t,r)=>{I.warn(e),El(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"),i0=p(async function(e={querySelector:".mermaid"}){try{await XL(e)}catch(t){if(El(t)&&I.error(t.str),Ne.parseError&&Ne.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),XL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=xr.getConfig();I.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");I.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(I.debug("Start On Load: "+i?.startOnLoad),xr.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(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=mg(ae.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ae.detectInit(o);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await o0(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){YL(u,s,Ne.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),n0=p(function(e){xr.initialize(e)},"initialize"),VL=p(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&n0(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await i0(i)},"init"),ZL=p(async(e,{lazyLoad:t=!0}={})=>{is(),Ns(...e),t===!1&&await xL()},"registerExternalDiagrams"),a0=p(function(){if(Ne.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&Ne.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",a0,!1);var KL=p(function(e){Ne.parseError=e},"setParseErrorHandler"),va=[],Rs=!1,s0=p(async()=>{if(!Rs){for(Rs=!0;va.length>0;){const e=va.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Rs=!1}},"executeQueue"),QL=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{xr.parse(e,t).then(s=>{a(s),r(s)},s=>{I.error("Error parsing",s),Ne.parseError?.(s),o(s),i(s)})}),"performCall");va.push(n),s0().catch(i)}),"parse"),o0=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{xr.render(e,t,r).then(l=>{o(l),i(l)},l=>{I.error("Error parsing",l),Ne.parseError?.(l),s(l),n(l)})}),"performCall");va.push(a),s0().catch(n)}),"render"),JL=p(()=>Object.keys(dr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ne={startOnLoad:!0,mermaidAPI:xr,parse:QL,render:o0,init:VL,run:i0,registerExternalDiagrams:ZL,registerLayoutLoaders:fy,initialize:n0,parseError:void 0,contentLoaded:a0,setParseErrorHandler:KL,detectType:Ho,registerIconPacks:xg,getRegisteredDiagramsMetadata:JL},eu=Ne;/*! 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=>{No(s.styles)||o.forEach(l=>{r+=Jh(s.id,l,s.styles)}),No(s.textStyles)||(r+=Jh(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 Ro(oA(`${i}{${a}}`),cA)},"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=Ze(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),YL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":DL,i=Q0(`<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"),tu=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 zo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(zo,"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){is();const i=Vl(t);t=i.code;const n=$t();P.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 D=ut(d?s:c).node();D&&"remove"in D&&D.remove()},"removeTempElements");let u=ut("body");const d=n.securityLevel===ML,f=n.securityLevel===$L,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const I=zo(ut(r),o);u=ut(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut(r);tu(u,e,l,`font-family: ${g}`,RL)}else{if(VL(document,e,l,o),d){const I=zo(ut("body"),o);u=ut(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ut("body");tu(u,e,l)}let m,b;try{m=await Po.fromText(t,{title:i.title})}catch(I){if(n.suppressErrorRendering)throw h(),I;m=await Po.fromText("error"),b=I}const x=u.select(c).node(),y=m.type,w=x.firstChild,_=w.firstChild,v=m.renderer.getClasses?.(t,m),C=UL(n,y,v,a),k=document.createElement("style");k.innerHTML=C,w.insertBefore(k,_);try{await m.renderer.draw(t,e,Os.version,m)}catch(I){throw n.suppressErrorRendering?h():IE.draw(t,e,Os.version),I}const B=u.select(`${c} svg`),L=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();ry(y,B,L,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OL);let $=u.select(c).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),$=GL($,d,St(n.arrowMarkerAbsolute)),d){const I=u.select(c+" svg").node();$=YL($,I)}else f||($=Vr.sanitize($,{ADD_TAGS:HL,ADD_ATTR:WL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kL(),b)throw b;return h(),{diagramType:y,svg:$,bindFunctions:m.db.bindFunctions}},"render");function ty(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 Oe?t.themeVariables=Oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Fb(t):bu();Ho(r.logLevel),is()}p(ty,"initialize");var ey=p((e,t={})=>{const{code:r}=Yl(e);return Po.fromText(r,t)},"getDiagramFromText");function ry(e,t,r,i){X0(t,e),Z0(t,r,i,t.attr("id"))}p(ry,"addA11yInfo");var xr=Object.freeze({render:XL,parse:J0,getDiagramFromText:ey,initialize:ty,getConfig:$t,setConfig:xu,getSiteConfig:bu,updateSiteConfig:Ob,reset:p(()=>{Gn()},"reset"),globalReset:p(()=>{Gn(Xr)},"globalReset"),defaultConfig:Xr});Ho($t().logLevel);Gn($t());var ZL=p((e,t,r)=>{P.warn(e),El(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"),iy=p(async function(e={querySelector:".mermaid"}){try{await KL(e)}catch(t){if(El(t)&&P.error(t.str),Ne.parseError&&Ne.parseError(t),!e.suppressErrors)throw P.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=xr.getConfig();P.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");P.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(P.debug("Start On Load: "+i?.startOnLoad),xr.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(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=mg(ae.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ae.detectInit(o);h&&P.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await oy(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){ZL(u,s,Ne.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ny=p(function(e){xr.initialize(e)},"initialize"),QL=p(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&ny(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await iy(i)},"init"),JL=p(async(e,{lazyLoad:t=!0}={})=>{is(),Ns(...e),t===!1&&await _L()},"registerExternalDiagrams"),ay=p(function(){if(Ne.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&Ne.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ay,!1);var tB=p(function(e){Ne.parseError=e},"setParseErrorHandler"),Ca=[],Rs=!1,sy=p(async()=>{if(!Rs){for(Rs=!0;Ca.length>0;){const e=Ca.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}Rs=!1}},"executeQueue"),eB=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{xr.parse(e,t).then(s=>{a(s),r(s)},s=>{P.error("Error parsing",s),Ne.parseError?.(s),o(s),i(s)})}),"performCall");Ca.push(n),sy().catch(i)}),"parse"),oy=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{xr.render(e,t,r).then(l=>{o(l),i(l)},l=>{P.error("Error parsing",l),Ne.parseError?.(l),s(l),n(l)})}),"performCall");Ca.push(a),sy().catch(n)}),"render"),rB=p(()=>Object.keys(dr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ne={startOnLoad:!0,mermaidAPI:xr,parse:eB,render:oy,init:QL,run:iy,registerExternalDiagrams:JL,registerLayoutLoaders:f0,initialize:ny,parseError:void 0,contentLoaded:ay,setParseErrorHandler:tB,detectType:Wo,registerIconPacks:xg,getRegisteredDiagramsMetadata:rB},eu=Ne;/*! Check if previously processed *//*!
304
304
  * Wait for document loaded before starting the execution
305
- */const tB={class:"mermaid-diagram-wrapper"},eB={key:0,class:"mermaid-error"},rB=U.defineComponent({__name:"MermaidDiagram",props:{code:{},isStreaming:{type:Boolean}},setup(e){const t=e,r=U.ref(null),i=U.ref(null),n=U.ref("default"),a=()=>{const h=document.documentElement.classList.contains("theme-dark")||document.body.classList.contains("theme-dark"),u=document.documentElement.classList.contains("theme-light")||document.body.classList.contains("theme-light");return h?"dark":u?"default":window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"},o=h=>{eu.initialize({suppressErrorRendering:!0,startOnLoad:!1,theme:h,securityLevel:"loose",themeVariables:h==="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"}:{}})},s=async()=>{if(!(!r.value||!t.code)){i.value=null,r.value.innerHTML="";try{const h=a();h!==n.value&&(n.value=h,o(h));const u=`mermaid-${Math.random().toString(36).substr(2,9)}`,{svg:d}=await eu.render(u,t.code);r.value.innerHTML=d}catch(h){t.isStreaming||(i.value=h?.message||String(h),console.error("Mermaid render error:",h)),console.log("Mermaid render skipped in streaming mode.")}}};let l=null;const c=()=>{s()};return U.onMounted(()=>{n.value=a(),o(n.value),s(),window.matchMedia&&(l=window.matchMedia("(prefers-color-scheme: dark)"),l.addEventListener("change",c));const h=new MutationObserver(()=>{s()});h.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),h.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r.value.__observer=h}),U.onUnmounted(()=>{l&&l.removeEventListener("change",c),r.value&&r.value.__observer&&r.value.__observer.disconnect()}),U.watch(()=>t.code,()=>{s()}),(h,u)=>(U.openBlock(),U.createElementBlock("div",tB,[U.createElementVNode("div",{ref_key:"diagramRef",ref:r,class:"mermaid-diagram"},null,512),i.value&&!e.isStreaming?(U.openBlock(),U.createElementBlock("div",eB,[u[0]||(u[0]=U.createElementVNode("strong",null,"Mermaid 渲染错误:",-1)),U.createElementVNode("pre",null,U.toDisplayString(i.value),1)])):U.createCommentVNode("",!0)]))}}),iB=ka(rB,[["__scopeId","data-v-617eea44"]]);function nB(e){if(e.type!=="tag"||e.name!=="code")return null;const r=(e.attribs?.class||"").match(/language-(\w+)/);return r?r[1]:null}function l0(e){return!e.children||e.children.length===0?"":e.children.map(t=>t.type==="text"?t.data:t.children?l0(t):"").join("")}function aB(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 nB(n)==="mermaid"}return!1},render:(i,n,a,o)=>{const s=i.children?.find(h=>h.type==="tag"&&h.name==="code");if(!s)return U.h("div",{class:"mermaid-error"},"No code content found");const c={code:l0(s),isStreaming:o?.isStreaming||!1};return r&&(c.theme=r),U.h(iB,c)}}}const sB=U.defineComponent({__name:"BlinkingCursor",props:{shape:{default:"square"},color:{default:"#333"}},setup(e){const t=e,r=U.computed(()=>({backgroundColor:t.color}));return(i,n)=>(U.openBlock(),U.createElementBlock("span",{class:U.normalizeClass(["blinking-cursor",`cursor-${e.shape}`]),style:U.normalizeStyle(r.value)},null,6))}}),oB=ka(sB,[["__scopeId","data-v-0d4d5123"]]);function lB(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 U.h(oB,l)}}}exports.Color=de;exports.Color$1=ai;exports.JSON_SCHEMA=mp;exports.MapCache=ze;exports.Rgb=jt;exports.Set=Ca;exports.Stack=kr;exports.Symbol=Xi;exports.Uint8Array=xo;exports.Utils=ot;exports.ZERO_WIDTH_SPACE=Yp;exports.__export=nu;exports.__name=p;exports._export_sfc=ka;exports.abs=w_;exports.acos=L_;exports.array=cd;exports.arrayLikeKeys=Np;exports.asin=B_;exports.assignValue=Ip;exports.assignWithDepth_default=kt;exports.atan2=C_;exports.baseAssignValue=ja;exports.baseFor=Cp;exports.baseGetTag=wr;exports.baseKeys=_y;exports.baseRest=Hp;exports.baseUnary=Rp;exports.calculateMathMLDimensions=Yb;exports.calculateTextHeight=Tl;exports.calculateTextWidth=we;exports.cleanAndMerge=Ya;exports.clear=Au;exports.clear$1=bT;exports.clear$2=VS;exports.clear2=pT;exports.cloneArrayBuffer=Sp;exports.cloneBuffer=kp;exports.cloneTypedArray=Tp;exports.codeBlockPlugin=N0;exports.color=Kr;exports.commonDb_exports=Go;exports.common_default=_r;exports.computeDimensionOfText=Lg;exports.configureSvgSize=Uo;exports.constant=ir;exports.constant$1=qp;exports.constant$2=$a;exports.copyArray=Ap;exports.copyObject=Dp;exports.cos=v_;exports.createAssigner=Up;exports.createText=qe;exports.cursorPlugin=lB;exports.curveBasis=Ni;exports.darken=et;exports.dayjs2=ru;exports.decodeEntities=Ze;exports.defaultConfig2=rx;exports.defaultConfig_default=jo;exports.define=Ma;exports.distExports=xp;exports.emojiPlugin=P0;exports.epsilon=to;exports.eq=an;exports.evaluate=St;exports.extend=tl;exports.generateId=Jp;exports.getAccDescription=Mu;exports.getAccTitle=Lu;exports.getConfig=$t;exports.getConfig2=dt;exports.getDefaultExportFromCjs=qo;exports.getDiagramTitle=Fu;exports.getEdgeId=wk;exports.getIconSVG=ci;exports.getLineFunctionsWithOffset=bp;exports.getPrototype=yl;exports.getRegisteredLayoutAlgorithm=HT;exports.getStylesFromArray=Sl;exports.getSubGraphTitleMargins=za;exports.getThemeVariables3=gu;exports.getUrl=Su;exports.getUserDefinedConfig=Ib;exports.halfPi=eo;exports.hasKatex=pr;exports.hue=Q1;exports.identity=wl;exports.initCloneObject=Lp;exports.insertCluster=qg;exports.insertEdge=cy;exports.insertEdgeLabel=sy;exports.insertNode=jl;exports.interpolateNumber=$e;exports.interpolateRgb=Gs;exports.interpolateString=Ku;exports.isArguments=Ki;exports.isArray=Qi;exports.isArrayLike=on;exports.isArrayLikeObject=Mp;exports.isBuffer=Ua;exports.isDark=ii;exports.isEmpty=No;exports.isFunction=qa;exports.isIndex=xl;exports.isIterateeCall=jp;exports.isLabelStyle=ml;exports.isLength=bl;exports.isObject=Ve;exports.isObjectLike=li;exports.isPrototype=sn;exports.isTypedArray=Ga;exports.isValidShape=ay;exports.keysIn=_l;exports.lighten=G;exports.line=ud;exports.lineBreakRegex=ni;exports.load=yp;exports.log=I;exports.markers_default=dy;exports.max=k_;exports.memoize=oi;exports.merge=Gp;exports.mermaidPlugin=aB;exports.min=S_;exports.nodeUtil=_o;exports.nogamma=el;exports.overRest=zp;exports.package_default=Os;exports.parseFontSize=ln;exports.parseGenericTypes=zs;exports.pi=Oa;exports.positionEdgeLabel=oy;exports.positionNode=gT;exports.random=eg;exports.registerIconPacks=xg;exports.render=WT;exports.renderKatexSanitized=La;exports.replaceIconSubstring=Pl;exports.rgbConvert=Xu;exports.rgba=Dr;exports.sanitizeText=re;exports.select=ut;exports.selectSvgElement=Fd;exports.setAccDescription=Bu;exports.setAccTitle=Eu;exports.setConfig2=ex;exports.setDiagramTitle=$u;exports.setNodeElem=fT;exports.setToString=Wp;exports.setupGraphViewbox=Tu;exports.setupGraphViewbox2=Ru;exports.sin=T_;exports.sqrt=A_;exports.styles2String=X;exports.tau=E_;exports.unknownIcon=yg;exports.updateNodeBounds=K;exports.utils_default=ae;exports.withPath=ld;exports.wrapLabel=rg;
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=N.defineComponent({__name:"MermaidDiagram",props:{code:{},isStreaming:{type:Boolean}},setup(e){const t=e,r=N.ref(null),i=N.ref(null),n=N.ref(null),a=N.ref("default"),o=N.ref(1),s=N.ref(0),l=N.ref(0),c=N.ref(!1),h=N.ref(0),u=N.ref(0),d=N.ref(0),f=N.ref(0),g=N.ref(!1),m=()=>{const I=document.documentElement.classList.contains("theme-dark")||document.body.classList.contains("theme-dark"),D=document.documentElement.classList.contains("theme-light")||document.body.classList.contains("theme-light");return I?"dark":D?"default":window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"},b=I=>{eu.initialize({suppressErrorRendering:!0,startOnLoad:!1,theme:I,securityLevel:"loose",themeVariables:I==="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"}:{}})},x=I=>{const D=I.deltaY>0?.9:1.1,T=Math.min(Math.max(.1,o.value*D),5);o.value=T},y=I=>{c.value=!0,h.value=I.clientX,u.value=I.clientY,d.value=s.value,f.value=l.value,i.value&&(i.value.style.cursor="grabbing")},w=I=>{if(!c.value)return;const D=I.clientX-h.value,T=I.clientY-u.value;s.value=d.value+D,l.value=f.value+T},_=()=>{c.value=!1,i.value&&(i.value.style.cursor="grab")},v=()=>{c.value&&(c.value=!1,i.value&&(i.value.style.cursor="grab"))},C=()=>{o.value=1,s.value=0,l.value=0},k=()=>{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())},B=()=>{g.value=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},L=async()=>{if(!(!r.value||!t.code)){n.value=null,r.value.innerHTML="";try{const I=m();I!==a.value&&(a.value=I,b(I));const D=`mermaid-${Math.random().toString(36).substr(2,9)}`,{svg:T}=await eu.render(D,t.code);r.value.innerHTML=T}catch(I){t.isStreaming||(n.value=I?.message||String(I),console.error("Mermaid render error:",I)),console.log("Mermaid render skipped in streaming mode.")}}};let O=null;const $=()=>{L()};return N.onMounted(()=>{a.value=m(),b(a.value),L(),window.matchMedia&&(O=window.matchMedia("(prefers-color-scheme: dark)"),O.addEventListener("change",$));const I=new MutationObserver(()=>{L()});I.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),I.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r.value.__observer=I,document.addEventListener("fullscreenchange",B),document.addEventListener("webkitfullscreenchange",B),document.addEventListener("mozfullscreenchange",B),document.addEventListener("msfullscreenchange",B)}),N.onUnmounted(()=>{O&&O.removeEventListener("change",$),r.value&&r.value.__observer&&r.value.__observer.disconnect(),document.removeEventListener("fullscreenchange",B),document.removeEventListener("webkitfullscreenchange",B),document.removeEventListener("mozfullscreenchange",B),document.removeEventListener("msfullscreenchange",B)}),N.watch(()=>t.code,()=>{L()}),(I,D)=>(N.openBlock(),N.createElementBlock("div",iB,[N.createElementVNode("div",nB,[N.createElementVNode("button",{onClick:C,class:"control-btn",title:"重置缩放"},[...D[0]||(D[0]=[N.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor"},[N.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"}),N.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)])]),N.createElementVNode("button",{onClick:k,class:"control-btn",title:"全屏预览"},[g.value?(N.openBlock(),N.createElementBlock("svg",sB,[...D[2]||(D[2]=[N.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)])])):(N.openBlock(),N.createElementBlock("svg",aB,[...D[1]||(D[1]=[N.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)])]))]),N.createElementVNode("span",oB,N.toDisplayString(Math.round(o.value*100))+"%",1)]),N.createElementVNode("div",{ref_key:"containerRef",ref:i,class:N.normalizeClass(["mermaid-diagram",{"is-fullscreen":g.value,"is-dragging":c.value}]),onWheel:N.withModifiers(x,["prevent"]),onMousedown:y,onMousemove:w,onMouseup:_,onMouseleave:v},[N.createElementVNode("div",{ref_key:"diagramRef",ref:r,class:"mermaid-diagram-content",style:N.normalizeStyle({transform:`translate(${s.value}px, ${l.value}px) scale(${o.value})`})},null,4)],34),n.value&&!e.isStreaming?(N.openBlock(),N.createElementBlock("div",lB,[D[3]||(D[3]=N.createElementVNode("strong",null,"Mermaid 渲染错误:",-1)),N.createElementVNode("pre",null,N.toDisplayString(n.value),1)])):N.createCommentVNode("",!0)]))}}),hB=ka(cB,[["__scopeId","data-v-5fd12a0e"]]);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 ly(e){return!e.children||e.children.length===0?"":e.children.map(t=>t.type==="text"?t.data:t.children?ly(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 N.h("div",{class:"mermaid-error"},"No code content found");const c={code:ly(s),isStreaming:o?.isStreaming||!1};return r&&(c.theme=r),N.h(hB,c)}}}const fB=N.defineComponent({__name:"BlinkingCursor",props:{shape:{default:"square"},color:{default:"#333"}},setup(e){const t=e,r=N.computed(()=>({backgroundColor:t.color}));return(i,n)=>(N.openBlock(),N.createElementBlock("span",{class:N.normalizeClass(["blinking-cursor",`cursor-${e.shape}`]),style:N.normalizeStyle(r.value)},null,6))}}),pB=ka(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 N.h(pB,l)}}}exports.Color=de;exports.Color$1=ai;exports.JSON_SCHEMA=mp;exports.MapCache=ze;exports.Rgb=jt;exports.Set=_a;exports.Stack=kr;exports.Symbol=Vi;exports.Uint8Array=xo;exports.Utils=ot;exports.ZERO_WIDTH_SPACE=Yp;exports.__export=nu;exports.__name=p;exports._export_sfc=ka;exports.abs=kw;exports.acos=$w;exports.array=cd;exports.arrayLikeKeys=Np;exports.asin=Fw;exports.assignValue=Ip;exports.assignWithDepth_default=kt;exports.atan2=Sw;exports.baseAssignValue=ja;exports.baseFor=_p;exports.baseGetTag=vr;exports.baseKeys=w0;exports.baseRest=Wp;exports.baseUnary=Rp;exports.calculateMathMLDimensions=Zb;exports.calculateTextHeight=Tl;exports.calculateTextWidth=ve;exports.cleanAndMerge=Ya;exports.clear=Au;exports.clear$1=vT;exports.clear$2=QS;exports.clear2=yT;exports.cloneArrayBuffer=Sp;exports.cloneBuffer=kp;exports.cloneTypedArray=Tp;exports.codeBlockPlugin=qy;exports.color=Kr;exports.commonDb_exports=Go;exports.common_default=wr;exports.computeDimensionOfText=Lg;exports.configureSvgSize=Uo;exports.constant=ir;exports.constant$1=qp;exports.constant$2=$a;exports.copyArray=Ap;exports.copyObject=Dp;exports.cos=Tw;exports.createAssigner=Up;exports.createText=qe;exports.cursorPlugin=gB;exports.curveBasis=Ni;exports.darken=et;exports.dayjs2=ru;exports.decodeEntities=Ze;exports.defaultConfig2=ax;exports.defaultConfig_default=jo;exports.define=Ma;exports.distExports=xp;exports.emojiPlugin=Hy;exports.epsilon=to;exports.eq=an;exports.evaluate=St;exports.extend=tl;exports.generateId=Jp;exports.getAccDescription=Mu;exports.getAccTitle=Lu;exports.getConfig=$t;exports.getConfig2=dt;exports.getDefaultExportFromCjs=qo;exports.getDiagramTitle=Fu;exports.getEdgeId=kk;exports.getIconSVG=ci;exports.getLineFunctionsWithOffset=bp;exports.getPrototype=yl;exports.getRegisteredLayoutAlgorithm=GT;exports.getStylesFromArray=Sl;exports.getSubGraphTitleMargins=za;exports.getThemeVariables3=gu;exports.getUrl=Su;exports.getUserDefinedConfig=Pb;exports.halfPi=eo;exports.hasKatex=pr;exports.hue=e2;exports.identity=vl;exports.initCloneObject=Lp;exports.insertCluster=qg;exports.insertEdge=c0;exports.insertEdgeLabel=s0;exports.insertNode=jl;exports.interpolateNumber=$e;exports.interpolateRgb=Gs;exports.interpolateString=Ku;exports.isArguments=Ki;exports.isArray=Qi;exports.isArrayLike=on;exports.isArrayLikeObject=Mp;exports.isBuffer=Ua;exports.isDark=ii;exports.isEmpty=No;exports.isFunction=qa;exports.isIndex=xl;exports.isIterateeCall=jp;exports.isLabelStyle=ml;exports.isLength=bl;exports.isObject=Xe;exports.isObjectLike=li;exports.isPrototype=sn;exports.isTypedArray=Ga;exports.isValidShape=a0;exports.keysIn=wl;exports.lighten=G;exports.line=ud;exports.lineBreakRegex=ni;exports.load=yp;exports.log=P;exports.markers_default=d0;exports.max=Aw;exports.memoize=oi;exports.merge=Gp;exports.mermaidPlugin=dB;exports.min=Ew;exports.nodeUtil=wo;exports.nogamma=el;exports.overRest=zp;exports.package_default=Os;exports.parseFontSize=ln;exports.parseGenericTypes=zs;exports.pi=Oa;exports.positionEdgeLabel=o0;exports.positionNode=bT;exports.random=eg;exports.registerIconPacks=xg;exports.render=UT;exports.renderKatexSanitized=La;exports.replaceIconSubstring=Pl;exports.rgbConvert=Vu;exports.rgba=Dr;exports.sanitizeText=re;exports.select=ut;exports.selectSvgElement=Fd;exports.setAccDescription=Bu;exports.setAccTitle=Eu;exports.setConfig2=nx;exports.setDiagramTitle=$u;exports.setNodeElem=mT;exports.setToString=Hp;exports.setupGraphViewbox=Tu;exports.setupGraphViewbox2=Ru;exports.sin=Lw;exports.sqrt=Bw;exports.styles2String=V;exports.tau=Mw;exports.unknownIcon=yg;exports.updateNodeBounds=K;exports.utils_default=ae;exports.withPath=ld;exports.wrapLabel=rg;