dimcode-web 0.0.0-stage → 0.1.0-alpha.11
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.
- package/LICENSE +21 -0
- package/package.json +13 -4
- package/release-manifest.json +227 -0
- package/web/assets/CodeBlockNode-BExJacPr.js +43 -0
- package/web/assets/PreCodeBlock-CS3fZBao.js +1 -0
- package/web/assets/Tooltip-B1Jun8pl.js +1 -0
- package/web/assets/andromeeda-C4gqWexZ.js +1 -0
- package/web/assets/angular-html-BpR8Pn47.js +1 -0
- package/web/assets/arc-oZVymZ-6.js +1 -0
- package/web/assets/architectureDiagram-3BPJPVTR-Bdsx3Rrl.js +36 -0
- package/web/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/web/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/web/assets/ayu-light-BA47KaF1.js +1 -0
- package/web/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/web/assets/blockDiagram-GPEHLZMM-BK2IeRUA.js +132 -0
- package/web/assets/c-BIGW1oBm.js +1 -0
- package/web/assets/c4Diagram-AAUBKEIU-DMleCZQv.js +10 -0
- package/web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/web/assets/channel-DGamL3Zm.js +1 -0
- package/web/assets/chunk-2J33WTMH-DqhOMsnJ.js +1 -0
- package/web/assets/chunk-4BX2VUAB-eVCJx28A.js +1 -0
- package/web/assets/chunk-55IACEB6-DEbLCIoP.js +1 -0
- package/web/assets/chunk-727SXJPM-GwPb-eQY.js +206 -0
- package/web/assets/chunk-AQP2D5EJ-BFlYl-9N.js +231 -0
- package/web/assets/chunk-FMBD7UC4-5QtzaUQO.js +15 -0
- package/web/assets/chunk-ND2GUHAM-CySCSlmy.js +1 -0
- package/web/assets/chunk-QZHKN3VN-DNkBno1P.js +1 -0
- package/web/assets/classDiagram-4FO5ZUOK-nWhIUIyS.js +1 -0
- package/web/assets/classDiagram-v2-Q7XG4LA2-nWhIUIyS.js +1 -0
- package/web/assets/cmake-D1j8_8rp.js +1 -0
- package/web/assets/cose-bilkent-S5V4N54A-Cqajiw-2.js +1 -0
- package/web/assets/cpp-B-lmv-kZ.js +1 -0
- package/web/assets/csharp-COcwbKMJ.js +1 -0
- package/web/assets/css-DPfMkruS.js +1 -0
- package/web/assets/csv-fuZLfV_i.js +1 -0
- package/web/assets/cynefin-OW5HDTMX-CGp-_RPy.js +178 -0
- package/web/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/web/assets/dagre-BM42HDAG-BScsLv8J.js +4 -0
- package/web/assets/dark-plus-C3mMm8J8.js +1 -0
- package/web/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/web/assets/diagram-2AECGRRQ-e16PRdi7.js +43 -0
- package/web/assets/diagram-5GNKFQAL-DuWJHiuL.js +10 -0
- package/web/assets/diagram-KO2AKTUF-C1E0cLdw.js +3 -0
- package/web/assets/diagram-LMA3HP47-CyF5HRCw.js +24 -0
- package/web/assets/diagram-OG6HWLK6-aUfbCvvL.js +24 -0
- package/web/assets/diff-D97Zzqfu.js +1 -0
- package/web/assets/docker-BcOcwvcX.js +1 -0
- package/web/assets/dracula-BzJJZx-M.js +1 -0
- package/web/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/web/assets/elixir-CDX3lj18.js +1 -0
- package/web/assets/erDiagram-TEJ5UH35-DnVqKEfD.js +85 -0
- package/web/assets/erlang-DsQrWhSR.js +1 -0
- package/web/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/web/assets/everforest-light-C8M2exoo.js +1 -0
- package/web/assets/extended-p72mFE2C.js +1 -0
- package/web/assets/floating-ui.dom-rMPa4aDr.js +1 -0
- package/web/assets/flowDiagram-I6XJVG4X-00TiWiHH.js +162 -0
- package/web/assets/ganttDiagram-6RSMTGT7-DhmsSHDy.js +292 -0
- package/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/web/assets/gitGraphDiagram-PVQCEYII-DebPzL-q.js +106 -0
- package/web/assets/github-dark-DHJKELXO.js +1 -0
- package/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/web/assets/github-light-DAi9KRSo.js +1 -0
- package/web/assets/github-light-default-D7oLnXFd.js +1 -0
- package/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/web/assets/go-CxLEBnE3.js +1 -0
- package/web/assets/graph-CAnANduQ.js +1 -0
- package/web/assets/graphql-ChdNCCLP.js +1 -0
- package/web/assets/groovy-gcz8RCvz.js +1 -0
- package/web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/web/assets/haskell-Df6bDoY_.js +1 -0
- package/web/assets/hcl-BWvSN4gD.js +1 -0
- package/web/assets/horizon-BUw7H-hv.js +1 -0
- package/web/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/web/assets/houston-DnULxvSX.js +1 -0
- package/web/assets/html-GMplVEZG.js +1 -0
- package/web/assets/index-B0sf41uB.js +329 -0
- package/web/assets/index-D6IZb5kR.css +1 -0
- package/web/assets/index-RWtzc3nz.js +220 -0
- package/web/assets/index-Zlr3P937.js +220 -0
- package/web/assets/index10-DMROqqrK.js +8 -0
- package/web/assets/index5-A4hqyBCh.js +1 -0
- package/web/assets/index6-gqTWHimn.js +1 -0
- package/web/assets/index8-Jm7D2Uuu.js +2 -0
- package/web/assets/index9-DhsBkPMm.js +1 -0
- package/web/assets/infoDiagram-5YYISTIA-BlWEgGgR.js +2 -0
- package/web/assets/ini-BEwlwnbL.js +1 -0
- package/web/assets/init-Gi6I4Gst.js +1 -0
- package/web/assets/ishikawaDiagram-YF4QCWOH-D2U9WN2D.js +70 -0
- package/web/assets/java-CylS5w8V.js +1 -0
- package/web/assets/javascript-wDzz0qaB.js +1 -0
- package/web/assets/journeyDiagram-JHISSGLW-CKb3VgZk.js +139 -0
- package/web/assets/json-Cp-IABpG.js +1 -0
- package/web/assets/json5-C9tS-k6U.js +1 -0
- package/web/assets/jsonc-Des-eS-w.js +1 -0
- package/web/assets/jsx-g9-lgVsj.js +1 -0
- package/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/web/assets/kanban-definition-UN3LZRKU-CtxT87gS.js +89 -0
- package/web/assets/katex-C5jXJg4s.js +257 -0
- package/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/web/assets/laserwave-DUszq2jm.js +1 -0
- package/web/assets/latex-CR2LgHuU.js +1 -0
- package/web/assets/layout-DGIYPm2g.js +1 -0
- package/web/assets/layout-DloY-SLW.js +4 -0
- package/web/assets/light-plus-B7mTdjB0.js +1 -0
- package/web/assets/linear-Ddk7u-wL.js +1 -0
- package/web/assets/lua-BaeVxFsk.js +1 -0
- package/web/assets/make-CHLpvVh8.js +1 -0
- package/web/assets/markdown-Cvjx9yec.js +1 -0
- package/web/assets/markstream-B2Peo11i.js +7 -0
- package/web/assets/material-theme-D5KoaKCx.js +1 -0
- package/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/web/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/web/assets/mermaid.core-CIDPCsfA.js +309 -0
- package/web/assets/mhchem-MNFFEueS.js +1 -0
- package/web/assets/min-dark-CafNBF8u.js +1 -0
- package/web/assets/min-light-CTRr51gU.js +1 -0
- package/web/assets/mindmap-definition-RKZ34NQL-veskSkgC.js +96 -0
- package/web/assets/monokai-D4h5O-jR.js +1 -0
- package/web/assets/nginx-BpAMiNFr.js +1 -0
- package/web/assets/night-owl-C39BiMTA.js +1 -0
- package/web/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/web/assets/nord-Ddv68eIx.js +1 -0
- package/web/assets/objective-c-DXmwc3jG.js +1 -0
- package/web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/web/assets/one-light-C3Wv6jpd.js +1 -0
- package/web/assets/ordinal-Cboi1Yqb.js +1 -0
- package/web/assets/perl-C0TMdlhV.js +1 -0
- package/web/assets/php-Dhbhpdrm.js +1 -0
- package/web/assets/pieDiagram-4H26LBE5-BOU-b_Ew.js +30 -0
- package/web/assets/pierre-dark-CyvmCCZW.js +1 -0
- package/web/assets/pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js +1 -0
- package/web/assets/pierre-dark-soft-BHGpRqa4.js +1 -0
- package/web/assets/pierre-dark-tritanopia-Beq2gCRQ.js +1 -0
- package/web/assets/pierre-dark-vibrant-BWBVywrn.js +1 -0
- package/web/assets/pierre-light-480U9XYS.js +1 -0
- package/web/assets/pierre-light-protanopia-deuteranopia-CaVOBURG.js +1 -0
- package/web/assets/pierre-light-soft-CVdyfjmI.js +1 -0
- package/web/assets/pierre-light-tritanopia-B4_gpKOM.js +1 -0
- package/web/assets/pierre-light-vibrant-DdTDNdfJ.js +1 -0
- package/web/assets/plastic-3e1v2bzS.js +1 -0
- package/web/assets/poimandres-CS3Unz2-.js +1 -0
- package/web/assets/powershell-Dpen1YoG.js +1 -0
- package/web/assets/preCodeDiffMetrics-6xZ6qvnP.js +1 -0
- package/web/assets/proto-C7zT0LnQ.js +1 -0
- package/web/assets/python-B6aJPvgy.js +1 -0
- package/web/assets/quadrantDiagram-W4KKPZXB-BSS1N1TF.js +7 -0
- package/web/assets/r-Dspwwk_N.js +1 -0
- package/web/assets/red-bN70gL4F.js +1 -0
- package/web/assets/regexp-CDVJQ6XC.js +1 -0
- package/web/assets/requirementDiagram-4Y6WPE33-DsN8PjFw.js +84 -0
- package/web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/web/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/web/assets/ruby-BymL1q8G.js +1 -0
- package/web/assets/rust-B1yitclQ.js +1 -0
- package/web/assets/sankeyDiagram-5OEKKPKP-CnW7IbtR.js +40 -0
- package/web/assets/scala-C151Ov-r.js +1 -0
- package/web/assets/scss-OYdSNvt2.js +1 -0
- package/web/assets/sequenceDiagram-3UESZ5HK-DrDAXqp6.js +162 -0
- package/web/assets/shellscript-Yzrsuije.js +1 -0
- package/web/assets/slack-dark-BthQWCQV.js +1 -0
- package/web/assets/slack-ochin-DqwNpetd.js +1 -0
- package/web/assets/snazzy-light-Bw305WKR.js +1 -0
- package/web/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/web/assets/solarized-light-L9t79GZl.js +1 -0
- package/web/assets/sql-BLtJtn59.js +1 -0
- package/web/assets/stateDiagram-AJRCARHV-DlPqWlqf.js +1 -0
- package/web/assets/stateDiagram-v2-BHNVJYJU-bvuvx9tw.js +1 -0
- package/web/assets/svelte-DZMnMd3x.js +1 -0
- package/web/assets/swift-D82vCrfD.js +1 -0
- package/web/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/web/assets/timeline-definition-PNZ67QCA-DpzLLOwj.js +120 -0
- package/web/assets/tokyo-night-hegEt444.js +1 -0
- package/web/assets/toml-vGWfd6FD.js +1 -0
- package/web/assets/tsx-COt5Ahok.js +1 -0
- package/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/assets/unused-optional-NNwleJvF.js +1 -0
- package/web/assets/vendor-vue-C21-5sm4.js +53 -0
- package/web/assets/vennDiagram-CIIHVFJN-BFiOUoie.js +34 -0
- package/web/assets/vesper-DU1UobuO.js +1 -0
- package/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/web/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/web/assets/vue-DVfSmUF7.js +1 -0
- package/web/assets/wardleyDiagram-YWT4CUSO-CF-vWJdt.js +78 -0
- package/web/assets/xml-sdJ4AIDG.js +1 -0
- package/web/assets/xychartDiagram-2RQKCTM6-ko8fvtbV.js +7 -0
- package/web/assets/yaml-Buea-lGh.js +1 -0
- package/web/assets/zh-CN-Ctd5q_Jn.js +1 -0
- package/web/assets/zig-VOosw3JB.js +1 -0
- package/web/dimcode-web.json +5 -0
- package/web/index.html +44 -0
- package/README.md +0 -3
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-BScsLv8J.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/index-Zlr3P937.js","assets/vendor-vue-C21-5sm4.js","assets/index-D6IZb5kR.css","assets/cose-bilkent-S5V4N54A-Cqajiw-2.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-AAUBKEIU-DMleCZQv.js","assets/chunk-ND2GUHAM-CySCSlmy.js","assets/flowDiagram-I6XJVG4X-00TiWiHH.js","assets/chunk-FMBD7UC4-5QtzaUQO.js","assets/chunk-55IACEB6-DEbLCIoP.js","assets/chunk-2J33WTMH-DqhOMsnJ.js","assets/channel-DGamL3Zm.js","assets/erDiagram-TEJ5UH35-DnVqKEfD.js","assets/gitGraphDiagram-PVQCEYII-DebPzL-q.js","assets/chunk-4BX2VUAB-eVCJx28A.js","assets/chunk-QZHKN3VN-DNkBno1P.js","assets/cynefin-OW5HDTMX-CGp-_RPy.js","assets/ganttDiagram-6RSMTGT7-DhmsSHDy.js","assets/linear-Ddk7u-wL.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-BlWEgGgR.js","assets/pieDiagram-4H26LBE5-BOU-b_Ew.js","assets/arc-oZVymZ-6.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-BSS1N1TF.js","assets/xychartDiagram-2RQKCTM6-ko8fvtbV.js","assets/requirementDiagram-4Y6WPE33-DsN8PjFw.js","assets/sequenceDiagram-3UESZ5HK-DrDAXqp6.js","assets/classDiagram-4FO5ZUOK-nWhIUIyS.js","assets/chunk-727SXJPM-GwPb-eQY.js","assets/classDiagram-v2-Q7XG4LA2-nWhIUIyS.js","assets/stateDiagram-AJRCARHV-DlPqWlqf.js","assets/chunk-AQP2D5EJ-BFlYl-9N.js","assets/stateDiagram-v2-BHNVJYJU-bvuvx9tw.js","assets/journeyDiagram-JHISSGLW-CKb3VgZk.js","assets/timeline-definition-PNZ67QCA-DpzLLOwj.js","assets/mindmap-definition-RKZ34NQL-veskSkgC.js","assets/kanban-definition-UN3LZRKU-CtxT87gS.js","assets/sankeyDiagram-5OEKKPKP-CnW7IbtR.js","assets/diagram-LMA3HP47-CyF5HRCw.js","assets/diagram-2AECGRRQ-e16PRdi7.js","assets/blockDiagram-GPEHLZMM-BK2IeRUA.js","assets/diagram-5GNKFQAL-DuWJHiuL.js","assets/architectureDiagram-3BPJPVTR-Bdsx3Rrl.js","assets/diagram-KO2AKTUF-C1E0cLdw.js","assets/ishikawaDiagram-YF4QCWOH-D2U9WN2D.js","assets/vennDiagram-CIIHVFJN-BFiOUoie.js","assets/diagram-OG6HWLK6-aUfbCvvL.js","assets/wardleyDiagram-YWT4CUSO-CF-vWJdt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var s0=Object.defineProperty;var a0=(e,t,r)=>t in e?s0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>a0(e,typeof t!="symbol"?t+"":t,r);import{_ as mt}from"./index-Zlr3P937.js";function o0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qs={exports:{}},n0=Qs.exports,Ah;function l0(){return Ah||(Ah=1,(function(e,t){(function(r,i){e.exports=i()})(n0,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",u="month",f="quarter",d="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var $=["th","st","nd","rd"],A=D%100;return"["+D+($[(A-20)%10]||$[A]||$[0])+"]"}},T=function(D,$,A){var I=String(D);return!I||I.length>=$?D:""+Array($+1-I.length).join(A)+D},S={s:T,z:function(D){var $=-D.utcOffset(),A=Math.abs($),I=Math.floor(A/60),E=A%60;return($<=0?"+":"-")+T(I,2,"0")+":"+T(E,2,"0")},m:function D($,A){if($.date()<A.date())return-D(A,$);var I=12*(A.year()-$.year())+(A.month()-$.month()),E=$.clone().add(I,u),_=A-E<0,q=$.clone().add(I+(_?-1:1),u);return+(-(I+(A-E)/(_?E-q:q-E))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:u,y:d,w:c,d:h,D:m,h:l,m:n,s:o,ms:a,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",v={};v[w]=b;var M="$isDayjsObject",L=function(D){return D instanceof G||!(!D||!D[M])},Y=function D($,A,I){var E;if(!$)return w;if(typeof $=="string"){var _=$.toLowerCase();v[_]&&(E=_),A&&(v[_]=A,E=_);var q=$.split("-");if(!E&&q.length>1)return D(q[0])}else{var lt=$.name;v[lt]=$,E=lt}return!I&&E&&(w=E),E||!I&&w},N=function(D,$){if(L(D))return D.clone();var A=typeof $=="object"?$:{};return A.date=D,A.args=arguments,new G(A)},O=S;O.l=Y,O.i=L,O.w=function(D,$){return N(D,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var G=(function(){function D(A){this.$L=Y(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[M]=!0}var $=D.prototype;return $.parse=function(A){this.$d=(function(I){var E=I.date,_=I.utc;if(E===null)return new Date(NaN);if(O.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var q=E.match(y);if(q){var lt=q[2]-1||0,dt=(q[7]||"0").substring(0,3);return _?new Date(Date.UTC(q[1],lt,q[3]||1,q[4]||0,q[5]||0,q[6]||0,dt)):new Date(q[1],lt,q[3]||1,q[4]||0,q[5]||0,q[6]||0,dt)}}return new Date(E)})(A),this.init()},$.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()},$.$utils=function(){return O},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(A,I){var E=N(A);return this.startOf(I)<=E&&E<=this.endOf(I)},$.isAfter=function(A,I){return N(A)<this.startOf(I)},$.isBefore=function(A,I){return this.endOf(I)<N(A)},$.$g=function(A,I,E){return O.u(A)?this[I]:this.set(E,A)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(A,I){var E=this,_=!!O.u(I)||I,q=O.p(A),lt=function(pe,J){var ct=O.w(E.$u?Date.UTC(E.$y,J,pe):new Date(E.$y,J,pe),E);return _?ct:ct.endOf(h)},dt=function(pe,J){return O.w(E.toDate()[pe].apply(E.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),E)},yt=this.$W,pt=this.$M,xt=this.$D,ht="set"+(this.$u?"UTC":"");switch(q){case d:return _?lt(1,0):lt(31,11);case u:return _?lt(1,pt):lt(0,pt+1);case c:var Wt=this.$locale().weekStart||0,fe=(yt<Wt?yt+7:yt)-Wt;return lt(_?xt-fe:xt+(6-fe),pt);case h:case m:return dt(ht+"Hours",0);case l:return dt(ht+"Minutes",1);case n:return dt(ht+"Seconds",2);case o:return dt(ht+"Milliseconds",3);default:return this.clone()}},$.endOf=function(A){return this.startOf(A,!1)},$.$set=function(A,I){var E,_=O.p(A),q="set"+(this.$u?"UTC":""),lt=(E={},E[h]=q+"Date",E[m]=q+"Date",E[u]=q+"Month",E[d]=q+"FullYear",E[l]=q+"Hours",E[n]=q+"Minutes",E[o]=q+"Seconds",E[a]=q+"Milliseconds",E)[_],dt=_===h?this.$D+(I-this.$W):I;if(_===u||_===d){var yt=this.clone().set(m,1);yt.$d[lt](dt),yt.init(),this.$d=yt.set(m,Math.min(this.$D,yt.daysInMonth())).$d}else lt&&this.$d[lt](dt);return this.init(),this},$.set=function(A,I){return this.clone().$set(A,I)},$.get=function(A){return this[O.p(A)]()},$.add=function(A,I){var E,_=this;A=Number(A);var q=O.p(I),lt=function(pt){var xt=N(_);return O.w(xt.date(xt.date()+Math.round(pt*A)),_)};if(q===u)return this.set(u,this.$M+A);if(q===d)return this.set(d,this.$y+A);if(q===h)return lt(1);if(q===c)return lt(7);var dt=(E={},E[n]=i,E[l]=s,E[o]=r,E)[q]||1,yt=this.$d.getTime()+A*dt;return O.w(yt,this)},$.subtract=function(A,I){return this.add(-1*A,I)},$.format=function(A){var I=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var _=A||"YYYY-MM-DDTHH:mm:ssZ",q=O.z(this),lt=this.$H,dt=this.$m,yt=this.$M,pt=E.weekdays,xt=E.months,ht=E.meridiem,Wt=function(J,ct,_t,Et){return J&&(J[ct]||J(I,_))||_t[ct].slice(0,Et)},fe=function(J){return O.s(lt%12||12,J,"0")},pe=ht||function(J,ct,_t){var Et=J<12?"AM":"PM";return _t?Et.toLowerCase():Et};return _.replace(C,(function(J,ct){return ct||(function(_t){switch(_t){case"YY":return String(I.$y).slice(-2);case"YYYY":return O.s(I.$y,4,"0");case"M":return yt+1;case"MM":return O.s(yt+1,2,"0");case"MMM":return Wt(E.monthsShort,yt,xt,3);case"MMMM":return Wt(xt,yt);case"D":return I.$D;case"DD":return O.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Wt(E.weekdaysMin,I.$W,pt,2);case"ddd":return Wt(E.weekdaysShort,I.$W,pt,3);case"dddd":return pt[I.$W];case"H":return String(lt);case"HH":return O.s(lt,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return pe(lt,dt,!0);case"A":return pe(lt,dt,!1);case"m":return String(dt);case"mm":return O.s(dt,2,"0");case"s":return String(I.$s);case"ss":return O.s(I.$s,2,"0");case"SSS":return O.s(I.$ms,3,"0");case"Z":return q}return null})(J)||q.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(A,I,E){var _,q=this,lt=O.p(I),dt=N(A),yt=(dt.utcOffset()-this.utcOffset())*i,pt=this-dt,xt=function(){return O.m(q,dt)};switch(lt){case d:_=xt()/12;break;case u:_=xt();break;case f:_=xt()/3;break;case c:_=(pt-yt)/6048e5;break;case h:_=(pt-yt)/864e5;break;case l:_=pt/s;break;case n:_=pt/i;break;case o:_=pt/r;break;default:_=pt}return E?_:O.a(_)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return v[this.$L]},$.locale=function(A,I){if(!A)return this.$L;var E=this.clone(),_=Y(A,I,!0);return _&&(E.$L=_),E},$.clone=function(){return O.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},D})(),U=G.prototype;return N.prototype=U,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach((function(D){U[D[1]]=function($){return this.$g($,D[0],D[1])}})),N.extend=function(D,$){return D.$i||(D($,G,N),D.$i=!0),N},N.locale=Y,N.isDayjs=L,N.unix=function(D){return N(1e3*D)},N.en=v[w],N.Ls=v,N.p={},N}))})(Qs)),Qs.exports}var h0=l0();const c0=o0(h0);var pu=Object.defineProperty,p=(e,t)=>pu(e,"name",{value:t,configurable:!0}),u0=(e,t)=>{for(var r in t)pu(e,r,{get:t[r],enumerable:!0})},Ye={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},el=p(function(e="fatal"){let t=Ye.fatal;typeof e=="string"?e.toLowerCase()in Ye&&(t=Ye[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=Ye.fatal&&(H.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=Ye.error&&(H.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=Ye.warn&&(H.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=Ye.info&&(H.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=Ye.debug&&(H.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=Ye.trace&&(H.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=p(e=>`%c${c0().format("ss.SSS")} : ${e} : `,"format");const Js={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 s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Js.hue2rgb(a,s,e+1/3)*255;case"g":return Js.hue2rgb(a,s,e)*255;case"b":return Js.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},d0={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},f0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:Js,lang:d0,unit:f0},nr={};for(let e=0;e<=255;e++)nr[e]=nt.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class p0{constructor(){this.type=Gt.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=Gt.ALL}is(t){return this.type===t}}class g0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new p0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ha=new g0({r:0,g:0,b:0,a:0},"transparent"),ii={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ii.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Ha.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${nr[Math.round(t)]}${nr[Math.round(r)]}${nr[Math.round(i)]}${nr[Math.round(s*255)]}`:`#${nr[Math.round(t)]}${nr[Math.round(r)]}${nr[Math.round(i)]}`}},Br={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(Br.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Br.re);if(!r)return;const[,i,s,a,o,n]=r;return Ha.set({h:Br._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},rs={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=rs.colors[e];if(t)return ii.parse(t)},stringify:e=>{const t=ii.stringify(e);for(const r in rs.colors)if(rs.colors[r]===t)return r}},Xi={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(Xi.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Ha.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Pe={format:{keyword:rs,hex:ii,rgb:Xi,rgba:Xi,hsl:Br,hsla:Br},parse:e=>{if(typeof e!="string")return e;const t=ii.parse(e)||Xi.parse(e)||Br.parse(e)||rs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Br.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Xi.stringify(e):ii.stringify(e)},gu=(e,t)=>{const r=Pe.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Pe.stringify(r)},ur=(e,t,r=0,i=1)=>{if(typeof e!="number")return gu(e,{a:t});const s=Ha.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Pe.stringify(s)},m0=e=>{const{r:t,g:r,b:i}=Pe.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},y0=e=>m0(e)>=.5,Le=e=>!y0(e),mu=(e,t,r)=>{const i=Pe.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Pe.stringify(i)},P=(e,t)=>mu(e,"l",t),R=(e,t)=>mu(e,"l",-t),x=(e,t)=>{const r=Pe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return gu(e,i)},C0=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Pe.parse(e),{r:n,g:l,b:h,a:c}=Pe.parse(t),u=r/100,f=u*2-1,d=o-c,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-g,C=i*g+n*y,b=s*g+l*y,T=a*g+h*y,S=o*u+c*(1-u);return ur(C,b,T,S)},F=(e,t=100)=>{const r=Pe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,C0(r,e,t)};/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function x0(e){if(Array.isArray(e))return e}function b0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function k0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function T0(e,t){return x0(e)||b0(e,t)||w0(e,t)||k0()}function w0(e,t){if(e){if(typeof e=="string")return Eh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(e,t):void 0}}const yu=Object.entries,Mh=Object.setPrototypeOf,S0=Object.isFrozen,Cu=Object.getPrototypeOf,xu=Object.getOwnPropertyDescriptor;let qt=Object.freeze,jt=Object.seal,Kr=Object.create,bu=typeof Reflect<"u"&&Reflect,tn=bu.apply,en=bu.construct;qt||(qt=function(t){return t});jt||(jt=function(t){return t});tn||(tn=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});en||(en=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Ue=Lt(Array.prototype.forEach),_0=Lt(Array.prototype.lastIndexOf),$h=Lt(Array.prototype.pop),Pi=Lt(Array.prototype.push),v0=Lt(Array.prototype.slice),B0=Lt(Array.prototype.splice),si=Array.isArray,Ao=ku(Set),Eo=Lt(Set.prototype.add),Ri=Lt(Set.prototype.has),Sr=Lt(String.prototype.toLowerCase),Mo=Lt(String.prototype.toString),Oh=Lt(String.prototype.match),Ni=Lt(String.prototype.replace),Ih=Lt(String.prototype.indexOf),L0=Lt(String.prototype.trim),F0=Lt(Number.prototype.toString),A0=Lt(Boolean.prototype.toString),Dh=typeof BigInt>"u"?null:Lt(BigInt.prototype.toString),Ph=typeof Symbol>"u"?null:Lt(Symbol.prototype.toString),ae=Lt(Object.prototype.hasOwnProperty),qi=Lt(Object.prototype.toString),Ht=Lt(RegExp.prototype.test),je=ku(TypeError);function Lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return tn(e,t,i)}}function ku(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return en(e,r)}}function Ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sr;if(Mh&&Mh(e,null),!si(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(S0(t)||(t[i]=a),s=a)}e[s]=!0}return e}function E0(e){for(let t=0;t<e.length;t++)ae(e,t)||(e[t]=null);return e}function ce(e){const t=Kr(null);for(const i of yu(e)){var r=T0(i,2);const s=r[0],a=r[1];ae(e,s)&&(si(a)?t[s]=E0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=ce(a):t[s]=a)}return t}function M0(e){switch(typeof e){case"string":return e;case"number":return F0(e);case"boolean":return A0(e);case"bigint":return Dh?Dh(e):"0";case"symbol":return Ph?Ph(e):"Symbol()";case"undefined":return qi(e);case"function":case"object":{if(e===null)return qi(e);const t=e,r=me(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:qi(i)}return qi(e)}default:return qi(e)}}function me(e,t){for(;e!==null;){const i=xu(e,t);if(i){if(i.get)return Lt(i.get);if(typeof i.value=="function")return Lt(i.value)}e=Cu(e)}function r(){return null}return r}function $0(e,t){for(;e!==null;){const r=xu(e,t);if(r)return r.get?Lt(r.get):null;e=Cu(e)}return null}function O0(e){try{return Ht(e,""),!0}catch{return!1}}const Rh=qt(["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"]),$o=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Oo=qt(["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"]),I0=qt(["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"]),Io=qt(["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"]),D0=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nh=qt(["#text"]),qh=qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Do=qt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zh=qt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ns=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P0=jt(/{{[\w\W]*|^[\w\W]*}}/g),R0=jt(/<%[\w\W]*|^[\w\W]*%>/g),N0=jt(/\${[\w\W]*/g),q0=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),z0=jt(/^aria-[\-\w]+$/),Wh=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W0=jt(/^(?:\w+script|data):/i),H0=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y0=jt(/^html$/i),U0=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Po=jt(/<[/\w!]/g),Hh=jt(/<[/\w]/g),j0=jt(/<\/no(script|embed|frames)/i),Yh=jt(/\/>/i),Ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},G0=qt(Ct({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),X0=function(){return typeof window>"u"?null:window},V0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));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}},Uh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},or=function(t,r,i,s){return ae(t,r)&&si(t[r])?Ct(s.base?ce(s.base):{},t[r],s.transform):i},Ro=function(t,r,i){const s=ae(t,r)?t[r]:void 0;return s&&typeof s=="object"?ce(s):i()};function Tu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X0();const t=j=>Tu(j);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==Ot.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,c=e.trustedTypes,u=n.prototype,f=me(u,"cloneNode"),d=me(u,"remove"),m=me(u,"removeAttributeNode"),g=me(u,"nextSibling"),y=me(u,"childNodes"),C=me(u,"parentNode"),b=me(u,"shadowRoot"),T=me(u,"attributes"),S=o&&o.prototype?me(o.prototype,"nodeType"):null,w=o&&o.prototype?me(o.prototype,"nodeName"):null,v=o&&o.prototype?me(o.prototype,"ownerDocument"):null,M=function(k){return S?S(k):k.nodeType},L=function(k){return w?w(k):k.nodeName},Y=$0(u,"namespaceURI"),N=function(k){return Y?Y(k):k.namespaceURI};if(typeof a=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let O,G="",U,D=!1,$=0;const A=function(){if($>0)throw je('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},I=function(k){A(),$++;try{return O.createHTML(k)}finally{$--}},E=function(k){A(),$++;try{return O.createScriptURL(k)}finally{$--}},_=function(){return D||(U=V0(c,s),D=!0),U},q=r,lt=q.implementation,dt=q.createNodeIterator,yt=q.createDocumentFragment,pt=q.getElementsByTagName,xt=i.importNode;let ht=Uh();t.isSupported=typeof yu=="function"&&typeof C=="function"&<&<.createHTMLDocument!==void 0;const Wt=P0,fe=R0,pe=N0,J=q0,ct=z0,_t=W0,Et=H0,We=U0;let Ce=Wh,vt=null;const Fs=Ct({},[...Rh,...$o,...Oo,...Io,...Nh]);let wt=null;const lo=Ct({},[...qh,...Do,...zh,...Ns]);let Ae=Object.seal(Kr(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}})),$i=null,ih=null;const ir=Object.seal(Kr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let sh=!0,ho=!0,ah=!1,co=!0,He=!1,Cr=!0,xr=!1,uo=!1,As=null,Es=null,fo=!1,zr=!1,Ms=!1,$s=!1,oh=!0,nh=!1;const lh="user-content-";let po=!0,go=!1,br=null,Wr={},kr=null;const hh=Ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ch=null;const uh=Ct({},["audio","video","img","source","image","track"]);let dh=null;const fh=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Os="http://www.w3.org/1998/Math/MathML",Is="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";let Hr=Ee,mo=!1,yo=null;const Ry=Ct({},[Os,Is,Ee],Mo),ph=qt(["mi","mo","mn","ms","mtext"]);let Co=Ct({},ph);const gh=qt(["annotation-xml"]);let xo=Ct({},gh);const Ny=Ct({},["title","style","font","a","script"]);let Oi=null;const qy=["application/xhtml+xml","text/html"],zy="text/html";let Mt=null,Yr=null;const Wy=r.createElement("form"),mh=function(k){return k instanceof RegExp||k instanceof Function},bo=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Yr&&Yr===k)return;(!k||typeof k!="object")&&(k={}),k=ce(k),Oi=qy.indexOf(k.PARSER_MEDIA_TYPE)===-1?zy:k.PARSER_MEDIA_TYPE,Mt=Oi==="application/xhtml+xml"?Mo:Sr,vt=or(k,"ALLOWED_TAGS",Fs,{transform:Mt}),wt=or(k,"ALLOWED_ATTR",lo,{transform:Mt}),yo=or(k,"ALLOWED_NAMESPACES",Ry,{transform:Mo}),dh=or(k,"ADD_URI_SAFE_ATTR",fh,{transform:Mt,base:fh}),ch=or(k,"ADD_DATA_URI_TAGS",uh,{transform:Mt,base:uh}),kr=or(k,"FORBID_CONTENTS",hh,{transform:Mt}),$i=or(k,"FORBID_TAGS",ce({}),{transform:Mt}),ih=or(k,"FORBID_ATTR",ce({}),{transform:Mt}),Wr=ae(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?ce(k.USE_PROFILES):k.USE_PROFILES:!1,sh=k.ALLOW_ARIA_ATTR!==!1,ho=k.ALLOW_DATA_ATTR!==!1,ah=k.ALLOW_UNKNOWN_PROTOCOLS||!1,co=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=k.SAFE_FOR_TEMPLATES||!1,Cr=k.SAFE_FOR_XML!==!1,xr=k.WHOLE_DOCUMENT||!1,zr=k.RETURN_DOM||!1,Ms=k.RETURN_DOM_FRAGMENT||!1,$s=k.RETURN_TRUSTED_TYPE||!1,fo=k.FORCE_BODY||!1,oh=k.SANITIZE_DOM!==!1,nh=k.SANITIZE_NAMED_PROPS||!1,po=k.KEEP_CONTENT!==!1,go=k.IN_PLACE||!1,Ce=O0(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:Wh,Hr=typeof k.NAMESPACE=="string"?k.NAMESPACE:Ee,Co=Ro(k,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ct({},ph)),xo=Ro(k,"HTML_INTEGRATION_POINTS",()=>Ct({},gh));const B=Ro(k,"CUSTOM_ELEMENT_HANDLING",()=>Kr(null));if(Ae=Kr(null),ae(B,"tagNameCheck")&&mh(B.tagNameCheck)&&(Ae.tagNameCheck=B.tagNameCheck),ae(B,"attributeNameCheck")&&mh(B.attributeNameCheck)&&(Ae.attributeNameCheck=B.attributeNameCheck),ae(B,"allowCustomizedBuiltInElements")&&typeof B.allowCustomizedBuiltInElements=="boolean"&&(Ae.allowCustomizedBuiltInElements=B.allowCustomizedBuiltInElements),jt(Ae),He&&(ho=!1),Ms&&(zr=!0),Wr&&(vt=Ct({},Nh),wt=Kr(null),Wr.html===!0&&(Ct(vt,Rh),Ct(wt,qh)),Wr.svg===!0&&(Ct(vt,$o),Ct(wt,Do),Ct(wt,Ns)),Wr.svgFilters===!0&&(Ct(vt,Oo),Ct(wt,Do),Ct(wt,Ns)),Wr.mathMl===!0&&(Ct(vt,Io),Ct(wt,zh),Ct(wt,Ns))),ir.tagCheck=null,ir.attributeCheck=null,ae(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?ir.tagCheck=k.ADD_TAGS:si(k.ADD_TAGS)&&(vt===Fs&&(vt=ce(vt)),Ct(vt,k.ADD_TAGS,Mt))),ae(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?ir.attributeCheck=k.ADD_ATTR:si(k.ADD_ATTR)&&(wt===lo&&(wt=ce(wt)),Ct(wt,k.ADD_ATTR,Mt))),ae(k,"ADD_FORBID_CONTENTS")&&si(k.ADD_FORBID_CONTENTS)&&(kr===hh&&(kr=ce(kr)),Ct(kr,k.ADD_FORBID_CONTENTS,Mt)),po&&(vt["#text"]=!0),xr&&Ct(vt,["html","head","body"]),vt.table&&(Ct(vt,["tbody"]),delete $i.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const z=O;O=k.TRUSTED_TYPES_POLICY;try{G=I("")}catch(W){throw O=z,W}}else k.TRUSTED_TYPES_POLICY===null?(O=void 0,G=""):(O===void 0&&(O=_()),O&&typeof G=="string"&&(G=I("")));qt&&qt(k),Yr=k},yh=Ct({},[...$o,...Oo,...I0]),Ch=Ct({},[...Io,...D0]),Hy=function(k,B,z){return B.namespaceURI===Ee?k==="svg":B.namespaceURI===Os?k==="svg"&&(z==="annotation-xml"||Co[z]):!!yh[k]},Yy=function(k,B,z){return B.namespaceURI===Ee?k==="math":B.namespaceURI===Is?k==="math"&&xo[z]:!!Ch[k]},Uy=function(k,B,z){return B.namespaceURI===Is&&!xo[z]||B.namespaceURI===Os&&!Co[z]?!1:!Ch[k]&&(Ny[k]||!yh[k])},jy=function(k){const B=N(k),z=Sr(L(k)),W=C(k);let et,ot;return W&&M(W)===Ot.element?(et={namespaceURI:N(W)},ot=Sr(L(W))):(et={namespaceURI:Hr},ot="template"),yo[B]?B===Is?Hy(z,et,ot):B===Os?Yy(z,et,ot):B===Ee?Uy(z,et,ot):!!(Oi==="application/xhtml+xml"&&yo[B]):!1},sr=function(k){Pi(t.removed,{element:k});try{C(k).removeChild(k)}catch{if(d(k),!C(k))throw je("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},xh=function(k,B,z){try{m(k,B)}catch{try{k.removeAttribute(z)}catch{}}},ko=function(k){wo(k);const B=y(k);B&&Ue(v0(B),W=>{try{d(W)}catch{}});const z=M(k)===Ot.element?T(k):null;if(z)for(let W=z.length-1;W>=0;--W){const et=z[W],ot=et&&et.name;typeof ot=="string"&&xh(k,et,ot)}},Ur=function(k,B,z){if(!z)try{z=B.getAttributeNode(k)}catch{z=null}Pi(t.removed,{attribute:z||null,from:B});try{z?m(B,z):B.removeAttribute(k)}catch{try{B.removeAttribute(k)}catch{}}if(k==="is")if(zr||Ms)try{sr(B)}catch{}else try{B.setAttribute(k,"")}catch{}},bh=function(k){const B=T(k);if(B)for(let z=B.length-1;z>=0;--z){const W=B[z],et=W&&W.name;typeof et!="string"||wt[Mt(et)]||xh(k,W,et)}},To=function(k,B){let z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const W=[k];for(;W.length>0;){const et=W.pop();if(B(et)===!1)continue;if(z&&M(et)===Ot.element){const ft=b(et);ar(ft)&&W.push(ft)}const ot=y(et);if(ot)for(let ft=ot.length-1;ft>=0;--ft)W.push(ot[ft])}},wo=function(k){To(k,B=>{M(B)===Ot.element&&bh(B)})},So=function(k){const B=[];return To(k,z=>{B.push(z)},!0),B},Gy=function(k,B){const z=Ao();Ue(So(k),W=>{M(W)===Ot.element&&Eo(z,W)}),Ue(B,W=>{M(W)===Ot.element&&!Ri(z,W)&&bh(W)})},kh=function(k,B){let z=!1;return Ue(t.removed,W=>{W.element&&(z=z||W.element===k,wo(W.element))}),Gy(k,B),z},Xy=8,Vy=function(k,B){const z=br;let W=null;const et=()=>(W||(W=Ao(),Ue(B,ot=>{Eo(W,ot)})),W);for(let ot=0;;ot++){const ft=So(k),Dt=[k];let Me=!1;if(Ue(ft,Kt=>{M(Kt)===Ot.documentFragment?Pi(Dt,Kt):!Me&&!Ri(z,Kt)&&(Me=Ri(et(),Kt))}),!Me)return;if(ot>=Xy)throw je("the tree kept changing during in-place sanitization; refusing to return it");Ue(Dt,(Kt,re)=>{Zy(Kt,re>0,k,et())})}},Zy=function(k,B,z,W){const et=_o(k);let ot;for(;ot=et.nextNode();)!Ri(W,ot)||Ri(br,ot)||(B&&xe(ht.uponSanitizeShadowNode,ot,null),Bo(ot,z),Lo(ot,z),ar(ot.content)&&Di(ot.content))},Ky=function(k){br&&Eo(br,k)},Th=function(k,B){return Cr?k==="patchsrc"?!0:k==="for"&&B!=="label"&&B!=="output":!1},Qy=function(k){Cr&&To(k,B=>{const z=M(B);if(z===Ot.processingInstruction||z===Ot.comment&&Ht(Hh,B.data)){try{d(B)}catch{}return!1}if(z===Ot.element){const W=B,et=Mt(L(B));try{W.hasAttribute&&W.hasAttribute("patchsrc")&&W.removeAttribute("patchsrc"),W.hasAttribute&&W.hasAttribute("for")&&Th("for",et)&&W.removeAttribute("for")}catch{}}return!0})},wh=function(k){let B=null,z=null;if(fo)k="<remove></remove>"+k;else{const ot=Oh(k,/^[\r\n\t ]+/);z=ot&&ot[0]}Oi==="application/xhtml+xml"&&Hr===Ee&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const W=O?I(k):k;if(Hr===Ee)try{B=new h().parseFromString(W,Oi)}catch{}if(!B||!B.documentElement){B=lt.createDocument(Hr,"template",null);try{B.documentElement.innerHTML=mo?G:W}catch{}}const et=B.body||B.documentElement;return k&&z&&et.insertBefore(r.createTextNode(z),et.childNodes[0]||null),Hr===Ee?pt.call(B,xr?"html":"body")[0]:xr?B.documentElement:et},_o=function(k){const B=v?v(k):k.ownerDocument;return dt.call(B||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ds=function(k){return k=Ni(k,Wt," "),k=Ni(k,fe," "),k=Ni(k,pe," "),k},vo=function(k){var B;Sh(k);const z=(B=k.querySelectorAll)===null||B===void 0?void 0:B.call(k,"template");z&&Ue(z,W=>{ar(W.content)&&vo(W.content)})},Sh=function(k){k.normalize();const B=v?v(k):k.ownerDocument,z=dt.call(B||k,k,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let W=z.nextNode();for(;W;)W.data=Ds(W.data),W=z.nextNode()},Ps=function(k){const B=w?w(k):null;return typeof B!="string"||Mt(B)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==T(k)||typeof k.removeAttribute!="function"||typeof k.removeAttributeNode!="function"||typeof k.getAttributeNode!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==S(k)||k.childNodes!==y(k)},ar=function(k){if(!S||typeof k!="object"||k===null)return!1;try{return S(k)===Ot.documentFragment}catch{return!1}},Ii=function(k){if(!S||typeof k!="object"||k===null)return!1;try{return typeof S(k)=="number"}catch{return!1}};function xe(j,k,B){j.length!==0&&Ue(j,z=>{z.call(t,k,B,Yr)})}const Jy=function(k,B){return!!(Cr&&k.hasChildNodes()&&!Ii(k.firstElementChild)&&Ht(Po,k.textContent)&&Ht(Po,k.innerHTML)||Cr&&G0[B]&&M(k)===Ot.element&&N(k)===Ee&&(Ii(k.firstElementChild)||typeof k.textContent=="string"&&Ht(Po,k.textContent))||k.nodeType===Ot.processingInstruction||Cr&&k.nodeType===Ot.comment&&Ht(Hh,k.data))},Rs=function(k,B){if(k instanceof RegExp)return Ht(k,B);if(k instanceof Function){for(var z=arguments.length,W=new Array(z>2?z-2:0),et=2;et<z;et++)W[et-2]=arguments[et];return!!k(B,...W)}return!1},t0=function(k,B,z){if(!$i[B]&&Bh(B)&&Rs(Ae.tagNameCheck,B))return!1;if(po&&!kr[B]&&!kr[Sr(B)]){const W=C(k),et=y(k);if(et&&W){const ot=et.length;for(let ft=ot-1;ft>=0;--ft){const Dt=k===z?f(et[ft],!0):et[ft];W.insertBefore(Dt,g(k))}}}return sr(k),!0},_h=function(k,B,z,W){return k.length===0?B:B===z||B===W?ce(B):B},jr=function(k,B){return k===B||C(k)!==null?!1:(go&&wo(k),!0)},Bo=function(k,B){if(Ky(k),xe(ht.beforeSanitizeElements,k,null),jr(k,B))return!0;if(Ps(k))return sr(k),!0;const z=Mt(L(k));if(vt=_h(ht.uponSanitizeElement,vt,Fs,As),xe(ht.uponSanitizeElement,k,{tagName:z,allowedTags:vt}),jr(k,B))return!0;if(Jy(k,z))return sr(k),!0;if($i[z]||!(ir.tagCheck instanceof Function&&ir.tagCheck(z))&&!vt[z]){const W=t0(k,z,B);return W===!1&&(xe(ht.afterSanitizeElements,k,null),jr(k,B))?!0:W}if(M(k)===Ot.element&&!jy(k)||(z==="noscript"||z==="noembed"||z==="noframes")&&Ht(j0,k.innerHTML))return sr(k),!0;if(He&&k.nodeType===Ot.text){const W=Ds(k.textContent);k.textContent!==W&&(Pi(t.removed,{element:k.cloneNode()}),k.textContent=W)}return xe(ht.afterSanitizeElements,k,null),jr(k,B)},vh=function(k,B,z){if(ih[B]||Th(B,k)||oh&&(B==="id"||B==="name")&&(z in r||z in Wy))return!1;const W=wt[B]||ir.attributeCheck instanceof Function&&ir.attributeCheck(B,k);return ho&&Ht(J,B)||sh&&Ht(ct,B)?!0:W?dh[B]||Ht(Ce,Ni(z,Et,""))||(B==="src"||B==="xlink:href"||B==="href")&&k!=="script"&&Ih(z,"data:")===0&&ch[k]||ah&&!Ht(_t,Ni(z,Et,""))?!0:!z:Bh(k)&&Rs(Ae.tagNameCheck,k)&&Rs(Ae.attributeNameCheck,B,k)||B==="is"&&Ae.allowCustomizedBuiltInElements&&Rs(Ae.tagNameCheck,z)},e0=Ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bh=function(k){return!e0[Sr(k)]&&Ht(We,k)},r0=function(k,B,z,W){if(O&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!z)switch(c.getAttributeType(k,B)){case"TrustedHTML":return I(W);case"TrustedScriptURL":return E(W)}return W},i0=function(k,B,z,W){try{return z?k.setAttributeNS(z,B,W):k.setAttribute(B,W),Ps(k)?(sr(k),!1):!0}catch{return Ur(B,k),!1}},Lh=function(k,B){return Cr&&Ht(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,B)?!0:Sr(k)==="attributename"&&Oh(B,"href")!==null},Lo=function(k,B){if(xe(ht.beforeSanitizeAttributes,k,null),jr(k,B))return;const z=k.attributes;if(!z||Ps(k))return;wt=_h(ht.uponSanitizeAttribute,wt,lo,Es);const W={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt,forceKeepAttr:void 0};let et=z.length;const ot=Mt(k.nodeName);for(;et--;){const ft=z[et],Dt=ft.name,Me=ft.namespaceURI,Kt=ft.value,re=Mt(Dt),Gr=Kt;let ie=Dt==="value"?Gr:L0(Gr),Fh=!1;if(W.attrName=re,W.attrValue=ie,W.keepAttr=!0,W.forceKeepAttr=void 0,xe(ht.uponSanitizeAttribute,k,W),ie=W.attrValue,nh&&(re==="id"||re==="name")&&Ih(ie,lh)!==0&&(Ur(Dt,k,ft),ie=lh+ie,Fh=!0),Lh(Dt,ie)){Ur(Dt,k,ft);continue}if(!W.forceKeepAttr){if(!W.keepAttr){Ur(Dt,k,ft);continue}if(!co&&Ht(Yh,ie)){Ur(Dt,k,ft);continue}if(He&&(ie=Ds(ie)),!vh(ot,re,ie)){Ur(Dt,k,ft);continue}ie=r0(ot,re,Me,ie),ie!==Gr&&i0(k,Dt,Me,ie)&&Fh&&$h(t.removed)}}xe(ht.afterSanitizeAttributes,k,null),jr(k,B)},Di=function(k){let B=null;const z=_o(k);for(xe(ht.beforeSanitizeShadowDOM,k,null);B=z.nextNode();)if(xe(ht.uponSanitizeShadowNode,B,null),Bo(B,k),Lo(B,k),ar(B.content)&&Di(B.content),M(B)===Ot.element){const W=b(B);ar(W)&&(Fo(W),Di(W))}He&&Sh(k),xe(ht.afterSanitizeShadowDOM,k,null)},Fo=function(k){const B=[{node:k,shadow:null}];for(;B.length>0;){const z=B.pop();if(z.shadow){Di(z.shadow);continue}const W=z.node,et=M(W)===Ot.element,ot=y(W);if(ot)for(let ft=ot.length-1;ft>=0;--ft)B.push({node:ot[ft],shadow:null});if(et){const ft=w?w(W):null;if(typeof ft=="string"&&Mt(ft)==="template"){const Dt=W.content;ar(Dt)&&B.push({node:Dt,shadow:null})}}if(et){const ft=b(W);ar(ft)&&B.push({node:null,shadow:ft},{node:ft,shadow:null})}}};return t.sanitize=function(j){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,z=null,W=null,et=null;if(mo=!j,mo&&(j="<!-->"),typeof j!="string"&&!Ii(j)&&(j=M0(j),typeof j!="string"))throw je("dirty is not a string, aborting");if(!t.isSupported)return j;uo?(vt=As,wt=Es):bo(k),(ht.uponSanitizeElement.length>0||ht.uponSanitizeAttribute.length>0)&&(vt=ce(vt)),ht.uponSanitizeAttribute.length>0&&(wt=ce(wt)),t.removed=[];const ot=go&&typeof j!="string"&&Ii(j);let ft=[];const Dt=br;if(ot){Qy(j);const re=L(j);if(typeof re=="string"){const Gr=Mt(re);if(!vt[Gr]||$i[Gr])throw ko(j),je("root node is forbidden and cannot be sanitized in-place")}if(Ps(j))throw ko(j),je("root node is clobbered and cannot be sanitized in-place");ft=So(j),br=Ao()}else if(Ii(j))B=wh("<!---->"),z=B.ownerDocument.importNode(j,!0),z.nodeType===Ot.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?B=z:B.appendChild(z),Fo(B);else{if(!zr&&!He&&!xr&&j.indexOf("<")===-1)return O&&$s?I(j):j;if(B=wh(j),!B)return zr?null:$s?G:""}B&&fo&&sr(B.firstChild);const Me=ot?j:B;try{ot&&Fo(j);const re=_o(Me);for(;W=re.nextNode();)Bo(W,Me),Lo(W,Me),ar(W.content)&&Di(W.content);ot&&Vy(j,ft)}catch(re){throw ot&&(ko(j),kh(j,ft)),re}finally{br=Dt}if(ot){if(kh(j,ft))throw je("a node selected for removal could not be safely returned; refusing to sanitize in place");return He&&vo(j),j}if(zr){if(He&&vo(B),Ms)for(et=yt.call(B.ownerDocument);B.firstChild;)et.appendChild(B.firstChild);else et=B;return(wt.shadowroot||wt.shadowrootmode)&&(et=xt.call(i,et,!0)),et}let Kt=xr?B.outerHTML:B.innerHTML;return xr&&vt["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Ht(Y0,B.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
|
|
4
|
+
`+Kt),He&&(Kt=Ds(Kt)),O&&$s?I(Kt):Kt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bo(j),uo=!0,As=vt,Es=wt},t.clearConfig=function(){Yr=null,uo=!1,As=null,Es=null,O=U,G=""},t.isValidAttribute=function(j,k,B){Yr||bo({});const z=Mt(j),W=Mt(k);return typeof B=="string"&&(Lh(k,B)||!co&&Ht(Yh,B))?!1:vh(z,W,B)},t.addHook=function(j,k){typeof k=="function"&&ae(ht,j)&&Pi(ht[j],k)},t.removeHook=function(j,k){if(ae(ht,j)){if(k!==void 0){const B=_0(ht[j],k);return B===-1?void 0:B0(ht[j],B,1)[0]}return $h(ht[j])}},t.removeHooks=function(j){ae(ht,j)&&(ht[j]=[])},t.removeAllHooks=function(){ht=Uh()},t}var ki=Tu(),wu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,is=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Z0=/\s*%%.*\n/gm,ni,Su=(ni=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(ni,"UnknownDiagramError"),ni),$r={},rl=p(function(e,t){e=e.replace(wu,"").replace(is,"").replace(Z0,`
|
|
5
|
+
`);for(const[r,{detector:i}]of Object.entries($r))if(i(e,t))return r;throw new Su(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),rn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)_u(t,r,i)},"registerLazyLoadedDiagrams"),_u=p((e,t,r)=>{$r[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),$r[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),K0=p(e=>$r[e].loader,"getDiagramLoader"),sn=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>sn(e,a,s)),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"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=sn(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Rt=sn,Ne="#ffffff",qe="#f2f2f2",at=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),li,Q0=(li=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,h,c,u,f,d,m,g,y,C,b,T,S,w,v,M,L,Y,N,O,G,U,D,$,A,I,E,_;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],75);else for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScale"+q]=R(this["cScale"+q],25);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleInv"+q]=this["cScaleInv"+q]||F(this["cScale"+q]);for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this.darkMode?this["cScalePeer"+q]=this["cScalePeer"+q]||P(this["cScale"+q],10):this["cScalePeer"+q]=this["cScalePeer"+q]||R(this["cScale"+q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let q=0;q<this.THEME_COLOR_LIMIT;q++)this["cScaleLabel"+q]=this["cScaleLabel"+q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let q=0;q<5;q++)this["surface"+q]=this["surface"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(5+q*3)}),this["surfacePeer"+q]=this["surfacePeer"+q]||x(this.mainBkg,{h:180,s:-15,l:t*(8+q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((f=this.wardley)==null?void 0:f.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((T=this.wardley)==null?void 0:T.linkStroke)||this.lineColor,evolutionStroke:((S=this.wardley)==null?void 0:S.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((v=this.wardley)==null?void 0:v.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((L=this.xyChart)==null?void 0:L.backgroundColor)||this.background,titleColor:((Y=this.xyChart)==null?void 0:Y.titleColor)||this.primaryTextColor,dataLabelColor:((N=this.xyChart)==null?void 0:N.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((O=this.xyChart)==null?void 0:O.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((G=this.xyChart)==null?void 0:G.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((U=this.xyChart)==null?void 0:U.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((D=this.xyChart)==null?void 0:D.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(($=this.xyChart)==null?void 0:$.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((I=this.xyChart)==null?void 0:I.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}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(li,"Theme"),li),J0=p(e=>{const t=new Q0;return t.calculate(e),t},"getThemeVariables"),hi,tC=(hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=ur(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ur(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||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,f,d,m,g,y,C,b,T,S,w,v,M,L,Y,N,O,G,U,D,$,A,I,E;this.secondBkg=P(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=P(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=P(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=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScalePeer"+_]=this["cScalePeer"+_]||P(this["cScale"+_],10);for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-10+_*4)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(-7+_*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??P(this["cScale"+_],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.mainBkg,componentStroke:((G=this.wardley)==null?void 0:G.componentStroke)||this.lineColor,componentLabelColor:((U=this.wardley)==null?void 0:U.componentLabelColor)||this.primaryTextColor,linkStroke:((D=this.wardley)==null?void 0:D.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((I=this.wardley)==null?void 0:I.annotationTextColor)||this.primaryTextColor,annotationFill:((E=this.wardley)==null?void 0:E.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(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(hi,"Theme"),hi),eC=p(e=>{const t=new tC;return t.calculate(e),t},"getThemeVariables"),ci,rC=(ci=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ur(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,f,d,m,g,y,C,b,T,S,w,v,M,L,Y,N,O,G,U,D,$,A,I,E;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=R(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,l:-(7+_*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((f=this.wardley)==null?void 0:f.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((T=this.wardley)==null?void 0:T.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((Y=this.xyChart)==null?void 0:Y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((N=this.xyChart)==null?void 0:N.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((G=this.xyChart)==null?void 0:G.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((U=this.xyChart)==null?void 0:U.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((D=this.xyChart)==null?void 0:D.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(($=this.xyChart)==null?void 0:$.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((E=this.xyChart)==null?void 0:E.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(ci,"Theme"),ci),iC=p(e=>{const t=new rC;return t.calculate(e),t},"getThemeVariables"),ui,sC=(ui=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=P("#cde498",10),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,f,d,m,g,y,C,b,T,S,w,v,M,L,Y,N,O,G,U,D,$,A,I,E;this.actorBorder=R(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=R(this["cScale"+_],10),this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||x(this["cScale"+_],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{h:30,s:-30,l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{h:30,s:-30,l:-(8+_*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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((f=this.wardley)==null?void 0:f.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((T=this.wardley)==null?void 0:T.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((Y=this.xyChart)==null?void 0:Y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((N=this.xyChart)==null?void 0:N.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((O=this.xyChart)==null?void 0:O.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((G=this.xyChart)==null?void 0:G.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((U=this.xyChart)==null?void 0:U.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((D=this.xyChart)==null?void 0:D.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(($=this.xyChart)==null?void 0:$.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((A=this.xyChart)==null?void 0:A.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((E=this.xyChart)==null?void 0:E.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(ui,"Theme"),ui),aC=p(e=>{const t=new sC;return t.calculate(e),t},"getThemeVariables"),di,oC=(di=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,u,f,d,m,g,y,C,b,T,S,w,v,M,L,Y,N,O,G,U,D,$,A,I,E;this.secondBkg=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(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 _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||F(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||P(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||R(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||x(this.mainBkg,{l:-(5+_*5)}),this["surfacePeer"+_]=this["surfacePeer"+_]||x(this.mainBkg,{l:-(8+_*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=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=R(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=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["pie"+_]=this["cScale"+_];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let _=0;_<8;_++)this["venn"+(_+1)]=this["venn"+(_+1)]??this["cScale"+_];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((G=this.wardley)==null?void 0:G.componentStroke)||this.lineColor,componentLabelColor:((U=this.wardley)==null?void 0:U.componentLabelColor)||this.primaryTextColor,linkStroke:((D=this.wardley)==null?void 0:D.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((I=this.wardley)==null?void 0:I.annotationTextColor)||this.primaryTextColor,annotationFill:((E=this.wardley)==null?void 0:E.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(di,"Theme"),di),nC=p(e=>{const t=new oC;return t.calculate(e),t},"getThemeVariables"),fi,lC=(fi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,u,f,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(fi,"Theme"),fi),hC=p(e=>{const t=new lC;return t.calculate(e),t},"getThemeVariables"),pi,cC=(pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(pi,"Theme"),pi),uC=p(e=>{const t=new cC;return t.calculate(e),t},"getThemeVariables"),gi,dC=(gi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=at("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,f,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=R(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(gi,"Theme"),gi),fC=p(e=>{const t=new dC;return t.calculate(e),t},"getThemeVariables"),mi,pC=(mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=R(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(mi,"Theme"),mi),gC=p(e=>{const t=new pC;return t.calculate(e),t},"getThemeVariables"),yi,mC=(yi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,u,f,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||P(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||F(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||P(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||R(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(yi,"Theme"),yi),yC=p(e=>{const t=new mC;return t.calculate(e),t},"getThemeVariables"),Ci,CC=(Ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(F("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||P(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||F(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||P(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||R(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=R(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?P(this.quadrant1Fill):R(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?R(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qe}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(Ci,"Theme"),Ci),xC=p(e=>{const t=new CC;return t.calculate(e),t},"getThemeVariables"),Ze={base:{getThemeVariables:J0},dark:{getThemeVariables:eC},default:{getThemeVariables:iC},forest:{getThemeVariables:aC},neutral:{getThemeVariables:nC},neo:{getThemeVariables:hC},"neo-dark":{getThemeVariables:uC},redux:{getThemeVariables:fC},"redux-dark":{getThemeVariables:gC},"redux-color":{getThemeVariables:yC},"redux-dark-color":{getThemeVariables:xC}},Qt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},vu={...Qt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ze.default.getThemeVariables(),sequence:{...Qt.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,hierarchicalNamespaces:!0},gantt:{...Qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Qt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Qt.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:{...Qt.pie,useWidth:984},xyChart:{...Qt.xyChart,useWidth:void 0},requirement:{...Qt.requirement,useWidth:void 0},packet:{...Qt.packet},eventmodeling:{...Qt.eventmodeling},treeView:{...Qt.treeView,useWidth:void 0},radar:{...Qt.radar},ishikawa:{...Qt.ishikawa},sankey:{...Qt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Qt.venn}},Bu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bu(e[i],"")]:[...r,t+i],[]),"keyify"),bC=new Set(Bu(vu,"")),Lu=vu,da=p(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>da(t));return}for(const t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!bC.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(H.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else H.debug("sanitizing object",t),da(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(H.debug("sanitizing css option",t),e[t]=Fu(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),Fu=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"),Ti=Object.freeze(Lu),tr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),oe=Rt({},Ti),fa,Or=[],ss=Rt({},Ti),Ya=p((e,t)=>{let r=Rt({},e),i={};for(const s of t)Mu(s),i=Rt(i,s);if(r=Rt(r,i),i.theme&&i.theme in Ze){const s=Rt({},fa),a=Rt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ze&&(r.themeVariables=Ze[r.theme].getThemeVariables(a))}return ss=r,Ou(ss),ss},"updateCurrentConfig"),kC=p(e=>(oe=Rt({},Ti),oe=Rt(oe,e),e.theme&&Ze[e.theme]&&(oe.themeVariables=Ze[e.theme].getThemeVariables(e.themeVariables)),Ya(oe,Or),oe),"setSiteConfig"),TC=p(e=>{fa=Rt({},e)},"saveConfigFromInitialize"),wC=p(e=>(oe=Rt(oe,e),Ya(oe,Or),oe),"updateSiteConfig"),Au=p(()=>Rt({},oe),"getSiteConfig"),Eu=p(e=>(Ou(e),Rt(ss,e),Ft()),"setConfig"),Ft=p(()=>Rt({},ss),"getConfig"),Mu=p(e=>{e&&(["secure",...oe.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.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"&&Mu(e[t])}))},"sanitize"),SC=p(e=>{var t;da(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Or.push(e),Ya(oe,Or)},"addDirective"),pa=p((e=oe)=>{Or=[],Ya(e,Or)},"reset"),_C={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},jh={},$u=p(e=>{jh[e]||(H.warn(_C[e]),jh[e]=!0)},"issueWarning"),Ou=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&$u("LAZY_LOAD_DEPRECATED")},"checkConfig"),zL=p(()=>{let e={};fa&&(e=Rt(e,fa));for(const t of Or)e=Rt(e,t);return e},"getUserDefinedConfig"),ee=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&$u("FLOWCHART_HTML_LABELS_DEPRECATED"),tr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),bs=/<br\s*\/?>/gi,vC=p(e=>e?Pu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),BC=(()=>{let e=!1;return()=>{e||(Iu(),e=!0)}})();function Iu(){const e="data-temp-href-target";ki.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ki.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(Iu,"setupDompurifyHooks");var Du=p(e=>(BC(),ki.sanitize(e)),"removeScript"),Gh=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Du(e):r!=="loose"&&(e=Pu(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=EC(e))}return e},"sanitizeMore"),Be=p((e,t)=>e&&(t.dompurifyConfig?e=ki.sanitize(Gh(e,t),t.dompurifyConfig).toString():e=ki.sanitize(Gh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),LC=p((e,t)=>typeof e=="string"?Be(e,t):e.flat().map(r=>Be(r,t)),"sanitizeTextOrArray"),FC=p(e=>bs.test(e),"hasBreaks"),AC=p(e=>e.split(bs),"splitBreaks"),EC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Pu=p(e=>e.replace(bs,"#br#"),"breakToPlaceholder"),MC=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"),$C=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),OC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Xh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];IC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(DC(s))}return r.join("")},"parseGenericTypes"),an=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),IC=p((e,t)=>{const r=an(e,"~"),i=an(t,"~");return r===1&&i===1},"shouldCombineSets"),DC=p(e=>{const t=an(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Vh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),on=/\$\$(.*)\$\$/g,ls=p(e=>{var t;return(((t=e.match(on))==null?void 0:t.length)??0)>0},"hasKatex"),WL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ru(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),PC=p(async(e,t)=>{if(!ls(e))return e;if(!(Vh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(on,"MathML is unsupported in this environment.");{const{default:r}=await mt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!Vh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(bs).map(s=>ls(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(on,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ru=p(async(e,t)=>Be(await PC(e,t),t),"renderKatexSanitized"),ks={getRows:vC,sanitizeText:Be,sanitizeTextOrArray:LC,hasBreaks:FC,splitBreaks:AC,lineBreakRegex:bs,removeScript:Du,getUrl:MC,evaluate:tr,getMax:$C,getMin:OC},RC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),NC=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"),Nu=p(function(e,t,r,i){const s=NC(t,r,i);RC(e,s)},"configureSvgSize"),qC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;H.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;H.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,H.info(`Calculated bounds: ${n}x${l}`),Nu(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ta={};function nn(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
6
|
+
`)}p(nn,"cssStyleSheetToString");var zC=p((e,t,r,i)=>{let s="";return e in ta&&ta[e]?s=ta[e]({...r,svgId:i}):H.warn(`No theme found for ${e}`),` & {
|
|
7
|
+
font-family: ${r.fontFamily};
|
|
8
|
+
font-size: ${r.fontSize};
|
|
9
|
+
fill: ${r.textColor}
|
|
10
|
+
}
|
|
11
|
+
@keyframes edge-animation-frame {
|
|
12
|
+
from {
|
|
13
|
+
stroke-dashoffset: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@keyframes dash {
|
|
17
|
+
to {
|
|
18
|
+
stroke-dashoffset: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
& .edge-animation-slow {
|
|
22
|
+
stroke-dasharray: 9,5 !important;
|
|
23
|
+
stroke-dashoffset: 900;
|
|
24
|
+
animation: dash 50s linear infinite;
|
|
25
|
+
stroke-linecap: round;
|
|
26
|
+
}
|
|
27
|
+
& .edge-animation-fast {
|
|
28
|
+
stroke-dasharray: 9,5 !important;
|
|
29
|
+
stroke-dashoffset: 900;
|
|
30
|
+
animation: dash 20s linear infinite;
|
|
31
|
+
stroke-linecap: round;
|
|
32
|
+
}
|
|
33
|
+
/* Classes common for multiple diagrams */
|
|
34
|
+
|
|
35
|
+
& .error-icon {
|
|
36
|
+
fill: ${r.errorBkgColor};
|
|
37
|
+
}
|
|
38
|
+
& .error-text {
|
|
39
|
+
fill: ${r.errorTextColor};
|
|
40
|
+
stroke: ${r.errorTextColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
& .edge-thickness-normal {
|
|
44
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
45
|
+
}
|
|
46
|
+
& .edge-thickness-thick {
|
|
47
|
+
stroke-width: 3.5px
|
|
48
|
+
}
|
|
49
|
+
& .edge-pattern-solid {
|
|
50
|
+
stroke-dasharray: 0;
|
|
51
|
+
}
|
|
52
|
+
& .edge-thickness-invisible {
|
|
53
|
+
stroke-width: 0;
|
|
54
|
+
fill: none;
|
|
55
|
+
}
|
|
56
|
+
& .edge-pattern-dashed{
|
|
57
|
+
stroke-dasharray: 3;
|
|
58
|
+
}
|
|
59
|
+
.edge-pattern-dotted {
|
|
60
|
+
stroke-dasharray: 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .marker {
|
|
64
|
+
fill: ${r.lineColor};
|
|
65
|
+
stroke: ${r.lineColor};
|
|
66
|
+
}
|
|
67
|
+
& .marker.cross {
|
|
68
|
+
stroke: ${r.lineColor};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& svg {
|
|
72
|
+
font-family: ${r.fontFamily};
|
|
73
|
+
font-size: ${r.fontSize};
|
|
74
|
+
}
|
|
75
|
+
& p {
|
|
76
|
+
margin: 0
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${s}
|
|
80
|
+
.node .neo-node {
|
|
81
|
+
stroke: ${r.nodeBorder};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
85
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
86
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
[data-look="neo"].node path {
|
|
91
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
92
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-look="neo"].node .outer-path {
|
|
96
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-look="neo"].node .neo-line path {
|
|
100
|
+
stroke: ${r.nodeBorder};
|
|
101
|
+
filter: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-look="neo"].node circle{
|
|
105
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
106
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-look="neo"].node circle .state-start{
|
|
110
|
+
fill: #000000;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-look="neo"].icon-shape .icon {
|
|
114
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
115
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
119
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
120
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
${t}
|
|
124
|
+
`},"getStyles"),WC=p((e,t)=>{t!==void 0&&(ta[e]=t)},"addStylesForDiagram"),HC=zC,qu={};u0(qu,{clear:()=>YC,getAccDescription:()=>XC,getAccTitle:()=>jC,getDiagramTitle:()=>ZC,setAccDescription:()=>GC,setAccTitle:()=>UC,setDiagramTitle:()=>VC});var il="",sl="",al="",ol=p(e=>Be(e,Ft()),"sanitizeText"),YC=p(()=>{il="",al="",sl=""},"clear"),UC=p(e=>{il=ol(e).replace(/^\s+/g,"")},"setAccTitle"),jC=p(()=>il,"getAccTitle"),GC=p(e=>{al=ol(e).replace(/\n\s+/g,`
|
|
125
|
+
`)},"setAccDescription"),XC=p(()=>al,"getAccDescription"),VC=p(e=>{sl=ol(e)},"setDiagramTitle"),ZC=p(()=>sl,"getDiagramTitle"),Zh=H,KC=el,bt=Ft,HL=Eu,YL=Ti,nl=p(e=>Be(e,bt()),"sanitizeText"),QC=qC,JC=p(()=>qu,"getCommonDb"),ga={},ma=p((e,t,r)=>{var i;ga[e]&&Zh.warn(`Diagram with id ${e} already registered. Overwriting.`),ga[e]=t,r&&_u(e,r),WC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Zh,KC,bt,nl,QC,JC(),()=>{})},"registerDiagram"),ln=p(e=>{if(e in ga)return ga[e];throw new tx(e)},"getDiagram"),xi,tx=(xi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(xi,"DiagramNotFoundError"),xi),ex={value:()=>{}};function zu(){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 ea(r)}function ea(e){this._=e}function rx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ea.prototype=zu.prototype={constructor:ea,on:function(e,t){var r=this._,i=rx(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=ix(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=Kh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Kh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ea(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++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],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function ix(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Kh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=ex,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var hn="http://www.w3.org/1999/xhtml";const Qh={svg:"http://www.w3.org/2000/svg",xhtml:hn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ua(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Qh.hasOwnProperty(t)?{space:Qh[t],local:e}:e}function sx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===hn&&t.documentElement.namespaceURI===hn?t.createElement(e):t.createElementNS(r,e)}}function ax(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wu(e){var t=Ua(e);return(t.local?ax:sx)(t)}function ox(){}function ll(e){return e==null?ox:function(){return this.querySelector(e)}}function nx(e){typeof e!="function"&&(e=ll(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new de(i,this._parents)}function lx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function hx(){return[]}function Hu(e){return e==null?hx:function(){return this.querySelectorAll(e)}}function cx(e){return function(){return lx(e.apply(this,arguments))}}function ux(e){typeof e=="function"?e=cx(e):e=Hu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new de(i,s)}function Yu(e){return function(){return this.matches(e)}}function Uu(e){return function(t){return t.matches(e)}}var dx=Array.prototype.find;function fx(e){return function(){return dx.call(this.children,e)}}function px(){return this.firstElementChild}function gx(e){return this.select(e==null?px:fx(typeof e=="function"?e:Uu(e)))}var mx=Array.prototype.filter;function yx(){return Array.from(this.children)}function Cx(e){return function(){return mx.call(this.children,e)}}function xx(e){return this.selectAll(e==null?yx:Cx(typeof e=="function"?e:Uu(e)))}function bx(e){typeof e!="function"&&(e=Yu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new de(i,this._parents)}function ju(e){return new Array(e.length)}function kx(){return new de(this._enter||this._groups.map(ju),this._parents)}function ya(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ya.prototype={constructor:ya,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 wx(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new ya(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function Sx(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,u=a.length,f=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(f[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(l=h.get(d))?(i[n]=l,l.__data__=a[n],h.delete(d)):r[n]=new ya(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(f[n])===l&&(s[n]=l)}function _x(e){return e.__data__}function vx(e,t){if(!arguments.length)return Array.from(this,_x);var r=t?Sx:wx,i=this._parents,s=this._groups;typeof e!="function"&&(e=Tx(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],f=u.length,d=Bx(e.call(c,c&&c.__data__,h,i)),m=d.length,g=n[h]=new Array(m),y=o[h]=new Array(m),C=l[h]=new Array(f);r(c,u,g,y,C,d,t);for(var b=0,T=0,S,w;b<m;++b)if(S=g[b]){for(b>=T&&(T=b+1);!(w=y[T])&&++T<m;);S._next=w||null}}return o=new de(o,i),o._enter=n,o._exit=l,o}function Bx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Lx(){return new de(this._exit||this._groups.map(ju),this._parents)}function Fx(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function Ax(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,f=n[l]=new Array(u),d,m=0;m<u;++m)(d=h[m]||c[m])&&(f[m]=d);for(;l<s;++l)n[l]=r[l];return new de(n,this._parents)}function Ex(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Mx(e){e||(e=$x);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new de(s,this._parents).order()}function $x(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ox(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ix(){return Array.from(this)}function Dx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function Px(){let e=0;for(const t of this)++e;return e}function Rx(){return!this.node()}function Nx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function qx(e){return function(){this.removeAttribute(e)}}function zx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wx(e,t){return function(){this.setAttribute(e,t)}}function Hx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Yx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Ux(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=Ua(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?zx:qx:typeof t=="function"?r.local?Ux:Yx:r.local?Hx:Wx)(r,t))}function Gu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Gx(e){return function(){this.style.removeProperty(e)}}function Xx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Vx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Zx(e,t,r){return arguments.length>1?this.each((t==null?Gx:typeof t=="function"?Vx:Xx)(e,t,r??"")):wi(this.node(),e)}function wi(e,t){return e.style.getPropertyValue(t)||Gu(e).getComputedStyle(e,null).getPropertyValue(t)}function Kx(e){return function(){delete this[e]}}function Qx(e,t){return function(){this[e]=t}}function Jx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function tb(e,t){return arguments.length>1?this.each((t==null?Kx:typeof t=="function"?Jx:Qx)(e,t)):this.node()[e]}function Xu(e){return e.trim().split(/^|\s+/)}function hl(e){return e.classList||new Vu(e)}function Vu(e){this._node=e,this._names=Xu(e.getAttribute("class")||"")}Vu.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 Zu(e,t){for(var r=hl(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Ku(e,t){for(var r=hl(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function eb(e){return function(){Zu(this,e)}}function rb(e){return function(){Ku(this,e)}}function ib(e,t){return function(){(t.apply(this,arguments)?Zu:Ku)(this,e)}}function sb(e,t){var r=Xu(e+"");if(arguments.length<2){for(var i=hl(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?ib:t?eb:rb)(r,t))}function ab(){this.textContent=""}function ob(e){return function(){this.textContent=e}}function nb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function lb(e){return arguments.length?this.each(e==null?ab:(typeof e=="function"?nb:ob)(e)):this.node().textContent}function hb(){this.innerHTML=""}function cb(e){return function(){this.innerHTML=e}}function ub(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function db(e){return arguments.length?this.each(e==null?hb:(typeof e=="function"?ub:cb)(e)):this.node().innerHTML}function fb(){this.nextSibling&&this.parentNode.appendChild(this)}function pb(){return this.each(fb)}function gb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mb(){return this.each(gb)}function yb(e){var t=typeof e=="function"?e:Wu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Cb(){return null}function xb(e,t){var r=typeof e=="function"?e:Wu(e),i=t==null?Cb:typeof t=="function"?t:ll(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function bb(){var e=this.parentNode;e&&e.removeChild(this)}function kb(){return this.each(bb)}function Tb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sb(e){return this.select(e?wb:Tb)}function _b(e){return arguments.length?this.property("__data__",e):this.node().__data__}function vb(e){return function(t){e.call(this,t,this.__data__)}}function Bb(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 Lb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++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 Fb(e,t,r){return function(){var i=this.__on,s,a=vb(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Ab(e,t,r){var i=Bb(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?Fb:Lb,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Qu(e,t,r){var i=Gu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Eb(e,t){return function(){return Qu(this,e,t)}}function Mb(e,t){return function(){return Qu(this,e,t.apply(this,arguments))}}function $b(e,t){return this.each((typeof t=="function"?Mb:Eb)(e,t))}function*Ob(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var Ju=[null];function de(e,t){this._groups=e,this._parents=t}function Ts(){return new de([[document.documentElement]],Ju)}function Ib(){return this}de.prototype=Ts.prototype={constructor:de,select:nx,selectAll:ux,selectChild:gx,selectChildren:xx,filter:bx,data:vx,enter:kx,exit:Lx,join:Fx,merge:Ax,selection:Ib,order:Ex,sort:Mx,call:Ox,nodes:Ix,node:Dx,size:Px,empty:Rx,each:Nx,attr:jx,style:Zx,property:tb,classed:sb,text:lb,html:db,raise:pb,lower:mb,append:yb,insert:xb,remove:kb,clone:Sb,datum:_b,on:Ab,dispatch:$b,[Symbol.iterator]:Ob};function ut(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],Ju)}function cl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function td(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ws(){}var hs=.7,Ca=1/hs,ai="\\s*([+-]?\\d+)\\s*",cs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Db=/^#([0-9a-f]{3,8})$/,Pb=new RegExp(`^rgb\\(${ai},${ai},${ai}\\)$`),Rb=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Nb=new RegExp(`^rgba\\(${ai},${ai},${ai},${cs}\\)$`),qb=new RegExp(`^rgba\\(${De},${De},${De},${cs}\\)$`),zb=new RegExp(`^hsl\\(${cs},${De},${De}\\)$`),Wb=new RegExp(`^hsla\\(${cs},${De},${De},${cs}\\)$`),Jh={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};cl(ws,us,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tc,formatHex:tc,formatHex8:Hb,formatHsl:Yb,formatRgb:ec,toString:ec});function tc(){return this.rgb().formatHex()}function Hb(){return this.rgb().formatHex8()}function Yb(){return ed(this).formatHsl()}function ec(){return this.rgb().formatRgb()}function us(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Db.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rc(t):r===3?new le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qs(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=Pb.exec(e))?new le(t[1],t[2],t[3],1):(t=Rb.exec(e))?new le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Nb.exec(e))?qs(t[1],t[2],t[3],t[4]):(t=qb.exec(e))?qs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zb.exec(e))?ac(t[1],t[2]/100,t[3]/100,1):(t=Wb.exec(e))?ac(t[1],t[2]/100,t[3]/100,t[4]):Jh.hasOwnProperty(e)?rc(Jh[e]):e==="transparent"?new le(NaN,NaN,NaN,0):null}function rc(e){return new le(e>>16&255,e>>8&255,e&255,1)}function qs(e,t,r,i){return i<=0&&(e=t=r=NaN),new le(e,t,r,i)}function Ub(e){return e instanceof ws||(e=us(e)),e?(e=e.rgb(),new le(e.r,e.g,e.b,e.opacity)):new le}function cn(e,t,r,i){return arguments.length===1?Ub(e):new le(e,t,r,i??1)}function le(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}cl(le,cn,td(ws,{brighter(e){return e=e==null?Ca:Math.pow(Ca,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hs:Math.pow(hs,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new le(Er(this.r),Er(this.g),Er(this.b),xa(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:ic,formatHex:ic,formatHex8:jb,formatRgb:sc,toString:sc}));function ic(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function jb(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function sc(){const e=xa(this.opacity);return`${e===1?"rgb(":"rgba("}${Er(this.r)}, ${Er(this.g)}, ${Er(this.b)}${e===1?")":`, ${e})`}`}function xa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Er(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Er(e),(e<16?"0":"")+e.toString(16)}function ac(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new we(e,t,r,i)}function ed(e){if(e instanceof we)return new we(e.h,e.s,e.l,e.opacity);if(e instanceof ws||(e=us(e)),!e)return new we;if(e instanceof we)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new we(o,n,l,e.opacity)}function Gb(e,t,r,i){return arguments.length===1?ed(e):new we(e,t,r,i??1)}function we(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}cl(we,Gb,td(ws,{brighter(e){return e=e==null?Ca:Math.pow(Ca,e),new we(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hs:Math.pow(hs,e),new we(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,s=2*r-i;return new le(No(e>=240?e-240:e+120,s,i),No(e,s,i),No(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new we(oc(this.h),zs(this.s),zs(this.l),xa(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=xa(this.opacity);return`${e===1?"hsl(":"hsla("}${oc(this.h)}, ${zs(this.s)*100}%, ${zs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oc(e){return e=(e||0)%360,e<0?e+360:e}function zs(e){return Math.max(0,Math.min(1,e||0))}function No(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 ul=e=>()=>e;function rd(e,t){return function(r){return e+r*t}}function Xb(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 UL(e,t){var r=t-e;return r?rd(e,r>180||r<-180?r-360*Math.round(r/360):r):ul(isNaN(e)?t:e)}function Vb(e){return(e=+e)==1?id:function(t,r){return r-t?Xb(t,r,e):ul(isNaN(t)?r:t)}}function id(e,t){var r=t-e;return r?rd(e,r):ul(isNaN(e)?t:e)}const nc=(function e(t){var r=Vb(t);function i(s,a){var o=r((s=cn(s)).r,(a=cn(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),h=id(s.opacity,a.opacity);return function(c){return s.r=o(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i})(1);function lr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var un=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qo=new RegExp(un.source,"g");function Zb(e){return function(){return e}}function Kb(e){return function(t){return e(t)+""}}function Qb(e,t){var r=un.lastIndex=qo.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=un.exec(e))&&(s=qo.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:lr(i,s)})),r=qo.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?Kb(l[0].x):Zb(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var lc=180/Math.PI,dn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function sd(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*lc,skewX:Math.atan(l)*lc,scaleX:o,scaleY:n}}var Ws;function Jb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?dn:sd(t.a,t.b,t.c,t.d,t.e,t.f)}function t1(e){return e==null||(Ws||(Ws=document.createElementNS("http://www.w3.org/2000/svg","g")),Ws.setAttribute("transform",e),!(e=Ws.transform.baseVal.consolidate()))?dn:(e=e.matrix,sd(e.a,e.b,e.c,e.d,e.e,e.f))}function ad(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,u,f,d,m){if(h!==u||c!==f){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:lr(h,u)},{i:g-2,x:lr(c,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(h,c,u,f){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:lr(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,f){h!==c?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:lr(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,f,d,m){if(h!==u||c!==f){var g=d.push(s(d)+"scale(",null,",",null,")");m.push({i:g-4,x:lr(h,u)},{i:g-2,x:lr(c,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(h,c){var u=[],f=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,u,f),o(h.rotate,c.rotate,u,f),n(h.skewX,c.skewX,u,f),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,f),h=c=null,function(d){for(var m=-1,g=f.length,y;++m<g;)u[(y=f[m]).i]=y.x(d);return u.join("")}}}var e1=ad(Jb,"px, ","px)","deg)"),r1=ad(t1,", ",")",")"),Si=0,Vi=0,zi=0,od=1e3,ba,Zi,ka=0,Ir=0,ja=0,ds=typeof performance=="object"&&performance.now?performance:Date,nd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function dl(){return Ir||(nd(i1),Ir=ds.now()+ja)}function i1(){Ir=0}function Ta(){this._call=this._time=this._next=null}Ta.prototype=ld.prototype={constructor:Ta,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?dl():+r)+(t==null?0:+t),!this._next&&Zi!==this&&(Zi?Zi._next=this:ba=this,Zi=this),this._call=e,this._time=r,fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,fn())}};function ld(e,t,r){var i=new Ta;return i.restart(e,t,r),i}function s1(){dl(),++Si;for(var e=ba,t;e;)(t=Ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Si}function hc(){Ir=(ka=ds.now())+ja,Si=Vi=0;try{s1()}finally{Si=0,o1(),Ir=0}}function a1(){var e=ds.now(),t=e-ka;t>od&&(ja-=t,ka=e)}function o1(){for(var e,t=ba,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:ba=r);Zi=e,fn(i)}function fn(e){if(!Si){Vi&&(Vi=clearTimeout(Vi));var t=e-Ir;t>24?(e<1/0&&(Vi=setTimeout(hc,e-ds.now()-ja)),zi&&(zi=clearInterval(zi))):(zi||(ka=ds.now(),zi=setInterval(a1,od)),Si=1,nd(hc))}}function cc(e,t,r){var i=new Ta;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var n1=zu("start","end","cancel","interrupt"),l1=[],hd=0,uc=1,pn=2,ra=3,dc=4,gn=5,ia=6;function Ga(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;h1(e,r,{name:t,index:i,group:s,on:n1,tween:l1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:hd})}function fl(e,t){var r=Fe(e,t);if(r.state>hd)throw new Error("too late; already scheduled");return r}function ze(e,t){var r=Fe(e,t);if(r.state>ra)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 h1(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=ld(a,0,r.time);function a(h){r.state=uc,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,f,d;if(r.state!==uc)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===ra)return cc(o);d.state===dc?(d.state=ia,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=ia,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(cc(function(){r.state===ra&&(r.state=dc,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=pn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===pn){for(r.state=ra,s=new Array(f=r.tween.length),c=0,u=-1;c<f;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=gn,1),u=-1,f=s.length;++u<f;)s[u].call(e,c);r.state===gn&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ia,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function c1(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>pn&&i.state<gn,i.state=ia,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function u1(e){return this.each(function(){c1(this,e)})}function d1(e,t){var r,i;return function(){var s=ze(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function f1(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=ze(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function p1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Fe(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?d1:f1)(r,e,t))}function pl(e,t,r){var i=e._id;return e.each(function(){var s=ze(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Fe(s,i).value[t]}}function cd(e,t){var r;return(typeof t=="number"?lr:t instanceof us?nc:(r=us(t))?(t=r,nc):Qb)(e,t)}function g1(e){return function(){this.removeAttribute(e)}}function m1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function y1(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function C1(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function x1(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function b1(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function k1(e,t){var r=Ua(e),i=r==="transform"?r1:cd;return this.attrTween(e,typeof t=="function"?(r.local?b1:x1)(r,i,pl(this,"attr."+e,t)):t==null?(r.local?m1:g1)(r):(r.local?C1:y1)(r,i,t))}function T1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function w1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function S1(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&w1(e,a)),r}return s._value=t,s}function _1(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&T1(e,a)),r}return s._value=t,s}function v1(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=Ua(e);return this.tween(r,(i.local?S1:_1)(i,t))}function B1(e,t){return function(){fl(this,e).delay=+t.apply(this,arguments)}}function L1(e,t){return t=+t,function(){fl(this,e).delay=t}}function F1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?B1:L1)(t,e)):Fe(this.node(),t).delay}function A1(e,t){return function(){ze(this,e).duration=+t.apply(this,arguments)}}function E1(e,t){return t=+t,function(){ze(this,e).duration=t}}function M1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?A1:E1)(t,e)):Fe(this.node(),t).duration}function $1(e,t){if(typeof t!="function")throw new Error;return function(){ze(this,e).ease=t}}function O1(e){var t=this._id;return arguments.length?this.each($1(t,e)):Fe(this.node(),t).ease}function I1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ze(this,e).ease=r}}function D1(e){if(typeof e!="function")throw new Error;return this.each(I1(this._id,e))}function P1(e){typeof e!="function"&&(e=Yu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Qe(i,this._parents,this._name,this._id)}function R1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),f,d=0;d<c;++d)(f=l[d]||h[d])&&(u[d]=f);for(;n<i;++n)o[n]=t[n];return new Qe(o,this._parents,this._name,this._id)}function N1(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 q1(e,t,r){var i,s,a=N1(t)?fl:ze;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function z1(e,t){var r=this._id;return arguments.length<2?Fe(this.node(),r).on.on(e):this.each(q1(r,e,t))}function W1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function H1(){return this.on("end.remove",W1(this._id))}function Y1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ll(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,u,f=0;f<l;++f)(c=n[f])&&(u=e.call(c,c.__data__,f,n))&&("__data__"in c&&(u.__data__=c.__data__),h[f]=u,Ga(h[f],t,r,f,h,Fe(c,r)));return new Qe(a,this._parents,t,r)}function U1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Hu(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var f=e.call(c,c.__data__,u,l),d,m=Fe(c,r),g=0,y=f.length;g<y;++g)(d=f[g])&&Ga(d,t,r,g,f,m);a.push(f),o.push(c)}return new Qe(a,o,t,r)}var j1=Ts.prototype.constructor;function G1(){return new j1(this._groups,this._parents)}function X1(e,t){var r,i,s;return function(){var a=wi(this,e),o=(this.style.removeProperty(e),wi(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function ud(e){return function(){this.style.removeProperty(e)}}function V1(e,t,r){var i,s=r+"",a;return function(){var o=wi(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Z1(e,t,r){var i,s,a;return function(){var o=wi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),wi(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function K1(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=ze(this,e),h=l.on,c=l.value[a]==null?n||(n=ud(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function Q1(e,t,r){var i=(e+="")=="transform"?e1:cd;return t==null?this.styleTween(e,X1(e,i)).on("end.style."+e,ud(e)):typeof t=="function"?this.styleTween(e,Z1(e,i,pl(this,"style."+e,t))).each(K1(this._id,e)):this.styleTween(e,V1(e,i,t),r).on("end.style."+e,null)}function J1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function tk(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&J1(e,o,r)),i}return a._value=t,a}function ek(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,tk(e,t,r??""))}function rk(e){return function(){this.textContent=e}}function ik(e){return function(){var t=e(this);this.textContent=t??""}}function sk(e){return this.tween("text",typeof e=="function"?ik(pl(this,"text",e)):rk(e==null?"":e+""))}function ak(e){return function(t){this.textContent=e.call(this,t)}}function ok(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&ak(s)),t}return i._value=e,i}function nk(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,ok(e))}function lk(){for(var e=this._name,t=this._id,r=dd(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=Fe(l,t);Ga(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Qe(i,this._parents,e,r)}function hk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=ze(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var ck=0;function Qe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function dd(){return++ck}var Ge=Ts.prototype;Qe.prototype={constructor:Qe,select:Y1,selectAll:U1,selectChild:Ge.selectChild,selectChildren:Ge.selectChildren,filter:P1,merge:R1,selection:G1,transition:lk,call:Ge.call,nodes:Ge.nodes,node:Ge.node,size:Ge.size,empty:Ge.empty,each:Ge.each,on:z1,attr:k1,attrTween:v1,style:Q1,styleTween:ek,text:sk,textTween:nk,remove:H1,tween:p1,delay:F1,duration:M1,ease:O1,easeVarying:D1,end:hk,[Symbol.iterator]:Ge[Symbol.iterator]};function uk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var dk={time:null,delay:0,duration:250,ease:uk};function fk(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 pk(e){var t,r;e instanceof Qe?(t=e._id,e=e._name):(t=dd(),(r=dk).time=dl(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&Ga(l,e,t,h,o,r||fk(l,t));return new Qe(i,this._parents,e,t)}Ts.prototype.interrupt=u1;Ts.prototype.transition=pk;const mn=Math.PI,yn=2*mn,_r=1e-6,gk=yn-_r;function fd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function mk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fd;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class yk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?fd:mk(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,h=s-r,c=o-t,u=n-r,f=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>_r)if(!(Math.abs(u*l-h*c)>_r)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(f),T=a*Math.tan((mn-Math.acos((g+f-y)/(2*C*b)))/2),S=T/b,w=T/C;Math.abs(S-1)>_r&&this._append`L${t+S*c},${r+S*u}`,this._append`A${a},${a},0,0,${+(u*d>c*m)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^o,f=o?s-a:a-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>_r||Math.abs(this._y1-c)>_r)&&this._append`L${h},${c}`,i&&(f<0&&(f=f%yn+yn),f>gk?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:f>_r&&this._append`A${i},${i},0,${+(f>=mn)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Xr(e){return function(){return e}}const jL=Math.abs,GL=Math.atan2,XL=Math.cos,VL=Math.max,ZL=Math.min,KL=Math.sin,QL=Math.sqrt,fc=1e-12,gl=Math.PI,pc=gl/2,JL=2*gl;function tF(e){return e>1?0:e<-1?gl:Math.acos(e)}function eF(e){return e>=1?pc:e<=-1?-pc:Math.asin(e)}function Ck(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 yk(t)}function xk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pd(e){this._context=e}pd.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 as(e){return new pd(e)}function bk(e){return e[0]}function kk(e){return e[1]}function Tk(e,t){var r=Xr(!0),i=null,s=as,a=null,o=Ck(n);e=typeof e=="function"?e:e===void 0?bk:Xr(e),t=typeof t=="function"?t:t===void 0?kk:Xr(t);function n(l){var h,c=(l=xk(l)).length,u,f=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,h,l),+t(u,h,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Xr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Xr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Xr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class gd{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 md(e){return new gd(e,!0)}function yd(e){return new gd(e,!1)}function fr(){}function wa(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 Xa(e){this._context=e}Xa.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:wa(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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cn(e){return new Xa(e)}function Cd(e){this._context=e}Cd.prototype={areaStart:fr,areaEnd:fr,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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wk(e){return new Cd(e)}function xd(e){this._context=e}xd.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:wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sk(e){return new xd(e)}function bd(e,t){this._basis=new Xa(e),this._beta=t}bd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const _k=(function e(t){function r(i){return t===1?new Xa(i):new bd(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Sa(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 ml(e,t){this._context=e,this._k=(1-t)/6}ml.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:Sa(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:Sa(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 kd=(function e(t){function r(i){return new ml(i,t)}return r.tension=function(i){return e(+i)},r})(0);function yl(e,t){this._context=e,this._k=(1-t)/6}yl.prototype={areaStart:fr,areaEnd:fr,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:Sa(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 vk=(function e(t){function r(i){return new yl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Cl(e,t){this._context=e,this._k=(1-t)/6}Cl.prototype={areaStart: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:Sa(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 Bk=(function e(t){function r(i){return new Cl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xl(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>fc){var n=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*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>fc){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Td(e,t){this._context=e,this._alpha=t}Td.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:xl(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 Td(i,t):new ml(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Sd(e,t){this._context=e,this._alpha=t}Sd.prototype={areaStart:fr,areaEnd:fr,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:xl(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 Lk=(function e(t){function r(i){return t?new Sd(i,t):new yl(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:xl(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 Fk=(function e(t){function r(i){return t?new _d(i,t):new Cl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function vd(e){this._context=e}vd.prototype={areaStart:fr,areaEnd:fr,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 Ak(e){return new vd(e)}function gc(e){return e<0?-1:1}function mc(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(gc(a)+gc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function yc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function _a(e){this._context=e}_a.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:zo(this,this._t0,yc(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,zo(this,yc(this,r=mc(this,e,t)),r);break;default:zo(this,this._t0,r=mc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Bd(e){this._context=new Ld(e)}(Bd.prototype=Object.create(_a.prototype)).point=function(e,t){_a.prototype.point.call(this,t,e)};function Ld(e){this._context=e}Ld.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,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Fd(e){return new _a(e)}function Ad(e){return new Bd(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=Cc(e),s=Cc(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[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 Cc(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function Md(e){return new Ed(e)}function Va(e,t){this._context=e,this._t=t}Va.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function $d(e){return new Va(e,.5)}function Od(e){return new Va(e,0)}function Id(e){return new Va(e,1)}function Ki(e,t,r){this.k=e,this.x=t,this.y=r}Ki.prototype={constructor:Ki,scale:function(e){return e===1?this:new Ki(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ki(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+")"}};Ki.prototype;var Ek=p(e=>{var s;const{securityLevel:t}=bt();let r=ut("body");if(t==="sandbox"){const o=((s=ut(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ut(o.body)}return r.select(`#${e}`)},"selectSvgElement");function bl(e){return typeof e>"u"||e===null}p(bl,"isNothing");function Dd(e){return typeof e=="object"&&e!==null}p(Dd,"isObject");function Pd(e){return Array.isArray(e)?e:bl(e)?[]:[e]}p(Pd,"toArray");function Rd(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}p(Rd,"extend");function Nd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Nd,"repeat");function qd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(qd,"isNegativeZero");var Mk=bl,$k=Dd,Ok=Pd,Ik=Nd,Dk=qd,Pk=Rd,Nt={isNothing:Mk,isObject:$k,toArray:Ok,repeat:Ik,isNegativeZero:Dk,extend:Pk};function kl(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+=`
|
|
126
|
+
|
|
127
|
+
`+e.mark.snippet),i+" "+r):i}p(kl,"formatError");function _i(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=kl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(_i,"YAMLException$1");_i.prototype=Object.create(Error.prototype);_i.prototype.constructor=_i;_i.prototype.toString=p(function(t){return this.name+": "+kl(this,t)},"toString");var ne=_i;function sa(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(sa,"getLine");function aa(e,t){return Nt.repeat(" ",t-e.length)+e}p(aa,"padStart");function zd(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.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 n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=sa(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),u),n=Nt.repeat(" ",t.indent)+aa((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
128
|
+
`+n;for(h=sa(e.buffer,i[o],s[o],e.position,u),n+=Nt.repeat(" ",t.indent)+aa((e.line+1).toString(),c)+" | "+h.str+`
|
|
129
|
+
`,n+=Nt.repeat("-",t.indent+c+3+h.pos)+`^
|
|
130
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=sa(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),u),n+=Nt.repeat(" ",t.indent)+aa((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
131
|
+
`;return n.replace(/\n$/,"")}p(zd,"makeSnippet");var Rk=zd,Nk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],qk=["scalar","sequence","mapping"];function Wd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Wd,"compileStyleAliases");function Hd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Nk.indexOf(r)===-1)throw new ne('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=Wd(t.styleAliases||null),qk.indexOf(this.kind)===-1)throw new ne('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Hd,"Type$1");var Vt=Hd;function xn(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}p(xn,"compileList");function Yd(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Yd,"compileMap");function va(e){return this.extend(e)}p(va,"Schema$1");va.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Vt)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 ne("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Vt))throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new ne("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 ne("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 Vt))throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(va.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=xn(s,"implicit"),s.compiledExplicit=xn(s,"explicit"),s.compiledTypeMap=Yd(s.compiledImplicit,s.compiledExplicit),s},"extend");var zk=va,Wk=new Vt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Hk=new Vt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),Yk=new Vt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Uk=new zk({explicit:[Wk,Hk,Yk]});function Ud(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Ud,"resolveYamlNull");function jd(){return null}p(jd,"constructYamlNull");function Gd(e){return e===null}p(Gd,"isNull");var jk=new Vt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ud,construct:jd,predicate:Gd,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Xd(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(Xd,"resolveYamlBoolean");function Vd(e){return e==="true"||e==="True"||e==="TRUE"}p(Vd,"constructYamlBoolean");function Zd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Zd,"isBoolean");var Gk=new Vt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xd,construct:Vd,predicate:Zd,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Kd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Kd,"isHexCode");function Qd(e){return 48<=e&&e<=55}p(Qd,"isOctCode");function Jd(e){return 48<=e&&e<=57}p(Jd,"isDecCode");function tf(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Kd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Qd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Jd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(tf,"resolveYamlInteger");function ef(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(ef,"constructYamlInteger");function rf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Nt.isNegativeZero(e)}p(rf,"isInteger");var Xk=new Vt("tag:yaml.org,2002:int",{kind:"scalar",resolve:tf,construct:ef,predicate:rf,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Vk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function sf(e){return!(e===null||!Vk.test(e)||e[e.length-1]==="_")}p(sf,"resolveYamlFloat");function af(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(af,"constructYamlFloat");var Zk=/^[-+]?[0-9]+e/;function of(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(Nt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Zk.test(r)?r.replace("e",".e"):r}p(of,"representYamlFloat");function nf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Nt.isNegativeZero(e))}p(nf,"isFloat");var Kk=new Vt("tag:yaml.org,2002:float",{kind:"scalar",resolve:sf,construct:af,predicate:nf,represent:of,defaultStyle:"lowercase"}),lf=Uk.extend({implicit:[jk,Gk,Xk,Kk]}),Qk=lf,hf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function uf(e){return e===null?!1:hf.exec(e)!==null||cf.exec(e)!==null}p(uf,"resolveYamlTimestamp");function df(e){var t,r,i,s,a,o,n,l=0,h=null,c,u,f;if(t=hf.exec(e),t===null&&(t=cf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),f=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&f.setTime(f.getTime()-h),f}p(df,"constructYamlTimestamp");function ff(e){return e.toISOString()}p(ff,"representYamlTimestamp");var Jk=new Vt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:uf,construct:df,instanceOf:Date,represent:ff});function pf(e){return e==="<<"||e===null}p(pf,"resolveYamlMerge");var t2=new Vt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:pf}),Tl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
132
|
+
\r`;function gf(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Tl;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(gf,"resolveYamlBinary");function mf(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Tl,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}p(mf,"constructYamlBinary");function yf(e){var t="",r=0,i,s,a=e.length,o=Tl;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 s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(yf,"representYamlBinary");function Cf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Cf,"isBinary");var e2=new Vt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gf,construct:mf,predicate:Cf,represent:yf}),r2=Object.prototype.hasOwnProperty,i2=Object.prototype.toString;function xf(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,i2.call(s)!=="[object Object]")return!1;for(a in s)if(r2.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(xf,"resolveYamlOmap");function bf(e){return e!==null?e:[]}p(bf,"constructYamlOmap");var s2=new Vt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xf,construct:bf}),a2=Object.prototype.toString;function kf(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],a2.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}p(kf,"resolveYamlPairs");function Tf(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}p(Tf,"constructYamlPairs");var o2=new Vt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:kf,construct:Tf}),n2=Object.prototype.hasOwnProperty;function wf(e){if(e===null)return!0;var t,r=e;for(t in r)if(n2.call(r,t)&&r[t]!==null)return!1;return!0}p(wf,"resolveYamlSet");function Sf(e){return e!==null?e:{}}p(Sf,"constructYamlSet");var l2=new Vt("tag:yaml.org,2002:set",{kind:"mapping",resolve:wf,construct:Sf}),_f=Qk.extend({implicit:[Jk,t2],explicit:[e2,s2,o2,l2]}),pr=Object.prototype.hasOwnProperty,Ba=1,vf=2,Bf=3,La=4,Wo=1,h2=2,xc=3,c2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u2=/[\x85\u2028\u2029]/,d2=/[,\[\]\{\}]/,Lf=/^(?:!|!!|![a-z\-]+!)$/i,Ff=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function bn(e){return Object.prototype.toString.call(e)}p(bn,"_class");function _e(e){return e===10||e===13}p(_e,"is_EOL");function dr(e){return e===9||e===32}p(dr,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function Fr(e){return e===44||e===91||e===93||e===123||e===125}p(Fr,"is_FLOW_INDICATOR");function Af(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Af,"fromHexCode");function Ef(e){return e===120?2:e===117?4:e===85?8:0}p(Ef,"escapedHexLen");function Mf(e){return 48<=e&&e<=57?e-48:-1}p(Mf,"fromDecimalCode");function kn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
133
|
+
`: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(kn,"simpleEscapeSequence");function $f(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p($f,"charFromCodepoint");function wl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(wl,"setProperty");var Of=new Array(256),If=new Array(256);for(Tr=0;Tr<256;Tr++)Of[Tr]=kn(Tr)?1:0,If[Tr]=kn(Tr);var Tr;function Df(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||_f,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(Df,"State$1");function Sl(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=Rk(r),new ne(t,r)}p(Sl,"generateError");function tt(e,t){throw Sl(e,t)}p(tt,"throwError");function fs(e,t){e.onWarning&&e.onWarning.call(null,Sl(e,t))}p(fs,"throwWarning");var bc={YAML:p(function(t,r,i){var s,a,o;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&fs(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Lf.test(s)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),pr.call(t.tagMap,s)&&tt(t,'there is a previously declared suffix for "'+s+'" tag handle'),Ff.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[s]=a},"handleTagDirective")};function Ke(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||tt(e,"expected valid JSON character");else c2.test(n)&&tt(e,"the stream contains non-printable characters");e.result+=n}}p(Ke,"captureSegment");function Tn(e,t,r,i){var s,a,o,n;for(Nt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],pr.call(t,a)||(wl(t,a,r[a]),i[a]=!0)}p(Tn,"mergeMappings");function Ar(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&tt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&bn(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&bn(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Tn(e,t,a[h],r);else Tn(e,t,a,r);else!e.json&&!pr.call(r,s)&&pr.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),wl(t,s,a),delete r[s];return t}p(Ar,"storeMappingPair");function Za(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(Za,"readLineBreak");function $t(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;dr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(_e(s))for(Za(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&fs(e,"deficient indentation"),i}p($t,"skipSeparationSpace");function Ss(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||Jt(r)))}p(Ss,"testDocumentSeparator");function Ka(e,t){t===1?e.result+=" ":t>1&&(e.result+=Nt.repeat(`
|
|
134
|
+
`,t-1))}p(Ka,"writeFoldedLines");function Pf(e,t,r){var i,s,a,o,n,l,h,c,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Jt(d)||Fr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&Fr(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&Fr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&Ss(e)||r&&Fr(d))break;if(_e(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,$t(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(Ke(e,a,o,!1),Ka(e,e.line-l),a=o=e.position,n=!1),dr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Ke(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(Pf,"readPlainScalar");function Rf(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ke(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else _e(r)?(Ke(e,i,s,!0),Ka(e,$t(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ss(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(Rf,"readSingleQuotedScalar");function Nf(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ke(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ke(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),_e(n))$t(e,!1,t);else if(n<256&&Of[n])e.result+=If[n],e.position++;else if((o=Ef(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=Af(n))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=$f(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else _e(n)?(Ke(e,r,i,!0),Ka(e,$t(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ss(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Nf,"readDoubleQuotedScalar");function qf(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,u,f,d,m=Object.create(null),g,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if($t(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=g=C=null,u=f=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Jt(h)&&(u=f=!0,e.position++,$t(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Dr(e,t,Ba,!1,!0),y=e.tag,g=e.result,$t(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),$t(e,!0,t),Dr(e,t,Ba,!1,!0),C=e.result),d?Ar(e,n,m,y,g,C,i,s,a):u?n.push(Ar(e,null,m,y,g,C,i,s,a)):n.push(g),$t(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(qf,"readFlowCollection");function zf(e,t){var r,i,s=Wo,a=!1,o=!1,n=t,l=0,h=!1,c,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)Wo===s?s=u===43?xc:h2:tt(e,"repeat of a chomping mode identifier");else if((c=Mf(u))>=0)c===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"):(n=t+c-1,o=!0);else break;if(dr(u)){do u=e.input.charCodeAt(++e.position);while(dr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!_e(u)&&u!==0)}for(;u!==0;){for(Za(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),_e(u)){l++;continue}if(e.lineIndent<n){s===xc?e.result+=Nt.repeat(`
|
|
135
|
+
`,a?1+l:l):s===Wo&&a&&(e.result+=`
|
|
136
|
+
`);break}for(i?dr(u)?(h=!0,e.result+=Nt.repeat(`
|
|
137
|
+
`,a?1+l:l)):h?(h=!1,e.result+=Nt.repeat(`
|
|
138
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=Nt.repeat(`
|
|
139
|
+
`,l):e.result+=Nt.repeat(`
|
|
140
|
+
`,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!_e(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ke(e,r,e.position,!1)}return!0}p(zf,"readBlockScalar");function wn(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!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),!Jt(o))));){if(n=!0,e.position++,$t(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Dr(e,t,Bf,!1,!0),a.push(e.result),$t(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 n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}p(wn,"readBlockSequence");function Wf(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,u={},f=Object.create(null),d=null,m=null,g=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(Ar(e,u,f,d,m,null,o,n,l),d=m=g=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!Dr(e,r,vf,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);dr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ar(e,u,f,d,m,null,o,n,l),d=m=g=null),C=!0,y=!1,s=!1,d=e.tag,m=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,l=e.position),Dr(e,t,La,!0,s)&&(y?m=e.result:g=e.result),y||(Ar(e,u,f,d,m,g,o,n,l),d=m=g=null),$t(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ar(e,u,f,d,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}p(Wf,"readBlockMapping");function Hf(e){var t,r=!1,i=!1,s,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,s="!!",o=e.input.charCodeAt(++e.position)):s="!",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&&!Jt(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Lf.test(s)||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),d2.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!Ff.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:pr.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+s+'"'),!0}p(Hf,"readTagProperty");function Yf(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&&!Jt(r)&&!Fr(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(Yf,"readAnchorProperty");function Uf(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!Fr(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),pr.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],$t(e,!0,-1),!0}p(Uf,"readAlias");function Dr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,u,f,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=La===r||Bf===r,i&&$t(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Hf(e)||Yf(e);)$t(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||La===r)&&(Ba===r||vf===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?n&&(wn(e,y)||Wf(e,y,g))||qf(e,g)?c=!0:(o&&zf(e,g)||Rf(e,g)||Nf(e,g)?c=!0:Uf(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Pf(e,g,Ba===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&wn(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(pr.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){m=d[u];break}m||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.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||c}p(Dr,"composeNode");function jf(e){var t=e.position,r,i,s,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&&($t(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&&!Jt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&tt(e,"directive name must not be less than one character in length");o!==0;){for(;dr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!_e(o));break}if(_e(o))break;for(r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Za(e),pr.call(bc,i)?bc[i](e,i,s):fs(e,'unknown document directive "'+i+'"')}if($t(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,$t(e,!0,-1)):a&&tt(e,"directives end mark is expected"),Dr(e,e.lineIndent-1,La,!1,!0),$t(e,!0,-1),e.checkLineBreaks&&u2.test(e.input.slice(t,e.position))&&fs(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ss(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,$t(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 _l(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
141
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Df(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(_l,"loadDocuments");function f2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=_l(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}p(f2,"loadAll$1");function Gf(e,t){var r=_l(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ne("expected a single document in the stream, but found more")}}p(Gf,"load$1");var p2=Gf,g2={load:p2},Xf=Object.prototype.toString,Vf=Object.prototype.hasOwnProperty,vl=65279,m2=9,ps=10,y2=13,C2=32,x2=33,b2=34,Sn=35,k2=37,T2=38,w2=39,S2=42,Zf=44,_2=45,Fa=58,v2=61,B2=62,L2=63,F2=64,Kf=91,Qf=93,A2=96,Jf=123,E2=124,tp=125,Zt={};Zt[0]="\\0";Zt[7]="\\a";Zt[8]="\\b";Zt[9]="\\t";Zt[10]="\\n";Zt[11]="\\v";Zt[12]="\\f";Zt[13]="\\r";Zt[27]="\\e";Zt[34]='\\"';Zt[92]="\\\\";Zt[133]="\\N";Zt[160]="\\_";Zt[8232]="\\L";Zt[8233]="\\P";var M2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ep(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Vf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}p(ep,"compileStyleMap");function rp(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ne("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Nt.repeat("0",i-t.length)+t}p(rp,"encodeHex");var O2=1,gs=2;function ip(e){this.schema=e.schema||_f,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Nt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ep(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?gs:O2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(ip,"State");function _n(e,t){for(var r=Nt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
|
|
142
|
+
`,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
|
|
143
|
+
`&&(a+=r),a+=o;return a}p(_n,"indentString");function Aa(e,t){return`
|
|
144
|
+
`+Nt.repeat(" ",e.indent*t)}p(Aa,"generateNextLine");function sp(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(sp,"testImplicitResolving");function ms(e){return e===C2||e===m2}p(ms,"isWhitespace");function vi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==vl||65536<=e&&e<=1114111}p(vi,"isPrintable");function vn(e){return vi(e)&&e!==vl&&e!==y2&&e!==ps}p(vn,"isNsCharOrWhitespace");function Bn(e,t,r){var i=vn(e),s=i&&!ms(e);return(r?i:i&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf&&e!==tp)&&e!==Sn&&!(t===Fa&&!s)||vn(t)&&!ms(t)&&e===Sn||t===Fa&&s}p(Bn,"isPlainSafe");function ap(e){return vi(e)&&e!==vl&&!ms(e)&&e!==_2&&e!==L2&&e!==Fa&&e!==Zf&&e!==Kf&&e!==Qf&&e!==Jf&&e!==tp&&e!==Sn&&e!==T2&&e!==S2&&e!==x2&&e!==E2&&e!==v2&&e!==B2&&e!==w2&&e!==b2&&e!==k2&&e!==F2&&e!==A2}p(ap,"isPlainSafeFirst");function op(e){return!ms(e)&&e!==Fa}p(op,"isPlainSafeLast");function ei(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(ei,"codePointAt");function Bl(e){var t=/^\n* /;return t.test(e)}p(Bl,"needIndentIndicator");var np=1,Ln=2,lp=3,hp=4,Qr=5;function cp(e,t,r,i,s,a,o,n){var l,h=0,c=null,u=!1,f=!1,d=i!==-1,m=-1,g=ap(ei(e,0))&&op(ei(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=ei(e,l),!vi(h))return Qr;g=g&&Bn(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=ei(e,l),h===ps)u=!0,d&&(f=f||l-m-1>i&&e[m+1]!==" ",m=l);else if(!vi(h))return Qr;g=g&&Bn(h,c,n),c=h}f=f||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!f?g&&!o&&!s(e)?np:a===gs?Qr:Ln:r>9&&Bl(e)?Qr:o?a===gs?Qr:Ln:f?hp:lp}p(cp,"chooseScalarStyle");function up(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===gs?'""':"''";if(!e.noCompatMode&&(M2.indexOf(t)!==-1||$2.test(t)))return e.quotingType===gs?'"'+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),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return sp(e,h)}switch(p(l,"testAmbiguity"),cp(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case np:return t;case Ln:return"'"+t.replace(/'/g,"''")+"'";case lp:return"|"+Fn(t,e.indent)+An(_n(t,a));case hp:return">"+Fn(t,e.indent)+An(_n(dp(t,o),a));case Qr:return'"'+fp(t)+'"';default:throw new ne("impossible error: invalid scalar style")}})()}p(up,"writeScalar");function Fn(e,t){var r=Bl(e)?String(t):"",i=e[e.length-1]===`
|
|
145
|
+
`,s=i&&(e[e.length-2]===`
|
|
146
|
+
`||e===`
|
|
147
|
+
`),a=s?"+":i?"":"-";return r+a+`
|
|
148
|
+
`}p(Fn,"blockHeader");function An(e){return e[e.length-1]===`
|
|
149
|
+
`?e.slice(0,-1):e}p(An,"dropEndingNewline");function dp(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
|
|
150
|
+
`);return h=h!==-1?h:e.length,r.lastIndex=h,En(e.slice(0,h),t)})(),s=e[0]===`
|
|
151
|
+
`||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
|
|
152
|
+
`:"")+En(l,t),s=a}return i}p(dp,"foldString");function En(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
|
|
153
|
+
`+e.slice(s,a),s=a+1),o=n;return l+=`
|
|
154
|
+
`,e.length-s>t&&o>s?l+=e.slice(s,o)+`
|
|
155
|
+
`+e.slice(o+1):l+=e.slice(s),l.slice(1)}p(En,"foldLine");function fp(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=ei(e,s),i=Zt[r],!i&&vi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||rp(r);return t}p(fp,"escapeString");function pp(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Re(e,t,n,!1,!1)||typeof n>"u"&&Re(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(pp,"writeFlowSequence");function Mn(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Re(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Re(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Aa(e,t)),e.dump&&ps===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}p(Mn,"writeBlockSequence");function gp(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Re(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Re(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}p(gp,"writeFlowMapping");function mp(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ne("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=Aa(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Re(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ps===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Aa(e,t)),Re(e,t+1,c,!0,u)&&(e.dump&&ps===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=a,e.dump=s||"{}"}p(mp,"writeBlockMapping");function $n(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Xf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Vf.call(n.represent,l))i=n.represent[l](t,l);else throw new ne("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p($n,"detectType");function Re(e,t,r,i,s,a,o){e.tag=null,e.dump=r,$n(e,r,!1)||$n(e,r,!0);var n=Xf.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,f;if(c&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(mp(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(gp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Mn(e,t-1,e.dump,s):Mn(e,t,e.dump,s),f&&(e.dump="&ref_"+u+e.dump)):(pp(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&up(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ne("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}p(Re,"writeNode");function yp(e,t){var r=[],i=[],s,a;for(Ea(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}p(yp,"getDuplicateReferences");function Ea(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Ea(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Ea(e[i[s]],t,r)}p(Ea,"inspectNode");function I2(e,t){t=t||{};var r=new ip(t);r.noRefs||yp(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Re(r,0,i,!0,!0)?r.dump+`
|
|
156
|
+
`:""}p(I2,"dump$1");function D2(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(D2,"renamed");var P2=lf,R2=g2.load;/*! Bundled license information:
|
|
157
|
+
|
|
158
|
+
js-yaml/dist/js-yaml.mjs:
|
|
159
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
160
|
+
*/var Wi=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Xt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},kc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Qi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(Qi,"calculateDeltaAndAngle");var Bt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),N2=p(e=>({x:p(function(t,r,i){let s=0;const a=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Xt,e.arrowTypeStart)){const{angle:d,deltaX:m}=Qi(i[0],i[1]);s=Xt[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Xt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=Qi(i[i.length-1],i[i.length-2]);s=Xt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=Xt[e.arrowTypeStart],u=Xt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=a==="right"?-1:1,s+=d}return Bt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Xt,e.arrowTypeStart)){const{angle:d,deltaY:m}=Qi(i[0],i[1]);s=Xt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Xt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=Qi(i[i.length-1],i[i.length-2]);s=Xt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=Xt[e.arrowTypeStart],u=Xt[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=a==="up"?-1:1,s+=d}return Bt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Hs={},Pt={},Tc;function q2(){return Tc||(Tc=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.BLANK_URL=Pt.relativeFirstCharacters=Pt.whitespaceEscapeCharsRegex=Pt.urlSchemeRegex=Pt.ctrlCharactersRegex=Pt.htmlCtrlEntityRegex=Pt.htmlEntitiesRegex=Pt.invalidProtocolRegex=void 0,Pt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Pt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Pt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Pt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Pt.urlSchemeRegex=/^.+(:|:)/gim,Pt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Pt.relativeFirstCharacters=[".","/"],Pt.BLANK_URL="about:blank"),Pt}var wc;function z2(){if(wc)return Hs;wc=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.sanitizeUrl=a;var e=q2();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Hs}var W2=z2();function Ho(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function H2(){}function Cp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ll(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y2="[object RegExp]",xp="[object String]",bp="[object Number]",kp="[object Boolean]",Tp="[object Arguments]",U2="[object Symbol]",j2="[object Date]",G2="[object Map]",X2="[object Set]",V2="[object Array]",Z2="[object ArrayBuffer]",K2="[object Object]",Q2="[object DataView]",J2="[object Uint8Array]",tT="[object Uint8ClampedArray]",eT="[object Uint16Array]",rT="[object Uint32Array]",iT="[object Int8Array]",sT="[object Int16Array]",aT="[object Int32Array]",oT="[object Float32Array]",nT="[object Float64Array]",Sc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Fl(e){return typeof Sc.Buffer<"u"&&Sc.Buffer.isBuffer(e)}function lT(e){return Number.isSafeInteger(e)&&e>=0}function wp(e){return e!=null&&typeof e!="function"&&lT(e.length)}function hT(e){return e==="__proto__"}function Al(e){return e==null||typeof e!="object"&&typeof e!="function"}function El(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cT(e,t){return ri(e,void 0,e,new Map,t)}function ri(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Al(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=ri(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,ri(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(ri(n,void 0,r,i,s));return o}if(Fl(e))return e.subarray();if(El(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=ri(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),be(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,be(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(typeof e=="object"&&uT(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),be(o,e,r,i,s),o}return e}function be(e,t,r=e,i,s){const a=[...Object.keys(t),...Cp(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=ri(t[n],n,r,i,s))}}function uT(e){switch(Ll(e)){case Tp:case V2:case Z2:case Q2:case kp:case j2:case oT:case nT:case iT:case sT:case aT:case G2:case bp:case K2:case Y2:case X2:case xp:case U2:case J2:case tT:case eT:case rT:return!0;default:return!1}}function dT(e,t){return cT(e,(r,i,s,a)=>{if(typeof e=="object"){if(Ll(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),be(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case bp:case xp:case kp:{const o=new e.constructor(e==null?void 0:e.valueOf());return be(o,e),o}case Tp:{const o={};return be(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function _c(e){return dT(e)}function On(e){return e!==null&&typeof e=="object"&&Ll(e)==="[object Arguments]"}function In(e){return typeof e=="object"&&e!==null}function fT(e){return In(e)&&wp(e)}function oa(e){return El(e)}function pT(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function _s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(_s.Cache||Map),r}_s.Cache=Map;function gT(e){if(Al(e))return e;if(Array.isArray(e)||El(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function mT(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=na(s,o,i,new Map)}return s}function na(e,t,r,i){if(Al(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return gT(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...Cp(t)];for(let a=0;a<s.length;a++){const o=s[a];if(hT(o))continue;let n=t[o],l=e[o];if(On(n)&&(n={...n}),On(l)&&(l={...l}),Fl(n)&&(n=_c(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const d=u[f];c[d]=l[d]}l=c}else if(fT(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||In(l)&&In(n)&&(Ho(l)||Ho(n)||oa(l)||oa(n))?e[o]=na(l,n,r,i):l==null&&Ho(n)?e[o]=na({},n,r,i):l==null&&oa(n)?e[o]=_c(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function yT(e,...t){return mT(e,...t,H2)}function vc(e){if(e==null)return!0;if(wp(e))return typeof e.splice!="function"&&typeof e!="string"&&!Fl(e)&&!oa(e)&&!On(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return pT(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var CT="",xT={curveBasis:Cn,curveBasisClosed:wk,curveBasisOpen:Sk,curveBumpX:md,curveBumpY:yd,curveBundle:_k,curveCardinalClosed:vk,curveCardinalOpen:Bk,curveCardinal:kd,curveCatmullRomClosed:Lk,curveCatmullRomOpen:Fk,curveCatmullRom:wd,curveLinear:as,curveLinearClosed:Ak,curveMonotoneX:Fd,curveMonotoneY:Ad,curveNatural:Md,curveStep:$d,curveStepAfter:Id,curveStepBefore:Od},bT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kT=p(function(e,t){const r=Sp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);da(o),i=Rt(i,[...o])}else i=r.args;if(!i)return;let s=rl(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Sp=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${bT.source})(?=[}][%]{2}).*
|
|
161
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=is.exec(e))!==null;)if(a.index===is.lastIndex&&is.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return H.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),TT=p(function(e){return e.replace(is,"")},"removeDirectives"),wT=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Ml(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return xT[r]??t}p(Ml,"interpolateToCurve");function _p(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?W2.sanitizeUrl(r):r}p(_p,"formatUrl");var ST=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){H.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function $l(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p($l,"distance");function vp(e){let t,r=0;e.forEach(s=>{r+=$l(s,t),t=s});const i=r/2;return Ol(e,i)}p(vp,"traverseEdge");function Bp(e){return e.length===1?e[0]:vp(e)}p(Bp,"calcLabelPosition");var Bc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ol=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=$l(s,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:s.x,y:s.y};if(o>0&&o<1)return{x:Bc((1-o)*r.x+o*s.x,5),y:Bc((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),_T=p((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ol(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Lp(e,t,r){const i=structuredClone(r);H.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Ol(i,s),o=10+e*.5,n=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(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}p(Lp,"calcTerminalLabelPosition");function Fp(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(Fp,"getStylesFromArray");var Lc=0,vT=p(()=>(Lc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Lc),"generateId");function Ap(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Ap,"makeRandomHex");var BT=p(e=>Ap(e.length),"random"),LT=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"),FT=p(function(e,t){const r=t.text.replace(ks.lineBreakRegex," "),[,i]=Qa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),AT=_s((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ks.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Je(`${o} `,r),h=Je(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=ET(o,t,"-",r);s.push(a,...f),a=d}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),ET=_s((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Je(h,i)>=t){const u=l+1,f=s.length===u,d=`${h}${r}`;a.push(f?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ep(e,t){return Il(e,t).height}p(Ep,"calculateTextHeight");function Je(e,t){return Il(e,t).width}p(Je,"calculateTextWidth");var Il=_s((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Qa(r),o=["sans-serif",i],n=e.split(ks.lineBreakRegex),l=[],h=ut("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const f of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const g of n){const y=LT();y.text=g||CT;const C=FT(c,y).style("font-size",a).style("font-weight",s).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}c.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}`),bi,MT=(bi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(bi,"InitIDGenerator"),bi),Ys,$T=p(function(e){return Ys=Ys||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ys.innerHTML=e,unescape(Ys.textContent)},"entityDecode");function Dl(e){return"str"in e}p(Dl,"isDetailedError");var OT=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Qa=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 Pl(e,t){return yT({},e,t)}p(Pl,"cleanAndMerge");var Se={assignWithDepth:Rt,wrapLabel:AT,calculateTextHeight:Ep,calculateTextWidth:Je,calculateTextDimensions:Il,cleanAndMerge:Pl,detectInit:kT,detectDirective:Sp,isSubstringInArray:wT,interpolateToCurve:Ml,calcLabelPosition:Bp,calcCardinalityPosition:_T,calcTerminalLabelPosition:Lp,formatUrl:_p,getStylesFromArray:Fp,generateId:vT,random:BT,runFunc:ST,entityDecode:$T,insertTitle:OT,isLabelCoordinateInPath:Mp,parseFontSize:Qa,InitIDGenerator:MT},IT=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"),Pr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),rF=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function zt(e){return e??null}p(zt,"handleUndefinedAttr");function Mp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Mp,"isLabelCoordinateInPath");var Rl=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function $p(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=bt().fontSize?bt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Lu.fontSize]=Qa(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}p(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}p($p,"configureLabelImages");var DT=p(e=>{const{handDrawnSeed:t}=bt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Fi=p(e=>{const t=PT([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),PT=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Op=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"),K=p(e=>{const{stylesArray:t}=Fi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Op(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),Z=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=bt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Fi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:RT(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),RT=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const NT=Object.freeze({left:0,top:0,width:16,height:16}),Ma=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ip=Object.freeze({...NT,...Ma}),qT=Object.freeze({...Ip,body:"",hidden:!1}),zT=Object.freeze({width:null,height:null}),WT=Object.freeze({...zT,...Ma}),HT=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return Yo(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Yo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Yo(n,r)?n:null}return null},Yo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function YT(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 Fc(e,t){const r=YT(e,t);for(const i in qT)i in Ma?i in e&&!(i in r)&&(r[i]=Ma[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function UT(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Ac(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Fc(i[n]||s[n],a)}return o(t),r.forEach(o),Fc(e,a)}function jT(e,t){if(e.icons[t])return Ac(e,t,[]);const r=UT(e,[t])[t];return r?Ac(e,t,r):null}const GT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,XT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ec(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(GT);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=XT.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function VT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function ZT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function KT(e,t,r){const i=VT(e);return ZT(i.defs,t+i.content+r)}const QT=e=>e==="unset"||e==="undefined"||e==="none";function JT(e,t){const r={...Ip,...e},i={...WT,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let T=g.rotate;C?b?T+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let S;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:S=s.height/2+s.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")")}T%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),y.length&&(a=KT(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=Ec(u,l/h)):(c=o==="auto"?l:o,u=n===null?Ec(c,h/l):n==="auto"?h:n);const f={},d=(g,y)=>{QT(y)||(f[g]=y.toString())};d("width",c),d("height",u);const m=[s.left,s.top,l,h];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:a}}const tw=/\sid="(\S+)"/g,Mc=new Map;function ew(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Mc.get(e)||0;return Mc.set(e,t+1),t?`${e}${t}`:e}function rw(e){const t=[];let r;for(;r=tw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=ew(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function iw(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 Nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qr=Nl();function Dp(e){qr=e}var os={exec:()=>null};function kt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(te.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var sw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={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")},aw=/^(?:[ \t]*(?:\n|$))+/,ow=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ql=/(?:[*+-]|\d{1,9}[.)])/,Pp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rp=kt(Pp).replace(/bull/g,ql).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(),hw=kt(Pp).replace(/bull/g,ql).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(),zl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cw=/^[^\n]+/,Wl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,uw=kt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dw=kt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ql).getRegex(),Ja="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fw=kt("^ {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",Hl).replace("tag",Ja).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Np=kt(zl).replace("hr",vs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ja).getRegex(),pw=kt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Np).getRegex(),Yl={blockquote:pw,code:ow,def:uw,fences:nw,heading:lw,hr:vs,html:fw,lheading:Rp,list:dw,newline:aw,paragraph:Np,table:os,text:cw},$c=kt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ja).getRegex(),gw={...Yl,lheading:hw,table:$c,paragraph:kt(zl).replace("hr",vs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$c).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ja).getRegex()},mw={...Yl,html:kt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hl).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:os,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:kt(zl).replace("hr",vs).replace("heading",` *#{1,6} *[^
|
|
162
|
+
]`).replace("lheading",Rp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qp=/^( {2,}|\\)\n(?!\s*$)/,xw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,to=/[\p{P}\p{S}]/u,Ul=/[\s\p{P}\p{S}]/u,zp=/[^\s\p{P}\p{S}]/u,bw=kt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ul).getRegex(),Wp=/(?!~)[\p{P}\p{S}]/u,kw=/(?!~)[\s\p{P}\p{S}]/u,Tw=/(?:[^\s\p{P}\p{S}]|~)/u,ww=kt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",sw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Hp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Sw=kt(Hp,"u").replace(/punct/g,to).getRegex(),_w=kt(Hp,"u").replace(/punct/g,Wp).getRegex(),Yp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vw=kt(Yp,"gu").replace(/notPunctSpace/g,zp).replace(/punctSpace/g,Ul).replace(/punct/g,to).getRegex(),Bw=kt(Yp,"gu").replace(/notPunctSpace/g,Tw).replace(/punctSpace/g,kw).replace(/punct/g,Wp).getRegex(),Lw=kt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zp).replace(/punctSpace/g,Ul).replace(/punct/g,to).getRegex(),Fw=kt(/\\(punct)/,"gu").replace(/punct/g,to).getRegex(),Aw=kt(/^<(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(),Ew=kt(Hl).replace("(?:-->|$)","-->").getRegex(),Mw=kt("^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",Ew).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$a=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,$w=kt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$a).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Up=kt(/^!?\[(label)\]\[(ref)\]/).replace("label",$a).replace("ref",Wl).getRegex(),jp=kt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),Ow=kt("reflink|nolink(?!\\()","g").replace("reflink",Up).replace("nolink",jp).getRegex(),Oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jl={_backpedal:os,anyPunctuation:Fw,autolink:Aw,blockSkip:ww,br:qp,code:Cw,del:os,emStrongLDelim:Sw,emStrongRDelimAst:vw,emStrongRDelimUnd:Lw,escape:yw,link:$w,nolink:jp,punctuation:bw,reflink:Up,reflinkSearch:Ow,tag:Mw,text:xw,url:os},Iw={...jl,link:kt(/^!?\[(label)\]\((.*?)\)/).replace("label",$a).getRegex(),reflink:kt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$a).getRegex()},Dn={...jl,emStrongRDelimAst:Bw,emStrongLDelim:_w,url:kt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Oc).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:kt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Oc).getRegex()},Dw={...Dn,br:kt(qp).replace("{2,}","*").getRegex(),text:kt(Dn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Us={normal:Yl,gfm:gw,pedantic:mw},Hi={normal:jl,gfm:Dn,breaks:Dw,pedantic:Iw},Pw={"&":"&","<":"<",">":">",'"':""","'":"'"},Ic=e=>Pw[e];function $e(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Ic)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Ic);return e}function Dc(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Pc(e,t){var a;let r=e.replace(te.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(te.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(te.slashPipe,"|");return i}function Yi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Rw(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 Rc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Nw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
163
|
+
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
|
|
164
|
+
`)}var Oa=class{constructor(t){St(this,"options");St(this,"rules");St(this,"lexer");this.options=t||qr}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:Yi(i,`
|
|
165
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Nw(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:s}}}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 s=Yi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:Yi(r[0],`
|
|
166
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Yi(r[0],`
|
|
167
|
+
`).split(`
|
|
168
|
+
`),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
169
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
170
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
171
|
+
${c}`:c,a=a?`${a}
|
|
172
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,g=m.raw+`
|
|
173
|
+
`+i.join(`
|
|
174
|
+
`),y=this.blockquote(g);o[o.length-1]=y,s=s.substring(0,s.length-m.raw.length)+y.raw,a=a.substring(0,a.length-m.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,g=m.raw+`
|
|
175
|
+
`+i.join(`
|
|
176
|
+
`),y=this.list(g);o[o.length-1]=y,s=s.substring(0,s.length-d.raw.length)+y.raw,a=a.substring(0,a.length-m.raw.length)+y.raw,i=g.substring(o.at(-1).raw.length).split(`
|
|
177
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let f=r[2].split(`
|
|
178
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
179
|
+
`,1)[0],m=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
180
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),T=this.rules.other.hrRegex(g),S=this.rules.other.fencesBeginRegex(g),w=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g);for(;t;){let M=t.split(`
|
|
181
|
+
`,1)[0],L;if(d=M,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),L=d):L=d.replace(this.rules.other.tabCharGlobal," "),S.test(d)||w.test(d)||v.test(d)||b.test(d)||T.test(d))break;if(L.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
|
|
182
|
+
`+L.slice(g);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||w.test(f)||T.test(f))break;u+=`
|
|
183
|
+
`+d}!m&&!d.trim()&&(m=!0),c+=M+`
|
|
184
|
+
`,t=t.substring(M.length+1),f=L.slice(g)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}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 h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].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," "),s=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:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Pc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
185
|
+
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Pc(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),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)===`
|
|
186
|
+
`?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=Yi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Rw(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Rc(r,{href:s&&s.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Rc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,f=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}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}}}},ke=class Pn{constructor(t){St(this,"tokens");St(this,"options");St(this,"state");St(this,"tokenizer");St(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qr,this.options.tokenizer=this.options.tokenizer||new Oa,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:te,block:Us.normal,inline:Hi.normal};this.options.pedantic?(r.block=Us.pedantic,r.inline=Hi.pedantic):this.options.gfm&&(r.block=Us.gfm,this.options.breaks?r.inline=Hi.breaks:r.inline=Hi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Us,inline:Hi}}static lex(t,r){return new Pn(r).lex(t)}static lexInline(t,r){return new Pn(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
|
|
187
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.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 h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
188
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
189
|
+
`)?"":`
|
|
190
|
+
`)+n.raw,h.text+=`
|
|
191
|
+
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
192
|
+
`)?"":`
|
|
193
|
+
`)+n.raw,h.text+=`
|
|
194
|
+
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
195
|
+
`)?"":`
|
|
196
|
+
`)+n.raw,h.text+=`
|
|
197
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
198
|
+
`)?"":`
|
|
199
|
+
`)+n.raw,h.text+=`
|
|
200
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,f;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ia=class{constructor(t){St(this,"options");St(this,"parser");this.options=t||qr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(te.notSpaceStart))==null?void 0:o[0],a=t.replace(te.endingNewline,"")+`
|
|
201
|
+
`;return s?'<pre><code class="language-'+$e(s)+'">'+(i?a:$e(a,!0))+`</code></pre>
|
|
202
|
+
`:"<pre><code>"+(i?a:$e(a,!0))+`</code></pre>
|
|
203
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
204
|
+
${this.parser.parse(t)}</blockquote>
|
|
205
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
206
|
+
`}hr(t){return`<hr>
|
|
207
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
208
|
+
`+s+"</"+a+`>
|
|
209
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+$e(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
210
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
211
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
212
|
+
<thead>
|
|
213
|
+
`+r+`</thead>
|
|
214
|
+
`+s+`</table>
|
|
215
|
+
`}tablerow({text:t}){return`<tr>
|
|
216
|
+
${t}</tr>
|
|
217
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
218
|
+
`}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>${$e(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 s=this.parser.parseInline(i),a=Dc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+$e(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Dc(t);if(a===null)return $e(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${$e(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:$e(t.text)}},Gl=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""}},Te=class Rn{constructor(t){St(this,"options");St(this,"renderer");St(this,"textRenderer");this.options=t||qr,this.options.renderer=this.options.renderer||new Ia,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gl}static parse(t,r){return new Rn(r).parse(t)}static parseInline(t,r){return new Rn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
|
|
219
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Ks,Ji=(Ks=class{constructor(t){St(this,"options");St(this,"block");this.options=t||qr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ke.lex:ke.lexInline}provideParser(){return this.block?Te.parse:Te.parseInline}},St(Ks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),St(Ks,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ks),qw=class{constructor(...t){St(this,"defaults",Nl());St(this,"options",this.setOptions);St(this,"parse",this.parseMarkdown(!0));St(this,"parseInline",this.parseMarkdown(!1));St(this,"Parser",Te);St(this,"Renderer",Ia);St(this,"TextRenderer",Gl);St(this,"Lexer",ke);St(this,"Tokenizer",Oa);St(this,"Hooks",Ji);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.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(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),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)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Ia(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 n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Oa(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 n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Ji;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 n=o,l=i.hooks[n],h=a[n];Ji.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&Ji.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(a,c);return h.call(a,f)})();let u=l.call(a,c);return h.call(a,u)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,c);return f===!1&&(f=await h.apply(a,c)),f})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ke.lex(t,r??this.defaults)}parser(t,r){return Te.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?ke.lex:ke.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Te.parse:Te.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?ke.lex:ke.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Te.parse:Te.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
220
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+$e(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Rr=new qw;function Tt(e,t){return Rr.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Rr.setOptions(e),Tt.defaults=Rr.defaults,Dp(Tt.defaults),Tt};Tt.getDefaults=Nl;Tt.defaults=qr;Tt.use=function(...e){return Rr.use(...e),Tt.defaults=Rr.defaults,Dp(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Rr.walkTokens(e,t)};Tt.parseInline=Rr.parseInline;Tt.Parser=Te;Tt.parser=Te.parse;Tt.Renderer=Ia;Tt.TextRenderer=Gl;Tt.Lexer=ke;Tt.lexer=ke.lex;Tt.Tokenizer=Oa;Tt.Hooks=Ji;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;Te.parse;ke.lex;function Gp(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 s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,f;return(f=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var a=new RegExp(`
|
|
221
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
|
|
222
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
223
|
+
`)&&(u=String(n).split(`
|
|
224
|
+
`).map(function(f,d){return d===0?f:"".concat(c).concat(f)}).join(`
|
|
225
|
+
`)),o+=u+i[l+1]}),o}var zw={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},Nn=new Map,Xp=new Map,Ww=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(H.debug("Registering icon pack:",t.name),"loader"in t)Xp.set(t.name,t.loader);else if("icons"in t)Nn.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Vp=p(async(e,t)=>{const r=HT(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 s=Nn.get(i);if(!s){const o=Xp.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Nn.set(i,s)}catch(n){throw H.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=jT(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Hw=p(async e=>{try{return await Vp(e),!0}catch{return!1}},"isIconAvailable"),Bs=p(async(e,t,r)=>{let i;try{i=await Vp(e,t==null?void 0:t.fallbackPrefix)}catch(o){H.error(o),i=zw}const s=JT(i,t),a=iw(rw(s.body),{...s.attributes,...r});return Be(a,Ft())},"getIconSVG");function Zp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
226
|
+
`).replace(/\n{2,}/g,`
|
|
227
|
+
`);return Gp(i)}p(Zp,"preprocessMarkdown");function Kp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Kp,"nonMarkdownToLines");function Qp(e,t={}){const r=Zp(e,t),i=Tt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
228
|
+
`).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&s[a].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(Qp,"markdownToLines");function Jp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Jp,"nonMarkdownToHTML");function tg(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(H.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(tg,"markdownToHTML");function eg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(eg,"splitTextToChars");function rg(e,t){const r=eg(t.content);return Xl(e,[],r,t.type)}p(rg,"splitWordToFitWidth");function Xl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?Xl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Xl,"splitWordToFitWidthRecursion");function ig(e,t){if(e.some(({content:r})=>r.includes(`
|
|
229
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Da(e,t)}p(ig,"splitLineToFitWidth");function Da(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return Da(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=rg(t,a);r.push([n]),l.content&&e.unshift(l)}return Da(e,t,r)}p(Da,"splitLineToFitWidthRecursion");function qn(e,t){t&&e.attr("style",t)}p(qn,"applyStyle");var Nc=16384;async function sg(e,t,r,i,s=!1,a=Ft()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Nc)}px`),o.attr("height",`${Math.min(10*r,Nc)}px`);const n=o.append("xhtml:div"),l=ls(t.label)?await Ru(t.label.replace(ks.lineBreakRegex,`
|
|
230
|
+
`),a):Be(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),qn(c,t.labelStyle),c.attr("class",`${h} ${i}`),qn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p(sg,"addHtmlSpan");function eo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(eo,"createTspan");function ag(e,t,r){const i=e.append("text"),s=eo(i,1,t);ro(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(ag,"computeWidthOfText");function Yw(e,t,r){var o;const i=e.append("text"),s=eo(i,1,t);ro(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(Yw,"computeDimensionOfText");function og(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=p(d=>ag(o,1.1,d)<=e,"checkWidth"),f=u(c)?[c]:ig(c,u);for(const d of f){const m=eo(l,h,1.1,s);ro(m,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}p(og,"createFormattedText");function zn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(zn,"decodeHTMLEntities");function ro(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(zn(r.content)):s.text(" "+zn(r.content))})}p(ro,"updateTextContentAndStyles");async function ng(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await Hw(n)?await Bs(n,void 0,{class:"label-icon"}):`<i class='${Be(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(ng,"replaceIconSubstring");var er=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(H.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const u=o?tg(t,c):Jp(t),f=await ng(Pr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:ls(t)?d:f,labelStyle:r.replace("fill:","color:")};return await sg(e,m,l,s,h,c)}else{const u=Pr(t.replace(/<br\s*\/?>/g,"<br/>")),f=o?Qp(u.replace("<br>","<br/>"),c):Kp(u),d=og(l,e,f,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(d).select("rect").attr("style",m.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 i?ut(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ut(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Uo(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function Uw(e,t){return e[0]===t[0]&&e[1]===t[1]}function jw(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)Uo(h,n,s);const l=(function(h,c,u){const f=[];for(const b of h){const T=[...b];Uw(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&f.push(T)}const d=[];c=Math.max(c,.1);const m=[];for(const b of f)for(let T=0;T<b.length-1;T++){const S=b[T],w=b[T+1];if(S[1]!==w[1]){const v=Math.min(S[1],w[1]);m.push({ymin:v,ymax:Math.max(S[1],w[1]),x:v===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(m.sort(((b,T)=>b.ymin<T.ymin?-1:b.ymin>T.ymin?1:b.x<T.x?-1:b.x>T.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax))),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let T=0;T<m.length&&!(m[T].ymin>y);T++)b=T;m.splice(0,b+1).forEach((T=>{g.push({s:y,edge:T})}))}if(g=g.filter((b=>!(b.edge.ymax<=y))),g.sort(((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x))),(u!==1||C%c==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const T=b+1;if(T>=g.length)break;const S=g[b].edge,w=g[T].edge;d.push([[Math.round(S.x),y],[Math.round(w.x),y]])}y+=u,g.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return d})(o,a,i);if(s){for(const h of o)Uo(h,n,-s);(function(h,c,u){const f=[];h.forEach((d=>f.push(...d))),Uo(f,c,u)})(l,n,-s)}return l}function Ls(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),jw(e,s,i,a||1)}class Vl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ls(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function io(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 Gw extends Vl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ls(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)io([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Xw extends Vl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class Vw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ls(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=io(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,f=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<c;m++){const g=d+u+m*s,y=f-o+2*Math.random()*o,C=g-o+2*Math.random()*o,b=this.helper.ellipse(y,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Zw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ls(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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=io(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const f=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const m=d*(i+s),g=m+i,y=[c[0]+m*Math.cos(f)+h*Math.cos(f),c[1]+m*Math.sin(f)+h*Math.sin(f)],C=[c[0]+g*Math.cos(f)+h*Math.cos(f),c[1]+g*Math.sin(f)+h*Math.sin(f)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class Kw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Ls(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=io(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const se={};class Qw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Jw=0,jo=1,qc=2,js={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 Go(e,t){return e.type===t}function Zl(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Jw,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:jo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:qc,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!Go(a,qc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Zl("M0,0"+e);s++,o=js[a.text],i=a.text}else Go(a,jo)?o=js[i]:(s++,o=js[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!Go(h,jo))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof js[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function lg(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function hg(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=s+(s-l)):(u=i,f=s),t.push({key:"C",data:[u,f,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,f]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const g=i+2*(d-i)/3,y=s+2*(m-s)/3,C=u+2*(d-u)/3,b=f+2*(m-f)/3;t.push({key:"C",data:[g,y,C,b,u,f]}),n=d,l=m,i=u,s=f;break}case"Q":{const[u,f,d,m]=c,g=i+2*(u-i)/3,y=s+2*(f-s)/3,C=d+2*(u-d)/3,b=m+2*(f-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),n=u,l=f,i=d,s=m;break}case"A":{const u=Math.abs(c[0]),f=Math.abs(c[1]),d=c[2],m=c[3],g=c[4],y=c[5],C=c[6];u===0||f===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(cg(i,s,y,C,u,f,d,m,g).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function Ui(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function cg(e,t,r,i,s,a,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let f=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Ui(e,t,-c),[r,i]=Ui(r,i,-c);const U=(e-r)/2,D=(t-i)/2;let $=U*U/(s*s)+D*D/(a*a);$>1&&($=Math.sqrt($),s*=$,a*=$);const A=s*s,I=a*a,E=A*I-A*D*D-I*U*U,_=A*D*D+I*U*U,q=(n===l?-1:1)*Math.sqrt(Math.abs(E/_));g=q*s*D/a+(e+r)/2,y=q*-a*U/s+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const U=m,D=r,$=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=cg(r=g+s*Math.cos(m),i=y+a*Math.sin(m),D,$,s,a,o,0,l,[m,U,g,y])}C=m-d;const b=Math.cos(d),T=Math.sin(d),S=Math.cos(m),w=Math.sin(m),v=Math.tan(C/4),M=4/3*s*v,L=4/3*a*v,Y=[e,t],N=[e+M*T,t-L*b],O=[r+M*w,i-L*S],G=[r,i];if(N[0]=2*Y[0]-N[0],N[1]=2*Y[1]-N[1],h)return[N,O,G].concat(f);{f=[N,O,G].concat(f);const U=[];for(let D=0;D<f.length;D+=3){const $=Ui(f[D][0],f[D][1],c),A=Ui(f[D+1][0],f[D+1][1],c),I=Ui(f[D+2][0],f[D+2][1],c);U.push([$[0],$[1],A[0],A[1],I[0],I[1]])}return U}}const tS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return Pa(e,t,r)},ellipse:function(e,t,r,i,s){const a=dg(r,i,s);return Wn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return gr(e,t,r,i,s,!0)}};function ug(e,t,r,i,s){return{type:"path",ops:gr(e,t,r,i,s)}}function la(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...gr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...gr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?ug(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function eS(e,t,r,i,s){return(function(a,o){return la(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function zc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Gs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Gs(r[0],1.5*(1+.22*t.roughness),Yc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Gs(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Gs(o,1.5*(1+.22*t.roughness),Yc(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function dg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=st(o*l,r),n+=st(n*l,r),{increment:a,rx:o,ry:n}}function Wn(e,t,r,i){const[s,a]=Uc(i.increment,e,t,i.rx,i.ry,1,i.increment*Pa(.1,Pa(.4,1,r),r),r);let o=Ra(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Uc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ra(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Wc(e,t,r,i,s,a,o,n,l){const h=e,c=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=st(.01*u,l),f+=st(.01*f,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=jc(y,h,c,u,f,d,m,1,l);if(!l.disableMultiStroke){const b=jc(y,h,c,u,f,d,m,1.5,l);C.push(...b)}return o&&(n?C.push(...gr(h,c,h+u*Math.cos(d),c+f*Math.sin(d),l),...gr(h,c,h+u*Math.cos(m),c+f*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+f*Math.sin(d)]})),{type:"path",ops:C}}function Hc(e,t){const r=hg(lg(Zl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...gr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,u,f,d]=n;i.push(...rS(l,h,c,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...gr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Xo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+st(s,t),i[0][1]+st(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+st(s,t),i[o][1]+st(s,t)]})}}return{type:"fillPath",ops:r}}function Vr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!se[s])switch(s){case"zigzag":se[s]||(se[s]=new Gw(i));break;case"cross-hatch":se[s]||(se[s]=new Xw(i));break;case"dots":se[s]||(se[s]=new Vw(i));break;case"dashed":se[s]||(se[s]=new Zw(i));break;case"zigzag-line":se[s]||(se[s]=new Kw(i));break;default:s="hachure",se[s]||(se[s]=new Vl(i))}return se[s]})(t,tS).fillPolygons(e,t)}function Yc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function fg(e){return e.randomizer||(e.randomizer=new Qw(e.seed||0)),e.randomizer.next()}function Pa(e,t,r,i=1){return r.roughness*i*(fg(r)*(t-e)+e)}function st(e,t,r=1){return Pa(-e,e,t,r)}function gr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Hn(e,t,r,i,s,!0,!1);if(o)return n;const l=Hn(e,t,r,i,s,!0,!0);return n.concat(l)}function Hn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,f=.2+.2*fg(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=st(d,s,h),m=st(m,s,h);const g=[],y=()=>st(u,s,h),C=()=>st(c,s,h),b=s.preserveVertices;return o?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:st(c,s,h)),t+(b?0:st(c,s,h))]}),o?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),m+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),m+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),m+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),m+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Gs(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 s=1;s<e.length;s++)i.push([e[s][0]+st(t,r),e[s][1]+st(t,r)]),s===e.length-1&&i.push([e[s][0]+st(t,r),e[s][1]+st(t,r)]);return Ra(i,null,r)}function Ra(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.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?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Hn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Uc(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=st(.5,n)-Math.PI/2;h.push([st(a,n)+t+.9*i*Math.cos(c-e),st(a,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let f=c;f<u;f+=e){const d=[st(a,n)+t+i*Math.cos(f),st(a,n)+r+s*Math.sin(f)];l.push(d),h.push(d)}h.push([st(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),st(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([st(a,n)+t+.98*i*Math.cos(c+o),st(a,n)+r+.98*s*Math.sin(c+o)]),h.push([st(a,n)+t+.9*i*Math.cos(c+.5*o),st(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function jc(e,t,r,i,s,a,o,n,l){const h=a+st(.1,l),c=[];c.push([st(n,l)+t+.9*i*Math.cos(h-e),st(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([st(n,l)+t+i*Math.cos(u),st(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Ra(c,null,l)}function rS(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:st(h[0],n)),o[1]+(f?0:st(h[0],n))]}),c=f?[s,a]:[s+st(h[d],n),a+st(h[d],n)],l.push({op:"bcurveTo",data:[e+st(h[d],n),t+st(h[d],n),r+st(h[d],n),i+st(h[d],n),c[0],c[1]]});return l}function ji(e){return[...e]}function Gc(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(ji(e[0]),ji(e[1]),ji(e[2]),ji(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(ji(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function ha(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function iS(e,t,r){const i=ha(t,r);if(i===0)return ha(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),ha(e,vr(t,r,s))}function vr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Yn(e,t,r,i){const s=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],f=n[l+3];let d=3*c[0]-2*h[0]-f[0];d*=d;let m=3*c[1]-2*h[1]-f[1];m*=m;let g=3*u[0]-2*f[0]-h[0];g*=g;let y=3*u[1]-2*f[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(ha(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],f=vr(l,h,.5),d=vr(h,c,.5),m=vr(c,u,.5),g=vr(f,d,.5),y=vr(d,m,.5),C=vr(g,y,.5);Yn([l,f,g,C],0,r,s),Yn([C,y,m,u],0,r,s)}var a,o;return s}function sS(e,t){return Na(e,0,e.length,t)}function Na(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=iS(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Na(e,t,h+1,i,a),Na(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Vo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Yn(e,3*a,t,i);return r&&r>0?Na(i,0,i.length,r):i}const he="none";class qa{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,s,a){const o=this._o(a);return this._d("line",[ug(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=eS(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Xo([h],o)):n.push(Vr([h],o))}return o.stroke!==he&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=dg(i,s,o),h=Wn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Wn(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Vr([h.estimatedPoints],o));return o.stroke!==he&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[la(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],u=Wc(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const f=Object.assign({},h);f.disableMultiStroke=!0;const d=Wc(t,r,i,s,a,o,!0,!1,f);d.type="fillPath",c.push(d)}else c.push((function(f,d,m,g,y,C,b){const T=f,S=d;let w=Math.abs(m/2),v=Math.abs(g/2);w+=st(.01*w,b),v+=st(.01*v,b);let M=y,L=C;for(;M<0;)M+=2*Math.PI,L+=2*Math.PI;L-M>2*Math.PI&&(M=0,L=2*Math.PI);const Y=(L-M)/b.curveStepCount,N=[];for(let O=M;O<=L;O+=Y)N.push([T+w*Math.cos(O),S+v*Math.sin(O)]);return N.push([T+w*Math.cos(L),S+v*Math.sin(L)]),N.push([T,S]),Vr([N],b)})(t,r,i,s,a,o,h));return h.stroke!==he&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=zc(t,i);if(i.fill&&i.fill!==he)if(i.fillStyle==="solid"){const o=zc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Vo(Gc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Vo(Gc(h),10,(1+i.roughness)/2))}o.length&&s.push(Vr([o],i))}return i.stroke!==he&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=la(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Xo([t],i)):s.push(Vr([t],i))),i.stroke!==he&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==he,o=i.stroke!==he,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,f){const d=hg(lg(Zl(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Vo(C,u)),C=[]},T=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:w,data:v}of d)switch(w){case"M":T(),y=[v[0],v[1]],g.push(y);break;case"L":b(),g.push([v[0],v[1]]);break;case"C":if(!C.length){const M=g.length?g[g.length-1]:y;C.push([M[0],M[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.push([v[4],v[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(T(),!f)return m;const S=[];for(const w of m){const v=sS(w,f);v.length&&S.push(v)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Hc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Hc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Xo(l,i));else s.push(Vr(l,i));return o&&(n?l.forEach((c=>{s.push(la(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.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,s=[];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:he};break;case"fillPath":o={d:this.opsToPath(a),stroke:he,strokeWidth:0,fill:i.fill||he};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||he,strokeWidth:i,fill:he}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class aS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.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(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}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 Xs="http://www.w3.org/2000/svg";class oS{constructor(t,r){this.svg=t,this.gen=new qa(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Xs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Xs,"path"),l.setAttribute("d",this.opsToPath(n,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=s.createElementNS(Xs,"path"),l.setAttribute("d",this.opsToPath(n,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(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Xs,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),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,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);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,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}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 aS(e,t),svg:(e,t)=>new oS(e,t),generator:e=>new qa(e),newSeed:()=>qa.newSeed()},it=p(async(e,t,r)=>{var d,m;let i;const s=t.useHtmlLabels||tr((d=bt())==null?void 0:d.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",zt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await er(o,Be(Pr(n),bt()),{useHtmlLabels:s,width:t.width||((m=bt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},bt());let u=c.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],y=ut(c);await $p(g,n),u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return s?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},"labelHelper"),Zo=p(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ee(bt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await er(s,Be(Pr(t),bt()),{useHtmlLabels:i,width:r.width||((h=(l=bt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ee(bt())){const c=a.children[0],u=ut(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function gt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(gt,"createPathFromPoints");function mr(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,f=t+h/2;for(let d=0;d<=50;d++){const m=d/50,g=e+m*l,y=f+s*Math.sin(u*(g-e));o.push({x:g,y})}return o}p(mr,"generateFullSineWavePoints");function ys(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(ys,"generateCirclePoints");function Un(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=p((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Un,"mergePaths");var nS=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),Ai=nS,lS=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=bt(),n=ee(o);return await er(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),hr=lS,yr=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),pg=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await er(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):m=await hr(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(ee(r)){const M=m.children[0],L=ut(m);g=M.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,T=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=V.svg(u),L=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),Y=M.path(yr(b,T,y,C,0),L);S=u.insert(()=>(H.debug("Rough node insert CXC",Y),Y),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=Rl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const M=d.select("span");M&&M.attr("style",n)}const v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ai(t,M)},{cluster:u,labelBBox:g}},"rect"),hS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/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+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Ai(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),cS=p(async(e,t)=>{const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let f=h.append("rect");const d=await hr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(ee(r)){const Y=d.children[0],N=ut(d);m=Y.getBoundingClientRect(),N.attr("width",m.width),N.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,T=t.height+g-m.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const v=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const Y=t.cssClasses.includes("statediagram-cluster-alt"),N=V.svg(h),O=t.rx||t.ry?N.path(yr(S,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(S,w,C,b,{seed:s});M=h.insert(()=>O,":first-child");const G=N.rectangle(S,v,C,T,{fill:Y?a:o,fillStyle:Y?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>O,":first-child"),f=h.insert(()=>G)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",S).attr("y",v).attr("width",C).attr("height",T);u.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(ee(r)?0:3)})`);const L=M.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(Y){return Ai(t,Y)},{cluster:h,labelBBox:m}},"roundedWithTitle"),uS=p(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ee(r),d=u.insert("g").attr("class","cluster-label "),m=await er(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=m.getBBox();if(ee(r)){const M=m.children[0],L=ut(m);g=M.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,T=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=V.svg(u),L=Z(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),Y=M.path(yr(b,T,y,C,t.rx),L);S=u.insert(()=>(H.debug("Rough node insert CXC",Y),Y),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=Rl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const M=d.select("span");M&&M.attr("style",n)}const v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=g.height-t.padding/2,t.intersect=function(M){return Ai(t,M)},{cluster:u,labelBBox:g}},"kanbanSection"),dS=p((e,t)=>{const r=bt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,f=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=V.svg(o).rectangle(u,f,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>y,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",f).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Ai(t,g)},{cluster:o,labelBBox:{}}},"divider"),fS=pg,pS={rect:pg,squareRect:fS,roundedWithTitle:cS,noteGroup:hS,divider:dS,kanbanSection:uS},gg=new Map,gS=p(async(e,t)=>{const r=t.shape||"rect",i=await pS[r](e,t);return gg.set(t.id,i),i},"insertCluster"),lF=p(()=>{gg=new Map},"clear");function mg(e,t){return e.intersect(t)}p(mg,"intersectNode");var mS=mg;function yg(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}p(yg,"intersectEllipse");var Cg=yg;function xg(e,t,r){return Cg(e,t,t,r)}p(xg,"intersectCircle");var yS=xg;function bg(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&jn(n,l))return;const c=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+f,m=c*t.x+u*t.y+f;if(Math.abs(d)<h&&Math.abs(m)<h&&jn(d,m))return;const g=s*u-c*a;if(g===0)return;const y=Math.abs(g/2);let C=a*f-u*o;const b=C<0?(C-y)/g:(C+y)/g;C=c*o-s*f;const T=C<0?(C-y)/g:(C+y)/g;return{x:b,y:T}}}p(bg,"intersectLine");function jn(e,t){return e*t>0}p(jn,"sameSign");var CS=bg;function kg(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],f=t[c<t.length-1?c+1:0],d=CS(e,r,{x:l+u.x,y:h+u.y},{x:l+f.x,y:h+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(c,u){let f=c.x-r.x,d=c.y-r.y,m=Math.sqrt(f*f+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),a[0]):e}p(kg,"intersectPolygon");var xS=kg,X={node:mS,circle:yS,ellipse:Cg,polygon:xS,rect:Ai};function Tg(e,t){const{labelStyles:r}=K(t);t.labelStyle=r;const i=rt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=V.svg(a),h=Z(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",zt(n)),Q(t,u),t.intersect=function(f){return H.info("Circle intersect",t,o,f),X.circle(t,o,f)},a}p(Tg,"anchor");function Gn(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,m=f/a,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),C=l+y*a*Math.sin(c)*(o?-1:1),b=h-y*s*Math.cos(c)*(o?-1:1),T=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-T;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const v=[];for(let M=0;M<20;M++){const L=M/19,Y=T+L*w,N=C+s*Math.cos(Y),O=b+a*Math.sin(Y);v.push({x:N,y:O})}return v}p(Gn,"generateArcPoints");function wg(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(wg,"calculateArcSagitta");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(Y=>Y+o,"calcTotalHeight"),l=p(Y=>{const N=Y/2;return[N/(2.5+Y/50),N]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await it(e,t,rt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[f,d]=l(u),m=wg(u,f,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=u,{cssStyles:b}=t,T=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Gn(-y/2,-C/2,-y/2,C/2,f,d,!1),{x:y/2,y:C/2},...Gn(y/2,C/2,y/2,-C/2,f,d,!0)],S=V.svg(h),w=Z(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=gt(T),M=S.path(v,w),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${f/2}, 0)`),Q(t,L),t.intersect=function(Y){return X.polygon(t,T,Y)},h}p(Sg,"bowTieRect");function rr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(rr,"insertPolygonShape");var Vs=12;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Vs),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,f=h,d=-c,m=0,g=[{x:u+Vs,y:d},{x:f,y:d},{x:f,y:m},{x:u,y:m},{x:u,y:d+Vs},{x:u+Vs,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(n),T=Z(t,{}),S=gt(g),w=b.path(S,T);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=rr(n,h,c,g);return i&&y.attr("style",i),Q(t,y),t.intersect=function(b){return X.polygon(t,g,b)},n}p(_g,"card");function vg(e,t){const{nodeStyles:r}=K(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:s}=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}],n=V.svg(i),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=gt(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return X.polygon(t,o,f)},i}p(vg,"choice");async function Kl(e,t,r){const{labelStyles:i,nodeStyles:s}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await it(e,t,rt(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=V.svg(a),m=Z(t,{}),g=d.circle(0,0,c*2,m);u=a.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",zt(f))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return X.circle(d,g,m)},t.intersect=function(d){return H.info("Circle intersect",t,c,d),X.circle(t,c,d)},a}p(Kl,"circle");function Bg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={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},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
231
|
+
M ${s.x},${s.y} L ${o.x},${o.y}`}p(Bg,"createLine");function Lg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=V.svg(s),l=Z(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=Bg(a),u=n.path(c,l),f=s.insert(()=>h,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Q(t,f),t.intersect=function(d){return H.info("crossedCircle intersect",t,{radius:a,point:d}),X.circle(t,a,d)},s}p(Lg,"crossedCircle");function Xe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(Xe,"generateCirclePoints");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await it(e,t,rt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...Xe(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Xe(h/2+u*2,-u,u,20,-180,-270),...Xe(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Xe(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Xe(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Xe(h/2+h*.1,-u,u,20,-180,-270),...Xe(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Xe(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=V.svg(s),y=Z(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=gt(d).replace("Z",""),T=g.path(b,y),S=gt(m),w=g.path(S,{...y}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>T,":first-child"),v.attr("class","text"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,v),t.intersect=function(M){return X.polygon(t,m,M)},s}p(Fg,"curlyBraceLeft");function Ve(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:d,y:m})}return o}p(Ve,"generateCirclePoints");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await it(e,t,rt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...Ve(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ve(h/2+u*2,-u,u,20,-180,-270),...Ve(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ve(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...Ve(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Ve(h/2+u*2,-u,u,20,-180,-270),...Ve(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Ve(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=V.svg(s),y=Z(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=gt(d).replace("Z",""),T=g.path(b,y),S=gt(m),w=g.path(S,{...y}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>T,":first-child"),v.attr("class","text"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,v),t.intersect=function(M){return X.polygon(t,m,M)},s}p(Ag,"curlyBraceRight");function Yt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(Yt,"generateCirclePoints");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await it(e,t,rt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...Yt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Yt(h/2+u*2,-u,u,20,-180,-270),...Yt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Yt(h/2,c/2,u,20,0,90)],m=[...Yt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Yt(-h/2-u/2,-u,u,20,0,90),...Yt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Yt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Yt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Yt(h/2+u*2,-u,u,20,-180,-270),...Yt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Yt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Yt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Yt(-h/2-u/2,-u,u,20,0,90),...Yt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Yt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=V.svg(s),C=Z(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=gt(d).replace("Z",""),S=y.path(T,C),v=gt(m).replace("Z",""),M=y.path(v,C),L=gt(g),Y=y.path(L,{...C}),N=s.insert("g",":first-child");return N.insert(()=>Y,":first-child").attr("stroke-opacity",0),N.insert(()=>S,":first-child"),N.insert(()=>M,":first-child"),N.attr("class","text"),f&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,N),t.intersect=function(O){return X.polygon(t,g,O)},s}p(Eg,"curlyBraces");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await it(e,t,rt(t)),u=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:m}=t,g=V.svg(h),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=f,T=C-d,S=b/4,w=[{x:T,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:T,y:b},...ys(-T,-b/2,d,50,270,90)],v=gt(w),M=g.path(v,y),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-f/2})`),Q(t,L),t.intersect=function(Y){return X.polygon(t,w,Y)},h}p(Mg,"curvedTrapezoid");var bS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),kS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),TS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Xc=8,Vc=8;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<Vc&&(t.width=Vc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-a-b*3,t.height<Xc&&(t.height=Xc)}const{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=(t.width?t.width:l.width)+o,u=c/2,f=u/(2.5+c/50),d=(t.height?t.height:l.height)+a+f;let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=V.svg(n),C=kS(0,0,c,d,u,f),b=TS(0,f,c,d,u,f),T=Z(t,{}),S=y.path(C,T),w=y.path(b,Z(t,{fill:"none"}));m=n.insert(()=>w,":first-child"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=bS(0,0,c,d,u,f);m=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",zt(g)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),Q(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=X.rect(t,y),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-b*b/(u*u));T>0&&(T=Math.sqrt(T)),T=f-T,y.y-(t.y??0)>0&&(T=-T),C.y+=T}return C},n}p($g,"cylinder");async function Ei(e,t,r){const{labelStyles:i,nodeStyles:s}=K(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await it(e,t,rt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=V.svg(a),y=Z(t,{}),C=f||d?g.path(yr(h,c,n,l,f||0),y):g.rectangle(h,c,n,l,y);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",zt(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",zt(f)).attr("ry",zt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return Q(t,u),t.calcIntersect=function(g,y){return X.rect(g,y)},t.intersect=function(g){return X.rect(t,g)},a}p(Ei,"drawRect");async function Og(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Ei(e,t,l);if(t.look==="handDrawn"){const d=V.svg(h),m=Z(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),y=g.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),g.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,f=(Number(c.attr("height"))||n)??0;return u>0&&f>0&&c.attr("stroke-dasharray",`${u} ${f}`),h}p(Og,"datastore");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=n.width+s,c=n.height+a,u=c*.2,f=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=V.svg(o),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=g.polygon(C.map(S=>[S.x,S.y]),y),T=o.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Q(t,T),t.intersect=function(S){return X.rect(t,S)},o}p(Ig,"dividedRectangle");async function Dg(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=K(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=V.svg(n),y=Z(t,{roughness:.2,strokeWidth:2.5}),C=Z(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),T=g.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",zt(t.cssClasses)).attr("style",zt(f)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(T)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,u),t.intersect=function(g){return H.info("DoubleCircle intersect",t,h,g),X.circle(t,h,g)},n}p(Dg,"doublecircle");function Pg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=K(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=V.svg(a),{nodeBorder:h}=r,c=Z(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),Q(t,f),t.intersect=function(d){return H.info("filledCircle intersect",t,{radius:o,point:d}),X.circle(t,o,d)},a}p(Pg,"filledCircle");var Zc=10,Kc=10;async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Zc&&(t.height=Zc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Kc&&(t.width=Kc));const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,f=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,m=V.svg(o),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=gt(f),C=m.path(y,g),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,Q(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(T){return H.info("Triangle intersect",t,f,T),X.polygon(t,f,T)},o}p(Rg,"flippedTriangle");function Ng(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=K(t);t.label="";const o=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,f=V.svg(o),d=Z(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=f.rectangle(c,u,l,h,d),g=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),Q(t,g);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return X.rect(t,C)},o}p(Ng,"forkJoin");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,f=u/2,{cssStyles:d}=t,m=V.svg(l),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-f,y:-u/2},...ys(-c/2+f,0,f,50,90,270),{x:c/2-f,y:u/2},{x:-c/2,y:u/2}],C=gt(y),b=m.path(C,g),T=l.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Q(t,T),t.intersect=function(S){return H.info("Pill intersect",t,{radius:f,point:S}),X.polygon(t,y,S)},l}p(qg,"halfRoundedRectangle");var wS=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=K(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const T=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*T-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await it(e,t,rt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-f/2},{x:m-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(c),T=Z(t,{}),S=wS(0,0,m,f,d),w=b.path(S,T);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),C&&y.attr("style",C)}else y=rr(c,m,f,g);return i&&y.attr("style",i),t.width=m,t.height=f,Q(t,y),t.intersect=function(b){return X.polygon(t,g,b)},c}p(zg,"hexagon");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await it(e,t,rt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=V.svg(s),h=Z(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=gt(c),f=l.path(u,h),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(t,d),t.intersect=function(m){return H.info("Pill intersect",t,{points:c}),X.polygon(t,c,m)},s}p(Wg,"hourglass");async function Hg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=K(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await it(e,t,"icon-shape default"),f=t.pos==="t",d=n,m=n,{nodeBorder:g}=r,{stylesMap:y}=Fi(t),C=-m/2,b=-d/2,T=t.label?8:0,S=V.svg(h),w=Z(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=S.rectangle(C,b,m,d,w),M=Math.max(m,c.width),L=d+c.height+T,Y=S.rectangle(-M/2,-L/2,M,L,{...w,fill:"transparent",stroke:"none"}),N=h.insert(()=>v,":first-child"),O=h.insert(()=>Y);if(t.icon){const G=h.append("g");G.html(`<g>${await Bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const U=G.node().getBBox(),D=U.width,$=U.height,A=U.x,I=U.y;G.attr("transform",`translate(${-D/2-A},${f?c.height/2+T/2-$/2-I:-c.height/2-T/2-$/2-I})`),G.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-L/2:L/2-c.height})`),N.attr("transform",`translate(0,${f?c.height/2+T/2:-c.height/2-T/2})`),Q(t,O),t.intersect=function(G){if(H.info("iconSquare intersect",t,G),!t.label)return X.rect(t,G);const U=t.x??0,D=t.y??0,$=t.height??0;let A=[];return f?A=[{x:U-c.width/2,y:D-$/2},{x:U+c.width/2,y:D-$/2},{x:U+c.width/2,y:D-$/2+c.height+T},{x:U+m/2,y:D-$/2+c.height+T},{x:U+m/2,y:D+$/2},{x:U-m/2,y:D+$/2},{x:U-m/2,y:D-$/2+c.height+T},{x:U-c.width/2,y:D-$/2+c.height+T}]:A=[{x:U-m/2,y:D-$/2},{x:U+m/2,y:D-$/2},{x:U+m/2,y:D-$/2+d},{x:U+c.width/2,y:D-$/2+d},{x:U+c.width/2/2,y:D+$/2},{x:U-c.width/2,y:D+$/2},{x:U-c.width/2,y:D-$/2+d},{x:U-m/2,y:D-$/2+d}],X.polygon(t,A,G)},h}p(Hg,"icon");async function Yg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=K(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await it(e,t,"icon-shape default"),f=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=Fi(t),b=V.svg(h),T=Z(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const S=C.get("fill");T.stroke=S??y;const w=h.append("g");t.icon&&w.html(`<g>${await Bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),M=v.width,L=v.height,Y=v.x,N=v.y,O=Math.max(M,L)*Math.SQRT2+f*2,G=b.circle(0,0,O,T),U=Math.max(O,c.width),D=O+c.height+d,$=b.rectangle(-U/2,-D/2,U,D,{...T,fill:"transparent",stroke:"none"}),A=h.insert(()=>G,":first-child"),I=h.insert(()=>$);return w.attr("transform",`translate(${-M/2-Y},${m?c.height/2+d/2-L/2-N:-c.height/2-d/2-L/2-N})`),w.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-D/2:D/2-c.height})`),A.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),Q(t,I),t.intersect=function(E){return H.info("iconSquare intersect",t,E),X.rect(t,E)},h}p(Yg,"iconCircle");async function Ug(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=K(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Fi(t),T=-g/2,S=-m/2,w=t.label?8:0,v=V.svg(h),M=Z(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const Y=v.path(yr(T,S,g,m,5),M),N=Math.max(g,c.width),O=m+c.height+w,G=v.rectangle(-N/2,-O/2,N,O,{...M,fill:"transparent",stroke:"none"}),U=h.insert(()=>Y,":first-child").attr("class","icon-shape2"),D=h.insert(()=>G);if(t.icon){const $=h.append("g");$.html(`<g>${await Bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),I=A.width,E=A.height,_=A.x,q=A.y;$.attr("transform",`translate(${-I/2-_},${d?c.height/2+w/2-E/2-q:-c.height/2-w/2-E/2-q})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),U.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),Q(t,D),t.intersect=function($){if(H.info("iconSquare intersect",t,$),!t.label)return X.rect(t,$);const A=t.x??0,I=t.y??0,E=t.height??0;let _=[];return d?_=[{x:A-c.width/2,y:I-E/2},{x:A+c.width/2,y:I-E/2},{x:A+c.width/2,y:I-E/2+c.height+w},{x:A+g/2,y:I-E/2+c.height+w},{x:A+g/2,y:I+E/2},{x:A-g/2,y:I+E/2},{x:A-g/2,y:I-E/2+c.height+w},{x:A-c.width/2,y:I-E/2+c.height+w}]:_=[{x:A-g/2,y:I-E/2},{x:A+g/2,y:I-E/2},{x:A+g/2,y:I-E/2+m},{x:A+c.width/2,y:I-E/2+m},{x:A+c.width/2/2,y:I+E/2},{x:A-c.width/2,y:I+E/2},{x:A-c.width/2,y:I-E/2+m},{x:A-g/2,y:I-E/2+m}],X.polygon(t,_,$)},h}p(Ug,"iconRounded");async function jg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=K(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,g=n+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=Fi(t),T=-g/2,S=-m/2,w=t.label?8:0,v=V.svg(h),M=Z(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const Y=v.path(yr(T,S,g,m,.1),M),N=Math.max(g,c.width),O=m+c.height+w,G=v.rectangle(-N/2,-O/2,N,O,{...M,fill:"transparent",stroke:"none"}),U=h.insert(()=>Y,":first-child"),D=h.insert(()=>G);if(t.icon){const $=h.append("g");$.html(`<g>${await Bs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),I=A.width,E=A.height,_=A.x,q=A.y;$.attr("transform",`translate(${-I/2-_},${d?c.height/2+w/2-E/2-q:-c.height/2-w/2-E/2-q})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-O/2:O/2-c.height})`),U.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),Q(t,D),t.intersect=function($){if(H.info("iconSquare intersect",t,$),!t.label)return X.rect(t,$);const A=t.x??0,I=t.y??0,E=t.height??0;let _=[];return d?_=[{x:A-c.width/2,y:I-E/2},{x:A+c.width/2,y:I-E/2},{x:A+c.width/2,y:I-E/2+c.height+w},{x:A+g/2,y:I-E/2+c.height+w},{x:A+g/2,y:I+E/2},{x:A-g/2,y:I+E/2},{x:A-g/2,y:I-E/2+c.height+w},{x:A-c.width/2,y:I-E/2+c.height+w}]:_=[{x:A-g/2,y:I-E/2},{x:A+g/2,y:I-E/2},{x:A+g/2,y:I-E/2+m},{x:A+c.width/2,y:I-E/2+m},{x:A+c.width/2/2,y:I+E/2},{x:A-c.width/2,y:I+E/2},{x:A-c.width/2,y:I-E/2+m},{x:A-g/2,y:I-E/2+m}],X.polygon(t,_,$)},h}p(jg,"iconSquare");async function Gg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=K(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:f,label:d}=await it(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=V.svg(u),T=Z(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const S=b.rectangle(g,y,h,c,T),w=Math.max(h,f.width),v=c+f.height+C,M=b.rectangle(-w/2,-v/2,w,v,{...T,fill:"none",stroke:"none"}),L=u.insert(()=>S,":first-child"),Y=u.insert(()=>M);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",h),N.attr("height",c),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-h/2},${m?v/2-c:-v/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-c/2-f.height/2-C/2:c/2-f.height/2+C/2})`),L.attr("transform",`translate(0,${m?f.height/2+C/2:-f.height/2-C/2})`),Q(t,Y),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return X.rect(t,N);const O=t.x??0,G=t.y??0,U=t.height??0;let D=[];return m?D=[{x:O-f.width/2,y:G-U/2},{x:O+f.width/2,y:G-U/2},{x:O+f.width/2,y:G-U/2+f.height+C},{x:O+h/2,y:G-U/2+f.height+C},{x:O+h/2,y:G+U/2},{x:O-h/2,y:G+U/2},{x:O-h/2,y:G-U/2+f.height+C},{x:O-f.width/2,y:G-U/2+f.height+C}]:D=[{x:O-h/2,y:G-U/2},{x:O+h/2,y:G-U/2},{x:O+h/2,y:G-U/2+c},{x:O+f.width/2,y:G-U/2+c},{x:O+f.width/2/2,y:G+U/2},{x:O-f.width/2,y:G+U/2},{x:O-f.width/2,y:G-U/2+c},{x:O-h/2,y:G-U/2+c}],X.polygon(t,D,N)},u}p(Gg,"imageSquare");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=V.svg(n),g=Z(t,{}),y=gt(u),C=m.path(y,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=rr(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,Q(t,f),t.intersect=function(m){return X.polygon(t,u,m)},n}p(Xg,"inv_trapezoid");async function Vg(e,t){const{shapeSvg:r,bbox:i,label:s}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return X.rect(t,l)},r}p(Vg,"labelRect");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=V.svg(n),g=Z(t,{}),y=gt(u),C=m.path(y,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=rr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,Q(t,f),t.intersect=function(m){return X.polygon(t,u,m)},n}p(Zg,"lean_left");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=V.svg(n),g=Z(t,{}),y=gt(u),C=m.path(y,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=rr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,Q(t,f),t.intersect=function(m){return X.polygon(t,u,m)},n}p(Kg,"lean_right");function Qg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=V.svg(s),u=Z(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=gt(h),d=c.path(f,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),Q(t,m),t.intersect=function(g){return H.info("lightningBolt intersect",t,g),X.polygon(t,h,g)},s}p(Qg,"lightningBolt");var SS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),_S=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),vS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Qc=10,Jc=10;async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Jc&&(t.width=Jc);const T=C/2/(2.5+C/50);t.height=(t.height??0)-o-T*3,t.height<Qc&&(t.height=Qc)}const{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,f=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+o*2,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=V.svg(n),b=_S(0,0,c,d,u,f,m),T=vS(0,f,c,d,u,f),S=Z(t,{}),w=C.path(b,S),v=C.path(T,S);n.insert(()=>v,":first-child").attr("class","line"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=SS(0,0,c,d,u,f,m);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",zt(y)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),Q(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=X.rect(t,C),T=b.x-(t.x??0);if(u!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let S=f*f*(1-T*T/(u*u));S>0&&(S=Math.sqrt(S)),S=f-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}p(Jg,"linedCylinder");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:m}=t,g=V.svg(n),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...mr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,f,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(C.map(S=>[S.x,S.y]),y),T=n.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Q(t,T),t.intersect=function(S){return X.polygon(t,C,S)},n}p(tm,"linedWaveEdgedRect");async function em(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await it(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,m=f-2*n,g=-d/2,y=-m/2,{cssStyles:C}=t,b=V.svg(l),T=Z(t,{}),S=[{x:g-n,y:y+n},{x:g-n,y:y+m+n},{x:g+d-n,y:y+m+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-n},{x:g+d+n,y:y+m-n},{x:g+d+n,y:y-n},{x:g+n,y:y-n},{x:g+n,y},{x:g,y},{x:g,y:y+n}],w=[{x:g,y:y+n},{x:g+d-n,y:y+n},{x:g+d-n,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=gt(S);let M=b.path(v,T);const L=gt(w);let Y=b.path(L,T);t.look!=="handDrawn"&&(M=Un(M),Y=Un(Y));const N=l.insert("g",":first-child");return N.insert(()=>M),N.insert(()=>Y),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),Q(t,N),t.intersect=function(O){return X.polygon(t,S,O)},l}p(em,"multiRect");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await it(e,t,rt(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?f/4:f/8,m=f+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,T=mr(g-C,y+m+C,g+u-C,y+m+C,d,.8),S=T==null?void 0:T[T.length-1],w=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...T,{x:g+u-C,y:S.y-C},{x:g+u,y:S.y-C},{x:g+u,y:S.y-2*C},{x:g+u+C,y:S.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],v=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:S.y-C},{x:g+u,y:S.y-C},{x:g+u,y},{x:g,y}],M=V.svg(s),L=Z(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const Y=gt(w),N=M.path(Y,L),O=gt(v),G=M.path(O,L),U=s.insert(()=>N,":first-child");return U.insert(()=>G),U.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",i),U.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),Q(t,U),t.intersect=function(D){return X.polygon(t,w,D)},s}p(rm,"multiWaveEdgedRectangle");async function im(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=K(t);t.labelStyle=i,t.useHtmlLabels||ee(Ft())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,f=-c/2,{cssStyles:d}=t,m=V.svg(o),g=Z(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,f,h,c,g),C=o.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,C),t.intersect=function(b){return X.rect(t,b)},o}p(im,"note");var BS=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 sm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await it(e,t,rt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=V.svg(s),m=Z(t,{}),g=BS(0,0,l),y=d.path(g,m);u=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),f&&u.attr("style",f)}else u=rr(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=X.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}p(sm,"question");async function am(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),f=-c/2,d=-u/2,m=d/2,g=[{x:f+m,y:d},{x:f,y:0},{x:f+m,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:y}=t,C=V.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=gt(g),S=C.path(T,b),w=n.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Q(t,w),t.intersect=function(v){return X.polygon(t,g,v)},n}p(am,"rect_left_inv_arrow");async function om(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await hr(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ee(bt())){const L=c.children[0],Y=ut(c);u=L.getBoundingClientRect(),Y.attr("width",u.width),Y.attr("height",u.height)}H.info("Text 2",l);const f=l||[],d=c.getBBox(),m=await hr(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),g=m.children[0],y=ut(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ut(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ut(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),T=u.height+(t.padding||0),S=-u.width/2-C,w=-u.height/2-C;let v,M;if(t.look==="handDrawn"){const L=V.svg(a),Y=Z(t,{}),N=L.path(yr(S,w,b,T,t.rx||0),Y),O=L.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,Y);M=a.insert(()=>(H.debug("Rough node insert CXC",N),O),":first-child"),v=a.insert(()=>(H.debug("Rough node insert CXC",N),N),":first-child")}else v=o.insert("rect",":first-child"),M=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),M.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return Q(t,v),t.intersect=function(L){return X.rect(t,L)},a}p(om,"rectWithTitle");async function nm(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ei(e,t,s)}p(nm,"roundedRect");var wr=8;async function lm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?wr:wr*2),c=((t==null?void 0:t.height)??n.height)+a*2,u=h-wr,f=c,d=wr-h/2,m=-c/2,{cssStyles:g}=t,y=V.svg(o),C=Z(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+f},{x:d-wr,y:m+f},{x:d-wr,y:m},{x:d,y:m},{x:d,y:m+f}],T=y.polygon(b.map(w=>[w.x,w.y]),C),S=o.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path").attr("style",zt(g)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${wr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,S),t.intersect=function(w){return X.rect(t,w)},o}p(lm,"shadedProcess");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,f=c,d=u/1.5,m=-f/2,g=-d/2,{cssStyles:y}=t,C=V.svg(n),b=Z(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=[{x:m,y:g},{x:m,y:g+d},{x:m+f,y:g+d},{x:m+f,y:g-d/2}],S=gt(T),w=C.path(S,b),v=n.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Q(t,v),t.intersect=function(M){return X.polygon(t,T,M)},n}p(hm,"slopedRect");async function cm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ei(e,t,a)}p(cm,"squareRect");async function um(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),u=h/2,{cssStyles:f}=t,d=V.svg(n),m=Z(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...ys(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...ys(c/2-u,0,u,50,270,450)],y=gt(g),C=d.path(y,m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(T){return X.polygon(t,g,T)},n}p(um,"stadium");async function dm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ei(e,t,r)}p(dm,"state");function fm(e,t,{config:{themeVariables:r}}){var b,T;const{labelStyles:i,nodeStyles:s}=K(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=V.svg(c),f=Z(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=n??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const S=((T=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:T.id)??"",w=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return Q(t,C),t.intersect=function(S){return X.circle(t,(t.width??0)/2,S)},c}p(fm,"stateEnd");function pm(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=V.svg(a).circle(0,0,t.width,DT(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return Q(t,o),t.intersect=function(h){return X.circle(t,(t.width??7)/2,h)},a}p(pm,"stateStart");var Zr=8;async function gm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+2*Zr+a,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*Zr,f=c,d=-h/2,m=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=V.svg(n),C=Z(t,{}),b=y.rectangle(d,m,u+16,f,C),T=y.line(d+Zr,m,d+Zr,m+f,C),S=y.line(d+Zr+u,m,d+Zr+u,m+f,C);n.insert(()=>T,":first-child"),n.insert(()=>S,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:v}=t;w.attr("class","basic label-container").attr("style",zt(v)),Q(t,w)}else{const y=rr(n,u,f,g);i&&y.attr("style",i),Q(t,y)}return t.intersect=function(y){return X.polygon(t,g,y)},n}p(gm,"subroutine");var Ko=.2;async function mm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Ko*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Ko*h,u=Ko*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=V.svg(n),T=Z(t,{}),S=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],w=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=gt(S),M=b.path(v,T),L=gt(w),Y=b.path(L,{...T,fillStyle:"solid"}),N=n.insert(()=>Y,":first-child");return N.insert(()=>M,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),Q(t,N),t.intersect=function(O){return X.polygon(t,S,O)},n}p(mm,"taggedRect");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await it(e,t,rt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,f=l+h,{cssStyles:d}=t,m=V.svg(s),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...mr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,h,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,b=-f/2-u*.4,T=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...mr(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],S=gt(y),w=m.path(S,g),v=gt(T),M=m.path(v,{...g,fillStyle:"solid"}),L=s.insert(()=>M,":first-child");return L.insert(()=>w,":first-child"),L.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),Q(t,L),t.intersect=function(Y){return X.polygon(t,y,Y)},s}p(ym,"taggedWaveEdgedRectangle");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),Q(t,c),t.intersect=function(u){return X.rect(t,u)},s}p(Cm,"text");var LS=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
232
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
233
|
+
l${r},0
|
|
234
|
+
a${s},${a} 0,0,1 0,${i}
|
|
235
|
+
M${r},${-i}
|
|
236
|
+
a${s},${a} 0,0,0 0,${i}
|
|
237
|
+
l${-r},0`,"createCylinderPathD"),FS=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),AS=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),tu=5,eu=10;async function xm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-a,t.height<tu&&(t.height=tu);const C=g/2/(2.5+g/50);t.width=(t.width??0)-a-C*3,t.width<eu&&(t.width=eu)}const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=(t.height?t.height:n.height)+a,c=h/2,u=c/(2.5+h/50),f=(t.width?t.width:n.width)+u+a,{cssStyles:d}=t;let m;if(t.look==="handDrawn"){const g=V.svg(o),y=FS(0,0,f,h,u,c),C=AS(0,0,f,h,u,c),b=g.path(y,Z(t,{})),T=g.path(C,Z(t,{fill:"none"}));m=o.insert(()=>T,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=LS(0,0,f,h,u,c);m=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",zt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.attr("transform",`translate(${-f/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Q(t,m),t.intersect=function(g){const y=X.rect(t,g),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},o}p(xm,"tiltedCylinder");async function bm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=V.svg(n),g=Z(t,{}),y=gt(u),C=m.path(y,g);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=rr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,Q(t,f),t.intersect=function(m){return X.polygon(t,u,m)},n}p(bm,"trapezoid");async function km(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await it(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,m=V.svg(h),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=gt(y),b=m.path(C,g),T=h.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Q(t,T),t.intersect=function(S){return X.polygon(t,y,S)},h}p(km,"trapezoidalPentagon");var ru=10,iu=10;async function Tm(e,t){var S;const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<iu&&(t.width=iu),t.height=(t==null?void 0:t.height)??0,t.height<ru&&(t.height=ru));const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=tr((S=bt().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:m}=t,g=V.svg(o),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=gt(d),b=g.path(C,y),T=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=c,t.height=u,Q(t,T),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return H.info("Triangle intersect",t,d,w),X.polygon(t,d,w)},o}p(Tm,"triangle");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await it(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?f/4:f/8,m=f+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,T=V.svg(l),S=Z(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-u/2-b,y:m/2},...mr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],v=gt(w),M=T.path(v,S),L=l.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),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,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-f/2+(t.padding??0)-d-(h.y-(h.top??0))})`),Q(t,L),t.intersect=function(Y){return X.polygon(t,w,Y)},l}p(wm,"waveEdgedRectangle");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-S*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await it(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,f=c+u*2,{cssStyles:d}=t,m=V.svg(n),g=Z(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:f/2},...mr(-h/2,f/2,h/2,f/2,u,1),{x:h/2,y:-f/2},...mr(h/2,-f/2,-h/2,-f/2,u,-1)],C=gt(y),b=m.path(C,g),T=n.insert(()=>b,":first-child");return T.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),Q(t,T),t.intersect=function(S){return X.polygon(t,y,S)},n}p(Sm,"waveRectangle");var At=10;async function _m(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-At,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-At,10));const{shapeSvg:o,bbox:n,label:l}=await it(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+At,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+At,u=h-At,f=c-At,d=-u/2,m=-f/2,{cssStyles:g}=t,y=V.svg(o),C=Z(t,{}),b=[{x:d-At,y:m-At},{x:d-At,y:m+f},{x:d+u,y:m+f},{x:d+u,y:m-At}],T=`M${d-At},${m-At} L${d+u},${m-At} L${d+u},${m+f} L${d-At},${m+f} L${d-At},${m-At}
|
|
238
|
+
M${d-At},${m} L${d+u},${m}
|
|
239
|
+
M${d},${m-At} L${d},${m+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=y.path(T,C),w=o.insert(()=>S,":first-child");return w.attr("transform",`translate(${At/2}, ${At/2})`),w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+At/2-(n.x-(n.left??0))}, ${-(n.height/2)+At/2-(n.y-(n.top??0))})`),Q(t,w),t.intersect=function(v){return X.polygon(t,b,v)},o}p(_m,"windowPane");var su=new Set(["redux-color","redux-dark-color"]),ES=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ql(e,t){var ht,Wt,fe,pe;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Ft(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:J}=Ft(),{background:ct}=J,_t={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Ql(e,_t)}const h=Ft();t.useHtmlLabels=h.htmlLabels;let c=((ht=h.er)==null?void 0:ht.diagramPadding)??10,u=((Wt=h.er)==null?void 0:Wt.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:m}=K(t);if(r.attributes.length===0&&t.label){const J={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Je(t.label,h)+J.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const ct=await Ei(e,t,J);if(i!=null&&su.has(i)){const _t=r.colorIndex??0;ct.attr("data-color-id",`color-${_t%l.length}`)}if(!tr(h.htmlLabels)){const _t=ct.select("text"),Et=(fe=_t.node())==null?void 0:fe.getBBox();_t.attr("transform",`translate(${-Et.width/2}, 0)`)}return ct}h.htmlLabels||(c*=1.25,u*=1.25);let g=rt(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Jr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const T=[],S=[];let w=0,v=0,M=0,L=0,Y=!0,N=!0;for(const J of r.attributes){const ct=await Jr(y,J.type,h,0,b,["attribute-type"],d);w=Math.max(w,ct.width+c);const _t=await Jr(y,J.name,h,0,b,["attribute-name"],d);v=Math.max(v,_t.width+c);const Et=await Jr(y,J.keys.join(),h,0,b,["attribute-keys"],d);M=Math.max(M,Et.width+c);const We=await Jr(y,J.comment,h,0,b,["attribute-comment"],d);L=Math.max(L,We.width+c);const Ce=Math.max(ct.height,_t.height,Et.height,We.height)+u;S.push({yOffset:b,rowHeight:Ce}),b+=Ce}let O=4;M<=c&&(Y=!1,M=0,O--),L<=c&&(N=!1,L=0,O--);const G=y.node().getBBox();if(C.width+c*2-(w+v+M+L)>0){const J=C.width+c*2-(w+v+M+L);w+=J/O,v+=J/O,M>0&&(M+=J/O),L>0&&(L+=J/O)}const U=w+v+M+L,D=V.svg(y),$=Z(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let A=0;S.length>0&&(A=S.reduce((J,ct)=>J+((ct==null?void 0:ct.rowHeight)??0),0));const I=Math.max(G.width+c*2,(t==null?void 0:t.width)||0,U),E=Math.max((A??0)+C.height,(t==null?void 0:t.height)||0),_=-I/2,q=-E/2;if(y.selectAll("g:not(:first-child)").each((J,ct,_t)=>{const Et=ut(_t[ct]),We=Et.attr("transform");let Ce=0,vt=0;if(We){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(We);wt&&(Ce=parseFloat(wt[1]),vt=parseFloat(wt[2]),Et.attr("class").includes("attribute-name")?Ce+=w:Et.attr("class").includes("attribute-keys")?Ce+=w+v:Et.attr("class").includes("attribute-comment")&&(Ce+=w+v+M))}Et.attr("transform",`translate(${_+c/2+Ce}, ${vt+q+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(q+u/2)+")"),i!=null&&su.has(i)){const J=r.colorIndex??0;y.attr("data-color-id",`color-${J%l.length}`)}const lt=D.rectangle(_,q,I,E,$),dt=y.insert(()=>lt,":first-child").attr("class","outer-path").attr("style",f.join(""));T.push(0);for(const[J,ct]of S.entries()){const Et=(J+1)%2===0&&ct.yOffset!==0,We=D.rectangle(_,C.height+q+(ct==null?void 0:ct.yOffset),I,ct==null?void 0:ct.rowHeight,{...$,fill:Et?a:o,stroke:n});y.insert(()=>We,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Et?"even":"odd"}`)}const yt=1e-4;let pt=ti(_,C.height+q,I+_,C.height+q,yt),xt=D.polygon(pt.map(J=>[J.x,J.y]),$);if(y.insert(()=>xt).attr("class","divider"),pt=ti(w+_,C.height+q,w+_,E+q,yt),xt=D.polygon(pt.map(J=>[J.x,J.y]),$),y.insert(()=>xt).attr("class","divider"),Y){const J=w+v+_;pt=ti(J,C.height+q,J,E+q,yt),xt=D.polygon(pt.map(ct=>[ct.x,ct.y]),$),y.insert(()=>xt).attr("class","divider")}if(N){const J=w+v+M+_;pt=ti(J,C.height+q,J,E+q,yt),xt=D.polygon(pt.map(ct=>[ct.x,ct.y]),$),y.insert(()=>xt).attr("class","divider")}for(const J of T){const ct=C.height+q+J;pt=ti(_,ct,I+_,ct,yt),xt=D.polygon(pt.map(_t=>[_t.x,_t.y]),$),y.insert(()=>xt).attr("class","divider")}if(Q(t,dt),m&&t.look!=="handDrawn")if(i!=null&&ES.has(i))y.selectAll("path").attr("style",m);else{const J=m.split(";"),ct=(pe=J==null?void 0:J.filter(_t=>_t.includes("stroke")))==null?void 0:pe.map(_t=>`${_t}`).join("; ");y.selectAll("path").attr("style",ct??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(J){return X.rect(t,J)},y}p(Ql,"erBox");async function Jr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Xh(t)&&(t=Xh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await er(n,t,{width:Je(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(tr(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ut(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}p(Jr,"addText");function ti(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(ti,"lineToPolygon");async function vm(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ts(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ts(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();f=m.height,h=o.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const T=await ts(h,b,g,[b.parseClassifier()]);g+=T+a}d=h.node().getBBox().height,d<=0&&(d=s/2),c=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const T=await ts(c,b,y,[b.parseClassifier()]);y+=T+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(vm,"textHelper");async function ts(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ft();let o="useHtmlLabels"in t?t.useHtmlLabels:tr(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),ls(n)&&(o=!0);const l=await er(s,nl(Pr(n)),{width:Je(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const u=l.children[0],f=ut(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const T=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(T,10)*5+"px";g.style.minWidth=w,g.style.maxWidth=w}else g.style.width="100%";y(g)}p(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ut(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(ts,"addText");async function Bm(e,t){var D,$;const r=bt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??tr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await vm(e,t,r,n,o),{labelStyles:u,nodeStyles:f}=K(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((D=l.styles)==null?void 0:D.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!(($=r.class)!=null&&$.hideEmptyMembersBox),g=V.svg(h),y=Z(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const T=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const S=-C/2,w=-b/2;let v=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;T&&(v=a*2);const M=g.rectangle(S-a,w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+v,y),L=h.insert(()=>M,":first-child");L.attr("class","basic label-container outer-path");const Y=L.node().getBBox(),N=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,O=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,G=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,U=(N+O+w+a-(w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((A,I,E)=>{var pt,xt;const _=ut(E[I]),q=_.attr("transform");let lt=0;if(q){const Wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);Wt&&(lt=parseFloat(Wt[2]))}let dt=lt+w+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(_.attr("class").includes("methods-group")){const ht=Math.max(G,o/2);T?dt=Math.max(U,N+O+ht+w+o*2+a)+o*2:dt=N+O+ht+w+o*4+a}l.members.length===0&&l.methods.length===0&&((pt=r.class)!=null&&pt.hideEmptyMembersBox)&&(l.annotations.length>0?dt=lt-o:dt=lt),n||(dt-=4);let yt=S;(_.attr("class").includes("label-group")||_.attr("class").includes("annotation-group"))&&(yt=-((xt=_.node())==null?void 0:xt.getBBox().width)/2||0,h.selectAll("text").each(function(ht,Wt,fe){window.getComputedStyle(fe[Wt]).textAnchor==="middle"&&(yt=0)})),_.attr("transform",`translate(${yt}, ${dt})`)}),l.members.length>0||l.methods.length>0||m){const A=N+O+w+a,I=g.line(Y.x,A,Y.x+Y.width,A+.001,y);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const A=N+O+G+w+o*2+a,I=g.line(Y.x,T?Math.max(U,A):A,Y.x+Y.width,(T?Math.max(U,A):A)+.001,y);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const A=RegExp(/color\s*:\s*([^;]*)/),I=A.exec(d);if(I){const E=I[0].replace("color","fill");h.selectAll("tspan").attr("style",E)}else if(u){const E=A.exec(u);if(E){const _=E[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}}}return Q(t,L),t.intersect=function(A){return X.rect(t,A)},h}p(Bm,"classBox");async function Lm(e,t){var Y,N;const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=rt(t),{themeVariables:c}=bt(),{borderColorArray:u,requirementEdgeLabelBackground:f}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Oe(d,`<<${s.type}>>`,0,t.labelStyle):m=await Oe(d,"<<Element>>",0,t.labelStyle);let g=m;const y=await Oe(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+n,l){const O=await Oe(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=O;const G=await Oe(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=G;const U=await Oe(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=U,await Oe(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const O=await Oe(d,`${a.type?`Type: ${a.type}`:""}`,g,t.labelStyle);g+=O,await Oe(d,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,g,t.labelStyle)}const C=(((Y=d.node())==null?void 0:Y.getBBox().width)??200)+o,b=(((N=d.node())==null?void 0:N.getBBox().height)??200)+o,T=-C/2,S=-b/2,w=V.svg(d),v=Z(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const M=w.rectangle(T,S,C,b,v),L=d.insert(()=>M,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const O=t.colorIndex??0;d.attr("data-color-id",`color-${O%u.length}`)}if(d.selectAll(".label").each((O,G,U)=>{const D=ut(U[G]),$=D.attr("transform");let A=0,I=0;if($){const lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($);lt&&(A=parseFloat(lt[1]),I=parseFloat(lt[2]))}const E=I-b/2;let _=T+o/2;(G===0||G===1)&&(_=A),D.attr("transform",`translate(${_}, ${E+o})`)}),g>m+y+n){const O=S+m+y+n;let G;if(t.look==="neo"){const $=[[T,O],[T+C,O],[T+C,O+.001],[T,O+.001]];G=w.polygon($,v)}else G=w.line(T,O,T+C,O,v);d.insert(()=>G).attr("class","divider")}return Q(t,L),t.intersect=function(O){return X.rect(t,O)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}p(Lm,"requirementBox");async function Oe(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=bt(),o=a.htmlLabels??!0,n=await er(s,nl(Pr(t)),{width:Je(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ut(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(Oe,"addText");var MS=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 Fm(e,t,{config:r}){var G,U;const{labelStyles:i,nodeStyles:s}=K(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await it(e,t,rt(t)),c=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((G=r==null?void 0:r.kanban)!=null&&G.ticketBaseUrl)&&(u=(U=r==null?void 0:r.kanban)==null?void 0:U.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,g;f?{label:m,bbox:g}=await Zo(f,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await Zo(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await Zo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,T=(t==null?void 0:t.width)||0,S=Math.max(g.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,v=-T/2,M=-w/2;h.attr("transform","translate("+(c-T/2)+", "+(-S-l.height/2)+")"),m.attr("transform","translate("+(c-T/2)+", "+(-S+l.height/2)+")"),y.attr("transform","translate("+(c+T/2-C.width-2*a)+", "+(-S+l.height/2)+")");let L;const{rx:Y,ry:N}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const D=V.svg(n),$=Z(t,{}),A=Y||N?D.path(yr(v,M,T,w,Y||0),$):D.rectangle(v,M,T,w,$);L=n.insert(()=>A,":first-child"),L.attr("class","basic label-container").attr("style",O||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",Y??5).attr("ry",N??5).attr("x",v).attr("y",M).attr("width",T).attr("height",w);const D="priority"in t&&t.priority;if(D){const $=n.append("line"),A=v+2,I=M+Math.floor((Y??0)/2),E=M+w-Math.floor((Y??0)/2);$.attr("x1",A).attr("y1",I).attr("x2",A).attr("y2",E).attr("stroke-width","4").attr("stroke",MS(D))}}return Q(t,L),t.height=w,t.intersect=function(D){return X.rect(t,D)},n}p(Fm,"kanbanItem");async function Am(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await it(e,t,rt(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,m=Math.max(l,f),g=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
|
|
240
|
+
a${c},${c} 1 0,0 ${m*.25},${-1*g*.1}
|
|
241
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
242
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
243
|
+
a${c},${c} 1 0,0 ${m*.25},${g*.1}
|
|
244
|
+
|
|
245
|
+
a${c},${c} 1 0,0 ${m*.15},${g*.33}
|
|
246
|
+
a${c*.8},${c*.8} 1 0,0 0,${g*.34}
|
|
247
|
+
a${c},${c} 1 0,0 ${-1*m*.15},${g*.33}
|
|
248
|
+
|
|
249
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${g*.15}
|
|
250
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
251
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
252
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${-1*g*.15}
|
|
253
|
+
|
|
254
|
+
a${c},${c} 1 0,0 ${-1*m*.1},${-1*g*.33}
|
|
255
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34}
|
|
256
|
+
a${c},${c} 1 0,0 ${m*.1},${-1*g*.33}
|
|
257
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=V.svg(s),T=Z(t,{}),S=b.path(C,T);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",zt(u))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),Q(t,y),t.calcIntersect=function(b,T){return X.rect(b,T)},t.intersect=function(b){return H.info("Bang intersect",t,b),X.rect(t,b)},s}p(Am,"bang");async function Em(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await it(e,t,rt(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
|
|
258
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
259
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
260
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
261
|
+
|
|
262
|
+
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
263
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
|
|
264
|
+
|
|
265
|
+
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
266
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
267
|
+
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
268
|
+
|
|
269
|
+
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
270
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
|
|
271
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=V.svg(s),b=Z(t,{}),T=C.path(y,b);g=s.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",zt(m))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),Q(t,g),t.calcIntersect=function(C,b){return X.rect(C,b)},t.intersect=function(C){return H.info("Cloud intersect",t,C),X.rect(t,C)},s}p(Em,"cloud");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await it(e,t,rt(t)),l=a.width+8*o,h=a.height+2*o,c=5,u=t.look==="neo"?`
|
|
272
|
+
M${-l/2} ${h/2-c}
|
|
273
|
+
v${-h+2*c}
|
|
274
|
+
q0,-${c} ${c},-${c}
|
|
275
|
+
h${l-2*c}
|
|
276
|
+
q${c},0 ${c},${c}
|
|
277
|
+
v${h-c}
|
|
278
|
+
H${-l/2}
|
|
279
|
+
Z
|
|
280
|
+
`:`
|
|
281
|
+
M${-l/2} ${h/2-c}
|
|
282
|
+
v${-h+2*c}
|
|
283
|
+
q0,-${c} ${c},-${c}
|
|
284
|
+
h${l-2*c}
|
|
285
|
+
q${c},0 ${c},${c}
|
|
286
|
+
v${h-2*c}
|
|
287
|
+
q0,${c} ${-c},${c}
|
|
288
|
+
h${-(l-2*c)}
|
|
289
|
+
q${-c},0 ${-c},${-c}
|
|
290
|
+
Z
|
|
291
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),Q(t,f),t.calcIntersect=function(d,m){return X.rect(d,m)},t.intersect=function(d){return X.rect(t,d)},s}p(Mm,"defaultMindmapNode");async function $m(e,t){const r={padding:t.padding??0};return Kl(e,t,r)}p($m,"mindmapCircle");var $S=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:cm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:nm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:um},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:gm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:$g},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Og},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Kl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Am},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Em},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:sm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:zg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Kg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Zg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:bm},{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:Xg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Dg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Cm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:_g},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:lm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:pm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:fm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ng},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Wg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Fg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Ag},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Eg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Qg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:wm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:qg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:xm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Jg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Mg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ig},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Tm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:_m},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Pg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:km},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Rg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:hm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:rm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:em},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Sg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Lg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ym},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:mm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Sm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:am},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tm}],OS=p(()=>{const t=[...Object.entries({state:dm,choice:vg,note:im,rectWithTitle:om,labelRect:Vg,iconSquare:jg,iconCircle:Yg,icon:Hg,iconRounded:Ug,imageSquare:Gg,anchor:Tg,kanbanItem:Fm,mindmapCircle:$m,defaultMindmapNode:Mm,classBox:Bm,erBox:Ql,requirementBox:Lm}),...$S.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Om=OS();function IS(e){return e in Om}p(IS,"isValidShape");var so=new Map;async function Im(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Om[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),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",zt(t.look)),t.tooltip&&s.attr("title",t.tooltip),so.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Im,"insertNode");var hF=p((e,t)=>{so.set(t.id,e)},"setNodeElem"),cF=p(()=>{so.clear()},"clear"),uF=p(e=>{const t=so.get(e.id);H.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"),DS=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&au(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&au(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),PS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},RS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],au=p((e,t,r,i,s,a,o=!1,n)=>{var m;const l=PS[r],h=l&&RS.includes(l.type);if(!l){H.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),NS=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=bt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),za=new Map,Ut=new Map,dF=p(()=>{za.clear(),Ut.clear()},"clear"),Gi=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),qS=p(async(e,t)=>{const r=bt();let i=ee(r);const{labelStyles:s}=K(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await er(e,t.label,{style:Gi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),H.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=ut(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ut(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Wi(u,i)),za.set(t.id,a),t.width=c.width,t.height=c.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await hr(m,t.startLabelLeft,Gi(t.labelStyle)||"",!1,!1);f=g;let y=g.getBBox();if(i){const C=g.children[0],b=ut(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startLeft=d,es(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await hr(m,t.startLabelRight,Gi(t.labelStyle)||"",!1,!1);f=g;let y=g.getBBox();if(i){const C=g.children[0],b=ut(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startRight=d,es(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await hr(d,t.endLabelLeft,Gi(t.labelStyle)||"",!1,!1);f=g;let y=g.getBBox();if(i){const C=g.children[0],b=ut(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endLeft=d,es(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await hr(d,t.endLabelRight,Gi(t.labelStyle)||"",!1,!1);f=g;let y=g.getBBox();if(i){const C=g.children[0],b=ut(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",Wi(y,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endRight=d,es(f,t.endLabelRight)}return h},"insertEdgeLabel");function es(e,t){ee(bt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(es,"setTerminalWidth");var zS=p((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,za.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=bt(),{subGraphTitleTotalMargin:s}=Rl(i);if(e.label){const a=za.get(e.id);let o=e.x,n=e.y;if(r){const l=Se.calcLabelPosition(r);H.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ut.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),WS=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),HS=p((e,t,r)=>{H.debug(`intersection calc abc89:
|
|
292
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
293
|
+
insidePoint : ${JSON.stringify(r)}
|
|
294
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const f={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),h===0&&(f.y=t.y),H.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,f=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return H.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),c===0&&(f=t.x),h===0&&(d=t.y),{x:f,y:d}}},"intersection"),ou=p((e,t)=>{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(H.info("abc88 checking point",a,t),!WS(t,a)&&!s){const o=HS(t,i,a);H.debug("abc88 inside",a,i,o),H.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?H.warn("abc88 no intersect",o,r):r.push(o),s=!0}else H.warn("abc88 outside",a,i),i=a,s||r.push(a)}),H.debug("returning points",r),r},"cutPathAtIntersect");function Dm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Dm,"extractCornerPoints");var nu=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),YS=p(function(e){const{cornerPointPositions:t}=Dm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=nu(s,o,5),l=nu(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){H.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?f={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:f={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else H.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),US=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),jS=p(function(e,t,r,i,s,a,o,n=!1){var I;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=bt();let h=t.points,c=!1;const u=s;var f=a;const d=[];for(const E in t.cssCompiledStyles)Op(E)||d.push(t.cssCompiledStyles[E]);H.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),H.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],f,f.intersect(h[h.length-1])),h.push(f.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(H.info("to cluster abc88",r.get(t.toCluster)),h=ou(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(H.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=ou(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(E=>!Number.isNaN(E.y));const y=NS(t.curve);y!=="rounded"&&(g=YS(g));let C=as;switch(y){case"linear":C=as;break;case"basis":C=Cn;break;case"cardinal":C=kd;break;case"bumpX":C=md;break;case"bumpY":C=yd;break;case"catmullRom":C=wd;break;case"monotoneX":C=Fd;break;case"monotoneY":C=Ad;break;case"natural":C=Md;break;case"step":C=$d;break;case"stepAfter":C=Id;break;case"stepBefore":C=Od;break;case"rounded":C=as;break;default:C=Cn}const{x:b,y:T}=N2(t),S=Tk().x(b).y(T).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let v,M=y==="rounded"?Pm(Rm(g,t),5):S(g);const L=Array.isArray(t.style)?t.style:[t.style];let Y=L.find(E=>E==null?void 0:E.startsWith("stroke:")),N="";t.animate&&(N="edge-animation-fast"),t.animation&&(N="edge-animation-"+t.animation);let O=!1;if(t.look==="handDrawn"){const E=V.svg(e);Object.assign([],g);const _=E.path(M,{roughness:.3,seed:l});w+=" transition",v=ut(_).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",L?L.reduce((lt,dt)=>lt+";"+dt,""):"");let q=v.attr("d");v.attr("d",q),e.node().appendChild(v.node())}else{const E=d.join(";"),_=L?L.reduce((xt,ht)=>xt+ht+";",""):"",q=(E?E+";"+_+";":_)+";"+(L?L.reduce((xt,ht)=>xt+";"+ht,""):"");v=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(N?" "+N:"")).attr("style",q),Y=(I=q.match(/stroke:([^;]+)/))==null?void 0:I[1],O=t.animate===!0||!!t.animation||E.includes("animation");const lt=v.node(),dt=typeof lt.getTotalLength=="function"?lt.getTotalLength():0,yt=kc[t.arrowTypeStart]||0,pt=kc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!O){const ht=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?US(dt,yt,pt):`0 ${yt} ${dt-yt-pt} ${pt}`}; stroke-dashoffset: 0;`;v.attr("style",ht+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",m),v.attr("data-look",zt(t.look)),t.showPoints&&g.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let G="";(bt().flowchart.arrowMarkerAbsolute||bt().state.arrowMarkerAbsolute)&&(G=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,G=G.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);const U=!O&&(t==null?void 0:t.look)==="neo";DS(v,t,G,o,i,U,Y);const D=Math.floor(h.length/2),$=h[D];Se.isLabelCoordinateInPath($,v.attr("d"))||(c=!0);let A={};return c&&(A.updatedPath=h),A.originalPath=t.points,A},"insertEdge");function Pm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=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 h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(h,c),m=Math.hypot(u,f);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const g=h/d,y=c/d,C=u/m,b=f/m,T=g*C+y*b,S=Math.max(-1,Math.min(1,T)),w=Math.acos(S);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(w/2),d/2,m/2),M=o.x-g*v,L=o.y-y*v,Y=o.x+C*v,N=o.y+b*v;r+=`L${M},${L}`,r+=`Q${o.x},${o.y} ${Y},${N}`}}return r}p(Pm,"generateRoundedPath");function Xn(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(Xn,"calculateDeltaAndAngle");function Rm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Xt[t.arrowTypeStart]){const s=Xt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Xn(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Xt[t.arrowTypeEnd]){const s=Xt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Xn(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}p(Rm,"applyMarkerOffsetsToPoints");var GS=p((e,t,r,i)=>{t.forEach(s=>{m_[s](e,r,i)})},"insertMarkers"),XS=p((e,t,r)=>{H.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",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",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"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),VS=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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ZS=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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),KS=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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),QS=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("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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),JS=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"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),t_=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"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),e_=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"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),r_=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"),i_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),s_=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"),a_=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),o_=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"),n_=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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),l_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a}=s;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),h_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=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("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),c_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a}=s;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),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("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),u_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=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("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=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").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),d_=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
|
|
295
|
+
L20,10
|
|
296
|
+
M20,10
|
|
297
|
+
L0,20`)},"requirement_arrow"),f_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a}=s;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").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
298
|
+
L20,10
|
|
299
|
+
M20,10
|
|
300
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),p_=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"),g_=p((e,t,r)=>{const i=Ft(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),m_={extension:XS,composition:VS,aggregation:ZS,dependency:KS,lollipop:QS,point:JS,circle:t_,cross:e_,barb:r_,barbNeo:i_,only_one:s_,zero_or_one:a_,one_or_more:o_,zero_or_more:n_,only_one_neo:l_,zero_or_one_neo:h_,one_or_more_neo:c_,zero_or_more_neo:u_,requirement_arrow:d_,requirement_contains:p_,requirement_arrow_neo:f_,requirement_contains_neo:g_},y_=GS,C_={common:ks,getConfig:Ft,insertCluster:gS,insertEdge:jS,insertEdgeLabel:qS,insertMarkers:y_,insertNode:Im,interpolateToCurve:Ml,labelHelper:it,log:H,positionEdgeLabel:zS},Cs={},Nm=p(e=>{for(const t of e)Cs[t.name]=t},"registerLayoutLoaders"),x_=p(()=>{Nm([{name:"dagre",loader:p(async()=>await mt(()=>import("./dagre-BM42HDAG-BScsLv8J.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await mt(()=>import("./cose-bilkent-S5V4N54A-Cqajiw-2.js"),__vite__mapDeps([6,7,3,4,5])),"loader")}])},"registerDefaultLayoutLoaders");x_();var fF=p(async(e,t)=>{if(!(e.layoutAlgorithm in Cs))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=Cs[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,C_,{algorithm:r.algorithm})},"render"),pF=p((e="",{fallback:t="dagre"}={})=>{if(e in Cs)return e;if(t in Cs)return H.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"),Jl="comm",qm="rule",zm="decl",b_="@media",k_="@import",T_="@supports",w_="@namespace",Vn="@keyframes",Wm="@layer",S_="@scope",__=Math.abs,ns=String.fromCharCode;function Hm(e){return e.trim()}function Zn(e,t,r){return e.replace(t,r)}function oi(e,t){return e.charCodeAt(t)|0}function Bi(e,t,r){return e.slice(t,r)}function Ie(e){return e.length}function Ym(e){return e.length}function Zs(e,t){return t.push(e),e}var ao=1,Li=1,Um=0,ye=0,It=0,Mi="";function th(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:ao,column:Li,length:o,return:"",siblings:n}}function v_(){return It}function B_(){return It=ye>0?oi(Mi,--ye):0,Li--,It===10&&(Li=1,ao--),It}function ve(){return It=ye<Um?oi(Mi,ye++):0,Li++,It===10&&(Li=1,ao++),It}function cr(){return oi(Mi,ye)}function ca(){return ye}function oo(e,t){return Bi(Mi,e,t)}function xs(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 L_(e){return ao=Li=1,Um=Ie(Mi=e),ye=0,[]}function F_(e){return Mi="",e}function Qo(e){return Hm(oo(ye-1,Kn(e===91?e+2:e===40?e+1:e)))}function A_(e){for(;(It=cr())&&It<33;)ve();return xs(e)>2||xs(It)>3?"":" "}function E_(e,t){for(;--t&&ve()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return oo(e,ca()+(t<6&&cr()==32&&ve()==32))}function Kn(e){for(;ve();)switch(It){case e:return ye;case 34:case 39:e!==34&&e!==39&&Kn(It);break;case 40:e===41&&Kn(e);break;case 92:ve();break}return ye}function M_(e,t){for(;ve()&&e+It!==57;)if(e+It===84&&cr()===47)break;return"/*"+oo(t,ye-1)+"*"+ns(e===47?e:ve())}function $_(e){for(;!xs(cr());)ve();return oo(e,ye)}function O_(e){return F_(ua("",null,null,null,[""],e=L_(e),0,[0],e))}function ua(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,u=o,f=0,d=0,m=0,g=1,y=1,C=1,b=0,T=0,S="",w=s,v=a,M=i,L=S;y;)switch(m=T,T=ve()){case 40:m!=108&&oi(L,u-1)==58?(b++,L+="("):L+=Qo(T);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=Qo(T);break;case 9:case 10:case 13:case 32:if(b>0){L+=ns(T);break}L+=A_(m);break;case 92:L+=E_(ca()-1,7);continue;case 47:switch(cr()){case 42:case 47:Zs(I_(M_(ve(),ca()),t,r,l),l),(xs(m||1)==5||xs(cr()||1)==5)&&Ie(L)&&Bi(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*g:n[h++]=Ie(L)*C;case 125*g:case 59:case 0:if(b>0&&T){L+=ns(T);break}switch(T){case 0:case 125:y=0;case 59+c:C==-1&&(L=Zn(L,/\f/g,"")),d>0&&(Ie(L)-u||g===0)&&Zs(d>32?hu(L+";",i,r,u-1,l):hu(Zn(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(Zs(M=lu(L,t,r,h,c,s,n,S,w=[],v=[],u,a),a),T===123)if(c===0)ua(L,t,M,M,w,a,u,n,v);else{switch(f){case 99:if(oi(L,3)===110)break;case 108:if(oi(L,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ua(e,M,M,i&&Zs(lu(e,M,M,0,0,s,n,S,s,w=[],u,v),v),s,v,u,n,i?w:v):ua(L,M,M,M,[""],v,0,n,v)}}h=c=d=0,g=C=1,S=L="",u=o;break;case 58:u=1+Ie(L),d=m;default:if(g<1){if(T==123)--g;else if(T==125&&g++==0&&B_()==125)continue}switch(L+=ns(T),T*g){case 38:C=c>0?1:(L+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Ie(L)-1)*C,C=1;break;case 64:cr()===45&&(L+=Qo(ve())),f=cr(),c=u=Ie(S=L+=$_(ca())),T++;break;case 45:m===45&&Ie(L)==2&&(g=0)}}return a}function lu(e,t,r,i,s,a,o,n,l,h,c,u){for(var f=s-1,d=s===0?a:[""],m=Ym(d),g=0,y=0,C=0;g<i;++g)for(var b=0,T=Bi(e,f+1,f=__(y=o[g])),S=e;b<m;++b)(S=Hm(y>0?d[b]+" "+T:Zn(T,/&\f/g,d[b])))&&(l[C++]=S);return th(e,t,r,s===0?qm:n,l,h,c,u)}function I_(e,t,r,i){return th(e,t,r,Jl,ns(v_()),Bi(e,2,-2),0,i)}function hu(e,t,r,i,s){return th(e,t,r,zm,Bi(e,0,i),Bi(e,i+1,-1),i,s)}function Qn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function D_(e,t,r,i){switch(e.type){case Wm:if(e.children.length)break;case k_:case w_:case zm:return e.return=e.return||e.value;case Jl:return"";case Vn:return e.return=e.value+"{"+Qn(e.children,i)+"}";case qm:if(!Ie(e.value=e.props.join(",")))return""}return Ie(r=Qn(e.children,i))?e.return=e.value+"{"+r+"}":""}function P_(e){var t=Ym(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var jm="c4",R_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),N_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-DMleCZQv.js");return{diagram:t}},__vite__mapDeps([8,9,3,4,5]));return{id:jm,diagram:e}},"loader"),q_={id:jm,detector:R_,loader:N_},z_=q_,Gm="flowchart",W_=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),H_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-00TiWiHH.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14,3,4,5]));return{id:Gm,diagram:e}},"loader"),Y_={id:Gm,detector:W_,loader:H_},U_=Y_,Xm="flowchart-v2",j_=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),G_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-00TiWiHH.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14,3,4,5]));return{id:Xm,diagram:e}},"loader"),X_={id:Xm,detector:j_,loader:G_},V_=X_,Vm="er",Z_=p(e=>/^\s*erDiagram/.test(e),"detector"),K_=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-DnVqKEfD.js");return{diagram:t}},__vite__mapDeps([15,12,13,14,3,4,5]));return{id:Vm,diagram:e}},"loader"),Q_={id:Vm,detector:Z_,loader:K_},J_=Q_,Zm="gitGraph",tv=p(e=>/^\s*gitGraph/.test(e),"detector"),ev=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-DebPzL-q.js");return{diagram:t}},__vite__mapDeps([16,17,18,19,3,4,5]));return{id:Zm,diagram:e}},"loader"),rv={id:Zm,detector:tv,loader:ev},iv=rv,Km="gantt",sv=p(e=>/^\s*gantt/.test(e),"detector"),av=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DhmsSHDy.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,3,4,5]));return{id:Km,diagram:e}},"loader"),ov={id:Km,detector:sv,loader:av},nv=ov,Qm="info",lv=p(e=>/^\s*info/.test(e),"detector"),hv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-BlWEgGgR.js");return{diagram:t}},__vite__mapDeps([24,19,3,4,5]));return{id:Qm,diagram:e}},"loader"),cv={id:Qm,detector:lv,loader:hv},Jm="pie",uv=p(e=>/^\s*pie/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-BOU-b_Ew.js");return{diagram:t}},__vite__mapDeps([25,17,19,3,4,5,26,27,22]));return{id:Jm,diagram:e}},"loader"),fv={id:Jm,detector:uv,loader:dv},ty="quadrantChart",pv=p(e=>/^\s*quadrantChart/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-BSS1N1TF.js");return{diagram:t}},__vite__mapDeps([28,21,22,23,3,4,5]));return{id:ty,diagram:e}},"loader"),mv={id:ty,detector:pv,loader:gv},yv=mv,ey="xychart",Cv=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),xv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-ko8fvtbV.js");return{diagram:t}},__vite__mapDeps([29,22,27,21,23,3,4,5]));return{id:ey,diagram:e}},"loader"),bv={id:ey,detector:Cv,loader:xv},kv=bv,ry="requirement",Tv=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-DsN8PjFw.js");return{diagram:t}},__vite__mapDeps([30,12,13,3,4,5]));return{id:ry,diagram:e}},"loader"),Sv={id:ry,detector:Tv,loader:wv},_v=Sv,iy="sequence",vv=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),Bv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-DrDAXqp6.js");return{diagram:t}},__vite__mapDeps([31,9,18,3,4,5]));return{id:iy,diagram:e}},"loader"),Lv={id:iy,detector:vv,loader:Bv},Fv=Lv,sy="class",Av=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Ev=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-nWhIUIyS.js");return{diagram:t}},__vite__mapDeps([32,33,11,9,12,13,3,4,5]));return{id:sy,diagram:e}},"loader"),Mv={id:sy,detector:Av,loader:Ev},$v=Mv,ay="classDiagram",Ov=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Iv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-nWhIUIyS.js");return{diagram:t}},__vite__mapDeps([34,33,11,9,12,13,3,4,5]));return{id:ay,diagram:e}},"loader"),Dv={id:ay,detector:Ov,loader:Iv},Pv=Dv,oy="state",Rv=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),Nv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-DlPqWlqf.js");return{diagram:t}},__vite__mapDeps([35,36,12,13,1,2,3,4,5]));return{id:oy,diagram:e}},"loader"),qv={id:oy,detector:Rv,loader:Nv},zv=qv,ny="stateDiagram",Wv=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Hv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-bvuvx9tw.js");return{diagram:t}},__vite__mapDeps([37,36,12,13,3,4,5]));return{id:ny,diagram:e}},"loader"),Yv={id:ny,detector:Wv,loader:Hv},Uv=Yv,ly="journey",jv=p(e=>/^\s*journey/.test(e),"detector"),Gv=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-CKb3VgZk.js");return{diagram:t}},__vite__mapDeps([38,11,9,26,3,4,5]));return{id:ly,diagram:e}},"loader"),Xv={id:ly,detector:jv,loader:Gv},Vv=Xv,Zv=p((e,t,r)=>{H.debug(`rendering svg for syntax error
|
|
301
|
+
`);const i=Ek(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Nu(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),hy={draw:Zv},Kv=hy,Qv={db:{},renderer:hy,parser:{parse:p(()=>{},"parse")}},Jv=Qv,cy="flowchart-elk",tB=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),eB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-00TiWiHH.js");return{diagram:t}},__vite__mapDeps([10,11,9,12,13,14,3,4,5]));return{id:cy,diagram:e}},"loader"),rB={id:cy,detector:tB,loader:eB},iB=rB,uy="timeline",sB=p(e=>/^\s*timeline/.test(e),"detector"),aB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-DpzLLOwj.js");return{diagram:t}},__vite__mapDeps([39,26,3,4,5]));return{id:uy,diagram:e}},"loader"),oB={id:uy,detector:sB,loader:aB},nB=oB,dy="mindmap",lB=p(e=>/^\s*mindmap/.test(e),"detector"),hB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-veskSkgC.js");return{diagram:t}},__vite__mapDeps([40,12,13,3,4,5]));return{id:dy,diagram:e}},"loader"),cB={id:dy,detector:lB,loader:hB},uB=cB,fy="kanban",dB=p(e=>/^\s*kanban/.test(e),"detector"),fB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-CtxT87gS.js");return{diagram:t}},__vite__mapDeps([41,11,3,4,5]));return{id:fy,diagram:e}},"loader"),pB={id:fy,detector:dB,loader:fB},gB=pB,py="sankey",mB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),yB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-CnW7IbtR.js");return{diagram:t}},__vite__mapDeps([42,27,22,3,4,5]));return{id:py,diagram:e}},"loader"),CB={id:py,detector:mB,loader:yB},xB=CB,gy="packet",bB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),kB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-CyF5HRCw.js");return{diagram:t}},__vite__mapDeps([43,17,19,3,4,5]));return{id:gy,diagram:e}},"loader"),TB={id:gy,detector:bB,loader:kB},my="radar",wB=p(e=>/^\s*radar-beta/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-e16PRdi7.js");return{diagram:t}},__vite__mapDeps([44,17,19,3,4,5]));return{id:my,diagram:e}},"loader"),_B={id:my,detector:wB,loader:SB},yy="block",vB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),BB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-BK2IeRUA.js");return{diagram:t}},__vite__mapDeps([45,11,1,14,3,4,5]));return{id:yy,diagram:e}},"loader"),LB={id:yy,detector:vB,loader:BB},FB=LB,Cy="treeView",AB=p(e=>/^\s*treeView-beta/.test(e),"detector"),EB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-DuWJHiuL.js");return{diagram:t}},__vite__mapDeps([46,17,18,19,3,4,5]));return{id:Cy,diagram:e}},"loader"),MB={id:Cy,detector:AB,loader:EB},$B=MB,xy="architecture",OB=p(e=>/^\s*architecture/.test(e),"detector"),IB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-Bdsx3Rrl.js");return{diagram:t}},__vite__mapDeps([47,17,19,3,4,5,7]));return{id:xy,diagram:e}},"loader"),DB={id:xy,detector:OB,loader:IB},PB=DB,by="eventmodeling",RB=p(e=>/^\s*eventmodeling/.test(e),"detector"),NB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-C1E0cLdw.js");return{diagram:t}},__vite__mapDeps([48,17,19,3,4,5]));return{id:by,diagram:e}},"loader"),qB={id:by,detector:RB,loader:NB},zB=qB,ky="ishikawa",WB=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-D2U9WN2D.js");return{diagram:t}},__vite__mapDeps([49,3,4,5]));return{id:ky,diagram:e}},"loader"),YB={id:ky,detector:WB,loader:HB},Ty="venn",UB=p(e=>/^\s*venn-beta/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-BFiOUoie.js");return{diagram:t}},__vite__mapDeps([50,3,4,5]));return{id:Ty,diagram:e}},"loader"),GB={id:Ty,detector:UB,loader:jB},XB=GB,wy="treemap",VB=p(e=>/^\s*treemap/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-aUfbCvvL.js");return{diagram:t}},__vite__mapDeps([51,13,17,19,3,4,5,23,27,22]));return{id:wy,diagram:e}},"loader"),KB={id:wy,detector:VB,loader:ZB},Sy="wardley-beta",QB=p(e=>/^\s*wardley-beta/i.test(e),"detector"),JB=p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-CF-vWJdt.js");return{diagram:t}},__vite__mapDeps([52,17,19,3,4,5]));return{id:Sy,diagram:e}},"loader"),tL={id:Sy,detector:QB,loader:JB},eL=tL,cu=!1,no=p(()=>{cu||(cu=!0,ma("error",Jv,e=>e.toLowerCase().trim()==="error"),ma("---",{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("---")),rn(iB,uB,PB),rn(z_,gB,Pv,$v,J_,nv,cv,fv,_v,Fv,V_,U_,nB,iv,Uv,zv,Vv,yv,xB,TB,kv,FB,zB,$B,_B,YB,KB,XB,eL))},"addDiagrams"),rL=p(async()=>{H.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries($r).map(async([r,{detector:i,loader:s}])=>{if(s)try{ln(r)}catch{try{const{diagram:a,id:o}=await s();ma(o,a,i)}catch(a){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete $r[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(const r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),iL="graphics-document document";function _y(e,t){e.attr("role",iL),t!==""&&e.attr("aria-roledescription",t)}p(_y,"setA11yDiagramInfo");function vy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(vy,"addSVGa11yTitleDescription");var Mr,Jn=(Mr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=Ft(),s=rl(t,i);t=IT(t)+`
|
|
302
|
+
`;try{ln(s)}catch{const u=K0(s);if(!u)throw new Su(`Diagram ${s} not found.`);const{id:f,diagram:d}=await u();ma(f,d)}const{db:a,parser:o,renderer:n,init:l}=ln(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new Mr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Mr,"Diagram"),Mr),uu=[],sL=p(()=>{uu.forEach(e=>{e()}),uu=[]},"attachFunctions"),aL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function By(e){const t=e.match(wu);if(!t)return{text:e,metadata:{}};let r=R2(t[1],{schema:P2})??{};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(By,"extractFrontMatter");var oL=p(e=>e.replace(/\r\n?/g,`
|
|
303
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),nL=p(e=>{const{text:t,metadata:r}=By(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),lL=p(e=>{const t=Se.detectInit(e)??{},r=Se.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:TT(e),directive:t}},"processDirectives");function eh(e){const t=oL(e),r=nL(t),i=lL(r.text),s=Pl(r.config,i.directive);return e=aL(i.text),{code:e,title:r.title,config:s}}p(eh,"preprocessDiagram");function Ly(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Ly,"toBase64");var hL=5e4,cL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",uL="sandbox",dL="loose",fL="http://www.w3.org/2000/svg",pL="http://www.w3.org/1999/xlink",gL="http://www.w3.org/1999/xhtml",mL="100%",yL="100%",CL="border:0;margin:0;",xL="margin:0",bL="allow-top-navigation-by-user-activation allow-popups",kL='The "iframe" tag is not supported by your browser.',TL=["foreignobject"],wL=["dominant-baseline"];function rh(e){const t=eh(e);return pa(),SC(t.config??{}),t}p(rh,"processAndSetConfigs");async function Fy(e,t){no();try{const{code:r,config:i}=rh(e);return{diagramType:(await Ey(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Fy,"parse");var du=p((e,t,r=[])=>{const i=Fu(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),SL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{vc(l.styles)||n.forEach(h=>{r.insertRule(du(l.id,h,l.styles),r.cssRules.length)}),vc(l.textStyles)||r.insertRule(du(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=nn(s)+`
|
|
304
|
+
`}else i+=`${e.themeCSS}
|
|
305
|
+
`;return i+nn(r)},"createCssStyles"),_L=p((e,t)=>Qn(O_(`${e}{${t}}`),P_([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Vn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[b_,T_,Wm,S_,"@container","@starting-style"],Vn].includes(i.type)||(H.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Jl))},"addNamespace"),D_])),"compileCSS"),vL=p((e,t,r,i)=>{const s=SL(e,r),a=HC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return _L(i,a)},"createUserStyles"),BL=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=Pr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),LL=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":yL,i=Ly(`<body style="${xL}">${e}</body>`);return`<iframe style="width:${mL};height:${r};${CL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${bL}">
|
|
306
|
+
${kL}
|
|
307
|
+
</iframe>`},"putIntoIFrame"),fu=p((e,t,r,i,s)=>{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 s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function tl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(tl,"sandboxedIframe");var FL=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),AL=p(async function(e,t,r){var G,U,D,$,A,I;no();const i=rh(t);t=i.code;const s=Ft();H.debug(s),t.length>((s==null?void 0:s.maxTextSize)??hL)&&(t=cL);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=p(()=>{const _=ut(f?n:h).node();_&&"remove"in _&&_.remove()},"removeTempElements");let u=ut(document.body);const f=s.securityLevel===uL,d=s.securityLevel===dL,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=tl(ut(r),o);u=ut(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ut(r);fu(u,e,l,`font-family: ${m}`,pL)}else{if(FL(document,e,l,o),f){const E=tl(ut(document.body),o);u=ut(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=ut("body");fu(u,e,l)}let g,y;try{g=await Jn.fromText(t,{title:i.title})}catch(E){if(s.suppressErrorRendering)throw c(),E;g=await Jn.fromText("error"),y=E}const C=u.select(h).node(),b=g.type,T=C.firstChild,S=T.firstChild,w=(U=(G=g.renderer).getClasses)==null?void 0:U.call(G,t,g),v=vL(s,b,w,a),M=document.createElement("style");M.innerHTML=v,T.insertBefore(M,S);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(E){throw s.suppressErrorRendering?c():Kv.draw(t,e,"11.15.0"),E}const L=u.select(`${h} svg`),Y=($=(D=g.db).getAccTitle)==null?void 0:$.call(D),N=(I=(A=g.db).getAccDescription)==null?void 0:I.call(A);My(b,L,Y,N),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",gL);let O=u.select(h).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=BL(O,f,tr(s.arrowMarkerAbsolute)),f){const E=u.select(h+" svg").node();O=LL(O,E)}else d||(O=ki.sanitize(O,{ADD_TAGS:TL,ADD_ATTR:wL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(sL(),y)throw y;return c(),{diagramType:b,svg:O,bindFunctions:g.db.bindFunctions}},"render");function Ay(e={}){var i;const t=Rt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),TC(t),t!=null&&t.theme&&t.theme in Ze?t.themeVariables=Ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ze.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?kC(t):Au();el(r.logLevel),no()}p(Ay,"initialize");var Ey=p((e,t={})=>{const{code:r}=eh(e);return Jn.fromText(r,t)},"getDiagramFromText");function My(e,t,r,i){_y(t,e),vy(t,r,i,t.attr("id"))}p(My,"addA11yInfo");var Nr=Object.freeze({render:AL,parse:Fy,getDiagramFromText:Ey,initialize:Ay,getConfig:Ft,setConfig:Eu,getSiteConfig:Au,updateSiteConfig:wC,reset:p(()=>{pa()},"reset"),globalReset:p(()=>{pa(Ti)},"globalReset"),defaultConfig:Ti});el(Ft().logLevel);pa(Ft());var EL=p((e,t,r)=>{H.warn(e),Dl(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"),$y=p(async function(e={querySelector:".mermaid"}){try{await ML(e)}catch(t){if(Dl(t)&&H.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),ML=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Nr.getConfig();H.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");H.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(H.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Nr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Se.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(H.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Gp(Se.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Se.detectInit(o);c&&H.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:f}=await Py(h,o,l);l.innerHTML=u,e&&await e(h),f&&f(l)}catch(u){EL(u,n,ue.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Oy=p(function(e){Nr.initialize(e)},"initialize"),$L=p(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&Oy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await $y(i)},"init"),OL=p(async(e,{lazyLoad:t=!0}={})=>{no(),rn(...e),t===!1&&await rL()},"registerExternalDiagrams"),Iy=p(function(){if(ue.startOnLoad){const{startOnLoad:e}=Nr.getConfig();e&&ue.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Iy,!1);var IL=p(function(e){ue.parseError=e},"setParseErrorHandler"),Wa=[],Jo=!1,Dy=p(async()=>{if(!Jo){for(Jo=!0;Wa.length>0;){const e=Wa.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}Jo=!1}},"executeQueue"),DL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{Nr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;H.error("Error parsing",n),(l=ue.parseError)==null||l.call(ue,n),o(n),i(n)})}),"performCall");Wa.push(s),Dy().catch(i)}),"parse"),Py=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{Nr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;H.error("Error parsing",l),(h=ue.parseError)==null||h.call(ue,l),n(l),s(l)})}),"performCall");Wa.push(a),Dy().catch(s)}),"render"),PL=p(()=>Object.keys($r).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ue={startOnLoad:!0,mermaidAPI:Nr,parse:DL,render:Py,init:$L,run:$y,registerExternalDiagrams:OL,registerLayoutLoaders:Nm,initialize:Oy,parseError:void 0,contentLoaded:Iy,setParseErrorHandler:IL,detectType:rl,registerIconPacks:Ww,getRegisteredDiagramsMetadata:PL},RL=ue;/*! Check if previously processed *//*!
|
|
308
|
+
* Wait for document loaded before starting the execution
|
|
309
|
+
*/const gF=Object.freeze(Object.defineProperty({__proto__:null,default:RL},Symbol.toStringTag,{value:"Module"}));export{VL as $,YL as A,ur as B,u0 as C,Ft as D,QC as E,Pl as F,Lu as G,BT as H,Ek as I,P2 as J,iC as K,bs as L,Pe as M,Ck as N,gl as O,XL as P,KL as Q,Xr as R,pc as S,fc as T,nt as U,JL as V,QL as W,ZL as X,jL as Y,GL as Z,p as _,jC as a,jS as a$,eF as a0,tF as a1,ls as a2,WL as a3,Qa as a4,CT as a5,MC as a6,Ru as a7,Xh as a8,Tk as a9,G2 as aA,aT as aB,sT as aC,iT as aD,nT as aE,oT as aF,j2 as aG,kp as aH,Q2 as aI,Z2 as aJ,V2 as aK,Tp as aL,N2 as aM,ee as aN,er as aO,Wi as aP,Rl as aQ,Fp as aR,Pr as aS,$p as aT,mu as aU,y_ as aV,cF as aW,dF as aX,lF as aY,Q as aZ,hF as a_,Cn as aa,vT as ab,Le as ac,P as ad,R as ae,qC as af,qu as ag,gS as ah,Im as ai,uF as aj,Il as ak,V as al,Yw as am,Al as an,Ll as ao,oa as ap,rT as aq,eT as ar,tT as as,J2 as at,U2 as au,xp as av,X2 as aw,Y2 as ax,K2 as ay,bp as az,UC as b,zS as b0,qS as b1,xk as b2,zL as b3,o0 as b4,Bs as b5,Ww as b6,zw as b7,ul as b8,lr as b9,us as ba,nc as bb,Qb as bc,K as bd,Op as be,le as bf,Ub as bg,cl as bh,td as bi,ws as bj,id as bk,UL as bl,c0 as bm,gF as bn,bt as c,ut as d,Nu as e,Rt as f,XC as g,Je as h,Be as i,W2 as j,ks as k,H as l,Ep as m,HL as n,pF as o,VC as p,ZC as q,fF as r,GC as s,R2 as t,Se as u,IS as v,AT as w,rF as x,ki as y,YC as z};
|