@bigduu/lotus 2026.4.28 → 2026.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/assets/App-DCXI8jTD.js +248 -0
  2. package/dist/assets/_baseUniq-JxvxITJ4.js +1 -0
  3. package/dist/assets/architectureDiagram-Q4EWVU46-BtLEHHTC.js +36 -0
  4. package/dist/assets/blockDiagram-DXYQGD6D-VCIl5oVL.js +132 -0
  5. package/dist/assets/c4Diagram-AHTNJAMY-sxcrRtSC.js +10 -0
  6. package/dist/assets/{chunk-4BX2VUAB-BQS5VpDJ.js → chunk-4BX2VUAB-cdpbCefI.js} +1 -1
  7. package/dist/assets/chunk-4TB4RGXK-6y4jkX8O.js +206 -0
  8. package/dist/assets/{chunk-55IACEB6-DDBTvfeq.js → chunk-55IACEB6-zGTUbgou.js} +1 -1
  9. package/dist/assets/{chunk-QN33PNHL-DXRkgd3W.js → chunk-EDXVE4YY-CPKsbfnW.js} +1 -1
  10. package/dist/assets/{chunk-FMBD7UC4-DyekHBM9.js → chunk-FMBD7UC4-u1fsHgLk.js} +1 -1
  11. package/dist/assets/chunk-OYMX7WX6-B_juGEzU.js +231 -0
  12. package/dist/assets/{chunk-QZHKN3VN-BxdDkaqA.js → chunk-QZHKN3VN-Cziuusiz.js} +1 -1
  13. package/dist/assets/chunk-YZCP3GAM-SnPgbijx.js +1 -0
  14. package/dist/assets/classDiagram-6PBFFD2Q-8WbR2T8d.js +1 -0
  15. package/dist/assets/classDiagram-v2-HSJHXN6E-8WbR2T8d.js +1 -0
  16. package/dist/assets/clone-BzHXtWgJ.js +1 -0
  17. package/dist/assets/{cose-bilkent-S5V4N54A-C_pFTYgk.js → cose-bilkent-S5V4N54A-DP12PpvR.js} +1 -1
  18. package/dist/assets/cytoscape.esm-BiciSPf8.js +331 -0
  19. package/dist/assets/dagre-KV5264BT-BWrJEOJE.js +4 -0
  20. package/dist/assets/diagram-5BDNPKRD-B3Ag_nwx.js +10 -0
  21. package/dist/assets/diagram-G4DWMVQ6-CU5AAMtk.js +24 -0
  22. package/dist/assets/diagram-MMDJMWI5-0jeeksm5.js +43 -0
  23. package/dist/assets/diagram-TYMM5635-B8Te0NTK.js +24 -0
  24. package/dist/assets/erDiagram-SMLLAGMA-DgZehpcF.js +85 -0
  25. package/dist/assets/flowDiagram-DWJPFMVM-DME4sy3r.js +162 -0
  26. package/dist/assets/ganttDiagram-T4ZO3ILL-4VUoDKDN.js +292 -0
  27. package/dist/assets/gitGraphDiagram-UUTBAWPF-M9eA0knu.js +106 -0
  28. package/dist/assets/graph-Dl52eM4Z.js +1 -0
  29. package/dist/assets/index-BAibvIVz.js +1 -0
  30. package/dist/assets/index-BNcuFl0J.js +1 -0
  31. package/dist/assets/index-C9mV36Y0.js +1 -0
  32. package/dist/assets/index-v1C2DQLr.js +1 -0
  33. package/dist/assets/{index-CUKVUr8s.js → index-yMJRRs89.js} +1 -1
  34. package/dist/assets/{index.es-DdtT3adr.js → index.es-DYgOq-7b.js} +1 -1
  35. package/dist/assets/infoDiagram-42DDH7IO-DSE-8cVU.js +2 -0
  36. package/dist/assets/ishikawaDiagram-UXIWVN3A-CZdup7Ia.js +70 -0
  37. package/dist/assets/journeyDiagram-VCZTEJTY-DApltPSo.js +139 -0
  38. package/dist/assets/{kanban-definition-3W4ZIXB7-DaQyoaQ-.js → kanban-definition-6JOO6SKY-ClF33MZ9.js} +8 -8
  39. package/dist/assets/katex-DkKDou_j.js +257 -0
  40. package/dist/assets/layout-Cc6oxhrd.js +1 -0
  41. package/dist/assets/{main-DTO0Nb-V.js → main-BgGBpmTu.js} +5 -5
  42. package/dist/assets/min-CRXMcNks.js +1 -0
  43. package/dist/assets/mindmap-definition-QFDTVHPH-Cp5dCq5F.js +96 -0
  44. package/dist/assets/pieDiagram-DEJITSTG-xwiGZjCh.js +30 -0
  45. package/dist/assets/{quadrantDiagram-AYHSOK5B-BxLvBNZc.js → quadrantDiagram-34T5L4WZ-DYFzLdJ_.js} +1 -1
  46. package/dist/assets/requirementDiagram-MS252O5E-CcTppyOC.js +84 -0
  47. package/dist/assets/{sankeyDiagram-TZEHDZUN-CDuaBdM7.js → sankeyDiagram-XADWPNL6-BidnGUTn.js} +1 -1
  48. package/dist/assets/sequenceDiagram-FGHM5R23-BGNLJ-kB.js +157 -0
  49. package/dist/assets/stateDiagram-FHFEXIEX-DaT9haW6.js +1 -0
  50. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CIjRWULt.js +1 -0
  51. package/dist/assets/timeline-definition-GMOUNBTQ-B7UYx32z.js +120 -0
  52. package/dist/assets/{vendor-antd-DzhFcYgt.js → vendor-antd-Dvkx9eba.js} +1 -1
  53. package/dist/assets/{vendor-charts-BvOlsian.js → vendor-charts-DHCOhRb3.js} +1 -1
  54. package/dist/assets/{vendor-markdown-DYfLXXRA.js → vendor-markdown-DrUBuQ-c.js} +1 -1
  55. package/dist/assets/vendor-mermaid-BAz0MwVj.js +309 -0
  56. package/dist/assets/{vendor-pdf-CBvfEKBn.js → vendor-pdf-wx1tMujY.js} +4 -4
  57. package/dist/assets/vennDiagram-DHZGUBPP-DbgCCrwc.js +34 -0
  58. package/dist/assets/wardley-RL74JXVD-BeMJefeY.js +162 -0
  59. package/dist/assets/wardleyDiagram-NUSXRM2D-CfibirQl.js +20 -0
  60. package/dist/assets/xychartDiagram-5P7HB3ND-OkJekxIp.js +7 -0
  61. package/dist/index.html +3 -3
  62. package/package.json +3 -3
  63. package/dist/assets/App-BhEJNmXl.js +0 -247
  64. package/dist/assets/_basePickBy-CQxbmRut.js +0 -1
  65. package/dist/assets/_baseUniq-AfN8N44G.js +0 -1
  66. package/dist/assets/architectureDiagram-VXUJARFQ-b5ju5KOn.js +0 -36
  67. package/dist/assets/blockDiagram-VD42YOAC-CJZ9JC7A.js +0 -122
  68. package/dist/assets/c4Diagram-YG6GDRKO-zPXvbm1r.js +0 -10
  69. package/dist/assets/chunk-B4BG7PRW-DIX1hsaN.js +0 -165
  70. package/dist/assets/chunk-DI55MBZ5-CnR_JcZS.js +0 -220
  71. package/dist/assets/chunk-TZMSLE5B-6C2sedz2.js +0 -1
  72. package/dist/assets/classDiagram-2ON5EDUG-s0FTHA2r.js +0 -1
  73. package/dist/assets/classDiagram-v2-WZHVMYZB-s0FTHA2r.js +0 -1
  74. package/dist/assets/clone-D7s6jAMO.js +0 -1
  75. package/dist/assets/cytoscape.esm-BY7v1xhs.js +0 -331
  76. package/dist/assets/dagre-6UL2VRFP-CZufvh9X.js +0 -4
  77. package/dist/assets/diagram-PSM6KHXK-wHztSVlF.js +0 -24
  78. package/dist/assets/diagram-QEK2KX5R-DSPQM_i_.js +0 -43
  79. package/dist/assets/diagram-S2PKOQOG-r4X8riql.js +0 -24
  80. package/dist/assets/erDiagram-Q2GNP2WA-Lxy4qP7U.js +0 -60
  81. package/dist/assets/flowDiagram-NV44I4VS-Cnln4KZl.js +0 -162
  82. package/dist/assets/ganttDiagram-JELNMOA3-D8EVN47E.js +0 -267
  83. package/dist/assets/gitGraphDiagram-V2S2FVAM-D0f-vt5d.js +0 -65
  84. package/dist/assets/graph-BHQgv4fY.js +0 -1
  85. package/dist/assets/index-B3u0XLw6.js +0 -1
  86. package/dist/assets/index-B9rhKJTy.js +0 -1
  87. package/dist/assets/index-CYeT_vWc.js +0 -1
  88. package/dist/assets/index-DRKTke9V.js +0 -1
  89. package/dist/assets/infoDiagram-HS3SLOUP-DU3h9dF-.js +0 -2
  90. package/dist/assets/journeyDiagram-XKPGCS4Q-CBYV7J-a.js +0 -139
  91. package/dist/assets/katex-ChWnQ-fc.js +0 -261
  92. package/dist/assets/layout-ChFZNADC.js +0 -1
  93. package/dist/assets/mindmap-definition-VGOIOE7T-Dd8rk7Wy.js +0 -68
  94. package/dist/assets/pieDiagram-ADFJNKIX-DMRijIH2.js +0 -30
  95. package/dist/assets/requirementDiagram-UZGBJVZJ-DGpPvRmv.js +0 -64
  96. package/dist/assets/sequenceDiagram-WL72ISMW-vmIEcx_8.js +0 -145
  97. package/dist/assets/stateDiagram-FKZM4ZOC-hx8zwjxY.js +0 -1
  98. package/dist/assets/stateDiagram-v2-4FDKWEC3-D-E3Vh0S.js +0 -1
  99. package/dist/assets/timeline-definition-IT6M3QCI-DQvTmToF.js +0 -61
  100. package/dist/assets/treemap-GDKQZRPO-COsTlA-l.js +0 -160
  101. package/dist/assets/vendor-mermaid-CQXqUd1Z.js +0 -256
  102. package/dist/assets/xychartDiagram-PRI3JC2R-BoJPfqrl.js +0 -7
@@ -1,256 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-6UL2VRFP-CZufvh9X.js","./graph-BHQgv4fY.js","./_baseUniq-AfN8N44G.js","./layout-ChFZNADC.js","./_basePickBy-CQxbmRut.js","./clone-D7s6jAMO.js","./vendor-markdown-DYfLXXRA.js","./vendor-i18n-BNURlJ23.js","./vendor-antd-DzhFcYgt.js","./vendor-charts-BvOlsian.js","./cose-bilkent-S5V4N54A-C_pFTYgk.js","./cytoscape.esm-BY7v1xhs.js","./c4Diagram-YG6GDRKO-zPXvbm1r.js","./chunk-TZMSLE5B-6C2sedz2.js","./flowDiagram-NV44I4VS-Cnln4KZl.js","./chunk-FMBD7UC4-DyekHBM9.js","./chunk-55IACEB6-DDBTvfeq.js","./chunk-QN33PNHL-DXRkgd3W.js","./erDiagram-Q2GNP2WA-Lxy4qP7U.js","./gitGraphDiagram-V2S2FVAM-D0f-vt5d.js","./chunk-4BX2VUAB-BQS5VpDJ.js","./chunk-QZHKN3VN-BxdDkaqA.js","./treemap-GDKQZRPO-COsTlA-l.js","./ganttDiagram-JELNMOA3-D8EVN47E.js","./infoDiagram-HS3SLOUP-DU3h9dF-.js","./pieDiagram-ADFJNKIX-DMRijIH2.js","./quadrantDiagram-AYHSOK5B-BxLvBNZc.js","./xychartDiagram-PRI3JC2R-BoJPfqrl.js","./requirementDiagram-UZGBJVZJ-DGpPvRmv.js","./sequenceDiagram-WL72ISMW-vmIEcx_8.js","./classDiagram-2ON5EDUG-s0FTHA2r.js","./chunk-B4BG7PRW-DIX1hsaN.js","./classDiagram-v2-WZHVMYZB-s0FTHA2r.js","./stateDiagram-FKZM4ZOC-hx8zwjxY.js","./chunk-DI55MBZ5-CnR_JcZS.js","./stateDiagram-v2-4FDKWEC3-D-E3Vh0S.js","./journeyDiagram-XKPGCS4Q-CBYV7J-a.js","./timeline-definition-IT6M3QCI-DQvTmToF.js","./mindmap-definition-VGOIOE7T-Dd8rk7Wy.js","./App-BhEJNmXl.js","./main-DTO0Nb-V.js","./main-B6snAd4S.css","./App-B5iMQtsl.css","./kanban-definition-3W4ZIXB7-DaQyoaQ-.js","./sankeyDiagram-TZEHDZUN-CDuaBdM7.js","./diagram-S2PKOQOG-r4X8riql.js","./diagram-QEK2KX5R-DSPQM_i_.js","./blockDiagram-VD42YOAC-CJZ9JC7A.js","./architectureDiagram-VXUJARFQ-b5ju5KOn.js","./diagram-PSM6KHXK-wHztSVlF.js"])))=>i.map(i=>d[i]);
2
- var gg=Object.defineProperty;var mg=(e,t,r)=>t in e?gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ft=(e,t,r)=>mg(e,typeof t!="symbol"?t+"":t,r);import{_ as ht}from"./vendor-markdown-DYfLXXRA.js";import{d as yg,s as xg,e as bg,f as Cg}from"./vendor-antd-DzhFcYgt.js";import{i as wg,c as Uo,a as Yo,b as kg,d as vg,e as Sg,s as uc,f as fc,g as dc,h as pc,m as gc,j as mc,k as Tg,l as Wn,n as yc,o as _g,p as Ag,q as xc,r as Bg,t as Lg,u as Mg,v as bc,w as Cc,x as Eg,y as Fg,z as Ji,A as $g}from"./vendor-charts-BvOlsian.js";var Go={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},wc=Object.defineProperty,p=(e,t)=>wc(e,"name",{value:t,configurable:!0}),Og=(e,t)=>{for(var r in t)wc(e,r,{get:t[r],enumerable:!0})},ve={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Os=p(function(e="fatal"){let t=ve.fatal;typeof e=="string"?e.toLowerCase()in ve&&(t=ve[e]):typeof e=="number"&&(t=e),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},t<=ve.fatal&&(A.fatal=console.error?console.error.bind(console,Qt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Qt("FATAL"))),t<=ve.error&&(A.error=console.error?console.error.bind(console,Qt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Qt("ERROR"))),t<=ve.warn&&(A.warn=console.warn?console.warn.bind(console,Qt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Qt("WARN"))),t<=ve.info&&(A.info=console.info?console.info.bind(console,Qt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Qt("INFO"))),t<=ve.debug&&(A.debug=console.debug?console.debug.bind(console,Qt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qt("DEBUG"))),t<=ve.trace&&(A.trace=console.debug?console.debug.bind(console,Qt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qt("TRACE")))},"setLogLevel"),Qt=p(e=>`%c${yg().format("ss.SSS")} : ${e} : `,"format");const ta={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,n=2*r-a;switch(i){case"r":return ta.hue2rgb(n,a,e+1/3)*255;case"g":return ta.hue2rgb(n,a,e)*255;case"b":return ta.hue2rgb(n,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),n=Math.min(e,t,r),o=(a+n)/2;if(i==="l")return o*100;if(a===n)return 0;const s=a-n,l=o>.5?s/(2-a-n):s/(a+n);if(i==="s")return l*100;switch(a){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Dg={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},Rg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:ta,lang:Dg,unit:Rg},$e={};for(let e=0;e<=255;e++)$e[e]=tt.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class Ig{constructor(){this.type=Ft.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=Ft.ALL}is(t){return this.type===t}}class Pg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ig}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ha=new Pg({r:0,g:0,b:0,a:0},"transparent"),wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(wr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,n=a%4===0,o=a>4,s=o?1:17,l=o?8:4,c=n?0:-1,h=o?255:15;return Ha.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:n?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}${$e[Math.round(a*255)]}`:`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}`}},Ve={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(Ve.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ve.re);if(!r)return;const[,i,a,n,o,s]=r;return Ha.set({h:Ve._hue2deg(i),s:tt.channel.clamp.s(parseFloat(a)),l:tt.channel.clamp.l(parseFloat(n)),a:o?tt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${a})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},di={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=di.colors[e];if(t)return wr.parse(t)},stringify:e=>{const t=wr.stringify(e);for(const r in di.colors)if(di.colors[r]===t)return r}},ai={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(ai.re);if(!r)return;const[,i,a,n,o,s,l,c,h]=r;return Ha.set({r:tt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(o?parseFloat(n)*2.55:parseFloat(n)),b:tt.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?tt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(a)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},ce={format:{keyword:di,hex:wr,rgb:ai,rgba:ai,hsl:Ve,hsla:Ve},parse:e=>{if(typeof e!="string")return e;const t=wr.parse(e)||ai.parse(e)||Ve.parse(e)||di.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?Ve.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ai.stringify(e):wr.stringify(e)},kc=(e,t)=>{const r=ce.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return ce.stringify(r)},pi=(e,t,r=0,i=1)=>{if(typeof e!="number")return kc(e,{a:t});const a=Ha.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return ce.stringify(a)},oA=(e,t)=>tt.lang.round(ce.parse(e)[t]),Ng=e=>{const{r:t,g:r,b:i}=ce.parse(e),a=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(a)},zg=e=>Ng(e)>=.5,Bi=e=>!zg(e),vc=(e,t,r)=>{const i=ce.parse(e),a=i[t],n=tt.channel.clamp[t](a+r);return a!==n&&(i[t]=n),ce.stringify(i)},q=(e,t)=>vc(e,"l",t),Z=(e,t)=>vc(e,"l",-t),T=(e,t)=>{const r=ce.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return kc(e,i)},Wg=(e,t,r=50)=>{const{r:i,g:a,b:n,a:o}=ce.parse(e),{r:s,g:l,b:c,a:h}=ce.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+s*y,b=a*m+l*y,w=n*m+c*y,S=o*u+h*(1-u);return pi(x,b,w,S)},I=(e,t=100)=>{const r=ce.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Wg(r,e,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:Sc,setPrototypeOf:Vo,isFrozen:qg,getPrototypeOf:Hg,getOwnPropertyDescriptor:jg}=Object;let{freeze:qt,seal:Jt,create:ea}=Object,{apply:qn,construct:Hn}=typeof Reflect<"u"&&Reflect;qt||(qt=function(t){return t});Jt||(Jt=function(t){return t});qn||(qn=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),n=2;n<i;n++)a[n-2]=arguments[n];return t.apply(r,a)});Hn||(Hn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Hi=Ht(Array.prototype.forEach),Ug=Ht(Array.prototype.lastIndexOf),Xo=Ht(Array.prototype.pop),jr=Ht(Array.prototype.push),Yg=Ht(Array.prototype.splice),ra=Ht(String.prototype.toLowerCase),vn=Ht(String.prototype.toString),Sn=Ht(String.prototype.match),Ur=Ht(String.prototype.replace),Gg=Ht(String.prototype.indexOf),Vg=Ht(String.prototype.trim),Xt=Ht(Object.prototype.hasOwnProperty),Pt=Ht(RegExp.prototype.test),Yr=Xg(TypeError);function Ht(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return qn(e,t,i)}}function Xg(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Hn(e,r)}}function et(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ra;Vo&&Vo(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const n=r(a);n!==a&&(qg(t)||(t[i]=n),a=n)}e[a]=!0}return e}function Zg(e){for(let t=0;t<e.length;t++)Xt(e,t)||(e[t]=null);return e}function pe(e){const t=ea(null);for(const[r,i]of Sc(e))Xt(e,r)&&(Array.isArray(i)?t[r]=Zg(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=pe(i):t[r]=i);return t}function Gr(e,t){for(;e!==null;){const i=jg(e,t);if(i){if(i.get)return Ht(i.get);if(typeof i.value=="function")return Ht(i.value)}e=Hg(e)}function r(){return null}return r}const Zo=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"]),Tn=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"]),_n=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"]),Kg=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"]),An=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"]),Qg=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ko=qt(["#text"]),Qo=qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Bn=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","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","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jo=qt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ji=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Jg=Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tm=Jt(/<%[\w\W]*|[\w\W]*%>/gm),em=Jt(/\$\{[\w\W]*/gm),rm=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),im=Jt(/^aria-[\-\w]+$/),Tc=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),am=Jt(/^(?:\w+script|data):/i),nm=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_c=Jt(/^html$/i),sm=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var tl=Object.freeze({__proto__:null,ARIA_ATTR:im,ATTR_WHITESPACE:nm,CUSTOM_ELEMENT:sm,DATA_ATTR:rm,DOCTYPE_NAME:_c,ERB_EXPR:tm,IS_ALLOWED_URI:Tc,IS_SCRIPT_OR_DATA:am,MUSTACHE_EXPR:Jg,TMPLIT_EXPR:em});const Vr={element:1,text:3,progressingInstruction:7,comment:8,document:9},om=function(){return typeof window>"u"?null:window},lm=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},el=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ac(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:om();const t=X=>Ac(X);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Vr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=Gr(g,"cloneNode"),y=Gr(g,"remove"),x=Gr(g,"nextSibling"),b=Gr(g,"childNodes"),w=Gr(g,"parentNode");if(typeof o=="function"){const X=r.createElement("template");X.content&&X.content.ownerDocument&&(r=X.content.ownerDocument)}let S,v="";const{implementation:C,createNodeIterator:_,createDocumentFragment:L,getElementsByTagName:$}=r,{importNode:D}=i;let B=el();t.isSupported=typeof Sc=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:M,TMPLIT_EXPR:E,DATA_ATTR:O,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:ot}=tl;let{IS_ALLOWED_URI:Ct}=tl,rt=null;const ee=et({},[...Zo,...Tn,..._n,...An,...Ko]);let dt=null;const re=et({},[...Qo,...Bn,...Jo,...ji]);let gt=Object.seal(ea(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}})),at=null,ut=null;const xt=Object.seal(ea(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mt=!0,ie=!0,ae=!1,Wr=!0,qe=!1,Fe=!0,He=!1,dn=!1,pn=!1,fr=!1,Ii=!1,Pi=!1,Bo=!0,Lo=!1;const og="user-content-";let gn=!0,qr=!1,dr={},ue=null;const mn=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Mo=null;const Eo=et({},["audio","video","img","source","image","track"]);let yn=null;const Fo=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ni="http://www.w3.org/1998/Math/MathML",zi="http://www.w3.org/2000/svg",Ce="http://www.w3.org/1999/xhtml";let pr=Ce,xn=!1,bn=null;const lg=et({},[Ni,zi,Ce],vn);let Wi=et({},["mi","mo","mn","ms","mtext"]),qi=et({},["annotation-xml"]);const cg=et({},["title","style","font","a","script"]);let Hr=null;const hg=["application/xhtml+xml","text/html"],ug="text/html";let kt=null,gr=null;const fg=r.createElement("form"),$o=function(k){return k instanceof RegExp||k instanceof Function},Cn=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(gr&&gr===k)){if((!k||typeof k!="object")&&(k={}),k=pe(k),Hr=hg.indexOf(k.PARSER_MEDIA_TYPE)===-1?ug:k.PARSER_MEDIA_TYPE,kt=Hr==="application/xhtml+xml"?vn:ra,rt=Xt(k,"ALLOWED_TAGS")?et({},k.ALLOWED_TAGS,kt):ee,dt=Xt(k,"ALLOWED_ATTR")?et({},k.ALLOWED_ATTR,kt):re,bn=Xt(k,"ALLOWED_NAMESPACES")?et({},k.ALLOWED_NAMESPACES,vn):lg,yn=Xt(k,"ADD_URI_SAFE_ATTR")?et(pe(Fo),k.ADD_URI_SAFE_ATTR,kt):Fo,Mo=Xt(k,"ADD_DATA_URI_TAGS")?et(pe(Eo),k.ADD_DATA_URI_TAGS,kt):Eo,ue=Xt(k,"FORBID_CONTENTS")?et({},k.FORBID_CONTENTS,kt):mn,at=Xt(k,"FORBID_TAGS")?et({},k.FORBID_TAGS,kt):pe({}),ut=Xt(k,"FORBID_ATTR")?et({},k.FORBID_ATTR,kt):pe({}),dr=Xt(k,"USE_PROFILES")?k.USE_PROFILES:!1,Mt=k.ALLOW_ARIA_ATTR!==!1,ie=k.ALLOW_DATA_ATTR!==!1,ae=k.ALLOW_UNKNOWN_PROTOCOLS||!1,Wr=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=k.SAFE_FOR_TEMPLATES||!1,Fe=k.SAFE_FOR_XML!==!1,He=k.WHOLE_DOCUMENT||!1,fr=k.RETURN_DOM||!1,Ii=k.RETURN_DOM_FRAGMENT||!1,Pi=k.RETURN_TRUSTED_TYPE||!1,pn=k.FORCE_BODY||!1,Bo=k.SANITIZE_DOM!==!1,Lo=k.SANITIZE_NAMED_PROPS||!1,gn=k.KEEP_CONTENT!==!1,qr=k.IN_PLACE||!1,Ct=k.ALLOWED_URI_REGEXP||Tc,pr=k.NAMESPACE||Ce,Wi=k.MATHML_TEXT_INTEGRATION_POINTS||Wi,qi=k.HTML_INTEGRATION_POINTS||qi,gt=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&$o(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(gt.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&$o(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(gt.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(gt.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(ie=!1),Ii&&(fr=!0),dr&&(rt=et({},Ko),dt=ea(null),dr.html===!0&&(et(rt,Zo),et(dt,Qo)),dr.svg===!0&&(et(rt,Tn),et(dt,Bn),et(dt,ji)),dr.svgFilters===!0&&(et(rt,_n),et(dt,Bn),et(dt,ji)),dr.mathMl===!0&&(et(rt,An),et(dt,Jo),et(dt,ji))),Xt(k,"ADD_TAGS")||(xt.tagCheck=null),Xt(k,"ADD_ATTR")||(xt.attributeCheck=null),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?xt.tagCheck=k.ADD_TAGS:(rt===ee&&(rt=pe(rt)),et(rt,k.ADD_TAGS,kt))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?xt.attributeCheck=k.ADD_ATTR:(dt===re&&(dt=pe(dt)),et(dt,k.ADD_ATTR,kt))),k.ADD_URI_SAFE_ATTR&&et(yn,k.ADD_URI_SAFE_ATTR,kt),k.FORBID_CONTENTS&&(ue===mn&&(ue=pe(ue)),et(ue,k.FORBID_CONTENTS,kt)),k.ADD_FORBID_CONTENTS&&(ue===mn&&(ue=pe(ue)),et(ue,k.ADD_FORBID_CONTENTS,kt)),gn&&(rt["#text"]=!0),He&&et(rt,["html","head","body"]),rt.table&&(et(rt,["tbody"]),delete at.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=k.TRUSTED_TYPES_POLICY,v=S.createHTML("")}else S===void 0&&(S=lm(d,a)),S!==null&&typeof v=="string"&&(v=S.createHTML(""));qt&&qt(k),gr=k}},Oo=et({},[...Tn,..._n,...Kg]),Do=et({},[...An,...Qg]),dg=function(k){let F=w(k);(!F||!F.tagName)&&(F={namespaceURI:pr,tagName:"template"});const G=ra(k.tagName),mt=ra(F.tagName);return bn[k.namespaceURI]?k.namespaceURI===zi?F.namespaceURI===Ce?G==="svg":F.namespaceURI===Ni?G==="svg"&&(mt==="annotation-xml"||Wi[mt]):!!Oo[G]:k.namespaceURI===Ni?F.namespaceURI===Ce?G==="math":F.namespaceURI===zi?G==="math"&&qi[mt]:!!Do[G]:k.namespaceURI===Ce?F.namespaceURI===zi&&!qi[mt]||F.namespaceURI===Ni&&!Wi[mt]?!1:!Do[G]&&(cg[G]||!Oo[G]):!!(Hr==="application/xhtml+xml"&&bn[k.namespaceURI]):!1},fe=function(k){jr(t.removed,{element:k});try{w(k).removeChild(k)}catch{y(k)}},je=function(k,F){try{jr(t.removed,{attribute:F.getAttributeNode(k),from:F})}catch{jr(t.removed,{attribute:null,from:F})}if(F.removeAttribute(k),k==="is")if(fr||Ii)try{fe(F)}catch{}else try{F.setAttribute(k,"")}catch{}},Ro=function(k){let F=null,G=null;if(pn)k="<remove></remove>"+k;else{const wt=Sn(k,/^[\r\n\t ]+/);G=wt&&wt[0]}Hr==="application/xhtml+xml"&&pr===Ce&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const mt=S?S.createHTML(k):k;if(pr===Ce)try{F=new f().parseFromString(mt,Hr)}catch{}if(!F||!F.documentElement){F=C.createDocument(pr,"template",null);try{F.documentElement.innerHTML=xn?v:mt}catch{}}const Et=F.body||F.documentElement;return k&&G&&Et.insertBefore(r.createTextNode(G),Et.childNodes[0]||null),pr===Ce?$.call(F,He?"html":"body")[0]:He?F.documentElement:Et},Io=function(k){return _.call(k.ownerDocument||k,k,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},wn=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Po=function(k){return typeof s=="function"&&k instanceof s};function we(X,k,F){Hi(X,G=>{G.call(t,k,F,gr)})}const No=function(k){let F=null;if(we(B.beforeSanitizeElements,k,null),wn(k))return fe(k),!0;const G=kt(k.nodeName);if(we(B.uponSanitizeElement,k,{tagName:G,allowedTags:rt}),Fe&&k.hasChildNodes()&&!Po(k.firstElementChild)&&Pt(/<[/\w!]/g,k.innerHTML)&&Pt(/<[/\w!]/g,k.textContent)||k.nodeType===Vr.progressingInstruction||Fe&&k.nodeType===Vr.comment&&Pt(/<[/\w]/g,k.data))return fe(k),!0;if(!(xt.tagCheck instanceof Function&&xt.tagCheck(G))&&(!rt[G]||at[G])){if(!at[G]&&Wo(G)&&(gt.tagNameCheck instanceof RegExp&&Pt(gt.tagNameCheck,G)||gt.tagNameCheck instanceof Function&&gt.tagNameCheck(G)))return!1;if(gn&&!ue[G]){const mt=w(k)||k.parentNode,Et=b(k)||k.childNodes;if(Et&&mt){const wt=Et.length;for(let jt=wt-1;jt>=0;--jt){const ke=m(Et[jt],!0);ke.__removalCount=(k.__removalCount||0)+1,mt.insertBefore(ke,x(k))}}}return fe(k),!0}return k instanceof l&&!dg(k)||(G==="noscript"||G==="noembed"||G==="noframes")&&Pt(/<\/no(script|embed|frames)/i,k.innerHTML)?(fe(k),!0):(qe&&k.nodeType===Vr.text&&(F=k.textContent,Hi([P,M,E],mt=>{F=Ur(F,mt," ")}),k.textContent!==F&&(jr(t.removed,{element:k.cloneNode()}),k.textContent=F)),we(B.afterSanitizeElements,k,null),!1)},zo=function(k,F,G){if(ut[F]||Bo&&(F==="id"||F==="name")&&(G in r||G in fg))return!1;if(!(ie&&!ut[F]&&Pt(O,F))){if(!(Mt&&Pt(R,F))){if(!(xt.attributeCheck instanceof Function&&xt.attributeCheck(F,k))){if(!dt[F]||ut[F]){if(!(Wo(k)&&(gt.tagNameCheck instanceof RegExp&&Pt(gt.tagNameCheck,k)||gt.tagNameCheck instanceof Function&&gt.tagNameCheck(k))&&(gt.attributeNameCheck instanceof RegExp&&Pt(gt.attributeNameCheck,F)||gt.attributeNameCheck instanceof Function&&gt.attributeNameCheck(F,k))||F==="is"&&gt.allowCustomizedBuiltInElements&&(gt.tagNameCheck instanceof RegExp&&Pt(gt.tagNameCheck,G)||gt.tagNameCheck instanceof Function&&gt.tagNameCheck(G))))return!1}else if(!yn[F]){if(!Pt(Ct,Ur(G,N,""))){if(!((F==="src"||F==="xlink:href"||F==="href")&&k!=="script"&&Gg(G,"data:")===0&&Mo[k])){if(!(ae&&!Pt(W,Ur(G,N,"")))){if(G)return!1}}}}}}}return!0},Wo=function(k){return k!=="annotation-xml"&&Sn(k,ot)},qo=function(k){we(B.beforeSanitizeAttributes,k,null);const{attributes:F}=k;if(!F||wn(k))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:dt,forceKeepAttr:void 0};let mt=F.length;for(;mt--;){const Et=F[mt],{name:wt,namespaceURI:jt,value:ke}=Et,mr=kt(wt),kn=ke;let At=wt==="value"?kn:Vg(kn);if(G.attrName=mr,G.attrValue=At,G.keepAttr=!0,G.forceKeepAttr=void 0,we(B.uponSanitizeAttribute,k,G),At=G.attrValue,Lo&&(mr==="id"||mr==="name")&&(je(wt,k),At=og+At),Fe&&Pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,At)){je(wt,k);continue}if(mr==="attributename"&&Sn(At,"href")){je(wt,k);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){je(wt,k);continue}if(!Wr&&Pt(/\/>/i,At)){je(wt,k);continue}qe&&Hi([P,M,E],jo=>{At=Ur(At,jo," ")});const Ho=kt(k.nodeName);if(!zo(Ho,mr,At)){je(wt,k);continue}if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!jt)switch(d.getAttributeType(Ho,mr)){case"TrustedHTML":{At=S.createHTML(At);break}case"TrustedScriptURL":{At=S.createScriptURL(At);break}}if(At!==kn)try{jt?k.setAttributeNS(jt,wt,At):k.setAttribute(wt,At),wn(k)?fe(k):Xo(t.removed)}catch{je(wt,k)}}we(B.afterSanitizeAttributes,k,null)},pg=function X(k){let F=null;const G=Io(k);for(we(B.beforeSanitizeShadowDOM,k,null);F=G.nextNode();)we(B.uponSanitizeShadowNode,F,null),No(F),qo(F),F.content instanceof n&&X(F.content);we(B.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(X){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,G=null,mt=null,Et=null;if(xn=!X,xn&&(X="<!-->"),typeof X!="string"&&!Po(X))if(typeof X.toString=="function"){if(X=X.toString(),typeof X!="string")throw Yr("dirty is not a string, aborting")}else throw Yr("toString is not a function");if(!t.isSupported)return X;if(dn||Cn(k),t.removed=[],typeof X=="string"&&(qr=!1),qr){if(X.nodeName){const ke=kt(X.nodeName);if(!rt[ke]||at[ke])throw Yr("root node is forbidden and cannot be sanitized in-place")}}else if(X instanceof s)F=Ro("<!---->"),G=F.ownerDocument.importNode(X,!0),G.nodeType===Vr.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?F=G:F.appendChild(G);else{if(!fr&&!qe&&!He&&X.indexOf("<")===-1)return S&&Pi?S.createHTML(X):X;if(F=Ro(X),!F)return fr?null:Pi?v:""}F&&pn&&fe(F.firstChild);const wt=Io(qr?X:F);for(;mt=wt.nextNode();)No(mt),qo(mt),mt.content instanceof n&&pg(mt.content);if(qr)return X;if(fr){if(Ii)for(Et=L.call(F.ownerDocument);F.firstChild;)Et.appendChild(F.firstChild);else Et=F;return(dt.shadowroot||dt.shadowrootmode)&&(Et=D.call(i,Et,!0)),Et}let jt=He?F.outerHTML:F.innerHTML;return He&&rt["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&Pt(_c,F.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
3
- `+jt),qe&&Hi([P,M,E],ke=>{jt=Ur(jt,ke," ")}),S&&Pi?S.createHTML(jt):jt},t.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(X),dn=!0},t.clearConfig=function(){gr=null,dn=!1},t.isValidAttribute=function(X,k,F){gr||Cn({});const G=kt(X),mt=kt(k);return zo(G,mt,F)},t.addHook=function(X,k){typeof k=="function"&&jr(B[X],k)},t.removeHook=function(X,k){if(k!==void 0){const F=Ug(B[X],k);return F===-1?void 0:Yg(B[X],F,1)[0]}return Xo(B[X])},t.removeHooks=function(X){B[X]=[]},t.removeAllHooks=function(){B=el()},t}var Je=Ac();const lA=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"}));var Bc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,gi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,cm=/\s*%%.*\n/gm,kr,Lc=(kr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(kr,"UnknownDiagramError"),kr),tr={},Ds=p(function(e,t){e=e.replace(Bc,"").replace(gi,"").replace(cm,`
4
- `);for(const[r,{detector:i}]of Object.entries(tr))if(i(e,t))return r;throw new Lc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),jn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Mc(t,r,i)},"registerLazyLoadedDiagrams"),Mc=p((e,t,r)=>{tr[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),tr[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),hm=p(e=>tr[e].loader,"getDiagramLoader"),Un=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(n=>Un(e,n,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(n=>{e.includes(n)||e.push(n)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(n=>{typeof t[n]=="object"&&(e[n]===void 0||typeof e[n]=="object")?(e[n]===void 0&&(e[n]=Array.isArray(t[n])?[]:{}),e[n]=Un(e[n],t[n],{depth:r-1,clobber:i})):(i||typeof e[n]!="object"&&typeof t[n]!="object")&&(e[n]=t[n])}),e)},"assignWithDepth"),St=Un,ja="#ffffff",Ua="#f2f2f2",Nt=p((e,t)=>t?T(e,{s:-40,l:10}):T(e,{s:-40,l:-10}),"mkBorder"),vr,um=(vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,w,S,v,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Nt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Nt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Z(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||Z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||q(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Z(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=Z(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||I(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||q(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||Z(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||T(this.mainBkg,{h:180,s:-15,l:t*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||T(this.mainBkg,{h:180,s:-15,l:t*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?q(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ja,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ua}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(vr,"Theme"),vr),fm=p(e=>{const t=new um;return t.calculate(e),t},"getThemeVariables"),Sr,dm=(Sr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.background),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(I("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=pi(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Z(this.sectionBkgColor,10),this.taskBorderColor=pi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=pi(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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,w,S,v;this.secondBkg=q(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=q(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=q(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||I(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||q(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-10+C*4)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(-7+C*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?q(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.secondaryColor,20),this.git1=q(this.pie2||this.secondaryColor,20),this.git2=q(this.pie3||this.tertiaryColor,20),this.git3=q(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=q(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=q(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=q(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=q(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||q(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||q(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(Sr,"Theme"),Sr),pm=p(e=>{const t=new dm;return t.calculate(e),t},"getThemeVariables"),Tr,gm=(Tr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=pi(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,w,S,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=Z(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||Z(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,l:-(7+C*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||I(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||I(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||q(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||q(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?q(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||Z(I(this.git0),25),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ja,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ua}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(Tr,"Theme"),Tr),mm=p(e=>{const t=new gm;return t.calculate(e),t},"getThemeVariables"),_r,ym=(_r=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=q("#cde498",10),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.primaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,w,S,v;this.actorBorder=Z(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Z(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=Z(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||Z(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?q(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=Z(this.git0,25),this.git1=Z(this.git1,25),this.git2=Z(this.git2,25),this.git3=Z(this.git3,25),this.git4=Z(this.git4,25),this.git5=Z(this.git5,25),this.git6=Z(this.git6,25),this.git7=Z(this.git7,25)),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||I(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||I(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ja,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ua}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(_r,"Theme"),_r),xm=p(e=>{const t=new ym;return t.calculate(e),t},"getThemeVariables"),Ar,bm=(Ar=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=I(this.primaryColor),this.secondaryTextColor=I(this.secondaryColor),this.tertiaryTextColor=I(this.tertiaryColor),this.lineColor=I(this.background),this.textColor=I(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,o,s,l,c,h,u,f,d,g,m,y,x,b,w,S,v;this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||I(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||q(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||Z(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{l:-(8+C*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=q(this.contrast,30),this.sectionBkgColor2=q(this.contrast,30),this.taskBorderColor=Z(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=q(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?q(this.quadrant1Fill):Z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((s=this.xyChart)==null?void 0:s.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((S=this.radar)==null?void 0:S.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||I(this.git0),this.gitInv1=this.gitInv1||I(this.git1),this.gitInv2=this.gitInv2||I(this.git2),this.gitInv3=this.gitInv3||I(this.git3),this.gitInv4=this.gitInv4||I(this.git4),this.gitInv5=this.gitInv5||I(this.git5),this.gitInv6=this.gitInv6||I(this.git6),this.gitInv7=this.gitInv7||I(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ja,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ua}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ar,"Theme"),Ar),Cm=p(e=>{const t=new bm;return t.calculate(e),t},"getThemeVariables"),Ae={base:{getThemeVariables:fm},dark:{getThemeVariables:pm},default:{getThemeVariables:mm},forest:{getThemeVariables:xm},neutral:{getThemeVariables:Cm}},de={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ec={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ae.default.getThemeVariables(),sequence:{...de.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.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:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},radar:{...de.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Fc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Fc(e[i],"")]:[...r,t+i],[]),"keyify"),wm=new Set(Fc(Ec,"")),$c=Ec,fa=p(e=>{if(A.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>fa(t));return}for(const t of Object.keys(e)){if(A.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!wm.has(t)||e[t]==null){A.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){A.debug("sanitizing object",t),fa(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(A.debug("sanitizing css option",t),e[t]=km(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]="")}A.debug("After sanitization",e)}},"sanitizeDirective"),km=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"),Mr=Object.freeze($c),Yt=St({},Mr),da,er=[],mi=St({},Mr),Ya=p((e,t)=>{let r=St({},e),i={};for(const a of t)Rc(a),i=St(i,a);if(r=St(r,i),i.theme&&i.theme in Ae){const a=St({},da),n=St(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ae&&(r.themeVariables=Ae[r.theme].getThemeVariables(n))}return mi=r,Ic(mi),mi},"updateCurrentConfig"),vm=p(e=>(Yt=St({},Mr),Yt=St(Yt,e),e.theme&&Ae[e.theme]&&(Yt.themeVariables=Ae[e.theme].getThemeVariables(e.themeVariables)),Ya(Yt,er),Yt),"setSiteConfig"),Sm=p(e=>{da=St({},e)},"saveConfigFromInitialize"),Tm=p(e=>(Yt=St(Yt,e),Ya(Yt,er),Yt),"updateSiteConfig"),Oc=p(()=>St({},Yt),"getSiteConfig"),Dc=p(e=>(Ic(e),St(mi,e),Ot()),"setConfig"),Ot=p(()=>St({},mi),"getConfig"),Rc=p(e=>{e&&(["secure",...Yt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(A.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"&&Rc(e[t])}))},"sanitize"),_m=p(e=>{var t;fa(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),er.push(e),Ya(Yt,er)},"addDirective"),pa=p((e=Yt)=>{er=[],Ya(e,er)},"reset"),Am={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},rl={},Bm=p(e=>{rl[e]||(A.warn(Am[e]),rl[e]=!0)},"issueWarning"),Ic=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Bm("LAZY_LOAD_DEPRECATED")},"checkConfig"),cA=p(()=>{let e={};da&&(e=St(e,da));for(const t of er)e=St(e,t);return e},"getUserDefinedConfig"),Li=/<br\s*\/?>/gi,Lm=p(e=>e?zc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Mm=(()=>{let e=!1;return()=>{e||(Pc(),e=!0)}})();function Pc(){const e="data-temp-href-target";Je.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Je.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(Pc,"setupDompurifyHooks");var Nc=p(e=>(Mm(),Je.sanitize(e)),"removeScript"),il=p((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Nc(e):i!=="loose"&&(e=zc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Om(e))}return e},"sanitizeMore"),te=p((e,t)=>e&&(t.dompurifyConfig?e=Je.sanitize(il(e,t),t.dompurifyConfig).toString():e=Je.sanitize(il(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Em=p((e,t)=>typeof e=="string"?te(e,t):e.flat().map(r=>te(r,t)),"sanitizeTextOrArray"),Fm=p(e=>Li.test(e),"hasBreaks"),$m=p(e=>e.split(Li),"splitBreaks"),Om=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),zc=p(e=>e.replace(Li,"#br#"),"breakToPlaceholder"),Dm=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"),_t=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Rm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Im=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),al=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const n=t[i-1],o=t[i+1];Pm(n,o)&&(a=n+","+o,i++,r.pop())}r.push(Nm(a))}return r.join("")},"parseGenericTypes"),Yn=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Pm=p((e,t)=>{const r=Yn(e,"~"),i=Yn(t,"~");return r===1&&i===1},"shouldCombineSets"),Nm=p(e=>{const t=Yn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),nl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Gn=/\$\$(.*)\$\$/g,Er=p(e=>{var t;return(((t=e.match(Gn))==null?void 0:t.length)??0)>0},"hasKatex"),hA=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Rs(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),zm=p(async(e,t)=>{if(!Er(e))return e;if(!(nl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Gn,"MathML is unsupported in this environment.");{const{default:r}=await ht(async()=>{const{default:a}=await import("./katex-ChWnQ-fc.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!nl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Li).map(a=>Er(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Gn,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Rs=p(async(e,t)=>te(await zm(e,t),t),"renderKatexSanitized"),Rr={getRows:Lm,sanitizeText:te,sanitizeTextOrArray:Em,hasBreaks:Fm,splitBreaks:$m,lineBreakRegex:Li,removeScript:Nc,getUrl:Dm,evaluate:_t,getMax:Rm,getMin:Im},Wm=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),qm=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"),Wc=p(function(e,t,r,i){const a=qm(t,r,i);Wm(e,a)},"configureSvgSize"),Hm=p(function(e,t,r,i){const a=t.node().getBBox(),n=a.width,o=a.height;A.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;A.info(`Graph bounds: ${s}x${l}`,e),s=n+r*2,l=o+r*2,A.info(`Calculated bounds: ${s}x${l}`),Wc(t,l,s,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ia={},jm=p((e,t,r)=>{let i="";return e in ia&&ia[e]?i=ia[e](r):A.warn(`No theme found for ${e}`),` & {
5
- font-family: ${r.fontFamily};
6
- font-size: ${r.fontSize};
7
- fill: ${r.textColor}
8
- }
9
- @keyframes edge-animation-frame {
10
- from {
11
- stroke-dashoffset: 0;
12
- }
13
- }
14
- @keyframes dash {
15
- to {
16
- stroke-dashoffset: 0;
17
- }
18
- }
19
- & .edge-animation-slow {
20
- stroke-dasharray: 9,5 !important;
21
- stroke-dashoffset: 900;
22
- animation: dash 50s linear infinite;
23
- stroke-linecap: round;
24
- }
25
- & .edge-animation-fast {
26
- stroke-dasharray: 9,5 !important;
27
- stroke-dashoffset: 900;
28
- animation: dash 20s linear infinite;
29
- stroke-linecap: round;
30
- }
31
- /* Classes common for multiple diagrams */
32
-
33
- & .error-icon {
34
- fill: ${r.errorBkgColor};
35
- }
36
- & .error-text {
37
- fill: ${r.errorTextColor};
38
- stroke: ${r.errorTextColor};
39
- }
40
-
41
- & .edge-thickness-normal {
42
- stroke-width: 1px;
43
- }
44
- & .edge-thickness-thick {
45
- stroke-width: 3.5px
46
- }
47
- & .edge-pattern-solid {
48
- stroke-dasharray: 0;
49
- }
50
- & .edge-thickness-invisible {
51
- stroke-width: 0;
52
- fill: none;
53
- }
54
- & .edge-pattern-dashed{
55
- stroke-dasharray: 3;
56
- }
57
- .edge-pattern-dotted {
58
- stroke-dasharray: 2;
59
- }
60
-
61
- & .marker {
62
- fill: ${r.lineColor};
63
- stroke: ${r.lineColor};
64
- }
65
- & .marker.cross {
66
- stroke: ${r.lineColor};
67
- }
68
-
69
- & svg {
70
- font-family: ${r.fontFamily};
71
- font-size: ${r.fontSize};
72
- }
73
- & p {
74
- margin: 0
75
- }
76
-
77
- ${i}
78
-
79
- ${t}
80
- `},"getStyles"),Um=p((e,t)=>{t!==void 0&&(ia[e]=t)},"addStylesForDiagram"),Ym=jm,qc={};Og(qc,{clear:()=>Gm,getAccDescription:()=>Km,getAccTitle:()=>Xm,getDiagramTitle:()=>Jm,setAccDescription:()=>Zm,setAccTitle:()=>Vm,setDiagramTitle:()=>Qm});var Is="",Ps="",Ns="",zs=p(e=>te(e,Ot()),"sanitizeText"),Gm=p(()=>{Is="",Ns="",Ps=""},"clear"),Vm=p(e=>{Is=zs(e).replace(/^\s+/g,"")},"setAccTitle"),Xm=p(()=>Is,"getAccTitle"),Zm=p(e=>{Ns=zs(e).replace(/\n\s+/g,`
81
- `)},"setAccDescription"),Km=p(()=>Ns,"getAccDescription"),Qm=p(e=>{Ps=zs(e)},"setDiagramTitle"),Jm=p(()=>Ps,"getDiagramTitle"),sl=A,ty=Os,lt=Ot,uA=Dc,fA=Mr,Ws=p(e=>te(e,lt()),"sanitizeText"),ey=Hm,ry=p(()=>qc,"getCommonDb"),ga={},ma=p((e,t,r)=>{var i;ga[e]&&sl.warn(`Diagram with id ${e} already registered. Overwriting.`),ga[e]=t,r&&Mc(e,r),Um(e,t.styles),(i=t.injectUtils)==null||i.call(t,sl,ty,lt,Ws,ey,ry(),()=>{})},"registerDiagram"),Vn=p(e=>{if(e in ga)return ga[e];throw new iy(e)},"getDiagram"),Br,iy=(Br=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Br,"DiagramNotFoundError"),Br);function ay(e){return e}var aa=1,Ln=2,Xn=3,Ui=4,ol=1e-6;function ny(e){return"translate("+e+",0)"}function sy(e){return"translate(0,"+e+")"}function oy(e){return t=>+e(t)}function ly(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function cy(){return!this.__axis}function Hc(e,t){var r=[],i=null,a=null,n=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===aa||e===Ui?-1:1,h=e===Ui||e===Ln?"x":"y",u=e===aa||e===Xn?ny:sy;function f(d){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),m=a??(t.tickFormat?t.tickFormat.apply(t,r):ay),y=Math.max(n,0)+s,x=t.range(),b=+x[0]+l,w=+x[x.length-1]+l,S=(t.bandwidth?ly:oy)(t.copy(),l),v=d.selection?d.selection():d,C=v.selectAll(".domain").data([null]),_=v.selectAll(".tick").data(g,t).order(),L=_.exit(),$=_.enter().append("g").attr("class","tick"),D=_.select("line"),B=_.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge($),D=D.merge($.append("line").attr("stroke","currentColor").attr(h+"2",c*n)),B=B.merge($.append("text").attr("fill","currentColor").attr(h,c*y).attr("dy",e===aa?"0em":e===Xn?"0.71em":"0.32em")),d!==v&&(C=C.transition(d),_=_.transition(d),D=D.transition(d),B=B.transition(d),L=L.transition(d).attr("opacity",ol).attr("transform",function(P){return isFinite(P=S(P))?u(P+l):this.getAttribute("transform")}),$.attr("opacity",ol).attr("transform",function(P){var M=this.parentNode.__axis;return u((M&&isFinite(M=M(P))?M:S(P))+l)})),L.remove(),C.attr("d",e===Ui||e===Ln?o?"M"+c*o+","+b+"H"+l+"V"+w+"H"+c*o:"M"+l+","+b+"V"+w:o?"M"+b+","+c*o+"V"+l+"H"+w+"V"+c*o:"M"+b+","+l+"H"+w),_.attr("opacity",1).attr("transform",function(P){return u(S(P)+l)}),D.attr(h+"2",c*n),B.attr(h,c*y).text(m),v.filter(cy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ln?"start":e===Ui?"end":"middle"),v.each(function(){this.__axis=S})}return f.scale=function(d){return arguments.length?(t=d,f):t},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(r=d==null?[]:Array.from(d),f):r.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(a=d,f):a},f.tickSize=function(d){return arguments.length?(n=o=+d,f):n},f.tickSizeInner=function(d){return arguments.length?(n=+d,f):n},f.tickSizeOuter=function(d){return arguments.length?(o=+d,f):o},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function dA(e){return Hc(aa,e)}function pA(e){return Hc(Xn,e)}var hy={value:()=>{}};function jc(){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 na(r)}function na(e){this._=e}function uy(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}na.prototype=jc.prototype={constructor:na,on:function(e,t){var r=this._,i=uy(e+"",r),a,n=-1,o=i.length;if(arguments.length<2){for(;++n<o;)if((a=(e=i[n]).type)&&(a=fy(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++n<o;)if(a=(e=i[n]).type)r[a]=ll(r[a],e.name,t);else if(t==null)for(a in r)r[a]=ll(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new na(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,n;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(n=this._[e],i=0,a=n.length;i<a;++i)n[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,n=i.length;a<n;++a)i[a].value.apply(t,r)}};function fy(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function ll(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=hy,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Zn="http://www.w3.org/1999/xhtml";const cl={svg:"http://www.w3.org/2000/svg",xhtml:Zn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ga(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),cl.hasOwnProperty(t)?{space:cl[t],local:e}:e}function dy(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Zn&&t.documentElement.namespaceURI===Zn?t.createElement(e):t.createElementNS(r,e)}}function py(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Uc(e){var t=Ga(e);return(t.local?py:dy)(t)}function gy(){}function qs(e){return e==null?gy:function(){return this.querySelector(e)}}function my(e){typeof e!="function"&&(e=qs(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=new Array(o),l,c,h=0;h<o;++h)(l=n[h])&&(c=e.call(l,l.__data__,h,n))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new Kt(i,this._parents)}function yy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xy(){return[]}function Yc(e){return e==null?xy:function(){return this.querySelectorAll(e)}}function by(e){return function(){return yy(e.apply(this,arguments))}}function Cy(e){typeof e=="function"?e=by(e):e=Yc(e);for(var t=this._groups,r=t.length,i=[],a=[],n=0;n<r;++n)for(var o=t[n],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),a.push(l));return new Kt(i,a)}function Gc(e){return function(){return this.matches(e)}}function Vc(e){return function(t){return t.matches(e)}}var wy=Array.prototype.find;function ky(e){return function(){return wy.call(this.children,e)}}function vy(){return this.firstElementChild}function Sy(e){return this.select(e==null?vy:ky(typeof e=="function"?e:Vc(e)))}var Ty=Array.prototype.filter;function _y(){return Array.from(this.children)}function Ay(e){return function(){return Ty.call(this.children,e)}}function By(e){return this.selectAll(e==null?_y:Ay(typeof e=="function"?e:Vc(e)))}function Ly(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],l,c=0;c<o;++c)(l=n[c])&&e.call(l,l.__data__,c,n)&&s.push(l);return new Kt(i,this._parents)}function Xc(e){return new Array(e.length)}function My(){return new Kt(this._enter||this._groups.map(Xc),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 Ey(e){return function(){return e}}function Fy(e,t,r,i,a,n){for(var o=0,s,l=t.length,c=n.length;o<c;++o)(s=t[o])?(s.__data__=n[o],i[o]=s):r[o]=new ya(e,n[o]);for(;o<l;++o)(s=t[o])&&(a[o]=s)}function $y(e,t,r,i,a,n,o){var s,l,c=new Map,h=t.length,u=n.length,f=new Array(h),d;for(s=0;s<h;++s)(l=t[s])&&(f[s]=d=o.call(l,l.__data__,s,t)+"",c.has(d)?a[s]=l:c.set(d,l));for(s=0;s<u;++s)d=o.call(e,n[s],s,n)+"",(l=c.get(d))?(i[s]=l,l.__data__=n[s],c.delete(d)):r[s]=new ya(e,n[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(f[s])===l&&(a[s]=l)}function Oy(e){return e.__data__}function Dy(e,t){if(!arguments.length)return Array.from(this,Oy);var r=t?$y:Fy,i=this._parents,a=this._groups;typeof e!="function"&&(e=Ey(e));for(var n=a.length,o=new Array(n),s=new Array(n),l=new Array(n),c=0;c<n;++c){var h=i[c],u=a[c],f=u.length,d=Ry(e.call(h,h&&h.__data__,c,i)),g=d.length,m=s[c]=new Array(g),y=o[c]=new Array(g),x=l[c]=new Array(f);r(h,u,m,y,x,d,t);for(var b=0,w=0,S,v;b<g;++b)if(S=m[b]){for(b>=w&&(w=b+1);!(v=y[w])&&++w<g;);S._next=v||null}}return o=new Kt(o,i),o._enter=s,o._exit=l,o}function Ry(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Iy(){return new Kt(this._exit||this._groups.map(Xc),this._parents)}function Py(e,t,r){var i=this.enter(),a=this,n=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?n.remove():r(n),i&&a?i.merge(a).order():a}function Ny(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,n=i.length,o=Math.min(a,n),s=new Array(a),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,f=s[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<a;++l)s[l]=r[l];return new Kt(s,this._parents)}function zy(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,n=i[a],o;--a>=0;)(o=i[a])&&(n&&o.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(o,n),n=o);return this}function Wy(e){e||(e=qy);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,a=new Array(i),n=0;n<i;++n){for(var o=r[n],s=o.length,l=a[n]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new Kt(a,this._parents).order()}function qy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function jy(){return Array.from(this)}function Uy(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length;a<n;++a){var o=i[a];if(o)return o}return null}function Yy(){let e=0;for(const t of this)++e;return e}function Gy(){return!this.node()}function Vy(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],n=0,o=a.length,s;n<o;++n)(s=a[n])&&e.call(s,s.__data__,n,a);return this}function Xy(e){return function(){this.removeAttribute(e)}}function Zy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ky(e,t){return function(){this.setAttribute(e,t)}}function Qy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Jy(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function t0(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 e0(e,t){var r=Ga(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?Zy:Xy:typeof t=="function"?r.local?t0:Jy:r.local?Qy:Ky)(r,t))}function Zc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function r0(e){return function(){this.style.removeProperty(e)}}function i0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function a0(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function n0(e,t,r){return arguments.length>1?this.each((t==null?r0:typeof t=="function"?a0:i0)(e,t,r??"")):Fr(this.node(),e)}function Fr(e,t){return e.style.getPropertyValue(t)||Zc(e).getComputedStyle(e,null).getPropertyValue(t)}function s0(e){return function(){delete this[e]}}function o0(e,t){return function(){this[e]=t}}function l0(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function c0(e,t){return arguments.length>1?this.each((t==null?s0:typeof t=="function"?l0:o0)(e,t)):this.node()[e]}function Kc(e){return e.trim().split(/^|\s+/)}function Hs(e){return e.classList||new Qc(e)}function Qc(e){this._node=e,this._names=Kc(e.getAttribute("class")||"")}Qc.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 Jc(e,t){for(var r=Hs(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function th(e,t){for(var r=Hs(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function h0(e){return function(){Jc(this,e)}}function u0(e){return function(){th(this,e)}}function f0(e,t){return function(){(t.apply(this,arguments)?Jc:th)(this,e)}}function d0(e,t){var r=Kc(e+"");if(arguments.length<2){for(var i=Hs(this.node()),a=-1,n=r.length;++a<n;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?f0:t?h0:u0)(r,t))}function p0(){this.textContent=""}function g0(e){return function(){this.textContent=e}}function m0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function y0(e){return arguments.length?this.each(e==null?p0:(typeof e=="function"?m0:g0)(e)):this.node().textContent}function x0(){this.innerHTML=""}function b0(e){return function(){this.innerHTML=e}}function C0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function w0(e){return arguments.length?this.each(e==null?x0:(typeof e=="function"?C0:b0)(e)):this.node().innerHTML}function k0(){this.nextSibling&&this.parentNode.appendChild(this)}function v0(){return this.each(k0)}function S0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function T0(){return this.each(S0)}function _0(e){var t=typeof e=="function"?e:Uc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function A0(){return null}function B0(e,t){var r=typeof e=="function"?e:Uc(e),i=t==null?A0:typeof t=="function"?t:qs(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function L0(){var e=this.parentNode;e&&e.removeChild(this)}function M0(){return this.each(L0)}function E0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function F0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $0(e){return this.select(e?F0:E0)}function O0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function D0(e){return function(t){e.call(this,t,this.__data__)}}function R0(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 I0(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,n;r<a;++r)n=t[r],(!e.type||n.type===e.type)&&n.name===e.name?this.removeEventListener(n.type,n.listener,n.options):t[++i]=n;++i?t.length=i:delete this.__on}}}function P0(e,t,r){return function(){var i=this.__on,a,n=D0(t);if(i){for(var o=0,s=i.length;o<s;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=n,a.options=r),a.value=t;return}}this.addEventListener(e.type,n,r),a={type:e.type,name:e.name,value:t,listener:n,options:r},i?i.push(a):this.__on=[a]}}function N0(e,t,r){var i=R0(e+""),a,n=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(a=0,h=s[l];a<n;++a)if((o=i[a]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?P0:I0,a=0;a<n;++a)this.each(s(i[a],t,r));return this}function eh(e,t,r){var i=Zc(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function z0(e,t){return function(){return eh(this,e,t)}}function W0(e,t){return function(){return eh(this,e,t.apply(this,arguments))}}function q0(e,t){return this.each((typeof t=="function"?W0:z0)(e,t))}function*H0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,n=i.length,o;a<n;++a)(o=i[a])&&(yield o)}var rh=[null];function Kt(e,t){this._groups=e,this._parents=t}function Mi(){return new Kt([[document.documentElement]],rh)}function j0(){return this}Kt.prototype=Mi.prototype={constructor:Kt,select:my,selectAll:Cy,selectChild:Sy,selectChildren:By,filter:Ly,data:Dy,enter:My,exit:Iy,join:Py,merge:Ny,selection:j0,order:zy,sort:Wy,call:Hy,nodes:jy,node:Uy,size:Yy,empty:Gy,each:Vy,attr:e0,style:n0,property:c0,classed:d0,text:y0,html:w0,raise:v0,lower:T0,append:_0,insert:B0,remove:M0,clone:$0,datum:O0,on:N0,dispatch:q0,[Symbol.iterator]:H0};function nt(e){return typeof e=="string"?new Kt([[document.querySelector(e)]],[document.documentElement]):new Kt([[e]],rh)}var $r=0,ni=0,Xr=0,ih=1e3,xa,si,ba=0,rr=0,Va=0,bi=typeof performance=="object"&&performance.now?performance:Date,ah=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function js(){return rr||(ah(U0),rr=bi.now()+Va)}function U0(){rr=0}function Ca(){this._call=this._time=this._next=null}Ca.prototype=nh.prototype={constructor:Ca,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?js():+r)+(t==null?0:+t),!this._next&&si!==this&&(si?si._next=this:xa=this,si=this),this._call=e,this._time=r,Kn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kn())}};function nh(e,t,r){var i=new Ca;return i.restart(e,t,r),i}function Y0(){js(),++$r;for(var e=xa,t;e;)(t=rr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$r}function hl(){rr=(ba=bi.now())+Va,$r=ni=0;try{Y0()}finally{$r=0,V0(),rr=0}}function G0(){var e=bi.now(),t=e-ba;t>ih&&(Va-=t,ba=e)}function V0(){for(var e,t=xa,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:xa=r);si=e,Kn(i)}function Kn(e){if(!$r){ni&&(ni=clearTimeout(ni));var t=e-rr;t>24?(e<1/0&&(ni=setTimeout(hl,e-bi.now()-Va)),Xr&&(Xr=clearInterval(Xr))):(Xr||(ba=bi.now(),Xr=setInterval(G0,ih)),$r=1,ah(hl))}}function ul(e,t,r){var i=new Ca;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var X0=jc("start","end","cancel","interrupt"),Z0=[],sh=0,fl=1,Qn=2,sa=3,dl=4,Jn=5,oa=6;function Xa(e,t,r,i,a,n){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;K0(e,r,{name:t,index:i,group:a,on:X0,tween:Z0,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:sh})}function Us(e,t){var r=he(e,t);if(r.state>sh)throw new Error("too late; already scheduled");return r}function xe(e,t){var r=he(e,t);if(r.state>sa)throw new Error("too late; already running");return r}function he(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function K0(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=nh(n,0,r.time);function n(c){r.state=fl,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,d;if(r.state!==fl)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===sa)return ul(o);d.state===dl?(d.state=oa,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+h<t&&(d.state=oa,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[h])}if(ul(function(){r.state===sa&&(r.state=dl,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Qn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Qn){for(r.state=sa,a=new Array(f=r.tween.length),h=0,u=-1;h<f;++h)(d=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Jn,1),u=-1,f=a.length;++u<f;)a[u].call(e,h);r.state===Jn&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=oa,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Q0(e,t){var r=e.__transition,i,a,n=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){n=!1;continue}a=i.state>Qn&&i.state<Jn,i.state=oa,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}n&&delete e.__transition}}function J0(e){return this.each(function(){Q0(this,e)})}function tx(e,t){var r,i;return function(){var a=xe(this,e),n=a.tween;if(n!==r){i=r=n;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function ex(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var n=xe(this,e),o=n.tween;if(o!==i){a=(i=o).slice();for(var s={name:t,value:r},l=0,c=a.length;l<c;++l)if(a[l].name===t){a[l]=s;break}l===c&&a.push(s)}n.tween=a}}function rx(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=he(this.node(),r).tween,a=0,n=i.length,o;a<n;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?tx:ex)(r,e,t))}function Ys(e,t,r){var i=e._id;return e.each(function(){var a=xe(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return he(a,i).value[t]}}function oh(e,t){var r;return(typeof t=="number"?wg:t instanceof Uo?Yo:(r=Uo(t))?(t=r,Yo):kg)(e,t)}function ix(e){return function(){this.removeAttribute(e)}}function ax(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nx(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttribute(e);return o===a?null:o===i?n:n=t(i=o,r)}}function sx(e,t,r){var i,a=r+"",n;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?n:n=t(i=o,r)}}function ox(e,t,r){var i,a,n;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s)))}}function lx(e,t,r){var i,a,n;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s)))}}function cx(e,t){var r=Ga(e),i=r==="transform"?vg:oh;return this.attrTween(e,typeof t=="function"?(r.local?lx:ox)(r,i,Ys(this,"attr."+e,t)):t==null?(r.local?ax:ix)(r):(r.local?sx:nx)(r,i,t))}function hx(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function ux(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function fx(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&ux(e,n)),r}return a._value=t,a}function dx(e,t){var r,i;function a(){var n=t.apply(this,arguments);return n!==i&&(r=(i=n)&&hx(e,n)),r}return a._value=t,a}function px(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=Ga(e);return this.tween(r,(i.local?fx:dx)(i,t))}function gx(e,t){return function(){Us(this,e).delay=+t.apply(this,arguments)}}function mx(e,t){return t=+t,function(){Us(this,e).delay=t}}function yx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gx:mx)(t,e)):he(this.node(),t).delay}function xx(e,t){return function(){xe(this,e).duration=+t.apply(this,arguments)}}function bx(e,t){return t=+t,function(){xe(this,e).duration=t}}function Cx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xx:bx)(t,e)):he(this.node(),t).duration}function wx(e,t){if(typeof t!="function")throw new Error;return function(){xe(this,e).ease=t}}function kx(e){var t=this._id;return arguments.length?this.each(wx(t,e)):he(this.node(),t).ease}function vx(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;xe(this,e).ease=r}}function Sx(e){if(typeof e!="function")throw new Error;return this.each(vx(this._id,e))}function Tx(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var n=t[a],o=n.length,s=i[a]=[],l,c=0;c<o;++c)(l=n[c])&&e.call(l,l.__data__,c,n)&&s.push(l);return new Le(i,this._parents,this._name,this._id)}function _x(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,n=Math.min(i,a),o=new Array(i),s=0;s<n;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;s<i;++s)o[s]=t[s];return new Le(o,this._parents,this._name,this._id)}function Ax(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 Bx(e,t,r){var i,a,n=Ax(t)?Us:xe;return function(){var o=n(this,e),s=o.on;s!==i&&(a=(i=s).copy()).on(t,r),o.on=a}}function Lx(e,t){var r=this._id;return arguments.length<2?he(this.node(),r).on.on(e):this.each(Bx(r,e,t))}function Mx(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ex(){return this.on("end.remove",Mx(this._id))}function Fx(e){var t=this._name,r=this._id;typeof e!="function"&&(e=qs(e));for(var i=this._groups,a=i.length,n=new Array(a),o=0;o<a;++o)for(var s=i[o],l=s.length,c=n[o]=new Array(l),h,u,f=0;f<l;++f)(h=s[f])&&(u=e.call(h,h.__data__,f,s))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Xa(c[f],t,r,f,c,he(h,r)));return new Le(n,this._parents,t,r)}function $x(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Yc(e));for(var i=this._groups,a=i.length,n=[],o=[],s=0;s<a;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=e.call(h,h.__data__,u,l),d,g=he(h,r),m=0,y=f.length;m<y;++m)(d=f[m])&&Xa(d,t,r,m,f,g);n.push(f),o.push(h)}return new Le(n,o,t,r)}var Ox=Mi.prototype.constructor;function Dx(){return new Ox(this._groups,this._parents)}function Rx(e,t){var r,i,a;return function(){var n=Fr(this,e),o=(this.style.removeProperty(e),Fr(this,e));return n===o?null:n===r&&o===i?a:a=t(r=n,i=o)}}function lh(e){return function(){this.style.removeProperty(e)}}function Ix(e,t,r){var i,a=r+"",n;return function(){var o=Fr(this,e);return o===a?null:o===i?n:n=t(i=o,r)}}function Px(e,t,r){var i,a,n;return function(){var o=Fr(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Fr(this,e))),o===l?null:o===i&&l===a?n:(a=l,n=t(i=o,s))}}function Nx(e,t){var r,i,a,n="style."+t,o="end."+n,s;return function(){var l=xe(this,e),c=l.on,h=l.value[n]==null?s||(s=lh(t)):void 0;(c!==r||a!==h)&&(i=(r=c).copy()).on(o,a=h),l.on=i}}function zx(e,t,r){var i=(e+="")=="transform"?Sg:oh;return t==null?this.styleTween(e,Rx(e,i)).on("end.style."+e,lh(e)):typeof t=="function"?this.styleTween(e,Px(e,i,Ys(this,"style."+e,t))).each(Nx(this._id,e)):this.styleTween(e,Ix(e,i,t),r).on("end.style."+e,null)}function Wx(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function qx(e,t,r){var i,a;function n(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&Wx(e,o,r)),i}return n._value=t,n}function Hx(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,qx(e,t,r??""))}function jx(e){return function(){this.textContent=e}}function Ux(e){return function(){var t=e(this);this.textContent=t??""}}function Yx(e){return this.tween("text",typeof e=="function"?Ux(Ys(this,"text",e)):jx(e==null?"":e+""))}function Gx(e){return function(t){this.textContent=e.call(this,t)}}function Vx(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&Gx(a)),t}return i._value=e,i}function Xx(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,Vx(e))}function Zx(){for(var e=this._name,t=this._id,r=ch(),i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=he(l,t);Xa(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Le(i,this._parents,e,r)}function Kx(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(n,o){var s={value:o},l={value:function(){--a===0&&n()}};r.each(function(){var c=xe(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),a===0&&n()})}var Qx=0;function Le(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function ch(){return++Qx}var Se=Mi.prototype;Le.prototype={constructor:Le,select:Fx,selectAll:$x,selectChild:Se.selectChild,selectChildren:Se.selectChildren,filter:Tx,merge:_x,selection:Dx,transition:Zx,call:Se.call,nodes:Se.nodes,node:Se.node,size:Se.size,empty:Se.empty,each:Se.each,on:Lx,attr:cx,attrTween:px,style:zx,styleTween:Hx,text:Yx,textTween:Xx,remove:Ex,tween:rx,delay:yx,duration:Cx,ease:kx,easeVarying:Sx,end:Kx,[Symbol.iterator]:Se[Symbol.iterator]};function Jx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var tb={time:null,delay:0,duration:250,ease:Jx};function eb(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 rb(e){var t,r;e instanceof Le?(t=e._id,e=e._name):(t=ch(),(r=tb).time=js(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,n=0;n<a;++n)for(var o=i[n],s=o.length,l,c=0;c<s;++c)(l=o[c])&&Xa(l,e,t,c,o,r||eb(l,t));return new Le(i,this._parents,e,t)}Mi.prototype.interrupt=J0;Mi.prototype.transition=rb;function ib(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function ab(){return this.eachAfter(ib)}function nb(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function sb(e,t){for(var r=this,i=[r],a,n,o=-1;r=i.pop();)if(e.call(t,r,++o,this),a=r.children)for(n=a.length-1;n>=0;--n)i.push(a[n]);return this}function ob(e,t){for(var r=this,i=[r],a=[],n,o,s,l=-1;r=i.pop();)if(a.push(r),n=r.children)for(o=0,s=n.length;o<s;++o)i.push(n[o]);for(;r=a.pop();)e.call(t,r,++l,this);return this}function lb(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function cb(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,a=i&&i.length;--a>=0;)r+=i[a].value;t.value=r})}function hb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ub(e){for(var t=this,r=fb(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function fb(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),a=null;for(e=r.pop(),t=i.pop();e===t;)a=e,e=r.pop(),t=i.pop();return a}function db(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function pb(){return Array.from(this)}function gb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function mb(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*yb(){var e=this,t,r=[e],i,a,n;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(a=0,n=i.length;a<n;++a)r.push(i[a]);while(r.length)}function hh(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Cb)):t===void 0&&(t=bb);for(var r=new wa(e),i,a=[r],n,o,s,l;i=a.pop();)if((o=t(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,s=l-1;s>=0;--s)a.push(n=o[s]=new wa(o[s])),n.parent=i,n.depth=i.depth+1;return r.eachBefore(kb)}function xb(){return hh(this).eachBefore(wb)}function bb(e){return e.children}function Cb(e){return Array.isArray(e)?e[1]:null}function wb(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function kb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wa(e){this.data=e,this.depth=this.height=0,this.parent=null}wa.prototype=hh.prototype={constructor:wa,count:ab,each:nb,eachAfter:ob,eachBefore:sb,find:lb,sum:cb,sort:hb,path:ub,ancestors:db,descendants:pb,leaves:gb,links:mb,copy:xb,[Symbol.iterator]:yb};function vb(e){if(typeof e!="function")throw new Error;return e}function Zr(){return 0}function Kr(e){return function(){return e}}function Sb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Tb(e,t,r,i,a){for(var n=e.children,o,s=-1,l=n.length,c=e.value&&(i-t)/e.value;++s<l;)o=n[s],o.y0=r,o.y1=a,o.x0=t,o.x1=t+=o.value*c}function _b(e,t,r,i,a){for(var n=e.children,o,s=-1,l=n.length,c=e.value&&(a-r)/e.value;++s<l;)o=n[s],o.x0=t,o.x1=i,o.y0=r,o.y1=r+=o.value*c}var Ab=(1+Math.sqrt(5))/2;function Bb(e,t,r,i,a,n){for(var o=[],s=t.children,l,c,h=0,u=0,f=s.length,d,g,m=t.value,y,x,b,w,S,v,C;h<f;){d=a-r,g=n-i;do y=s[u++].value;while(!y&&u<f);for(x=b=y,v=Math.max(g/d,d/g)/(m*e),C=y*y*v,S=Math.max(b/C,C/x);u<f;++u){if(y+=c=s[u].value,c<x&&(x=c),c>b&&(b=c),C=y*y*v,w=Math.max(b/C,C/x),w>S){y-=c;break}S=w}o.push(l={value:y,dice:d<g,children:s.slice(h,u)}),l.dice?Tb(l,r,i,a,m?i+=g*y/m:n):_b(l,r,i,m?r+=d*y/m:a,n),m-=y,h=u}return o}const Lb=function e(t){function r(i,a,n,o,s){Bb(t,i,a,n,o,s)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r}(Ab);function gA(){var e=Lb,t=!1,r=1,i=1,a=[0],n=Zr,o=Zr,s=Zr,l=Zr,c=Zr;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),a=[0],t&&f.eachBefore(Sb),f}function u(f){var d=a[f.depth],g=f.x0+d,m=f.y0+d,y=f.x1-d,x=f.y1-d;y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),f.x0=g,f.y0=m,f.x1=y,f.y1=x,f.children&&(d=a[f.depth+1]=n(f)/2,g+=c(f)-d,m+=o(f)-d,y-=s(f)-d,x-=l(f)-d,y<g&&(g=y=(g+y)/2),x<m&&(m=x=(m+x)/2),e(f,g,m,y,x))}return h.round=function(f){return arguments.length?(t=!!f,h):t},h.size=function(f){return arguments.length?(r=+f[0],i=+f[1],h):[r,i]},h.tile=function(f){return arguments.length?(e=vb(f),h):e},h.padding=function(f){return arguments.length?h.paddingInner(f).paddingOuter(f):h.paddingInner()},h.paddingInner=function(f){return arguments.length?(n=typeof f=="function"?f:Kr(+f),h):n},h.paddingOuter=function(f){return arguments.length?h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):h.paddingTop()},h.paddingTop=function(f){return arguments.length?(o=typeof f=="function"?f:Kr(+f),h):o},h.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Kr(+f),h):s},h.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Kr(+f),h):l},h.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Kr(+f),h):c},h}function Mb(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const mA=Mb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function oi(e,t,r){this.k=e,this.x=t,this.y=r}oi.prototype={constructor:oi,scale:function(e){return e===1?this:new oi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new oi(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+")"}};oi.prototype;var Eb=p(e=>{var a;const{securityLevel:t}=lt();let r=nt("body");if(t==="sandbox"){const o=((a=nt(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=nt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Gs(e){return typeof e>"u"||e===null}p(Gs,"isNothing");function uh(e){return typeof e=="object"&&e!==null}p(uh,"isObject");function fh(e){return Array.isArray(e)?e:Gs(e)?[]:[e]}p(fh,"toArray");function dh(e,t){var r,i,a,n;if(t)for(n=Object.keys(t),r=0,i=n.length;r<i;r+=1)a=n[r],e[a]=t[a];return e}p(dh,"extend");function ph(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(ph,"repeat");function gh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(gh,"isNegativeZero");var Fb=Gs,$b=uh,Ob=fh,Db=ph,Rb=gh,Ib=dh,Tt={isNothing:Fb,isObject:$b,toArray:Ob,repeat:Db,isNegativeZero:Rb,extend:Ib};function Vs(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+=`
82
-
83
- `+e.mark.snippet),i+" "+r):i}p(Vs,"formatError");function Or(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Vs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Or,"YAMLException$1");Or.prototype=Object.create(Error.prototype);Or.prototype.constructor=Or;Or.prototype.toString=p(function(t){return this.name+": "+Vs(this,t)},"toString");var Gt=Or;function la(e,t,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-t>s&&(n=" ... ",t=i-s+n.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:n+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+n.length}}p(la,"getLine");function ca(e,t){return Tt.repeat(" ",t-e.length)+e}p(ca,"padStart");function mh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],n,o=-1;n=r.exec(e.buffer);)a.push(n.index),i.push(n.index+n[0].length),e.position<=n.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=la(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),s=Tt.repeat(" ",t.indent)+ca((e.line-l+1).toString(),h)+" | "+c.str+`
84
- `+s;for(c=la(e.buffer,i[o],a[o],e.position,u),s+=Tt.repeat(" ",t.indent)+ca((e.line+1).toString(),h)+" | "+c.str+`
85
- `,s+=Tt.repeat("-",t.indent+h+3+c.pos)+`^
86
- `,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)c=la(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),s+=Tt.repeat(" ",t.indent)+ca((e.line+l+1).toString(),h)+" | "+c.str+`
87
- `;return s.replace(/\n$/,"")}p(mh,"makeSnippet");var Pb=mh,Nb=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],zb=["scalar","sequence","mapping"];function yh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(yh,"compileStyleAliases");function xh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Nb.indexOf(r)===-1)throw new Gt('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=yh(t.styleAliases||null),zb.indexOf(this.kind)===-1)throw new Gt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(xh,"Type$1");var Dt=xh;function ts(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(n,o){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=o)}),r[a]=i}),r}p(ts,"compileList");function bh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(bh,"compileMap");function ka(e){return this.extend(e)}p(ka,"Schema$1");ka.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Dt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Gt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof Dt))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Gt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Gt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(n){if(!(n instanceof Dt))throw new Gt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ka.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=ts(a,"implicit"),a.compiledExplicit=ts(a,"explicit"),a.compiledTypeMap=bh(a.compiledImplicit,a.compiledExplicit),a},"extend");var Wb=ka,qb=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Hb=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),jb=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Ub=new Wb({explicit:[qb,Hb,jb]});function Ch(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Ch,"resolveYamlNull");function wh(){return null}p(wh,"constructYamlNull");function kh(e){return e===null}p(kh,"isNull");var Yb=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ch,construct:wh,predicate:kh,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 vh(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(vh,"resolveYamlBoolean");function Sh(e){return e==="true"||e==="True"||e==="TRUE"}p(Sh,"constructYamlBoolean");function Th(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Th,"isBoolean");var Gb=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:vh,construct:Sh,predicate:Th,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 _h(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(_h,"isHexCode");function Ah(e){return 48<=e&&e<=55}p(Ah,"isOctCode");function Bh(e){return 48<=e&&e<=57}p(Bh,"isDecCode");function Lh(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!_h(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Ah(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Bh(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(Lh,"resolveYamlInteger");function Mh(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(Mh,"constructYamlInteger");function Eh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Tt.isNegativeZero(e)}p(Eh,"isInteger");var Vb=new Dt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Lh,construct:Mh,predicate:Eh,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"]}}),Xb=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fh(e){return!(e===null||!Xb.test(e)||e[e.length-1]==="_")}p(Fh,"resolveYamlFloat");function $h(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($h,"constructYamlFloat");var Zb=/^[-+]?[0-9]+e/;function Oh(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(Tt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Zb.test(r)?r.replace("e",".e"):r}p(Oh,"representYamlFloat");function Dh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Tt.isNegativeZero(e))}p(Dh,"isFloat");var Kb=new Dt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fh,construct:$h,predicate:Dh,represent:Oh,defaultStyle:"lowercase"}),Rh=Ub.extend({implicit:[Yb,Gb,Vb,Kb]}),Qb=Rh,Ih=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ph=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 Nh(e){return e===null?!1:Ih.exec(e)!==null||Ph.exec(e)!==null}p(Nh,"resolveYamlTimestamp");function zh(e){var t,r,i,a,n,o,s,l=0,c=null,h,u,f;if(t=Ih.exec(e),t===null&&(t=Ph.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(n=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,a,n,o,s,l)),c&&f.setTime(f.getTime()-c),f}p(zh,"constructYamlTimestamp");function Wh(e){return e.toISOString()}p(Wh,"representYamlTimestamp");var Jb=new Dt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Nh,construct:zh,instanceOf:Date,represent:Wh});function qh(e){return e==="<<"||e===null}p(qh,"resolveYamlMerge");var tC=new Dt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qh}),Xs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
- \r`;function Hh(e){if(e===null)return!1;var t,r,i=0,a=e.length,n=Xs;for(r=0;r<a;r++)if(t=n.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Hh,"resolveYamlBinary");function jh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,n=Xs,o=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|n.indexOf(i.charAt(t));return r=a%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(jh,"constructYamlBinary");function Uh(e){var t="",r=0,i,a,n=e.length,o=Xs;for(i=0;i<n;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=n%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Uh,"representYamlBinary");function Yh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Yh,"isBinary");var eC=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Hh,construct:jh,predicate:Yh,represent:Uh}),rC=Object.prototype.hasOwnProperty,iC=Object.prototype.toString;function Gh(e){if(e===null)return!0;var t=[],r,i,a,n,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(a=s[r],o=!1,iC.call(a)!=="[object Object]")return!1;for(n in a)if(rC.call(a,n))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(n)===-1)t.push(n);else return!1}return!0}p(Gh,"resolveYamlOmap");function Vh(e){return e!==null?e:[]}p(Vh,"constructYamlOmap");var aC=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Gh,construct:Vh}),nC=Object.prototype.toString;function Xh(e){if(e===null)return!0;var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],nC.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;n[t]=[a[0],i[a[0]]]}return!0}p(Xh,"resolveYamlPairs");function Zh(e){if(e===null)return[];var t,r,i,a,n,o=e;for(n=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),n[t]=[a[0],i[a[0]]];return n}p(Zh,"constructYamlPairs");var sC=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Xh,construct:Zh}),oC=Object.prototype.hasOwnProperty;function Kh(e){if(e===null)return!0;var t,r=e;for(t in r)if(oC.call(r,t)&&r[t]!==null)return!1;return!0}p(Kh,"resolveYamlSet");function Qh(e){return e!==null?e:{}}p(Qh,"constructYamlSet");var lC=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Kh,construct:Qh}),Jh=Qb.extend({implicit:[Jb,tC],explicit:[eC,aC,sC,lC]}),De=Object.prototype.hasOwnProperty,va=1,tu=2,eu=3,Sa=4,Mn=1,cC=2,pl=3,hC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uC=/[\x85\u2028\u2029]/,fC=/[,\[\]\{\}]/,ru=/^(?:!|!!|![a-z\-]+!)$/i,iu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function es(e){return Object.prototype.toString.call(e)}p(es,"_class");function le(e){return e===10||e===13}p(le,"is_EOL");function Oe(e){return e===9||e===32}p(Oe,"is_WHITE_SPACE");function zt(e){return e===9||e===32||e===10||e===13}p(zt,"is_WS_OR_EOL");function Xe(e){return e===44||e===91||e===93||e===123||e===125}p(Xe,"is_FLOW_INDICATOR");function au(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(au,"fromHexCode");function nu(e){return e===120?2:e===117?4:e===85?8:0}p(nu,"escapedHexLen");function su(e){return 48<=e&&e<=57?e-48:-1}p(su,"fromDecimalCode");function rs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
- `: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(rs,"simpleEscapeSequence");function ou(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ou,"charFromCodepoint");var lu=new Array(256),cu=new Array(256);for(Ue=0;Ue<256;Ue++)lu[Ue]=rs(Ue)?1:0,cu[Ue]=rs(Ue);var Ue;function hu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Jh,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(hu,"State$1");function Zs(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=Pb(r),new Gt(t,r)}p(Zs,"generateError");function V(e,t){throw Zs(e,t)}p(V,"throwError");function Ci(e,t){e.onWarning&&e.onWarning.call(null,Zs(e,t))}p(Ci,"throwWarning");var gl={YAML:p(function(t,r,i){var a,n,o;t.version!==null&&V(t,"duplication of %YAML directive"),i.length!==1&&V(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&V(t,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),o=parseInt(a[2],10),n!==1&&V(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ci(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,n;i.length!==2&&V(t,"TAG directive accepts exactly two arguments"),a=i[0],n=i[1],ru.test(a)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),De.call(t.tagMap,a)&&V(t,'there is a previously declared suffix for "'+a+'" tag handle'),iu.test(n)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{V(t,"tag prefix is malformed: "+n)}t.tagMap[a]=n},"handleTagDirective")};function Be(e,t,r,i){var a,n,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(a=0,n=s.length;a<n;a+=1)o=s.charCodeAt(a),o===9||32<=o&&o<=1114111||V(e,"expected valid JSON character");else hC.test(s)&&V(e,"the stream contains non-printable characters");e.result+=s}}p(Be,"captureSegment");function is(e,t,r,i){var a,n,o,s;for(Tt.isObject(r)||V(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,s=a.length;o<s;o+=1)n=a[o],De.call(t,n)||(t[n]=r[n],i[n]=!0)}p(is,"mergeMappings");function Ze(e,t,r,i,a,n,o,s,l){var c,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),c=0,h=a.length;c<h;c+=1)Array.isArray(a[c])&&V(e,"nested arrays are not supported inside keys"),typeof a=="object"&&es(a[c])==="[object Object]"&&(a[c]="[object Object]");if(typeof a=="object"&&es(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(c=0,h=n.length;c<h;c+=1)is(e,t,n[c],r);else is(e,t,n,r);else!e.json&&!De.call(r,a)&&De.call(t,a)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,V(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[a]=n,delete r[a];return t}p(Ze,"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++):V(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Za,"readLineBreak");function bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Oe(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(le(a))for(Za(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Ci(e,"deficient indentation"),i}p(bt,"skipSeparationSpace");function Ei(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||zt(r)))}p(Ei,"testDocumentSeparator");function Ka(e,t){t===1?e.result+=" ":t>1&&(e.result+=Tt.repeat(`
90
- `,t-1))}p(Ka,"writeFoldedLines");function uu(e,t,r){var i,a,n,o,s,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),zt(d)||Xe(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Xe(a)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,s=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),zt(a)||r&&Xe(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),zt(i))break}else{if(e.position===e.lineStart&&Ei(e)||r&&Xe(d))break;if(le(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(Be(e,n,o,!1),Ka(e,e.line-l),n=o=e.position,s=!1),Oe(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Be(e,n,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(uu,"readPlainScalar");function fu(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Be(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else le(r)?(Be(e,i,a,!0),Ka(e,bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ei(e)?V(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);V(e,"unexpected end of the stream within a single quoted scalar")}p(fu,"readSingleQuotedScalar");function du(e,t){var r,i,a,n,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Be(e,r,e.position,!0),e.position++,!0;if(s===92){if(Be(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),le(s))bt(e,!1,t);else if(s<256&&lu[s])e.result+=cu[s],e.position++;else if((o=nu(s))>0){for(a=o,n=0;a>0;a--)s=e.input.charCodeAt(++e.position),(o=au(s))>=0?n=(n<<4)+o:V(e,"expected hexadecimal character");e.result+=ou(n),e.position++}else V(e,"unknown escape sequence");r=i=e.position}else le(s)?(Be(e,r,i,!0),Ka(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ei(e)?V(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}V(e,"unexpected end of the stream within a double quoted scalar")}p(du,"readDoubleQuotedScalar");function pu(e,t){var r=!0,i,a,n,o=e.tag,s,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&V(e,"expected the node content, but found ','"):V(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),zt(c)&&(u=f=!0,e.position++,bt(e,!0,t))),i=e.line,a=e.lineStart,n=e.position,ir(e,t,va,!1,!0),y=e.tag,m=e.result,bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),bt(e,!0,t),ir(e,t,va,!1,!0),x=e.result),d?Ze(e,s,g,y,m,x,i,a,n):u?s.push(Ze(e,null,g,y,m,x,i,a,n)):s.push(m),bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}V(e,"unexpected end of the stream within a flow collection")}p(pu,"readFlowCollection");function gu(e,t){var r,i,a=Mn,n=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Mn===a?a=u===43?pl:cC:V(e,"repeat of a chomping mode identifier");else if((h=su(u))>=0)h===0?V(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?V(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Oe(u)){do u=e.input.charCodeAt(++e.position);while(Oe(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!le(u)&&u!==0)}for(;u!==0;){for(Za(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),le(u)){l++;continue}if(e.lineIndent<s){a===pl?e.result+=Tt.repeat(`
91
- `,n?1+l:l):a===Mn&&n&&(e.result+=`
92
- `);break}for(i?Oe(u)?(c=!0,e.result+=Tt.repeat(`
93
- `,n?1+l:l)):c?(c=!1,e.result+=Tt.repeat(`
94
- `,l+1)):l===0?n&&(e.result+=" "):e.result+=Tt.repeat(`
95
- `,l):e.result+=Tt.repeat(`
96
- `,n?1+l:l),n=!0,o=!0,l=0,r=e.position;!le(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Be(e,r,e.position,!1)}return!0}p(gu,"readBlockScalar");function as(e,t){var r,i=e.tag,a=e.anchor,n=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!zt(o))));){if(s=!0,e.position++,bt(e,!0,-1)&&e.lineIndent<=t){n.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ir(e,t,eu,!1,!0),n.push(e.result),bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)V(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=n,!0):!1}p(as,"readBlockSequence");function mu(e,t,r){var i,a,n,o,s,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),n=e.line,(b===63||b===58)&&zt(i))b===63?(y&&(Ze(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):V(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,l=e.position,!ir(e,r,tu,!1,!0))break;if(e.line===n){for(b=e.input.charCodeAt(e.position);Oe(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),zt(b)||V(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ze(e,u,f,d,g,null,o,s,l),d=g=m=null),x=!0,y=!1,a=!1,d=e.tag,g=e.result;else if(x)V(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)V(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===n||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,l=e.position),ir(e,t,Sa,!0,a)&&(y?g=e.result:m=e.result),y||(Ze(e,u,f,d,g,m,o,s,l),d=g=m=null),bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===n||e.lineIndent>t)&&b!==0)V(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ze(e,u,f,d,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(mu,"readBlockMapping");function yu(e){var t,r=!1,i=!1,a,n,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&V(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):V(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!zt(o);)o===33&&(i?V(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),ru.test(a)||V(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),fC.test(n)&&V(e,"tag suffix cannot contain flow indicator characters")}n&&!iu.test(n)&&V(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{V(e,"tag name is malformed: "+n)}return r?e.tag=n:De.call(e.tagMap,a)?e.tag=e.tagMap[a]+n:a==="!"?e.tag="!"+n:a==="!!"?e.tag="tag:yaml.org,2002:"+n:V(e,'undeclared tag handle "'+a+'"'),!0}p(yu,"readTagProperty");function xu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&V(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!zt(r)&&!Xe(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(xu,"readAnchorProperty");function bu(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&&!zt(i)&&!Xe(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),De.call(e.anchorMap,r)||V(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],bt(e,!0,-1),!0}p(bu,"readAlias");function ir(e,t,r,i,a){var n,o,s,l=1,c=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=o=s=Sa===r||eu===r,i&&bt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;yu(e)||xu(e);)bt(e,!0,-1)?(c=!0,s=n,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||a),(l===1||Sa===r)&&(va===r||tu===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?s&&(as(e,y)||mu(e,y,m))||pu(e,m)?h=!0:(o&&gu(e,m)||fu(e,m)||du(e,m)?h=!0:bu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&V(e,"alias node should not have any properties")):uu(e,m,va===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&as(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"&&V(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(De.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||V(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&V(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):V(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(ir,"composeNode");function Cu(e){var t=e.position,r,i,a,n=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(n=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&V(e,"directive name must not be less than one character in length");o!==0;){for(;Oe(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!le(o));break}if(le(o))break;for(r=e.position;o!==0&&!zt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Za(e),De.call(gl,i)?gl[i](e,i,a):Ci(e,'unknown document directive "'+i+'"')}if(bt(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,bt(e,!0,-1)):n&&V(e,"directives end mark is expected"),ir(e,e.lineIndent-1,Sa,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&uC.test(e.input.slice(t,e.position))&&Ci(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ei(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1));return}if(e.position<e.length-1)V(e,"end of the stream or a document separator is expected");else return}p(Cu,"readDocument");function Ks(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new hu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,V(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;)Cu(r);return r.documents}p(Ks,"loadDocuments");function dC(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Ks(e,r);if(typeof t!="function")return i;for(var a=0,n=i.length;a<n;a+=1)t(i[a])}p(dC,"loadAll$1");function wu(e,t){var r=Ks(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Gt("expected a single document in the stream, but found more")}}p(wu,"load$1");var pC=wu,gC={load:pC},ku=Object.prototype.toString,vu=Object.prototype.hasOwnProperty,Qs=65279,mC=9,wi=10,yC=13,xC=32,bC=33,CC=34,ns=35,wC=37,kC=38,vC=39,SC=42,Su=44,TC=45,Ta=58,_C=61,AC=62,BC=63,LC=64,Tu=91,_u=93,MC=96,Au=123,EC=124,Bu=125,It={};It[0]="\\0";It[7]="\\a";It[8]="\\b";It[9]="\\t";It[10]="\\n";It[11]="\\v";It[12]="\\f";It[13]="\\r";It[27]="\\e";It[34]='\\"';It[92]="\\\\";It[133]="\\N";It[160]="\\_";It[8232]="\\L";It[8233]="\\P";var FC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$C=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Lu(e,t){var r,i,a,n,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,n=i.length;a<n;a+=1)o=i[a],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&vu.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(Lu,"compileStyleMap");function Mu(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 Gt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Tt.repeat("0",i-t.length)+t}p(Mu,"encodeHex");var OC=1,ki=2;function Eu(e){this.schema=e.schema||Jh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Tt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Lu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ki:OC,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(Eu,"State");function ss(e,t){for(var r=Tt.repeat(" ",t),i=0,a=-1,n="",o,s=e.length;i<s;)a=e.indexOf(`
98
- `,i),a===-1?(o=e.slice(i),i=s):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
99
- `&&(n+=r),n+=o;return n}p(ss,"indentString");function _a(e,t){return`
100
- `+Tt.repeat(" ",e.indent*t)}p(_a,"generateNextLine");function Fu(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}p(Fu,"testImplicitResolving");function vi(e){return e===xC||e===mC}p(vi,"isWhitespace");function Dr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Qs||65536<=e&&e<=1114111}p(Dr,"isPrintable");function os(e){return Dr(e)&&e!==Qs&&e!==yC&&e!==wi}p(os,"isNsCharOrWhitespace");function ls(e,t,r){var i=os(e),a=i&&!vi(e);return(r?i:i&&e!==Su&&e!==Tu&&e!==_u&&e!==Au&&e!==Bu)&&e!==ns&&!(t===Ta&&!a)||os(t)&&!vi(t)&&e===ns||t===Ta&&a}p(ls,"isPlainSafe");function $u(e){return Dr(e)&&e!==Qs&&!vi(e)&&e!==TC&&e!==BC&&e!==Ta&&e!==Su&&e!==Tu&&e!==_u&&e!==Au&&e!==Bu&&e!==ns&&e!==kC&&e!==SC&&e!==bC&&e!==EC&&e!==_C&&e!==AC&&e!==vC&&e!==CC&&e!==wC&&e!==LC&&e!==MC}p($u,"isPlainSafeFirst");function Ou(e){return!vi(e)&&e!==Ta}p(Ou,"isPlainSafeLast");function Cr(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(Cr,"codePointAt");function Js(e){var t=/^\n* /;return t.test(e)}p(Js,"needIndentIndicator");var Du=1,cs=2,Ru=3,Iu=4,xr=5;function Pu(e,t,r,i,a,n,o,s){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=$u(Cr(e,0))&&Ou(Cr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Cr(e,l),!Dr(c))return xr;m=m&&ls(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Cr(e,l),c===wi)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Dr(c))return xr;m=m&&ls(c,h,s),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?Du:n===ki?xr:cs:r>9&&Js(e)?xr:o?n===ki?xr:cs:f?Iu:Ru}p(Pu,"chooseScalarStyle");function Nu(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===ki?'""':"''";if(!e.noCompatMode&&(FC.indexOf(t)!==-1||$C.test(t)))return e.quotingType===ki?'"'+t+'"':"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Fu(e,c)}switch(p(l,"testAmbiguity"),Pu(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case Du:return t;case cs:return"'"+t.replace(/'/g,"''")+"'";case Ru:return"|"+hs(t,e.indent)+us(ss(t,n));case Iu:return">"+hs(t,e.indent)+us(ss(zu(t,o),n));case xr:return'"'+Wu(t)+'"';default:throw new Gt("impossible error: invalid scalar style")}}()}p(Nu,"writeScalar");function hs(e,t){var r=Js(e)?String(t):"",i=e[e.length-1]===`
101
- `,a=i&&(e[e.length-2]===`
102
- `||e===`
103
- `),n=a?"+":i?"":"-";return r+n+`
104
- `}p(hs,"blockHeader");function us(e){return e[e.length-1]===`
105
- `?e.slice(0,-1):e}p(us,"dropEndingNewline");function zu(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(`
106
- `);return c=c!==-1?c:e.length,r.lastIndex=c,fs(e.slice(0,c),t)}(),a=e[0]===`
107
- `||e[0]===" ",n,o;o=r.exec(e);){var s=o[1],l=o[2];n=l[0]===" ",i+=s+(!a&&!n&&l!==""?`
108
- `:"")+fs(l,t),a=n}return i}p(zu,"foldString");function fs(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,n,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-a>t&&(n=o>a?o:s,l+=`
109
- `+e.slice(a,n),a=n+1),o=s;return l+=`
110
- `,e.length-a>t&&o>a?l+=e.slice(a,o)+`
111
- `+e.slice(o+1):l+=e.slice(a),l.slice(1)}p(fs,"foldLine");function Wu(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Cr(e,a),i=It[r],!i&&Dr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Mu(r);return t}p(Wu,"escapeString");function qu(e,t,r){var i="",a=e.tag,n,o,s;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(ye(e,t,s,!1,!1)||typeof s>"u"&&ye(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(qu,"writeFlowSequence");function ds(e,t,r,i){var a="",n=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ye(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ye(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=_a(e,t)),e.dump&&wi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=n,e.dump=a||"[]"}p(ds,"writeBlockSequence");function Hu(e,t,r){var i="",a=e.tag,n=Object.keys(r),o,s,l,c,h;for(o=0,s=n.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=n[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ye(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ye(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}p(Hu,"writeFlowMapping");function ju(e,t,r,i){var a="",n=e.tag,o=Object.keys(r),s,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Gt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)f="",(!i||a!=="")&&(f+=_a(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ye(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&wi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=_a(e,t)),ye(e,t+1,h,!0,u)&&(e.dump&&wi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=n,e.dump=a||"{}"}p(ju,"writeBlockMapping");function ps(e,t,r){var i,a,n,o,s,l;for(a=r?e.explicitTypes:e.implicitTypes,n=0,o=a.length;n<o;n+=1)if(s=a[n],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,ku.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(vu.call(s.represent,l))i=s.represent[l](t,l);else throw new Gt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(ps,"detectType");function ye(e,t,r,i,a,n,o){e.tag=null,e.dump=r,ps(e,r,!1)||ps(e,r,!0);var s=ku.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(ju(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Hu(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?ds(e,t-1,e.dump,a):ds(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(qu(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Nu(e,e.dump,t,n,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Gt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ye,"writeNode");function Uu(e,t){var r=[],i=[],a,n;for(Aa(e,r,i),a=0,n=i.length;a<n;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(n)}p(Uu,"getDuplicateReferences");function Aa(e,t,r){var i,a,n;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)Aa(e[a],t,r);else for(i=Object.keys(e),a=0,n=i.length;a<n;a+=1)Aa(e[i[a]],t,r)}p(Aa,"inspectNode");function DC(e,t){t=t||{};var r=new Eu(t);r.noRefs||Uu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ye(r,0,i,!0,!0)?r.dump+`
112
- `:""}p(DC,"dump$1");function RC(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(RC,"renamed");var IC=Rh,PC=gC.load;/*! Bundled license information:
113
-
114
- js-yaml/dist/js-yaml.mjs:
115
- (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
116
- */var $t={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},ml={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function li(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[a,n]=[t.x,t.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(li,"calculateDeltaAndAngle");var yt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),NC=p(e=>({x:p(function(t,r,i){let a=0;const n=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:d,deltaX:g}=li(i[0],i[1]);a=$t[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:d,deltaX:g}=li(i[i.length-1],i[i.length-2]);a=$t[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(yt(t).x-yt(i[i.length-1]).x),s=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=$t[e.arrowTypeStart],u=$t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="right"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=n==="right"?-1:1,a+=d}return yt(t).x+a},"x"),y:p(function(t,r,i){let a=0;const n=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:d,deltaY:g}=li(i[0],i[1]);a=$t[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:d,deltaY:g}=li(i[i.length-1],i[i.length-2]);a=$t[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(yt(t).y-yt(i[i.length-1]).y),s=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=$t[e.arrowTypeStart],u=$t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&s<u){let d=u+f-o;d*=n==="up"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=n==="up"?-1:1,a+=d}return yt(t).y+a},"y")}),"getLineFunctionsWithOffset"),to=p(({flowchart:e})=>{var a,n;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),zC=p(e=>{const{handDrawnSeed:t}=lt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ir=p(e=>{const t=WC([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),WC=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Yu=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"),U=p(e=>{const{stylesArray:t}=Ir(e),r=[],i=[],a=[],n=[];return t.forEach(o=>{const s=o[0];Yu(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&a.push(o.join(":")+" !important"),s==="fill"&&n.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:n}},"styles2String"),j=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=lt(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:o}=Ir(e);return Object.assign({roughness:.7,fill:o.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:qC(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),qC=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Qr={},vt={},yl;function HC(){return yl||(yl=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|&colon;)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var xl;function jC(){if(xl)return Qr;xl=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.sanitizeUrl=void 0;var e=HC();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function n(o){if(!o)return e.BLANK_URL;var s,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return Qr.sanitizeUrl=n,Qr}var UC=jC(),Gu=typeof global=="object"&&global&&global.Object===Object&&global,YC=typeof self=="object"&&self&&self.Object===Object&&self,be=Gu||YC||Function("return this")(),Ba=be.Symbol,Vu=Object.prototype,GC=Vu.hasOwnProperty,VC=Vu.toString,Jr=Ba?Ba.toStringTag:void 0;function XC(e){var t=GC.call(e,Jr),r=e[Jr];try{e[Jr]=void 0;var i=!0}catch{}var a=VC.call(e);return i&&(t?e[Jr]=r:delete e[Jr]),a}var ZC=Object.prototype,KC=ZC.toString;function QC(e){return KC.call(e)}var JC="[object Null]",t1="[object Undefined]",bl=Ba?Ba.toStringTag:void 0;function Pr(e){return e==null?e===void 0?t1:JC:bl&&bl in Object(e)?XC(e):QC(e)}function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var e1="[object AsyncFunction]",r1="[object Function]",i1="[object GeneratorFunction]",a1="[object Proxy]";function eo(e){if(!or(e))return!1;var t=Pr(e);return t==r1||t==i1||t==e1||t==a1}var En=be["__core-js_shared__"],Cl=function(){var e=/[^.]+$/.exec(En&&En.keys&&En.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n1(e){return!!Cl&&Cl in e}var s1=Function.prototype,o1=s1.toString;function lr(e){if(e!=null){try{return o1.call(e)}catch{}try{return e+""}catch{}}return""}var l1=/[\\^$.*+?()[\]{}|]/g,c1=/^\[object .+?Constructor\]$/,h1=Function.prototype,u1=Object.prototype,f1=h1.toString,d1=u1.hasOwnProperty,p1=RegExp("^"+f1.call(d1).replace(l1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g1(e){if(!or(e)||n1(e))return!1;var t=eo(e)?p1:c1;return t.test(lr(e))}function m1(e,t){return e==null?void 0:e[t]}function cr(e,t){var r=m1(e,t);return g1(r)?r:void 0}var Si=cr(Object,"create");function y1(){this.__data__=Si?Si(null):{},this.size=0}function x1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var b1="__lodash_hash_undefined__",C1=Object.prototype,w1=C1.hasOwnProperty;function k1(e){var t=this.__data__;if(Si){var r=t[e];return r===b1?void 0:r}return w1.call(t,e)?t[e]:void 0}var v1=Object.prototype,S1=v1.hasOwnProperty;function T1(e){var t=this.__data__;return Si?t[e]!==void 0:S1.call(t,e)}var _1="__lodash_hash_undefined__";function A1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Si&&t===void 0?_1:t,this}function ar(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ar.prototype.clear=y1;ar.prototype.delete=x1;ar.prototype.get=k1;ar.prototype.has=T1;ar.prototype.set=A1;function B1(){this.__data__=[],this.size=0}function Qa(e,t){return e===t||e!==e&&t!==t}function Ja(e,t){for(var r=e.length;r--;)if(Qa(e[r][0],t))return r;return-1}var L1=Array.prototype,M1=L1.splice;function E1(e){var t=this.__data__,r=Ja(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():M1.call(t,r,1),--this.size,!0}function F1(e){var t=this.__data__,r=Ja(t,e);return r<0?void 0:t[r][1]}function $1(e){return Ja(this.__data__,e)>-1}function O1(e,t){var r=this.__data__,i=Ja(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ee.prototype.clear=B1;Ee.prototype.delete=E1;Ee.prototype.get=F1;Ee.prototype.has=$1;Ee.prototype.set=O1;var Ti=cr(be,"Map");function D1(){this.size=0,this.__data__={hash:new ar,map:new(Ti||Ee),string:new ar}}function R1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tn(e,t){var r=e.__data__;return R1(t)?r[typeof t=="string"?"string":"hash"]:r.map}function I1(e){var t=tn(this,e).delete(e);return this.size-=t?1:0,t}function P1(e){return tn(this,e).get(e)}function N1(e){return tn(this,e).has(e)}function z1(e,t){var r=tn(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Pe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Pe.prototype.clear=D1;Pe.prototype.delete=I1;Pe.prototype.get=P1;Pe.prototype.has=N1;Pe.prototype.set=z1;var W1="Expected a function";function Fi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(W1);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var o=e.apply(this,i);return r.cache=n.set(a,o)||n,o};return r.cache=new(Fi.Cache||Pe),r}Fi.Cache=Pe;function q1(){this.__data__=new Ee,this.size=0}function H1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function j1(e){return this.__data__.get(e)}function U1(e){return this.__data__.has(e)}var Y1=200;function G1(e,t){var r=this.__data__;if(r instanceof Ee){var i=r.__data__;if(!Ti||i.length<Y1-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Pe(i)}return r.set(e,t),this.size=r.size,this}function Nr(e){var t=this.__data__=new Ee(e);this.size=t.size}Nr.prototype.clear=q1;Nr.prototype.delete=H1;Nr.prototype.get=j1;Nr.prototype.has=U1;Nr.prototype.set=G1;var La=function(){try{var e=cr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function ro(e,t,r){t=="__proto__"&&La?La(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function gs(e,t,r){(r!==void 0&&!Qa(e[t],r)||r===void 0&&!(t in e))&&ro(e,t,r)}function V1(e){return function(t,r,i){for(var a=-1,n=Object(t),o=i(t),s=o.length;s--;){var l=o[++a];if(r(n[l],l,n)===!1)break}return t}}var X1=V1(),Xu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wl=Xu&&typeof module=="object"&&module&&!module.nodeType&&module,Z1=wl&&wl.exports===Xu,kl=Z1?be.Buffer:void 0,vl=kl?kl.allocUnsafe:void 0;function K1(e,t){if(t)return e.slice();var r=e.length,i=vl?vl(r):new e.constructor(r);return e.copy(i),i}var Sl=be.Uint8Array;function Q1(e){var t=new e.constructor(e.byteLength);return new Sl(t).set(new Sl(e)),t}function J1(e,t){var r=t?Q1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function t2(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Tl=Object.create,e2=function(){function e(){}return function(t){if(!or(t))return{};if(Tl)return Tl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Zu(e,t){return function(r){return e(t(r))}}var Ku=Zu(Object.getPrototypeOf,Object),r2=Object.prototype;function en(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||r2;return e===r}function i2(e){return typeof e.constructor=="function"&&!en(e)?e2(Ku(e)):{}}function $i(e){return e!=null&&typeof e=="object"}var a2="[object Arguments]";function _l(e){return $i(e)&&Pr(e)==a2}var Qu=Object.prototype,n2=Qu.hasOwnProperty,s2=Qu.propertyIsEnumerable,Ma=_l(function(){return arguments}())?_l:function(e){return $i(e)&&n2.call(e,"callee")&&!s2.call(e,"callee")},Ea=Array.isArray,o2=9007199254740991;function Ju(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=o2}function rn(e){return e!=null&&Ju(e.length)&&!eo(e)}function l2(e){return $i(e)&&rn(e)}function c2(){return!1}var tf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Al=tf&&typeof module=="object"&&module&&!module.nodeType&&module,h2=Al&&Al.exports===tf,Bl=h2?be.Buffer:void 0,u2=Bl?Bl.isBuffer:void 0,io=u2||c2,f2="[object Object]",d2=Function.prototype,p2=Object.prototype,ef=d2.toString,g2=p2.hasOwnProperty,m2=ef.call(Object);function y2(e){if(!$i(e)||Pr(e)!=f2)return!1;var t=Ku(e);if(t===null)return!0;var r=g2.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ef.call(r)==m2}var x2="[object Arguments]",b2="[object Array]",C2="[object Boolean]",w2="[object Date]",k2="[object Error]",v2="[object Function]",S2="[object Map]",T2="[object Number]",_2="[object Object]",A2="[object RegExp]",B2="[object Set]",L2="[object String]",M2="[object WeakMap]",E2="[object ArrayBuffer]",F2="[object DataView]",$2="[object Float32Array]",O2="[object Float64Array]",D2="[object Int8Array]",R2="[object Int16Array]",I2="[object Int32Array]",P2="[object Uint8Array]",N2="[object Uint8ClampedArray]",z2="[object Uint16Array]",W2="[object Uint32Array]",pt={};pt[$2]=pt[O2]=pt[D2]=pt[R2]=pt[I2]=pt[P2]=pt[N2]=pt[z2]=pt[W2]=!0;pt[x2]=pt[b2]=pt[E2]=pt[C2]=pt[F2]=pt[w2]=pt[k2]=pt[v2]=pt[S2]=pt[T2]=pt[_2]=pt[A2]=pt[B2]=pt[L2]=pt[M2]=!1;function q2(e){return $i(e)&&Ju(e.length)&&!!pt[Pr(e)]}function H2(e){return function(t){return e(t)}}var rf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yi=rf&&typeof module=="object"&&module&&!module.nodeType&&module,j2=yi&&yi.exports===rf,Fn=j2&&Gu.process,Ll=function(){try{var e=yi&&yi.require&&yi.require("util").types;return e||Fn&&Fn.binding&&Fn.binding("util")}catch{}}(),Ml=Ll&&Ll.isTypedArray,ao=Ml?H2(Ml):q2;function ms(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var U2=Object.prototype,Y2=U2.hasOwnProperty;function G2(e,t,r){var i=e[t];(!(Y2.call(e,t)&&Qa(i,r))||r===void 0&&!(t in e))&&ro(e,t,r)}function V2(e,t,r,i){var a=!r;r||(r={});for(var n=-1,o=t.length;++n<o;){var s=t[n],l=void 0;l===void 0&&(l=e[s]),a?ro(r,s,l):G2(r,s,l)}return r}function X2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Z2=9007199254740991,K2=/^(?:0|[1-9]\d*)$/;function af(e,t){var r=typeof e;return t=t??Z2,!!t&&(r=="number"||r!="symbol"&&K2.test(e))&&e>-1&&e%1==0&&e<t}var Q2=Object.prototype,J2=Q2.hasOwnProperty;function tw(e,t){var r=Ea(e),i=!r&&Ma(e),a=!r&&!i&&io(e),n=!r&&!i&&!a&&ao(e),o=r||i||a||n,s=o?X2(e.length,String):[],l=s.length;for(var c in e)(t||J2.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||n&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||af(c,l)))&&s.push(c);return s}function ew(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var rw=Object.prototype,iw=rw.hasOwnProperty;function aw(e){if(!or(e))return ew(e);var t=en(e),r=[];for(var i in e)i=="constructor"&&(t||!iw.call(e,i))||r.push(i);return r}function nf(e){return rn(e)?tw(e,!0):aw(e)}function nw(e){return V2(e,nf(e))}function sw(e,t,r,i,a,n,o){var s=ms(e,r),l=ms(t,r),c=o.get(l);if(c){gs(e,r,c);return}var h=n?n(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=Ea(l),d=!f&&io(l),g=!f&&!d&&ao(l);h=l,f||d||g?Ea(s)?h=s:l2(s)?h=t2(s):d?(u=!1,h=K1(l,!0)):g?(u=!1,h=J1(l,!0)):h=[]:y2(l)||Ma(l)?(h=s,Ma(s)?h=nw(s):(!or(s)||eo(s))&&(h=i2(l))):u=!1}u&&(o.set(l,h),a(h,l,i,n,o),o.delete(l)),gs(e,r,h)}function sf(e,t,r,i,a){e!==t&&X1(t,function(n,o){if(a||(a=new Nr),or(n))sw(e,t,o,r,sf,i,a);else{var s=i?i(ms(e,o),n,o+"",e,t,a):void 0;s===void 0&&(s=n),gs(e,o,s)}},nf)}function of(e){return e}function ow(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var El=Math.max;function lw(e,t,r){return t=El(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,n=El(i.length-t,0),o=Array(n);++a<n;)o[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(o),ow(e,this,s)}}function cw(e){return function(){return e}}var hw=La?function(e,t){return La(e,"toString",{configurable:!0,enumerable:!1,value:cw(t),writable:!0})}:of,uw=800,fw=16,dw=Date.now;function pw(e){var t=0,r=0;return function(){var i=dw(),a=fw-(i-r);if(r=i,a>0){if(++t>=uw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var gw=pw(hw);function mw(e,t){return gw(lw(e,t,of),e+"")}function yw(e,t,r){if(!or(r))return!1;var i=typeof t;return(i=="number"?rn(r)&&af(t,r.length):i=="string"&&t in r)?Qa(r[t],e):!1}function xw(e){return mw(function(t,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(n=e.length>3&&typeof n=="function"?(a--,n):void 0,o&&yw(r[0],r[1],o)&&(n=a<3?void 0:n,a=1),t=Object(t);++i<a;){var s=r[i];s&&e(t,s,i,n)}return t})}var bw=xw(function(e,t,r){sf(e,t,r)}),Cw="​",ww={curveBasis:Ji,curveBasisClosed:Fg,curveBasisOpen:Eg,curveBumpX:Cc,curveBumpY:bc,curveBundle:Mg,curveCardinalClosed:Lg,curveCardinalOpen:Bg,curveCardinal:xc,curveCatmullRomClosed:Ag,curveCatmullRomOpen:_g,curveCatmullRom:yc,curveLinear:Wn,curveLinearClosed:Tg,curveMonotoneX:mc,curveMonotoneY:gc,curveNatural:pc,curveStep:dc,curveStepAfter:fc,curveStepBefore:uc},kw=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vw=p(function(e,t){const r=lf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);fa(o),i=St(i,[...o])}else i=r.args;if(!i)return;let a=Ds(e,t);const n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),lf=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${kw.source})(?=[}][%]{2}).*
117
- `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const o=[];for(;(n=gi.exec(e))!==null;)if(n.index===gi.lastIndex&&gi.lastIndex++,n&&!t||t&&((r=n[1])!=null&&r.match(t))||t&&((i=n[2])!=null&&i.match(t))){const s=n[1]?n[1]:n[2],l=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:s,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return A.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Sw=p(function(e){return e.replace(gi,"")},"removeDirectives"),Tw=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function no(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return ww[r]??t}p(no,"interpolateToCurve");function cf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?UC.sanitizeUrl(r):r}p(cf,"formatUrl");var _w=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n){A.error(`Function name: ${e} not found in window`);return}n[a](...t)},"runFunc");function so(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(so,"distance");function hf(e){let t,r=0;e.forEach(a=>{r+=so(a,t),t=a});const i=r/2;return oo(e,i)}p(hf,"traverseEdge");function uf(e){return e.length===1?e[0]:hf(e)}p(uf,"calcLabelPosition");var Fl=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),oo=p((e,t)=>{let r,i=t;for(const a of e){if(r){const n=so(a,r);if(n===0)return r;if(n<i)i-=n;else{const o=i/n;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Fl((1-o)*r.x+o*a.x,5),y:Fl((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Aw=p((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=oo(t,25),n=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),s={x:0,y:0};return s.x=Math.sin(o)*n+(t[0].x+a.x)/2,s.y=-Math.cos(o)*n+(t[0].y+a.y)/2,s},"calcCardinalityPosition");function ff(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,n=oo(i,a),o=10+e*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+n.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+n.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+n.x)/2,l.y=-Math.cos(s)*o+(i[0].y+n.y)/2),l}p(ff,"calcTerminalLabelPosition");function df(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(df,"getStylesFromArray");var $l=0,Bw=p(()=>($l++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$l),"generateId");function pf(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(pf,"makeRandomHex");var Lw=p(e=>pf(e.length),"random"),Mw=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"),Ew=p(function(e,t){const r=t.text.replace(Rr.lineBreakRegex," "),[,i]=an(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const n=a.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),Fw=Fi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Rr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let n="";return i.forEach((o,s)=>{const l=Me(`${o} `,r),c=Me(n,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=$w(o,t,"-",r);a.push(n,...f),n=d}else c+l>=t?(a.push(n),n=o):n=[n,o].filter(Boolean).join(" ");s+1===i.length&&a.push(n)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),$w=Fi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],n=[];let o="";return a.forEach((s,l)=>{const c=`${o}${s}`;if(Me(c,i)>=t){const u=l+1,f=a.length===u,d=`${c}${r}`;n.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:n,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function gf(e,t){return lo(e,t).height}p(gf,"calculateTextHeight");function Me(e,t){return lo(e,t).width}p(Me,"calculateTextWidth");var lo=Fi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,n]=an(r),o=["sans-serif",i],s=e.split(Rr.lineBreakRegex),l=[],c=nt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=Mw();y.text=m||Cw;const x=Ew(h,y).style("font-size",n).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Lr,Ow=(Lr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Lr,"InitIDGenerator"),Lr),Yi,Dw=p(function(e){return Yi=Yi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yi.innerHTML=e,unescape(Yi.textContent)},"entityDecode");function co(e){return"str"in e}p(co,"isDetailedError");var Rw=p((e,t,r,i)=>{var n;if(!i)return;const a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),an=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 ho(e,t){return bw({},e,t)}p(ho,"cleanAndMerge");var oe={assignWithDepth:St,wrapLabel:Fw,calculateTextHeight:gf,calculateTextWidth:Me,calculateTextDimensions:lo,cleanAndMerge:ho,detectInit:vw,detectDirective:lf,isSubstringInArray:Tw,interpolateToCurve:no,calcLabelPosition:uf,calcCardinalityPosition:Aw,calcTerminalLabelPosition:ff,formatUrl:cf,getStylesFromArray:df,generateId:Bw,random:Lw,runFunc:_w,entityDecode:Dw,insertTitle:Rw,isLabelCoordinateInPath:mf,parseFontSize:an,InitIDGenerator:Ow},Iw=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"),hr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),yA=p((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Rt(e){return e??null}p(Rt,"handleUndefinedAttr");function mf(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(mf,"isLabelCoordinateInPath");const Pw=Object.freeze({left:0,top:0,width:16,height:16}),Fa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),yf=Object.freeze({...Pw,...Fa}),Nw=Object.freeze({...yf,body:"",hidden:!1}),zw=Object.freeze({width:null,height:null}),Ww=Object.freeze({...zw,...Fa}),qw=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const s=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:s};return $n(c)?c:null}const n=a[0],o=n.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return $n(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:n};return $n(s,r)?s:null}return null},$n=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Hw(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 Ol(e,t){const r=Hw(e,t);for(const i in Nw)i in Fa?i in e&&!(i in r)&&(r[i]=Fa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function jw(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function n(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const s=i[o]&&i[o].parent,l=s&&n(s);l&&(a[o]=[s].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(n),a}function Dl(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let n={};function o(s){n=Ol(i[s]||a[s],n)}return o(t),r.forEach(o),Ol(e,n)}function Uw(e,t){if(e.icons[t])return Dl(e,t,[]);const r=jw(e,[t])[t];return r?Dl(e,t,r):null}const Yw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rl(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(Yw);if(i===null||!i.length)return e;const a=[];let n=i.shift(),o=Gw.test(n);for(;;){if(o){const s=parseFloat(n);isNaN(s)?a.push(n):a.push(Math.ceil(s*t*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");o=!o}}function Vw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),n=e.indexOf("</"+t);if(a===-1||n===-1)break;const o=e.indexOf(">",n);if(o===-1)break;r+=e.slice(a+1,n).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Xw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Zw(e,t,r){const i=Vw(e);return Xw(i.defs,t+i.content+r)}const Kw=e=>e==="unset"||e==="undefined"||e==="none";function Qw(e,t){const r={...yf,...e},i={...Ww,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=a.height/2+a.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),y.length&&(n=Zw(n,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=a.width,c=a.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Rl(u,l/c)):(h=o==="auto"?l:o,u=s===null?Rl(h,c/l):s==="auto"?c:s);const f={},d=(m,y)=>{Kw(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:n}}const Jw=/\sid="(\S+)"/g,Il=new Map;function tk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Il.get(e)||0;return Il.set(e,t+1),t?`${e}${t}`:e}function ek(e){const t=[];let r;for(;r=Jw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const n=tk(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function rk(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 uo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ur=uo();function xf(e){ur=e}var xi={exec:()=>null};function st(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(Wt.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var ik=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Wt={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")},ak=/^(?:[ \t]*(?:\n|$))+/,nk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Oi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ok=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fo=/(?:[*+-]|\d{1,9}[.)])/,bf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cf=st(bf).replace(/bull/g,fo).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(),lk=st(bf).replace(/bull/g,fo).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(),po=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ck=/^[^\n]+/,go=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hk=st(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",go).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uk=st(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fo).getRegex(),nn="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",mo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fk=st("^ {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",mo).replace("tag",nn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wf=st(po).replace("hr",Oi).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",nn).getRegex(),dk=st(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wf).getRegex(),yo={blockquote:dk,code:nk,def:hk,fences:sk,heading:ok,hr:Oi,html:fk,lheading:Cf,list:uk,newline:ak,paragraph:wf,table:xi,text:ck},Pl=st("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Oi).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",nn).getRegex(),pk={...yo,lheading:lk,table:Pl,paragraph:st(po).replace("hr",Oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pl).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",nn).getRegex()},gk={...yo,html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mo).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:xi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:st(po).replace("hr",Oi).replace("heading",` *#{1,6} *[^
118
- ]`).replace("lheading",Cf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},mk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kf=/^( {2,}|\\)\n(?!\s*$)/,xk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,sn=/[\p{P}\p{S}]/u,xo=/[\s\p{P}\p{S}]/u,vf=/[^\s\p{P}\p{S}]/u,bk=st(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xo).getRegex(),Sf=/(?!~)[\p{P}\p{S}]/u,Ck=/(?!~)[\s\p{P}\p{S}]/u,wk=/(?:[^\s\p{P}\p{S}]|~)/u,kk=st(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ik?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Tf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vk=st(Tf,"u").replace(/punct/g,sn).getRegex(),Sk=st(Tf,"u").replace(/punct/g,Sf).getRegex(),_f="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Tk=st(_f,"gu").replace(/notPunctSpace/g,vf).replace(/punctSpace/g,xo).replace(/punct/g,sn).getRegex(),_k=st(_f,"gu").replace(/notPunctSpace/g,wk).replace(/punctSpace/g,Ck).replace(/punct/g,Sf).getRegex(),Ak=st("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vf).replace(/punctSpace/g,xo).replace(/punct/g,sn).getRegex(),Bk=st(/\\(punct)/,"gu").replace(/punct/g,sn).getRegex(),Lk=st(/^<(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(),Mk=st(mo).replace("(?:-->|$)","-->").getRegex(),Ek=st("^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",Mk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$a=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Fk=st(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$a).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Af=st(/^!?\[(label)\]\[(ref)\]/).replace("label",$a).replace("ref",go).getRegex(),Bf=st(/^!?\[(ref)\](?:\[\])?/).replace("ref",go).getRegex(),$k=st("reflink|nolink(?!\\()","g").replace("reflink",Af).replace("nolink",Bf).getRegex(),Nl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bo={_backpedal:xi,anyPunctuation:Bk,autolink:Lk,blockSkip:kk,br:kf,code:yk,del:xi,emStrongLDelim:vk,emStrongRDelimAst:Tk,emStrongRDelimUnd:Ak,escape:mk,link:Fk,nolink:Bf,punctuation:bk,reflink:Af,reflinkSearch:$k,tag:Ek,text:xk,url:xi},Ok={...bo,link:st(/^!?\[(label)\]\((.*?)\)/).replace("label",$a).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$a).getRegex()},ys={...bo,emStrongRDelimAst:_k,emStrongLDelim:Sk,url:st(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Nl).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:st(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Nl).getRegex()},Dk={...ys,br:st(kf).replace("{2,}","*").getRegex(),text:st(ys.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Gi={normal:yo,gfm:pk,pedantic:gk},ti={normal:bo,gfm:ys,breaks:Dk,pedantic:Ok},Rk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zl=e=>Rk[e];function ge(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,zl)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,zl);return e}function Wl(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch{return null}return e}function ql(e,t){var n;let r=e.replace(Wt.findPipe,(o,s,l)=>{let c=!1,h=s;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Wt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((n=i.at(-1))!=null&&n.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Wt.slashPipe,"|");return i}function ei(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function Ik(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 Hl(e,t,r,i,a){let n=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function Pk(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
119
- `).map(n=>{let o=n.match(r.other.beginningSpace);if(o===null)return n;let[s]=o;return s.length>=a.length?n.slice(a.length):n}).join(`
120
- `)}var Oa=class{constructor(t){ft(this,"options");ft(this,"rules");ft(this,"lexer");this.options=t||ur}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ei(i,`
121
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=Pk(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=ei(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:ei(r[0],`
122
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ei(r[0],`
123
- `).split(`
124
- `),a="",n="",o=[];for(;i.length>0;){let s=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
125
- `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
126
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
127
- ${h}`:h,n=n?`${n}
128
- ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,m=g.raw+`
129
- `+i.join(`
130
- `),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,n=n.substring(0,n.length-g.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,m=g.raw+`
131
- `+i.join(`
132
- `),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,n=n.substring(0,n.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
133
- `);continue}}return{type:"blockquote",raw:a,tokens:o,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,n={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
134
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
135
- `,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
136
- `,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),S=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let _=t.split(`
137
- `,1)[0],L;if(d=_,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),L=d):L=d.replace(this.rules.other.tabCharGlobal," "),S.test(d)||v.test(d)||C.test(d)||b.test(d)||w.test(d))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
138
- `+L.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||v.test(f)||w.test(f))break;u+=`
139
- `+d}!g&&!d.trim()&&(g=!0),h+=_+`
140
- `,t=t.substring(_.length+1),f=L.slice(m)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),n.raw+=h}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){let h=n.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:n}}}table(t){var s;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ql(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
141
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)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 n)o.rows.push(ql(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
142
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=ei(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Ik(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let a=r[2],n="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],n=o[3])}else n=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Hl(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=r[a.toLowerCase()];if(!n){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Hl(i,n,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let n=[...a[0]].length-1,o,s,l=n,c=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+n);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(s=[...o].length,a[3]||a[4]){l+=s;continue}else if((a[5]||a[6])&&n%3&&!((n+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let u=[...a[0]][0].length,f=t.slice(0,n+a.index+u+s);if(Math.min(n,s)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),n=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&n&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,n;if(r[2]==="@")a=r[0],n="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:a,href:n,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ne=class xs{constructor(t){ft(this,"tokens");ft(this,"options");ft(this,"state");ft(this,"tokenizer");ft(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ur,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:Wt,block:Gi.normal,inline:ti.normal};this.options.pedantic?(r.block=Gi.pedantic,r.inline=ti.pedantic):this.options.gfm&&(r.block=Gi.gfm,this.options.breaks?r.inline=ti.breaks:r.inline=ti.gfm),this.tokenizer.rules=r}static get rules(){return{block:Gi,inline:ti}}static lex(t,r){return new xs(r).lex(t)}static lexInline(t,r){return new xs(r).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
143
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,n,o;for(this.options.pedantic&&(t=t.replace(Wt.tabCharGlobal," ").replace(Wt.spaceLine,""));t;){let s;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(c=>(s=c.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let c=r.at(-1);s.raw.length===1&&c!==void 0?c.raw+=`
144
- `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
145
- `)?"":`
146
- `)+s.raw,c.text+=`
147
- `+s.text,this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
148
- `)?"":`
149
- `)+s.raw,c.text+=`
150
- `+s.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
151
- `)?"":`
152
- `)+s.raw,c.text+=`
153
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s),i=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
154
- `)?"":`
155
- `)+s.raw,c.text+=`
156
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,f;let i=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)n=a[2]?a[2].length:0,i=i.slice(0,a.index+n)+"["+"a".repeat(a[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let o=!1,s="";for(;t;){o||(s=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(m=>(d=m.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let m=r.at(-1);d.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,s)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((f=this.options.extensions)!=null&&f.startInline){let m=1/0,y=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},y),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(g=t.substring(0,m+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(s=d.raw.slice(-1)),o=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},Da=class{constructor(t){ft(this,"options");ft(this,"parser");this.options=t||ur}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(Wt.notSpaceStart))==null?void 0:o[0],n=t.replace(Wt.endingNewline,"")+`
157
- `;return a?'<pre><code class="language-'+ge(a)+'">'+(i?n:ge(n,!0))+`</code></pre>
158
- `:"<pre><code>"+(i?n:ge(n,!0))+`</code></pre>
159
- `}blockquote({tokens:t}){return`<blockquote>
160
- ${this.parser.parse(t)}</blockquote>
161
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
162
- `}hr(t){return`<hr>
163
- `}list(t){let r=t.ordered,i=t.start,a="";for(let s=0;s<t.items.length;s++){let l=t.items[s];a+=this.listitem(l)}let n=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+n+o+`>
164
- `+a+"</"+n+`>
165
- `}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+ge(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
166
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
167
- `}table(t){let r="",i="";for(let n=0;n<t.header.length;n++)i+=this.tablecell(t.header[n]);r+=this.tablerow({text:i});let a="";for(let n=0;n<t.rows.length;n++){let o=t.rows[n];i="";for(let s=0;s<o.length;s++)i+=this.tablecell(o[s]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
168
- <thead>
169
- `+r+`</thead>
170
- `+a+`</table>
171
- `}tablerow({text:t}){return`<tr>
172
- ${t}</tr>
173
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
174
- `}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>${ge(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),n=Wl(t);if(n===null)return a;t=n;let o='<a href="'+t+'"';return r&&(o+=' title="'+ge(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let n=Wl(t);if(n===null)return ge(i);t=n;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ge(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ge(t.text)}},Co=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""}},se=class bs{constructor(t){ft(this,"options");ft(this,"renderer");ft(this,"textRenderer");this.options=t||ur,this.options.renderer=this.options.renderer||new Da,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Co}static parse(t,r){return new bs(r).parse(t)}static parseInline(t,r){return new bs(r).parseInline(t)}parse(t,r=!0){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let c=s,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=s;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 c=l,h=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
175
- `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var a,n;let i="";for(let o=0;o<t.length;o++){let s=t[o];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[s.type]){let c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=c||"";continue}}let l=s;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 c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Qi,ci=(Qi=class{constructor(t){ft(this,"options");ft(this,"block");this.options=t||ur}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?se.parse:se.parseInline}},ft(Qi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ft(Qi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Qi),Nk=class{constructor(...t){ft(this,"defaults",uo());ft(this,"options",this.setOptions);ft(this,"parse",this.parseMarkdown(!0));ft(this,"parseInline",this.parseMarkdown(!1));ft(this,"Parser",se);ft(this,"Renderer",Da);ft(this,"TextRenderer",Co);ft(this,"Lexer",ne);ft(this,"Tokenizer",Oa);ft(this,"Hooks",ci);this.use(...t)}walkTokens(t,r){var a,n;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let l of s.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of s.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;(n=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&n[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let c=s[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let o=r.renderers[n.name];o?r.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[n.level];o?o.unshift(n.tokenizer):r[n.level]=[n.tokenizer],n.start&&(n.level==="block"?r.startBlock?r.startBlock.push(n.start):r.startBlock=[n.start]:n.level==="inline"&&(r.startInline?r.startInline.push(n.start):r.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(r.childTokens[n.name]=n.childTokens)}),a.extensions=r),i.renderer){let n=this.defaults.renderer||new Da(this.defaults);for(let o in i.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=i.renderer[s],c=n[s];n[s]=(...h)=>{let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u||""}}a.renderer=n}if(i.tokenizer){let n=this.defaults.tokenizer||new Oa(this.defaults);for(let o in i.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=i.tokenizer[s],c=n[s];n[s]=(...h)=>{let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u}}a.tokenizer=n}if(i.hooks){let n=this.defaults.hooks||new ci;for(let o in i.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=i.hooks[s],c=n[s];ci.passThroughHooks.has(o)?n[s]=h=>{if(this.defaults.async&&ci.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(n,h);return c.call(n,f)})();let u=l.call(n,h);return c.call(n,u)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await c.apply(n,h)),f})();let u=l.apply(n,h);return u===!1&&(u=c.apply(n,h)),u}}a.hooks=n}if(i.walkTokens){let n=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ne.lex(t,r??this.defaults)}parser(t,r){return se.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},n={...this.defaults,...a},o=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(r):r,l=await(n.hooks?await n.hooks.provideLexer():t?ne.lex:ne.lexInline)(s,n),c=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(c,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser():t?se.parse:se.parseInline)(c,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let s=(n.hooks?n.hooks.provideLexer():t?ne.lex:ne.lexInline)(r,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser():t?se.parse:se.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return o(s)}}}onError(t,r){return i=>{if(i.message+=`
176
- Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+ge(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},nr=new Nk;function ct(e,t){return nr.parse(e,t)}ct.options=ct.setOptions=function(e){return nr.setOptions(e),ct.defaults=nr.defaults,xf(ct.defaults),ct};ct.getDefaults=uo;ct.defaults=ur;ct.use=function(...e){return nr.use(...e),ct.defaults=nr.defaults,xf(ct.defaults),ct};ct.walkTokens=function(e,t){return nr.walkTokens(e,t)};ct.parseInline=nr.parseInline;ct.Parser=se;ct.parser=se.parse;ct.Renderer=Da;ct.TextRenderer=Co;ct.Lexer=ne;ct.lexer=ne.lex;ct.Tokenizer=Oa;ct.Hooks=ci;ct.parse=ct;ct.options;ct.setOptions;ct.use;ct.walkTokens;ct.parseInline;se.parse;ne.lex;function Lf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(a.length){var n=new RegExp(`
177
- [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(s){return s.replace(n,`
178
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=s;typeof s=="string"&&s.includes(`
179
- `)&&(u=String(s).split(`
180
- `).map(function(f,d){return d===0?f:""+h+f}).join(`
181
- `)),o+=u+i[l+1]}),o}var zk={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},Cs=new Map,Mf=new Map,Wk=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(A.debug("Registering icon pack:",t.name),"loader"in t)Mf.set(t.name,t.loader);else if("icons"in t)Cs.set(t.name,t.icons);else throw A.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ef=p(async(e,t)=>{const r=qw(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=Cs.get(i);if(!a){const o=Mf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},Cs.set(i,a)}catch(s){throw A.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Uw(a,r.name);if(!n)throw new Error(`Icon not found: ${e}`);return n},"getRegisteredIconData"),qk=p(async e=>{try{return await Ef(e),!0}catch{return!1}},"isIconAvailable"),Di=p(async(e,t,r)=>{let i;try{i=await Ef(e,t==null?void 0:t.fallbackPrefix)}catch(o){A.error(o),i=zk}const a=Qw(i,t),n=rk(ek(a.body),{...a.attributes,...r});return te(n,Ot())},"getIconSVG");function Ff(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
182
- `).replace(/\n{2,}/g,`
183
- `),a=Lf(i);return t===!1?a.replace(/ /g,"&nbsp;"):a}p(Ff,"preprocessMarkdown");function $f(e,t={}){const r=Ff(e,t),i=ct.lexer(r),a=[[]];let n=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
184
- `).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[n].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&a[n].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{var l;s.type==="paragraph"?(l=s.tokens)==null||l.forEach(c=>{o(c)}):s.type==="html"?a[n].push({content:s.text,type:"normal"}):a[n].push({content:s.raw,type:"normal"})}),a}p($f,"markdownToLines");function Of(e,{markdownAutoWrap:t}={}){const r=ct.lexer(e);function i(a){var n,o,s;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(n=a.tokens)==null?void 0:n.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(s=a.tokens)==null?void 0:s.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(A.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(Of,"markdownToHTML");function Df(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Df,"splitTextToChars");function Rf(e,t){const r=Df(t.content);return wo(e,[],r,t.type)}p(Rf,"splitWordToFitWidth");function wo(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?wo(e,o,n,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(wo,"splitWordToFitWidthRecursion");function If(e,t){if(e.some(({content:r})=>r.includes(`
185
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ra(e,t)}p(If,"splitLineToFitWidth");function Ra(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const n=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(n),t(o))return Ra(e,t,r,o);if(i.length>0)r.push(i),e.unshift(n);else if(n.content){const[s,l]=Rf(t,n);r.push([s]),l.content&&e.unshift(l)}return Ra(e,t,r)}p(Ra,"splitLineToFitWidthRecursion");function ws(e,t){t&&e.attr("style",t)}p(ws,"applyStyle");async function Pf(e,t,r,i,a=!1,n=Ot()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=Er(t.label)?await Rs(t.label.replace(Rr.lineBreakRegex,`
186
- `),n):te(t.label,n),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),ws(h,t.labelStyle),h.attr("class",`${c} ${i}`),ws(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}p(Pf,"addHtmlSpan");function on(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(on,"createTspan");function Nf(e,t,r){const i=e.append("text"),a=on(i,1,t);ln(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}p(Nf,"computeWidthOfText");function Hk(e,t,r){var o;const i=e.append("text"),a=on(i,1,t);ln(a,[{content:r,type:"normal"}]);const n=(o=a.node())==null?void 0:o.getBoundingClientRect();return n&&i.remove(),n}p(Hk,"computeDimensionOfText");function zf(e,t,r,i=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>Nf(n,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:If(c,h);for(const f of u){const d=on(s,l,1.1);ln(d,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),n.node()}else return s.node()}p(zf,"createFormattedText");function ln(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p(ln,"updateTextContentAndStyles");async function Wf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,o)=>(r.push((async()=>{const s=`${n}:${o}`;return await qk(s)?await Di(s,void 0,{class:"label-icon"}):`<i class='${te(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Wf,"replaceIconSubstring");var Ne=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(A.debug("XYZ createText",t,r,i,a,n,o,"addSvgBackground: ",l),n){const h=Of(t,c),u=await Wf(hr(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:o,label:Er(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Pf(e,d,s,a,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=$f(h.replace("<br>","<br/>"),c),f=zf(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");nt(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(f).select("text").attr("style",g)}return f}},"createText");function On(e,t,r){if(e&&e.length){const[i,a]=t,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*s+i,l[1]=(c-i)*s+(h-a)*o+a}}}function jk(e,t){return e[0]===t[0]&&e[1]===t[1]}function Uk(e,t,r,i=1){const a=r,n=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(a)for(const c of o)On(c,s,a);const l=function(c,h,u){const f=[];for(const b of c){const w=[...b];jk(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let w=0;w<b.length-1;w++){const S=b[w],v=b[w+1];if(S[1]!==v[1]){const C=Math.min(S[1],v[1]);g.push({ymin:C,ymax:Math.max(S[1],v[1]),x:C===S[1]?S[0]:v[0],islope:(v[0]-S[0])/(v[1]-S[1])})}}if(g.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>y);w++)b=w;g.splice(0,b+1).forEach(w=>{m.push({s:y,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const S=m[b].edge,v=m[w].edge;d.push([[Math.round(S.x),y],[Math.round(v.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return d}(o,n,i);if(a){for(const c of o)On(c,s,-a);(function(c,h,u){const f=[];c.forEach(d=>f.push(...d)),On(f,h,u)})(l,s,-a)}return l}function Ri(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),Uk(e,a,i,n||1)}class ko{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ri(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function cn(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 Yk extends ko{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Ri(t,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(n),l=.5*i*Math.sin(n);for(const[c,h]of a)cn([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Gk extends ko{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(t,a);return i.ops=i.ops.concat(n.ops),i}}class Vk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ri(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const o=a/4;for(const s of t){const l=cn(s),c=l/a,h=Math.ceil(c)-1,u=l-h*a,f=(s[0][0]+s[1][0])/2-a/4,d=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Xk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ri(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return t.forEach(o=>{const s=cn(o),l=Math.floor(s/(i+a)),c=(s+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];n.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}}),n}}class Zk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=Ri(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(n=>{const o=cn(n),s=Math.round(o/(2*r));let l=n[0],c=n[1];l[0]>c[0]&&(l=n[1],c=n[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}}),a}}const Ut={};class Kk{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Qk=0,Dn=1,jl=2,Vi={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 Rn(e,t){return e.type===t}function vo(e){const t=[],r=function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:Qk,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:Dn,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:jl,text:""},s}(e);let i="BOD",a=0,n=r[a];for(;!Rn(n,jl);){let o=0;const s=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return vo("M0,0"+e);a++,o=Vi[n.text],i=n.text}else Rn(n,Dn)?o=Vi[i]:(a++,o=Vi[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!Rn(c,Dn))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Vi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),a+=o,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function qf(e){let t=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of e)switch(o){case"M":n.push({key:"M",data:[...s]}),[t,r]=s,[i,a]=s;break;case"m":t+=s[0],r+=s[1],n.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":n.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],n.push({key:"L",data:[t,r]});break;case"C":n.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map((c,h)=>h%2?c+r:c+t);n.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":n.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map((c,h)=>h%2?c+r:c+t);n.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":n.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":n.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],n.push({key:"H",data:[t]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map((c,h)=>h%2?c+r:c+t);n.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":n.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],n.push({key:"T",data:[t,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),t=i,r=a}return n}function Hf(e){const t=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[n,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=a+(a-l)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),s=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(jf(i,a,y,x,u,f,d,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=n,a=o}r=c}return t}function ri(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function jf(e,t,r,i,a,n,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=ri(e,t,-h),[r,i]=ri(r,i,-h);const M=(e-r)/2,E=(t-i)/2;let O=M*M/(a*a)+E*E/(n*n);O>1&&(O=Math.sqrt(O),a*=O,n*=O);const R=a*a,W=n*n,N=R*W-R*E*E-W*M*M,ot=R*E*E+W*M*M,Ct=(s===l?-1:1)*Math.sqrt(Math.abs(N/ot));m=Ct*a*E/n+(e+r)/2,y=Ct*-n*M/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/n).toFixed(9))),g=Math.asin(parseFloat(((i-y)/n).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const M=g,E=r,O=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=jf(r=m+a*Math.cos(g),i=y+n*Math.sin(g),E,O,a,n,o,0,l,[g,M,m,y])}x=g-d;const b=Math.cos(d),w=Math.sin(d),S=Math.cos(g),v=Math.sin(g),C=Math.tan(x/4),_=4/3*a*C,L=4/3*n*C,$=[e,t],D=[e+_*w,t-L*b],B=[r+_*v,i-L*S],P=[r,i];if(D[0]=2*$[0]-D[0],D[1]=2*$[1]-D[1],c)return[D,B,P].concat(f);{f=[D,B,P].concat(f);const M=[];for(let E=0;E<f.length;E+=3){const O=ri(f[E][0],f[E][1],h),R=ri(f[E+1][0],f[E+1][1],h),W=ri(f[E+2][0],f[E+2][1],h);M.push([O[0],O[1],R[0],R[1],W[0],W[1]])}return M}}const Jk={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return Ia(e,t,r)},ellipse:function(e,t,r,i,a){const n=Yf(r,i,a);return ks(e,t,a,n).opset},doubleLineOps:function(e,t,r,i,a){return Re(e,t,r,i,a,!0)}};function Uf(e,t,r,i,a){return{type:"path",ops:Re(e,t,r,i,a)}}function ha(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let n=0;n<i-1;n++)a.push(...Re(e[n][0],e[n][1],e[n+1][0],e[n+1][1],r));return t&&a.push(...Re(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Uf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function tv(e,t,r,i,a){return function(n,o){return ha(n,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Ul(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Xi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Xi(r[0],1.5*(1+.22*t.roughness),Vl(t));for(let n=1;n<r.length;n++){const o=r[n];if(o.length){const s=Xi(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Xi(o,1.5*(1+.22*t.roughness),Vl(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Yf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=J(o*l,r),s+=J(s*l,r),{increment:n,rx:o,ry:s}}function ks(e,t,r,i){const[a,n]=Xl(i.increment,e,t,i.rx,i.ry,1,i.increment*Ia(.1,Ia(.4,1,r),r),r);let o=Pa(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Xl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Pa(s,null,r);o=o.concat(l)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function Yl(e,t,r,i,a,n,o,s,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=J(.01*u,l),f+=J(.01*f,l);let d=a,g=n;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Zl(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Zl(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(s?x.push(...Re(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Re(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Gl(e,t){const r=Hf(qf(vo(e))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Re(n[0],n[1],s[0],s[1],t)),n=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,d]=s;i.push(...ev(l,c,h,u,f,d,n,t)),n=[f,d];break}case"Z":i.push(...Re(n[0],n[1],a[0],a[1],t)),n=[a[0],a[1]]}return{type:"path",ops:i}}function In(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+J(a,t),i[0][1]+J(a,t)]});for(let o=1;o<n;o++)r.push({op:"lineTo",data:[i[o][0]+J(a,t),i[o][1]+J(a,t)]})}}return{type:"fillPath",ops:r}}function yr(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Ut[a])switch(a){case"zigzag":Ut[a]||(Ut[a]=new Yk(i));break;case"cross-hatch":Ut[a]||(Ut[a]=new Gk(i));break;case"dots":Ut[a]||(Ut[a]=new Vk(i));break;case"dashed":Ut[a]||(Ut[a]=new Xk(i));break;case"zigzag-line":Ut[a]||(Ut[a]=new Zk(i));break;default:a="hachure",Ut[a]||(Ut[a]=new ko(i))}return Ut[a]}(t,Jk).fillPolygons(e,t)}function Vl(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Gf(e){return e.randomizer||(e.randomizer=new Kk(e.seed||0)),e.randomizer.next()}function Ia(e,t,r,i=1){return r.roughness*i*(Gf(r)*(t-e)+e)}function J(e,t,r=1){return Ia(-e,e,t,r)}function Re(e,t,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=vs(e,t,r,i,a,!0,!1);if(o)return s;const l=vs(e,t,r,i,a,!0,!0);return s.concat(l)}function vs(e,t,r,i,a,n,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*Gf(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=J(d,a,c),g=J(g,a,c);const m=[],y=()=>J(u,a,c),x=()=>J(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:J(h,a,c)),t+(b?0:J(h,a,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Xi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]),a===e.length-1&&i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]);return Pa(i,null,r)}function Pa(e,t,r){const i=e.length,a=[];if(i>3){const n=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];n[0]=[l[0],l[1]],n[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],n[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],n[3]=[e[s+1][0],e[s+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...vs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Xl(e,t,r,i,a,n,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=J(.5,s)-Math.PI/2;c.push([J(n,s)+t+.9*i*Math.cos(h-e),J(n,s)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[J(n,s)+t+i*Math.cos(f),J(n,s)+r+a*Math.sin(f)];l.push(d),c.push(d)}c.push([J(n,s)+t+i*Math.cos(h+2*Math.PI+.5*o),J(n,s)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([J(n,s)+t+.98*i*Math.cos(h+o),J(n,s)+r+.98*a*Math.sin(h+o)]),c.push([J(n,s)+t+.9*i*Math.cos(h+.5*o),J(n,s)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function Zl(e,t,r,i,a,n,o,s,l){const c=n+J(.1,l),h=[];h.push([J(s,l)+t+.9*i*Math.cos(c-e),J(s,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([J(s,l)+t+i*Math.cos(u),J(s,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Pa(h,null,l)}function ev(e,t,r,i,a,n,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:J(c[0],s)),o[1]+(f?0:J(c[0],s))]}),h=f?[a,n]:[a+J(c[d],s),n+J(c[d],s)],l.push({op:"bcurveTo",data:[e+J(c[d],s),t+J(c[d],s),r+J(c[d],s),i+J(c[d],s),h[0],h[1]]});return l}function ii(e){return[...e]}function Kl(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(ii(e[0]),ii(e[1]),ii(e[2]),ii(e[2]));else{const a=[];a.push(e[0],e[0]);for(let s=1;s<e.length;s++)a.push(e[s]),s===e.length-1&&a.push(e[s]);const n=[],o=1-t;i.push(ii(a[0]));for(let s=1;s+2<a.length;s++){const l=a[s];n[0]=[l[0],l[1]],n[1]=[l[0]+(o*a[s+1][0]-o*a[s-1][0])/6,l[1]+(o*a[s+1][1]-o*a[s-1][1])/6],n[2]=[a[s+1][0]+(o*a[s][0]-o*a[s+2][0])/6,a[s+1][1]+(o*a[s][1]-o*a[s+2][1])/6],n[3]=[a[s+1][0],a[s+1][1]],i.push(n[1],n[2],n[3])}}return i}function ua(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function rv(e,t,r){const i=ua(t,r);if(i===0)return ua(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),ua(e,Ye(t,r,a))}function Ye(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ss(e,t,r,i){const a=i||[];if(function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],f=s[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g}(e,t)<r){const s=e[t+0];a.length?(n=a[a.length-1],o=s,Math.sqrt(ua(n,o))>1&&a.push(s)):a.push(s),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=Ye(l,c,.5),d=Ye(c,h,.5),g=Ye(h,u,.5),m=Ye(f,d,.5),y=Ye(d,g,.5),x=Ye(m,y,.5);Ss([l,f,m,x],0,r,a),Ss([x,y,g,u],0,r,a)}var n,o;return a}function iv(e,t){return Na(e,0,e.length,t)}function Na(e,t,r,i,a){const n=a||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=rv(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Na(e,t,c+1,i,n),Na(e,c,r,i,n)):(n.length||n.push(o),n.push(s)),n}function Pn(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let n=0;n<a;n++)Ss(e,3*n,t,i);return r&&r>0?Na(i,0,i.length,r):i}const Vt="none";class za{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,n){const o=this._o(n);return this._d("line",[Uf(t,r,i,a,o)],o)}rectangle(t,r,i,a,n){const o=this._o(n),s=[],l=tv(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?s.push(In([c],o)):s.push(yr([c],o))}return o.stroke!==Vt&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,a,n){const o=this._o(n),s=[],l=Yf(i,a,o),c=ks(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=ks(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(yr([c.estimatedPoints],o));return o.stroke!==Vt&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,a){const n=this.ellipse(t,r,i,i,a);return n.shape="circle",n}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ha(t,!1,i)],i)}arc(t,r,i,a,n,o,s=!1,l){const c=this._o(l),h=[],u=Yl(t,r,i,a,n,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Yl(t,r,i,a,n,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push(function(f,d,g,m,y,x,b){const w=f,S=d;let v=Math.abs(g/2),C=Math.abs(m/2);v+=J(.01*v,b),C+=J(.01*C,b);let _=y,L=x;for(;_<0;)_+=2*Math.PI,L+=2*Math.PI;L-_>2*Math.PI&&(_=0,L=2*Math.PI);const $=(L-_)/b.curveStepCount,D=[];for(let B=_;B<=L;B+=$)D.push([w+v*Math.cos(B),S+C*Math.sin(B)]);return D.push([w+v*Math.cos(L),S+C*Math.sin(L)]),D.push([w,S]),yr([D],b)}(t,r,i,a,n,o,c));return c.stroke!==Vt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],n=Ul(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const o=Ul(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Pn(Kl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Pn(Kl(c),10,(1+i.roughness)/2))}o.length&&a.push(yr([o],i))}return i.stroke!==Vt&&a.push(n),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],n=ha(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(In([t],i)):a.push(yr([t],i))),i.stroke!==Vt&&a.push(n),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,o=i.stroke!==Vt,s=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const d=Hf(qf(vo(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Pn(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:C}of d)switch(v){case"M":w(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const _=m.length?m[m.length-1]:y;x.push([_[0],_[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!f)return g;const S=[];for(const v of g){const C=iv(v,f);C.length&&S.push(C)}return S}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Gl(t,i);if(n)if(i.fillStyle==="solid")if(l.length===1){const h=Gl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(In(l,i));else a.push(yr(l,i));return o&&(s?l.forEach(h=>{a.push(ha(h,!1,i))}):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const n=typeof r=="number"&&r>=0?a.data.map(o=>+o.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const n of r){let o=null;switch(n.type){case"path":o={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":o={d:this.opsToPath(n),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":o=this.fillSketch(n,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class av{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new za(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,n,s),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const n of r.ops){const o=typeof i=="number"&&i>=0?n.data.map(s=>+s.toFixed(i)):n.data;switch(n.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o),o}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o),o}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o),o}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n),n}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Zi="http://www.w3.org/2000/svg";class nv{constructor(t,r){this.svg=t,this.gen=new za(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(Zi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=a.createElementNS(Zi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Zi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,s,i)}l&&n.appendChild(l)}return n}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const n=t.createElementNS(Zi,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,n){const o=this.gen.line(t,r,i,a,n);return this.draw(o)}rectangle(t,r,i,a,n){const o=this.gen.rectangle(t,r,i,a,n);return this.draw(o)}ellipse(t,r,i,a,n){const o=this.gen.ellipse(t,r,i,a,n);return this.draw(o)}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,n,o,s=!1,l){const c=this.gen.arc(t,r,i,a,n,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var H={canvas:(e,t)=>new av(e,t),svg:(e,t)=>new nv(e,t),generator:e=>new za(e),newSeed:()=>za.newSeed()},Q=p(async(e,t,r)=>{var u,f;let i;const a=t.useHtmlLabels||_t((u=lt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const n=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",Rt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await Ne(o,te(hr(s),lt()),{useHtmlLabels:a,width:t.width||((f=lt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const d=l.children[0],g=nt(l),m=d.getElementsByTagName("img");if(m){const y=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function w(){if(x.style.display="flex",x.style.flexDirection="column",y){const S=lt().fontSize?lt().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[C=$c.fontSize]=an(S),_=C*v+"px";x.style.minWidth=_,x.style.maxWidth=_}else x.style.width="100%";b(x)}p(w,"setupImage"),setTimeout(()=>{x.complete&&w()}),x.addEventListener("error",w),x.addEventListener("load",w)})))}c=d.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:c,halfPadding:h,label:o}},"labelHelper"),Nn=p(async(e,t,r)=>{var l,c,h,u,f,d;const i=r.useHtmlLabels||_t((c=(l=lt())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await Ne(a,te(hr(t),lt()),{useHtmlLabels:i,width:r.width||((u=(h=lt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=n.getBBox();const s=r.padding/2;if(_t((d=(f=lt())==null?void 0:f.flowchart)==null?void 0:d.htmlLabels)){const g=n.children[0],m=nt(n);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:a}},"insertLabel"),Y=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function it(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(it,"createPathFromPoints");function Ie(e,t,r,i,a,n){const o=[],l=r-e,c=i-t,h=l/n,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(Ie,"generateFullSineWavePoints");function _i(e,t,r,i,a,n){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(_i,"generateCirclePoints");var sv=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,n=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(n)*o>Math.abs(a)*s?(n<0&&(s=-s),l=n===0?0:s*a/n,c=s):(a<0&&(o=-o),l=o,c=a===0?0:o*n/a),{x:r+l,y:i+c}},"intersectRect"),zr=sv;function Vf(e,t){t&&e.attr("style",t)}p(Vf,"applyStyle");async function Xf(e){const t=nt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=lt();let a=e.label;e.label&&Er(e.label)&&(a=await Rs(e.label.replace(Rr.lineBreakRegex,`
187
- `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(te(o,i)),Vf(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Xf,"addHtmlLabel");var ov=p(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),_t(lt().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),A.info("vertexText"+a);const n={isNode:i,label:hr(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Xf(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof a=="string"?o=a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?o=a:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),n.appendChild(l)}return n}},"createLabel"),Ke=ov,ze=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Zf=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=lt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=_t(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Ne(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(_t(r.flowchart.htmlLabels)){const _=g.children[0],L=nt(g);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const _=H.svg(u),L=j(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),$=_.path(ze(b,w,y,x,0),L);S=u.insert(()=>(A.debug("Rough node insert CXC",$),$),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.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",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=to(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const _=d.select("span");_&&_.attr("style",s)}const C=S.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(_){return zr(t,_)},{cluster:u,labelBBox:m}},"rect"),lv=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,n=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return zr(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),cv=p(async(e,t)=>{const r=lt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await Ke(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(_t(r.flowchart.htmlLabels)){const $=d.children[0],D=nt(d);g=$.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,S=t.x-x/2,v=t.y-b/2;t.width=x;const C=t.y-t.height/2-y+g.height+2;let _;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),D=H.svg(c),B=t.rx||t.ry?D.path(ze(S,v,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):D.rectangle(S,v,x,b,{seed:a});_=c.insert(()=>B,":first-child");const P=D.rectangle(S,C,x,w,{fill:$?n:o,fillStyle:$?"hachure":"solid",stroke:l,seed:a});_=c.insert(()=>B,":first-child"),f=c.insert(()=>P)}else _=h.insert("rect",":first-child"),_.attr("class","outer").attr("x",S).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",S).attr("y",C).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(_t(r.flowchart.htmlLabels)?0:3)})`);const L=_.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function($){return zr(t,$)},{cluster:c,labelBBox:g}},"roundedWithTitle"),hv=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=lt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=_t(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Ne(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(_t(r.flowchart.htmlLabels)){const _=g.children[0],L=nt(g);m=_.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const _=H.svg(u),L=j(t,{roughness:.7,fill:n,stroke:o,fillWeight:4,seed:a}),$=_.path(ze(b,w,y,x,t.rx),L);S=u.insert(()=>(A.debug("Rough node insert CXC",$),$),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.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",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=to(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const _=d.select("span");_&&_.attr("style",s)}const C=S.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(_){return zr(t,_)},{cluster:u,labelBBox:m}},"kanbanSection"),uv=p((e,t)=>{const r=lt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=H.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});d=o.insert(()=>y,":first-child")}else d=s.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return zr(t,m)},{cluster:o,labelBBox:{}}},"divider"),fv=Zf,dv={rect:Zf,squareRect:fv,roundedWithTitle:cv,noteGroup:lv,divider:uv,kanbanSection:hv},Kf=new Map,pv=p(async(e,t)=>{const r=t.shape||"rect",i=await dv[r](e,t);return Kf.set(t.id,i),i},"insertCluster"),vA=p(()=>{Kf=new Map},"clear");function Qf(e,t){return e.intersect(t)}p(Qf,"intersectNode");var gv=Qf;function Jf(e,t,r,i){var a=e.x,n=e.y,o=a-i.x,s=n-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<n&&(h=-h),{x:a+c,y:n+h}}p(Jf,"intersectEllipse");var td=Jf;function ed(e,t,r){return td(e,t,t,r)}p(ed,"intersectCircle");var mv=ed;function rd(e,t,r,i){{const a=t.y-e.y,n=e.x-t.x,o=t.x*e.y-e.x*t.y,s=a*r.x+n*r.y+o,l=a*i.x+n*i.y+o,c=1e-6;if(s!==0&&l!==0&&Ts(s,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&Ts(d,g))return;const m=a*u-h*n;if(m===0)return;const y=Math.abs(m/2);let x=n*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const w=x<0?(x-y)/m:(x+y)/m;return{x:b,y:w}}}p(rd,"intersectLine");function Ts(e,t){return e*t>0}p(Ts,"sameSign");var yv=rd;function id(e,t,r){let i=e.x,a=e.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=a-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=yv(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&n.push(d)}return n.length?(n.length>1&&n.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),n[0]):e}p(id,"intersectPolygon");var xv=id,z={node:gv,circle:mv,ellipse:td,polygon:xv,rect:zr};function ad(e,t){const{labelStyles:r}=U(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=H.svg(n),c=j(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=n.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Rt(s)),Y(t,u),t.intersect=function(f){return A.info("Circle intersect",t,o,f),z.circle(t,o,f)},n}p(ad,"anchor");function _s(e,t,r,i,a,n,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/n,(e-x)/a);let v=Math.atan2((i-b)/n,(r-x)/a)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const C=[];for(let _=0;_<20;_++){const L=_/19,$=w+L*v,D=x+a*Math.cos($),B=b+n*Math.sin($);C.push({x:D,y:B})}return C}p(_s,"generateArcPoints");async function nd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.width+t.padding+20,s=n.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},..._s(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},..._s(o/2,s/2,o/2,-s/2,c,l,!0)],f=H.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=it(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Y(t,y),t.intersect=function(x){return z.polygon(t,u,x)},a}p(nd,"bowTieRect");function We(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(We,"insertPolygonShape");async function sd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.height+t.padding,s=12,l=n.width+t.padding+s,c=0,h=l,u=-o,f=0,d=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=H.svg(a),x=j(t,{}),b=it(d),w=y.path(b,x);g=a.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=We(a,l,o,d);return i&&g.attr("style",i),Y(t,g),t.intersect=function(y){return z.polygon(t,d,y)},a}p(sd,"card");function od(e,t){const{nodeStyles:r}=U(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(28,t.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=H.svg(i),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=it(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return z.polygon(t,o,f)},i}p(od,"choice");async function So(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,halfPadding:s}=await Q(e,t,K(t)),l=(r==null?void 0:r.padding)??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=H.svg(n),d=j(t,{}),g=f.circle(0,0,c*2,d);h=n.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Rt(u))}else h=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return Y(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return z.circle(f,g,d)},t.intersect=function(f){return A.info("Circle intersect",t,c,f),z.circle(t,c,f)},n}p(So,"circle");function ld(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},n={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${n.x},${n.y} L ${s.x},${s.y}
188
- M ${a.x},${a.y} L ${o.x},${o.y}`}p(ld,"createLine");function cd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),n=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=H.svg(a),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,n*2,l),h=ld(n),u=s.path(h,l),f=a.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Y(t,f),t.intersect=function(d){return A.info("crossedCircle intersect",t,{radius:n,point:d}),z.circle(t,n,d)},a}p(cd,"crossedCircle");function Te(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Te,"generateCirclePoints");async function hd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Te(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Te(s/2+c*2,-c,c,20,-180,-270),...Te(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Te(s/2,l/2,c,20,0,90)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Te(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Te(s/2+s*.1,-c,c,20,-180,-270),...Te(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Te(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],d=H.svg(a),g=j(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=it(u).replace("Z",""),x=d.path(y,g),b=it(f),w=d.path(b,{...g}),S=a.insert("g",":first-child");return S.insert(()=>w,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,S),t.intersect=function(v){return z.polygon(t,f,v)},a}p(hd,"curlyBraceLeft");function _e(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(_e,"generateCirclePoints");async function ud(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[..._e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},..._e(s/2+c*2,-c,c,20,-180,-270),..._e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},..._e(s/2,l/2,c,20,0,90)],f=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},..._e(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},..._e(s/2+c*2,-c,c,20,-180,-270),..._e(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},..._e(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],d=H.svg(a),g=j(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=it(u).replace("Z",""),x=d.path(y,g),b=it(f),w=d.path(b,{...g}),S=a.insert("g",":first-child");return S.insert(()=>w,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,S),t.intersect=function(v){return z.polygon(t,f,v)},a}p(ud,"curlyBraceRight");function Bt(e,t,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,h=(n*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Bt,"generateCirclePoints");async function fd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=n.width+(t.padding??0),l=n.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Bt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Bt(s/2,l/2,c,20,0,90)],f=[...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Bt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Bt(s/2+c*2,-c,c,20,-180,-270),...Bt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Bt(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Bt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Bt(-s/2-c/2,-c,c,20,0,90),...Bt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Bt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=H.svg(a),m=j(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=it(u).replace("Z",""),b=g.path(x,m),S=it(f).replace("Z",""),v=g.path(S,m),C=it(d),_=g.path(C,{...m}),L=a.insert("g",":first-child");return L.insert(()=>_,":first-child").attr("stroke-opacity",0),L.insert(()=>b,":first-child"),L.insert(()=>v,":first-child"),L.attr("class","text"),h&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,L),t.intersect=function($){return z.polygon(t,d,$)},a}p(fd,"curlyBraces");async function dd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=80,s=20,l=Math.max(o,(n.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),c=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=H.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},..._i(-y,-m/2,h,50,270,90)],w=it(b),S=f.path(w,d),v=a.insert(()=>S,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,v),t.intersect=function(C){return z.polygon(t,b,C)},a}p(dd,"curvedTrapezoid");var bv=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Cv=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),wv=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function pd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=H.svg(a),g=Cv(0,0,s,h,l,c),m=wv(0,c,s,h,l,c),y=d.path(g,j(t,{})),x=d.path(m,j(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=bv(0,0,s,h,l,c);u=a.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",Rt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Y(t,u),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(d){const g=z.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}p(pd,"cylinder");async function gd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=n.width+t.padding,l=n.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,d=H.svg(a),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+c+(t.padding??0)/2-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return z.rect(t,b)},a}p(gd,"dividedRectangle");async function md(e,t){var f,d;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Q(e,t,K(t)),l=n.width/2+o+5,c=n.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=H.svg(a),m=j(t,{roughness:.2,strokeWidth:2.5}),y=j(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,l*2,m),b=g.circle(0,0,c*2,y);h=a.insert("g",":first-child"),h.attr("class",Rt(t.cssClasses)).attr("style",Rt(u)),(f=h.node())==null||f.appendChild(x),(d=h.node())==null||d.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Y(t,h),t.intersect=function(g){return A.info("DoubleCircle intersect",t,l,g),z.circle(t,l,g)},a}p(md,"doublecircle");function yd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.label="",t.labelStyle=i;const n=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=H.svg(n),{nodeBorder:c}=r,h=j(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=n.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),Y(t,f),t.intersect=function(d){return A.info("filledCircle intersect",t,{radius:o,point:d}),z.circle(t,o,d)},n}p(yd,"filledCircle");async function xd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=n.width+(t.padding??0),l=s+n.height,c=s+n.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=H.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=it(h),m=f.path(g,d),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,Y(t,y),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(x){return A.info("Triangle intersect",t,h,x),z.polygon(t,h,x)},a}p(xd,"flippedTriangle");function bd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=U(t);t.label="";const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=H.svg(o),d=j(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),Y(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return z.rect(t,x)},o}p(bd,"forkJoin");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=80,n=50,{shapeSvg:o,bbox:s}=await Q(e,t,K(t)),l=Math.max(a,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=H.svg(o),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},..._i(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=it(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Y(t,x),t.intersect=function(b){return A.info("Pill intersect",t,{radius:h,point:b}),z.polygon(t,g,b)},o}p(Cd,"halfRoundedRectangle");async function wd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.height+(t.padding??0),s=n.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=H.svg(a),h=j(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const f=u/6;u=u+f;const d=o/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=it(y),b=c.path(x,h),w=a.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=s,t.height=o,Y(t,w),t.intersect=function(S){return z.polygon(t,y,S)},a}p(wd,"hexagon");async function kd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await Q(e,t,K(t)),n=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=H.svg(a),c=j(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],u=it(h),f=l.path(u,c),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-n/2}, ${-o/2})`),Y(t,d),t.intersect=function(g){return A.info("Pill intersect",t,{points:h}),z.polygon(t,h,g)},a}p(kd,"hourglass");async function vd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await Q(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Ir(t),x=-g/2,b=-d/2,w=t.label?8:0,S=H.svg(c),v=j(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=S.rectangle(x,b,g,d,v),_=Math.max(g,h.width),L=d+h.height+w,$=S.rectangle(-_/2,-L/2,_,L,{...v,fill:"transparent",stroke:"none"}),D=c.insert(()=>C,":first-child"),B=c.insert(()=>$);if(t.icon){const P=c.append("g");P.html(`<g>${await Di(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const M=P.node().getBBox(),E=M.width,O=M.height,R=M.x,W=M.y;P.attr("transform",`translate(${-E/2-R},${f?h.height/2+w/2-O/2-W:-h.height/2-w/2-O/2-W})`),P.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-L/2:L/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),Y(t,B),t.intersect=function(P){if(A.info("iconSquare intersect",t,P),!t.label)return z.rect(t,P);const M=t.x??0,E=t.y??0,O=t.height??0;let R=[];return f?R=[{x:M-h.width/2,y:E-O/2},{x:M+h.width/2,y:E-O/2},{x:M+h.width/2,y:E-O/2+h.height+w},{x:M+g/2,y:E-O/2+h.height+w},{x:M+g/2,y:E+O/2},{x:M-g/2,y:E+O/2},{x:M-g/2,y:E-O/2+h.height+w},{x:M-h.width/2,y:E-O/2+h.height+w}]:R=[{x:M-g/2,y:E-O/2},{x:M+g/2,y:E-O/2},{x:M+g/2,y:E-O/2+d},{x:M+h.width/2,y:E-O/2+d},{x:M+h.width/2/2,y:E+O/2},{x:M-h.width/2,y:E+O/2},{x:M-h.width/2,y:E-O/2+d},{x:M-g/2,y:E-O/2+d}],z.polygon(t,R,P)},c}p(vd,"icon");async function Sd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await Q(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Ir(t),b=H.svg(c),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=x.get("fill");w.stroke=S??y;const v=c.append("g");t.icon&&v.html(`<g>${await Di(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=v.node().getBBox(),_=C.width,L=C.height,$=C.x,D=C.y,B=Math.max(_,L)*Math.SQRT2+f*2,P=b.circle(0,0,B,w),M=Math.max(B,h.width),E=B+h.height+d,O=b.rectangle(-M/2,-E/2,M,E,{...w,fill:"transparent",stroke:"none"}),R=c.insert(()=>P,":first-child"),W=c.insert(()=>O);return v.attr("transform",`translate(${-_/2-$},${g?h.height/2+d/2-L/2-D:-h.height/2-d/2-L/2-D})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Y(t,W),t.intersect=function(N){return A.info("iconSquare intersect",t,N),z.rect(t,N)},c}p(Sd,"iconCircle");async function Td(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await Q(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ir(t),w=-m/2,S=-g/2,v=t.label?8:0,C=H.svg(c),_=j(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=b.get("fill");_.stroke=L??x;const $=C.path(ze(w,S,m,g,5),_),D=Math.max(m,h.width),B=g+h.height+v,P=C.rectangle(-D/2,-B/2,D,B,{..._,fill:"transparent",stroke:"none"}),M=c.insert(()=>$,":first-child").attr("class","icon-shape2"),E=c.insert(()=>P);if(t.icon){const O=c.append("g");O.html(`<g>${await Di(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const R=O.node().getBBox(),W=R.width,N=R.height,ot=R.x,Ct=R.y;O.attr("transform",`translate(${-W/2-ot},${d?h.height/2+v/2-N/2-Ct:-h.height/2-v/2-N/2-Ct})`),O.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),M.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Y(t,E),t.intersect=function(O){if(A.info("iconSquare intersect",t,O),!t.label)return z.rect(t,O);const R=t.x??0,W=t.y??0,N=t.height??0;let ot=[];return d?ot=[{x:R-h.width/2,y:W-N/2},{x:R+h.width/2,y:W-N/2},{x:R+h.width/2,y:W-N/2+h.height+v},{x:R+m/2,y:W-N/2+h.height+v},{x:R+m/2,y:W+N/2},{x:R-m/2,y:W+N/2},{x:R-m/2,y:W-N/2+h.height+v},{x:R-h.width/2,y:W-N/2+h.height+v}]:ot=[{x:R-m/2,y:W-N/2},{x:R+m/2,y:W-N/2},{x:R+m/2,y:W-N/2+g},{x:R+h.width/2,y:W-N/2+g},{x:R+h.width/2/2,y:W+N/2},{x:R-h.width/2,y:W+N/2},{x:R-h.width/2,y:W-N/2+g},{x:R-m/2,y:W-N/2+g}],z.polygon(t,ot,O)},c}p(Td,"iconRounded");async function _d(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(n,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await Q(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Ir(t),w=-m/2,S=-g/2,v=t.label?8:0,C=H.svg(c),_=j(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=b.get("fill");_.stroke=L??x;const $=C.path(ze(w,S,m,g,.1),_),D=Math.max(m,h.width),B=g+h.height+v,P=C.rectangle(-D/2,-B/2,D,B,{..._,fill:"transparent",stroke:"none"}),M=c.insert(()=>$,":first-child"),E=c.insert(()=>P);if(t.icon){const O=c.append("g");O.html(`<g>${await Di(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const R=O.node().getBBox(),W=R.width,N=R.height,ot=R.x,Ct=R.y;O.attr("transform",`translate(${-W/2-ot},${d?h.height/2+v/2-N/2-Ct:-h.height/2-v/2-N/2-Ct})`),O.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-B/2:B/2-h.height})`),M.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Y(t,E),t.intersect=function(O){if(A.info("iconSquare intersect",t,O),!t.label)return z.rect(t,O);const R=t.x??0,W=t.y??0,N=t.height??0;let ot=[];return d?ot=[{x:R-h.width/2,y:W-N/2},{x:R+h.width/2,y:W-N/2},{x:R+h.width/2,y:W-N/2+h.height+v},{x:R+m/2,y:W-N/2+h.height+v},{x:R+m/2,y:W+N/2},{x:R-m/2,y:W+N/2},{x:R-m/2,y:W-N/2+h.height+v},{x:R-h.width/2,y:W-N/2+h.height+v}]:ot=[{x:R-m/2,y:W-N/2},{x:R+m/2,y:W-N/2},{x:R+m/2,y:W-N/2+g},{x:R+h.width/2,y:W-N/2+g},{x:R+h.width/2/2,y:W+N/2},{x:R-h.width/2,y:W+N/2},{x:R-h.width/2,y:W-N/2+g},{x:R-m/2,y:W-N/2+g}],z.polygon(t,ot,O)},c}p(_d,"iconSquare");async function Ad(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/n;const{labelStyles:o}=U(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??a),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??n;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:d}=await Q(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=H.svg(u),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=b.rectangle(m,y,c,h,w),v=Math.max(c,f.width),C=h+f.height+x,_=b.rectangle(-v/2,-C/2,v,C,{...w,fill:"none",stroke:"none"}),L=u.insert(()=>S,":first-child"),$=u.insert(()=>_);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",c),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-c/2},${g?C/2-h:-C/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),L.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Y(t,$),t.intersect=function(D){if(A.info("iconSquare intersect",t,D),!t.label)return z.rect(t,D);const B=t.x??0,P=t.y??0,M=t.height??0;let E=[];return g?E=[{x:B-f.width/2,y:P-M/2},{x:B+f.width/2,y:P-M/2},{x:B+f.width/2,y:P-M/2+f.height+x},{x:B+c/2,y:P-M/2+f.height+x},{x:B+c/2,y:P+M/2},{x:B-c/2,y:P+M/2},{x:B-c/2,y:P-M/2+f.height+x},{x:B-f.width/2,y:P-M/2+f.height+x}]:E=[{x:B-c/2,y:P-M/2},{x:B+c/2,y:P-M/2},{x:B+c/2,y:P-M/2+h},{x:B+f.width/2,y:P-M/2+h},{x:B+f.width/2/2,y:P+M/2},{x:B-f.width/2,y:P+M/2},{x:B-f.width/2,y:P-M/2+h},{x:B-c/2,y:P-M/2+h}],z.polygon(t,E,D)},u}p(Ad,"imageSquare");async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=H.svg(a),f=j(t,{}),d=it(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=We(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Y(t,c),t.intersect=function(u){return z.polygon(t,l,u)},a}p(Bd,"inv_trapezoid");async function hn(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:n,bbox:o}=await Q(e,t,K(t)),s=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),c=-s/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=H.svg(n),y=j(t,{}),x=f||d?m.path(ze(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=n.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Rt(g))}else u=n.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Rt(f)).attr("ry",Rt(d)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Y(t,u),t.calcIntersect=function(m,y){return z.rect(m,y)},t.intersect=function(m){return z.rect(t,m)},n}p(hn,"drawRect");async function Ld(e,t){const{shapeSvg:r,bbox:i,label:a}=await Q(e,t,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Y(t,n),t.intersect=function(l){return z.rect(t,l)},r}p(Ld,"labelRect");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=H.svg(a),f=j(t,{}),d=it(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=We(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Y(t,c),t.intersect=function(u){return z.polygon(t,l,u)},a}p(Md,"lean_left");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=H.svg(a),f=j(t,{}),d=it(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=We(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Y(t,c),t.intersect=function(u){return z.polygon(t,l,u)},a}p(Ed,"lean_right");function Fd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=H.svg(a),u=j(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=it(c),d=h.path(f,u),g=a.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Y(t,g),t.intersect=function(m){return A.info("lightningBolt intersect",t,m),z.polygon(t,c,m)},a}p(Fd,"lightningBolt");var kv=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),vv=p((e,t,r,i,a,n,o)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Sv=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function $d(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(n.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=H.svg(a),m=vv(0,0,s,h,l,c,u),y=Sv(0,c,s,h,l,c),x=j(t,{}),b=g.path(m,x),w=g.path(y,x);a.insert(()=>w,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=kv(0,0,s,h,l,c,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Rt(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Y(t,f),o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),t.intersect=function(g){const m=z.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}p($d,"linedCylinder");async function Od(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,{cssStyles:u}=t,f=H.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ie(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),Y(t,y),t.intersect=function(x){return z.polygon(t,g,x)},a}p(Od,"linedWaveEdgedRect");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=H.svg(a),g=j(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=d.path(x,g),w=it(y),S=d.path(w,{...g,fill:"none"}),v=a.insert(()=>S,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)-c-(n.x-(n.left??0))}, ${-(n.height/2)+c-(n.y-(n.top??0))})`),Y(t,v),t.intersect=function(C){return z.polygon(t,m,C)},a}p(Dd,"multiRect");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,u=-s/2,f=-h/2,d=5,{cssStyles:g}=t,m=Ie(u-d,f+h+d,u+s-d,f+h+d,c,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:y.y-2*d},{x:u+s+d,y:y.y-2*d},{x:u+s+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+s-d,y:f+d},{x:u+s-d,y:y.y-d},{x:u+s,y:y.y-d},{x:u+s,y:f},{x:u,y:f}],w=H.svg(a),S=j(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=it(x),C=w.path(v,S),_=it(b),L=w.path(_,S),$=a.insert(()=>C,":first-child");return $.insert(()=>L),$.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)+d-c/2-(n.y-(n.top??0))})`),Y(t,$),t.intersect=function(D){return z.polygon(t,x,D)},a}p(Rd,"multiWaveEdgedRectangle");async function Id(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i,t.useHtmlLabels||((b=Ot().flowchart)==null?void 0:b.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await Q(e,t,K(t)),c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=H.svg(o),m=j(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(w){return z.rect(t,w)},o}p(Id,"note");var Tv=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 Pd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.width+t.padding,s=n.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=H.svg(a),g=j(t,{}),m=Tv(0,0,l),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=We(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Y(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=z.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}p(Pd,"question");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=H.svg(a),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=it(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Y(t,b),t.intersect=function(w){return z.polygon(t,f,w)},a}p(Nd,"rect_left_inv_arrow");async function zd(e,t){var L,$;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=n.insert("g"),s=n.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await Ke(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(_t(($=(L=lt())==null?void 0:L.flowchart)==null?void 0:$.htmlLabels)){const D=h.children[0],B=nt(h);u=D.getBoundingClientRect(),B.attr("width",u.width),B.attr("height",u.height)}A.info("Text 2",l);const f=l||[],d=h.getBBox(),g=s.node().appendChild(await Ke(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),m=g.children[0],y=nt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;nt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),nt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),S=-u.width/2-x,v=-u.height/2-x;let C,_;if(t.look==="handDrawn"){const D=H.svg(n),B=j(t,{}),P=D.path(ze(S,v,b,w,t.rx||0),B),M=D.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,B);_=n.insert(()=>(A.debug("Rough node insert CXC",P),M),":first-child"),C=n.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child")}else C=o.insert("rect",":first-child"),_=o.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),_.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Y(t,C),t.intersect=function(D){return z.rect(t,D)},n}p(zd,"rectWithTitle");function hi(e,t,r,i,a,n,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/n,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*n*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/n,(e-x)/a);let v=Math.atan2((i-b)/n,(r-x)/a)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const C=[];for(let _=0;_<20;_++){const L=_/19,$=w+L*v,D=x+a*Math.cos($),B=b+n*Math.sin($);C.push({x:D,y:B})}return C}p(hi,"generateArcPoints");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=(t==null?void 0:t.padding)??0,s=(t==null?void 0:t.padding)??0,l=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o*2,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=H.svg(a),g=j(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...hi(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...hi(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...hi(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...hi(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=it(m),x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Y(t,b),t.intersect=function(w){return z.polygon(t,m,w)},a}p(Wd,"roundedRect");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=(t==null?void 0:t.padding)??0,l=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),h=-n.width/2-s,u=-n.height/2-s,{cssStyles:f}=t,d=H.svg(a),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Rt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return z.rect(t,b)},a}p(qd,"shadedProcess");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=H.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=it(g),y=f.path(m,d),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))}, ${-l/4+(t.padding??0)-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return z.polygon(t,g,b)},a}p(Hd,"slopedRect");async function jd(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return hn(e,t,r)}p(jd,"squareRect");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.height+t.padding,s=n.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=H.svg(a),u=j(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},..._i(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},..._i(s/2-l,0,l,50,270,450)],d=it(f),g=h.path(d,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Y(t,m),t.intersect=function(y){return z.polygon(t,f,y)},a}p(Ud,"stadium");async function Yd(e,t){return hn(e,t,{rx:5,ry:5})}p(Yd,"state");function Gd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{cssStyles:n}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=H.svg(c),u=j(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=s??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),n&&m.selectAll("path").attr("style",n),a&&m.selectAll("path").attr("style",a),Y(t,m),t.intersect=function(y){return z.circle(t,7,y)},c}p(Gd,"stateEnd");function Vd(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const s=H.svg(a).circle(0,0,14,zC(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Y(t,n),t.intersect=function(o){return z.circle(t,7,o)},a}p(Vd,"stateStart");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=((t==null?void 0:t.padding)||0)/2,s=n.width+t.padding,l=n.height+t.padding,c=-n.width/2-o,h=-n.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=H.svg(a),d=j(t,{}),g=f.rectangle(c-8,h,s+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+s,h,c+s,h+l,d);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Rt(b)),Y(t,x)}else{const f=We(a,s,l,u);i&&f.attr("style",i),Y(t,f)}return t.intersect=function(f){return z.polygon(t,u,f)},a}p(Xd,"subroutine");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,d=H.svg(a),g=j(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=it(m),b=d.path(x,g),w=it(y),S=d.path(w,{...g,fillStyle:"solid"}),v=a.insert(()=>S,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Y(t,v),t.intersect=function(C){return z.polygon(t,m,C)},a}p(Zd,"taggedRect");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:d}=t,g=H.svg(a),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...Ie(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,w=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...Ie(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],S=it(y),v=g.path(S,m),C=it(w),_=g.path(C,{...m,fillStyle:"solid"}),L=a.insert(()=>_,":first-child");return L.insert(()=>v,":first-child"),L.attr("class","basic label-container"),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,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c/2-(n.y-(n.top??0))})`),Y(t,L),t.intersect=function($){return z.polygon(t,y,$)},a}p(Kd,"taggedWaveEdgedRectangle");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=Math.max(n.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(n.height+t.padding,(t==null?void 0:t.height)||0),l=-o/2,c=-s/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),Y(t,h),t.intersect=function(u){return z.rect(t,u)},a}p(Qd,"text");var _v=p((e,t,r,i,a,n)=>`M${e},${t}
189
- a${a},${n} 0,0,1 0,${-i}
190
- l${r},0
191
- a${a},${n} 0,0,1 0,${i}
192
- M${r},${-i}
193
- a${a},${n} 0,0,0 0,${i}
194
- l${-r},0`,"createCylinderPathD"),Av=p((e,t,r,i,a,n)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Bv=p((e,t,r,i,a,n)=>[`M${e+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Q(e,t,K(t)),l=t.look==="neo"?s*2:s,c=n.height+l,h=c/2,u=h/(2.5+c/50),f=n.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=H.svg(a),y=Av(0,0,f,c,u,h),x=Bv(0,0,f,c,u,h),b=m.path(y,j(t,{})),w=m.path(x,j(t,{fill:"none"}));g=a.insert(()=>w,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=_v(0,0,f,c,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Rt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Y(t,g),t.intersect=function(m){const y=z.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Jd,"tiltedCylinder");async function tp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=n.width+t.padding,s=n.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=H.svg(a),f=j(t,{}),d=it(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=We(a,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Y(t,c),t.intersect=function(u){return z.polygon(t,l,u)},a}p(tp,"trapezoid");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=60,s=20,l=Math.max(o,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=H.svg(a),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=it(d),m=u.path(g,f),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Y(t,y),t.intersect=function(x){return z.polygon(t,d,x)},a}p(ep,"trapezoidalPentagon");async function rp(e,t){var b;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=_t((b=lt().flowchart)==null?void 0:b.htmlLabels),l=n.width+(t.padding??0),c=l+n.height,h=l+n.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=H.svg(a),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=it(u),y=d.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Y(t,x),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${c/2-(n.height+(t.padding??0)/(s?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return A.info("Triangle intersect",t,u,w),z.polygon(t,u,w)},a}p(rp,"triangle");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-s,g=d>0?d/2:0,m=H.svg(a),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ie(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=it(x),w=m.path(b,y),S=a.insert(()=>w,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-c-(n.y-(n.top??0))})`),Y(t,S),t.intersect=function(v){return z.polygon(t,x,v)},a}p(ip,"waveEdgedRectangle");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await Q(e,t,K(t)),o=100,s=50,l=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),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=H.svg(a),x=j(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ie(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...Ie(u/2,-g/2,-u/2,-g/2,d,-1)],w=it(b),S=y.path(w,x),v=a.insert(()=>S,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Y(t,v),t.intersect=function(C){return z.polygon(t,b,C)},a}p(ap,"waveRectangle");async function np(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Q(e,t,K(t)),s=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,d=H.svg(a),g=j(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
195
- M${h-c},${u} L${h+s},${u}
196
- M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(n.width/2)+c/2-(n.x-(n.left??0))}, ${-(n.height/2)+c/2-(n.y-(n.top??0))})`),Y(t,b),t.intersect=function(w){return z.polygon(t,m,w)},a}p(np,"windowPane");async function To(e,t){var ee,dt,re,gt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:at}=Ot(),{background:ut}=at,xt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ut}`]};await To(e,xt)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let a=((ee=i.er)==null?void 0:ee.diagramPadding)??10,n=((dt=i.er)==null?void 0:dt.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=U(t);if(r.attributes.length===0&&t.label){const at={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Me(t.label,i)+at.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ut=await hn(e,t,at);if(!_t(i.htmlLabels)){const xt=ut.select("text"),Mt=(re=xt.node())==null?void 0:re.getBBox();xt.attr("transform",`translate(${-Mt.width/2}, 0)`)}return ut}i.htmlLabels||(a*=1.25,n*=1.25);let c=K(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await br(h,t.label??"",i,0,0,["name"],s);u.height+=n;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,w=!0,S=!0;for(const at of r.attributes){const ut=await br(h,at.type,i,0,f,["attribute-type"],s);m=Math.max(m,ut.width+a);const xt=await br(h,at.name,i,0,f,["attribute-name"],s);y=Math.max(y,xt.width+a);const Mt=await br(h,at.keys.join(),i,0,f,["attribute-keys"],s);x=Math.max(x,Mt.width+a);const ie=await br(h,at.comment,i,0,f,["attribute-comment"],s);b=Math.max(b,ie.width+a);const ae=Math.max(ut.height,xt.height,Mt.height,ie.height)+n;g.push({yOffset:f,rowHeight:ae}),f+=ae}let v=4;x<=a&&(w=!1,x=0,v--),b<=a&&(S=!1,b=0,v--);const C=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const at=u.width+a*2-(m+y+x+b);m+=at/v,y+=at/v,x>0&&(x+=at/v),b>0&&(b+=at/v)}const _=m+y+x+b,L=H.svg(h),$=j(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let D=0;g.length>0&&(D=g.reduce((at,ut)=>at+((ut==null?void 0:ut.rowHeight)??0),0));const B=Math.max(C.width+a*2,(t==null?void 0:t.width)||0,_),P=Math.max((D??0)+u.height,(t==null?void 0:t.height)||0),M=-B/2,E=-P/2;h.selectAll("g:not(:first-child)").each((at,ut,xt)=>{const Mt=nt(xt[ut]),ie=Mt.attr("transform");let ae=0,Wr=0;if(ie){const Fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);Fe&&(ae=parseFloat(Fe[1]),Wr=parseFloat(Fe[2]),Mt.attr("class").includes("attribute-name")?ae+=m:Mt.attr("class").includes("attribute-keys")?ae+=m+y:Mt.attr("class").includes("attribute-comment")&&(ae+=m+y+x))}Mt.attr("transform",`translate(${M+a/2+ae}, ${Wr+E+u.height+n/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(E+n/2)+")");const O=L.rectangle(M,E,B,P,$),R=h.insert(()=>O,":first-child").attr("style",o.join("")),{themeVariables:W}=Ot(),{rowEven:N,rowOdd:ot,nodeBorder:Ct}=W;d.push(0);for(const[at,ut]of g.entries()){const Mt=(at+1)%2===0&&ut.yOffset!==0,ie=L.rectangle(M,u.height+E+(ut==null?void 0:ut.yOffset),B,ut==null?void 0:ut.rowHeight,{...$,fill:Mt?N:ot,stroke:Ct});h.insert(()=>ie,"g.label").attr("style",o.join("")).attr("class",`row-rect-${Mt?"even":"odd"}`)}let rt=L.line(M,u.height+E,B+M,u.height+E,$);h.insert(()=>rt).attr("class","divider"),rt=L.line(m+M,u.height+E,m+M,P+E,$),h.insert(()=>rt).attr("class","divider"),w&&(rt=L.line(m+y+M,u.height+E,m+y+M,P+E,$),h.insert(()=>rt).attr("class","divider")),S&&(rt=L.line(m+y+x+M,u.height+E,m+y+x+M,P+E,$),h.insert(()=>rt).attr("class","divider"));for(const at of d)rt=L.line(M,u.height+E+at,B+M,u.height+E+at,$),h.insert(()=>rt).attr("class","divider");if(Y(t,R),l&&t.look!=="handDrawn"){const at=l.split(";"),ut=(gt=at==null?void 0:at.filter(xt=>xt.includes("stroke")))==null?void 0:gt.map(xt=>`${xt}`).join("; ");h.selectAll("path").attr("style",ut??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(at){return z.rect(t,at)},h}p(To,"erBox");async function br(e,t,r,i=0,a=0,n=[],o=""){const s=e.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==al(t)&&(t=al(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await Ne(s,t,{width:Me(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(_t(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=nt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(br,"addText");async function sp(e,t,r,i,a=r.class.padding??12){const n=i?0:3,o=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,f=0,d=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ui(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ui(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await ui(c,b,m,[b.parseClassifier()]);m+=w+n}d=c.node().getBBox().height,d<=0&&(d=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await ui(h,b,y,[b.parseClassifier()]);y+=w+n}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(sp,"textHelper");async function ui(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),n=Ot();let o="useHtmlLabels"in t?t.useHtmlLabels:_t(n.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Er(s)&&(o=!0);const l=await Ne(a,Ws(hr(s)),{width:Me(s,n)+50,classes:"markdown-node-label",useHtmlLabels:o},n);let c,h=1;if(o){const u=l.children[0],f=nt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const w=((b=n.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,v=parseInt(w,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&nt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return a.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(ui,"addText");async function op(e,t){var $,D;const r=lt(),i=r.class.padding??12,a=i,n=t.useHtmlLabels??_t(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await sp(e,t,r,n,a),{labelStyles:c,nodeStyles:h}=U(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=(($=o.styles)==null?void 0:$.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((D=r.class)!=null&&D.hideEmptyMembersBox),d=H.svg(s),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,w=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),S=s.insert(()=>w,":first-child");S.attr("class","basic label-container");const v=S.node().getBBox();s.selectAll(".text").each((B,P,M)=>{var ot;const E=nt(M[P]),O=E.attr("transform");let R=0;if(O){const rt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);rt&&(R=parseFloat(rt[2]))}let W=R+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);n||(W-=4);let N=x;(E.attr("class").includes("label-group")||E.attr("class").includes("annotation-group"))&&(N=-((ot=E.node())==null?void 0:ot.getBBox().width)/2||0,s.selectAll("text").each(function(Ct,rt,ee){window.getComputedStyle(ee[rt]).textAnchor==="middle"&&(N=0)})),E.attr("transform",`translate(${N}, ${W})`)});const C=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,_=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,L=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const B=d.line(v.x,C+_+b+i,v.x+v.width,C+_+b+i,g);s.insert(()=>B).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const B=d.line(v.x,C+_+L+b+a*2+i,v.x+v.width,C+_+L+b+i+a*2,g);s.insert(()=>B).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),S.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!n){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(u);if(P){const M=P[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}else if(c){const M=B.exec(c);if(M){const E=M[0].replace("color","fill");s.selectAll("tspan").attr("style",E)}}}return Y(t,S),t.intersect=function(B){return z.rect(t,B)},s}p(op,"classBox");async function lp(e,t){var C,_;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=t,n=t,o=20,s=20,l="verifyMethod"in t,c=K(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await me(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):u=await me(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await me(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+s,l){const L=await me(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=L;const $=await me(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=$;const D=await me(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=D,await me(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const L=await me(h,`${n.type?`Type: ${n.type}`:""}`,f,t.labelStyle);f+=L,await me(h,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,f,t.labelStyle)}const g=(((C=h.node())==null?void 0:C.getBBox().width)??200)+o,m=(((_=h.node())==null?void 0:_.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=H.svg(h),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=b.rectangle(y,x,g,m,w),v=h.insert(()=>S,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,$,D)=>{const B=nt(D[$]),P=B.attr("transform");let M=0,E=0;if(P){const N=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);N&&(M=parseFloat(N[1]),E=parseFloat(N[2]))}const O=E-m/2;let R=y+o/2;($===0||$===1)&&(R=M),B.attr("transform",`translate(${R}, ${O+o})`)}),f>u+d+s){const L=b.line(y,x+u+d+s,y+g,x+u+d+s,w);h.insert(()=>L).attr("style",i)}return Y(t,v),t.intersect=function(L){return z.rect(t,L)},h}p(lp,"requirementBox");async function me(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=lt(),o=n.htmlLabels??!0,s=await Ne(a,Ws(hr(t)),{width:Me(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let l;if(o){const c=s.children[0],h=nt(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(me,"addText");var Lv=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 cp(e,t,{config:r}){var P,M;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i||"";const n=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await Q(e,t,K(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((P=r==null?void 0:r.kanban)!=null&&P.ticketBaseUrl)&&(u=(M=r==null?void 0:r.kanban)==null?void 0:M.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await Nn(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Nn(s,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Nn(s,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,w=(t==null?void 0:t.width)||0,S=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,C=-w/2,_=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-S-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-S+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*n)+", "+(-S+l.height/2)+")");let L;const{rx:$,ry:D}=t,{cssStyles:B}=t;if(t.look==="handDrawn"){const E=H.svg(s),O=j(t,{}),R=$||D?E.path(ze(C,_,w,v,$||0),O):E.rectangle(C,_,w,v,O);L=s.insert(()=>R,":first-child"),L.attr("class","basic label-container").attr("style",B||null)}else{L=s.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",a).attr("rx",$??5).attr("ry",D??5).attr("x",C).attr("y",_).attr("width",w).attr("height",v);const E="priority"in t&&t.priority;if(E){const O=s.append("line"),R=C+2,W=_+Math.floor(($??0)/2),N=_+v-Math.floor(($??0)/2);O.attr("x1",R).attr("y1",W).attr("x2",R).attr("y2",N).attr("stroke-width","4").attr("stroke",Lv(E))}}return Y(t,L),t.height=v,t.intersect=function(E){return z.rect(t,E)},s}p(cp,"kanbanItem");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Q(e,t,K(t)),l=n.width+10*o,c=n.height+8*o,h=.15*l,{cssStyles:u}=t,f=n.width+20,d=n.height+20,g=Math.max(l,f),m=Math.max(c,d);s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let y;const x=`M0 0
197
- a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
198
- a${h},${h} 1 0,0 ${g*.25},0
199
- a${h},${h} 1 0,0 ${g*.25},0
200
- a${h},${h} 1 0,0 ${g*.25},${m*.1}
201
-
202
- a${h},${h} 1 0,0 ${g*.15},${m*.33}
203
- a${h*.8},${h*.8} 1 0,0 0,${m*.34}
204
- a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
205
-
206
- a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
207
- a${h},${h} 1 0,0 ${-1*g*.25},0
208
- a${h},${h} 1 0,0 ${-1*g*.25},0
209
- a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
210
-
211
- a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
212
- a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
213
- a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
214
- H0 V0 Z`;if(t.look==="handDrawn"){const b=H.svg(a),w=j(t,{}),S=b.path(x,w);y=a.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",Rt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Y(t,y),t.calcIntersect=function(b,w){return z.rect(b,w)},t.intersect=function(b){return A.info("Bang intersect",t,b),z.rect(t,b)},a}p(hp,"bang");async function up(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Q(e,t,K(t)),l=n.width+2*o,c=n.height+2*o,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
215
- a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
216
- a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
217
- a${u},${u} 1 0,1 ${l*.35},${l*.2}
218
-
219
- a${h},${h} 1 0,1 ${l*.15},${c*.35}
220
- a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
221
-
222
- a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
223
- a${f},${f} 1 0,1 ${-1*l*.5},0
224
- a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
225
-
226
- a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
227
- a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
228
- H0 V0 Z`;if(t.look==="handDrawn"){const x=H.svg(a),b=j(t,{}),w=x.path(y,b);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Rt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,m),t.calcIntersect=function(x,b){return z.rect(x,b)},t.intersect=function(x){return A.info("Cloud intersect",t,x),z.rect(t,x)},a}p(up,"cloud");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o,label:s}=await Q(e,t,K(t)),l=n.width+8*o,c=n.height+2*o,h=5,u=`
229
- M${-l/2} ${c/2-h}
230
- v${-c+2*h}
231
- q0,-${h} ${h},-${h}
232
- h${l-2*h}
233
- q${h},0 ${h},${h}
234
- v${c-2*h}
235
- q0,${h} -${h},${h}
236
- h${-l+2*h}
237
- q-${h},0 -${h},-${h}
238
- Z
239
- `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>s.node()),Y(t,f),t.calcIntersect=function(d,g){return z.rect(d,g)},t.intersect=function(d){return z.rect(t,d)},a}p(fp,"defaultMindmapNode");async function dp(e,t){const r={padding:t.padding??0};return So(e,t,r)}p(dp,"mindmapCircle");var Mv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Wd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ud},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Xd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:pd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:So},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:hp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:up},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Pd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:wd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ed},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Md},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tp},{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:Bd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:md},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:sd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Vd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Gd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:bd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:kd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:hd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ud},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:fd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Fd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ip},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Cd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Jd},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:$d},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:dd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:gd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:rp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:np},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:yd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ep},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:xd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Hd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Rd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Dd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:nd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:cd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Kd},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Zd},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ap},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Nd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Od}],Ev=p(()=>{const t=[...Object.entries({state:Yd,choice:od,note:Id,rectWithTitle:zd,labelRect:Ld,iconSquare:_d,iconCircle:Sd,icon:vd,iconRounded:Td,imageSquare:Ad,anchor:ad,kanbanItem:cp,mindmapCircle:dp,defaultMindmapNode:fp,classBox:op,erBox:To,requirementBox:lp}),...Mv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),pp=Ev();function Fv(e){return e in pp}p(Fv,"isValidShape");var un=new Map;async function gp(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const n=t.shape?pp[t.shape]:void 0;if(!n)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await n(i,t,r)}else a=await n(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),un.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(gp,"insertNode");var SA=p((e,t)=>{un.set(t.id,e)},"setNodeElem"),TA=p(()=>{un.clear()},"clear"),_A=p(e=>{const t=un.get(e.id);A.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"),$v=p((e,t,r,i,a,n)=>{t.arrowTypeStart&&Ql(e,"start",t.arrowTypeStart,r,i,a,n),t.arrowTypeEnd&&Ql(e,"end",t.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),Ov={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Ql=p((e,t,r,i,a,n,o)=>{var u;const s=Ov[r];if(!s){A.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${a}_${n}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),s.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Wa=new Map,Lt=new Map,AA=p(()=>{Wa.clear(),Lt.clear()},"clear"),Ki=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Dv=p(async(e,t)=>{let r=_t(lt().flowchart.htmlLabels);const{labelStyles:i}=U(t);t.labelStyle=i;const a=await Ne(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});A.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),o=n.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(a);let s=a.getBBox();if(r){const c=a.children[0],h=nt(a);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Wa.set(t.id,n),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await Ke(t.startLabelLeft,Ki(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startLeft=h,fi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await Ke(t.startLabelRight,Ki(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startRight=h,fi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await Ke(t.endLabelLeft,Ki(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endLeft=h,fi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await Ke(t.endLabelRight,Ki(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endRight=h,fi(l,t.endLabelRight)}return a},"insertEdgeLabel");function fi(e,t){lt().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(fi,"setTerminalWidth");var Rv=p((e,t)=>{A.debug("Moving label abc88 ",e.id,e.label,Wa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=lt(),{subGraphTitleTotalMargin:a}=to(i);if(e.label){const n=Wa.get(e.id);let o=e.x,s=e.y;if(r){const l=oe.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}n.attr("transform",`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){const n=Lt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const n=Lt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const n=Lt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const n=Lt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=oe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}n.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),Iv=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),n=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return a>=o||n>=s},"outsideNode"),Pv=p((e,t,r)=>{A.debug(`intersection calc abc89:
240
- outsidePoint: ${JSON.stringify(t)}
241
- insidePoint : ${JSON.stringify(r)}
242
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-n:o+n;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;s=h*u/c;const f={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),A.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,f),f}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,f=r.x<t.x?r.x+h-s:r.x-h+s,d=r.y<t.y?r.y+u:r.y-u;return A.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),Jl=p((e,t)=>{A.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(n=>{if(A.info("abc88 checking point",n,t),!Iv(t,n)&&!a){const o=Pv(t,i,n);A.debug("abc88 inside",n,i,o),A.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?A.warn("abc88 no intersect",o,r):r.push(o),a=!0}else A.warn("abc88 outside",n,i),i=n,a||r.push(n)}),A.debug("returning points",r),r},"cutPathAtIntersect");function mp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],n=e[i],o=e[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(t.push(n),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(mp,"extractCornerPoints");var tc=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,n=Math.sqrt(i*i+a*a),o=r/n;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Nv=p(function(e){const{cornerPointPositions:t}=mp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],n=e[i+1],o=e[i],s=tc(a,o,5),l=tc(n,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){A.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));const d=5;o.x===s.x?f={x:c<0?s.x-d+u:s.x+d-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-d+u:s.y+d-u}}else A.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),zv=p((e,t,r)=>{const i=e-t-r,a=2,n=2,o=a+n,s=Math.floor(i/o),l=Array(s).fill(`${a} ${n}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Wv=p(function(e,t,r,i,a,n,o,s=!1){var E;const{handDrawnSeed:l}=lt();let c=t.points,h=!1;const u=a;var f=n;const d=[];for(const O in t.cssCompiledStyles)Yu(O)||d.push(t.cssCompiledStyles[O]);A.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),A.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(A.info("to cluster abc88",r.get(t.toCluster)),c=Jl(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(A.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Jl(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(O=>!Number.isNaN(O.y));m=Nv(m);let y=Ji;switch(y=Wn,t.curve){case"linear":y=Wn;break;case"basis":y=Ji;break;case"cardinal":y=xc;break;case"bumpX":y=Cc;break;case"bumpY":y=bc;break;case"catmullRom":y=yc;break;case"monotoneX":y=mc;break;case"monotoneY":y=gc;break;case"natural":y=pc;break;case"step":y=dc;break;case"stepAfter":y=fc;break;case"stepBefore":y=uc;break;default:y=Ji}const{x,y:b}=NC(t),w=$g().x(x).y(b).curve(y);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let v,C=t.curve==="rounded"?yp(xp(m,t),5):w(m);const _=Array.isArray(t.style)?t.style:[t.style];let L=_.find(O=>O==null?void 0:O.startsWith("stroke:")),$=!1;if(t.look==="handDrawn"){const O=H.svg(e);Object.assign([],m);const R=O.path(C,{roughness:.3,seed:l});S+=" transition",v=nt(R).select("path").attr("id",t.id).attr("class"," "+S+(t.classes?" "+t.classes:"")).attr("style",_?_.reduce((N,ot)=>N+";"+ot,""):"");let W=v.attr("d");v.attr("d",W),e.node().appendChild(v.node())}else{const O=d.join(";"),R=_?_.reduce((dt,re)=>dt+re+";",""):"";let W="";t.animate&&(W=" edge-animation-fast"),t.animation&&(W=" edge-animation-"+t.animation);const N=(O?O+";"+R+";":R)+";"+(_?_.reduce((dt,re)=>dt+";"+re,""):"");v=e.append("path").attr("d",C).attr("id",t.id).attr("class"," "+S+(t.classes?" "+t.classes:"")+(W??"")).attr("style",N),L=(E=N.match(/stroke:([^;]+)/))==null?void 0:E[1],$=t.animate===!0||!!t.animation||O.includes("animation");const ot=v.node(),Ct=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,rt=ml[t.arrowTypeStart]||0,ee=ml[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const re=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?zv(Ct,rt,ee):`0 ${rt} ${Ct-rt-ee} ${ee}`}; stroke-dashoffset: 0;`;v.attr("style",re+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),t.showPoints&&m.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let D="";(lt().flowchart.arrowMarkerAbsolute||lt().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),A.info("arrowTypeStart",t.arrowTypeStart),A.info("arrowTypeEnd",t.arrowTypeEnd),$v(v,t,D,o,i,L);const B=Math.floor(c.length/2),P=c[B];oe.isLabelCoordinateInPath(P,v.attr("d"))||(h=!0);let M={};return h&&(M.updatedPath=c),M.originalPath=t.points,M},"insertEdge");function yp(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let n=0;n<i;n++){const o=e[n],s=e[n-1],l=e[n+1];if(n===0)r+=`M${o.x},${o.y}`;else if(n===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/d,y=h/d,x=u/g,b=f/g,w=m*x+y*b,S=Math.max(-1,Math.min(1,w)),v=Math.acos(S);if(v<a||Math.abs(Math.PI-v)<a){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(v/2),d/2,g/2),_=o.x-m*C,L=o.y-y*C,$=o.x+x*C,D=o.y+b*C;r+=`L${_},${L}`,r+=`Q${o.x},${o.y} ${$},${D}`}}return r}p(yp,"generateRoundedPath");function As(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(As,"calculateDeltaAndAngle");function xp(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&$t[t.arrowTypeStart]){const a=$t[t.arrowTypeStart],n=e[0],o=e[1],{angle:s}=As(n,o),l=a*Math.cos(s),c=a*Math.sin(s);r[0].x=n.x+l,r[0].y=n.y+c}const i=e.length;if(i>=2&&$t[t.arrowTypeEnd]){const a=$t[t.arrowTypeEnd],n=e[i-1],o=e[i-2],{angle:s}=As(o,n),l=a*Math.cos(s),c=a*Math.sin(s);r[i-1].x=n.x-l,r[i-1].y=n.y-c}return r}p(xp,"applyMarkerOffsetsToPoints");var qv=p((e,t,r,i)=>{t.forEach(a=>{aS[a](e,r,i)})},"insertMarkers"),Hv=p((e,t,r)=>{A.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),jv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Uv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Yv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Gv=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Vv=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Xv=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Zv=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Kv=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"),Qv=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"),Jv=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),tS=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"),eS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),rS=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
243
- L20,10
244
- M20,10
245
- L0,20`)},"requirement_arrow"),iS=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"),aS={extension:Hv,composition:jv,aggregation:Uv,dependency:Yv,lollipop:Gv,point:Vv,circle:Xv,cross:Zv,barb:Kv,only_one:Qv,zero_or_one:Jv,one_or_more:tS,zero_or_more:eS,requirement_arrow:rS,requirement_contains:iS},nS=qv,sS={common:Rr,getConfig:Ot,insertCluster:pv,insertEdge:Wv,insertEdgeLabel:Dv,insertMarkers:nS,insertNode:gp,interpolateToCurve:no,labelHelper:Q,log:A,positionEdgeLabel:Rv},Ai={},bp=p(e=>{for(const t of e)Ai[t.name]=t},"registerLayoutLoaders"),oS=p(()=>{bp([{name:"dagre",loader:p(async()=>await ht(()=>import("./dagre-6UL2VRFP-CZufvh9X.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await ht(()=>import("./cose-bilkent-S5V4N54A-C_pFTYgk.js"),__vite__mapDeps([10,11,7,6,8,9]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");oS();var BA=p(async(e,t)=>{if(!(e.layoutAlgorithm in Ai))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Ai[e.layoutAlgorithm];return(await r.loader()).render(e,t,sS,{algorithm:r.algorithm})},"render"),LA=p((e="",{fallback:t="dagre"}={})=>{if(e in Ai)return e;if(t in Ai)return A.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"),lS=Zu(Object.keys,Object),cS=Object.prototype,hS=cS.hasOwnProperty;function uS(e){if(!en(e))return lS(e);var t=[];for(var r in Object(e))hS.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bs=cr(be,"DataView"),Ls=cr(be,"Promise"),Ms=cr(be,"Set"),Es=cr(be,"WeakMap"),ec="[object Map]",fS="[object Object]",rc="[object Promise]",ic="[object Set]",ac="[object WeakMap]",nc="[object DataView]",dS=lr(Bs),pS=lr(Ti),gS=lr(Ls),mS=lr(Ms),yS=lr(Es),Ge=Pr;(Bs&&Ge(new Bs(new ArrayBuffer(1)))!=nc||Ti&&Ge(new Ti)!=ec||Ls&&Ge(Ls.resolve())!=rc||Ms&&Ge(new Ms)!=ic||Es&&Ge(new Es)!=ac)&&(Ge=function(e){var t=Pr(e),r=t==fS?e.constructor:void 0,i=r?lr(r):"";if(i)switch(i){case dS:return nc;case pS:return ec;case gS:return rc;case mS:return ic;case yS:return ac}return t});var xS="[object Map]",bS="[object Set]",CS=Object.prototype,wS=CS.hasOwnProperty;function sc(e){if(e==null)return!0;if(rn(e)&&(Ea(e)||typeof e=="string"||typeof e.splice=="function"||io(e)||ao(e)||Ma(e)))return!e.length;var t=Ge(e);if(t==xS||t==bS)return!e.size;if(en(e))return!uS(e).length;for(var r in e)if(wS.call(e,r))return!1;return!0}var Cp="c4",kS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),vS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO-zPXvbm1r.js");return{diagram:t}},__vite__mapDeps([12,13,6,7,8,9]),import.meta.url);return{id:Cp,diagram:e}},"loader"),SS={id:Cp,detector:kS,loader:vS},TS=SS,wp="flowchart",_S=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"),AS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-Cnln4KZl.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,6,7,8,9]),import.meta.url);return{id:wp,diagram:e}},"loader"),BS={id:wp,detector:_S,loader:AS},LS=BS,kp="flowchart-v2",MS=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),ES=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-Cnln4KZl.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,6,7,8,9]),import.meta.url);return{id:kp,diagram:e}},"loader"),FS={id:kp,detector:MS,loader:ES},$S=FS,vp="er",OS=p(e=>/^\s*erDiagram/.test(e),"detector"),DS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA-Lxy4qP7U.js");return{diagram:t}},__vite__mapDeps([18,16,17,6,7,8,9]),import.meta.url);return{id:vp,diagram:e}},"loader"),RS={id:vp,detector:OS,loader:DS},IS=RS,Sp="gitGraph",PS=p(e=>/^\s*gitGraph/.test(e),"detector"),NS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-V2S2FVAM-D0f-vt5d.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,6,7,8,2,4,5,9]),import.meta.url);return{id:Sp,diagram:e}},"loader"),zS={id:Sp,detector:PS,loader:NS},WS=zS,Tp="gantt",qS=p(e=>/^\s*gantt/.test(e),"detector"),HS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3-D8EVN47E.js");return{diagram:t}},__vite__mapDeps([23,8,7,9,6]),import.meta.url);return{id:Tp,diagram:e}},"loader"),jS={id:Tp,detector:qS,loader:HS},US=jS,_p="info",YS=p(e=>/^\s*info/.test(e),"detector"),GS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./infoDiagram-HS3SLOUP-DU3h9dF-.js");return{diagram:t}},__vite__mapDeps([24,22,6,7,8,2,4,5,9]),import.meta.url);return{id:_p,diagram:e}},"loader"),VS={id:_p,detector:YS,loader:GS},Ap="pie",XS=p(e=>/^\s*pie/.test(e),"detector"),ZS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-DMRijIH2.js");return{diagram:t}},__vite__mapDeps([25,20,22,6,7,8,2,4,5,9]),import.meta.url);return{id:Ap,diagram:e}},"loader"),KS={id:Ap,detector:XS,loader:ZS},Bp="quadrantChart",QS=p(e=>/^\s*quadrantChart/.test(e),"detector"),JS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B-BxLvBNZc.js");return{diagram:t}},__vite__mapDeps([26,9,7,8,6]),import.meta.url);return{id:Bp,diagram:e}},"loader"),tT={id:Bp,detector:QS,loader:JS},eT=tT,Lp="xychart",rT=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),iT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R-BoJPfqrl.js");return{diagram:t}},__vite__mapDeps([27,9,7,8,6]),import.meta.url);return{id:Lp,diagram:e}},"loader"),aT={id:Lp,detector:rT,loader:iT},nT=aT,Mp="requirement",sT=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),oT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ-DGpPvRmv.js");return{diagram:t}},__vite__mapDeps([28,16,17,6,7,8,9]),import.meta.url);return{id:Mp,diagram:e}},"loader"),lT={id:Mp,detector:sT,loader:oT},cT=lT,Ep="sequence",hT=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),uT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW-vmIEcx_8.js");return{diagram:t}},__vite__mapDeps([29,13,21,6,7,8,9]),import.meta.url);return{id:Ep,diagram:e}},"loader"),fT={id:Ep,detector:hT,loader:uT},dT=fT,Fp="class",pT=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"),gT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG-s0FTHA2r.js");return{diagram:t}},__vite__mapDeps([30,31,15,16,17,6,7,8,9]),import.meta.url);return{id:Fp,diagram:e}},"loader"),mT={id:Fp,detector:pT,loader:gT},yT=mT,$p="classDiagram",xT=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"),bT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB-s0FTHA2r.js");return{diagram:t}},__vite__mapDeps([32,31,15,16,17,6,7,8,9]),import.meta.url);return{id:$p,diagram:e}},"loader"),CT={id:$p,detector:xT,loader:bT},wT=CT,Op="state",kT=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"),vT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC-hx8zwjxY.js");return{diagram:t}},__vite__mapDeps([33,34,16,17,1,2,3,4,9,7,8,6]),import.meta.url);return{id:Op,diagram:e}},"loader"),ST={id:Op,detector:kT,loader:vT},TT=ST,Dp="stateDiagram",_T=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"),AT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3-D-E3Vh0S.js");return{diagram:t}},__vite__mapDeps([35,34,16,17,6,7,8,9]),import.meta.url);return{id:Dp,diagram:e}},"loader"),BT={id:Dp,detector:_T,loader:AT},LT=BT,Rp="journey",MT=p(e=>/^\s*journey/.test(e),"detector"),ET=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q-CBYV7J-a.js");return{diagram:t}},__vite__mapDeps([36,13,15,9,7,8,6]),import.meta.url);return{id:Rp,diagram:e}},"loader"),FT={id:Rp,detector:MT,loader:ET},$T=FT,OT=p((e,t,r)=>{A.debug(`rendering svg for syntax error
246
- `);const i=Eb(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Wc(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Ip={draw:OT},DT=Ip,RT={db:{},renderer:Ip,parser:{parse:p(()=>{},"parse")}},IT=RT,Pp="flowchart-elk",PT=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"),NT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-Cnln4KZl.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,6,7,8,9]),import.meta.url);return{id:Pp,diagram:e}},"loader"),zT={id:Pp,detector:PT,loader:NT},WT=zT,Np="timeline",qT=p(e=>/^\s*timeline/.test(e),"detector"),HT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-DQvTmToF.js");return{diagram:t}},__vite__mapDeps([37,9,7,8,6]),import.meta.url);return{id:Np,diagram:e}},"loader"),jT={id:Np,detector:qT,loader:HT},UT=jT,zp="mindmap",YT=p(e=>/^\s*mindmap/.test(e),"detector"),GT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-Dd8rk7Wy.js");return{diagram:t}},__vite__mapDeps([38,16,17,39,6,7,8,40,41,9,42]),import.meta.url);return{id:zp,diagram:e}},"loader"),VT={id:zp,detector:YT,loader:GT},XT=VT,Wp="kanban",ZT=p(e=>/^\s*kanban/.test(e),"detector"),KT=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-DaQyoaQ-.js");return{diagram:t}},__vite__mapDeps([43,15,6,7,8,9]),import.meta.url);return{id:Wp,diagram:e}},"loader"),QT={id:Wp,detector:ZT,loader:KT},JT=QT,qp="sankey",t_=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),e_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-CDuaBdM7.js");return{diagram:t}},__vite__mapDeps([44,9,7,8,6]),import.meta.url);return{id:qp,diagram:e}},"loader"),r_={id:qp,detector:t_,loader:e_},i_=r_,Hp="packet",a_=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),n_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-r4X8riql.js");return{diagram:t}},__vite__mapDeps([45,20,22,6,7,8,2,4,5,9]),import.meta.url);return{id:Hp,diagram:e}},"loader"),s_={id:Hp,detector:a_,loader:n_},jp="radar",o_=p(e=>/^\s*radar-beta/.test(e),"detector"),l_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-DSPQM_i_.js");return{diagram:t}},__vite__mapDeps([46,20,22,6,7,8,2,4,5,9]),import.meta.url);return{id:jp,diagram:e}},"loader"),c_={id:jp,detector:o_,loader:l_},Up="block",h_=p(e=>/^\s*block(-beta)?/.test(e),"detector"),u_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC-CJZ9JC7A.js");return{diagram:t}},__vite__mapDeps([47,15,5,2,1,9,7,8,6]),import.meta.url);return{id:Up,diagram:e}},"loader"),f_={id:Up,detector:h_,loader:u_},d_=f_,Yp="architecture",p_=p(e=>/^\s*architecture/.test(e),"detector"),g_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ-b5ju5KOn.js");return{diagram:t}},__vite__mapDeps([48,20,22,6,7,8,2,4,5,11,9]),import.meta.url);return{id:Yp,diagram:e}},"loader"),m_={id:Yp,detector:p_,loader:g_},y_=m_,Gp="treemap",x_=p(e=>/^\s*treemap/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK-wHztSVlF.js");return{diagram:t}},__vite__mapDeps([49,17,20,22,6,7,8,2,4,5,9]),import.meta.url);return{id:Gp,diagram:e}},"loader"),C_={id:Gp,detector:x_,loader:b_},oc=!1,fn=p(()=>{oc||(oc=!0,ma("error",IT,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("---")),jn(WT,XT,y_),jn(TS,JT,wT,yT,IS,US,VS,KS,cT,dT,$S,LS,UT,WS,LT,TT,$T,eT,i_,s_,nT,d_,c_,C_))},"addDiagrams"),w_=p(async()=>{A.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(tr).map(async([r,{detector:i,loader:a}])=>{if(a)try{Vn(r)}catch{try{const{diagram:n,id:o}=await a();ma(o,n,i)}catch(n){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete tr[r],n}}}))).filter(r=>r.status==="rejected");if(t.length>0){A.error(`Failed to load ${t.length} external diagrams`);for(const r of t)A.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),k_="graphics-document document";function Vp(e,t){e.attr("role",k_),t!==""&&e.attr("aria-roledescription",t)}p(Vp,"setA11yDiagramInfo");function Xp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Xp,"addSVGa11yTitleDescription");var Qe,Fs=(Qe=class{constructor(t,r,i,a,n){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=n}static async fromText(t,r={}){var c,h;const i=Ot(),a=Ds(t,i);t=Iw(t)+`
247
- `;try{Vn(a)}catch{const u=hm(a);if(!u)throw new Lc(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();ma(f,d)}const{db:n,parser:o,renderer:s,init:l}=Vn(a);return o.parser&&(o.parser.yy=n),(c=n.clear)==null||c.call(n),l==null||l(i),r.title&&((h=n.setDiagramTitle)==null||h.call(n,r.title)),await o.parse(t),new Qe(a,t,n,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Qe,"Diagram"),Qe),lc=[],v_=p(()=>{lc.forEach(e=>{e()}),lc=[]},"attachFunctions"),S_=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Zp(e){const t=e.match(Bc);if(!t)return{text:e,metadata:{}};let r=PC(t[1],{schema:IC})??{};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(Zp,"extractFrontMatter");var T_=p(e=>e.replace(/\r\n?/g,`
248
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),__=p(e=>{const{text:t,metadata:r}=Zp(e),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:t}},"processFrontmatter"),A_=p(e=>{const t=oe.detectInit(e)??{},r=oe.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:Sw(e),directive:t}},"processDirectives");function _o(e){const t=T_(e),r=__(t),i=A_(r.text),a=ho(r.config,i.directive);return e=S_(i.text),{code:e,title:r.title,config:a}}p(_o,"preprocessDiagram");function Kp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Kp,"toBase64");var B_=5e4,L_="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",M_="sandbox",E_="loose",F_="http://www.w3.org/2000/svg",$_="http://www.w3.org/1999/xlink",O_="http://www.w3.org/1999/xhtml",D_="100%",R_="100%",I_="border:0;margin:0;",P_="margin:0",N_="allow-top-navigation-by-user-activation allow-popups",z_='The "iframe" tag is not supported by your browser.',W_=["foreignobject"],q_=["dominant-baseline"];function Ao(e){const t=_o(e);return pa(),_m(t.config??{}),t}p(Ao,"processAndSetConfigs");async function Qp(e,t){fn();try{const{code:r,config:i}=Ao(e);return{diagramType:(await tg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Qp,"parse");var cc=p((e,t,r=[])=>`
249
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),H_=p((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
250
- ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
251
- :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
252
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{sc(l.styles)||s.forEach(c=>{r+=cc(l.id,c,l.styles)}),sc(l.textStyles)||(r+=cc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),j_=p((e,t,r,i)=>{const a=H_(e,r),n=Ym(t,a,e.themeVariables);return xg(Cg(`${i}{${n}}`),bg)},"createUserStyles"),U_=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=hr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Y_=p((e="",t)=>{var a,n;const r=(n=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&n.height?t.viewBox.baseVal.height+"px":R_,i=Kp(`<body style="${P_}">${e}</body>`);return`<iframe style="width:${D_};height:${r};${I_}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${N_}">
253
- ${z_}
254
- </iframe>`},"putIntoIFrame"),hc=p((e,t,r,i,a)=>{const n=e.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",t).attr("width","100%").attr("xmlns",F_);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function $s(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p($s,"sandboxedIframe");var G_=p((e,t,r,i)=>{var a,n,o;(a=e.getElementById(t))==null||a.remove(),(n=e.getElementById(r))==null||n.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),V_=p(async function(e,t,r){var P,M,E,O,R,W;fn();const i=Ao(t);t=i.code;const a=Ot();A.debug(a),t.length>((a==null?void 0:a.maxTextSize)??B_)&&(t=L_);const n="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const ot=nt(f?s:c).node();ot&&"remove"in ot&&ot.remove()},"removeTempElements");let u=nt("body");const f=a.securityLevel===M_,d=a.securityLevel===E_,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const N=$s(nt(r),o);u=nt(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=nt(r);hc(u,e,l,`font-family: ${g}`,$_)}else{if(G_(document,e,l,o),f){const N=$s(nt("body"),o);u=nt(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=nt("body");hc(u,e,l)}let m,y;try{m=await Fs.fromText(t,{title:i.title})}catch(N){if(a.suppressErrorRendering)throw h(),N;m=await Fs.fromText("error"),y=N}const x=u.select(c).node(),b=m.type,w=x.firstChild,S=w.firstChild,v=(M=(P=m.renderer).getClasses)==null?void 0:M.call(P,t,m),C=j_(a,b,v,n),_=document.createElement("style");_.innerHTML=C,w.insertBefore(_,S);try{await m.renderer.draw(t,e,Go.version,m)}catch(N){throw a.suppressErrorRendering?h():DT.draw(t,e,Go.version),N}const L=u.select(`${c} svg`),$=(O=(E=m.db).getAccTitle)==null?void 0:O.call(E),D=(W=(R=m.db).getAccDescription)==null?void 0:W.call(R);eg(b,L,$,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",O_);let B=u.select(c).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),B=U_(B,f,_t(a.arrowMarkerAbsolute)),f){const N=u.select(c+" svg").node();B=Y_(B,N)}else d||(B=Je.sanitize(B,{ADD_TAGS:W_,ADD_ATTR:q_,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(v_(),y)throw y;return h(),{diagramType:b,svg:B,bindFunctions:m.db.bindFunctions}},"render");function Jp(e={}){var i;const t=St({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Sm(t),t!=null&&t.theme&&t.theme in Ae?t.themeVariables=Ae[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ae.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?vm(t):Oc();Os(r.logLevel),fn()}p(Jp,"initialize");var tg=p((e,t={})=>{const{code:r}=_o(e);return Fs.fromText(r,t)},"getDiagramFromText");function eg(e,t,r,i){Vp(t,e),Xp(t,r,i,t.attr("id"))}p(eg,"addA11yInfo");var sr=Object.freeze({render:V_,parse:Qp,getDiagramFromText:tg,initialize:Jp,getConfig:Ot,setConfig:Dc,getSiteConfig:Oc,updateSiteConfig:Tm,reset:p(()=>{pa()},"reset"),globalReset:p(()=>{pa(Mr)},"globalReset"),defaultConfig:Mr});Os(Ot().logLevel);pa(Ot());var X_=p((e,t,r)=>{A.warn(e),co(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"),rg=p(async function(e={querySelector:".mermaid"}){try{await Z_(e)}catch(t){if(co(t)&&A.error(t.str),Zt.parseError&&Zt.parseError(t),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Z_=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=sr.getConfig();A.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(A.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),sr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const n=new oe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(a)){if(A.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${n.next()}`;o=l.innerHTML,o=Lf(oe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=oe.detectInit(o);h&&A.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await sg(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){X_(u,s,Zt.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ig=p(function(e){sr.initialize(e)},"initialize"),K_=p(async function(e,t,r){A.warn("mermaid.init is deprecated. Please use run instead."),e&&ig(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await rg(i)},"init"),Q_=p(async(e,{lazyLoad:t=!0}={})=>{fn(),jn(...e),t===!1&&await w_()},"registerExternalDiagrams"),ag=p(function(){if(Zt.startOnLoad){const{startOnLoad:e}=sr.getConfig();e&&Zt.run().catch(t=>A.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ag,!1);var J_=p(function(e){Zt.parseError=e},"setParseErrorHandler"),qa=[],zn=!1,ng=p(async()=>{if(!zn){for(zn=!0;qa.length>0;){const e=qa.shift();if(e)try{await e()}catch(t){A.error("Error executing queue",t)}}zn=!1}},"executeQueue"),tA=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((n,o)=>{sr.parse(e,t).then(s=>{n(s),r(s)},s=>{var l;A.error("Error parsing",s),(l=Zt.parseError)==null||l.call(Zt,s),o(s),i(s)})}),"performCall");qa.push(a),ng().catch(i)}),"parse"),sg=p((e,t,r)=>new Promise((i,a)=>{const n=p(()=>new Promise((o,s)=>{sr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;A.error("Error parsing",l),(c=Zt.parseError)==null||c.call(Zt,l),s(l),a(l)})}),"performCall");qa.push(n),ng().catch(a)}),"render"),eA=p(()=>Object.keys(tr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Zt={startOnLoad:!0,mermaidAPI:sr,parse:tA,render:sg,init:K_,run:rg,registerExternalDiagrams:Q_,registerLayoutLoaders:bp,initialize:ig,parseError:void 0,contentLoaded:ag,setParseErrorHandler:J_,detectType:Ds,registerIconPacks:Wk,getRegisteredDiagramsMetadata:eA},rA=Zt;/*! Check if previously processed *//*!
255
- * Wait for document loaded before starting the execution
256
- */const MA=Object.freeze(Object.defineProperty({__proto__:null,default:rA},Symbol.toStringTag,{value:"Module"}));export{qc as $,pi as A,oA as B,Og as C,ey as D,ho as E,$c as F,Ot as G,Lw as H,Eb as I,IC as J,Go as K,an as L,mm as M,Hk as N,Er as O,hA as P,Dm as Q,Rs as R,al as S,Bw as T,Li as U,Hm as V,Bi as W,q as X,Z as Y,Cw as Z,p as _,Xm as a,t2 as a$,cA as a0,pv as a1,gp as a2,_A as a3,NC as a4,_t as a5,Ne as a6,to as a7,Wf as a8,hr as a9,yw as aA,nf as aB,Qa as aC,rn as aD,Ea as aE,of as aF,af as aG,G2 as aH,gw as aI,lw as aJ,X1 as aK,ro as aL,H2 as aM,bw as aN,$i as aO,Pr as aP,Ba as aQ,tw as aR,uS as aS,Fi as aT,Ma as aU,V2 as aV,Ku as aW,Q1 as aX,J1 as aY,Ge as aZ,Ll as a_,df as aa,hh as ab,gA as ac,U as ad,Yu as ae,nS as af,TA as ag,AA as ah,vA as ai,Y as aj,SA as ak,Wv as al,Rv as am,Dv as an,mw as ao,l2 as ap,cw as aq,eo as ar,sc as as,pA as at,dA as au,Di as av,Wk as aw,zk as ax,mA as ay,or as az,Vm as b,io as b0,K1 as b1,i2 as b2,Nr as b3,Pe as b4,Sl as b5,ao as b6,Ju as b7,Ms as b8,rA as b9,xw as ba,en as bb,lA as bc,MA as bd,lt as c,nt as d,Wc as e,St as f,Km as g,Me as h,te as i,UC as j,Rr as k,A as l,gf as m,uA as n,LA as o,Qm as p,Jm as q,BA as r,Zm as s,PC as t,oe as u,Fv as v,Fw as w,yA as x,Gm as y,fA as z};