@bigduu/lotus 2026.5.4 → 2026.5.7

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 (114) hide show
  1. package/dist/assets/{App-DJeBpzcc.css → App-D9R-_Pem.css} +1 -1
  2. package/dist/assets/App-DaOPoP5b.js +223 -0
  3. package/dist/assets/FeatureGuide-BNBq_PLn.js +1 -0
  4. package/dist/assets/SubAgentsPanel-CpKXYYmB.js +1 -0
  5. package/dist/assets/_baseUniq-DVrw3Tro.js +1 -0
  6. package/dist/assets/architectureDiagram-Q4EWVU46-BZE_2gaA.js +36 -0
  7. package/dist/assets/{blockDiagram-DXYQGD6D-B9y1uS9R.js → blockDiagram-DXYQGD6D-CI8uSrzU.js} +4 -4
  8. package/dist/assets/{c4Diagram-AHTNJAMY-BRoJcx0b.js → c4Diagram-AHTNJAMY-DYfj69gY.js} +2 -2
  9. package/dist/assets/chunk-4BX2VUAB-Cw-2rap4.js +1 -0
  10. package/dist/assets/{chunk-4TB4RGXK-D95yqR9H.js → chunk-4TB4RGXK-jxTPHq0D.js} +3 -3
  11. package/dist/assets/chunk-55IACEB6-DmAIxchJ.js +1 -0
  12. package/dist/assets/chunk-EDXVE4YY-FvClTRCF.js +1 -0
  13. package/dist/assets/{chunk-FMBD7UC4-B0r7CE0W.js → chunk-FMBD7UC4-Dv-f6b4O.js} +1 -1
  14. package/dist/assets/{chunk-OYMX7WX6-2_Im5UU8.js → chunk-OYMX7WX6-CUAa_Yz6.js} +3 -3
  15. package/dist/assets/chunk-QZHKN3VN-D1FDs1aQ.js +1 -0
  16. package/dist/assets/chunk-YZCP3GAM-C2iPLYG9.js +1 -0
  17. package/dist/assets/classDiagram-6PBFFD2Q-DVvX4wPS.js +1 -0
  18. package/dist/assets/classDiagram-v2-HSJHXN6E-DVvX4wPS.js +1 -0
  19. package/dist/assets/clone-DRAA6Q7k.js +1 -0
  20. package/dist/assets/cose-bilkent-S5V4N54A-CidaofdU.js +1 -0
  21. package/dist/assets/dagre-KV5264BT-B5okAMLc.js +4 -0
  22. package/dist/assets/diagram-5BDNPKRD-DqlBY-17.js +10 -0
  23. package/dist/assets/diagram-G4DWMVQ6-BuAFDD-X.js +24 -0
  24. package/dist/assets/diagram-MMDJMWI5-CFv_32_w.js +43 -0
  25. package/dist/assets/diagram-TYMM5635-CEU-9NCq.js +24 -0
  26. package/dist/assets/en-US-DLwJLted.js +3 -0
  27. package/dist/assets/{erDiagram-SMLLAGMA-DFjajcpE.js → erDiagram-SMLLAGMA-BGcZ-Hfc.js} +2 -2
  28. package/dist/assets/{flowDiagram-DWJPFMVM-CmdYRxD2.js → flowDiagram-DWJPFMVM-CCSeCjR1.js} +2 -2
  29. package/dist/assets/{ganttDiagram-T4ZO3ILL-BdeV_JQv.js → ganttDiagram-T4ZO3ILL-BqAoxnNO.js} +4 -4
  30. package/dist/assets/gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js +106 -0
  31. package/dist/assets/{graph-BZhdALnM.js → graph-BxbYGKIB.js} +1 -1
  32. package/dist/assets/index-AIUPRSCn.css +1 -0
  33. package/dist/assets/index-B1KXzc0W.js +8 -0
  34. package/dist/assets/index-B6OABT-M.css +1 -0
  35. package/dist/assets/index-BEkwZ-K8.js +1 -0
  36. package/dist/assets/index-BJC7afG8.js +1 -0
  37. package/dist/assets/index-BylZylqP.js +1 -0
  38. package/dist/assets/index-CLYKYSO0.css +1 -0
  39. package/dist/assets/index-CSqXTBwc.js +1 -0
  40. package/dist/assets/index-Cj9EZ-Bm.js +1 -0
  41. package/dist/assets/index-CucuFwVZ.css +1 -0
  42. package/dist/assets/index-D1aobBlB.js +1 -0
  43. package/dist/assets/index-DLBYvmHv.js +1 -0
  44. package/dist/assets/index-DNsNCcgt.css +1 -0
  45. package/dist/assets/index-DPYLJuvQ.js +1 -0
  46. package/dist/assets/index-D_SsVUqJ.js +21 -0
  47. package/dist/assets/index-DaK9qR94.js +1 -0
  48. package/dist/assets/index-Dkb_XCk_.js +1 -0
  49. package/dist/assets/index-RkUQwJrg.js +1 -0
  50. package/dist/assets/{index.es-Cn1_mau_.js → index.es-BhiHSeCT.js} +1 -1
  51. package/dist/assets/infoDiagram-42DDH7IO-Cemw9omR.js +2 -0
  52. package/dist/assets/{ishikawaDiagram-UXIWVN3A-mjLLHcYj.js → ishikawaDiagram-UXIWVN3A-BYRE-suN.js} +5 -5
  53. package/dist/assets/{journeyDiagram-VCZTEJTY-DKAns2QR.js → journeyDiagram-VCZTEJTY-BRkAfzxG.js} +3 -3
  54. package/dist/assets/{kanban-definition-6JOO6SKY-_8RYarrG.js → kanban-definition-6JOO6SKY-DrTcKNPa.js} +7 -7
  55. package/dist/assets/{layout-BJQnEdOR.js → layout-B2E_GeCC.js} +1 -1
  56. package/dist/assets/main-CuvqMgTQ.js +6 -0
  57. package/dist/assets/min-5KBdYKFY.js +1 -0
  58. package/dist/assets/{mindmap-definition-QFDTVHPH-B8Fqmn2S.js → mindmap-definition-QFDTVHPH-sq4qw8uy.js} +10 -10
  59. package/dist/assets/onboardingStorage-BVcEpmTy.js +1 -0
  60. package/dist/assets/pieDiagram-DEJITSTG-C8vOtX53.js +30 -0
  61. package/dist/assets/{quadrantDiagram-34T5L4WZ-ea-ItGVk.js → quadrantDiagram-34T5L4WZ-LV5yQE3M.js} +3 -3
  62. package/dist/assets/{requirementDiagram-MS252O5E-DoJ6ZjPU.js → requirementDiagram-MS252O5E-Bq6y8VCF.js} +4 -4
  63. package/dist/assets/sankeyDiagram-XADWPNL6-DvABiNaK.js +10 -0
  64. package/dist/assets/{sequenceDiagram-FGHM5R23-CnFMNFdv.js → sequenceDiagram-FGHM5R23-Bv9Ckauz.js} +2 -2
  65. package/dist/assets/stateDiagram-FHFEXIEX-CwYUsnc5.js +1 -0
  66. package/dist/assets/stateDiagram-v2-QKLJ7IA2-aegiqwuH.js +1 -0
  67. package/dist/assets/{timeline-definition-GMOUNBTQ-Dgx0wfE4.js → timeline-definition-GMOUNBTQ-BgidC49j.js} +3 -3
  68. package/dist/assets/{vendor-antd-BpW-8RO2.js → vendor-antd-DODjfilb.js} +85 -85
  69. package/dist/assets/vendor-charts-BYce7JXy.js +65 -0
  70. package/dist/assets/{vendor-markdown-yOmFo5hK.js → vendor-markdown-DzaXAW9Q.js} +23 -23
  71. package/dist/assets/vendor-mermaid-De-Yacw-.js +309 -0
  72. package/dist/assets/{vendor-pdf-xt0MLWhy.js → vendor-pdf-DHgAFQ2M.js} +4 -4
  73. package/dist/assets/vennDiagram-DHZGUBPP-Bzkbjibi.js +34 -0
  74. package/dist/assets/{wardley-RL74JXVD-DIGH9Gor.js → wardley-RL74JXVD-CBRp4POe.js} +2 -2
  75. package/dist/assets/{wardleyDiagram-NUSXRM2D-CMAuUksM.js → wardleyDiagram-NUSXRM2D-DAhT4-uz.js} +3 -3
  76. package/dist/assets/{xychartDiagram-5P7HB3ND-B4_9m2II.js → xychartDiagram-5P7HB3ND-CXfA4uSx.js} +4 -4
  77. package/dist/assets/zh-CN-B74Ip0pW.js +3 -0
  78. package/dist/favicon.png +0 -0
  79. package/dist/index.html +5 -4
  80. package/package.json +2 -1
  81. package/dist/assets/App-CIBUzKFV.js +0 -254
  82. package/dist/assets/_baseUniq-C-LHgpwK.js +0 -1
  83. package/dist/assets/architectureDiagram-Q4EWVU46-knT7SmxI.js +0 -36
  84. package/dist/assets/chunk-4BX2VUAB-Dg65rhkh.js +0 -1
  85. package/dist/assets/chunk-55IACEB6-CUbVVgja.js +0 -1
  86. package/dist/assets/chunk-EDXVE4YY-B_pb0EHW.js +0 -1
  87. package/dist/assets/chunk-QZHKN3VN-DbGqS_ab.js +0 -1
  88. package/dist/assets/chunk-YZCP3GAM-DdAJ9t55.js +0 -1
  89. package/dist/assets/classDiagram-6PBFFD2Q-hQqJj1FL.js +0 -1
  90. package/dist/assets/classDiagram-v2-HSJHXN6E-hQqJj1FL.js +0 -1
  91. package/dist/assets/clone-BnNFRj9O.js +0 -1
  92. package/dist/assets/cose-bilkent-S5V4N54A-BDxVvsWm.js +0 -1
  93. package/dist/assets/dagre-KV5264BT-vzGZtZ_w.js +0 -4
  94. package/dist/assets/diagram-5BDNPKRD-CGYBSS7a.js +0 -10
  95. package/dist/assets/diagram-G4DWMVQ6-DBeNrz6n.js +0 -24
  96. package/dist/assets/diagram-MMDJMWI5-CCt9wdnx.js +0 -43
  97. package/dist/assets/diagram-TYMM5635-B-q2z4os.js +0 -24
  98. package/dist/assets/gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js +0 -106
  99. package/dist/assets/index-8MhLoQym.js +0 -1
  100. package/dist/assets/index-BR-Jz13T.js +0 -1
  101. package/dist/assets/index-Byt6VrzO.js +0 -1
  102. package/dist/assets/index-CTVpEC_u.js +0 -1
  103. package/dist/assets/index-jIgpBMFj.js +0 -1
  104. package/dist/assets/infoDiagram-42DDH7IO-COrckp6q.js +0 -2
  105. package/dist/assets/main-_fs1sZGu.js +0 -10
  106. package/dist/assets/min-CEPPgGqS.js +0 -1
  107. package/dist/assets/pieDiagram-DEJITSTG-BCklzk2d.js +0 -30
  108. package/dist/assets/sankeyDiagram-XADWPNL6-CtYEK_8E.js +0 -10
  109. package/dist/assets/stateDiagram-FHFEXIEX-B_kOGWb-.js +0 -1
  110. package/dist/assets/stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js +0 -1
  111. package/dist/assets/vendor-charts-fIPNnfk-.js +0 -65
  112. package/dist/assets/vendor-mermaid-DA4JIJaA.js +0 -309
  113. package/dist/assets/vennDiagram-DHZGUBPP-DcJGrLhu.js +0 -34
  114. package/dist/vite.svg +0 -1
@@ -0,0 +1,309 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-B5okAMLc.js","./graph-BxbYGKIB.js","./_baseUniq-DVrw3Tro.js","./layout-B2E_GeCC.js","./min-5KBdYKFY.js","./clone-DRAA6Q7k.js","./vendor-antd-DODjfilb.js","./vendor-i18n-BNURlJ23.js","./cose-bilkent-S5V4N54A-CidaofdU.js","./cytoscape.esm-BiciSPf8.js","./c4Diagram-AHTNJAMY-DYfj69gY.js","./chunk-YZCP3GAM-C2iPLYG9.js","./flowDiagram-DWJPFMVM-CCSeCjR1.js","./chunk-FMBD7UC4-Dv-f6b4O.js","./chunk-55IACEB6-DmAIxchJ.js","./chunk-EDXVE4YY-FvClTRCF.js","./erDiagram-SMLLAGMA-BGcZ-Hfc.js","./gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js","./chunk-4BX2VUAB-Cw-2rap4.js","./chunk-QZHKN3VN-D1FDs1aQ.js","./wardley-RL74JXVD-CBRp4POe.js","./ganttDiagram-T4ZO3ILL-BqAoxnNO.js","./infoDiagram-42DDH7IO-Cemw9omR.js","./pieDiagram-DEJITSTG-C8vOtX53.js","./quadrantDiagram-34T5L4WZ-LV5yQE3M.js","./xychartDiagram-5P7HB3ND-CXfA4uSx.js","./requirementDiagram-MS252O5E-Bq6y8VCF.js","./sequenceDiagram-FGHM5R23-Bv9Ckauz.js","./classDiagram-6PBFFD2Q-DVvX4wPS.js","./chunk-4TB4RGXK-jxTPHq0D.js","./classDiagram-v2-HSJHXN6E-DVvX4wPS.js","./stateDiagram-FHFEXIEX-CwYUsnc5.js","./chunk-OYMX7WX6-CUAa_Yz6.js","./stateDiagram-v2-QKLJ7IA2-aegiqwuH.js","./journeyDiagram-VCZTEJTY-BRkAfzxG.js","./timeline-definition-GMOUNBTQ-BgidC49j.js","./mindmap-definition-QFDTVHPH-sq4qw8uy.js","./kanban-definition-6JOO6SKY-DrTcKNPa.js","./sankeyDiagram-XADWPNL6-DvABiNaK.js","./diagram-TYMM5635-CEU-9NCq.js","./diagram-MMDJMWI5-CFv_32_w.js","./blockDiagram-DXYQGD6D-CI8uSrzU.js","./diagram-5BDNPKRD-DqlBY-17.js","./architectureDiagram-Q4EWVU46-BZE_2gaA.js","./ishikawaDiagram-UXIWVN3A-BYRE-suN.js","./vennDiagram-DHZGUBPP-Bzkbjibi.js","./diagram-G4DWMVQ6-BuAFDD-X.js","./wardleyDiagram-NUSXRM2D-DAhT4-uz.js"])))=>i.map(i=>d[i]);
2
+ var mx=Object.defineProperty;var yx=(e,t,r)=>t in e?mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>yx(e,typeof t!="symbol"?t+"":t,r);import{d as Cx,s as xx,a as bx,c as kx}from"./vendor-antd-DODjfilb.js";const Tx="modulepreload",wx=function(e,t){return new URL(e,t).href},Rc={},yt=function(t,r,i){let a=Promise.resolve();if(r&&r.length>0){let n=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),h=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=n(r.map(c=>{if(c=wx(c,i),c in Rc)return;Rc[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(!!i)for(let p=s.length-1;p>=0;p--){const m=s[p];if(m.href===c&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const g=document.createElement("link");if(g.rel=u?"stylesheet":Tx,u||(g.as="script"),g.crossOrigin="",g.href=c,h&&g.setAttribute("nonce",h),document.head.appendChild(g),u)return new Promise((p,m)=>{g.addEventListener("load",p),g.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(n){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=n,window.dispatchEvent(s),!s.defaultPrevented)throw n}return a.then(n=>{for(const s of n||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};var cf=Object.defineProperty,y=(e,t)=>cf(e,"name",{value:t,configurable:!0}),_x=(e,t)=>{for(var r in t)cf(e,r,{get:t[r],enumerable:!0})},tr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:y((...e)=>{},"trace"),debug:y((...e)=>{},"debug"),info:y((...e)=>{},"info"),warn:y((...e)=>{},"warn"),error:y((...e)=>{},"error"),fatal:y((...e)=>{},"fatal")},nh=y(function(e="fatal"){let t=tr.fatal;typeof e=="string"?e.toLowerCase()in tr&&(t=tr[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=tr.fatal&&(P.fatal=console.error?console.error.bind(console,_e("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",_e("FATAL"))),t<=tr.error&&(P.error=console.error?console.error.bind(console,_e("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",_e("ERROR"))),t<=tr.warn&&(P.warn=console.warn?console.warn.bind(console,_e("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",_e("WARN"))),t<=tr.info&&(P.info=console.info?console.info.bind(console,_e("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",_e("INFO"))),t<=tr.debug&&(P.debug=console.debug?console.debug.bind(console,_e("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",_e("DEBUG"))),t<=tr.trace&&(P.trace=console.debug?console.debug.bind(console,_e("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",_e("TRACE")))},"setLogLevel"),_e=y(e=>`%c${Cx().format("ss.SSS")} : ${e} : `,"format");const Ao={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,o=2*r-a;switch(i){case"r":return Ao.hue2rgb(o,a,e+1/3)*255;case"g":return Ao.hue2rgb(o,a,e)*255;case"b":return Ao.hue2rgb(o,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),o=Math.min(e,t,r),n=(a+o)/2;if(i==="l")return n*100;if(a===o)return 0;const s=a-o,l=n>.5?s/(2-a-o):s/(a+o);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}}},Sx={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},vx={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},st={channel:Ao,lang:Sx,unit:vx},br={};for(let e=0;e<=255;e++)br[e]=st.unit.dec2hex(e);const Jt={ALL:0,RGB:1,HSL:2};class Bx{constructor(){this.type=Jt.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=Jt.ALL}is(t){return this.type===t}}class Lx{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Bx}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=st.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=st.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=st.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=st.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=st.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=st.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Jt.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Jt.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Jt.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Jt.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Jt.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Jt.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const $n=new Lx({r:0,g:0,b:0,a:0},"transparent"),_i={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(_i.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,o=a%4===0,n=a>4,s=n?1:17,l=n?8:4,h=o?0:-1,c=n?255:15;return $n.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:o?(i&c)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${br[Math.round(t)]}${br[Math.round(r)]}${br[Math.round(i)]}${br[Math.round(a*255)]}`:`#${br[Math.round(t)]}${br[Math.round(r)]}${br[Math.round(i)]}`}},zr={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(zr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return st.channel.clamp.h(parseFloat(r)*.9);case"rad":return st.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return st.channel.clamp.h(parseFloat(r)*360)}}return st.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(zr.re);if(!r)return;const[,i,a,o,n,s]=r;return $n.set({h:zr._hue2deg(i),s:st.channel.clamp.s(parseFloat(a)),l:st.channel.clamp.l(parseFloat(o)),a:n?st.channel.clamp.a(s?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%, ${a})`:`hsl(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%)`}},Ma={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=Ma.colors[e];if(t)return _i.parse(t)},stringify:e=>{const t=_i.stringify(e);for(const r in Ma.colors)if(Ma.colors[r]===t)return r}},ka={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(ka.re);if(!r)return;const[,i,a,o,n,s,l,h,c]=r;return $n.set({r:st.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:st.channel.clamp.g(n?parseFloat(o)*2.55:parseFloat(o)),b:st.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:h?st.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)}, ${st.lang.round(a)})`:`rgb(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)})`}},Re={format:{keyword:Ma,hex:_i,rgb:ka,rgba:ka,hsl:zr,hsla:zr},parse:e=>{if(typeof e!="string")return e;const t=_i.parse(e)||ka.parse(e)||zr.parse(e)||Ma.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Jt.HSL)||e.data.r===void 0?zr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ka.stringify(e):_i.stringify(e)},uf=(e,t)=>{const r=Re.parse(e);for(const i in t)r[i]=st.channel.clamp[i](t[i]);return Re.stringify(r)},Tr=(e,t,r=0,i=1)=>{if(typeof e!="number")return uf(e,{a:t});const a=$n.set({r:st.channel.clamp.r(e),g:st.channel.clamp.g(t),b:st.channel.clamp.b(r),a:st.channel.clamp.a(i)});return Re.stringify(a)},rO=(e,t)=>st.lang.round(Re.parse(e)[t]),Fx=e=>{const{r:t,g:r,b:i}=Re.parse(e),a=.2126*st.channel.toLinear(t)+.7152*st.channel.toLinear(r)+.0722*st.channel.toLinear(i);return st.lang.round(a)},Mx=e=>Fx(e)>=.5,qe=e=>!Mx(e),sh=(e,t,r)=>{const i=Re.parse(e),a=i[t],o=st.channel.clamp[t](a+r);return a!==o&&(i[t]=o),Re.stringify(i)},E=(e,t)=>sh(e,"l",t),A=(e,t)=>sh(e,"l",-t),iO=(e,t)=>sh(e,"a",-t),x=(e,t)=>{const r=Re.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return uf(e,i)},Ax=(e,t,r=50)=>{const{r:i,g:a,b:o,a:n}=Re.parse(e),{r:s,g:l,b:h,a:c}=Re.parse(t),u=r/100,f=u*2-1,d=n-c,p=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-p,C=i*p+s*m,b=a*p+l*m,k=o*p+h*m,w=n*u+c*(1-u);return Tr(C,b,k,w)},L=(e,t=100)=>{const r=Re.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ax(r,e,t)};/*! @license DOMPurify 3.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.1/LICENSE */const{entries:df,setPrototypeOf:Nc,isFrozen:Ex,getPrototypeOf:$x,getOwnPropertyDescriptor:Ox}=Object;let{freeze:he,seal:Le,create:Ci}=Object,{apply:tl,construct:el}=typeof Reflect<"u"&&Reflect;he||(he=function(t){return t});Le||(Le=function(t){return t});tl||(tl=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return t.apply(r,a)});el||(el=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 ia=Dt(Array.prototype.forEach),Ix=Dt(Array.prototype.lastIndexOf),qc=Dt(Array.prototype.pop),aa=Dt(Array.prototype.push),Dx=Dt(Array.prototype.splice),oe=Array.isArray,Ta=Dt(String.prototype.toLowerCase),Ts=Dt(String.prototype.toString),zc=Dt(String.prototype.match),gi=Dt(String.prototype.replace),Wc=Dt(String.prototype.indexOf),Px=Dt(String.prototype.trim),Rx=Dt(Number.prototype.toString),Nx=Dt(Boolean.prototype.toString),Hc=typeof BigInt>"u"?null:Dt(BigInt.prototype.toString),Uc=typeof Symbol>"u"?null:Dt(Symbol.prototype.toString),Et=Dt(Object.prototype.hasOwnProperty),oa=Dt(Object.prototype.toString),Gt=Dt(RegExp.prototype.test),po=qx(TypeError);function Dt(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 tl(e,t,i)}}function qx(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return el(e,r)}}function ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ta;if(Nc&&Nc(e,null),!oe(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const o=r(a);o!==a&&(Ex(t)||(t[i]=o),a=o)}e[a]=!0}return e}function zx(e){for(let t=0;t<e.length;t++)Et(e,t)||(e[t]=null);return e}function fe(e){const t=Ci(null);for(const[r,i]of df(e))Et(e,r)&&(oe(i)?t[r]=zx(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=fe(i):t[r]=i);return t}function Wx(e){switch(typeof e){case"string":return e;case"number":return Rx(e);case"boolean":return Nx(e);case"bigint":return Hc?Hc(e):"0";case"symbol":return Uc?Uc(e):"Symbol()";case"undefined":return oa(e);case"function":case"object":{if(e===null)return oa(e);const t=e,r=xi(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:oa(i)}return oa(e)}default:return oa(e)}}function xi(e,t){for(;e!==null;){const i=Ox(e,t);if(i){if(i.get)return Dt(i.get);if(typeof i.value=="function")return Dt(i.value)}e=$x(e)}function r(){return null}return r}function Hx(e){try{return Gt(e,""),!0}catch{return!1}}const Yc=he(["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"]),ws=he(["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"]),_s=he(["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"]),Ux=he(["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"]),Ss=he(["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"]),Yx=he(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),jc=he(["#text"]),Gc=he(["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"]),vs=he(["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"]),Xc=he(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mo=he(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jx=Le(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Gx=Le(/<%[\w\W]*|[\w\W]*%>/gm),Xx=Le(/\$\{[\w\W]*/gm),Vx=Le(/^data-[\-\w.\u00B7-\uFFFF]+$/),Zx=Le(/^aria-[\-\w]+$/),ff=Le(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qx=Le(/^(?:\w+script|data):/i),Kx=Le(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gf=Le(/^html$/i),Jx=Le(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vc=Object.freeze({__proto__:null,ARIA_ATTR:Zx,ATTR_WHITESPACE:Kx,CUSTOM_ELEMENT:Jx,DATA_ATTR:Vx,DOCTYPE_NAME:gf,ERB_EXPR:Gx,IS_ALLOWED_URI:ff,IS_SCRIPT_OR_DATA:Qx,MUSTACHE_EXPR:jx,TMPLIT_EXPR:Xx});const na={element:1,text:3,progressingInstruction:7,comment:8,document:9},t1=function(){return typeof window>"u"?null:window},e1=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 o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Zc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t1();const t=et=>pf(et);if(t.version="3.4.1",t.removed=[],!e||!e.document||e.document.nodeType!==na.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:n,Node:s,Element:l,NodeFilter:h,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,p=xi(g,"cloneNode"),m=xi(g,"remove"),C=xi(g,"nextSibling"),b=xi(g,"childNodes"),k=xi(g,"parentNode");if(typeof n=="function"){const et=r.createElement("template");et.content&&et.content.ownerDocument&&(r=et.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:T,createDocumentFragment:B,getElementsByTagName:R}=r,{importNode:$}=i;let F=Zc();t.isSupported=typeof df=="function"&&typeof k=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:M,TMPLIT_EXPR:O,DATA_ATTR:W,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:X}=Vc;let{IS_ALLOWED_URI:lt}=Vc,ht=null;const Ft=ct({},[...Yc,...ws,..._s,...Ss,...jc]);let gt=null;const _t=ct({},[...Gc,...vs,...Xc,...mo]);let it=Object.seal(Ci(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}})),St=null,Ht=null;const Pt=Object.seal(Ci(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,U=!0,j=!1,I=!0,pt=!1,dt=!0,kt=!1,Ot=!1,Te=!1,ye=!1,co=!1,uo=!1,bc=!0,kc=!1;const Tc="user-content-";let us=!0,ea=!1,ui={},We=null;const ds=ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let wc=null;const _c=ct({},["audio","video","img","source","image","track"]);let fs=null;const Sc=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fo="http://www.w3.org/1998/Math/MathML",go="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let di=He,gs=!1,ps=null;const hx=ct({},[fo,go,He],Ts);let ms=ct({},["mi","mo","mn","ms","mtext"]),ys=ct({},["annotation-xml"]);const cx=ct({},["title","style","font","a","script"]);let ra=null;const ux=["application/xhtml+xml","text/html"],dx="text/html";let Rt=null,fi=null;const fx=r.createElement("form"),vc=function(v){return v instanceof RegExp||v instanceof Function},Cs=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fi&&fi===v)return;(!v||typeof v!="object")&&(v={}),v=fe(v),ra=ux.indexOf(v.PARSER_MEDIA_TYPE)===-1?dx:v.PARSER_MEDIA_TYPE,Rt=ra==="application/xhtml+xml"?Ts:Ta,ht=Et(v,"ALLOWED_TAGS")&&oe(v.ALLOWED_TAGS)?ct({},v.ALLOWED_TAGS,Rt):Ft,gt=Et(v,"ALLOWED_ATTR")&&oe(v.ALLOWED_ATTR)?ct({},v.ALLOWED_ATTR,Rt):_t,ps=Et(v,"ALLOWED_NAMESPACES")&&oe(v.ALLOWED_NAMESPACES)?ct({},v.ALLOWED_NAMESPACES,Ts):hx,fs=Et(v,"ADD_URI_SAFE_ATTR")&&oe(v.ADD_URI_SAFE_ATTR)?ct(fe(Sc),v.ADD_URI_SAFE_ATTR,Rt):Sc,wc=Et(v,"ADD_DATA_URI_TAGS")&&oe(v.ADD_DATA_URI_TAGS)?ct(fe(_c),v.ADD_DATA_URI_TAGS,Rt):_c,We=Et(v,"FORBID_CONTENTS")&&oe(v.FORBID_CONTENTS)?ct({},v.FORBID_CONTENTS,Rt):ds,St=Et(v,"FORBID_TAGS")&&oe(v.FORBID_TAGS)?ct({},v.FORBID_TAGS,Rt):fe({}),Ht=Et(v,"FORBID_ATTR")&&oe(v.FORBID_ATTR)?ct({},v.FORBID_ATTR,Rt):fe({}),ui=Et(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?fe(v.USE_PROFILES):v.USE_PROFILES:!1,Y=v.ALLOW_ARIA_ATTR!==!1,U=v.ALLOW_DATA_ATTR!==!1,j=v.ALLOW_UNKNOWN_PROTOCOLS||!1,I=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pt=v.SAFE_FOR_TEMPLATES||!1,dt=v.SAFE_FOR_XML!==!1,kt=v.WHOLE_DOCUMENT||!1,ye=v.RETURN_DOM||!1,co=v.RETURN_DOM_FRAGMENT||!1,uo=v.RETURN_TRUSTED_TYPE||!1,Te=v.FORCE_BODY||!1,bc=v.SANITIZE_DOM!==!1,kc=v.SANITIZE_NAMED_PROPS||!1,us=v.KEEP_CONTENT!==!1,ea=v.IN_PLACE||!1,lt=Hx(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:ff,di=typeof v.NAMESPACE=="string"?v.NAMESPACE:He,ms=Et(v,"MATHML_TEXT_INTEGRATION_POINTS")&&v.MATHML_TEXT_INTEGRATION_POINTS&&typeof v.MATHML_TEXT_INTEGRATION_POINTS=="object"?fe(v.MATHML_TEXT_INTEGRATION_POINTS):ct({},["mi","mo","mn","ms","mtext"]),ys=Et(v,"HTML_INTEGRATION_POINTS")&&v.HTML_INTEGRATION_POINTS&&typeof v.HTML_INTEGRATION_POINTS=="object"?fe(v.HTML_INTEGRATION_POINTS):ct({},["annotation-xml"]);const z=Et(v,"CUSTOM_ELEMENT_HANDLING")&&v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING=="object"?fe(v.CUSTOM_ELEMENT_HANDLING):Ci(null);if(it=Ci(null),Et(z,"tagNameCheck")&&vc(z.tagNameCheck)&&(it.tagNameCheck=z.tagNameCheck),Et(z,"attributeNameCheck")&&vc(z.attributeNameCheck)&&(it.attributeNameCheck=z.attributeNameCheck),Et(z,"allowCustomizedBuiltInElements")&&typeof z.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=z.allowCustomizedBuiltInElements),pt&&(U=!1),co&&(ye=!0),ui&&(ht=ct({},jc),gt=Ci(null),ui.html===!0&&(ct(ht,Yc),ct(gt,Gc)),ui.svg===!0&&(ct(ht,ws),ct(gt,vs),ct(gt,mo)),ui.svgFilters===!0&&(ct(ht,_s),ct(gt,vs),ct(gt,mo)),ui.mathMl===!0&&(ct(ht,Ss),ct(gt,Xc),ct(gt,mo))),Pt.tagCheck=null,Pt.attributeCheck=null,Et(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?Pt.tagCheck=v.ADD_TAGS:oe(v.ADD_TAGS)&&(ht===Ft&&(ht=fe(ht)),ct(ht,v.ADD_TAGS,Rt))),Et(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?Pt.attributeCheck=v.ADD_ATTR:oe(v.ADD_ATTR)&&(gt===_t&&(gt=fe(gt)),ct(gt,v.ADD_ATTR,Rt))),Et(v,"ADD_URI_SAFE_ATTR")&&oe(v.ADD_URI_SAFE_ATTR)&&ct(fs,v.ADD_URI_SAFE_ATTR,Rt),Et(v,"FORBID_CONTENTS")&&oe(v.FORBID_CONTENTS)&&(We===ds&&(We=fe(We)),ct(We,v.FORBID_CONTENTS,Rt)),Et(v,"ADD_FORBID_CONTENTS")&&oe(v.ADD_FORBID_CONTENTS)&&(We===ds&&(We=fe(We)),ct(We,v.ADD_FORBID_CONTENTS,Rt)),us&&(ht["#text"]=!0),kt&&ct(ht,["html","head","body"]),ht.table&&(ct(ht,["tbody"]),delete St.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw po('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw po('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=v.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else w===void 0&&(w=e1(d,a)),w!==null&&typeof _=="string"&&(_=w.createHTML(""));he&&he(v),fi=v},Bc=ct({},[...ws,..._s,...Ux]),Lc=ct({},[...Ss,...Yx]),gx=function(v){let z=k(v);(!z||!z.tagName)&&(z={namespaceURI:di,tagName:"template"});const Z=Ta(v.tagName),Bt=Ta(z.tagName);return ps[v.namespaceURI]?v.namespaceURI===go?z.namespaceURI===He?Z==="svg":z.namespaceURI===fo?Z==="svg"&&(Bt==="annotation-xml"||ms[Bt]):!!Bc[Z]:v.namespaceURI===fo?z.namespaceURI===He?Z==="math":z.namespaceURI===go?Z==="math"&&ys[Bt]:!!Lc[Z]:v.namespaceURI===He?z.namespaceURI===go&&!ys[Bt]||z.namespaceURI===fo&&!ms[Bt]?!1:!Lc[Z]&&(cx[Z]||!Bc[Z]):!!(ra==="application/xhtml+xml"&&ps[v.namespaceURI]):!1},Me=function(v){aa(t.removed,{element:v});try{k(v).removeChild(v)}catch{m(v)}},Ir=function(v,z){try{aa(t.removed,{attribute:z.getAttributeNode(v),from:z})}catch{aa(t.removed,{attribute:null,from:z})}if(z.removeAttribute(v),v==="is")if(ye||co)try{Me(z)}catch{}else try{z.setAttribute(v,"")}catch{}},Fc=function(v){let z=null,Z=null;if(Te)v="<remove></remove>"+v;else{const It=zc(v,/^[\r\n\t ]+/);Z=It&&It[0]}ra==="application/xhtml+xml"&&di===He&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");const Bt=w?w.createHTML(v):v;if(di===He)try{z=new f().parseFromString(Bt,ra)}catch{}if(!z||!z.documentElement){z=S.createDocument(di,"template",null);try{z.documentElement.innerHTML=gs?_:Bt}catch{}}const Qt=z.body||z.documentElement;return v&&Z&&Qt.insertBefore(r.createTextNode(Z),Qt.childNodes[0]||null),di===He?R.call(z,kt?"html":"body")[0]:kt?z.documentElement:Qt},Mc=function(v){return T.call(v.ownerDocument||v,v,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},xs=function(v){return v instanceof u&&(typeof v.nodeName!="string"||typeof v.textContent!="string"||typeof v.removeChild!="function"||!(v.attributes instanceof c)||typeof v.removeAttribute!="function"||typeof v.setAttribute!="function"||typeof v.namespaceURI!="string"||typeof v.insertBefore!="function"||typeof v.hasChildNodes!="function")},bs=function(v){return typeof s=="function"&&v instanceof s};function Je(et,v,z){ia(et,Z=>{Z.call(t,v,z,fi)})}const Ac=function(v){let z=null;if(Je(F.beforeSanitizeElements,v,null),xs(v))return Me(v),!0;const Z=Rt(v.nodeName);if(Je(F.uponSanitizeElement,v,{tagName:Z,allowedTags:ht}),dt&&v.hasChildNodes()&&!bs(v.firstElementChild)&&Gt(/<[/\w!]/g,v.innerHTML)&&Gt(/<[/\w!]/g,v.textContent)||dt&&v.namespaceURI===He&&Z==="style"&&bs(v.firstElementChild)||v.nodeType===na.progressingInstruction||dt&&v.nodeType===na.comment&&Gt(/<[/\w]/g,v.data))return Me(v),!0;if(St[Z]||!(Pt.tagCheck instanceof Function&&Pt.tagCheck(Z))&&!ht[Z]){if(!St[Z]&&$c(Z)&&(it.tagNameCheck instanceof RegExp&&Gt(it.tagNameCheck,Z)||it.tagNameCheck instanceof Function&&it.tagNameCheck(Z)))return!1;if(us&&!We[Z]){const Bt=k(v)||v.parentNode,Qt=b(v)||v.childNodes;if(Qt&&Bt){const It=Qt.length;for(let ue=It-1;ue>=0;--ue){const we=p(Qt[ue],!0);Bt.insertBefore(we,C(v))}}}return Me(v),!0}return v instanceof l&&!gx(v)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Gt(/<\/no(script|embed|frames)/i,v.innerHTML)?(Me(v),!0):(pt&&v.nodeType===na.text&&(z=v.textContent,ia([N,M,O],Bt=>{z=gi(z,Bt," ")}),v.textContent!==z&&(aa(t.removed,{element:v.cloneNode()}),v.textContent=z)),Je(F.afterSanitizeElements,v,null),!1)},Ec=function(v,z,Z){if(Ht[z]||bc&&(z==="id"||z==="name")&&(Z in r||Z in fx))return!1;if(!(U&&!Ht[z]&&Gt(W,z))){if(!(Y&&Gt(q,z))){if(!(Pt.attributeCheck instanceof Function&&Pt.attributeCheck(z,v))){if(!gt[z]||Ht[z]){if(!($c(v)&&(it.tagNameCheck instanceof RegExp&&Gt(it.tagNameCheck,v)||it.tagNameCheck instanceof Function&&it.tagNameCheck(v))&&(it.attributeNameCheck instanceof RegExp&&Gt(it.attributeNameCheck,z)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(z,v))||z==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Gt(it.tagNameCheck,Z)||it.tagNameCheck instanceof Function&&it.tagNameCheck(Z))))return!1}else if(!fs[z]){if(!Gt(lt,gi(Z,D,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&v!=="script"&&Wc(Z,"data:")===0&&wc[v])){if(!(j&&!Gt(H,gi(Z,D,"")))){if(Z)return!1}}}}}}}return!0},px=ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),$c=function(v){return!px[Ta(v)]&&Gt(X,v)},Oc=function(v){Je(F.beforeSanitizeAttributes,v,null);const{attributes:z}=v;if(!z||xs(v))return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gt,forceKeepAttr:void 0};let Bt=z.length;for(;Bt--;){const Qt=z[Bt],{name:It,namespaceURI:ue,value:we}=Qt,Ae=Rt(It),ks=we;let Ut=It==="value"?ks:Px(ks);if(Z.attrName=Ae,Z.attrValue=Ut,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Je(F.uponSanitizeAttribute,v,Z),Ut=Z.attrValue,kc&&(Ae==="id"||Ae==="name")&&Wc(Ut,Tc)!==0&&(Ir(It,v),Ut=Tc+Ut),dt&&Gt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ut)){Ir(It,v);continue}if(Ae==="attributename"&&zc(Ut,"href")){Ir(It,v);continue}if(Z.forceKeepAttr)continue;if(!Z.keepAttr){Ir(It,v);continue}if(!I&&Gt(/\/>/i,Ut)){Ir(It,v);continue}pt&&ia([N,M,O],Pc=>{Ut=gi(Ut,Pc," ")});const Dc=Rt(v.nodeName);if(!Ec(Dc,Ae,Ut)){Ir(It,v);continue}if(w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!ue)switch(d.getAttributeType(Dc,Ae)){case"TrustedHTML":{Ut=w.createHTML(Ut);break}case"TrustedScriptURL":{Ut=w.createScriptURL(Ut);break}}if(Ut!==ks)try{ue?v.setAttributeNS(ue,It,Ut):v.setAttribute(It,Ut),xs(v)?Me(v):qc(t.removed)}catch{Ir(It,v)}}Je(F.afterSanitizeAttributes,v,null)},Ic=function(v){let z=null;const Z=Mc(v);for(Je(F.beforeSanitizeShadowDOM,v,null);z=Z.nextNode();)Je(F.uponSanitizeShadowNode,z,null),Ac(z),Oc(z),z.content instanceof o&&Ic(z.content);Je(F.afterSanitizeShadowDOM,v,null)};return t.sanitize=function(et){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,Z=null,Bt=null,Qt=null;if(gs=!et,gs&&(et="<!-->"),typeof et!="string"&&!bs(et)&&(et=Wx(et),typeof et!="string"))throw po("dirty is not a string, aborting");if(!t.isSupported)return et;if(Ot||Cs(v),t.removed=[],typeof et=="string"&&(ea=!1),ea){const we=et.nodeName;if(typeof we=="string"){const Ae=Rt(we);if(!ht[Ae]||St[Ae])throw po("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof s)z=Fc("<!---->"),Z=z.ownerDocument.importNode(et,!0),Z.nodeType===na.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?z=Z:z.appendChild(Z);else{if(!ye&&!pt&&!kt&&et.indexOf("<")===-1)return w&&uo?w.createHTML(et):et;if(z=Fc(et),!z)return ye?null:uo?_:""}z&&Te&&Me(z.firstChild);const It=Mc(ea?et:z);for(;Bt=It.nextNode();)Ac(Bt),Oc(Bt),Bt.content instanceof o&&Ic(Bt.content);if(ea)return et;if(ye){if(pt){z.normalize();let we=z.innerHTML;ia([N,M,O],Ae=>{we=gi(we,Ae," ")}),z.innerHTML=we}if(co)for(Qt=B.call(z.ownerDocument);z.firstChild;)Qt.appendChild(z.firstChild);else Qt=z;return(gt.shadowroot||gt.shadowrootmode)&&(Qt=$.call(i,Qt,!0)),Qt}let ue=kt?z.outerHTML:z.innerHTML;return kt&&ht["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&Gt(gf,z.ownerDocument.doctype.name)&&(ue="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
3
+ `+ue),pt&&ia([N,M,O],we=>{ue=gi(ue,we," ")}),w&&uo?w.createHTML(ue):ue},t.setConfig=function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(et),Ot=!0},t.clearConfig=function(){fi=null,Ot=!1},t.isValidAttribute=function(et,v,z){fi||Cs({});const Z=Rt(et),Bt=Rt(v);return Ec(Z,Bt,z)},t.addHook=function(et,v){typeof v=="function"&&aa(F[et],v)},t.removeHook=function(et,v){if(v!==void 0){const z=Ix(F[et],v);return z===-1?void 0:Dx(F[et],z,1)[0]}return qc(F[et])},t.removeHooks=function(et){F[et]=[]},t.removeAllHooks=function(){F=Zc()},t}var Xr=pf();const aO=Object.freeze(Object.defineProperty({__proto__:null,default:Xr},Symbol.toStringTag,{value:"Module"}));var mf=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Aa=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,r1=/\s*%%.*\n/gm,Li,yf=(Li=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},y(Li,"UnknownDiagramError"),Li),Vr={},lh=y(function(e,t){e=e.replace(mf,"").replace(Aa,"").replace(r1,`
4
+ `);for(const[r,{detector:i}]of Object.entries(Vr))if(i(e,t))return r;throw new yf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),rl=y((...e)=>{for(const{id:t,detector:r,loader:i}of e)Cf(t,r,i)},"registerLazyLoadedDiagrams"),Cf=y((e,t,r)=>{Vr[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),Vr[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),i1=y(e=>Vr[e].loader,"getDiagramLoader"),il=y((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>il(e,o,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),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(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=il(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),qt=il,Ve="#ffffff",Ze="#f2f2f2",nt=y((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Fi,a1=(Fi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,a,o,n,s,l,h,c,u,f,d,g,p,m,C,b,k,w,_,S,T;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||E(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10)):(this.rowOdd=this.rowOdd||E(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||E(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=A(this["cScale"+B],75);else for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=A(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||L(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this.darkMode?this["cScalePeer"+B]=this["cScalePeer"+B]||E(this["cScale"+B],10):this["cScalePeer"+B]=this["cScalePeer"+B]||A(this["cScale"+B],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{h:180,s:-15,l:t*(5+B*3)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{h:180,s:-15,l:t*(8+B*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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,dataLabelColor:((g=this.xyChart)==null?void 0:g.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((k=this.xyChart)==null?void 0:k.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((T=this.xyChart)==null?void 0:T.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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Fi,"Theme"),Fi),o1=y(e=>{const t=new a1;return t.calculate(e),t},"getThemeVariables"),Mi,n1=(Mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Tr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=A("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=Tr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Tr(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||E(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,a,o,n,s,l,h,c,u,f,d,g,p,m,C,b,k,w,_,S;this.secondBkg=E(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=E(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=E(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=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||L(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScalePeer"+T]=this["cScalePeer"+T]||E(this["cScale"+T],10);for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-10+T*4)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-7+T*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??E(this["cScale"+T],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.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?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=E(this.secondaryColor,20),this.git1=E(this.pie2||this.secondaryColor,20),this.git2=E(this.pie3||this.tertiaryColor,20),this.git3=E(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=E(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=E(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=E(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=E(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||E(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||E(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]})}},y(Mi,"Theme"),Mi),s1=y(e=>{const t=new n1;return t.calculate(e),t},"getThemeVariables"),Ai,l1=(Ai=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Tr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,a,o,n,s,l,h,c,u,f,d,g,p,m,C,b,k,w,_,S;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=A(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,l:-(7+T*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||E(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||E(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||A(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Ai,"Theme"),Ai),h1=y(e=>{const t=new l1;return t.calculate(e),t},"getThemeVariables"),Ei,c1=(Ei=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=E("#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=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,a,o,n,s,l,h,c,u,f,d,g,p,m,C,b,k,w,_,S;this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=A(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(8+T*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||E(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||E(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((s=this.radar)==null?void 0:s.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Ei,"Theme"),Ei),u1=y(e=>{const t=new c1;return t.calculate(e),t},"getThemeVariables"),$i,d1=($i=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=E(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(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=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||E(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,a,o,n,s,l,h,c,u,f,d,g,p,m,C,b,k,w,_,S;this.secondBkg=E(this.contrast,55),this.border2=this.contrast,this.actorBorder=E(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||L(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||E(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{l:-(8+T*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=E(this.contrast,30),this.sectionBkgColor2=E(this.contrast,30),this.taskBorderColor=A(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=E(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??this["cScale"+T];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.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=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y($i,"Theme"),$i),f1=y(e=>{const t=new d1;return t.calculate(e),t},"getThemeVariables"),Oi,g1=(Oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,n,s,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||E(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Oi,"Theme"),Oi),p1=y(e=>{const t=new g1;return t.calculate(e),t},"getThemeVariables"),Ii,m1=(Ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(L("#323D47"),10),this.border1="#ccc",this.border2=Tr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,a,o,n,s,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||E(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Ii,"Theme"),Ii),y1=y(e=>{const t=new m1;return t.calculate(e),t},"getThemeVariables"),Di,C1=(Di=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=nt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,n,s,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||E(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=A(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Di,"Theme"),Di),x1=y(e=>{const t=new C1;return t.calculate(e),t},"getThemeVariables"),Pi,b1=(Pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(L("#323D47"),10),this.border1="#ccc",this.border2=Tr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,a,o,n,s,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||E(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=A(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Pi,"Theme"),Pi),k1=y(e=>{const t=new b1;return t.calculate(e),t},"getThemeVariables"),Ri,T1=(Ri=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=nt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,n,s,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?A(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||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||E(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||L(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Ri,"Theme"),Ri),w1=y(e=>{const t=new T1;return t.calculate(e),t},"getThemeVariables"),Ni,_1=(Ni=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=E(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=nt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=nt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=E(L("#323D47"),10),this.border1="#ccc",this.border2=Tr(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,a,o,n,s,l,h,c,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||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||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||E(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=A(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||qe(this.quadrant1Fill)?E(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ve,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ze}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]})}},y(Ni,"Theme"),Ni),S1=y(e=>{const t=new _1;return t.calculate(e),t},"getThemeVariables"),lr={base:{getThemeVariables:o1},dark:{getThemeVariables:s1},default:{getThemeVariables:h1},forest:{getThemeVariables:u1},neutral:{getThemeVariables:f1},neo:{getThemeVariables:p1},"neo-dark":{getThemeVariables:y1},redux:{getThemeVariables:x1},"redux-dark":{getThemeVariables:k1},"redux-color":{getThemeVariables:w1},"redux-dark-color":{getThemeVariables:S1}},Ce={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},xf={...Ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:lr.default.getThemeVariables(),sequence:{...Ce.sequence,messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:y(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:y(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ce.c4,useWidth:void 0,personFont:y(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ce.flowchart,inheritDir:!1},external_personFont:y(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:y(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:y(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:y(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:y(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:y(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:y(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:y(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:y(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:y(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:y(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:y(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:y(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:y(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:y(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:y(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:y(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:y(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:y(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:y(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ce.pie,useWidth:984},xyChart:{...Ce.xyChart,useWidth:void 0},requirement:{...Ce.requirement,useWidth:void 0},packet:{...Ce.packet},treeView:{...Ce.treeView,useWidth:void 0},radar:{...Ce.radar},ishikawa:{...Ce.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ce.venn}},bf=y((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...bf(e[i],"")]:[...r,t+i],[]),"keyify"),v1=new Set(bf(xf,"")),kf=xf,zo=y(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>zo(t));return}for(const t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!v1.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),zo(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(P.debug("sanitizing css option",t),e[t]=B1(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]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),B1=y(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"),Wi=Object.freeze(kf),pr=y(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),pe=qt({},Wi),Wo,Zr=[],Ea=qt({},Wi),On=y((e,t)=>{let r=qt({},e),i={};for(const a of t)_f(a),i=qt(i,a);if(r=qt(r,i),i.theme&&i.theme in lr){const a=qt({},Wo),o=qt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in lr&&(r.themeVariables=lr[r.theme].getThemeVariables(o))}return Ea=r,vf(Ea),Ea},"updateCurrentConfig"),L1=y(e=>(pe=qt({},Wi),pe=qt(pe,e),e.theme&&lr[e.theme]&&(pe.themeVariables=lr[e.theme].getThemeVariables(e.themeVariables)),On(pe,Zr),pe),"setSiteConfig"),F1=y(e=>{Wo=qt({},e)},"saveConfigFromInitialize"),M1=y(e=>(pe=qt(pe,e),On(pe,Zr),pe),"updateSiteConfig"),Tf=y(()=>qt({},pe),"getSiteConfig"),wf=y(e=>(vf(e),qt(Ea,e),Mt()),"setConfig"),Mt=y(()=>qt({},Ea),"getConfig"),_f=y(e=>{e&&(["secure",...pe.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&_f(e[t])}))},"sanitize"),A1=y(e=>{var t;zo(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Zr.push(e),On(pe,Zr)},"addDirective"),Ho=y((e=pe)=>{Zr=[],On(e,Zr)},"reset"),E1={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Qc={},Sf=y(e=>{Qc[e]||(P.warn(E1[e]),Qc[e]=!0)},"issueWarning"),vf=y(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Sf("LAZY_LOAD_DEPRECATED")},"checkConfig"),oO=y(()=>{let e={};Wo&&(e=qt(e,Wo));for(const t of Zr)e=qt(e,t);return e},"getUserDefinedConfig"),ce=y(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Sf("FLOWCHART_HTML_LABELS_DEPRECATED"),pr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Za=/<br\s*\/?>/gi,$1=y(e=>e?Ff(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),O1=(()=>{let e=!1;return()=>{e||(Bf(),e=!0)}})();function Bf(){const e="data-temp-href-target";Xr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Xr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}y(Bf,"setupDompurifyHooks");var Lf=y(e=>(O1(),Xr.sanitize(e)),"removeScript"),Kc=y((e,t)=>{if(ce(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Lf(e):r!=="loose"&&(e=Ff(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=R1(e))}return e},"sanitizeMore"),Ne=y((e,t)=>e&&(t.dompurifyConfig?e=Xr.sanitize(Kc(e,t),t.dompurifyConfig).toString():e=Xr.sanitize(Kc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),I1=y((e,t)=>typeof e=="string"?Ne(e,t):e.flat().map(r=>Ne(r,t)),"sanitizeTextOrArray"),D1=y(e=>Za.test(e),"hasBreaks"),P1=y(e=>e.split(Za),"splitBreaks"),R1=y(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ff=y(e=>e.replace(Za,"#br#"),"breakToPlaceholder"),N1=y(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),q1=y(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),z1=y(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Jc=y(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 o=t[i-1],n=t[i+1];W1(o,n)&&(a=o+","+n,i++,r.pop())}r.push(H1(a))}return r.join("")},"parseGenericTypes"),al=y((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),W1=y((e,t)=>{const r=al(e,"~"),i=al(t,"~");return r===1&&i===1},"shouldCombineSets"),H1=y(e=>{const t=al(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("~"),o=i.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),tu=y(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ol=/\$\$(.*)\$\$/g,Da=y(e=>{var t;return(((t=e.match(ol))==null?void 0:t.length)??0)>0},"hasKatex"),nO=y(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Mf(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"),U1=y(async(e,t)=>{if(!Da(e))return e;if(!(tu()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ol,"MathML is unsupported in this environment.");{const{default:r}=await yt(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!tu()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Za).map(a=>Da(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(ol,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Mf=y(async(e,t)=>Ne(await U1(e,t),t),"renderKatexSanitized"),Qa={getRows:$1,sanitizeText:Ne,sanitizeTextOrArray:I1,hasBreaks:D1,splitBreaks:P1,lineBreakRegex:Za,removeScript:Lf,getUrl:N1,evaluate:pr,getMax:q1,getMin:z1},Y1=y(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),j1=y(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"),Af=y(function(e,t,r,i){const a=j1(t,r,i);Y1(e,a)},"configureSvgSize"),G1=y(function(e,t,r,i){const a=t.node().getBBox(),o=a.width,n=a.height;P.info(`SVG bounds: ${o}x${n}`,a);let s=0,l=0;P.info(`Graph bounds: ${s}x${l}`,e),s=o+r*2,l=n+r*2,P.info(`Calculated bounds: ${s}x${l}`),Af(t,l,s,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Eo={},X1=y((e,t,r,i)=>{let a="";return e in Eo&&Eo[e]?a=Eo[e]({...r,svgId:i}):P.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: ${r.strokeWidth??1}px;
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
+ ${a}
78
+ .node .neo-node {
79
+ stroke: ${r.nodeBorder};
80
+ }
81
+
82
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
83
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
84
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
85
+ }
86
+
87
+
88
+ [data-look="neo"].node path {
89
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
90
+ stroke-width: ${r.strokeWidth??1}px;
91
+ }
92
+
93
+ [data-look="neo"].node .outer-path {
94
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
95
+ }
96
+
97
+ [data-look="neo"].node .neo-line path {
98
+ stroke: ${r.nodeBorder};
99
+ filter: none;
100
+ }
101
+
102
+ [data-look="neo"].node circle{
103
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
104
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
105
+ }
106
+
107
+ [data-look="neo"].node circle .state-start{
108
+ fill: #000000;
109
+ }
110
+
111
+ [data-look="neo"].icon-shape .icon {
112
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
113
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon-neo path {
117
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ ${t}
122
+ `},"getStyles"),V1=y((e,t)=>{t!==void 0&&(Eo[e]=t)},"addStylesForDiagram"),Z1=X1,Ef={};_x(Ef,{clear:()=>Q1,getAccDescription:()=>eb,getAccTitle:()=>J1,getDiagramTitle:()=>ib,setAccDescription:()=>tb,setAccTitle:()=>K1,setDiagramTitle:()=>rb});var hh="",ch="",uh="",dh=y(e=>Ne(e,Mt()),"sanitizeText"),Q1=y(()=>{hh="",uh="",ch=""},"clear"),K1=y(e=>{hh=dh(e).replace(/^\s+/g,"")},"setAccTitle"),J1=y(()=>hh,"getAccTitle"),tb=y(e=>{uh=dh(e).replace(/\n\s+/g,`
123
+ `)},"setAccDescription"),eb=y(()=>uh,"getAccDescription"),rb=y(e=>{ch=dh(e)},"setDiagramTitle"),ib=y(()=>ch,"getDiagramTitle"),eu=P,ab=nh,Ct=Mt,sO=wf,lO=Wi,fh=y(e=>Ne(e,Ct()),"sanitizeText"),ob=G1,nb=y(()=>Ef,"getCommonDb"),Uo={},Yo=y((e,t,r)=>{var i;Uo[e]&&eu.warn(`Diagram with id ${e} already registered. Overwriting.`),Uo[e]=t,r&&Cf(e,r),V1(e,t.styles),(i=t.injectUtils)==null||i.call(t,eu,ab,Ct,fh,ob,nb(),()=>{})},"registerDiagram"),nl=y(e=>{if(e in Uo)return Uo[e];throw new sb(e)},"getDiagram"),qi,sb=(qi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},y(qi,"DiagramNotFoundError"),qi);function wr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function lb(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gh(e){let t,r,i;e.length!==2?(t=wr,r=(s,l)=>wr(e(s),l),i=(s,l)=>e(s)-l):(t=e===wr||e===lb?e:hb,r=e,i=e);function a(s,l,h=0,c=s.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;r(s[u],l)<0?h=u+1:c=u}while(h<c)}return h}function o(s,l,h=0,c=s.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;r(s[u],l)<=0?h=u+1:c=u}while(h<c)}return h}function n(s,l,h=0,c=s.length){const u=a(s,l,h,c-1);return u>h&&i(s[u-1],l)>-i(s[u],l)?u-1:u}return{left:a,center:n,right:o}}function hb(){return 0}function $f(e){return e===null?NaN:+e}function*cb(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ub=gh(wr),Ka=ub.right;gh($f).center;class ru extends Map{constructor(t,r=gb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,a]of t)this.set(i,a)}get(t){return super.get(iu(this,t))}has(t){return super.has(iu(this,t))}set(t,r){return super.set(db(this,t),r)}delete(t){return super.delete(fb(this,t))}}function iu({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function db({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function fb({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function gb(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pb(e=wr){if(e===wr)return Of;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const i=e(t,r);return i||i===0?i:(e(r,r)===0)-(e(t,t)===0)}}function Of(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const mb=Math.sqrt(50),yb=Math.sqrt(10),Cb=Math.sqrt(2);function jo(e,t,r){const i=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(i)),o=i/Math.pow(10,a),n=o>=mb?10:o>=yb?5:o>=Cb?2:1;let s,l,h;return a<0?(h=Math.pow(10,-a)/n,s=Math.round(e*h),l=Math.round(t*h),s/h<e&&++s,l/h>t&&--l,h=-h):(h=Math.pow(10,a)*n,s=Math.round(e/h),l=Math.round(t/h),s*h<e&&++s,l*h>t&&--l),l<s&&.5<=r&&r<2?jo(e,t,r*2):[s,l,h]}function sl(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[a,o,n]=i?jo(t,e,r):jo(e,t,r);if(!(o>=a))return[];const s=o-a+1,l=new Array(s);if(i)if(n<0)for(let h=0;h<s;++h)l[h]=(o-h)/-n;else for(let h=0;h<s;++h)l[h]=(o-h)*n;else if(n<0)for(let h=0;h<s;++h)l[h]=(a+h)/-n;else for(let h=0;h<s;++h)l[h]=(a+h)*n;return l}function ll(e,t,r){return t=+t,e=+e,r=+r,jo(e,t,r)[2]}function hl(e,t,r){t=+t,e=+e,r=+r;const i=t<e,a=i?ll(t,e,r):ll(e,t,r);return(i?-1:1)*(a<0?1/-a:a)}function au(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function ou(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function If(e,t,r=0,i=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(e.length-1,i)),!(r<=t&&t<=i))return e;for(a=a===void 0?Of:pb(a);i>r;){if(i-r>600){const l=i-r+1,h=t-r+1,c=Math.log(l),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(l-u)/l)*(h-l/2<0?-1:1),d=Math.max(r,Math.floor(t-h*u/l+f)),g=Math.min(i,Math.floor(t+(l-h)*u/l+f));If(e,t,d,g,a)}const o=e[t];let n=r,s=i;for(sa(e,r,t),a(e[i],o)>0&&sa(e,r,i);n<s;){for(sa(e,n,s),++n,--s;a(e[n],o)<0;)++n;for(;a(e[s],o)>0;)--s}a(e[r],o)===0?sa(e,r,s):(++s,sa(e,s,i)),s<=t&&(r=s+1),t<=s&&(i=s-1)}return e}function sa(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function xb(e,t,r){if(e=Float64Array.from(cb(e)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return ou(e);if(t>=1)return au(e);var i,a=(i-1)*t,o=Math.floor(a),n=au(If(e,o).subarray(0,o+1)),s=ou(e.subarray(o+1));return n+(s-n)*(a-o)}}function bb(e,t,r=$f){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+r(e[0],0,e);if(t>=1)return+r(e[i-1],i-1,e);var i,a=(i-1)*t,o=Math.floor(a),n=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return n+(s-n)*(a-o)}}function kb(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var i=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++i<a;)o[i]=e+i*r;return o}function Tb(e){return e}var $o=1,Bs=2,cl=3,yo=4,nu=1e-6;function wb(e){return"translate("+e+",0)"}function _b(e){return"translate(0,"+e+")"}function Sb(e){return t=>+e(t)}function vb(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function Bb(){return!this.__axis}function Df(e,t){var r=[],i=null,a=null,o=6,n=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===$o||e===yo?-1:1,c=e===yo||e===Bs?"x":"y",u=e===$o||e===cl?wb:_b;function f(d){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),p=a??(t.tickFormat?t.tickFormat.apply(t,r):Tb),m=Math.max(o,0)+s,C=t.range(),b=+C[0]+l,k=+C[C.length-1]+l,w=(t.bandwidth?vb:Sb)(t.copy(),l),_=d.selection?d.selection():d,S=_.selectAll(".domain").data([null]),T=_.selectAll(".tick").data(g,t).order(),B=T.exit(),R=T.enter().append("g").attr("class","tick"),$=T.select("line"),F=T.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(R),$=$.merge(R.append("line").attr("stroke","currentColor").attr(c+"2",h*o)),F=F.merge(R.append("text").attr("fill","currentColor").attr(c,h*m).attr("dy",e===$o?"0em":e===cl?"0.71em":"0.32em")),d!==_&&(S=S.transition(d),T=T.transition(d),$=$.transition(d),F=F.transition(d),B=B.transition(d).attr("opacity",nu).attr("transform",function(N){return isFinite(N=w(N))?u(N+l):this.getAttribute("transform")}),R.attr("opacity",nu).attr("transform",function(N){var M=this.parentNode.__axis;return u((M&&isFinite(M=M(N))?M:w(N))+l)})),B.remove(),S.attr("d",e===yo||e===Bs?n?"M"+h*n+","+b+"H"+l+"V"+k+"H"+h*n:"M"+l+","+b+"V"+k:n?"M"+b+","+h*n+"V"+l+"H"+k+"V"+h*n:"M"+b+","+l+"H"+k),T.attr("opacity",1).attr("transform",function(N){return u(w(N)+l)}),$.attr(c+"2",h*o),F.attr(c,h*m).text(p),_.filter(Bb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Bs?"start":e===yo?"end":"middle"),_.each(function(){this.__axis=w})}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?(o=n=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(n=+d,f):n},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function hO(e){return Df($o,e)}function cO(e){return Df(cl,e)}var Lb={value:()=>{}};function Pf(){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 Oo(r)}function Oo(e){this._=e}function Fb(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}})}Oo.prototype=Pf.prototype={constructor:Oo,on:function(e,t){var r=this._,i=Fb(e+"",r),a,o=-1,n=i.length;if(arguments.length<2){for(;++o<n;)if((a=(e=i[o]).type)&&(a=Mb(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<n;)if(a=(e=i[o]).type)r[a]=su(r[a],e.name,t);else if(t==null)for(a in r)r[a]=su(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 Oo(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[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,o=i.length;a<o;++a)i[a].value.apply(t,r)}};function Mb(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function su(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=Lb,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ul="http://www.w3.org/1999/xhtml";const lu={svg:"http://www.w3.org/2000/svg",xhtml:ul,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function In(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),lu.hasOwnProperty(t)?{space:lu[t],local:e}:e}function Ab(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ul&&t.documentElement.namespaceURI===ul?t.createElement(e):t.createElementNS(r,e)}}function Eb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rf(e){var t=In(e);return(t.local?Eb:Ab)(t)}function $b(){}function ph(e){return e==null?$b:function(){return this.querySelector(e)}}function Ob(e){typeof e!="function"&&(e=ph(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var o=t[a],n=o.length,s=i[a]=new Array(n),l,h,c=0;c<n;++c)(l=o[c])&&(h=e.call(l,l.__data__,c,o))&&("__data__"in l&&(h.__data__=l.__data__),s[c]=h);return new ke(i,this._parents)}function Ib(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Db(){return[]}function Nf(e){return e==null?Db:function(){return this.querySelectorAll(e)}}function Pb(e){return function(){return Ib(e.apply(this,arguments))}}function Rb(e){typeof e=="function"?e=Pb(e):e=Nf(e);for(var t=this._groups,r=t.length,i=[],a=[],o=0;o<r;++o)for(var n=t[o],s=n.length,l,h=0;h<s;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),a.push(l));return new ke(i,a)}function qf(e){return function(){return this.matches(e)}}function zf(e){return function(t){return t.matches(e)}}var Nb=Array.prototype.find;function qb(e){return function(){return Nb.call(this.children,e)}}function zb(){return this.firstElementChild}function Wb(e){return this.select(e==null?zb:qb(typeof e=="function"?e:zf(e)))}var Hb=Array.prototype.filter;function Ub(){return Array.from(this.children)}function Yb(e){return function(){return Hb.call(this.children,e)}}function jb(e){return this.selectAll(e==null?Ub:Yb(typeof e=="function"?e:zf(e)))}function Gb(e){typeof e!="function"&&(e=qf(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var o=t[a],n=o.length,s=i[a]=[],l,h=0;h<n;++h)(l=o[h])&&e.call(l,l.__data__,h,o)&&s.push(l);return new ke(i,this._parents)}function Wf(e){return new Array(e.length)}function Xb(){return new ke(this._enter||this._groups.map(Wf),this._parents)}function Go(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Go.prototype={constructor:Go,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 Vb(e){return function(){return e}}function Zb(e,t,r,i,a,o){for(var n=0,s,l=t.length,h=o.length;n<h;++n)(s=t[n])?(s.__data__=o[n],i[n]=s):r[n]=new Go(e,o[n]);for(;n<l;++n)(s=t[n])&&(a[n]=s)}function Qb(e,t,r,i,a,o,n){var s,l,h=new Map,c=t.length,u=o.length,f=new Array(c),d;for(s=0;s<c;++s)(l=t[s])&&(f[s]=d=n.call(l,l.__data__,s,t)+"",h.has(d)?a[s]=l:h.set(d,l));for(s=0;s<u;++s)d=n.call(e,o[s],s,o)+"",(l=h.get(d))?(i[s]=l,l.__data__=o[s],h.delete(d)):r[s]=new Go(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&h.get(f[s])===l&&(a[s]=l)}function Kb(e){return e.__data__}function Jb(e,t){if(!arguments.length)return Array.from(this,Kb);var r=t?Qb:Zb,i=this._parents,a=this._groups;typeof e!="function"&&(e=Vb(e));for(var o=a.length,n=new Array(o),s=new Array(o),l=new Array(o),h=0;h<o;++h){var c=i[h],u=a[h],f=u.length,d=tk(e.call(c,c&&c.__data__,h,i)),g=d.length,p=s[h]=new Array(g),m=n[h]=new Array(g),C=l[h]=new Array(f);r(c,u,p,m,C,d,t);for(var b=0,k=0,w,_;b<g;++b)if(w=p[b]){for(b>=k&&(k=b+1);!(_=m[k])&&++k<g;);w._next=_||null}}return n=new ke(n,i),n._enter=s,n._exit=l,n}function tk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ek(){return new ke(this._exit||this._groups.map(Wf),this._parents)}function rk(e,t,r){var i=this.enter(),a=this,o=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?o.remove():r(o),i&&a?i.merge(a).order():a}function ik(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,o=i.length,n=Math.min(a,o),s=new Array(a),l=0;l<n;++l)for(var h=r[l],c=i[l],u=h.length,f=s[l]=new Array(u),d,g=0;g<u;++g)(d=h[g]||c[g])&&(f[g]=d);for(;l<a;++l)s[l]=r[l];return new ke(s,this._parents)}function ak(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,o=i[a],n;--a>=0;)(n=i[a])&&(o&&n.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(n,o),o=n);return this}function ok(e){e||(e=nk);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),o=0;o<i;++o){for(var n=r[o],s=n.length,l=a[o]=new Array(s),h,c=0;c<s;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new ke(a,this._parents).order()}function nk(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sk(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lk(){return Array.from(this)}function hk(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,o=i.length;a<o;++a){var n=i[a];if(n)return n}return null}function ck(){let e=0;for(const t of this)++e;return e}function uk(){return!this.node()}function dk(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],o=0,n=a.length,s;o<n;++o)(s=a[o])&&e.call(s,s.__data__,o,a);return this}function fk(e){return function(){this.removeAttribute(e)}}function gk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pk(e,t){return function(){this.setAttribute(e,t)}}function mk(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yk(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Ck(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 xk(e,t){var r=In(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?gk:fk:typeof t=="function"?r.local?Ck:yk:r.local?mk:pk)(r,t))}function Hf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bk(e){return function(){this.style.removeProperty(e)}}function kk(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Tk(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function wk(e,t,r){return arguments.length>1?this.each((t==null?bk:typeof t=="function"?Tk:kk)(e,t,r??"")):Hi(this.node(),e)}function Hi(e,t){return e.style.getPropertyValue(t)||Hf(e).getComputedStyle(e,null).getPropertyValue(t)}function _k(e){return function(){delete this[e]}}function Sk(e,t){return function(){this[e]=t}}function vk(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bk(e,t){return arguments.length>1?this.each((t==null?_k:typeof t=="function"?vk:Sk)(e,t)):this.node()[e]}function Uf(e){return e.trim().split(/^|\s+/)}function mh(e){return e.classList||new Yf(e)}function Yf(e){this._node=e,this._names=Uf(e.getAttribute("class")||"")}Yf.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 jf(e,t){for(var r=mh(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Gf(e,t){for(var r=mh(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function Lk(e){return function(){jf(this,e)}}function Fk(e){return function(){Gf(this,e)}}function Mk(e,t){return function(){(t.apply(this,arguments)?jf:Gf)(this,e)}}function Ak(e,t){var r=Uf(e+"");if(arguments.length<2){for(var i=mh(this.node()),a=-1,o=r.length;++a<o;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Mk:t?Lk:Fk)(r,t))}function Ek(){this.textContent=""}function $k(e){return function(){this.textContent=e}}function Ok(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ik(e){return arguments.length?this.each(e==null?Ek:(typeof e=="function"?Ok:$k)(e)):this.node().textContent}function Dk(){this.innerHTML=""}function Pk(e){return function(){this.innerHTML=e}}function Rk(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Nk(e){return arguments.length?this.each(e==null?Dk:(typeof e=="function"?Rk:Pk)(e)):this.node().innerHTML}function qk(){this.nextSibling&&this.parentNode.appendChild(this)}function zk(){return this.each(qk)}function Wk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hk(){return this.each(Wk)}function Uk(e){var t=typeof e=="function"?e:Rf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Yk(){return null}function jk(e,t){var r=typeof e=="function"?e:Rf(e),i=t==null?Yk:typeof t=="function"?t:ph(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Gk(){var e=this.parentNode;e&&e.removeChild(this)}function Xk(){return this.each(Gk)}function Vk(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zk(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qk(e){return this.select(e?Zk:Vk)}function Kk(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jk(e){return function(t){e.call(this,t,this.__data__)}}function t2(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 e2(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,o;r<a;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function r2(e,t,r){return function(){var i=this.__on,a,o=Jk(t);if(i){for(var n=0,s=i.length;n<s;++n)if((a=i[n]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=t;return}}this.addEventListener(e.type,o,r),a={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(a):this.__on=[a]}}function i2(e,t,r){var i=t2(e+""),a,o=i.length,n;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,h=s.length,c;l<h;++l)for(a=0,c=s[l];a<o;++a)if((n=i[a]).type===c.type&&n.name===c.name)return c.value}return}for(s=t?r2:e2,a=0;a<o;++a)this.each(s(i[a],t,r));return this}function Xf(e,t,r){var i=Hf(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 a2(e,t){return function(){return Xf(this,e,t)}}function o2(e,t){return function(){return Xf(this,e,t.apply(this,arguments))}}function n2(e,t){return this.each((typeof t=="function"?o2:a2)(e,t))}function*s2(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,o=i.length,n;a<o;++a)(n=i[a])&&(yield n)}var Vf=[null];function ke(e,t){this._groups=e,this._parents=t}function Ja(){return new ke([[document.documentElement]],Vf)}function l2(){return this}ke.prototype=Ja.prototype={constructor:ke,select:Ob,selectAll:Rb,selectChild:Wb,selectChildren:jb,filter:Gb,data:Jb,enter:Xb,exit:ek,join:rk,merge:ik,selection:l2,order:ak,sort:ok,call:sk,nodes:lk,node:hk,size:ck,empty:uk,each:dk,attr:xk,style:wk,property:Bk,classed:Ak,text:Ik,html:Nk,raise:zk,lower:Hk,append:Uk,insert:jk,remove:Xk,clone:Qk,datum:Kk,on:i2,dispatch:n2,[Symbol.iterator]:s2};function ft(e){return typeof e=="string"?new ke([[document.querySelector(e)]],[document.documentElement]):new ke([[e]],Vf)}function to(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Dn(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ai(){}var Pa=.7,Xo=1/Pa,Si="\\s*([+-]?\\d+)\\s*",Ra="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h2=/^#([0-9a-f]{3,8})$/,c2=new RegExp(`^rgb\\(${Si},${Si},${Si}\\)$`),u2=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),d2=new RegExp(`^rgba\\(${Si},${Si},${Si},${Ra}\\)$`),f2=new RegExp(`^rgba\\(${je},${je},${je},${Ra}\\)$`),g2=new RegExp(`^hsl\\(${Ra},${je},${je}\\)$`),p2=new RegExp(`^hsla\\(${Ra},${je},${je},${Ra}\\)$`),hu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};to(ai,Qr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cu,formatHex:cu,formatHex8:m2,formatHsl:y2,formatRgb:uu,toString:uu});function cu(){return this.rgb().formatHex()}function m2(){return this.rgb().formatHex8()}function y2(){return Qf(this).formatHsl()}function uu(){return this.rgb().formatRgb()}function Qr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=h2.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?du(t):r===3?new re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Co(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Co(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=c2.exec(e))?new re(t[1],t[2],t[3],1):(t=u2.exec(e))?new re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=d2.exec(e))?Co(t[1],t[2],t[3],t[4]):(t=f2.exec(e))?Co(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=g2.exec(e))?pu(t[1],t[2]/100,t[3]/100,1):(t=p2.exec(e))?pu(t[1],t[2]/100,t[3]/100,t[4]):hu.hasOwnProperty(e)?du(hu[e]):e==="transparent"?new re(NaN,NaN,NaN,0):null}function du(e){return new re(e>>16&255,e>>8&255,e&255,1)}function Co(e,t,r,i){return i<=0&&(e=t=r=NaN),new re(e,t,r,i)}function Zf(e){return e instanceof ai||(e=Qr(e)),e?(e=e.rgb(),new re(e.r,e.g,e.b,e.opacity)):new re}function dl(e,t,r,i){return arguments.length===1?Zf(e):new re(e,t,r,i??1)}function re(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}to(re,dl,Dn(ai,{brighter(e){return e=e==null?Xo:Math.pow(Xo,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pa:Math.pow(Pa,e),new re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new re(jr(this.r),jr(this.g),jr(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fu,formatHex:fu,formatHex8:C2,formatRgb:gu,toString:gu}));function fu(){return`#${Wr(this.r)}${Wr(this.g)}${Wr(this.b)}`}function C2(){return`#${Wr(this.r)}${Wr(this.g)}${Wr(this.b)}${Wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gu(){const e=Vo(this.opacity);return`${e===1?"rgb(":"rgba("}${jr(this.r)}, ${jr(this.g)}, ${jr(this.b)}${e===1?")":`, ${e})`}`}function Vo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wr(e){return e=jr(e),(e<16?"0":"")+e.toString(16)}function pu(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ie(e,t,r,i)}function Qf(e){if(e instanceof Ie)return new Ie(e.h,e.s,e.l,e.opacity);if(e instanceof ai||(e=Qr(e)),!e)return new Ie;if(e instanceof Ie)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),o=Math.max(t,r,i),n=NaN,s=o-a,l=(o+a)/2;return s?(t===o?n=(r-i)/s+(r<i)*6:r===o?n=(i-t)/s+2:n=(t-r)/s+4,s/=l<.5?o+a:2-o-a,n*=60):s=l>0&&l<1?0:n,new Ie(n,s,l,e.opacity)}function x2(e,t,r,i){return arguments.length===1?Qf(e):new Ie(e,t,r,i??1)}function Ie(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}to(Ie,x2,Dn(ai,{brighter(e){return e=e==null?Xo:Math.pow(Xo,e),new Ie(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pa:Math.pow(Pa,e),new Ie(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,a=2*r-i;return new re(Ls(e>=240?e-240:e+120,a,i),Ls(e,a,i),Ls(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new Ie(mu(this.h),xo(this.s),xo(this.l),Vo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vo(this.opacity);return`${e===1?"hsl(":"hsla("}${mu(this.h)}, ${xo(this.s)*100}%, ${xo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mu(e){return e=(e||0)%360,e<0?e+360:e}function xo(e){return Math.max(0,Math.min(1,e||0))}function Ls(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const b2=Math.PI/180,k2=180/Math.PI,Zo=18,Kf=.96422,Jf=1,tg=.82521,eg=4/29,vi=6/29,rg=3*vi*vi,T2=vi*vi*vi;function ig(e){if(e instanceof Ge)return new Ge(e.l,e.a,e.b,e.opacity);if(e instanceof or)return ag(e);e instanceof re||(e=Zf(e));var t=Es(e.r),r=Es(e.g),i=Es(e.b),a=Fs((.2225045*t+.7168786*r+.0606169*i)/Jf),o,n;return t===r&&r===i?o=n=a:(o=Fs((.4360747*t+.3850649*r+.1430804*i)/Kf),n=Fs((.0139322*t+.0971045*r+.7141733*i)/tg)),new Ge(116*a-16,500*(o-a),200*(a-n),e.opacity)}function w2(e,t,r,i){return arguments.length===1?ig(e):new Ge(e,t,r,i??1)}function Ge(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}to(Ge,w2,Dn(ai,{brighter(e){return new Ge(this.l+Zo*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ge(this.l-Zo*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Kf*Ms(t),e=Jf*Ms(e),r=tg*Ms(r),new re(As(3.1338561*t-1.6168667*e-.4906146*r),As(-.9787684*t+1.9161415*e+.033454*r),As(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function Fs(e){return e>T2?Math.pow(e,1/3):e/rg+eg}function Ms(e){return e>vi?e*e*e:rg*(e-eg)}function As(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Es(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _2(e){if(e instanceof or)return new or(e.h,e.c,e.l,e.opacity);if(e instanceof Ge||(e=ig(e)),e.a===0&&e.b===0)return new or(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*k2;return new or(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fl(e,t,r,i){return arguments.length===1?_2(e):new or(e,t,r,i??1)}function or(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function ag(e){if(isNaN(e.h))return new Ge(e.l,0,0,e.opacity);var t=e.h*b2;return new Ge(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}to(or,fl,Dn(ai,{brighter(e){return new or(this.h,this.c,this.l+Zo*(e??1),this.opacity)},darker(e){return new or(this.h,this.c,this.l-Zo*(e??1),this.opacity)},rgb(){return ag(this).rgb()}}));const Pn=e=>()=>e;function og(e,t){return function(r){return e+r*t}}function S2(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function v2(e,t){var r=t-e;return r?og(e,r>180||r<-180?r-360*Math.round(r/360):r):Pn(isNaN(e)?t:e)}function B2(e){return(e=+e)==1?$a:function(t,r){return r-t?S2(t,r,e):Pn(isNaN(t)?r:t)}}function $a(e,t){var r=t-e;return r?og(e,r):Pn(isNaN(e)?t:e)}const Qo=function e(t){var r=B2(t);function i(a,o){var n=r((a=dl(a)).r,(o=dl(o)).r),s=r(a.g,o.g),l=r(a.b,o.b),h=$a(a.opacity,o.opacity);return function(c){return a.r=n(c),a.g=s(c),a.b=l(c),a.opacity=h(c),a+""}}return i.gamma=e,i}(1);function L2(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),a;return function(o){for(a=0;a<r;++a)i[a]=e[a]*(1-o)+t[a]*o;return i}}function F2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function M2(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r),n;for(n=0;n<i;++n)a[n]=Zi(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(s){for(n=0;n<i;++n)o[n]=a[n](s);return o}}function A2(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Ee(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function E2(e,t){var r={},i={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Zi(e[a],t[a]):i[a]=t[a];return function(o){for(a in r)i[a]=r[a](o);return i}}var gl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$s=new RegExp(gl.source,"g");function $2(e){return function(){return e}}function O2(e){return function(t){return e(t)+""}}function ng(e,t){var r=gl.lastIndex=$s.lastIndex=0,i,a,o,n=-1,s=[],l=[];for(e=e+"",t=t+"";(i=gl.exec(e))&&(a=$s.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),s[n]?s[n]+=o:s[++n]=o),(i=i[0])===(a=a[0])?s[n]?s[n]+=a:s[++n]=a:(s[++n]=null,l.push({i:n,x:Ee(i,a)})),r=$s.lastIndex;return r<t.length&&(o=t.slice(r),s[n]?s[n]+=o:s[++n]=o),s.length<2?l[0]?O2(l[0].x):$2(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)s[(u=l[c]).i]=u.x(h);return s.join("")})}function Zi(e,t){var r=typeof t,i;return t==null||r==="boolean"?Pn(t):(r==="number"?Ee:r==="string"?(i=Qr(t))?(t=i,Qo):ng:t instanceof Qr?Qo:t instanceof Date?A2:F2(t)?L2:Array.isArray(t)?M2:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?E2:Ee)(e,t)}function yh(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var yu=180/Math.PI,pl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function sg(e,t,r,i,a,o){var n,s,l;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,n=-n),{translateX:a,translateY:o,rotate:Math.atan2(t,e)*yu,skewX:Math.atan(l)*yu,scaleX:n,scaleY:s}}var bo;function I2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pl:sg(t.a,t.b,t.c,t.d,t.e,t.f)}function D2(e){return e==null||(bo||(bo=document.createElementNS("http://www.w3.org/2000/svg","g")),bo.setAttribute("transform",e),!(e=bo.transform.baseVal.consolidate()))?pl:(e=e.matrix,sg(e.a,e.b,e.c,e.d,e.e,e.f))}function lg(e,t,r,i){function a(h){return h.length?h.pop()+" ":""}function o(h,c,u,f,d,g){if(h!==u||c!==f){var p=d.push("translate(",null,t,null,r);g.push({i:p-4,x:Ee(h,u)},{i:p-2,x:Ee(c,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function n(h,c,u,f){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),f.push({i:u.push(a(u)+"rotate(",null,i)-2,x:Ee(h,c)})):c&&u.push(a(u)+"rotate("+c+i)}function s(h,c,u,f){h!==c?f.push({i:u.push(a(u)+"skewX(",null,i)-2,x:Ee(h,c)}):c&&u.push(a(u)+"skewX("+c+i)}function l(h,c,u,f,d,g){if(h!==u||c!==f){var p=d.push(a(d)+"scale(",null,",",null,")");g.push({i:p-4,x:Ee(h,u)},{i:p-2,x:Ee(c,f)})}else(u!==1||f!==1)&&d.push(a(d)+"scale("+u+","+f+")")}return function(h,c){var u=[],f=[];return h=e(h),c=e(c),o(h.translateX,h.translateY,c.translateX,c.translateY,u,f),n(h.rotate,c.rotate,u,f),s(h.skewX,c.skewX,u,f),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,f),h=c=null,function(d){for(var g=-1,p=f.length,m;++g<p;)u[(m=f[g]).i]=m.x(d);return u.join("")}}}var P2=lg(I2,"px, ","px)","deg)"),R2=lg(D2,", ",")",")");function N2(e){return function(t,r){var i=e((t=fl(t)).h,(r=fl(r)).h),a=$a(t.c,r.c),o=$a(t.l,r.l),n=$a(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=a(s),t.l=o(s),t.opacity=n(s),t+""}}}const uO=N2(v2);function q2(e,t){t===void 0&&(t=e,e=Zi);for(var r=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);r<i;)o[r]=e(a,a=t[++r]);return function(n){var s=Math.max(0,Math.min(i-1,Math.floor(n*=i)));return o[s](n-s)}}var Ui=0,wa=0,la=0,hg=1e3,Ko,_a,Jo=0,Kr=0,Rn=0,Na=typeof performance=="object"&&performance.now?performance:Date,cg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ch(){return Kr||(cg(z2),Kr=Na.now()+Rn)}function z2(){Kr=0}function tn(){this._call=this._time=this._next=null}tn.prototype=ug.prototype={constructor:tn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ch():+r)+(t==null?0:+t),!this._next&&_a!==this&&(_a?_a._next=this:Ko=this,_a=this),this._call=e,this._time=r,ml()},stop:function(){this._call&&(this._call=null,this._time=1/0,ml())}};function ug(e,t,r){var i=new tn;return i.restart(e,t,r),i}function W2(){Ch(),++Ui;for(var e=Ko,t;e;)(t=Kr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ui}function Cu(){Kr=(Jo=Na.now())+Rn,Ui=wa=0;try{W2()}finally{Ui=0,U2(),Kr=0}}function H2(){var e=Na.now(),t=e-Jo;t>hg&&(Rn-=t,Jo=e)}function U2(){for(var e,t=Ko,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:Ko=r);_a=e,ml(i)}function ml(e){if(!Ui){wa&&(wa=clearTimeout(wa));var t=e-Kr;t>24?(e<1/0&&(wa=setTimeout(Cu,e-Na.now()-Rn)),la&&(la=clearInterval(la))):(la||(Jo=Na.now(),la=setInterval(H2,hg)),Ui=1,cg(Cu))}}function xu(e,t,r){var i=new tn;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Y2=Pf("start","end","cancel","interrupt"),j2=[],dg=0,bu=1,yl=2,Io=3,ku=4,Cl=5,Do=6;function Nn(e,t,r,i,a,o){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;G2(e,r,{name:t,index:i,group:a,on:Y2,tween:j2,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dg})}function xh(e,t){var r=ze(e,t);if(r.state>dg)throw new Error("too late; already scheduled");return r}function Qe(e,t){var r=ze(e,t);if(r.state>Io)throw new Error("too late; already running");return r}function ze(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function G2(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=ug(o,0,r.time);function o(h){r.state=bu,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var c,u,f,d;if(r.state!==bu)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Io)return xu(n);d.state===ku?(d.state=Do,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Do,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(xu(function(){r.state===Io&&(r.state=ku,r.timer.restart(s,r.delay,r.time),s(h))}),r.state=yl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===yl){for(r.state=Io,a=new Array(f=r.tween.length),c=0,u=-1;c<f;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function s(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Cl,1),u=-1,f=a.length;++u<f;)a[u].call(e,c);r.state===Cl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Do,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function X2(e,t){var r=e.__transition,i,a,o=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){o=!1;continue}a=i.state>yl&&i.state<Cl,i.state=Do,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}o&&delete e.__transition}}function V2(e){return this.each(function(){X2(this,e)})}function Z2(e,t){var r,i;return function(){var a=Qe(this,e),o=a.tween;if(o!==r){i=r=o;for(var n=0,s=i.length;n<s;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}a.tween=i}}function Q2(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var o=Qe(this,e),n=o.tween;if(n!==i){a=(i=n).slice();for(var s={name:t,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===t){a[l]=s;break}l===h&&a.push(s)}o.tween=a}}function K2(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ze(this.node(),r).tween,a=0,o=i.length,n;a<o;++a)if((n=i[a]).name===e)return n.value;return null}return this.each((t==null?Z2:Q2)(r,e,t))}function bh(e,t,r){var i=e._id;return e.each(function(){var a=Qe(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return ze(a,i).value[t]}}function fg(e,t){var r;return(typeof t=="number"?Ee:t instanceof Qr?Qo:(r=Qr(t))?(t=r,Qo):ng)(e,t)}function J2(e){return function(){this.removeAttribute(e)}}function tT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eT(e,t,r){var i,a=r+"",o;return function(){var n=this.getAttribute(e);return n===a?null:n===i?o:o=t(i=n,r)}}function rT(e,t,r){var i,a=r+"",o;return function(){var n=this.getAttributeNS(e.space,e.local);return n===a?null:n===i?o:o=t(i=n,r)}}function iT(e,t,r){var i,a,o;return function(){var n,s=r(this),l;return s==null?void this.removeAttribute(e):(n=this.getAttribute(e),l=s+"",n===l?null:n===i&&l===a?o:(a=l,o=t(i=n,s)))}}function aT(e,t,r){var i,a,o;return function(){var n,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),l=s+"",n===l?null:n===i&&l===a?o:(a=l,o=t(i=n,s)))}}function oT(e,t){var r=In(e),i=r==="transform"?R2:fg;return this.attrTween(e,typeof t=="function"?(r.local?aT:iT)(r,i,bh(this,"attr."+e,t)):t==null?(r.local?tT:J2)(r):(r.local?rT:eT)(r,i,t))}function nT(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function sT(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function lT(e,t){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&sT(e,o)),r}return a._value=t,a}function hT(e,t){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&nT(e,o)),r}return a._value=t,a}function cT(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=In(e);return this.tween(r,(i.local?lT:hT)(i,t))}function uT(e,t){return function(){xh(this,e).delay=+t.apply(this,arguments)}}function dT(e,t){return t=+t,function(){xh(this,e).delay=t}}function fT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?uT:dT)(t,e)):ze(this.node(),t).delay}function gT(e,t){return function(){Qe(this,e).duration=+t.apply(this,arguments)}}function pT(e,t){return t=+t,function(){Qe(this,e).duration=t}}function mT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gT:pT)(t,e)):ze(this.node(),t).duration}function yT(e,t){if(typeof t!="function")throw new Error;return function(){Qe(this,e).ease=t}}function CT(e){var t=this._id;return arguments.length?this.each(yT(t,e)):ze(this.node(),t).ease}function xT(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Qe(this,e).ease=r}}function bT(e){if(typeof e!="function")throw new Error;return this.each(xT(this._id,e))}function kT(e){typeof e!="function"&&(e=qf(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var o=t[a],n=o.length,s=i[a]=[],l,h=0;h<n;++h)(l=o[h])&&e.call(l,l.__data__,h,o)&&s.push(l);return new cr(i,this._parents,this._name,this._id)}function TT(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,o=Math.min(i,a),n=new Array(i),s=0;s<o;++s)for(var l=t[s],h=r[s],c=l.length,u=n[s]=new Array(c),f,d=0;d<c;++d)(f=l[d]||h[d])&&(u[d]=f);for(;s<i;++s)n[s]=t[s];return new cr(n,this._parents,this._name,this._id)}function wT(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 _T(e,t,r){var i,a,o=wT(t)?xh:Qe;return function(){var n=o(this,e),s=n.on;s!==i&&(a=(i=s).copy()).on(t,r),n.on=a}}function ST(e,t){var r=this._id;return arguments.length<2?ze(this.node(),r).on.on(e):this.each(_T(r,e,t))}function vT(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function BT(){return this.on("end.remove",vT(this._id))}function LT(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ph(e));for(var i=this._groups,a=i.length,o=new Array(a),n=0;n<a;++n)for(var s=i[n],l=s.length,h=o[n]=new Array(l),c,u,f=0;f<l;++f)(c=s[f])&&(u=e.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),h[f]=u,Nn(h[f],t,r,f,h,ze(c,r)));return new cr(o,this._parents,t,r)}function FT(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Nf(e));for(var i=this._groups,a=i.length,o=[],n=[],s=0;s<a;++s)for(var l=i[s],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var f=e.call(c,c.__data__,u,l),d,g=ze(c,r),p=0,m=f.length;p<m;++p)(d=f[p])&&Nn(d,t,r,p,f,g);o.push(f),n.push(c)}return new cr(o,n,t,r)}var MT=Ja.prototype.constructor;function AT(){return new MT(this._groups,this._parents)}function ET(e,t){var r,i,a;return function(){var o=Hi(this,e),n=(this.style.removeProperty(e),Hi(this,e));return o===n?null:o===r&&n===i?a:a=t(r=o,i=n)}}function gg(e){return function(){this.style.removeProperty(e)}}function $T(e,t,r){var i,a=r+"",o;return function(){var n=Hi(this,e);return n===a?null:n===i?o:o=t(i=n,r)}}function OT(e,t,r){var i,a,o;return function(){var n=Hi(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Hi(this,e))),n===l?null:n===i&&l===a?o:(a=l,o=t(i=n,s))}}function IT(e,t){var r,i,a,o="style."+t,n="end."+o,s;return function(){var l=Qe(this,e),h=l.on,c=l.value[o]==null?s||(s=gg(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(n,a=c),l.on=i}}function DT(e,t,r){var i=(e+="")=="transform"?P2:fg;return t==null?this.styleTween(e,ET(e,i)).on("end.style."+e,gg(e)):typeof t=="function"?this.styleTween(e,OT(e,i,bh(this,"style."+e,t))).each(IT(this._id,e)):this.styleTween(e,$T(e,i,t),r).on("end.style."+e,null)}function PT(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function RT(e,t,r){var i,a;function o(){var n=t.apply(this,arguments);return n!==a&&(i=(a=n)&&PT(e,n,r)),i}return o._value=t,o}function NT(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,RT(e,t,r??""))}function qT(e){return function(){this.textContent=e}}function zT(e){return function(){var t=e(this);this.textContent=t??""}}function WT(e){return this.tween("text",typeof e=="function"?zT(bh(this,"text",e)):qT(e==null?"":e+""))}function HT(e){return function(t){this.textContent=e.call(this,t)}}function UT(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&HT(a)),t}return i._value=e,i}function YT(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,UT(e))}function jT(){for(var e=this._name,t=this._id,r=pg(),i=this._groups,a=i.length,o=0;o<a;++o)for(var n=i[o],s=n.length,l,h=0;h<s;++h)if(l=n[h]){var c=ze(l,t);Nn(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new cr(i,this._parents,e,r)}function GT(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(o,n){var s={value:n},l={value:function(){--a===0&&o()}};r.each(function(){var h=Qe(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),h.on=t}),a===0&&o()})}var XT=0;function cr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function pg(){return++XT}var er=Ja.prototype;cr.prototype={constructor:cr,select:LT,selectAll:FT,selectChild:er.selectChild,selectChildren:er.selectChildren,filter:kT,merge:TT,selection:AT,transition:jT,call:er.call,nodes:er.nodes,node:er.node,size:er.size,empty:er.empty,each:er.each,on:ST,attr:oT,attrTween:cT,style:DT,styleTween:NT,text:WT,textTween:YT,remove:BT,tween:K2,delay:fT,duration:mT,ease:CT,easeVarying:bT,end:GT,[Symbol.iterator]:er[Symbol.iterator]};function VT(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZT={time:null,delay:0,duration:250,ease:VT};function QT(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 KT(e){var t,r;e instanceof cr?(t=e._id,e=e._name):(t=pg(),(r=ZT).time=Ch(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var n=i[o],s=n.length,l,h=0;h<s;++h)(l=n[h])&&Nn(l,e,t,h,n,r||QT(l,t));return new cr(i,this._parents,e,t)}Ja.prototype.interrupt=V2;Ja.prototype.transition=KT;const xl=Math.PI,bl=2*xl,Rr=1e-6,JT=bl-Rr;function mg(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function tw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return mg;const r=10**t;return function(i){this._+=i[0];for(let a=1,o=i.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class ew{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?mg:tw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,o,n){this._append`C${+t},${+r},${+i},${+a},${this._x1=+o},${this._y1=+n}`}arcTo(t,r,i,a,o){if(t=+t,r=+r,i=+i,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let n=this._x1,s=this._y1,l=i-t,h=a-r,c=n-t,u=s-r,f=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Rr)if(!(Math.abs(u*l-h*c)>Rr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-n,g=a-s,p=l*l+h*h,m=d*d+g*g,C=Math.sqrt(p),b=Math.sqrt(f),k=o*Math.tan((xl-Math.acos((p+f-m)/(2*C*b)))/2),w=k/b,_=k/C;Math.abs(w-1)>Rr&&this._append`L${t+w*c},${r+w*u}`,this._append`A${o},${o},0,0,${+(u*d>c*g)},${this._x1=t+_*l},${this._y1=r+_*h}`}}arc(t,r,i,a,o,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(a),l=i*Math.sin(a),h=t+s,c=r+l,u=1^n,f=n?a-o:o-a;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>Rr||Math.abs(this._y1-c)>Rr)&&this._append`L${h},${c}`,i&&(f<0&&(f=f%bl+bl),f>JT?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:f>Rr&&this._append`A${i},${i},0,${+(f>=xl)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function rw(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function en(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function Yi(e){return e=en(Math.abs(e)),e?e[1]:NaN}function iw(e,t){return function(r,i){for(var a=r.length,o=[],n=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(r.substring(a-=s,a+s)),!((l+=s+1)>i));)s=e[n=(n+1)%e.length];return o.reverse().join(t)}}function aw(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ow=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qa(e){if(!(t=ow.exec(e)))throw new Error("invalid format: "+e);var t;return new kh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}qa.prototype=kh.prototype;function kh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}kh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function nw(e){t:for(var t=e.length,r=1,i=-1,a;r<t;++r)switch(e[r]){case".":i=a=r;break;case"0":i===0&&(i=r),a=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(a+1):e}var yg;function sw(e,t){var r=en(e,t);if(!r)return e+"";var i=r[0],a=r[1],o=a-(yg=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,n=i.length;return o===n?i:o>n?i+new Array(o-n+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+en(e,Math.max(0,t+o-1))[0]}function Tu(e,t){var r=en(e,t);if(!r)return e+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}const wu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rw,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Tu(e*100,t),r:Tu,s:sw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _u(e){return e}var Su=Array.prototype.map,vu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lw(e){var t=e.grouping===void 0||e.thousands===void 0?_u:iw(Su.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?_u:aw(Su.call(e.numerals,String)),n=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function h(u){u=qa(u);var f=u.fill,d=u.align,g=u.sign,p=u.symbol,m=u.zero,C=u.width,b=u.comma,k=u.precision,w=u.trim,_=u.type;_==="n"?(b=!0,_="g"):wu[_]||(k===void 0&&(k=12),w=!0,_="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var S=p==="$"?r:p==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",T=p==="$"?i:/[%p]/.test(_)?n:"",B=wu[_],R=/[defgprs%]/.test(_);k=k===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function $(F){var N=S,M=T,O,W,q;if(_==="c")M=B(F)+M,F="";else{F=+F;var H=F<0||1/F<0;if(F=isNaN(F)?l:B(Math.abs(F),k),w&&(F=nw(F)),H&&+F==0&&g!=="+"&&(H=!1),N=(H?g==="("?g:s:g==="-"||g==="("?"":g)+N,M=(_==="s"?vu[8+yg/3]:"")+M+(H&&g==="("?")":""),R){for(O=-1,W=F.length;++O<W;)if(q=F.charCodeAt(O),48>q||q>57){M=(q===46?a+F.slice(O+1):F.slice(O))+M,F=F.slice(0,O);break}}}b&&!m&&(F=t(F,1/0));var D=N.length+F.length+M.length,X=D<C?new Array(C-D+1).join(f):"";switch(b&&m&&(F=t(X+F,X.length?C-M.length:1/0),X=""),d){case"<":F=N+F+M+X;break;case"=":F=N+X+F+M;break;case"^":F=X.slice(0,D=X.length>>1)+N+F+M+X.slice(D);break;default:F=X+N+F+M;break}return o(F)}return $.toString=function(){return u+""},$}function c(u,f){var d=h((u=qa(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Yi(f)/3)))*3,p=Math.pow(10,-g),m=vu[8+g/3];return function(C){return d(p*C)+m}}return{format:h,formatPrefix:c}}var ko,Th,Cg;hw({thousands:",",grouping:[3],currency:["$",""]});function hw(e){return ko=lw(e),Th=ko.format,Cg=ko.formatPrefix,ko}function cw(e){return Math.max(0,-Yi(Math.abs(e)))}function uw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yi(t)/3)))*3-Yi(Math.abs(e)))}function dw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yi(t)-Yi(e))+1}function fw(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 gw(){return this.eachAfter(fw)}function pw(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function mw(e,t){for(var r=this,i=[r],a,o,n=-1;r=i.pop();)if(e.call(t,r,++n,this),a=r.children)for(o=a.length-1;o>=0;--o)i.push(a[o]);return this}function yw(e,t){for(var r=this,i=[r],a=[],o,n,s,l=-1;r=i.pop();)if(a.push(r),o=r.children)for(n=0,s=o.length;n<s;++n)i.push(o[n]);for(;r=a.pop();)e.call(t,r,++l,this);return this}function Cw(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function xw(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 bw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function kw(e){for(var t=this,r=Tw(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 Tw(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 ww(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function _w(){return Array.from(this)}function Sw(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function vw(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*Bw(){var e=this,t,r=[e],i,a,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(a=0,o=i.length;a<o;++a)r.push(i[a]);while(r.length)}function xg(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Mw)):t===void 0&&(t=Fw);for(var r=new rn(e),i,a=[r],o,n,s,l;i=a.pop();)if((n=t(i.data))&&(l=(n=Array.from(n)).length))for(i.children=n,s=l-1;s>=0;--s)a.push(o=n[s]=new rn(n[s])),o.parent=i,o.depth=i.depth+1;return r.eachBefore(Ew)}function Lw(){return xg(this).eachBefore(Aw)}function Fw(e){return e.children}function Mw(e){return Array.isArray(e)?e[1]:null}function Aw(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ew(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function rn(e){this.data=e,this.depth=this.height=0,this.parent=null}rn.prototype=xg.prototype={constructor:rn,count:gw,each:pw,eachAfter:yw,eachBefore:mw,find:Cw,sum:xw,sort:bw,path:kw,ancestors:ww,descendants:_w,leaves:Sw,links:vw,copy:Lw,[Symbol.iterator]:Bw};function $w(e){if(typeof e!="function")throw new Error;return e}function ha(){return 0}function ca(e){return function(){return e}}function Ow(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 Iw(e,t,r,i,a){for(var o=e.children,n,s=-1,l=o.length,h=e.value&&(i-t)/e.value;++s<l;)n=o[s],n.y0=r,n.y1=a,n.x0=t,n.x1=t+=n.value*h}function Dw(e,t,r,i,a){for(var o=e.children,n,s=-1,l=o.length,h=e.value&&(a-r)/e.value;++s<l;)n=o[s],n.x0=t,n.x1=i,n.y0=r,n.y1=r+=n.value*h}var Pw=(1+Math.sqrt(5))/2;function Rw(e,t,r,i,a,o){for(var n=[],s=t.children,l,h,c=0,u=0,f=s.length,d,g,p=t.value,m,C,b,k,w,_,S;c<f;){d=a-r,g=o-i;do m=s[u++].value;while(!m&&u<f);for(C=b=m,_=Math.max(g/d,d/g)/(p*e),S=m*m*_,w=Math.max(b/S,S/C);u<f;++u){if(m+=h=s[u].value,h<C&&(C=h),h>b&&(b=h),S=m*m*_,k=Math.max(b/S,S/C),k>w){m-=h;break}w=k}n.push(l={value:m,dice:d<g,children:s.slice(c,u)}),l.dice?Iw(l,r,i,a,p?i+=g*m/p:o):Dw(l,r,i,p?r+=d*m/p:a,o),p-=m,c=u}return n}const Nw=function e(t){function r(i,a,o,n,s){Rw(t,i,a,o,n,s)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r}(Pw);function dO(){var e=Nw,t=!1,r=1,i=1,a=[0],o=ha,n=ha,s=ha,l=ha,h=ha;function c(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),a=[0],t&&f.eachBefore(Ow),f}function u(f){var d=a[f.depth],g=f.x0+d,p=f.y0+d,m=f.x1-d,C=f.y1-d;m<g&&(g=m=(g+m)/2),C<p&&(p=C=(p+C)/2),f.x0=g,f.y0=p,f.x1=m,f.y1=C,f.children&&(d=a[f.depth+1]=o(f)/2,g+=h(f)-d,p+=n(f)-d,m-=s(f)-d,C-=l(f)-d,m<g&&(g=m=(g+m)/2),C<p&&(p=C=(p+C)/2),e(f,g,p,m,C))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(r=+f[0],i=+f[1],c):[r,i]},c.tile=function(f){return arguments.length?(e=$w(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:ca(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(n=typeof f=="function"?f:ca(+f),c):n},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:ca(+f),c):s},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:ca(+f),c):l},c.paddingLeft=function(f){return arguments.length?(h=typeof f=="function"?f:ca(+f),c):h},c}function Fe(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function mr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Bu=Symbol("implicit");function bg(){var e=new ru,t=[],r=[],i=Bu;function a(o){let n=e.get(o);if(n===void 0){if(i!==Bu)return i;e.set(o,n=t.push(o)-1)}return r[n%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ru;for(const n of o)e.has(n)||e.set(n,t.push(n)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(i=o,a):i},a.copy=function(){return bg(t,r).unknown(i)},Fe.apply(a,arguments),a}function kg(){var e=bg().unknown(void 0),t=e.domain,r=e.range,i=0,a=1,o,n,s=!1,l=0,h=0,c=.5;delete e.unknown;function u(){var f=t().length,d=a<i,g=d?a:i,p=d?i:a;o=(p-g)/Math.max(1,f-l+h*2),s&&(o=Math.floor(o)),g+=(p-g-o*(f-l))*c,n=o*(1-l),s&&(g=Math.round(g),n=Math.round(n));var m=kb(f).map(function(C){return g+o*C});return r(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([i,a]=f,i=+i,a=+a,u()):[i,a]},e.rangeRound=function(f){return[i,a]=f,i=+i,a=+a,s=!0,u()},e.bandwidth=function(){return n},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,u()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,h=+f),u()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},e.paddingOuter=function(f){return arguments.length?(h=+f,u()):h},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},e.copy=function(){return kg(t(),[i,a]).round(s).paddingInner(l).paddingOuter(h).align(c)},Fe.apply(u(),arguments)}function Tg(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Tg(t())},e}function fO(){return Tg(kg.apply(null,arguments).paddingInner(1))}function qw(e){return function(){return e}}function an(e){return+e}var Lu=[0,1];function ne(e){return e}function kl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:qw(isNaN(t)?NaN:.5)}function zw(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function Ww(e,t,r){var i=e[0],a=e[1],o=t[0],n=t[1];return a<i?(i=kl(a,i),o=r(n,o)):(i=kl(i,a),o=r(o,n)),function(s){return o(i(s))}}function Hw(e,t,r){var i=Math.min(e.length,t.length)-1,a=new Array(i),o=new Array(i),n=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++n<i;)a[n]=kl(e[n],e[n+1]),o[n]=r(t[n],t[n+1]);return function(s){var l=Ka(e,s,1,i)-1;return o[l](a[l](s))}}function eo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function qn(){var e=Lu,t=Lu,r=Zi,i,a,o,n=ne,s,l,h;function c(){var f=Math.min(e.length,t.length);return n!==ne&&(n=zw(e[0],e[f-1])),s=f>2?Hw:Ww,l=h=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(i),t,r)))(i(n(f)))}return u.invert=function(f){return n(a((h||(h=s(t,e.map(i),Ee)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,an),c()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=yh,c()},u.clamp=function(f){return arguments.length?(n=f?!0:ne,c()):n!==ne},u.interpolate=function(f){return arguments.length?(r=f,c()):r},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,d){return i=f,a=d,c()}}function wh(){return qn()(ne,ne)}function Uw(e,t,r,i){var a=hl(e,t,r),o;switch(i=qa(i??",f"),i.type){case"s":{var n=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(o=uw(a,n))&&(i.precision=o),Cg(i,n)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=dw(a,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=cw(a))&&(i.precision=o-(i.type==="%")*2);break}}return Th(i)}function Ar(e){var t=e.domain;return e.ticks=function(r){var i=t();return sl(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var a=t();return Uw(a[0],a[a.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),a=0,o=i.length-1,n=i[a],s=i[o],l,h,c=10;for(s<n&&(h=n,n=s,s=h,h=a,a=o,o=h);c-- >0;){if(h=ll(n,s,r),h===l)return i[a]=n,i[o]=s,t(i);if(h>0)n=Math.floor(n/h)*h,s=Math.ceil(s/h)*h;else if(h<0)n=Math.ceil(n*h)/h,s=Math.floor(s*h)/h;else break;l=h}return e},e}function Yw(){var e=wh();return e.copy=function(){return eo(e,Yw())},Fe.apply(e,arguments),Ar(e)}function jw(e){var t;function r(i){return i==null||isNaN(i=+i)?t:i}return r.invert=r,r.domain=r.range=function(i){return arguments.length?(e=Array.from(i,an),r):e.slice()},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return jw(e).unknown(t)},e=arguments.length?Array.from(e,an):[0,1],Ar(r)}function wg(e,t){e=e.slice();var r=0,i=e.length-1,a=e[r],o=e[i],n;return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),e[r]=t.floor(a),e[i]=t.ceil(o),e}function Fu(e){return Math.log(e)}function Mu(e){return Math.exp(e)}function Gw(e){return-Math.log(-e)}function Xw(e){return-Math.exp(-e)}function Vw(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Zw(e){return e===10?Vw:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Qw(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Au(e){return(t,r)=>-e(-t,r)}function _h(e){const t=e(Fu,Mu),r=t.domain;let i=10,a,o;function n(){return a=Qw(i),o=Zw(i),r()[0]<0?(a=Au(a),o=Au(o),e(Gw,Xw)):e(Fu,Mu),t}return t.base=function(s){return arguments.length?(i=+s,n()):i},t.domain=function(s){return arguments.length?(r(s),n()):r()},t.ticks=s=>{const l=r();let h=l[0],c=l[l.length-1];const u=c<h;u&&([h,c]=[c,h]);let f=a(h),d=a(c),g,p;const m=s==null?10:+s;let C=[];if(!(i%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),h>0){for(;f<=d;++f)for(g=1;g<i;++g)if(p=f<0?g/o(-f):g*o(f),!(p<h)){if(p>c)break;C.push(p)}}else for(;f<=d;++f)for(g=i-1;g>=1;--g)if(p=f>0?g/o(-f):g*o(f),!(p<h)){if(p>c)break;C.push(p)}C.length*2<m&&(C=sl(h,c,m))}else C=sl(f,d,Math.min(d-f,m)).map(o);return u?C.reverse():C},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=qa(l)).precision==null&&(l.trim=!0),l=Th(l)),s===1/0)return l;const h=Math.max(1,i*s/t.ticks().length);return c=>{let u=c/o(Math.round(a(c)));return u*i<i-.5&&(u*=i),u<=h?l(c):""}},t.nice=()=>r(wg(r(),{floor:s=>o(Math.floor(a(s))),ceil:s=>o(Math.ceil(a(s)))})),t}function Kw(){const e=_h(qn()).domain([1,10]);return e.copy=()=>eo(e,Kw()).base(e.base()),Fe.apply(e,arguments),e}function Eu(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function $u(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Sh(e){var t=1,r=e(Eu(t),$u(t));return r.constant=function(i){return arguments.length?e(Eu(t=+i),$u(t)):t},Ar(r)}function Jw(){var e=Sh(qn());return e.copy=function(){return eo(e,Jw()).constant(e.constant())},Fe.apply(e,arguments)}function Ou(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function t_(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e_(e){return e<0?-e*e:e*e}function vh(e){var t=e(ne,ne),r=1;function i(){return r===1?e(ne,ne):r===.5?e(t_,e_):e(Ou(r),Ou(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,i()):r},Ar(t)}function _g(){var e=vh(qn());return e.copy=function(){return eo(e,_g()).exponent(e.exponent())},Fe.apply(e,arguments),e}function gO(){return _g.apply(null,arguments).exponent(.5)}function Iu(e){return Math.sign(e)*e*e}function r_(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function i_(){var e=wh(),t=[0,1],r=!1,i;function a(o){var n=r_(e(o));return isNaN(n)?i:r?Math.round(n):n}return a.invert=function(o){return e.invert(Iu(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,an)).map(Iu)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(i=o,a):i},a.copy=function(){return i_(e.domain(),t).round(r).clamp(e.clamp()).unknown(i)},Fe.apply(a,arguments),Ar(a)}function a_(){var e=[],t=[],r=[],i;function a(){var n=0,s=Math.max(1,t.length);for(r=new Array(s-1);++n<s;)r[n-1]=bb(e,n/s);return o}function o(n){return n==null||isNaN(n=+n)?i:t[Ka(r,n)]}return o.invertExtent=function(n){var s=t.indexOf(n);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let s of n)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(wr),a()},o.range=function(n){return arguments.length?(t=Array.from(n),a()):t.slice()},o.unknown=function(n){return arguments.length?(i=n,o):i},o.quantiles=function(){return r.slice()},o.copy=function(){return a_().domain(e).range(t).unknown(i)},Fe.apply(o,arguments)}function o_(){var e=0,t=1,r=1,i=[.5],a=[0,1],o;function n(l){return l!=null&&l<=l?a[Ka(i,l,0,r)]:o}function s(){var l=-1;for(i=new Array(r);++l<r;)i[l]=((l+1)*t-(l-r)*e)/(r+1);return n}return n.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},n.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},n.invertExtent=function(l){var h=a.indexOf(l);return h<0?[NaN,NaN]:h<1?[e,i[0]]:h>=r?[i[r-1],t]:[i[h-1],i[h]]},n.unknown=function(l){return arguments.length&&(o=l),n},n.thresholds=function(){return i.slice()},n.copy=function(){return o_().domain([e,t]).range(a).unknown(o)},Fe.apply(Ar(n),arguments)}function n_(){var e=[.5],t=[0,1],r,i=1;function a(o){return o!=null&&o<=o?t[Ka(e,o,0,i)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),i=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var n=t.indexOf(o);return[e[n-1],e[n]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return n_().domain(e).range(t).unknown(r)},Fe.apply(a,arguments)}const Os=new Date,Is=new Date;function Wt(e,t,r,i){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const n=a(o),s=a.ceil(o);return o-n<s-o?n:s},a.offset=(o,n)=>(t(o=new Date(+o),n==null?1:Math.floor(n)),o),a.range=(o,n,s)=>{const l=[];if(o=a.ceil(o),s=s==null?1:Math.floor(s),!(o<n)||!(s>0))return l;let h;do l.push(h=new Date(+o)),t(o,s),e(o);while(h<o&&o<n);return l},a.filter=o=>Wt(n=>{if(n>=n)for(;e(n),!o(n);)n.setTime(n-1)},(n,s)=>{if(n>=n)if(s<0)for(;++s<=0;)for(;t(n,-1),!o(n););else for(;--s>=0;)for(;t(n,1),!o(n););}),r&&(a.count=(o,n)=>(Os.setTime(+o),Is.setTime(+n),e(Os),e(Is),Math.floor(r(Os,Is))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(i?n=>i(n)%o===0:n=>a.count(0,n)%o===0):a)),a}const on=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);on.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):on);on.range;const nr=1e3,Be=nr*60,sr=Be*60,ur=sr*24,Bh=ur*7,Du=ur*30,Ds=ur*365,Hr=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Hr.range;const Lh=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Be)},(e,t)=>(t-e)/Be,e=>e.getMinutes());Lh.range;const Fh=Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Be)},(e,t)=>(t-e)/Be,e=>e.getUTCMinutes());Fh.range;const Mh=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Be)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getHours());Mh.range;const Ah=Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getUTCHours());Ah.range;const ro=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Be)/ur,e=>e.getDate()-1);ro.range;const zn=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ur,e=>e.getUTCDate()-1);zn.range;const Sg=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ur,e=>Math.floor(e/ur));Sg.range;function oi(e){return Wt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Be)/Bh)}const Wn=oi(0),nn=oi(1),s_=oi(2),l_=oi(3),ji=oi(4),h_=oi(5),c_=oi(6);Wn.range;nn.range;s_.range;l_.range;ji.range;h_.range;c_.range;function ni(e){return Wt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Bh)}const Hn=ni(0),sn=ni(1),u_=ni(2),d_=ni(3),Gi=ni(4),f_=ni(5),g_=ni(6);Hn.range;sn.range;u_.range;d_.range;Gi.range;f_.range;g_.range;const Eh=Wt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Eh.range;const $h=Wt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());$h.range;const dr=Wt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});dr.range;const fr=Wt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());fr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});fr.range;function vg(e,t,r,i,a,o){const n=[[Hr,1,nr],[Hr,5,5*nr],[Hr,15,15*nr],[Hr,30,30*nr],[o,1,Be],[o,5,5*Be],[o,15,15*Be],[o,30,30*Be],[a,1,sr],[a,3,3*sr],[a,6,6*sr],[a,12,12*sr],[i,1,ur],[i,2,2*ur],[r,1,Bh],[t,1,Du],[t,3,3*Du],[e,1,Ds]];function s(h,c,u){const f=c<h;f&&([h,c]=[c,h]);const d=u&&typeof u.range=="function"?u:l(h,c,u),g=d?d.range(h,+c+1):[];return f?g.reverse():g}function l(h,c,u){const f=Math.abs(c-h)/u,d=gh(([,,m])=>m).right(n,f);if(d===n.length)return e.every(hl(h/Ds,c/Ds,u));if(d===0)return on.every(Math.max(hl(h,c,u),1));const[g,p]=n[f/n[d-1][2]<n[d][2]/f?d-1:d];return g.every(p)}return[s,l]}const[p_,m_]=vg(fr,$h,Hn,Sg,Ah,Fh),[y_,C_]=vg(dr,Eh,Wn,ro,Mh,Lh);function Ps(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Rs(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ua(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function x_(e){var t=e.dateTime,r=e.date,i=e.time,a=e.periods,o=e.days,n=e.shortDays,s=e.months,l=e.shortMonths,h=da(a),c=fa(a),u=da(o),f=fa(o),d=da(n),g=fa(n),p=da(s),m=fa(s),C=da(l),b=fa(l),k={a:H,A:D,b:X,B:lt,c:null,d:Wu,e:Wu,f:W_,g:K_,G:tS,H:N_,I:q_,j:z_,L:Bg,m:H_,M:U_,p:ht,q:Ft,Q:Yu,s:ju,S:Y_,u:j_,U:G_,V:X_,w:V_,W:Z_,x:null,X:null,y:Q_,Y:J_,Z:eS,"%":Uu},w={a:gt,A:_t,b:it,B:St,c:null,d:Hu,e:Hu,f:oS,g:pS,G:yS,H:rS,I:iS,j:aS,L:Fg,m:nS,M:sS,p:Ht,q:Pt,Q:Yu,s:ju,S:lS,u:hS,U:cS,V:uS,w:dS,W:fS,x:null,X:null,y:gS,Y:mS,Z:CS,"%":Uu},_={a:$,A:F,b:N,B:M,c:O,d:qu,e:qu,f:I_,g:Nu,G:Ru,H:zu,I:zu,j:A_,L:O_,m:M_,M:E_,p:R,q:F_,Q:P_,s:R_,S:$_,u:__,U:S_,V:v_,w:w_,W:B_,x:W,X:q,y:Nu,Y:Ru,Z:L_,"%":D_};k.x=S(r,k),k.X=S(i,k),k.c=S(t,k),w.x=S(r,w),w.X=S(i,w),w.c=S(t,w);function S(Y,U){return function(j){var I=[],pt=-1,dt=0,kt=Y.length,Ot,Te,ye;for(j instanceof Date||(j=new Date(+j));++pt<kt;)Y.charCodeAt(pt)===37&&(I.push(Y.slice(dt,pt)),(Te=Pu[Ot=Y.charAt(++pt)])!=null?Ot=Y.charAt(++pt):Te=Ot==="e"?" ":"0",(ye=U[Ot])&&(Ot=ye(j,Te)),I.push(Ot),dt=pt+1);return I.push(Y.slice(dt,pt)),I.join("")}}function T(Y,U){return function(j){var I=ua(1900,void 0,1),pt=B(I,Y,j+="",0),dt,kt;if(pt!=j.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(U&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(dt=Rs(ua(I.y,0,1)),kt=dt.getUTCDay(),dt=kt>4||kt===0?sn.ceil(dt):sn(dt),dt=zn.offset(dt,(I.V-1)*7),I.y=dt.getUTCFullYear(),I.m=dt.getUTCMonth(),I.d=dt.getUTCDate()+(I.w+6)%7):(dt=Ps(ua(I.y,0,1)),kt=dt.getDay(),dt=kt>4||kt===0?nn.ceil(dt):nn(dt),dt=ro.offset(dt,(I.V-1)*7),I.y=dt.getFullYear(),I.m=dt.getMonth(),I.d=dt.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),kt="Z"in I?Rs(ua(I.y,0,1)).getUTCDay():Ps(ua(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(kt+5)%7:I.w+I.U*7-(kt+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Rs(I)):Ps(I)}}function B(Y,U,j,I){for(var pt=0,dt=U.length,kt=j.length,Ot,Te;pt<dt;){if(I>=kt)return-1;if(Ot=U.charCodeAt(pt++),Ot===37){if(Ot=U.charAt(pt++),Te=_[Ot in Pu?U.charAt(pt++):Ot],!Te||(I=Te(Y,j,I))<0)return-1}else if(Ot!=j.charCodeAt(I++))return-1}return I}function R(Y,U,j){var I=h.exec(U.slice(j));return I?(Y.p=c.get(I[0].toLowerCase()),j+I[0].length):-1}function $(Y,U,j){var I=d.exec(U.slice(j));return I?(Y.w=g.get(I[0].toLowerCase()),j+I[0].length):-1}function F(Y,U,j){var I=u.exec(U.slice(j));return I?(Y.w=f.get(I[0].toLowerCase()),j+I[0].length):-1}function N(Y,U,j){var I=C.exec(U.slice(j));return I?(Y.m=b.get(I[0].toLowerCase()),j+I[0].length):-1}function M(Y,U,j){var I=p.exec(U.slice(j));return I?(Y.m=m.get(I[0].toLowerCase()),j+I[0].length):-1}function O(Y,U,j){return B(Y,t,U,j)}function W(Y,U,j){return B(Y,r,U,j)}function q(Y,U,j){return B(Y,i,U,j)}function H(Y){return n[Y.getDay()]}function D(Y){return o[Y.getDay()]}function X(Y){return l[Y.getMonth()]}function lt(Y){return s[Y.getMonth()]}function ht(Y){return a[+(Y.getHours()>=12)]}function Ft(Y){return 1+~~(Y.getMonth()/3)}function gt(Y){return n[Y.getUTCDay()]}function _t(Y){return o[Y.getUTCDay()]}function it(Y){return l[Y.getUTCMonth()]}function St(Y){return s[Y.getUTCMonth()]}function Ht(Y){return a[+(Y.getUTCHours()>=12)]}function Pt(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var U=S(Y+="",k);return U.toString=function(){return Y},U},parse:function(Y){var U=T(Y+="",!1);return U.toString=function(){return Y},U},utcFormat:function(Y){var U=S(Y+="",w);return U.toString=function(){return Y},U},utcParse:function(Y){var U=T(Y+="",!0);return U.toString=function(){return Y},U}}}var Pu={"-":"",_:" ",0:"0"},jt=/^\s*\d+/,b_=/^%/,k_=/[\\^$*+?|[\]().{}]/g;function xt(e,t,r){var i=e<0?"-":"",a=(i?-e:e)+"",o=a.length;return i+(o<r?new Array(r-o+1).join(t)+a:a)}function T_(e){return e.replace(k_,"\\$&")}function da(e){return new RegExp("^(?:"+e.map(T_).join("|")+")","i")}function fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function w_(e,t,r){var i=jt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function __(e,t,r){var i=jt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function S_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function v_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function B_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function Ru(e,t,r){var i=jt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function Nu(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function L_(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function F_(e,t,r){var i=jt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function M_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function qu(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function A_(e,t,r){var i=jt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function zu(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function E_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function $_(e,t,r){var i=jt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function O_(e,t,r){var i=jt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function I_(e,t,r){var i=jt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function D_(e,t,r){var i=b_.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function P_(e,t,r){var i=jt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function R_(e,t,r){var i=jt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function Wu(e,t){return xt(e.getDate(),t,2)}function N_(e,t){return xt(e.getHours(),t,2)}function q_(e,t){return xt(e.getHours()%12||12,t,2)}function z_(e,t){return xt(1+ro.count(dr(e),e),t,3)}function Bg(e,t){return xt(e.getMilliseconds(),t,3)}function W_(e,t){return Bg(e,t)+"000"}function H_(e,t){return xt(e.getMonth()+1,t,2)}function U_(e,t){return xt(e.getMinutes(),t,2)}function Y_(e,t){return xt(e.getSeconds(),t,2)}function j_(e){var t=e.getDay();return t===0?7:t}function G_(e,t){return xt(Wn.count(dr(e)-1,e),t,2)}function Lg(e){var t=e.getDay();return t>=4||t===0?ji(e):ji.ceil(e)}function X_(e,t){return e=Lg(e),xt(ji.count(dr(e),e)+(dr(e).getDay()===4),t,2)}function V_(e){return e.getDay()}function Z_(e,t){return xt(nn.count(dr(e)-1,e),t,2)}function Q_(e,t){return xt(e.getFullYear()%100,t,2)}function K_(e,t){return e=Lg(e),xt(e.getFullYear()%100,t,2)}function J_(e,t){return xt(e.getFullYear()%1e4,t,4)}function tS(e,t){var r=e.getDay();return e=r>=4||r===0?ji(e):ji.ceil(e),xt(e.getFullYear()%1e4,t,4)}function eS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xt(t/60|0,"0",2)+xt(t%60,"0",2)}function Hu(e,t){return xt(e.getUTCDate(),t,2)}function rS(e,t){return xt(e.getUTCHours(),t,2)}function iS(e,t){return xt(e.getUTCHours()%12||12,t,2)}function aS(e,t){return xt(1+zn.count(fr(e),e),t,3)}function Fg(e,t){return xt(e.getUTCMilliseconds(),t,3)}function oS(e,t){return Fg(e,t)+"000"}function nS(e,t){return xt(e.getUTCMonth()+1,t,2)}function sS(e,t){return xt(e.getUTCMinutes(),t,2)}function lS(e,t){return xt(e.getUTCSeconds(),t,2)}function hS(e){var t=e.getUTCDay();return t===0?7:t}function cS(e,t){return xt(Hn.count(fr(e)-1,e),t,2)}function Mg(e){var t=e.getUTCDay();return t>=4||t===0?Gi(e):Gi.ceil(e)}function uS(e,t){return e=Mg(e),xt(Gi.count(fr(e),e)+(fr(e).getUTCDay()===4),t,2)}function dS(e){return e.getUTCDay()}function fS(e,t){return xt(sn.count(fr(e)-1,e),t,2)}function gS(e,t){return xt(e.getUTCFullYear()%100,t,2)}function pS(e,t){return e=Mg(e),xt(e.getUTCFullYear()%100,t,2)}function mS(e,t){return xt(e.getUTCFullYear()%1e4,t,4)}function yS(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Gi(e):Gi.ceil(e),xt(e.getUTCFullYear()%1e4,t,4)}function CS(){return"+0000"}function Uu(){return"%"}function Yu(e){return+e}function ju(e){return Math.floor(+e/1e3)}var pi,Ag,Eg;xS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function xS(e){return pi=x_(e),Ag=pi.format,pi.parse,Eg=pi.utcFormat,pi.utcParse,pi}function bS(e){return new Date(e)}function kS(e){return e instanceof Date?+e:+new Date(+e)}function Oh(e,t,r,i,a,o,n,s,l,h){var c=wh(),u=c.invert,f=c.domain,d=h(".%L"),g=h(":%S"),p=h("%I:%M"),m=h("%I %p"),C=h("%a %d"),b=h("%b %d"),k=h("%B"),w=h("%Y");function _(S){return(l(S)<S?d:s(S)<S?g:n(S)<S?p:o(S)<S?m:i(S)<S?a(S)<S?C:b:r(S)<S?k:w)(S)}return c.invert=function(S){return new Date(u(S))},c.domain=function(S){return arguments.length?f(Array.from(S,kS)):f().map(bS)},c.ticks=function(S){var T=f();return e(T[0],T[T.length-1],S??10)},c.tickFormat=function(S,T){return T==null?_:h(T)},c.nice=function(S){var T=f();return(!S||typeof S.range!="function")&&(S=t(T[0],T[T.length-1],S??10)),S?f(wg(T,S)):c},c.copy=function(){return eo(c,Oh(e,t,r,i,a,o,n,s,l,h))},c}function pO(){return Fe.apply(Oh(y_,C_,dr,Eh,Wn,ro,Mh,Lh,Hr,Ag).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mO(){return Fe.apply(Oh(p_,m_,fr,$h,Hn,zn,Ah,Fh,Hr,Eg).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Un(){var e=0,t=1,r,i,a,o,n=ne,s=!1,l;function h(u){return u==null||isNaN(u=+u)?l:n(a===0?.5:(u=(o(u)-r)*a,s?Math.max(0,Math.min(1,u)):u))}h.domain=function(u){return arguments.length?([e,t]=u,r=o(e=+e),i=o(t=+t),a=r===i?0:1/(i-r),h):[e,t]},h.clamp=function(u){return arguments.length?(s=!!u,h):s},h.interpolator=function(u){return arguments.length?(n=u,h):n};function c(u){return function(f){var d,g;return arguments.length?([d,g]=f,n=u(d,g),h):[n(0),n(1)]}}return h.range=c(Zi),h.rangeRound=c(yh),h.unknown=function(u){return arguments.length?(l=u,h):l},function(u){return o=u,r=u(e),i=u(t),a=r===i?0:1/(i-r),h}}function Er(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function TS(){var e=Ar(Un()(ne));return e.copy=function(){return Er(e,TS())},mr.apply(e,arguments)}function wS(){var e=_h(Un()).domain([1,10]);return e.copy=function(){return Er(e,wS()).base(e.base())},mr.apply(e,arguments)}function _S(){var e=Sh(Un());return e.copy=function(){return Er(e,_S()).constant(e.constant())},mr.apply(e,arguments)}function $g(){var e=vh(Un());return e.copy=function(){return Er(e,$g()).exponent(e.exponent())},mr.apply(e,arguments)}function yO(){return $g.apply(null,arguments).exponent(.5)}function SS(){var e=[],t=ne;function r(i){if(i!=null&&!isNaN(i=+i))return t((Ka(e,i,1)-1)/(e.length-1))}return r.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let a of i)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(wr),r},r.interpolator=function(i){return arguments.length?(t=i,r):t},r.range=function(){return e.map((i,a)=>t(a/(e.length-1)))},r.quantiles=function(i){return Array.from({length:i+1},(a,o)=>xb(e,o/i))},r.copy=function(){return SS(t).domain(e)},mr.apply(r,arguments)}function Yn(){var e=0,t=.5,r=1,i=1,a,o,n,s,l,h=ne,c,u=!1,f;function d(p){return isNaN(p=+p)?f:(p=.5+((p=+c(p))-o)*(i*p<i*o?s:l),h(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([e,t,r]=p,a=c(e=+e),o=c(t=+t),n=c(r=+r),s=a===o?0:.5/(o-a),l=o===n?0:.5/(n-o),i=o<a?-1:1,d):[e,t,r]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(h=p,d):h};function g(p){return function(m){var C,b,k;return arguments.length?([C,b,k]=m,h=q2(p,[C,b,k]),d):[h(0),h(.5),h(1)]}}return d.range=g(Zi),d.rangeRound=g(yh),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return c=p,a=p(e),o=p(t),n=p(r),s=a===o?0:.5/(o-a),l=o===n?0:.5/(n-o),i=o<a?-1:1,d}}function vS(){var e=Ar(Yn()(ne));return e.copy=function(){return Er(e,vS())},mr.apply(e,arguments)}function BS(){var e=_h(Yn()).domain([.1,1,10]);return e.copy=function(){return Er(e,BS()).base(e.base())},mr.apply(e,arguments)}function LS(){var e=Sh(Yn());return e.copy=function(){return Er(e,LS()).constant(e.constant())},mr.apply(e,arguments)}function Og(){var e=vh(Yn());return e.copy=function(){return Er(e,Og()).exponent(e.exponent())},mr.apply(e,arguments)}function CO(){return Og.apply(null,arguments).exponent(.5)}function FS(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 xO=FS("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ut(e){return function(){return e}}const Gu=Math.abs,Kt=Math.atan2,ar=Math.cos,MS=Math.max,Ns=Math.min,ge=Math.sin,Zt=Math.sqrt,te=1e-12,vr=Math.PI,ln=vr/2,_r=2*vr;function AS(e){return e>1?0:e<-1?vr:Math.acos(e)}function Xu(e){return e>=1?ln:e<=-1?-ln:Math.asin(e)}function jn(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new ew(t)}function ES(e){return e.innerRadius}function $S(e){return e.outerRadius}function OS(e){return e.startAngle}function IS(e){return e.endAngle}function DS(e){return e&&e.padAngle}function PS(e,t,r,i,a,o,n,s){var l=r-e,h=i-t,c=n-a,u=s-o,f=u*l-c*h;if(!(f*f<te))return f=(c*(t-o)-u*(e-a))/f,[e+f*l,t+f*h]}function To(e,t,r,i,a,o,n){var s=e-r,l=t-i,h=(n?o:-o)/Zt(s*s+l*l),c=h*l,u=-h*s,f=e+c,d=t+u,g=r+c,p=i+u,m=(f+g)/2,C=(d+p)/2,b=g-f,k=p-d,w=b*b+k*k,_=a-o,S=f*p-g*d,T=(k<0?-1:1)*Zt(MS(0,_*_*w-S*S)),B=(S*k-b*T)/w,R=(-S*b-k*T)/w,$=(S*k+b*T)/w,F=(-S*b+k*T)/w,N=B-m,M=R-C,O=$-m,W=F-C;return N*N+M*M>O*O+W*W&&(B=$,R=F),{cx:B,cy:R,x01:-c,y01:-u,x11:B*(a/_-1),y11:R*(a/_-1)}}function bO(){var e=ES,t=$S,r=ut(0),i=null,a=OS,o=IS,n=DS,s=null,l=jn(h);function h(){var c,u,f=+e.apply(this,arguments),d=+t.apply(this,arguments),g=a.apply(this,arguments)-ln,p=o.apply(this,arguments)-ln,m=Gu(p-g),C=p>g;if(s||(s=c=l()),d<f&&(u=d,d=f,f=u),!(d>te))s.moveTo(0,0);else if(m>_r-te)s.moveTo(d*ar(g),d*ge(g)),s.arc(0,0,d,g,p,!C),f>te&&(s.moveTo(f*ar(p),f*ge(p)),s.arc(0,0,f,p,g,C));else{var b=g,k=p,w=g,_=p,S=m,T=m,B=n.apply(this,arguments)/2,R=B>te&&(i?+i.apply(this,arguments):Zt(f*f+d*d)),$=Ns(Gu(d-f)/2,+r.apply(this,arguments)),F=$,N=$,M,O;if(R>te){var W=Xu(R/f*ge(B)),q=Xu(R/d*ge(B));(S-=W*2)>te?(W*=C?1:-1,w+=W,_-=W):(S=0,w=_=(g+p)/2),(T-=q*2)>te?(q*=C?1:-1,b+=q,k-=q):(T=0,b=k=(g+p)/2)}var H=d*ar(b),D=d*ge(b),X=f*ar(_),lt=f*ge(_);if($>te){var ht=d*ar(k),Ft=d*ge(k),gt=f*ar(w),_t=f*ge(w),it;if(m<vr)if(it=PS(H,D,gt,_t,ht,Ft,X,lt)){var St=H-it[0],Ht=D-it[1],Pt=ht-it[0],Y=Ft-it[1],U=1/ge(AS((St*Pt+Ht*Y)/(Zt(St*St+Ht*Ht)*Zt(Pt*Pt+Y*Y)))/2),j=Zt(it[0]*it[0]+it[1]*it[1]);F=Ns($,(f-j)/(U-1)),N=Ns($,(d-j)/(U+1))}else F=N=0}T>te?N>te?(M=To(gt,_t,H,D,d,N,C),O=To(ht,Ft,X,lt,d,N,C),s.moveTo(M.cx+M.x01,M.cy+M.y01),N<$?s.arc(M.cx,M.cy,N,Kt(M.y01,M.x01),Kt(O.y01,O.x01),!C):(s.arc(M.cx,M.cy,N,Kt(M.y01,M.x01),Kt(M.y11,M.x11),!C),s.arc(0,0,d,Kt(M.cy+M.y11,M.cx+M.x11),Kt(O.cy+O.y11,O.cx+O.x11),!C),s.arc(O.cx,O.cy,N,Kt(O.y11,O.x11),Kt(O.y01,O.x01),!C))):(s.moveTo(H,D),s.arc(0,0,d,b,k,!C)):s.moveTo(H,D),!(f>te)||!(S>te)?s.lineTo(X,lt):F>te?(M=To(X,lt,ht,Ft,f,-F,C),O=To(H,D,gt,_t,f,-F,C),s.lineTo(M.cx+M.x01,M.cy+M.y01),F<$?s.arc(M.cx,M.cy,F,Kt(M.y01,M.x01),Kt(O.y01,O.x01),!C):(s.arc(M.cx,M.cy,F,Kt(M.y01,M.x01),Kt(M.y11,M.x11),!C),s.arc(0,0,f,Kt(M.cy+M.y11,M.cx+M.x11),Kt(O.cy+O.y11,O.cx+O.x11),C),s.arc(O.cx,O.cy,F,Kt(O.y11,O.x11),Kt(O.y01,O.x01),!C))):s.arc(0,0,f,_,w,C)}if(s.closePath(),c)return s=null,c+""||null}return h.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-vr/2;return[ar(u)*c,ge(u)*c]},h.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ut(+c),h):e},h.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ut(+c),h):t},h.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:ut(+c),h):r},h.padRadius=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:ut(+c),h):i},h.startAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ut(+c),h):a},h.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ut(+c),h):o},h.padAngle=function(c){return arguments.length?(n=typeof c=="function"?c:ut(+c),h):n},h.context=function(c){return arguments.length?(s=c??null,h):s},h}function Gn(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ig(e){this._context=e}Ig.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Bi(e){return new Ig(e)}function Dg(e){return e[0]}function Pg(e){return e[1]}function Rg(e,t){var r=ut(!0),i=null,a=Bi,o=null,n=jn(s);e=typeof e=="function"?e:e===void 0?Dg:ut(e),t=typeof t=="function"?t:t===void 0?Pg:ut(t);function s(l){var h,c=(l=Gn(l)).length,u,f=!1,d;for(i==null&&(o=a(d=n())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(u,h,l),+t(u,h,l));if(d)return o=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ut(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,i!=null&&(o=a(i)),s):a},s.context=function(l){return arguments.length?(l==null?i=o=null:o=a(i=l),s):i},s}function kO(e,t,r){var i=null,a=ut(!0),o=null,n=Bi,s=null,l=jn(h);e=typeof e=="function"?e:e===void 0?Dg:ut(+e),t=typeof t=="function"?t:ut(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Pg:ut(+r);function h(u){var f,d,g,p=(u=Gn(u)).length,m,C=!1,b,k=new Array(p),w=new Array(p);for(o==null&&(s=n(b=l())),f=0;f<=p;++f){if(!(f<p&&a(m=u[f],f,u))===C)if(C=!C)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=d;--g)s.point(k[g],w[g]);s.lineEnd(),s.areaEnd()}C&&(k[f]=+e(m,f,u),w[f]=+t(m,f,u),s.point(i?+i(m,f,u):k[f],r?+r(m,f,u):w[f]))}if(b)return s=null,b+""||null}function c(){return Rg().defined(a).curve(n).context(o)}return h.x=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),i=null,h):e},h.x0=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),h):e},h.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:ut(+u),h):i},h.y=function(u){return arguments.length?(t=typeof u=="function"?u:ut(+u),r=null,h):t},h.y0=function(u){return arguments.length?(t=typeof u=="function"?u:ut(+u),h):t},h.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ut(+u),h):r},h.lineX0=h.lineY0=function(){return c().x(e).y(t)},h.lineY1=function(){return c().x(e).y(r)},h.lineX1=function(){return c().x(i).y(t)},h.defined=function(u){return arguments.length?(a=typeof u=="function"?u:ut(!!u),h):a},h.curve=function(u){return arguments.length?(n=u,o!=null&&(s=n(o)),h):n},h.context=function(u){return arguments.length?(u==null?o=s=null:s=n(o=u),h):o},h}function RS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function NS(e){return e}function TO(){var e=NS,t=RS,r=null,i=ut(0),a=ut(_r),o=ut(0);function n(s){var l,h=(s=Gn(s)).length,c,u,f=0,d=new Array(h),g=new Array(h),p=+i.apply(this,arguments),m=Math.min(_r,Math.max(-_r,a.apply(this,arguments)-p)),C,b=Math.min(Math.abs(m)/h,o.apply(this,arguments)),k=b*(m<0?-1:1),w;for(l=0;l<h;++l)(w=g[d[l]=l]=+e(s[l],l,s))>0&&(f+=w);for(t!=null?d.sort(function(_,S){return t(g[_],g[S])}):r!=null&&d.sort(function(_,S){return r(s[_],s[S])}),l=0,u=f?(m-h*k)/f:0;l<h;++l,p=C)c=d[l],w=g[c],C=p+(w>0?w*u:0)+k,g[c]={data:s[c],index:l,value:w,startAngle:p,endAngle:C,padAngle:b};return g}return n.value=function(s){return arguments.length?(e=typeof s=="function"?s:ut(+s),n):e},n.sortValues=function(s){return arguments.length?(t=s,r=null,n):t},n.sort=function(s){return arguments.length?(r=s,t=null,n):r},n.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ut(+s),n):i},n.endAngle=function(s){return arguments.length?(a=typeof s=="function"?s:ut(+s),n):a},n.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ut(+s),n):o},n}class Ng{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function qg(e){return new Ng(e,!0)}function zg(e){return new Ng(e,!1)}const qS={draw(e,t){const r=Zt(t/vr);e.moveTo(r,0),e.arc(0,0,r,0,_r)}},wO={draw(e,t){const r=Zt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Wg=Zt(1/3),zS=Wg*2,_O={draw(e,t){const r=Zt(t/zS),i=r*Wg;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},SO={draw(e,t){const r=Zt(t),i=-r/2;e.rect(i,i,r,r)}},WS=.8908130915292852,Hg=ge(vr/10)/ge(7*vr/10),HS=ge(_r/10)*Hg,US=-ar(_r/10)*Hg,vO={draw(e,t){const r=Zt(t*WS),i=HS*r,a=US*r;e.moveTo(0,-r),e.lineTo(i,a);for(let o=1;o<5;++o){const n=_r*o/5,s=ar(n),l=ge(n);e.lineTo(l*r,-s*r),e.lineTo(s*i-l*a,l*i+s*a)}e.closePath()}},qs=Zt(3),BO={draw(e,t){const r=-Zt(t/(qs*3));e.moveTo(0,r*2),e.lineTo(-qs*r,-r),e.lineTo(qs*r,-r),e.closePath()}},Se=-.5,ve=Zt(3)/2,Tl=1/Zt(12),YS=(Tl/2+1)*3,LO={draw(e,t){const r=Zt(t/YS),i=r/2,a=r*Tl,o=i,n=r*Tl+r,s=-o,l=n;e.moveTo(i,a),e.lineTo(o,n),e.lineTo(s,l),e.lineTo(Se*i-ve*a,ve*i+Se*a),e.lineTo(Se*o-ve*n,ve*o+Se*n),e.lineTo(Se*s-ve*l,ve*s+Se*l),e.lineTo(Se*i+ve*a,Se*a-ve*i),e.lineTo(Se*o+ve*n,Se*n-ve*o),e.lineTo(Se*s+ve*l,Se*l-ve*s),e.closePath()}};function FO(e,t){let r=null,i=jn(a);e=typeof e=="function"?e:ut(e||qS),t=typeof t=="function"?t:ut(t===void 0?64:+t);function a(){let o;if(r||(r=o=i()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:ut(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:ut(+o),a):t},a.context=function(o){return arguments.length?(r=o??null,a):r},a}function Br(){}function hn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Xn(e){this._context=e}Xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wl(e){return new Xn(e)}function Ug(e){this._context=e}Ug.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:hn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jS(e){return new Ug(e)}function Yg(e){this._context=e}Yg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:hn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function GS(e){return new Yg(e)}function jg(e,t){this._basis=new Xn(e),this._beta=t}jg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],o=e[r]-i,n=t[r]-a,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*o),this._beta*t[s]+(1-this._beta)*(a+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const XS=function e(t){function r(i){return t===1?new Xn(i):new jg(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function cn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Ih(e,t){this._context=e,this._k=(1-t)/6}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:cn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:cn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Gg=function e(t){function r(i){return new Ih(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Dh(e,t){this._context=e,this._k=(1-t)/6}Dh.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const VS=function e(t){function r(i){return new Dh(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Ph(e,t){this._context=e,this._k=(1-t)/6}Ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ZS=function e(t){function r(i){return new Ph(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Rh(e,t,r){var i=e._x1,a=e._y1,o=e._x2,n=e._y2;if(e._l01_a>te){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>te){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*h+e._x1*e._l23_2a-t*e._l12_2a)/c,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,a,o,n,e._x2,e._y2)}function Xg(e,t){this._context=e,this._alpha=t}Xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Rh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vg=function e(t){function r(i){return t?new Xg(i,t):new Ih(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Zg(e,t){this._context=e,this._alpha=t}Zg.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Rh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const QS=function e(t){function r(i){return t?new Zg(i,t):new Dh(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Qg(e,t){this._context=e,this._alpha=t}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Rh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const KS=function e(t){function r(i){return t?new Qg(i,t):new Ph(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Kg(e){this._context=e}Kg.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function JS(e){return new Kg(e)}function Vu(e){return e<0?-1:1}function Zu(e,t,r){var i=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(i||a<0&&-0),n=(r-e._y1)/(a||i<0&&-0),s=(o*a+n*i)/(i+a);return(Vu(o)+Vu(n))*Math.min(Math.abs(o),Math.abs(n),.5*Math.abs(s))||0}function Qu(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zs(e,t,r){var i=e._x0,a=e._y0,o=e._x1,n=e._y1,s=(o-i)/3;e._context.bezierCurveTo(i+s,a+s*t,o-s,n-s*r,o,n)}function un(e){this._context=e}un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:zs(this,this._t0,Qu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,zs(this,Qu(this,r=Zu(this,e,t)),r);break;default:zs(this,this._t0,r=Zu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Jg(e){this._context=new tp(e)}(Jg.prototype=Object.create(un.prototype)).point=function(e,t){un.prototype.point.call(this,t,e)};function tp(e){this._context=e}tp.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,a,o){this._context.bezierCurveTo(t,e,i,r,o,a)}};function ep(e){return new un(e)}function rp(e){return new Jg(e)}function ip(e){this._context=e}ip.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Ku(e),a=Ku(t),o=0,n=1;n<r;++o,++n)this._context.bezierCurveTo(i[0][o],a[0][o],i[1][o],a[1][o],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ku(e){var t,r=e.length-1,i,a=new Array(r),o=new Array(r),n=new Array(r);for(a[0]=0,o[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,n[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/o[t-1],o[t]-=i,n[t]-=i*n[t-1];for(a[r-1]=n[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(n[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function ap(e){return new ip(e)}function Vn(e,t){this._context=e,this._t=t}Vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function op(e){return new Vn(e,.5)}function np(e){return new Vn(e,0)}function sp(e){return new Vn(e,1)}function za(e,t){if((n=e.length)>1)for(var r=1,i,a,o=e[t[0]],n,s=o.length;r<n;++r)for(a=o,o=e[t[r]],i=0;i<s;++i)o[i][1]+=o[i][0]=isNaN(a[i][1])?a[i][0]:a[i][1]}function Ju(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function tv(e,t){return e[t]}function ev(e){const t=[];return t.key=e,t}function MO(){var e=ut([]),t=Ju,r=za,i=tv;function a(o){var n=Array.from(e.apply(this,arguments),ev),s,l=n.length,h=-1,c;for(const u of o)for(s=0,++h;s<l;++s)(n[s][h]=[0,+i(u,n[s].key,h,o)]).data=u;for(s=0,c=Gn(t(n));s<l;++s)n[c[s]].index=s;return r(n,c),n}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ut(Array.from(o)),a):e},a.value=function(o){return arguments.length?(i=typeof o=="function"?o:ut(+o),a):i},a.order=function(o){return arguments.length?(t=o==null?Ju:typeof o=="function"?o:ut(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??za,a):r},a}function AO(e,t){if((i=e.length)>0){for(var r,i,a=0,o=e[0].length,n;a<o;++a){for(n=r=0;r<i;++r)n+=e[r][a][1]||0;if(n)for(r=0;r<i;++r)e[r][a][1]/=n}za(e,t)}}function EO(e,t){if((a=e.length)>0){for(var r=0,i=e[t[0]],a,o=i.length;r<o;++r){for(var n=0,s=0;n<a;++n)s+=e[n][r][1]||0;i[r][1]+=i[r][0]=-s/2}za(e,t)}}function $O(e,t){if(!(!((n=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,i=1,a,o,n;i<o;++i){for(var s=0,l=0,h=0;s<n;++s){for(var c=e[t[s]],u=c[i][1]||0,f=c[i-1][1]||0,d=(u-f)/2,g=0;g<s;++g){var p=e[t[g]],m=p[i][1]||0,C=p[i-1][1]||0;d+=m-C}l+=u,h+=d*u}a[i-1][1]+=a[i-1][0]=r,l&&(r-=h/l)}a[i-1][1]+=a[i-1][0]=r,za(e,t)}}function Sa(e,t,r){this.k=e,this.x=t,this.y=r}Sa.prototype={constructor:Sa,scale:function(e){return e===1?this:new Sa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Sa(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+")"}};Sa.prototype;var rv=y(e=>{var a;const{securityLevel:t}=Ct();let r=ft("body");if(t==="sandbox"){const n=((a=ft(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ft(n.body)}return r.select(`#${e}`)},"selectSvgElement");function Nh(e){return typeof e>"u"||e===null}y(Nh,"isNothing");function lp(e){return typeof e=="object"&&e!==null}y(lp,"isObject");function hp(e){return Array.isArray(e)?e:Nh(e)?[]:[e]}y(hp,"toArray");function cp(e,t){var r,i,a,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)a=o[r],e[a]=t[a];return e}y(cp,"extend");function up(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}y(up,"repeat");function dp(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}y(dp,"isNegativeZero");var iv=Nh,av=lp,ov=hp,nv=up,sv=dp,lv=cp,zt={isNothing:iv,isObject:av,toArray:ov,repeat:nv,isNegativeZero:sv,extend:lv};function qh(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+=`
124
+
125
+ `+e.mark.snippet),i+" "+r):i}y(qh,"formatError");function Xi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}y(Xi,"YAMLException$1");Xi.prototype=Object.create(Error.prototype);Xi.prototype.constructor=Xi;Xi.prototype.toString=y(function(t){return this.name+": "+qh(this,t)},"toString");var me=Xi;function Po(e,t,r,i,a){var o="",n="",s=Math.floor(a/2)-1;return i-t>s&&(o=" ... ",t=i-s+o.length),r-i>s&&(n=" ...",r=i+s-n.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+n,pos:i-t+o.length}}y(Po,"getLine");function Ro(e,t){return zt.repeat(" ",t-e.length)+e}y(Ro,"padStart");function fp(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=[],o,n=-1;o=r.exec(e.buffer);)a.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var s="",l,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Po(e.buffer,i[n-l],a[n-l],e.position-(i[n]-i[n-l]),u),s=zt.repeat(" ",t.indent)+Ro((e.line-l+1).toString(),c)+" | "+h.str+`
126
+ `+s;for(h=Po(e.buffer,i[n],a[n],e.position,u),s+=zt.repeat(" ",t.indent)+Ro((e.line+1).toString(),c)+" | "+h.str+`
127
+ `,s+=zt.repeat("-",t.indent+c+3+h.pos)+`^
128
+ `,l=1;l<=t.linesAfter&&!(n+l>=a.length);l++)h=Po(e.buffer,i[n+l],a[n+l],e.position-(i[n]-i[n+l]),u),s+=zt.repeat(" ",t.indent)+Ro((e.line+l+1).toString(),c)+" | "+h.str+`
129
+ `;return s.replace(/\n$/,"")}y(fp,"makeSnippet");var hv=fp,cv=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],uv=["scalar","sequence","mapping"];function gp(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}y(gp,"compileStyleAliases");function pp(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(cv.indexOf(r)===-1)throw new me('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=gp(t.styleAliases||null),uv.indexOf(this.kind)===-1)throw new me('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}y(pp,"Type$1");var ie=pp;function _l(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(o,n){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(a=n)}),r[a]=i}),r}y(_l,"compileList");function mp(){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(y(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}y(mp,"compileMap");function dn(e){return this.extend(e)}y(dn,"Schema$1");dn.prototype.extend=y(function(t){var r=[],i=[];if(t instanceof ie)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 me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof ie))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof ie))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(dn.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=_l(a,"implicit"),a.compiledExplicit=_l(a,"explicit"),a.compiledTypeMap=mp(a.compiledImplicit,a.compiledExplicit),a},"extend");var dv=dn,fv=new ie("tag:yaml.org,2002:str",{kind:"scalar",construct:y(function(e){return e!==null?e:""},"construct")}),gv=new ie("tag:yaml.org,2002:seq",{kind:"sequence",construct:y(function(e){return e!==null?e:[]},"construct")}),pv=new ie("tag:yaml.org,2002:map",{kind:"mapping",construct:y(function(e){return e!==null?e:{}},"construct")}),mv=new dv({explicit:[fv,gv,pv]});function yp(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}y(yp,"resolveYamlNull");function Cp(){return null}y(Cp,"constructYamlNull");function xp(e){return e===null}y(xp,"isNull");var yv=new ie("tag:yaml.org,2002:null",{kind:"scalar",resolve:yp,construct:Cp,predicate:xp,represent:{canonical:y(function(){return"~"},"canonical"),lowercase:y(function(){return"null"},"lowercase"),uppercase:y(function(){return"NULL"},"uppercase"),camelcase:y(function(){return"Null"},"camelcase"),empty:y(function(){return""},"empty")},defaultStyle:"lowercase"});function bp(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")}y(bp,"resolveYamlBoolean");function kp(e){return e==="true"||e==="True"||e==="TRUE"}y(kp,"constructYamlBoolean");function Tp(e){return Object.prototype.toString.call(e)==="[object Boolean]"}y(Tp,"isBoolean");var Cv=new ie("tag:yaml.org,2002:bool",{kind:"scalar",resolve:bp,construct:kp,predicate:Tp,represent:{lowercase:y(function(e){return e?"true":"false"},"lowercase"),uppercase:y(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:y(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function wp(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}y(wp,"isHexCode");function _p(e){return 48<=e&&e<=55}y(_p,"isOctCode");function Sp(e){return 48<=e&&e<=57}y(Sp,"isDecCode");function vp(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(!wp(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!_p(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Sp(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}y(vp,"resolveYamlInteger");function Bp(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)}y(Bp,"constructYamlInteger");function Lp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!zt.isNegativeZero(e)}y(Lp,"isInteger");var xv=new ie("tag:yaml.org,2002:int",{kind:"scalar",resolve:vp,construct:Bp,predicate:Lp,represent:{binary:y(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:y(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:y(function(e){return e.toString(10)},"decimal"),hexadecimal:y(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"]}}),bv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Fp(e){return!(e===null||!bv.test(e)||e[e.length-1]==="_")}y(Fp,"resolveYamlFloat");function Mp(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)}y(Mp,"constructYamlFloat");var kv=/^[-+]?[0-9]+e/;function Ap(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(zt.isNegativeZero(e))return"-0.0";return r=e.toString(10),kv.test(r)?r.replace("e",".e"):r}y(Ap,"representYamlFloat");function Ep(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||zt.isNegativeZero(e))}y(Ep,"isFloat");var Tv=new ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:Fp,construct:Mp,predicate:Ep,represent:Ap,defaultStyle:"lowercase"}),$p=mv.extend({implicit:[yv,Cv,xv,Tv]}),wv=$p,Op=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ip=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 Dp(e){return e===null?!1:Op.exec(e)!==null||Ip.exec(e)!==null}y(Dp,"resolveYamlTimestamp");function Pp(e){var t,r,i,a,o,n,s,l=0,h=null,c,u,f;if(t=Op.exec(e),t===null&&(t=Ip.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(o=+t[4],n=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),f=new Date(Date.UTC(r,i,a,o,n,s,l)),h&&f.setTime(f.getTime()-h),f}y(Pp,"constructYamlTimestamp");function Rp(e){return e.toISOString()}y(Rp,"representYamlTimestamp");var _v=new ie("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Dp,construct:Pp,instanceOf:Date,represent:Rp});function Np(e){return e==="<<"||e===null}y(Np,"resolveYamlMerge");var Sv=new ie("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Np}),zh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
130
+ \r`;function qp(e){if(e===null)return!1;var t,r,i=0,a=e.length,o=zh;for(r=0;r<a;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}y(qp,"resolveYamlBinary");function zp(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,o=zh,n=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)),n=n<<6|o.indexOf(i.charAt(t));return r=a%4*6,r===0?(s.push(n>>16&255),s.push(n>>8&255),s.push(n&255)):r===18?(s.push(n>>10&255),s.push(n>>2&255)):r===12&&s.push(n>>4&255),new Uint8Array(s)}y(zp,"constructYamlBinary");function Wp(e){var t="",r=0,i,a,o=e.length,n=zh;for(i=0;i<o;i++)i%3===0&&i&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[i];return a=o%3,a===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):a===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):a===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}y(Wp,"representYamlBinary");function Hp(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}y(Hp,"isBinary");var vv=new ie("tag:yaml.org,2002:binary",{kind:"scalar",resolve:qp,construct:zp,predicate:Hp,represent:Wp}),Bv=Object.prototype.hasOwnProperty,Lv=Object.prototype.toString;function Up(e){if(e===null)return!0;var t=[],r,i,a,o,n,s=e;for(r=0,i=s.length;r<i;r+=1){if(a=s[r],n=!1,Lv.call(a)!=="[object Object]")return!1;for(o in a)if(Bv.call(a,o))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}y(Up,"resolveYamlOmap");function Yp(e){return e!==null?e:[]}y(Yp,"constructYamlOmap");var Fv=new ie("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Up,construct:Yp}),Mv=Object.prototype.toString;function jp(e){if(e===null)return!0;var t,r,i,a,o,n=e;for(o=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(i=n[t],Mv.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;o[t]=[a[0],i[a[0]]]}return!0}y(jp,"resolveYamlPairs");function Gp(e){if(e===null)return[];var t,r,i,a,o,n=e;for(o=new Array(n.length),t=0,r=n.length;t<r;t+=1)i=n[t],a=Object.keys(i),o[t]=[a[0],i[a[0]]];return o}y(Gp,"constructYamlPairs");var Av=new ie("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jp,construct:Gp}),Ev=Object.prototype.hasOwnProperty;function Xp(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ev.call(r,t)&&r[t]!==null)return!1;return!0}y(Xp,"resolveYamlSet");function Vp(e){return e!==null?e:{}}y(Vp,"constructYamlSet");var $v=new ie("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xp,construct:Vp}),Zp=wv.extend({implicit:[_v,Sv],explicit:[vv,Fv,Av,$v]}),Lr=Object.prototype.hasOwnProperty,fn=1,Qp=2,Kp=3,gn=4,Ws=1,Ov=2,td=3,Iv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Dv=/[\x85\u2028\u2029]/,Pv=/[,\[\]\{\}]/,Jp=/^(?:!|!!|![a-z\-]+!)$/i,tm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Sl(e){return Object.prototype.toString.call(e)}y(Sl,"_class");function Pe(e){return e===10||e===13}y(Pe,"is_EOL");function Sr(e){return e===9||e===32}y(Sr,"is_WHITE_SPACE");function se(e){return e===9||e===32||e===10||e===13}y(se,"is_WS_OR_EOL");function Ur(e){return e===44||e===91||e===93||e===123||e===125}y(Ur,"is_FLOW_INDICATOR");function em(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}y(em,"fromHexCode");function rm(e){return e===120?2:e===117?4:e===85?8:0}y(rm,"escapedHexLen");function im(e){return 48<=e&&e<=57?e-48:-1}y(im,"fromDecimalCode");function vl(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
131
+ `: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":""}y(vl,"simpleEscapeSequence");function am(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}y(am,"charFromCodepoint");function Wh(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}y(Wh,"setProperty");var om=new Array(256),nm=new Array(256);for(Dr=0;Dr<256;Dr++)om[Dr]=vl(Dr)?1:0,nm[Dr]=vl(Dr);var Dr;function sm(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zp,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=[]}y(sm,"State$1");function Hh(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=hv(r),new me(t,r)}y(Hh,"generateError");function tt(e,t){throw Hh(e,t)}y(tt,"throwError");function Wa(e,t){e.onWarning&&e.onWarning.call(null,Hh(e,t))}y(Wa,"throwWarning");var ed={YAML:y(function(t,r,i){var a,o,n;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&tt(t,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),n=parseInt(a[2],10),o!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&Wa(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:y(function(t,r,i){var a,o;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),a=i[0],o=i[1],Jp.test(a)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Lr.call(t.tagMap,a)&&tt(t,'there is a previously declared suffix for "'+a+'" tag handle'),tm.test(o)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{tt(t,"tag prefix is malformed: "+o)}t.tagMap[a]=o},"handleTagDirective")};function hr(e,t,r,i){var a,o,n,s;if(t<r){if(s=e.input.slice(t,r),i)for(a=0,o=s.length;a<o;a+=1)n=s.charCodeAt(a),n===9||32<=n&&n<=1114111||tt(e,"expected valid JSON character");else Iv.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}y(hr,"captureSegment");function Bl(e,t,r,i){var a,o,n,s;for(zt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),n=0,s=a.length;n<s;n+=1)o=a[n],Lr.call(t,o)||(Wh(t,o,r[o]),i[o]=!0)}y(Bl,"mergeMappings");function Yr(e,t,r,i,a,o,n,s,l){var h,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,c=a.length;h<c;h+=1)Array.isArray(a[h])&&tt(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Sl(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&Sl(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(h=0,c=o.length;h<c;h+=1)Bl(e,t,o[h],r);else Bl(e,t,o,r);else!e.json&&!Lr.call(r,a)&&Lr.call(t,a)&&(e.line=n||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),Wh(t,a,o),delete r[a];return t}y(Yr,"storeMappingPair");function Zn(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}y(Zn,"readLineBreak");function $t(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Sr(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(Pe(a))for(Zn(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&&Wa(e,"deficient indentation"),i}y($t,"skipSeparationSpace");function io(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||se(r)))}y(io,"testDocumentSeparator");function Qn(e,t){t===1?e.result+=" ":t>1&&(e.result+=zt.repeat(`
132
+ `,t-1))}y(Qn,"writeFoldedLines");function lm(e,t,r){var i,a,o,n,s,l,h,c,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),se(d)||Ur(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),se(a)||r&&Ur(a)))return!1;for(e.kind="scalar",e.result="",o=n=e.position,s=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),se(a)||r&&Ur(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),se(i))break}else{if(e.position===e.lineStart&&io(e)||r&&Ur(d))break;if(Pe(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,$t(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=h,e.lineIndent=c;break}}s&&(hr(e,o,n,!1),Qn(e,e.line-l),o=n=e.position,s=!1),Sr(d)||(n=e.position+1),d=e.input.charCodeAt(++e.position)}return hr(e,o,n,!1),e.result?!0:(e.kind=u,e.result=f,!1)}y(lm,"readPlainScalar");function hm(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(hr(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 Pe(r)?(hr(e,i,a,!0),Qn(e,$t(e,!1,t)),i=a=e.position):e.position===e.lineStart&&io(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}y(hm,"readSingleQuotedScalar");function cm(e,t){var r,i,a,o,n,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 hr(e,r,e.position,!0),e.position++,!0;if(s===92){if(hr(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Pe(s))$t(e,!1,t);else if(s<256&&om[s])e.result+=nm[s],e.position++;else if((n=rm(s))>0){for(a=n,o=0;a>0;a--)s=e.input.charCodeAt(++e.position),(n=em(s))>=0?o=(o<<4)+n:tt(e,"expected hexadecimal character");e.result+=am(o),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Pe(s)?(hr(e,r,i,!0),Qn(e,$t(e,!1,t)),r=i=e.position):e.position===e.lineStart&&io(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}y(cm,"readDoubleQuotedScalar");function um(e,t){var r=!0,i,a,o,n=e.tag,s,l=e.anchor,h,c,u,f,d,g=Object.create(null),p,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,s=[];else if(b===123)c=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($t(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=n,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=s,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),m=p=C=null,u=f=!1,b===63&&(h=e.input.charCodeAt(e.position+1),se(h)&&(u=f=!0,e.position++,$t(e,!0,t))),i=e.line,a=e.lineStart,o=e.position,Jr(e,t,fn,!1,!0),m=e.tag,p=e.result,$t(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),$t(e,!0,t),Jr(e,t,fn,!1,!0),C=e.result),d?Yr(e,s,g,m,p,C,i,a,o):u?s.push(Yr(e,null,g,m,p,C,i,a,o)):s.push(p),$t(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}y(um,"readFlowCollection");function dm(e,t){var r,i,a=Ws,o=!1,n=!1,s=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Ws===a?a=u===43?td:Ov:tt(e,"repeat of a chomping mode identifier");else if((c=im(u))>=0)c===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?tt(e,"repeat of an indentation width identifier"):(s=t+c-1,n=!0);else break;if(Sr(u)){do u=e.input.charCodeAt(++e.position);while(Sr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Pe(u)&&u!==0)}for(;u!==0;){for(Zn(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!n||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>s&&(s=e.lineIndent),Pe(u)){l++;continue}if(e.lineIndent<s){a===td?e.result+=zt.repeat(`
133
+ `,o?1+l:l):a===Ws&&o&&(e.result+=`
134
+ `);break}for(i?Sr(u)?(h=!0,e.result+=zt.repeat(`
135
+ `,o?1+l:l)):h?(h=!1,e.result+=zt.repeat(`
136
+ `,l+1)):l===0?o&&(e.result+=" "):e.result+=zt.repeat(`
137
+ `,l):e.result+=zt.repeat(`
138
+ `,o?1+l:l),o=!0,n=!0,l=0,r=e.position;!Pe(u)&&u!==0;)u=e.input.charCodeAt(++e.position);hr(e,r,e.position,!1)}return!0}y(dm,"readBlockScalar");function Ll(e,t){var r,i=e.tag,a=e.anchor,o=[],n,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!se(n))));){if(s=!0,e.position++,$t(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Jr(e,t,Kp,!1,!0),o.push(e.result),$t(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=o,!0):!1}y(Ll,"readBlockSequence");function fm(e,t,r){var i,a,o,n,s,l,h=e.tag,c=e.anchor,u={},f=Object.create(null),d=null,g=null,p=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&se(i))b===63?(m&&(Yr(e,u,f,d,g,null,n,s,l),d=g=p=null),C=!0,m=!0,a=!0):m?(m=!1,a=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(n=e.line,s=e.lineStart,l=e.position,!Jr(e,r,Qp,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);Sr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),se(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Yr(e,u,f,d,g,null,n,s,l),d=g=p=null),C=!0,m=!1,a=!1,d=e.tag,g=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===o||e.lineIndent>t)&&(m&&(n=e.line,s=e.lineStart,l=e.position),Jr(e,t,gn,!0,a)&&(m?g=e.result:p=e.result),m||(Yr(e,u,f,d,g,p,n,s,l),d=g=p=null),$t(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Yr(e,u,f,d,g,null,n,s,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}y(fm,"readBlockMapping");function gm(e){var t,r=!1,i=!1,a,o,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(i=!0,a="!!",n=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(o=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!se(n);)n===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Jp.test(a)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Pv.test(o)&&tt(e,"tag suffix cannot contain flow indicator characters")}o&&!tm.test(o)&&tt(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{tt(e,"tag name is malformed: "+o)}return r?e.tag=o:Lr.call(e.tagMap,a)?e.tag=e.tagMap[a]+o:a==="!"?e.tag="!"+o:a==="!!"?e.tag="tag:yaml.org,2002:"+o:tt(e,'undeclared tag handle "'+a+'"'),!0}y(gm,"readTagProperty");function pm(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!se(r)&&!Ur(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}y(pm,"readAnchorProperty");function mm(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&&!se(i)&&!Ur(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Lr.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],$t(e,!0,-1),!0}y(mm,"readAlias");function Jr(e,t,r,i,a){var o,n,s,l=1,h=!1,c=!1,u,f,d,g,p,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=n=s=gn===r||Kp===r,i&&$t(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;gm(e)||pm(e);)$t(e,!0,-1)?(h=!0,s=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=h||a),(l===1||gn===r)&&(fn===r||Qp===r?p=t:p=t+1,m=e.position-e.lineStart,l===1?s&&(Ll(e,m)||fm(e,m,p))||um(e,p)?c=!0:(n&&dm(e,p)||hm(e,p)||cm(e,p)?c=!0:mm(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):lm(e,p,fn===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=s&&Ll(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(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(Lr.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||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}y(Jr,"composeNode");function ym(e){var t=e.position,r,i,a,o=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&($t(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(o=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!se(n);)n=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&tt(e,"directive name must not be less than one character in length");n!==0;){for(;Sr(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!Pe(n));break}if(Pe(n))break;for(r=e.position;n!==0&&!se(n);)n=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}n!==0&&Zn(e),Lr.call(ed,i)?ed[i](e,i,a):Wa(e,'unknown document directive "'+i+'"')}if($t(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,$t(e,!0,-1)):o&&tt(e,"directives end mark is expected"),Jr(e,e.lineIndent-1,gn,!1,!0),$t(e,!0,-1),e.checkLineBreaks&&Dv.test(e.input.slice(t,e.position))&&Wa(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&io(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,$t(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}y(ym,"readDocument");function Uh(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
139
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new sm(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ym(r);return r.documents}y(Uh,"loadDocuments");function Rv(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Uh(e,r);if(typeof t!="function")return i;for(var a=0,o=i.length;a<o;a+=1)t(i[a])}y(Rv,"loadAll$1");function Cm(e,t){var r=Uh(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new me("expected a single document in the stream, but found more")}}y(Cm,"load$1");var Nv=Cm,qv={load:Nv},xm=Object.prototype.toString,bm=Object.prototype.hasOwnProperty,Yh=65279,zv=9,Ha=10,Wv=13,Hv=32,Uv=33,Yv=34,Fl=35,jv=37,Gv=38,Xv=39,Vv=42,km=44,Zv=45,pn=58,Qv=61,Kv=62,Jv=63,tB=64,Tm=91,wm=93,eB=96,_m=123,rB=124,Sm=125,ae={};ae[0]="\\0";ae[7]="\\a";ae[8]="\\b";ae[9]="\\t";ae[10]="\\n";ae[11]="\\v";ae[12]="\\f";ae[13]="\\r";ae[27]="\\e";ae[34]='\\"';ae[92]="\\\\";ae[133]="\\N";ae[160]="\\_";ae[8232]="\\L";ae[8233]="\\P";var iB=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],aB=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function vm(e,t){var r,i,a,o,n,s,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,o=i.length;a<o;a+=1)n=i[a],s=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&bm.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[n]=s;return r}y(vm,"compileStyleMap");function Bm(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 me("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+zt.repeat("0",i-t.length)+t}y(Bm,"encodeHex");var oB=1,Ua=2;function Lm(e){this.schema=e.schema||Zp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=zt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=vm(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==='"'?Ua:oB,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}y(Lm,"State");function Ml(e,t){for(var r=zt.repeat(" ",t),i=0,a=-1,o="",n,s=e.length;i<s;)a=e.indexOf(`
140
+ `,i),a===-1?(n=e.slice(i),i=s):(n=e.slice(i,a+1),i=a+1),n.length&&n!==`
141
+ `&&(o+=r),o+=n;return o}y(Ml,"indentString");function mn(e,t){return`
142
+ `+zt.repeat(" ",e.indent*t)}y(mn,"generateNextLine");function Fm(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}y(Fm,"testImplicitResolving");function Ya(e){return e===Hv||e===zv}y(Ya,"isWhitespace");function Vi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Yh||65536<=e&&e<=1114111}y(Vi,"isPrintable");function Al(e){return Vi(e)&&e!==Yh&&e!==Wv&&e!==Ha}y(Al,"isNsCharOrWhitespace");function El(e,t,r){var i=Al(e),a=i&&!Ya(e);return(r?i:i&&e!==km&&e!==Tm&&e!==wm&&e!==_m&&e!==Sm)&&e!==Fl&&!(t===pn&&!a)||Al(t)&&!Ya(t)&&e===Fl||t===pn&&a}y(El,"isPlainSafe");function Mm(e){return Vi(e)&&e!==Yh&&!Ya(e)&&e!==Zv&&e!==Jv&&e!==pn&&e!==km&&e!==Tm&&e!==wm&&e!==_m&&e!==Sm&&e!==Fl&&e!==Gv&&e!==Vv&&e!==Uv&&e!==rB&&e!==Qv&&e!==Kv&&e!==Xv&&e!==Yv&&e!==jv&&e!==tB&&e!==eB}y(Mm,"isPlainSafeFirst");function Am(e){return!Ya(e)&&e!==pn}y(Am,"isPlainSafeLast");function wi(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}y(wi,"codePointAt");function jh(e){var t=/^\n* /;return t.test(e)}y(jh,"needIndentIndicator");var Em=1,$l=2,$m=3,Om=4,bi=5;function Im(e,t,r,i,a,o,n,s){var l,h=0,c=null,u=!1,f=!1,d=i!==-1,g=-1,p=Mm(wi(e,0))&&Am(wi(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=wi(e,l),!Vi(h))return bi;p=p&&El(h,c,s),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=wi(e,l),h===Ha)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Vi(h))return bi;p=p&&El(h,c,s),c=h}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?p&&!n&&!a(e)?Em:o===Ua?bi:$l:r>9&&jh(e)?bi:n?o===Ua?bi:$l:f?Om:$m}y(Im,"chooseScalarStyle");function Dm(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===Ua?'""':"''";if(!e.noCompatMode&&(iB.indexOf(t)!==-1||aB.test(t)))return e.quotingType===Ua?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Fm(e,h)}switch(y(l,"testAmbiguity"),Im(t,s,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,a)){case Em:return t;case $l:return"'"+t.replace(/'/g,"''")+"'";case $m:return"|"+Ol(t,e.indent)+Il(Ml(t,o));case Om:return">"+Ol(t,e.indent)+Il(Ml(Pm(t,n),o));case bi:return'"'+Rm(t)+'"';default:throw new me("impossible error: invalid scalar style")}}()}y(Dm,"writeScalar");function Ol(e,t){var r=jh(e)?String(t):"",i=e[e.length-1]===`
143
+ `,a=i&&(e[e.length-2]===`
144
+ `||e===`
145
+ `),o=a?"+":i?"":"-";return r+o+`
146
+ `}y(Ol,"blockHeader");function Il(e){return e[e.length-1]===`
147
+ `?e.slice(0,-1):e}y(Il,"dropEndingNewline");function Pm(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(`
148
+ `);return h=h!==-1?h:e.length,r.lastIndex=h,Dl(e.slice(0,h),t)}(),a=e[0]===`
149
+ `||e[0]===" ",o,n;n=r.exec(e);){var s=n[1],l=n[2];o=l[0]===" ",i+=s+(!a&&!o&&l!==""?`
150
+ `:"")+Dl(l,t),a=o}return i}y(Pm,"foldString");function Dl(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,o,n=0,s=0,l="";i=r.exec(e);)s=i.index,s-a>t&&(o=n>a?n:s,l+=`
151
+ `+e.slice(a,o),a=o+1),n=s;return l+=`
152
+ `,e.length-a>t&&n>a?l+=e.slice(a,n)+`
153
+ `+e.slice(n+1):l+=e.slice(a),l.slice(1)}y(Dl,"foldLine");function Rm(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=wi(e,a),i=ae[r],!i&&Vi(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Bm(r);return t}y(Rm,"escapeString");function Nm(e,t,r){var i="",a=e.tag,o,n,s;for(o=0,n=r.length;o<n;o+=1)s=r[o],e.replacer&&(s=e.replacer.call(r,String(o),s)),(Xe(e,t,s,!1,!1)||typeof s>"u"&&Xe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}y(Nm,"writeFlowSequence");function Pl(e,t,r,i){var a="",o=e.tag,n,s,l;for(n=0,s=r.length;n<s;n+=1)l=r[n],e.replacer&&(l=e.replacer.call(r,String(n),l)),(Xe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Xe(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=mn(e,t)),e.dump&&Ha===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=o,e.dump=a||"[]"}y(Pl,"writeBlockSequence");function qm(e,t,r){var i="",a=e.tag,o=Object.keys(r),n,s,l,h,c;for(n=0,s=o.length;n<s;n+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Xe(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xe(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}y(qm,"writeFlowMapping");function zm(e,t,r,i){var a="",o=e.tag,n=Object.keys(r),s,l,h,c,u,f;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new me("sortKeys must be a boolean or a function");for(s=0,l=n.length;s<l;s+=1)f="",(!i||a!=="")&&(f+=mn(e,t)),h=n[s],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Xe(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ha===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=mn(e,t)),Xe(e,t+1,c,!0,u)&&(e.dump&&Ha===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=o,e.dump=a||"{}"}y(zm,"writeBlockMapping");function Rl(e,t,r){var i,a,o,n,s,l;for(a=r?e.explicitTypes:e.implicitTypes,o=0,n=a.length;o<n;o+=1)if(s=a[o],(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,xm.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(bm.call(s.represent,l))i=s.represent[l](t,l);else throw new me("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}y(Rl,"detectType");function Xe(e,t,r,i,a,o,n){e.tag=null,e.dump=r,Rl(e,r,!1)||Rl(e,r,!0);var s=xm.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",u,f;if(c&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(zm(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(qm(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?Pl(e,t-1,e.dump,a):Pl(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Nm(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Dm(e,e.dump,t,o,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new me("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}y(Xe,"writeNode");function Wm(e,t){var r=[],i=[],a,o;for(yn(e,r,i),a=0,o=i.length;a<o;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(o)}y(Wm,"getDuplicateReferences");function yn(e,t,r){var i,a,o;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,o=e.length;a<o;a+=1)yn(e[a],t,r);else for(i=Object.keys(e),a=0,o=i.length;a<o;a+=1)yn(e[i[a]],t,r)}y(yn,"inspectNode");function nB(e,t){t=t||{};var r=new Lm(t);r.noRefs||Wm(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Xe(r,0,i,!0,!0)?r.dump+`
154
+ `:""}y(nB,"dump$1");function sB(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.")}}y(sB,"renamed");var lB=$p,hB=qv.load;/*! Bundled license information:
155
+
156
+ js-yaml/dist/js-yaml.mjs:
157
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
158
+ */var ga=y((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),ee={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},rd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function va(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Lt(e),t=Lt(t);const[r,i]=[e.x,e.y],[a,o]=[t.x,t.y],n=a-r,s=o-i;return{angle:Math.atan(s/n),deltaX:n,deltaY:s}}y(va,"calculateDeltaAndAngle");var Lt=y(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),cB=y(e=>({x:y(function(t,r,i){let a=0;const o=Lt(i[0]).x<Lt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ee,e.arrowTypeStart)){const{angle:d,deltaX:g}=va(i[0],i[1]);a=ee[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ee,e.arrowTypeEnd)){const{angle:d,deltaX:g}=va(i[i.length-1],i[i.length-2]);a=ee[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const n=Math.abs(Lt(t).x-Lt(i[i.length-1]).x),s=Math.abs(Lt(t).y-Lt(i[i.length-1]).y),l=Math.abs(Lt(t).x-Lt(i[0]).x),h=Math.abs(Lt(t).y-Lt(i[0]).y),c=ee[e.arrowTypeStart],u=ee[e.arrowTypeEnd],f=1;if(n<u&&n>0&&s<u){let d=u+f-n;d*=o==="right"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=o==="right"?-1:1,a+=d}return Lt(t).x+a},"x"),y:y(function(t,r,i){let a=0;const o=Lt(i[0]).y<Lt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ee,e.arrowTypeStart)){const{angle:d,deltaY:g}=va(i[0],i[1]);a=ee[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ee,e.arrowTypeEnd)){const{angle:d,deltaY:g}=va(i[i.length-1],i[i.length-2]);a=ee[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const n=Math.abs(Lt(t).y-Lt(i[i.length-1]).y),s=Math.abs(Lt(t).x-Lt(i[i.length-1]).x),l=Math.abs(Lt(t).y-Lt(i[0]).y),h=Math.abs(Lt(t).x-Lt(i[0]).x),c=ee[e.arrowTypeStart],u=ee[e.arrowTypeEnd],f=1;if(n<u&&n>0&&s<u){let d=u+f-n;d*=o==="up"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=o==="up"?-1:1,a+=d}return Lt(t).y+a},"y")}),"getLineFunctionsWithOffset"),wo={},Nt={},id;function uB(){return id||(id=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.BLANK_URL=Nt.relativeFirstCharacters=Nt.whitespaceEscapeCharsRegex=Nt.urlSchemeRegex=Nt.ctrlCharactersRegex=Nt.htmlCtrlEntityRegex=Nt.htmlEntitiesRegex=Nt.invalidProtocolRegex=void 0,Nt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Nt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Nt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Nt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Nt.urlSchemeRegex=/^.+(:|&colon;)/gim,Nt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Nt.relativeFirstCharacters=[".","/"],Nt.BLANK_URL="about:blank"),Nt}var ad;function dB(){if(ad)return wo;ad=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.sanitizeUrl=o;var e=uB();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var s=n.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function a(n){try{return decodeURIComponent(n)}catch{return n}}function o(n){if(!n)return e.BLANK_URL;var s,l=a(n.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 h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=c.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return wo}var fB=dB(),Hm=typeof global=="object"&&global&&global.Object===Object&&global,gB=typeof self=="object"&&self&&self.Object===Object&&self,Ke=Hm||gB||Function("return this")(),Cn=Ke.Symbol,Um=Object.prototype,pB=Um.hasOwnProperty,mB=Um.toString,pa=Cn?Cn.toStringTag:void 0;function yB(e){var t=pB.call(e,pa),r=e[pa];try{e[pa]=void 0;var i=!0}catch{}var a=mB.call(e);return i&&(t?e[pa]=r:delete e[pa]),a}var CB=Object.prototype,xB=CB.toString;function bB(e){return xB.call(e)}var kB="[object Null]",TB="[object Undefined]",od=Cn?Cn.toStringTag:void 0;function Qi(e){return e==null?e===void 0?TB:kB:od&&od in Object(e)?yB(e):bB(e)}function si(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wB="[object AsyncFunction]",_B="[object Function]",SB="[object GeneratorFunction]",vB="[object Proxy]";function Gh(e){if(!si(e))return!1;var t=Qi(e);return t==_B||t==SB||t==wB||t==vB}var Hs=Ke["__core-js_shared__"],nd=function(){var e=/[^.]+$/.exec(Hs&&Hs.keys&&Hs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BB(e){return!!nd&&nd in e}var LB=Function.prototype,FB=LB.toString;function li(e){if(e!=null){try{return FB.call(e)}catch{}try{return e+""}catch{}}return""}var MB=/[\\^$.*+?()[\]{}|]/g,AB=/^\[object .+?Constructor\]$/,EB=Function.prototype,$B=Object.prototype,OB=EB.toString,IB=$B.hasOwnProperty,DB=RegExp("^"+OB.call(IB).replace(MB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PB(e){if(!si(e)||BB(e))return!1;var t=Gh(e)?DB:AB;return t.test(li(e))}function RB(e,t){return e==null?void 0:e[t]}function hi(e,t){var r=RB(e,t);return PB(r)?r:void 0}var ja=hi(Object,"create");function NB(){this.__data__=ja?ja(null):{},this.size=0}function qB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zB="__lodash_hash_undefined__",WB=Object.prototype,HB=WB.hasOwnProperty;function UB(e){var t=this.__data__;if(ja){var r=t[e];return r===zB?void 0:r}return HB.call(t,e)?t[e]:void 0}var YB=Object.prototype,jB=YB.hasOwnProperty;function GB(e){var t=this.__data__;return ja?t[e]!==void 0:jB.call(t,e)}var XB="__lodash_hash_undefined__";function VB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ja&&t===void 0?XB:t,this}function ti(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])}}ti.prototype.clear=NB;ti.prototype.delete=qB;ti.prototype.get=UB;ti.prototype.has=GB;ti.prototype.set=VB;function ZB(){this.__data__=[],this.size=0}function Kn(e,t){return e===t||e!==e&&t!==t}function Jn(e,t){for(var r=e.length;r--;)if(Kn(e[r][0],t))return r;return-1}var QB=Array.prototype,KB=QB.splice;function JB(e){var t=this.__data__,r=Jn(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():KB.call(t,r,1),--this.size,!0}function tL(e){var t=this.__data__,r=Jn(t,e);return r<0?void 0:t[r][1]}function eL(e){return Jn(this.__data__,e)>-1}function rL(e,t){var r=this.__data__,i=Jn(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function yr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}yr.prototype.clear=ZB;yr.prototype.delete=JB;yr.prototype.get=tL;yr.prototype.has=eL;yr.prototype.set=rL;var Ga=hi(Ke,"Map");function iL(){this.size=0,this.__data__={hash:new ti,map:new(Ga||yr),string:new ti}}function aL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ts(e,t){var r=e.__data__;return aL(t)?r[typeof t=="string"?"string":"hash"]:r.map}function oL(e){var t=ts(this,e).delete(e);return this.size-=t?1:0,t}function nL(e){return ts(this,e).get(e)}function sL(e){return ts(this,e).has(e)}function lL(e,t){var r=ts(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function $r(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])}}$r.prototype.clear=iL;$r.prototype.delete=oL;$r.prototype.get=nL;$r.prototype.has=sL;$r.prototype.set=lL;var hL="Expected a function";function ao(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hL);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],o=r.cache;if(o.has(a))return o.get(a);var n=e.apply(this,i);return r.cache=o.set(a,n)||o,n};return r.cache=new(ao.Cache||$r),r}ao.Cache=$r;function cL(){this.__data__=new yr,this.size=0}function uL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function dL(e){return this.__data__.get(e)}function fL(e){return this.__data__.has(e)}var gL=200;function pL(e,t){var r=this.__data__;if(r instanceof yr){var i=r.__data__;if(!Ga||i.length<gL-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new $r(i)}return r.set(e,t),this.size=r.size,this}function Ki(e){var t=this.__data__=new yr(e);this.size=t.size}Ki.prototype.clear=cL;Ki.prototype.delete=uL;Ki.prototype.get=dL;Ki.prototype.has=fL;Ki.prototype.set=pL;var xn=function(){try{var e=hi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Xh(e,t,r){t=="__proto__"&&xn?xn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Nl(e,t,r){(r!==void 0&&!Kn(e[t],r)||r===void 0&&!(t in e))&&Xh(e,t,r)}function mL(e){return function(t,r,i){for(var a=-1,o=Object(t),n=i(t),s=n.length;s--;){var l=n[++a];if(r(o[l],l,o)===!1)break}return t}}var yL=mL(),Ym=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sd=Ym&&typeof module=="object"&&module&&!module.nodeType&&module,CL=sd&&sd.exports===Ym,ld=CL?Ke.Buffer:void 0,hd=ld?ld.allocUnsafe:void 0;function xL(e,t){if(t)return e.slice();var r=e.length,i=hd?hd(r):new e.constructor(r);return e.copy(i),i}var cd=Ke.Uint8Array;function bL(e){var t=new e.constructor(e.byteLength);return new cd(t).set(new cd(e)),t}function kL(e,t){var r=t?bL(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function TL(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var ud=Object.create,wL=function(){function e(){}return function(t){if(!si(t))return{};if(ud)return ud(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function jm(e,t){return function(r){return e(t(r))}}var Gm=jm(Object.getPrototypeOf,Object),_L=Object.prototype;function es(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_L;return e===r}function SL(e){return typeof e.constructor=="function"&&!es(e)?wL(Gm(e)):{}}function oo(e){return e!=null&&typeof e=="object"}var vL="[object Arguments]";function dd(e){return oo(e)&&Qi(e)==vL}var Xm=Object.prototype,BL=Xm.hasOwnProperty,LL=Xm.propertyIsEnumerable,bn=dd(function(){return arguments}())?dd:function(e){return oo(e)&&BL.call(e,"callee")&&!LL.call(e,"callee")},kn=Array.isArray,FL=9007199254740991;function Vm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FL}function rs(e){return e!=null&&Vm(e.length)&&!Gh(e)}function ML(e){return oo(e)&&rs(e)}function AL(){return!1}var Zm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fd=Zm&&typeof module=="object"&&module&&!module.nodeType&&module,EL=fd&&fd.exports===Zm,gd=EL?Ke.Buffer:void 0,$L=gd?gd.isBuffer:void 0,Vh=$L||AL,OL="[object Object]",IL=Function.prototype,DL=Object.prototype,Qm=IL.toString,PL=DL.hasOwnProperty,RL=Qm.call(Object);function NL(e){if(!oo(e)||Qi(e)!=OL)return!1;var t=Gm(e);if(t===null)return!0;var r=PL.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Qm.call(r)==RL}var qL="[object Arguments]",zL="[object Array]",WL="[object Boolean]",HL="[object Date]",UL="[object Error]",YL="[object Function]",jL="[object Map]",GL="[object Number]",XL="[object Object]",VL="[object RegExp]",ZL="[object Set]",QL="[object String]",KL="[object WeakMap]",JL="[object ArrayBuffer]",tF="[object DataView]",eF="[object Float32Array]",rF="[object Float64Array]",iF="[object Int8Array]",aF="[object Int16Array]",oF="[object Int32Array]",nF="[object Uint8Array]",sF="[object Uint8ClampedArray]",lF="[object Uint16Array]",hF="[object Uint32Array]",vt={};vt[eF]=vt[rF]=vt[iF]=vt[aF]=vt[oF]=vt[nF]=vt[sF]=vt[lF]=vt[hF]=!0;vt[qL]=vt[zL]=vt[JL]=vt[WL]=vt[tF]=vt[HL]=vt[UL]=vt[YL]=vt[jL]=vt[GL]=vt[XL]=vt[VL]=vt[ZL]=vt[QL]=vt[KL]=!1;function cF(e){return oo(e)&&Vm(e.length)&&!!vt[Qi(e)]}function uF(e){return function(t){return e(t)}}var Km=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oa=Km&&typeof module=="object"&&module&&!module.nodeType&&module,dF=Oa&&Oa.exports===Km,Us=dF&&Hm.process,pd=function(){try{var e=Oa&&Oa.require&&Oa.require("util").types;return e||Us&&Us.binding&&Us.binding("util")}catch{}}(),md=pd&&pd.isTypedArray,Zh=md?uF(md):cF;function ql(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var fF=Object.prototype,gF=fF.hasOwnProperty;function pF(e,t,r){var i=e[t];(!(gF.call(e,t)&&Kn(i,r))||r===void 0&&!(t in e))&&Xh(e,t,r)}function mF(e,t,r,i){var a=!r;r||(r={});for(var o=-1,n=t.length;++o<n;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),a?Xh(r,s,l):pF(r,s,l)}return r}function yF(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var CF=9007199254740991,xF=/^(?:0|[1-9]\d*)$/;function Jm(e,t){var r=typeof e;return t=t??CF,!!t&&(r=="number"||r!="symbol"&&xF.test(e))&&e>-1&&e%1==0&&e<t}var bF=Object.prototype,kF=bF.hasOwnProperty;function TF(e,t){var r=kn(e),i=!r&&bn(e),a=!r&&!i&&Vh(e),o=!r&&!i&&!a&&Zh(e),n=r||i||a||o,s=n?yF(e.length,String):[],l=s.length;for(var h in e)(t||kF.call(e,h))&&!(n&&(h=="length"||a&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Jm(h,l)))&&s.push(h);return s}function wF(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var _F=Object.prototype,SF=_F.hasOwnProperty;function vF(e){if(!si(e))return wF(e);var t=es(e),r=[];for(var i in e)i=="constructor"&&(t||!SF.call(e,i))||r.push(i);return r}function t0(e){return rs(e)?TF(e,!0):vF(e)}function BF(e){return mF(e,t0(e))}function LF(e,t,r,i,a,o,n){var s=ql(e,r),l=ql(t,r),h=n.get(l);if(h){Nl(e,r,h);return}var c=o?o(s,l,r+"",e,t,n):void 0,u=c===void 0;if(u){var f=kn(l),d=!f&&Vh(l),g=!f&&!d&&Zh(l);c=l,f||d||g?kn(s)?c=s:ML(s)?c=TL(s):d?(u=!1,c=xL(l,!0)):g?(u=!1,c=kL(l,!0)):c=[]:NL(l)||bn(l)?(c=s,bn(s)?c=BF(s):(!si(s)||Gh(s))&&(c=SL(l))):u=!1}u&&(n.set(l,c),a(c,l,i,o,n),n.delete(l)),Nl(e,r,c)}function e0(e,t,r,i,a){e!==t&&yL(t,function(o,n){if(a||(a=new Ki),si(o))LF(e,t,n,r,e0,i,a);else{var s=i?i(ql(e,n),o,n+"",e,t,a):void 0;s===void 0&&(s=o),Nl(e,n,s)}},t0)}function r0(e){return e}function FF(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 yd=Math.max;function MF(e,t,r){return t=yd(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,o=yd(i.length-t,0),n=Array(o);++a<o;)n[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(n),FF(e,this,s)}}function AF(e){return function(){return e}}var EF=xn?function(e,t){return xn(e,"toString",{configurable:!0,enumerable:!1,value:AF(t),writable:!0})}:r0,$F=800,OF=16,IF=Date.now;function DF(e){var t=0,r=0;return function(){var i=IF(),a=OF-(i-r);if(r=i,a>0){if(++t>=$F)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var PF=DF(EF);function RF(e,t){return PF(MF(e,t,r0),e+"")}function NF(e,t,r){if(!si(r))return!1;var i=typeof t;return(i=="number"?rs(r)&&Jm(t,r.length):i=="string"&&t in r)?Kn(r[t],e):!1}function qF(e){return RF(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:void 0,n=a>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,n&&NF(r[0],r[1],n)&&(o=a<3?void 0:o,a=1),t=Object(t);++i<a;){var s=r[i];s&&e(t,s,i,o)}return t})}var zF=qF(function(e,t,r){e0(e,t,r)}),WF="​",HF={curveBasis:wl,curveBasisClosed:jS,curveBasisOpen:GS,curveBumpX:qg,curveBumpY:zg,curveBundle:XS,curveCardinalClosed:VS,curveCardinalOpen:ZS,curveCardinal:Gg,curveCatmullRomClosed:QS,curveCatmullRomOpen:KS,curveCatmullRom:Vg,curveLinear:Bi,curveLinearClosed:JS,curveMonotoneX:ep,curveMonotoneY:rp,curveNatural:ap,curveStep:op,curveStepAfter:sp,curveStepBefore:np},UF=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,YF=y(function(e,t){const r=i0(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);zo(n),i=qt(i,[...n])}else i=r.args;if(!i)return;let a=lh(e,t);const o="config";return i[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),i0=y(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${UF.source})(?=[}][%]{2}).*
159
+ `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const n=[];for(;(o=Aa.exec(e))!==null;)if(o.index===Aa.lastIndex&&Aa.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const s=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;n.push({type:s,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(a){return P.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),jF=y(function(e){return e.replace(Aa,"")},"removeDirectives"),GF=y(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Qh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return HF[r]??t}y(Qh,"interpolateToCurve");function a0(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?fB.sanitizeUrl(r):r}y(a0,"formatUrl");var XF=y((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){P.error(`Function name: ${e} not found in window`);return}o[a](...t)},"runFunc");function Kh(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}y(Kh,"distance");function o0(e){let t,r=0;e.forEach(a=>{r+=Kh(a,t),t=a});const i=r/2;return Jh(e,i)}y(o0,"traverseEdge");function n0(e){return e.length===1?e[0]:o0(e)}y(n0,"calcLabelPosition");var Cd=y((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Jh=y((e,t)=>{let r,i=t;for(const a of e){if(r){const o=Kh(a,r);if(o===0)return r;if(o<i)i-=o;else{const n=i/o;if(n<=0)return r;if(n>=1)return{x:a.x,y:a.y};if(n>0&&n<1)return{x:Cd((1-n)*r.x+n*a.x,5),y:Cd((1-n)*r.y+n*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),VF=y((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Jh(t,25),o=e?10:5,n=Math.atan2(t[0].y-a.y,t[0].x-a.x),s={x:0,y:0};return s.x=Math.sin(n)*o+(t[0].x+a.x)/2,s.y=-Math.cos(n)*o+(t[0].y+a.y)/2,s},"calcCardinalityPosition");function s0(e,t,r){const i=structuredClone(r);P.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,o=Jh(i,a),n=10+e*.5,s=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*n+(i[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*n+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*n+(i[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*n+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*n+(i[0].x+o.x)/2-5,l.y=-Math.cos(s)*n+(i[0].y+o.y)/2-5):(l.x=Math.sin(s)*n+(i[0].x+o.x)/2,l.y=-Math.cos(s)*n+(i[0].y+o.y)/2),l}y(s0,"calcTerminalLabelPosition");function l0(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}}y(l0,"getStylesFromArray");var xd=0,ZF=y(()=>(xd++,"id-"+Math.random().toString(36).substr(2,12)+"-"+xd),"generateId");function h0(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}y(h0,"makeRandomHex");var QF=y(e=>h0(e.length),"random"),KF=y(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"),JF=y(function(e,t){const r=t.text.replace(Qa.lineBreakRegex," "),[,i]=is(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 o=a.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),a},"drawSimpleText"),tM=ao((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Qa.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let o="";return i.forEach((n,s)=>{const l=gr(`${n} `,r),h=gr(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=eM(n,t,"-",r);a.push(o,...f),o=d}else h+l>=t?(a.push(o),o=n):o=[o,n].filter(Boolean).join(" ");s+1===i.length&&a.push(o)}),a.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),eM=ao((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],o=[];let n="";return a.forEach((s,l)=>{const h=`${n}${s}`;if(gr(h,i)>=t){const u=l+1,f=a.length===u,d=`${h}${r}`;o.push(f?h:d),n=""}else n=h}),{hyphenatedStrings:o,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function c0(e,t){return tc(e,t).height}y(c0,"calculateTextHeight");function gr(e,t){return tc(e,t).width}y(gr,"calculateTextWidth");var tc=ao((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,o]=is(r),n=["sans-serif",i],s=e.split(Qa.lineBreakRegex),l=[],h=ft("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const f of n){let d=0;const g={width:0,height:0,lineHeight:0};for(const p of s){const m=KF();m.text=p||WF;const C=JF(c,m).style("font-size",o).style("font-weight",a).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");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)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),zi,rM=(zi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},y(zi,"InitIDGenerator"),zi),_o,iM=y(function(e){return _o=_o||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),_o.innerHTML=e,unescape(_o.textContent)},"entityDecode");function ec(e){return"str"in e}y(ec,"isDetailedError");var aM=y((e,t,r,i)=>{var o;if(!i)return;const a=(o=e.node())==null?void 0:o.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"),is=y(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 rc(e,t){return zF({},e,t)}y(rc,"cleanAndMerge");var De={assignWithDepth:qt,wrapLabel:tM,calculateTextHeight:c0,calculateTextWidth:gr,calculateTextDimensions:tc,cleanAndMerge:rc,detectInit:YF,detectDirective:i0,isSubstringInArray:GF,interpolateToCurve:Qh,calcLabelPosition:n0,calcCardinalityPosition:VF,calcTerminalLabelPosition:s0,formatUrl:a0,getStylesFromArray:l0,generateId:ZF,random:QF,runFunc:XF,entityDecode:iM,insertTitle:aM,isLabelCoordinateInPath:u0,parseFontSize:is,InitIDGenerator:rM},oM=y(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"),ei=y(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),OO=y((e,t,{counter:r=0,prefix:i,suffix:a},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Yt(e){return e??null}y(Yt,"handleUndefinedAttr");function u0(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(i.toString())}y(u0,"isLabelCoordinateInPath");var ic=y(({flowchart:e})=>{var a,o;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function d0(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(o=>{function n(){if(a.style.display="flex",a.style.flexDirection="column",i){const s=Ct().fontSize?Ct().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=kf.fontSize]=is(s),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";o(a)}y(n,"setupImage"),setTimeout(()=>{a.complete&&n()}),a.addEventListener("error",n),a.addEventListener("load",n)})))}y(d0,"configureLabelImages");var nM=y(e=>{const{handDrawnSeed:t}=Ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ji=y(e=>{const t=sM([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),sM=y(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"),f0=y(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),K=y(e=>{const{stylesArray:t}=Ji(e),r=[],i=[],a=[],o=[];return t.forEach(n=>{const s=n[0];f0(s)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),s.includes("stroke")&&a.push(n.join(":")+" !important"),s==="fill"&&o.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:o}},"styles2String"),Q=y((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Ct(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:n}=Ji(e);return Object.assign({roughness:.7,fill:n.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||a,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:lM(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),lM=y(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");const hM=Object.freeze({left:0,top:0,width:16,height:16}),Tn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),g0=Object.freeze({...hM,...Tn}),cM=Object.freeze({...g0,body:"",hidden:!1}),uM=Object.freeze({width:null,height:null}),dM=Object.freeze({...uM,...Tn}),fM=(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(),h={provider:a.length>0?a[0]:i,prefix:l,name:s};return Ys(h)?h:null}const o=a[0],n=o.split("-");if(n.length>1){const s={provider:i,prefix:n.shift(),name:n.join("-")};return Ys(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:o};return Ys(s,r)?s:null}return null},Ys=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function gM(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 bd(e,t){const r=gM(e,t);for(const i in cM)i in Tn?i in e&&!(i in r)&&(r[i]=Tn[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function pM(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function o(n){if(r[n])return a[n]=[];if(!(n in a)){a[n]=null;const s=i[n]&&i[n].parent,l=s&&o(s);l&&(a[n]=[s].concat(l))}return a[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),a}function kd(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let o={};function n(s){o=bd(i[s]||a[s],o)}return n(t),r.forEach(n),bd(e,o)}function mM(e,t){if(e.icons[t])return kd(e,t,[]);const r=pM(e,[t])[t];return r?kd(e,t,r):null}const yM=/(-?[0-9.]*[0-9]+[0-9.]*)/g,CM=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Td(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(yM);if(i===null||!i.length)return e;const a=[];let o=i.shift(),n=CM.test(o);for(;;){if(n){const s=parseFloat(o);isNaN(s)?a.push(o):a.push(Math.ceil(s*t*r)/r)}else a.push(o);if(o=i.shift(),o===void 0)return a.join("");n=!n}}function xM(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),o=e.indexOf("</"+t);if(a===-1||o===-1)break;const n=e.indexOf(">",o);if(n===-1)break;r+=e.slice(a+1,o).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function bM(e,t){return e?"<defs>"+e+"</defs>"+t:t}function kM(e,t,r){const i=xM(e);return bM(i.defs,t+i.content+r)}const TM=e=>e==="unset"||e==="undefined"||e==="none";function wM(e,t){const r={...g0,...e},i={...dM,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(p=>{const m=[],C=p.hFlip,b=p.vFlip;let k=p.rotate;C?b?k+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=a.height/2+a.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),m.length&&(o=kM(o,'<g transform="'+m.join(" ")+'">',"</g>"))});const n=i.width,s=i.height,l=a.width,h=a.height;let c,u;n===null?(u=s===null?"1em":s==="auto"?h:s,c=Td(u,l/h)):(c=n==="auto"?l:n,u=s===null?Td(c,h/l):s==="auto"?h:s);const f={},d=(p,m)=>{TM(m)||(f[p]=m.toString())};d("width",c),d("height",u);const g=[a.left,a.top,l,h];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:o}}const _M=/\sid="(\S+)"/g,wd=new Map;function SM(e){e=e.replace(/[0-9]+$/,"")||"a";const t=wd.get(e)||0;return wd.set(e,t+1),t?`${e}${t}`:e}function vM(e){const t=[];let r;for(;r=_M.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 o=SM(a),n=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function BM(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 ac(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ci=ac();function p0(e){ci=e}var Ia={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,o)=>{let n=typeof o=="string"?o:o.source;return n=n.replace(le.caret,"$1"),r=r.replace(a,n),i},getRegex:()=>new RegExp(r,t)};return i}var LM=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),le={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")},FM=/^(?:[ \t]*(?:\n|$))+/,MM=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,AM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,no=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,EM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oc=/(?:[*+-]|\d{1,9}[.)])/,m0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,y0=bt(m0).replace(/bull/g,oc).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(),$M=bt(m0).replace(/bull/g,oc).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(),nc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,OM=/^[^\n]+/,sc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,IM=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DM=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oc).getRegex(),as="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",lc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,PM=bt("^ {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",lc).replace("tag",as).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C0=bt(nc).replace("hr",no).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",as).getRegex(),RM=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C0).getRegex(),hc={blockquote:RM,code:MM,def:IM,fences:AM,heading:EM,hr:no,html:PM,lheading:y0,list:DM,newline:FM,paragraph:C0,table:Ia,text:OM},_d=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",no).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",as).getRegex(),NM={...hc,lheading:$M,table:_d,paragraph:bt(nc).replace("hr",no).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_d).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",as).getRegex()},qM={...hc,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lc).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:Ia,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(nc).replace("hr",no).replace("heading",` *#{1,6} *[^
160
+ ]`).replace("lheading",y0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,x0=/^( {2,}|\\)\n(?!\s*$)/,HM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,os=/[\p{P}\p{S}]/u,cc=/[\s\p{P}\p{S}]/u,b0=/[^\s\p{P}\p{S}]/u,UM=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cc).getRegex(),k0=/(?!~)[\p{P}\p{S}]/u,YM=/(?!~)[\s\p{P}\p{S}]/u,jM=/(?:[^\s\p{P}\p{S}]|~)/u,GM=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",LM?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),T0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,XM=bt(T0,"u").replace(/punct/g,os).getRegex(),VM=bt(T0,"u").replace(/punct/g,k0).getRegex(),w0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ZM=bt(w0,"gu").replace(/notPunctSpace/g,b0).replace(/punctSpace/g,cc).replace(/punct/g,os).getRegex(),QM=bt(w0,"gu").replace(/notPunctSpace/g,jM).replace(/punctSpace/g,YM).replace(/punct/g,k0).getRegex(),KM=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,b0).replace(/punctSpace/g,cc).replace(/punct/g,os).getRegex(),JM=bt(/\\(punct)/,"gu").replace(/punct/g,os).getRegex(),tA=bt(/^<(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(),eA=bt(lc).replace("(?:-->|$)","-->").getRegex(),rA=bt("^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",eA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iA=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_0=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",wn).replace("ref",sc).getRegex(),S0=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",sc).getRegex(),aA=bt("reflink|nolink(?!\\()","g").replace("reflink",_0).replace("nolink",S0).getRegex(),Sd=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,uc={_backpedal:Ia,anyPunctuation:JM,autolink:tA,blockSkip:GM,br:x0,code:WM,del:Ia,emStrongLDelim:XM,emStrongRDelimAst:ZM,emStrongRDelimUnd:KM,escape:zM,link:iA,nolink:S0,punctuation:UM,reflink:_0,reflinkSearch:aA,tag:rA,text:HM,url:Ia},oA={...uc,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",wn).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wn).getRegex()},zl={...uc,emStrongRDelimAst:QM,emStrongLDelim:VM,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Sd).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:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Sd).getRegex()},nA={...zl,br:bt(x0).replace("{2,}","*").getRegex(),text:bt(zl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},So={normal:hc,gfm:NM,pedantic:qM},ma={normal:uc,gfm:zl,breaks:nA,pedantic:oA},sA={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vd=e=>sA[e];function Ue(e,t){if(t){if(le.escapeTest.test(e))return e.replace(le.escapeReplace,vd)}else if(le.escapeTestNoEncode.test(e))return e.replace(le.escapeReplaceNoEncode,vd);return e}function Bd(e){try{e=encodeURI(e).replace(le.percentDecode,"%")}catch{return null}return e}function Ld(e,t){var o;let r=e.replace(le.findPipe,(n,s,l)=>{let h=!1,c=s;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(le.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.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(le.slashPipe,"|");return i}function ya(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 lA(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 Fd(e,t,r,i,a){let o=t.href,n=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:o,title:n,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function hA(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
161
+ `).map(o=>{let n=o.match(r.other.beginningSpace);if(n===null)return o;let[s]=n;return s.length>=a.length?o.slice(a.length):o}).join(`
162
+ `)}var _n=class{constructor(t){wt(this,"options");wt(this,"rules");wt(this,"lexer");this.options=t||ci}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:ya(i,`
163
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=hA(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=ya(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:ya(r[0],`
164
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ya(r[0],`
165
+ `).split(`
166
+ `),a="",o="",n=[];for(;i.length>0;){let s=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),s=!0;else if(!s)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
167
+ `),u=c.replace(this.rules.other.blockquoteSetextReplace,`
168
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
169
+ ${c}`:c,o=o?`${o}
170
+ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=f,i.length===0)break;let d=n.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,p=g.raw+`
171
+ `+i.join(`
172
+ `),m=this.blockquote(p);n[n.length-1]=m,a=a.substring(0,a.length-g.raw.length)+m.raw,o=o.substring(0,o.length-g.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,p=g.raw+`
173
+ `+i.join(`
174
+ `),m=this.list(p);n[n.length-1]=m,a=a.substring(0,a.length-d.raw.length)+m.raw,o=o.substring(0,o.length-g.raw.length)+m.raw,i=p.substring(n.at(-1).raw.length).split(`
175
+ `);continue}}return{type:"blockquote",raw:a,tokens:n,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,o={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 n=this.rules.other.listItemRegex(i),s=!1;for(;t;){let h=!1,c="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let f=r[2].split(`
176
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
177
+ `,1)[0],g=!f.trim(),p=0;if(this.options.pedantic?(p=2,u=f.trimStart()):g?p=r[1].length+1:(p=r[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,u=f.slice(p),p+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(c+=d+`
178
+ `,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(p),k=this.rules.other.hrRegex(p),w=this.rules.other.fencesBeginRegex(p),_=this.rules.other.headingBeginRegex(p),S=this.rules.other.htmlBeginRegex(p);for(;t;){let T=t.split(`
179
+ `,1)[0],B;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),B=d):B=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||_.test(d)||S.test(d)||b.test(d)||k.test(d))break;if(B.search(this.rules.other.nonSpaceChar)>=p||!d.trim())u+=`
180
+ `+B.slice(p);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||_.test(f)||k.test(f))break;u+=`
181
+ `+d}!g&&!d.trim()&&(g=!0),c+=T+`
182
+ `,t=t.substring(T.length+1),f=B.slice(p)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),o.raw+=c}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h=0;h<o.items.length;h++)if(this.lexer.state.top=!1,o.items[h].tokens=this.lexer.blockTokens(o.items[h].text,[]),!o.loose){let c=o.items[h].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=u}if(o.loose)for(let h=0;h<o.items.length;h++)o.items[h].loose=!0;return o}}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"):"",o=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:o}}}table(t){var s;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Ld(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(s=r[3])!=null&&s.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
183
+ `):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of o)n.rows.push(Ld(l,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}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)===`
184
+ `?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 n=ya(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=lA(r[2],"()");if(n===-2)return;if(n>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let a=r[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(a);n&&(a=n[1],o=n[3])}else o=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)),Fd(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=r[a.toLowerCase()];if(!o){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Fd(i,o,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 o=[...a[0]].length-1,n,s,l=o,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+o);(a=c.exec(r))!=null;){if(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!n)continue;if(s=[...n].length,a[3]||a[4]){l+=s;continue}else if((a[5]||a[6])&&o%3&&!((o+s)%3)){h+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+h);let u=[...a[0]][0].length,f=t.slice(0,o+a.index+u+s);if(Math.min(o,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),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&o&&(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,o;if(r[2]==="@")a=r[0],o="mailto:"+a;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);a=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:a,href:o,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}}}},$e=class Wl{constructor(t){wt(this,"tokens");wt(this,"options");wt(this,"state");wt(this,"tokenizer");wt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ci,this.options.tokenizer=this.options.tokenizer||new _n,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:le,block:So.normal,inline:ma.normal};this.options.pedantic?(r.block=So.pedantic,r.inline=ma.pedantic):this.options.gfm&&(r.block=So.gfm,this.options.breaks?r.inline=ma.breaks:r.inline=ma.gfm),this.tokenizer.rules=r}static get rules(){return{block:So,inline:ma}}static lex(t,r){return new Wl(r).lex(t)}static lexInline(t,r){return new Wl(r).inlineTokens(t)}lex(t){t=t.replace(le.carriageReturn,`
185
+ `),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,o,n;for(this.options.pedantic&&(t=t.replace(le.tabCharGlobal," ").replace(le.spaceLine,""));t;){let s;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(h=>(s=h.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 h=r.at(-1);s.raw.length===1&&h!==void 0?h.raw+=`
186
+ `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
187
+ `)?"":`
188
+ `)+s.raw,h.text+=`
189
+ `+s.text,this.inlineQueue.at(-1).src=h.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 h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
190
+ `)?"":`
191
+ `)+s.raw,h.text+=`
192
+ `+s.raw,this.inlineQueue.at(-1).src=h.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((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
193
+ `)?"":`
194
+ `)+s.raw,h.text+=`
195
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.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 h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
196
+ `)?"":`
197
+ `)+s.raw,h.text+=`
198
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(s);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,f;let i=t,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 o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=a[2]?a[2].length:0,i=i.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,s="";for(;t;){n||(s=""),n=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(p=>(d=p.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 p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.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 p=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(p=Math.min(p,C))}),p<1/0&&p>=0&&(g=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(s=d.raw.slice(-1)),n=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},Sn=class{constructor(t){wt(this,"options");wt(this,"parser");this.options=t||ci}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let a=(n=(r||"").match(le.notSpaceStart))==null?void 0:n[0],o=t.replace(le.endingNewline,"")+`
199
+ `;return a?'<pre><code class="language-'+Ue(a)+'">'+(i?o:Ue(o,!0))+`</code></pre>
200
+ `:"<pre><code>"+(i?o:Ue(o,!0))+`</code></pre>
201
+ `}blockquote({tokens:t}){return`<blockquote>
202
+ ${this.parser.parse(t)}</blockquote>
203
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
204
+ `}hr(t){return`<hr>
205
+ `}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 o=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+o+n+`>
206
+ `+a+"</"+o+`>
207
+ `}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+" "+Ue(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>
208
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
209
+ `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let a="";for(let o=0;o<t.rows.length;o++){let n=t.rows[o];i="";for(let s=0;s<n.length;s++)i+=this.tablecell(n[s]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
210
+ <thead>
211
+ `+r+`</thead>
212
+ `+a+`</table>
213
+ `}tablerow({text:t}){return`<tr>
214
+ ${t}</tr>
215
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
216
+ `}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>${Ue(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),o=Bd(t);if(o===null)return a;t=o;let n='<a href="'+t+'"';return r&&(n+=' title="'+Ue(r)+'"'),n+=">"+a+"</a>",n}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let o=Bd(t);if(o===null)return Ue(i);t=o;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${Ue(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ue(t.text)}},dc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Oe=class Hl{constructor(t){wt(this,"options");wt(this,"renderer");wt(this,"textRenderer");this.options=t||ci,this.options.renderer=this.options.renderer||new Sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dc}static parse(t,r){return new Hl(r).parse(t)}static parseInline(t,r){return new Hl(r).parseInline(t)}parse(t,r=!0){var a,o;let i="";for(let n=0;n<t.length;n++){let s=t[n];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[s.type]){let h=s,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=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 h=l,c=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],c+=`
217
+ `+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var a,o;let i="";for(let n=0;n<t.length;n++){let s=t[n];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[s.type]){let h=this.options.extensions.renderers[s.type].call({parser:this},s);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=h||"";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 h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Mo,Ba=(Mo=class{constructor(t){wt(this,"options");wt(this,"block");this.options=t||ci}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?$e.lex:$e.lexInline}provideParser(){return this.block?Oe.parse:Oe.parseInline}},wt(Mo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),wt(Mo,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Mo),cA=class{constructor(...t){wt(this,"defaults",ac());wt(this,"options",this.setOptions);wt(this,"parse",this.parseMarkdown(!0));wt(this,"parseInline",this.parseMarkdown(!1));wt(this,"Parser",Oe);wt(this,"Renderer",Sn);wt(this,"TextRenderer",dc);wt(this,"Lexer",$e);wt(this,"Tokenizer",_n);wt(this,"Hooks",Ba);this.use(...t)}walkTokens(t,r){var a,o;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let s=n;for(let l of s.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of s.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let s=n;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=n;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let h=s[l].flat(1/0);i=i.concat(this.walkTokens(h,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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let n=r.renderers[o.name];n?r.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=n.apply(this,s)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[o.level];n?n.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),a.extensions=r),i.renderer){let o=this.defaults.renderer||new Sn(this.defaults);for(let n in i.renderer){if(!(n in o))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let s=n,l=i.renderer[s],h=o[s];o[s]=(...c)=>{let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u||""}}a.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new _n(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let s=n,l=i.tokenizer[s],h=o[s];o[s]=(...c)=>{let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u}}a.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ba;for(let n in i.hooks){if(!(n in o))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let s=n,l=i.hooks[s],h=o[s];Ba.passThroughHooks.has(n)?o[s]=c=>{if(this.defaults.async&&Ba.passThroughHooksRespectAsync.has(n))return(async()=>{let f=await l.call(o,c);return h.call(o,f)})();let u=l.call(o,c);return h.call(o,u)}:o[s]=(...c)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,c);return f===!1&&(f=await h.apply(o,c)),f})();let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u}}a.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;a.walkTokens=function(s){let l=[];return l.push(n.call(this,s)),o&&(l=l.concat(o.call(this,s))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return $e.lex(t,r??this.defaults)}parser(t,r){return Oe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},o={...this.defaults,...a},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return n(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 n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let s=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?$e.lex:$e.lexInline)(s,o),h=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let c=await(o.hooks?await o.hooks.provideParser():t?Oe.parse:Oe.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(c):c})().catch(n);try{o.hooks&&(r=o.hooks.preprocess(r));let s=(o.hooks?o.hooks.provideLexer():t?$e.lex:$e.lexInline)(r,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?Oe.parse:Oe.parseInline)(s,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(s){return n(s)}}}onError(t,r){return i=>{if(i.message+=`
218
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Ue(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},ri=new cA;function Tt(e,t){return ri.parse(e,t)}Tt.options=Tt.setOptions=function(e){return ri.setOptions(e),Tt.defaults=ri.defaults,p0(Tt.defaults),Tt};Tt.getDefaults=ac;Tt.defaults=ci;Tt.use=function(...e){return ri.use(...e),Tt.defaults=ri.defaults,p0(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return ri.walkTokens(e,t)};Tt.parseInline=ri.parseInline;Tt.Parser=Oe;Tt.parser=Oe.parse;Tt.Renderer=Sn;Tt.TextRenderer=dc;Tt.Lexer=$e;Tt.lexer=$e.lex;Tt.Tokenizer=_n;Tt.Hooks=Ba;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;Oe.parse;$e.lex;function v0(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 h=l.match(/\n([\t ]+|(?!\s).)/g);return h?s.concat(h.map(function(c){var u,f;return(f=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):s},[]);if(a.length){var o=new RegExp(`
219
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(s){return s.replace(o,`
220
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(s,l){var h=n.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=s;typeof s=="string"&&s.includes(`
221
+ `)&&(u=String(s).split(`
222
+ `).map(function(f,d){return d===0?f:""+c+f}).join(`
223
+ `)),n+=u+i[l+1]}),n}var uA={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},Ul=new Map,B0=new Map,dA=y(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",t.name),"loader"in t)B0.set(t.name,t.loader);else if("icons"in t)Ul.set(t.name,t.icons);else throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),L0=y(async(e,t)=>{const r=fM(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=Ul.get(i);if(!a){const n=B0.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await n(),prefix:i},Ul.set(i,a)}catch(s){throw P.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=mM(a,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),fA=y(async e=>{try{return await L0(e),!0}catch{return!1}},"isIconAvailable"),so=y(async(e,t,r)=>{let i;try{i=await L0(e,t==null?void 0:t.fallbackPrefix)}catch(n){P.error(n),i=uA}const a=wM(i,t),o=BM(vM(a.body),{...a.attributes,...r});return Ne(o,Mt())},"getIconSVG");function F0(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
224
+ `).replace(/\n{2,}/g,`
225
+ `);return v0(i)}y(F0,"preprocessMarkdown");function M0(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}y(M0,"nonMarkdownToLines");function A0(e,t={}){const r=F0(e,t),i=Tt.lexer(r),a=[[]];let o=0;function n(s,l="normal"){s.type==="text"?s.text.split(`
226
+ `).forEach((c,u)=>{u!==0&&(o++,a.push([])),c.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[o].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(h=>{n(h,s.type)}):s.type==="html"&&a[o].push({content:s.text,type:"normal"})}return y(n,"processNode"),i.forEach(s=>{var l;s.type==="paragraph"?(l=s.tokens)==null||l.forEach(h=>{n(h)}):s.type==="html"?a[o].push({content:s.text,type:"normal"}):a[o].push({content:s.raw,type:"normal"})}),a}y(A0,"markdownToLines");function E0(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}y(E0,"nonMarkdownToHTML");function $0(e,{markdownAutoWrap:t}={}){const r=Tt.lexer(e);function i(a){var o,n,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>${(o=a.tokens)==null?void 0:o.map(i).join("")}</strong>`:a.type==="em"?`<em>${(n=a.tokens)==null?void 0:n.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:(P.warn(`Unsupported markdown: ${a.type}`),a.raw)}return y(i,"output"),r.map(i).join("")}y($0,"markdownToHTML");function O0(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}y(O0,"splitTextToChars");function I0(e,t){const r=O0(t.content);return fc(e,[],r,t.type)}y(I0,"splitWordToFitWidth");function fc(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...o]=r,n=[...t,a];return e([{content:n.join(""),type:i}])?fc(e,n,o,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}y(fc,"splitWordToFitWidthRecursion");function D0(e,t){if(e.some(({content:r})=>r.includes(`
227
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return vn(e,t)}y(D0,"splitLineToFitWidth");function vn(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 o=e.shift()??{content:" ",type:"normal"},n=[...i];if(a!==""&&n.push({content:a,type:"normal"}),n.push(o),t(n))return vn(e,t,r,n);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[s,l]=I0(t,o);r.push([s]),l.content&&e.unshift(l)}return vn(e,t,r)}y(vn,"splitLineToFitWidthRecursion");function Yl(e,t){t&&e.attr("style",t)}y(Yl,"applyStyle");var Md=16384;async function P0(e,t,r,i,a=!1,o=Mt()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,Md)}px`),n.attr("height",`${Math.min(10*r,Md)}px`);const s=n.append("xhtml:div"),l=Da(t.label)?await Mf(t.label.replace(Qa.lineBreakRegex,`
228
+ `),o):Ne(t.label,o),h=t.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(l),Yl(c,t.labelStyle),c.attr("class",`${h} ${i}`),Yl(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(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()),n.node()}y(P0,"addHtmlSpan");function ns(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}y(ns,"createTspan");function R0(e,t,r){const i=e.append("text"),a=ns(i,1,t);ss(a,r);const o=a.node().getComputedTextLength();return i.remove(),o}y(R0,"computeWidthOfText");function gA(e,t,r){var n;const i=e.append("text"),a=ns(i,1,t);ss(a,[{content:r,type:"normal"}]);const o=(n=a.node())==null?void 0:n.getBoundingClientRect();return o&&i.remove(),o}y(gA,"computeDimensionOfText");function N0(e,t,r,i=!1,a=!1){const n=t.append("g"),s=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=y(d=>R0(n,1.1,d)<=e,"checkWidth"),f=u(c)?[c]:D0(c,u);for(const d of f){const g=ns(l,h,1.1,a);ss(g,d),h++}}if(i){const c=l.node().getBBox(),u=2;return s.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),n.node()}else return l.node()}y(N0,"createFormattedText");function jl(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}y(jl,"decodeHTMLEntities");function ss(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(jl(r.content)):a.text(" "+jl(r.content))})}y(ss,"updateTextContentAndStyles");async function q0(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,n)=>(r.push((async()=>{const s=`${o}:${n}`;return await fA(s)?await so(s,void 0,{class:"label-icon"}):`<i class='${Ne(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}y(q0,"replaceIconSubstring");var Cr=y(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,markdown:n=!0,isNode:s=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(P.debug("XYZ createText",t,r,i,a,o,s,"addSvgBackground: ",h),o){const u=n?$0(t,c):E0(t),f=await q0(ei(u),c),d=t.replace(/\\\\/g,"\\"),g={isNode:s,label:Da(t)?d:f,labelStyle:r.replace("fill:","color:")};return await P0(e,g,l,a,h,c)}else{const u=ei(t.replace(/<br\s*\/?>/g,"<br/>")),f=n?A0(u.replace("<br>","<br/>"),c):M0(u),d=N0(l,e,f,t?h:!1,!s);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ft(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ft(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ft(d).select("text").attr("style",p)}return i?ft(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ft(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function js(e,t,r){if(e&&e.length){const[i,a]=t,o=Math.PI/180*r,n=Math.cos(o),s=Math.sin(o);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-a)*s+i,l[1]=(h-i)*s+(c-a)*n+a}}}function pA(e,t){return e[0]===t[0]&&e[1]===t[1]}function mA(e,t,r,i=1){const a=r,o=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(a)for(const h of n)js(h,s,a);const l=function(h,c,u){const f=[];for(const b of h){const k=[...b];pA(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];c=Math.max(c,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const w=b[k],_=b[k+1];if(w[1]!==_[1]){const S=Math.min(w[1],_[1]);g.push({ymin:S,ymax:Math.max(w[1],_[1]),x:S===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!g.length)return d;let p=[],m=g[0].ymin,C=0;for(;p.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>m);k++)b=k;g.splice(0,b+1).forEach(k=>{p.push({s:m,edge:k})})}if(p=p.filter(b=>!(b.edge.ymax<=m)),p.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%c==0)&&p.length>1)for(let b=0;b<p.length;b+=2){const k=b+1;if(k>=p.length)break;const w=p[b].edge,_=p[k].edge;d.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,p.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(n,o,i);if(a){for(const h of n)js(h,s,-a);(function(h,c,u){const f=[];h.forEach(d=>f.push(...d)),js(f,c,u)})(l,s,-a)}return l}function lo(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 o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),mA(e,a,i,o||1)}class gc{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=lo(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 ls(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 yA extends gc{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=lo(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,n=[],s=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[h,c]of a)ls([h,c])&&n.push([[h[0]-s,h[1]+l],[...c]],[[h[0]+s,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class CA extends gc{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,a);return i.ops=i.ops.concat(o.ops),i}}class xA{constructor(t){this.helper=t}fillPolygons(t,r){const i=lo(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 o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const n=a/4;for(const s of t){const l=ls(s),h=l/a,c=Math.ceil(h)-1,u=l-c*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<c;g++){const p=d+u+g*a,m=f-n+2*Math.random()*n,C=p-n+2*Math.random()*n,b=this.helper.ellipse(m,C,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class bA{constructor(t){this.helper=t}fillPolygons(t,r){const i=lo(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,o=[];return t.forEach(n=>{const s=ls(n),l=Math.floor(s/(i+a)),h=(s+a-l*(i+a))/2;let c=n[0],u=n[1];c[0]>u[0]&&(c=n[1],u=n[0]);const f=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const g=d*(i+a),p=g+i,m=[c[0]+g*Math.cos(f)+h*Math.cos(f),c[1]+g*Math.sin(f)+h*Math.sin(f)],C=[c[0]+p*Math.cos(f)+h*Math.cos(f),c[1]+p*Math.sin(f)+h*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),o}}class kA{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,o=lo(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(o=>{const n=ls(o),s=Math.round(n/(2*r));let l=o[0],h=o[1];l[0]>h[0]&&(l=o[1],h=o[0]);const c=Math.atan((h[1]-l[1])/(h[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)),p=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)],m=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[p[0]+g*Math.cos(c+Math.PI/4),p[1]+g*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(p[0],p[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),a}}const de={};class TA{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const wA=0,Gs=1,Ad=2,vo={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 Xs(e,t){return e.type===t}function pc(e){const t=[],r=function(n){const s=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:wA,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:Gs,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return s[s.length]={type:Ad,text:""},s}(e);let i="BOD",a=0,o=r[a];for(;!Xs(o,Ad);){let n=0;const s=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return pc("M0,0"+e);a++,n=vo[o.text],i=o.text}else Xs(o,Gs)?n=vo[i]:(a++,n=vo[o.text],i=o.text);if(!(a+n<r.length))throw new Error("Path data ended short");for(let l=a;l<a+n;l++){const h=r[l];if(!Xs(h,Gs))throw new Error("Param not a number: "+i+","+h.text);s[s.length]=+h.text}if(typeof vo[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),a+=n,o=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function z0(e){let t=0,r=0,i=0,a=0;const o=[];for(const{key:n,data:s}of e)switch(n){case"M":o.push({key:"M",data:[...s]}),[t,r]=s,[i,a]=s;break;case"m":t+=s[0],r+=s[1],o.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":o.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map((h,c)=>c%2?h+r:h+t);o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map((h,c)=>c%2?h+r:h+t);o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map((h,c)=>c%2?h+r:h+t);o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=a}return o}function W0(e){const t=[];let r="",i=0,a=0,o=0,n=0,s=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[o,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],s=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[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,...c]}),s=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[u,f]=c;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-s),g=a+(a-l)):(d=i,g=a);const p=i+2*(d-i)/3,m=a+2*(g-a)/3,C=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[p,m,C,b,u,f]}),s=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=c,p=i+2*(u-i)/3,m=a+2*(f-a)/3,C=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[p,m,C,b,d,g]}),s=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(c[0]),f=Math.abs(c[1]),d=c[2],g=c[3],p=c[4],m=c[5],C=c[6];u===0||f===0?(t.push({key:"C",data:[i,a,m,C,m,C]}),i=m,a=C):(i!==m||a!==C)&&(H0(i,a,m,C,u,f,d,g,p).forEach(function(b){t.push({key:"C",data:b})}),i=m,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,a=n}r=h}return t}function Ca(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function H0(e,t,r,i,a,o,n,s,l,h){const c=(u=n,Math.PI*u/180);var u;let f=[],d=0,g=0,p=0,m=0;if(h)[d,g,p,m]=h;else{[e,t]=Ca(e,t,-c),[r,i]=Ca(r,i,-c);const M=(e-r)/2,O=(t-i)/2;let W=M*M/(a*a)+O*O/(o*o);W>1&&(W=Math.sqrt(W),a*=W,o*=W);const q=a*a,H=o*o,D=q*H-q*O*O-H*M*M,X=q*O*O+H*M*M,lt=(s===l?-1:1)*Math.sqrt(Math.abs(D/X));p=lt*a*O/o+(e+r)/2,m=lt*-o*M/a+(t+i)/2,d=Math.asin(parseFloat(((t-m)/o).toFixed(9))),g=Math.asin(parseFloat(((i-m)/o).toFixed(9))),e<p&&(d=Math.PI-d),r<p&&(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 C=g-d;if(Math.abs(C)>120*Math.PI/180){const M=g,O=r,W=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=H0(r=p+a*Math.cos(g),i=m+o*Math.sin(g),O,W,a,o,n,0,l,[g,M,p,m])}C=g-d;const b=Math.cos(d),k=Math.sin(d),w=Math.cos(g),_=Math.sin(g),S=Math.tan(C/4),T=4/3*a*S,B=4/3*o*S,R=[e,t],$=[e+T*k,t-B*b],F=[r+T*_,i-B*w],N=[r,i];if($[0]=2*R[0]-$[0],$[1]=2*R[1]-$[1],h)return[$,F,N].concat(f);{f=[$,F,N].concat(f);const M=[];for(let O=0;O<f.length;O+=3){const W=Ca(f[O][0],f[O][1],c),q=Ca(f[O+1][0],f[O+1][1],c),H=Ca(f[O+2][0],f[O+2][1],c);M.push([W[0],W[1],q[0],q[1],H[0],H[1]])}return M}}const _A={randOffset:function(e,t){return ot(e,t)},randOffsetWithRange:function(e,t,r){return Bn(e,t,r)},ellipse:function(e,t,r,i,a){const o=Y0(r,i,a);return Gl(e,t,a,o).opset},doubleLineOps:function(e,t,r,i,a){return Fr(e,t,r,i,a,!0)}};function U0(e,t,r,i,a){return{type:"path",ops:Fr(e,t,r,i,a)}}function No(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let o=0;o<i-1;o++)a.push(...Fr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&a.push(...Fr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?U0(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function SA(e,t,r,i,a){return function(o,n){return No(o,!0,n)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Ed(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Bo(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Bo(r[0],1.5*(1+.22*t.roughness),Id(t));for(let o=1;o<r.length;o++){const n=r[o];if(n.length){const s=Bo(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Bo(n,1.5*(1+.22*t.roughness),Id(t));for(const h of s)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Y0(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)),o=2*Math.PI/a;let n=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return n+=ot(n*l,r),s+=ot(s*l,r),{increment:o,rx:n,ry:s}}function Gl(e,t,r,i){const[a,o]=Dd(i.increment,e,t,i.rx,i.ry,1,i.increment*Bn(.1,Bn(.4,1,r),r),r);let n=Ln(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=Dd(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ln(s,null,r);n=n.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:n}}}function $d(e,t,r,i,a,o,n,s,l){const h=e,c=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=ot(.01*u,l),f+=ot(.01*f,l);let d=a,g=o;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const p=2*Math.PI/l.curveStepCount,m=Math.min(p/2,(g-d)/2),C=Pd(m,h,c,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Pd(m,h,c,u,f,d,g,1.5,l);C.push(...b)}return n&&(s?C.push(...Fr(h,c,h+u*Math.cos(d),c+f*Math.sin(d),l),...Fr(h,c,h+u*Math.cos(g),c+f*Math.sin(g),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+f*Math.sin(d)]})),{type:"path",ops:C}}function Od(e,t){const r=W0(z0(pc(e))),i=[];let a=[0,0],o=[0,0];for(const{key:n,data:s}of r)switch(n){case"M":o=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...Fr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{const[l,h,c,u,f,d]=s;i.push(...vA(l,h,c,u,f,d,o,t)),o=[f,d];break}case"Z":i.push(...Fr(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]]}return{type:"path",ops:i}}function Vs(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+ot(a,t),i[0][1]+ot(a,t)]});for(let n=1;n<o;n++)r.push({op:"lineTo",data:[i[n][0]+ot(a,t),i[n][1]+ot(a,t)]})}}return{type:"fillPath",ops:r}}function mi(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!de[a])switch(a){case"zigzag":de[a]||(de[a]=new yA(i));break;case"cross-hatch":de[a]||(de[a]=new CA(i));break;case"dots":de[a]||(de[a]=new xA(i));break;case"dashed":de[a]||(de[a]=new bA(i));break;case"zigzag-line":de[a]||(de[a]=new kA(i));break;default:a="hachure",de[a]||(de[a]=new gc(i))}return de[a]}(t,_A).fillPolygons(e,t)}function Id(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function j0(e){return e.randomizer||(e.randomizer=new TA(e.seed||0)),e.randomizer.next()}function Bn(e,t,r,i=1){return r.roughness*i*(j0(r)*(t-e)+e)}function ot(e,t,r=1){return Bn(-e,e,t,r)}function Fr(e,t,r,i,a,o=!1){const n=o?a.disableMultiStrokeFill:a.disableMultiStroke,s=Xl(e,t,r,i,a,!0,!1);if(n)return s;const l=Xl(e,t,r,i,a,!0,!0);return s.concat(l)}function Xl(e,t,r,i,a,o,n){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,f=.2+.2*j0(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=ot(d,a,h),g=ot(g,a,h);const p=[],m=()=>ot(u,a,h),C=()=>ot(c,a,h),b=a.preserveVertices;return n?p.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):p.push({op:"move",data:[e+(b?0:ot(c,a,h)),t+(b?0:ot(c,a,h))]}),n?p.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),g+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),g+t+2*(i-t)*f+m(),r+(b?0:m()),i+(b?0:m())]}):p.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),g+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),g+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),p}function Bo(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+ot(t,r),e[0][1]+ot(t,r)]),i.push([e[0][0]+ot(t,r),e[0][1]+ot(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+ot(t,r),e[a][1]+ot(t,r)]),a===e.length-1&&i.push([e[a][0]+ot(t,r),e[a][1]+ot(t,r)]);return Ln(i,null,r)}function Ln(e,t,r){const i=e.length,a=[];if(i>3){const o=[],n=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];o[0]=[l[0],l[1]],o[1]=[l[0]+(n*e[s+1][0]-n*e[s-1][0])/6,l[1]+(n*e[s+1][1]-n*e[s-1][1])/6],o[2]=[e[s+1][0]+(n*e[s][0]-n*e[s+2][0])/6,e[s+1][1]+(n*e[s][1]-n*e[s+2][1])/6],o[3]=[e[s+1][0],e[s+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[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(...Xl(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Dd(e,t,r,i,a,o,n,s){const l=[],h=[];if(s.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+a*Math.sin(0)]),h.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=ot(.5,s)-Math.PI/2;h.push([ot(o,s)+t+.9*i*Math.cos(c-e),ot(o,s)+r+.9*a*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let f=c;f<u;f+=e){const d=[ot(o,s)+t+i*Math.cos(f),ot(o,s)+r+a*Math.sin(f)];l.push(d),h.push(d)}h.push([ot(o,s)+t+i*Math.cos(c+2*Math.PI+.5*n),ot(o,s)+r+a*Math.sin(c+2*Math.PI+.5*n)]),h.push([ot(o,s)+t+.98*i*Math.cos(c+n),ot(o,s)+r+.98*a*Math.sin(c+n)]),h.push([ot(o,s)+t+.9*i*Math.cos(c+.5*n),ot(o,s)+r+.9*a*Math.sin(c+.5*n)])}return[h,l]}function Pd(e,t,r,i,a,o,n,s,l){const h=o+ot(.1,l),c=[];c.push([ot(s,l)+t+.9*i*Math.cos(h-e),ot(s,l)+r+.9*a*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)c.push([ot(s,l)+t+i*Math.cos(u),ot(s,l)+r+a*Math.sin(u)]);return c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),Ln(c,null,l)}function vA(e,t,r,i,a,o,n,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[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:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(f?0:ot(h[0],s)),n[1]+(f?0:ot(h[0],s))]}),c=f?[a,o]:[a+ot(h[d],s),o+ot(h[d],s)],l.push({op:"bcurveTo",data:[e+ot(h[d],s),t+ot(h[d],s),r+ot(h[d],s),i+ot(h[d],s),c[0],c[1]]});return l}function xa(e){return[...e]}function Rd(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(xa(e[0]),xa(e[1]),xa(e[2]),xa(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 o=[],n=1-t;i.push(xa(a[0]));for(let s=1;s+2<a.length;s++){const l=a[s];o[0]=[l[0],l[1]],o[1]=[l[0]+(n*a[s+1][0]-n*a[s-1][0])/6,l[1]+(n*a[s+1][1]-n*a[s-1][1])/6],o[2]=[a[s+1][0]+(n*a[s][0]-n*a[s+2][0])/6,a[s+1][1]+(n*a[s][1]-n*a[s+2][1])/6],o[3]=[a[s+1][0],a[s+1][1]],i.push(o[1],o[2],o[3])}}return i}function qo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function BA(e,t,r){const i=qo(t,r);if(i===0)return qo(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)),qo(e,Nr(t,r,a))}function Nr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Vl(e,t,r,i){const a=i||[];if(function(s,l){const h=s[l+0],c=s[l+1],u=s[l+2],f=s[l+3];let d=3*c[0]-2*h[0]-f[0];d*=d;let g=3*c[1]-2*h[1]-f[1];g*=g;let p=3*u[0]-2*f[0]-h[0];p*=p;let m=3*u[1]-2*f[1]-h[1];return m*=m,d<p&&(d=p),g<m&&(g=m),d+g}(e,t)<r){const s=e[t+0];a.length?(o=a[a.length-1],n=s,Math.sqrt(qo(o,n))>1&&a.push(s)):a.push(s),a.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],f=Nr(l,h,.5),d=Nr(h,c,.5),g=Nr(c,u,.5),p=Nr(f,d,.5),m=Nr(d,g,.5),C=Nr(p,m,.5);Vl([l,f,p,C],0,r,a),Vl([C,m,g,u],0,r,a)}var o,n;return a}function LA(e,t){return Fn(e,0,e.length,t)}function Fn(e,t,r,i,a){const o=a||[],n=e[t],s=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=BA(e[c],n,s);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Fn(e,t,h+1,i,o),Fn(e,h,r,i,o)):(o.length||o.push(n),o.push(s)),o}function Zs(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let o=0;o<a;o++)Vl(e,3*o,t,i);return r&&r>0?Fn(i,0,i.length,r):i}const xe="none";class Mn{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,o){const n=this._o(o);return this._d("line",[U0(t,r,i,a,n)],n)}rectangle(t,r,i,a,o){const n=this._o(o),s=[],l=SA(t,r,i,a,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];n.fillStyle==="solid"?s.push(Vs([h],n)):s.push(mi([h],n))}return n.stroke!==xe&&s.push(l),this._d("rectangle",s,n)}ellipse(t,r,i,a,o){const n=this._o(o),s=[],l=Y0(i,a,n),h=Gl(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Gl(t,r,n,l).opset;c.type="fillPath",s.push(c)}else s.push(mi([h.estimatedPoints],n));return n.stroke!==xe&&s.push(h.opset),this._d("ellipse",s,n)}circle(t,r,i,a){const o=this.ellipse(t,r,i,i,a);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[No(t,!1,i)],i)}arc(t,r,i,a,o,n,s=!1,l){const h=this._o(l),c=[],u=$d(t,r,i,a,o,n,s,!0,h);if(s&&h.fill)if(h.fillStyle==="solid"){const f=Object.assign({},h);f.disableMultiStroke=!0;const d=$d(t,r,i,a,o,n,!0,!1,f);d.type="fillPath",c.push(d)}else c.push(function(f,d,g,p,m,C,b){const k=f,w=d;let _=Math.abs(g/2),S=Math.abs(p/2);_+=ot(.01*_,b),S+=ot(.01*S,b);let T=m,B=C;for(;T<0;)T+=2*Math.PI,B+=2*Math.PI;B-T>2*Math.PI&&(T=0,B=2*Math.PI);const R=(B-T)/b.curveStepCount,$=[];for(let F=T;F<=B;F+=R)$.push([k+_*Math.cos(F),w+S*Math.sin(F)]);return $.push([k+_*Math.cos(B),w+S*Math.sin(B)]),$.push([k,w]),mi([$],b)}(t,r,i,a,o,n,h));return h.stroke!==xe&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],o=Ed(t,i);if(i.fill&&i.fill!==xe)if(i.fillStyle==="solid"){const n=Ed(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const h of l)h.length<3?n.push(...h):h.length===3?n.push(...Zs(Rd([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Zs(Rd(h),10,(1+i.roughness)/2))}n.length&&a.push(mi([n],i))}return i.stroke!==xe&&a.push(o),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],o=No(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Vs([t],i)):a.push(mi([t],i))),i.stroke!==xe&&a.push(o),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 o=i.fill&&i.fill!=="transparent"&&i.fill!==xe,n=i.stroke!==xe,s=!!(i.simplification&&i.simplification<1),l=function(c,u,f){const d=W0(z0(pc(c))),g=[];let p=[],m=[0,0],C=[];const b=()=>{C.length>=4&&p.push(...Zs(C,u)),C=[]},k=()=>{b(),p.length&&(g.push(p),p=[])};for(const{key:_,data:S}of d)switch(_){case"M":k(),m=[S[0],S[1]],p.push(m);break;case"L":b(),p.push([S[0],S[1]]);break;case"C":if(!C.length){const T=p.length?p[p.length-1]:m;C.push([T[0],T[1]])}C.push([S[0],S[1]]),C.push([S[2],S[3]]),C.push([S[4],S[5]]);break;case"Z":b(),p.push([m[0],m[1]])}if(k(),!f)return g;const w=[];for(const _ of g){const S=LA(_,f);S.length&&w.push(S)}return w}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),h=Od(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const c=Od(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(Vs(l,i));else a.push(mi(l,i));return n&&(s?l.forEach(c=>{a.push(No(c,!1,i))}):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const o=typeof r=="number"&&r>=0?a.data.map(n=>+n.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const o of r){let n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:xe};break;case"fillPath":n={d:this.opsToPath(o),stroke:xe,strokeWidth:0,fill:i.fill||xe};break;case"fillSketch":n=this.fillSketch(o,i)}n&&a.push(n)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||xe,strokeWidth:i,fill:xe}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class FA{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Mn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.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,n,o),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,n,o,s),a.restore();break}case"fillSketch":this.fillSketch(a,n,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 o of r.ops){const n=typeof i=="number"&&i>=0?o.data.map(s=>+s.toFixed(i)):o.data;switch(o.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,o){const n=this.gen.line(t,r,i,a,o);return this.draw(n),n}rectangle(t,r,i,a,o){const n=this.gen.rectangle(t,r,i,a,o);return this.draw(n),n}ellipse(t,r,i,a,o){const n=this.gen.ellipse(t,r,i,a,o);return this.draw(n),n}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o),o}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,o,n,s=!1,l){const h=this.gen.arc(t,r,i,a,o,n,s,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Lo="http://www.w3.org/2000/svg";class MA{constructor(t,r){this.svg=t,this.gen=new Mn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Lo,"g"),n=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=a.createElementNS(Lo,"path"),l.setAttribute("d",this.opsToPath(s,n)),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(Lo,"path"),l.setAttribute("d",this.opsToPath(s,n)),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&&o.appendChild(l)}return o}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const o=t.createElementNS(Lo,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,o){const n=this.gen.line(t,r,i,a,o);return this.draw(n)}rectangle(t,r,i,a,o){const n=this.gen.rectangle(t,r,i,a,o);return this.draw(n)}ellipse(t,r,i,a,o){const n=this.gen.ellipse(t,r,i,a,o);return this.draw(n)}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o)}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,o,n,s=!1,l){const h=this.gen.arc(t,r,i,a,o,n,s,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var V={canvas:(e,t)=>new FA(e,t),svg:(e,t)=>new MA(e,t),generator:e=>new Mn(e),newSeed:()=>Mn.newSeed()},at=y(async(e,t,r)=>{var d,g;let i;const a=t.useHtmlLabels||pr((d=Ct())==null?void 0:d.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=o.insert("g").attr("class","label").attr("style",Yt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Cr(n,Ne(ei(s),Ct()),{useHtmlLabels:a,width:t.width||((g=Ct().flowchart)==null?void 0:g.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},Ct());let u=c.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(a){const p=c.children[0],m=ft(c);await d0(p,s),u=p.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return a?n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):n.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:f,label:n}},"labelHelper"),Qs=y(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ce(Ct()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Cr(a,Ne(ei(t),Ct()),{useHtmlLabels:i,width:r.width||((h=(l=Ct())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let n=o.getBBox();const s=r.padding/2;if(ce(Ct())){const c=o.children[0],u=ft(o);n=c.getBoundingClientRect(),u.attr("width",n.width),u.attr("height",n.height)}return i?a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):a.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:s,label:a}},"insertLabel"),J=y((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=y((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function mt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}y(mt,"createPathFromPoints");function Mr(e,t,r,i,a,o){const n=[],l=r-e,h=i-t,c=l/o,u=2*Math.PI/c,f=t+h/2;for(let d=0;d<=50;d++){const g=d/50,p=e+g*l,m=f+a*Math.sin(u*(p-e));n.push({x:p,y:m})}return n}y(Mr,"generateFullSineWavePoints");function Xa(e,t,r,i,a,o){const n=[],s=a*Math.PI/180,c=(o*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);n.push({x:-d,y:-g})}return n}y(Xa,"generateCirclePoints");function Zl(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const a=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),n=y((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(a){const l={fill:n(a,"fill"),"fill-opacity":n(a,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(o){const l={stroke:n(o,"stroke"),"stroke-width":n(o,"stroke-width")??"1","stroke-opacity":n(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}y(Zl,"mergePaths");var AA=y((e,t)=>{var r=e.x,i=e.y,a=t.x-r,o=t.y-i,n=e.width/2,s=e.height/2,l,h;return Math.abs(o)*n>Math.abs(a)*s?(o<0&&(s=-s),l=o===0?0:s*a/o,h=s):(a<0&&(n=-n),l=n,h=a===0?0:n*o/a),{x:r+l,y:i+h}},"intersectRect"),ta=AA,EA=y(async(e,t,r,i=!1,a=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const n=Ct(),s=ce(n);return await Cr(e,o,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},n)},"createLabel"),kr=EA,Or=y((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"),G0=y(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:n}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ce(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Cr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await kr(d,t.label,t.labelStyle||"",!1,!0);let p=g.getBBox();if(ce(r)){const T=g.children[0],B=ft(g);p=T.getBoundingClientRect(),B.attr("width",p.width),B.attr("height",p.height)}const m=t.width<=p.width+t.padding?p.width+t.padding:t.width;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const T=V.svg(u),B=Q(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:a}),R=T.path(Or(b,k,m,C,0),B);w=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:_}=ic(r);if(d.attr("transform",`translate(${t.x-p.width/2}, ${t.y-t.height/2+_})`),s){const T=d.select("span");T&&T.attr("style",s)}const S=w.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=p.height-t.padding/2,t.intersect=function(T){return ta(t,T)},{cluster:u,labelBBox:p}},"rect"),$A=y((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,o=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(s){return ta(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),OA=y(async(e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:n,compositeTitleBackground:s,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let f=h.append("rect");const d=await kr(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(ce(r)){const R=d.children[0],$=ft(d);g=R.getBoundingClientRect(),$.attr("width",g.width),$.attr("height",g.height)}const p=0*t.padding,m=p/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+p;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+p,k=t.height+p-g.height-6,w=t.x-C/2,_=t.y-b/2;t.width=C;const S=t.y-t.height/2-m+g.height+2;let T;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),$=V.svg(h),F=t.rx||t.ry?$.path(Or(w,_,C,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):$.rectangle(w,_,C,b,{seed:a});T=h.insert(()=>F,":first-child");const N=$.rectangle(w,S,C,k,{fill:R?o:n,fillStyle:R?"hachure":"solid",stroke:l,seed:a});T=h.insert(()=>F,":first-child"),f=h.insert(()=>N)}else T=c.insert("rect",":first-child"),T.attr("class","outer").attr("x",w).attr("y",_).attr("width",C).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",S).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${_+1-(ce(r)?0:3)})`);const B=T.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(R){return ta(t,R)},{cluster:h,labelBBox:g}},"roundedWithTitle"),IA=y(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:n}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=K(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ce(r),d=u.insert("g").attr("class","cluster-label "),g=await Cr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let p=g.getBBox();if(ce(r)){const T=g.children[0],B=ft(g);p=T.getBoundingClientRect(),B.attr("width",p.width),B.attr("height",p.height)}const m=t.width<=p.width+t.padding?p.width+t.padding:t.width;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;P.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const T=V.svg(u),B=Q(t,{roughness:.7,fill:o,stroke:n,fillWeight:4,seed:a}),R=T.path(Or(b,k,m,C,t.rx),B);w=u.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:_}=ic(r);if(d.attr("transform",`translate(${t.x-p.width/2}, ${t.y-t.height/2+_})`),s){const T=d.select("span");T&&T.attr("style",s)}const S=w.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=p.height-t.padding/2,t.intersect=function(T){return ta(t,T)},{cluster:u,labelBBox:p}},"kanbanSection"),DA=y((e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:o}=i,n=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),s=n.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,f=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const m=V.svg(n).rectangle(u,f,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});d=n.insert(()=>m,":first-child")}else{d=s.insert("rect",":first-child");let p="outer";t.look,p="divider",d.attr("class",p).attr("x",u).attr("y",f).attr("width",h).attr("height",c).attr("data-look",t.look)}const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(p){return ta(t,p)},{cluster:n,labelBBox:{}}},"divider"),PA=G0,RA={rect:G0,squareRect:PA,roundedWithTitle:OA,noteGroup:$A,divider:DA,kanbanSection:IA},X0=new Map,NA=y(async(e,t)=>{const r=t.shape||"rect",i=await RA[r](e,t);return X0.set(t.id,i),i},"insertCluster"),qO=y(()=>{X0=new Map},"clear");function V0(e,t){return e.intersect(t)}y(V0,"intersectNode");var qA=V0;function Z0(e,t,r,i){var a=e.x,o=e.y,n=a-i.x,s=o-i.y,l=Math.sqrt(t*t*s*s+r*r*n*n),h=Math.abs(t*r*n/l);i.x<a&&(h=-h);var c=Math.abs(t*r*s/l);return i.y<o&&(c=-c),{x:a+h,y:o+c}}y(Z0,"intersectEllipse");var Q0=Z0;function K0(e,t,r){return Q0(e,t,t,r)}y(K0,"intersectCircle");var zA=K0;function J0(e,t,r,i){{const a=t.y-e.y,o=e.x-t.x,n=t.x*e.y-e.x*t.y,s=a*r.x+o*r.y+n,l=a*i.x+o*i.y+n,h=1e-6;if(s!==0&&l!==0&&Ql(s,l))return;const c=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+f,g=c*t.x+u*t.y+f;if(Math.abs(d)<h&&Math.abs(g)<h&&Ql(d,g))return;const p=a*u-c*o;if(p===0)return;const m=Math.abs(p/2);let C=o*f-u*n;const b=C<0?(C-m)/p:(C+m)/p;C=c*n-a*f;const k=C<0?(C-m)/p:(C+m)/p;return{x:b,y:k}}}y(J0,"intersectLine");function Ql(e,t){return e*t>0}y(Ql,"sameSign");var WA=J0;function ty(e,t,r){let i=e.x,a=e.y,o=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){n=Math.min(n,c.x),s=Math.min(s,c.y)}):(n=Math.min(n,t.x),s=Math.min(s,t.y));let l=i-e.width/2-n,h=a-e.height/2-s;for(let c=0;c<t.length;c++){let u=t[c],f=t[c<t.length-1?c+1:0],d=WA(e,r,{x:l+u.x,y:h+u.y},{x:l+f.x,y:h+f.y});d&&o.push(d)}return o.length?(o.length>1&&o.sort(function(c,u){let f=c.x-r.x,d=c.y-r.y,g=Math.sqrt(f*f+d*d),p=u.x-r.x,m=u.y-r.y,C=Math.sqrt(p*p+m*m);return g<C?-1:g===C?0:1}),o[0]):e}y(ty,"intersectPolygon");var HA=ty,G={node:qA,circle:zA,ellipse:Q0,polygon:HA,rect:ta};function ey(e,t){const{labelStyles:r}=K(t);t.labelStyle=r;const i=rt(t);let a=i;i||(a="anchor");const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=1,{cssStyles:s}=t,l=V.svg(o),h=Q(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),u=o.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",Yt(s)),J(t,u),t.intersect=function(f){return P.info("Circle intersect",t,n,f),G.circle(t,n,f)},o}y(ey,"anchor");function Kl(e,t,r,i,a,o,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/o,p=Math.sqrt(d**2+g**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-p**2),C=l+m*o*Math.sin(c)*(n?-1:1),b=h-m*a*Math.cos(c)*(n?-1:1),k=Math.atan2((t-b)/o,(e-C)/a);let _=Math.atan2((i-b)/o,(r-C)/a)-k;n&&_<0&&(_+=2*Math.PI),!n&&_>0&&(_-=2*Math.PI);const S=[];for(let T=0;T<20;T++){const B=T/19,R=k+B*_,$=C+a*Math.cos(R),F=b+o*Math.sin(R);S.push({x:$,y:F})}return S}y(Kl,"generateArcPoints");function ry(e,t,r){const[i,a]=[t,r].sort((o,n)=>n-o);return a*(1-Math.sqrt(1-(e/i/2)**2))}y(ry,"calculateArcSagitta");async function iy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a,s=y(R=>R+n,"calcTotalHeight"),l=y(R=>{const $=R/2;return[$/(2.5+R/50),$]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=s(t!=null&&t.height?t==null?void 0:t.height:c.height),[f,d]=l(u),g=ry(u,f,d),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+g-g,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Kl(-m/2,-C/2,-m/2,C/2,f,d,!1),{x:m/2,y:C/2},...Kl(m/2,C/2,m/2,-C/2,f,d,!0)],w=V.svg(h),_=Q(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const S=mt(k),T=w.path(S,_),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${f/2}, 0)`),J(t,B),t.intersect=function(R){return G.polygon(t,k,R)},h}y(iy,"bowTieRect");function xr(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+")")}y(xr,"insertPolygonShape");var Fo=12;async function ay(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?28:a,n=t.look==="neo"?24:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+Fo),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,f=h,d=-c,g=0,p=[{x:u+Fo,y:d},{x:f,y:d},{x:f,y:g},{x:u,y:g},{x:u,y:d+Fo},{x:u+Fo,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(s),k=Q(t,{}),w=mt(p),_=b.path(w,k);m=s.insert(()=>_,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=xr(s,h,c,p);return i&&m.attr("style",i),J(t,m),t.intersect=function(b){return G.polygon(t,p,b)},s}y(ay,"card");function oy(e,t){const{nodeStyles:r}=K(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),n=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],s=V.svg(i),l=Q(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=mt(n),c=s.path(h,l),u=i.insert(()=>c,":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 G.polygon(t,n,f)},i}y(oy,"choice");async function mc(e,t,r){const{labelStyles:i,nodeStyles:a}=K(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,halfPadding:s}=await at(e,t,rt(t)),l=16,h=(r==null?void 0:r.padding)??s,c=t.look==="neo"?n.width/2+l*2:n.width/2+h;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=V.svg(o),g=Q(t,{}),p=d.circle(0,0,c*2,g);u=o.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",Yt(f))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return J(t,u),t.calcIntersect=function(d,g){const p=d.width/2;return G.circle(d,p,g)},t.intersect=function(d){return P.info("Circle intersect",t,c,d),G.circle(t,c,d)},o}y(mc,"circle");function ny(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},o={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${s.x},${s.y}
229
+ M ${a.x},${a.y} L ${n.x},${n.y}`}y(ny,"createLine");function sy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,s=V.svg(a),l=Q(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,o*2,l),c=ny(o),u=s.path(c,l),f=a.insert(()=>h,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),J(t,f),t.intersect=function(d){return P.info("crossedCircle intersect",t,{radius:o,point:d}),G.circle(t,o,d)},a}y(sy,"crossedCircle");function rr(e,t,r,i=100,a=0,o=180){const n=[],s=a*Math.PI/180,c=(o*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);n.push({x:-d,y:-g})}return n}y(rr,"generateCirclePoints");async function ly(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:n}=await at(e,t,rt(t)),s=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+s,c=o.height+l,u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...rr(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...rr(h/2+u*2,-u,u,20,-180,-270),...rr(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...rr(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...rr(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...rr(h/2+h*.1,-u,u,20,-180,-270),...rr(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...rr(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],p=V.svg(a),m=Q(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=mt(d).replace("Z",""),k=p.path(b,m),w=mt(g),_=p.path(w,{...m}),S=a.insert("g",":first-child");return S.insert(()=>_,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.attr("class","text"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),J(t,S),t.intersect=function(T){return G.polygon(t,g,T)},a}y(ly,"curlyBraceLeft");function ir(e,t,r,i=100,a=0,o=180){const n=[],s=a*Math.PI/180,c=(o*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);n.push({x:d,y:g})}return n}y(ir,"generateCirclePoints");async function hy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:n}=await at(e,t,rt(t)),s=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+(t.look==="neo"?s*2:s),c=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...ir(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...ir(h/2+u*2,-u,u,20,-180,-270),...ir(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...ir(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...ir(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...ir(h/2+u*2,-u,u,20,-180,-270),...ir(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...ir(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],p=V.svg(a),m=Q(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=mt(d).replace("Z",""),k=p.path(b,m),w=mt(g),_=p.path(w,{...m}),S=a.insert("g",":first-child");return S.insert(()=>_,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.attr("class","text"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),J(t,S),t.intersect=function(T){return G.polygon(t,g,T)},a}y(hy,"curlyBraceRight");function Xt(e,t,r,i=100,a=0,o=180){const n=[],s=a*Math.PI/180,c=(o*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const f=s+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);n.push({x:-d,y:-g})}return n}y(Xt,"generateCirclePoints");async function cy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:n}=await at(e,t,rt(t)),s=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+(t.look==="neo"?s*2:s),c=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...Xt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Xt(h/2+u*2,-u,u,20,-180,-270),...Xt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Xt(h/2,c/2,u,20,0,90)],g=[...Xt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Xt(-h/2-u/2,-u,u,20,0,90),...Xt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Xt(-h/2+u+u/2,c/2,u,30,-180,-270)],p=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Xt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Xt(h/2+u*2,-u,u,20,-180,-270),...Xt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Xt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Xt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Xt(-h/2-u/2,-u,u,20,0,90),...Xt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Xt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=V.svg(a),C=Q(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=mt(d).replace("Z",""),w=m.path(k,C),S=mt(g).replace("Z",""),T=m.path(S,C),B=mt(p),R=m.path(B,{...C}),$=a.insert("g",":first-child");return $.insert(()=>R,":first-child").attr("stroke-opacity",0),$.insert(()=>w,":first-child"),$.insert(()=>T,":first-child"),$.attr("class","text"),f&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),J(t,$),t.intersect=function(F){return G.polygon(t,p,F)},a}y(cy,"curlyBraces");async function uy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a,s=20,l=5,{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=Math.max(s,(c.width+o*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:g}=t,p=V.svg(h),m=Q(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=f,k=C-d,w=b/4,_=[{x:k,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:k,y:b},...Xa(-k,-b/2,d,50,270,90)],S=mt(_),T=p.path(S,m),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-u/2}, ${-f/2})`),J(t,B),t.intersect=function(R){return G.polygon(t,_,R)},h}y(uy,"curvedTrapezoid");var UA=y((e,t,r,i,a,o)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),YA=y((e,t,r,i,a,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),jA=y((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nd=8,qd=8;async function dy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?24:a,n=t.look==="neo"?24:a;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-n,t.width<qd&&(t.width=qd);const b=m/2/(2.5+m/50);t.height=(t.height??0)-o-b*3,t.height<Nd&&(t.height=Nd)}const{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=(t.width?t.width:l.width)+n,u=c/2,f=u/(2.5+c/50),d=(t.height?t.height:l.height)+o+f;let g;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=V.svg(s),C=YA(0,0,c,d,u,f),b=jA(0,f,c,d,u,f),k=Q(t,{}),w=m.path(C,k),_=m.path(b,Q(t,{fill:"none"}));g=s.insert(()=>_,":first-child"),g=s.insert(()=>w,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=UA(0,0,c,d,u,f);g=s.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",Yt(p)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),J(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=G.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=f-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},s}y(dy,"cylinder");async function fy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=s.width+a,c=s.height+o,u=c*.2,f=-h/2,d=-c/2-u/2,{cssStyles:g}=t,p=V.svg(n),m=Q(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=p.polygon(C.map(w=>[w.x,w.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${d+u+(t.padding??0)/2-(s.y-(s.top??0))})`),J(t,k),t.intersect=function(w){return G.rect(t,w)},n}y(fy,"dividedRectangle");async function gy(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=K(t),a=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,n=t.look==="neo"?16:o,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),c=h-a;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=V.svg(s),m=Q(t,{roughness:.2,strokeWidth:2.5}),C=Q(t,{roughness:.2,strokeWidth:1.5}),b=p.circle(0,0,h*2,m),k=p.circle(0,0,c*2,C);u=s.insert("g",":first-child"),u.attr("class",Yt(t.cssClasses)).attr("style",Yt(f)),(d=u.node())==null||d.appendChild(b),(g=u.node())==null||g.appendChild(k)}else{u=s.insert("g",":first-child");const p=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),p.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return J(t,u),t.intersect=function(p){return P.info("DoubleCircle intersect",t,h,p),G.circle(t,h,p)},s}y(gy,"doublecircle");function py(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=K(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),n=7,{cssStyles:s}=t,l=V.svg(o),{nodeBorder:h}=r,c=Q(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,n*2,c),f=o.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${h} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),J(t,f),t.intersect=function(d){return P.info("filledCircle intersect",t,{radius:n,point:d}),G.circle(t,n,d)},o}y(py,"filledCircle");var zd=10,Wd=10;async function my(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<zd&&(t.height=zd),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<Wd&&(t.width=Wd));const{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:s.width)+(o??0),c=t!=null&&t.height?t==null?void 0:t.height:h+s.height,u=c,f=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,g=V.svg(n),p=Q(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=mt(f),C=g.path(m,p),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,J(t,b),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-c/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(k){return P.info("Triangle intersect",t,f,k),G.polygon(t,f,k)},n}y(my,"flippedTriangle");function yy(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=K(t);t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,f=V.svg(n),d=Q(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(c,u,l,h,d),p=n.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),J(t,p);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return G.rect(t,C)},n}y(yy,"forkJoin");async function Cy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=15,o=10,n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-s*2,t.height<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+n*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,h.height))+s*2,f=u/2,{cssStyles:d}=t,g=V.svg(l),p=Q(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-c/2,y:-u/2},{x:c/2-f,y:-u/2},...Xa(-c/2+f,0,f,50,90,270),{x:c/2-f,y:u/2},{x:-c/2,y:u/2}],C=mt(m),b=g.path(C,p),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(w){return P.info("Pill intersect",t,{radius:f,point:w}),G.polygon(t,m,w)},l}y(Cy,"halfRoundedRectangle");var GA=y((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function xy(e,t){const{labelStyles:r,nodeStyles:i}=K(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,n=70,s=32,l=t.look==="neo"?n:o,h=t.look==="neo"?s:o;if(t.width||t.height){const k=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await at(e,t,rt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/a,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,p=[{x:d,y:0},{x:g-d,y:0},{x:g,y:-f/2},{x:g-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=V.svg(c),k=Q(t,{}),w=GA(0,0,g,f,d),_=b.path(w,k);m=c.insert(()=>_,":first-child").attr("transform",`translate(${-g/2}, ${f/2})`),C&&m.attr("style",C)}else m=xr(c,g,f,p);return i&&m.attr("style",i),t.width=g,t.height=f,J(t,m),t.intersect=function(b){return G.polygon(t,p,b)},c}y(xy,"hexagon");async function by(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await at(e,t,rt(t)),o=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=V.svg(a),h=Q(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:o,y:0},{x:0,y:n},{x:o,y:n}],u=mt(c),f=l.path(u,h),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),s&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-o/2}, ${-n/2})`),J(t,d),t.intersect=function(g){return P.info("Pill intersect",t,{points:c}),G.polygon(t,c,g)},a}y(by,"hourglass");async function ky(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=K(t);t.labelStyle=a;const o=t.assetHeight??48,n=t.assetWidth??48,s=Math.max(o,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:u}=await at(e,t,"icon-shape default"),f=t.pos==="t",d=s,g=s,{nodeBorder:p}=r,{stylesMap:m}=Ji(t),C=-g/2,b=-d/2,k=t.label?8:0,w=V.svg(h),_=Q(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const S=w.rectangle(C,b,g,d,_),T=Math.max(g,c.width),B=d+c.height+k,R=w.rectangle(-T/2,-B/2,T,B,{..._,fill:"transparent",stroke:"none"}),$=h.insert(()=>S,":first-child"),F=h.insert(()=>R);if(t.icon){const N=h.append("g");N.html(`<g>${await so(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const M=N.node().getBBox(),O=M.width,W=M.height,q=M.x,H=M.y;N.attr("transform",`translate(${-O/2-q},${f?c.height/2+k/2-W/2-H:-c.height/2-k/2-W/2-H})`),N.attr("style",`color: ${m.get("stroke")??p};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-B/2:B/2-c.height})`),$.attr("transform",`translate(0,${f?c.height/2+k/2:-c.height/2-k/2})`),J(t,F),t.intersect=function(N){if(P.info("iconSquare intersect",t,N),!t.label)return G.rect(t,N);const M=t.x??0,O=t.y??0,W=t.height??0;let q=[];return f?q=[{x:M-c.width/2,y:O-W/2},{x:M+c.width/2,y:O-W/2},{x:M+c.width/2,y:O-W/2+c.height+k},{x:M+g/2,y:O-W/2+c.height+k},{x:M+g/2,y:O+W/2},{x:M-g/2,y:O+W/2},{x:M-g/2,y:O-W/2+c.height+k},{x:M-c.width/2,y:O-W/2+c.height+k}]:q=[{x:M-g/2,y:O-W/2},{x:M+g/2,y:O-W/2},{x:M+g/2,y:O-W/2+d},{x:M+c.width/2,y:O-W/2+d},{x:M+c.width/2/2,y:O+W/2},{x:M-c.width/2,y:O+W/2},{x:M-c.width/2,y:O-W/2+d},{x:M-g/2,y:O-W/2+d}],G.polygon(t,q,N)},h}y(ky,"icon");async function Ty(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=K(t);t.labelStyle=a;const o=t.assetHeight??48,n=t.assetWidth??48,s=Math.max(o,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:u}=await at(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:p,mainBkg:m}=r,{stylesMap:C}=Ji(t),b=V.svg(h),k=Q(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??m;const _=h.append("g");t.icon&&_.html(`<g>${await so(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const S=_.node().getBBox(),T=S.width,B=S.height,R=S.x,$=S.y,F=Math.max(T,B)*Math.SQRT2+f*2,N=b.circle(0,0,F,k),M=Math.max(F,c.width),O=F+c.height+d,W=b.rectangle(-M/2,-O/2,M,O,{...k,fill:"transparent",stroke:"none"}),q=h.insert(()=>N,":first-child"),H=h.insert(()=>W);return _.attr("transform",`translate(${-T/2-R},${g?c.height/2+d/2-B/2-$:-c.height/2-d/2-B/2-$})`),_.attr("style",`color: ${C.get("stroke")??p};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-O/2:O/2-c.height})`),q.attr("transform",`translate(0,${g?c.height/2+d/2:-c.height/2-d/2})`),J(t,H),t.intersect=function(D){return P.info("iconSquare intersect",t,D),G.rect(t,D)},h}y(Ty,"iconCircle");async function wy(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=K(t);t.labelStyle=a;const o=t.assetHeight??48,n=t.assetWidth??48,s=Math.max(o,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await at(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,p=s+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Ji(t),k=-p/2,w=-g/2,_=t.label?8:0,S=V.svg(h),T=Q(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=b.get("fill");T.stroke=B??C;const R=S.path(Or(k,w,p,g,5),T),$=Math.max(p,c.width),F=g+c.height+_,N=S.rectangle(-$/2,-F/2,$,F,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>R,":first-child").attr("class","icon-shape2"),O=h.insert(()=>N);if(t.icon){const W=h.append("g");W.html(`<g>${await so(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const q=W.node().getBBox(),H=q.width,D=q.height,X=q.x,lt=q.y;W.attr("transform",`translate(${-H/2-X},${d?c.height/2+_/2-D/2-lt:-c.height/2-_/2-D/2-lt})`),W.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-F/2:F/2-c.height})`),M.attr("transform",`translate(0,${d?c.height/2+_/2:-c.height/2-_/2})`),J(t,O),t.intersect=function(W){if(P.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const q=t.x??0,H=t.y??0,D=t.height??0;let X=[];return d?X=[{x:q-c.width/2,y:H-D/2},{x:q+c.width/2,y:H-D/2},{x:q+c.width/2,y:H-D/2+c.height+_},{x:q+p/2,y:H-D/2+c.height+_},{x:q+p/2,y:H+D/2},{x:q-p/2,y:H+D/2},{x:q-p/2,y:H-D/2+c.height+_},{x:q-c.width/2,y:H-D/2+c.height+_}]:X=[{x:q-p/2,y:H-D/2},{x:q+p/2,y:H-D/2},{x:q+p/2,y:H-D/2+g},{x:q+c.width/2,y:H-D/2+g},{x:q+c.width/2/2,y:H+D/2},{x:q-c.width/2,y:H+D/2},{x:q-c.width/2,y:H-D/2+g},{x:q-p/2,y:H-D/2+g}],G.polygon(t,X,W)},h}y(wy,"iconRounded");async function _y(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=K(t);t.labelStyle=a;const o=t.assetHeight??48,n=t.assetWidth??48,s=Math.max(o,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await at(e,t,"icon-shape default"),d=t.pos==="t",g=s+u*2,p=s+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=Ji(t),k=-p/2,w=-g/2,_=t.label?8:0,S=V.svg(h),T=Q(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=b.get("fill");T.stroke=B??C;const R=S.path(Or(k,w,p,g,.1),T),$=Math.max(p,c.width),F=g+c.height+_,N=S.rectangle(-$/2,-F/2,$,F,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>R,":first-child"),O=h.insert(()=>N);if(t.icon){const W=h.append("g");W.html(`<g>${await so(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const q=W.node().getBBox(),H=q.width,D=q.height,X=q.x,lt=q.y;W.attr("transform",`translate(${-H/2-X},${d?c.height/2+_/2-D/2-lt:-c.height/2-_/2-D/2-lt})`),W.attr("style",`color: ${b.get("stroke")??m};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-F/2:F/2-c.height})`),M.attr("transform",`translate(0,${d?c.height/2+_/2:-c.height/2-_/2})`),J(t,O),t.intersect=function(W){if(P.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const q=t.x??0,H=t.y??0,D=t.height??0;let X=[];return d?X=[{x:q-c.width/2,y:H-D/2},{x:q+c.width/2,y:H-D/2},{x:q+c.width/2,y:H-D/2+c.height+_},{x:q+p/2,y:H-D/2+c.height+_},{x:q+p/2,y:H+D/2},{x:q-p/2,y:H+D/2},{x:q-p/2,y:H-D/2+c.height+_},{x:q-c.width/2,y:H-D/2+c.height+_}]:X=[{x:q-p/2,y:H-D/2},{x:q+p/2,y:H-D/2},{x:q+p/2,y:H-D/2+g},{x:q+c.width/2,y:H-D/2+g},{x:q+c.width/2/2,y:H+D/2},{x:q-c.width/2,y:H+D/2},{x:q-c.width/2,y:H-D/2+g},{x:q-p/2,y:H-D/2+g}],G.polygon(t,X,W)},h}y(_y,"iconSquare");async function Sy(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","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;const{labelStyles:n}=K(t);t.labelStyle=n;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),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(h,s??0);const{shapeSvg:u,bbox:f,label:d}=await at(e,t,"image-shape default"),g=t.pos==="t",p=-h/2,m=-c/2,C=t.label?8:0,b=V.svg(u),k=Q(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(p,m,h,c,k),_=Math.max(h,f.width),S=c+f.height+C,T=b.rectangle(-_/2,-S/2,_,S,{...k,fill:"none",stroke:"none"}),B=u.insert(()=>w,":first-child"),R=u.insert(()=>T);if(t.img){const $=u.append("image");$.attr("href",t.img),$.attr("width",h),$.attr("height",c),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-h/2},${g?S/2-c:-S/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-c/2-f.height/2-C/2:c/2-f.height/2+C/2})`),B.attr("transform",`translate(0,${g?f.height/2+C/2:-f.height/2-C/2})`),J(t,R),t.intersect=function($){if(P.info("iconSquare intersect",t,$),!t.label)return G.rect(t,$);const F=t.x??0,N=t.y??0,M=t.height??0;let O=[];return g?O=[{x:F-f.width/2,y:N-M/2},{x:F+f.width/2,y:N-M/2},{x:F+f.width/2,y:N-M/2+f.height+C},{x:F+h/2,y:N-M/2+f.height+C},{x:F+h/2,y:N+M/2},{x:F-h/2,y:N+M/2},{x:F-h/2,y:N-M/2+f.height+C},{x:F-f.width/2,y:N-M/2+f.height+C}]:O=[{x:F-h/2,y:N-M/2},{x:F+h/2,y:N-M/2},{x:F+h/2,y:N-M/2+c},{x:F+f.width/2,y:N-M/2+c},{x:F+f.width/2/2,y:N+M/2},{x:F-f.width/2,y:N+M/2},{x:F-f.width/2,y:N-M/2+c},{x:F-h/2,y:N-M/2+c}],G.polygon(t,O,$)},u}y(Sy,"imageSquare");async function vy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=a,n=t.look==="neo"?a*2:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=Math.max(l.width+(n??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(o??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=V.svg(s),p=Q(t,{}),m=mt(u),C=g.path(m,p);f=s.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=xr(s,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,J(t,f),t.intersect=function(g){return G.polygon(t,u,g)},s}y(vy,"inv_trapezoid");async function ho(e,t,r){const{labelStyles:i,nodeStyles:a}=K(t);t.labelStyle=i;const{shapeSvg:o,bbox:n}=await at(e,t,rt(t)),s=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-s/2,c=-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 p=V.svg(o),m=Q(t,{}),C=f||d?p.path(Or(h,c,s,l,f||0),m):p.rectangle(h,c,s,l,m);u=o.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Yt(g))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Yt(f)).attr("ry",Yt(d)).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return J(t,u),t.calcIntersect=function(p,m){return G.rect(p,m)},t.intersect=function(p){return G.rect(t,p)},o}y(ho,"drawRect");async function By(e,t){const{shapeSvg:r,bbox:i,label:a}=await at(e,t,"label"),o=r.insert("rect",":first-child");return o.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))})`),J(t,o),t.intersect=function(l){return G.rect(t,l)},r}y(By,"labelRect");async function Ly(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=a,n=t.look==="neo"?a*2:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=V.svg(s),p=Q(t,{}),m=mt(u),C=g.path(m,p);f=s.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=xr(s,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,J(t,f),t.intersect=function(g){return G.polygon(t,u,g)},s}y(Ly,"lean_left");async function Fy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=a,n=t.look==="neo"?a*2:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=V.svg(s),p=Q(t,{}),m=mt(u),C=g.path(m,p);f=s.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=xr(s,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,J(t,f),t.intersect=function(g){return G.polygon(t,u,g)},s}y(Fy,"lean_right");function My(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,n=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:n,y:0},{x:0,y:s+l/2},{x:n-2*l,y:s+l/2},{x:0,y:2*s},{x:n,y:s-l/2},{x:2*l,y:s-l/2}],c=V.svg(a),u=Q(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=mt(h),d=c.path(f,u),g=a.insert(()=>d,":first-child");return g.attr("class","outer-path"),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${n/2},${-s})`),J(t,g),t.intersect=function(p){return P.info("lightningBolt intersect",t,p),G.polygon(t,h,p)},a}y(My,"lightningBolt");var XA=y((e,t,r,i,a,o,n)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+n}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),VA=y((e,t,r,i,a,o,n)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+n}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ZA=y((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Hd=10,Ud=10;async function Ay(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<Ud&&(t.width=Ud);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<Hd&&(t.height=Hd)}const{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=c/2,f=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+n*2,g=d*.1;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=V.svg(s),b=VA(0,0,c,d,u,f,g),k=ZA(0,f,c,d,u,f),w=Q(t,{}),_=C.path(b,w),S=C.path(k,w);s.insert(()=>S,":first-child").attr("class","line"),p=s.insert(()=>_,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const C=XA(0,0,c,d,u,f,g);p=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Yt(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),J(t,p),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let w=f*f*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},s}y(Ay,"linedCylinder");async function Ey(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:g}=t,p=V.svg(s),m=Q(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...Mr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,f,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=p.polygon(C.map(w=>[w.x,w.y]),m),k=s.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),J(t,k),t.intersect=function(w){return G.polygon(t,C,w)},s}y(Ey,"linedWaveEdgedRect");async function $y(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a,s=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-2*s,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*s,10));const{shapeSvg:l,bbox:h,label:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+2*s,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*s,d=u-2*s,g=f-2*s,p=-d/2,m=-g/2,{cssStyles:C}=t,b=V.svg(l),k=Q(t,{}),w=[{x:p-s,y:m+s},{x:p-s,y:m+g+s},{x:p+d-s,y:m+g+s},{x:p+d-s,y:m+g},{x:p+d,y:m+g},{x:p+d,y:m+g-s},{x:p+d+s,y:m+g-s},{x:p+d+s,y:m-s},{x:p+s,y:m-s},{x:p+s,y:m},{x:p,y:m},{x:p,y:m+s}],_=[{x:p,y:m+s},{x:p+d-s,y:m+s},{x:p+d-s,y:m+g},{x:p+d,y:m+g},{x:p+d,y:m},{x:p,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=mt(w);let T=b.path(S,k);const B=mt(_);let R=b.path(B,k);t.look!=="handDrawn"&&(T=Zl(T),R=Zl(R));const $=l.insert("g",":first-child");return $.insert(()=>T),$.insert(()=>R),$.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-s-(h.x-(h.left??0))}, ${-(h.height/2)+s-(h.y-(h.top??0))})`),J(t,$),t.intersect=function(F){return G.polygon(t,w,F)},l}y($y,"multiRect");async function Oy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:n}=await at(e,t,rt(t)),s=t.padding??0,l=t.look==="neo"?16:s,h=t.look==="neo"?12:s;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(o.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?f/4:f/8,g=f+(c?d/2:-d/2),p=-u/2,m=-g/2,C=10,{cssStyles:b}=t,k=Mr(p-C,m+g+C,p+u-C,m+g+C,d,.8),w=k==null?void 0:k[k.length-1],_=[{x:p-C,y:m+C},{x:p-C,y:m+g+C},...k,{x:p+u-C,y:w.y-C},{x:p+u,y:w.y-C},{x:p+u,y:w.y-2*C},{x:p+u+C,y:w.y-2*C},{x:p+u+C,y:m-C},{x:p+C,y:m-C},{x:p+C,y:m},{x:p,y:m},{x:p,y:m+C}],S=[{x:p,y:m+C},{x:p+u-C,y:m+C},{x:p+u-C,y:w.y-C},{x:p+u,y:w.y-C},{x:p+u,y:m},{x:p,y:m}],T=V.svg(a),B=Q(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const R=mt(_),$=T.path(R,B),F=mt(S),N=T.path(F,B),M=a.insert(()=>$,":first-child");return M.insert(()=>N),M.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-d/2})`),n.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-d/2-(o.y-(o.top??0))})`),J(t,M),t.intersect=function(O){return G.polygon(t,_,O)},a}y(Oy,"multiWaveEdgedRectangle");async function Iy(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=K(t);t.labelStyle=i,t.useHtmlLabels||ce(Mt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,f=-c/2,{cssStyles:d}=t,g=V.svg(n),p=Q(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=g.rectangle(u,f,h,c,p),C=n.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&C.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))})`),J(t,C),t.intersect=function(b){return G.rect(t,b)},n}y(Iy,"note");var QA=y((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 Dy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await at(e,t,rt(t)),n=o.width+(t.padding??0),s=o.height+(t.padding??0),l=n+s,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=V.svg(a),g=Q(t,{}),p=QA(0,0,l),m=d.path(p,g);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),f&&u.attr("style",f)}else u=xr(a,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),J(t,u),t.calcIntersect=function(d,g){const p=d.width,m=[{x:p/2,y:0},{x:p,y:-p/2},{x:p/2,y:-p},{x:0,y:-p/2}],C=G.polygon(d,m,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}y(Dy,"question");async function Py(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?21:a??0,n=t.look==="neo"?12:a??0,{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),f=-c/2,d=-u/2,g=d/2,p=[{x:f+g,y:d},{x:f,y:0},{x:f+g,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:m}=t,C=V.svg(s),b=Q(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=mt(p),w=C.path(k,b),_=s.insert(()=>w,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-g/2},0)`),h.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,_),t.intersect=function(S){return G.polygon(t,p,S)},s}y(Py,"rect_left_inv_arrow");async function Ry(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=o.insert("g"),s=o.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await kr(s,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ce(Ct())){const B=c.children[0],R=ft(c);u=B.getBoundingClientRect(),R.attr("width",u.width),R.attr("height",u.height)}P.info("Text 2",l);const f=l||[],d=c.getBBox(),g=await kr(s,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),p=g.children[0],m=ft(g);u=p.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;ft(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ft(c).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-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,_=-u.height/2-C;let S,T;if(t.look==="handDrawn"){const B=V.svg(o),R=Q(t,{}),$=B.path(Or(w,_,b,k,t.rx||0),R),F=B.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,R);T=o.insert(()=>(P.debug("Rough node insert CXC",$),F),":first-child"),S=o.insert(()=>(P.debug("Rough node insert CXC",$),$),":first-child")}else S=n.insert("rect",":first-child"),T=n.insert("line"),S.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return J(t,S),t.intersect=function(B){return G.rect(t,B)},o}y(Ry,"rectWithTitle");async function Ny(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,a={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return ho(e,t,a)}y(Ny,"roundedRect");var Pr=8;async function qy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??s.width)+a*2+(t.look==="neo"?Pr:Pr*2),c=((t==null?void 0:t.height)??s.height)+o*2,u=h-Pr,f=c,d=Pr-h/2,g=-c/2,{cssStyles:p}=t,m=V.svg(n),C=Q(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+f},{x:d-Pr,y:g+f},{x:d-Pr,y:g},{x:d,y:g},{x:d,y:g+f}],k=m.polygon(b.map(_=>[_.x,_.y]),C),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",Yt(p)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Pr/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),J(t,w),t.intersect=function(_){return G.rect(t,_)},n}y(qy,"shadedProcess");async function zy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,f=c,d=u/1.5,g=-f/2,p=-d/2,{cssStyles:m}=t,C=V.svg(s),b=Q(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:p},{x:g,y:p+d},{x:g+f,y:p+d},{x:g+f,y:p-d/2}],w=mt(k),_=C.path(w,b),S=s.insert(()=>_,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),J(t,S),t.intersect=function(T){return G.polygon(t,k,T)},s}y(zy,"slopedRect");async function Wy(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return ho(e,t,o)}y(Wy,"squareRect");async function Hy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?20:a,n=t.look==="neo"?12:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?o*2:o),u=h/2,{cssStyles:f}=t,d=V.svg(s),g=Q(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const p=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...Xa(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...Xa(c/2-u,0,u,50,270,450)],m=mt(p),C=d.path(m,g),b=s.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),J(t,b),t.intersect=function(k){return G.polygon(t,p,k)},s}y(Hy,"stadium");async function Uy(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ho(e,t,r)}y(Uy,"state");function Yy(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:a}=K(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:n,stateBorder:s,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=V.svg(c),f=Q(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:n,strokeWidth:2}),g=s??l,p=(t.width??0)*5/14,m=u.circle(0,0,p,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",_=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${_})`)}return J(t,C),t.intersect=function(w){return G.circle(t,(t.width??0)/2,w)},c}y(Yy,"stateEnd");function jy(e,t,{config:{themeVariables:r}}){var s,l;const{lineColor:i,nodeShadow:a}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=V.svg(o).circle(0,0,t.width,nM(i));n=o.insert(()=>c),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=o.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const h=((l=(s=e.node())==null?void 0:s.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${c})`)}return J(t,n),t.intersect=function(h){return G.circle(t,(t.width??7)/2,h)},o}y(jy,"stateStart");var yi=8;async function Gy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:a,n=t.look==="neo"?12:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+2*yi+o,c=((t==null?void 0:t.height)??l.height)+n,u=h-2*yi,f=c,d=-h/2,g=-c/2,p=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const m=V.svg(s),C=Q(t,{}),b=m.rectangle(d,g,u+16,f,C),k=m.line(d+yi,g,d+yi,g+f,C),w=m.line(d+yi+u,g,d+yi+u,g+f,C);s.insert(()=>k,":first-child"),s.insert(()=>w,":first-child");const _=s.insert(()=>b,":first-child"),{cssStyles:S}=t;_.attr("class","basic label-container").attr("style",Yt(S)),J(t,_)}else{const m=xr(s,u,f,p);i&&m.attr("style",i),J(t,m)}return t.intersect=function(m){return G.polygon(t,p,m)},s}y(Gy,"subroutine");var Ks=.2;async function Xy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-Ks*(t.height+n*2),10));const{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=Ks*h,u=Ks*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+c-c,g=h,p=-d/2,m=-g/2,{cssStyles:C}=t,b=V.svg(s),k=Q(t,{}),w=[{x:p-c/2,y:m},{x:p+d+c/2,y:m},{x:p+d+c/2,y:m+g},{x:p-c/2,y:m+g}],_=[{x:p+d-c/2,y:m+g},{x:p+d+c/2,y:m+g},{x:p+d+c/2,y:m+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=mt(w),T=b.path(S,k),B=mt(_),R=b.path(B,{...k,fillStyle:"solid"}),$=s.insert(()=>R,":first-child");return $.insert(()=>T,":first-child"),$.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),J(t,$),t.intersect=function(F){return G.polygon(t,w,F)},s}y(Xy,"taggedRect");async function Vy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:n}=await at(e,t,rt(t)),s=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*s,u=.2*l,f=l+h,{cssStyles:d}=t,g=V.svg(a),p=Q(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:f/2},...Mr(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,h,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],C=-s/2+s/2*.1,b=-f/2-u*.4,k=[{x:C+s-c,y:(b+l)*1.3},{x:C+s,y:b+l-u},{x:C+s,y:(b+l)*.9},...Mr(C+s,(b+l)*1.25,C+s-c,(b+l)*1.3,-l*.02,.5)],w=mt(m),_=g.path(w,p),S=mt(k),T=g.path(S,{...p,fillStyle:"solid"}),B=a.insert(()=>T,":first-child");return B.insert(()=>_,":first-child"),B.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-h/2-(o.y-(o.top??0))})`),J(t,B),t.intersect=function(R){return G.polygon(t,m,R)},a}y(Vy,"taggedWaveEdgedRectangle");async function Zy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await at(e,t,rt(t)),n=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),s=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-s/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",s),J(t,c),t.intersect=function(u){return G.rect(t,u)},a}y(Zy,"text");var KA=y((e,t,r,i,a,o)=>`M${e},${t}
230
+ a${a},${o} 0,0,1 0,${-i}
231
+ l${r},0
232
+ a${a},${o} 0,0,1 0,${i}
233
+ M${r},${-i}
234
+ a${a},${o} 0,0,0 0,${i}
235
+ l${-r},0`,"createCylinderPathD"),JA=y((e,t,r,i,a,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),tE=y((e,t,r,i,a,o)=>[`M${e+r/2},${-i/2}`,`a${a},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Yd=5,jd=10;async function Qy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?12:a/2;if(t.width||t.height){const p=t.height??0;t.height=(t.height??0)-o,t.height<Yd&&(t.height=Yd);const C=p/2/(2.5+p/50);t.width=(t.width??0)-o-C*3,t.width<jd&&(t.width=jd)}const{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=(t.height?t.height:s.height)+o,c=h/2,u=c/(2.5+h/50),f=(t.width?t.width:s.width)+u+o,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const p=V.svg(n),m=JA(0,0,f,h,u,c),C=tE(0,0,f,h,u,c),b=p.path(m,Q(t,{})),k=p.path(C,Q(t,{fill:"none"}));g=n.insert(()=>k,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const p=KA(0,0,f,h,u,c);g=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Yt(d)).attr("style",i),g.attr("class","basic label-container outer-path"),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}, ${h/2} )`),l.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),J(t,g),t.intersect=function(p){const m=G.rect(t,p),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,p.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},n}y(Qy,"tiltedCylinder");async function Ky(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=(t.look==="neo",a),n=t.look==="neo"?a*2:a,{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=V.svg(s),p=Q(t,{}),m=mt(u),C=g.path(m,p);f=s.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=xr(s,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,J(t,f),t.intersect=function(g){return G.polygon(t,u,g)},s}y(Ky,"trapezoid");async function Jy(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a,s=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:d}=t,g=V.svg(h),p=Q(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=mt(m),b=g.path(C,p),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(w){return G.polygon(t,m,w)},h}y(Jy,"trapezoidalPentagon");var Gd=10,Xd=10;async function tC(e,t){var w;const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<Xd&&(t.width=Xd),t.height=(t==null?void 0:t.height)??0,t.height<Gd&&(t.height=Gd));const{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=pr((w=Ct().flowchart)==null?void 0:w.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:s.width)+o,u=t!=null&&t.height?t==null?void 0:t.height:c+s.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:g}=t,p=V.svg(n),m=Q(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=mt(d),b=p.path(C,m),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,J(t,k),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${u/2-(s.height+(t.padding??0)/(h?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(_){return P.info("Triangle intersect",t,d,_),G.polygon(t,d,_)},n}y(tC,"triangle");async function eC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?12:a;let s=!0;(t.width||t.height)&&(s=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(o??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,d=t.look==="neo"?f/4:f/8,g=f+(s?d:-d),{cssStyles:p}=t,C=14-u,b=C>0?C/2:0,k=V.svg(l),w=Q(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=[{x:-u/2-b,y:g/2},...Mr(-u/2-b,g/2,u/2+b,g/2,d,.8),{x:u/2+b,y:-g/2},{x:-u/2-b,y:-g/2}],S=mt(_),T=k.path(S,w),B=l.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-f/2+(t.padding??0)-d-(h.y-(h.top??0))})`),J(t,B),t.intersect=function(R){return G.polygon(t,_,R)},l}y(eC,"waveEdgedRectangle");async function rC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,n=t.look==="neo"?20:a;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-w*(20/9)),t.width=t.width-o*2}const{shapeSvg:s,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n,u=c/8,f=c+u*2,{cssStyles:d}=t,g=V.svg(s),p=Q(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2,y:f/2},...Mr(-h/2,f/2,h/2,f/2,u,1),{x:h/2,y:-f/2},...Mr(h/2,-f/2,-h/2,-f/2,u,-1)],C=mt(m),b=g.path(C,p),k=s.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),J(t,k),t.intersect=function(w){return G.polygon(t,m,w)},s}y(rC,"waveRectangle");var At=10;async function iC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-At,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-At,10));const{shapeSvg:n,bbox:s,label:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:s.width)+a*2+At,c=(t!=null&&t.height?t==null?void 0:t.height:s.height)+o*2+At,u=h-At,f=c-At,d=-u/2,g=-f/2,{cssStyles:p}=t,m=V.svg(n),C=Q(t,{}),b=[{x:d-At,y:g-At},{x:d-At,y:g+f},{x:d+u,y:g+f},{x:d+u,y:g-At}],k=`M${d-At},${g-At} L${d+u},${g-At} L${d+u},${g+f} L${d-At},${g+f} L${d-At},${g-At}
236
+ M${d-At},${g} L${d+u},${g}
237
+ M${d},${g-At} L${d},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=m.path(k,C),_=n.insert(()=>w,":first-child");return _.attr("transform",`translate(${At/2}, ${At/2})`),_.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(s.width/2)+At/2-(s.x-(s.left??0))}, ${-(s.height/2)+At/2-(s.y-(s.top??0))})`),J(t,_),t.intersect=function(S){return G.polygon(t,b,S)},n}y(iC,"windowPane");var Vd=new Set(["redux-color","redux-dark-color"]),eE=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function yc(e,t){var St,Ht,Pt,Y;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=Mt(),{rowEven:o,rowOdd:n,nodeBorder:s,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:U}=Mt(),{background:j}=U,I={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${j}`]};await yc(e,I)}const h=Mt();t.useHtmlLabels=h.htmlLabels;let c=((St=h.er)==null?void 0:St.diagramPadding)??10,u=((Ht=h.er)==null?void 0:Ht.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:g}=K(t);if(r.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};gr(t.label,h)+U.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const j=await ho(e,t,U);if(i!=null&&Vd.has(i)){const I=r.colorIndex??0;j.attr("data-color-id",`color-${I%l.length}`)}if(!pr(h.htmlLabels)){const I=j.select("text"),pt=(Pt=I.node())==null?void 0:Pt.getBBox();I.attr("transform",`translate(${-pt.width/2}, 0)`)}return j}h.htmlLabels||(c*=1.25,u*=1.25);let p=rt(t);p||(p="node default");const m=e.insert("g").attr("class",p).attr("id",t.domId||t.id),C=await ki(m,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],w=[];let _=0,S=0,T=0,B=0,R=!0,$=!0;for(const U of r.attributes){const j=await ki(m,U.type,h,0,b,["attribute-type"],d);_=Math.max(_,j.width+c);const I=await ki(m,U.name,h,0,b,["attribute-name"],d);S=Math.max(S,I.width+c);const pt=await ki(m,U.keys.join(),h,0,b,["attribute-keys"],d);T=Math.max(T,pt.width+c);const dt=await ki(m,U.comment,h,0,b,["attribute-comment"],d);B=Math.max(B,dt.width+c);const kt=Math.max(j.height,I.height,pt.height,dt.height)+u;w.push({yOffset:b,rowHeight:kt}),b+=kt}let F=4;T<=c&&(R=!1,T=0,F--),B<=c&&($=!1,B=0,F--);const N=m.node().getBBox();if(C.width+c*2-(_+S+T+B)>0){const U=C.width+c*2-(_+S+T+B);_+=U/F,S+=U/F,T>0&&(T+=U/F),B>0&&(B+=U/F)}const M=_+S+T+B,O=V.svg(m),W=Q(t,{});t.look!=="handDrawn"&&(W.roughness=0,W.fillStyle="solid");let q=0;w.length>0&&(q=w.reduce((U,j)=>U+((j==null?void 0:j.rowHeight)??0),0));const H=Math.max(N.width+c*2,(t==null?void 0:t.width)||0,M),D=Math.max((q??0)+C.height,(t==null?void 0:t.height)||0),X=-H/2,lt=-D/2;if(m.selectAll("g:not(:first-child)").each((U,j,I)=>{const pt=ft(I[j]),dt=pt.attr("transform");let kt=0,Ot=0;if(dt){const ye=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(dt);ye&&(kt=parseFloat(ye[1]),Ot=parseFloat(ye[2]),pt.attr("class").includes("attribute-name")?kt+=_:pt.attr("class").includes("attribute-keys")?kt+=_+S:pt.attr("class").includes("attribute-comment")&&(kt+=_+S+T))}pt.attr("transform",`translate(${X+c/2+kt}, ${Ot+lt+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(lt+u/2)+")"),i!=null&&Vd.has(i)){const U=r.colorIndex??0;m.attr("data-color-id",`color-${U%l.length}`)}const ht=O.rectangle(X,lt,H,D,W),Ft=m.insert(()=>ht,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[U,j]of w.entries()){const pt=(U+1)%2===0&&j.yOffset!==0,dt=O.rectangle(X,C.height+lt+(j==null?void 0:j.yOffset),H,j==null?void 0:j.rowHeight,{...W,fill:pt?o:n,stroke:s});m.insert(()=>dt,"g.label").attr("style",f.join("")).attr("class",`row-rect-${pt?"even":"odd"}`)}const gt=1e-4;let _t=Ti(X,C.height+lt,H+X,C.height+lt,gt),it=O.polygon(_t.map(U=>[U.x,U.y]),W);if(m.insert(()=>it).attr("class","divider"),_t=Ti(_+X,C.height+lt,_+X,D+lt,gt),it=O.polygon(_t.map(U=>[U.x,U.y]),W),m.insert(()=>it).attr("class","divider"),R){const U=_+S+X;_t=Ti(U,C.height+lt,U,D+lt,gt),it=O.polygon(_t.map(j=>[j.x,j.y]),W),m.insert(()=>it).attr("class","divider")}if($){const U=_+S+T+X;_t=Ti(U,C.height+lt,U,D+lt,gt),it=O.polygon(_t.map(j=>[j.x,j.y]),W),m.insert(()=>it).attr("class","divider")}for(const U of k){const j=C.height+lt+U;_t=Ti(X,j,H+X,j,gt),it=O.polygon(_t.map(I=>[I.x,I.y]),W),m.insert(()=>it).attr("class","divider")}if(J(t,Ft),g&&t.look!=="handDrawn")if(i!=null&&eE.has(i))m.selectAll("path").attr("style",g);else{const U=g.split(";"),j=(Y=U==null?void 0:U.filter(I=>I.includes("stroke")))==null?void 0:Y.map(I=>`${I}`).join("; ");m.selectAll("path").attr("style",j??""),m.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(U){return G.rect(t,U)},m}y(yc,"erBox");async function ki(e,t,r,i=0,a=0,o=[],n=""){const s=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",n);t!==Jc(t)&&(t=Jc(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await Cr(s,t,{width:gr(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=l.getBBox();if(pr(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ft(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}y(ki,"addText");function Ti(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}y(Ti,"lineToPolygon");async function aC(e,t,r,i,a=r.class.padding??12){const o=i?0:3,n=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let s=null,l=null,h=null,c=null,u=0,f=0,d=0;if(s=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await La(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await La(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,h=n.insert("g").attr("class","members-group text");let p=0;for(const b of t.members){const k=await La(h,b,p,[b.parseClassifier()]);p+=k+o}d=h.node().getBBox().height,d<=0&&(d=a/2),c=n.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await La(c,b,m,[b.parseClassifier()]);m+=k+o}let C=n.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})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+f+a*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}y(aC,"textHelper");async function La(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Mt();let n="useHtmlLabels"in t?t.useHtmlLabels:pr(o.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!n&&s.startsWith("\\")&&(s=s.substring(1)),Da(s)&&(n=!0);const l=await Cr(a,fh(ei(s)),{width:gr(s,o)+50,classes:"markdown-node-label",useHtmlLabels:n},o);let h,c=1;if(n){const u=l.children[0],f=ft(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(p=>new Promise(m=>{function C(){var b;if(p.style.display="flex",p.style.flexDirection="column",g){const k=((b=o.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,_=parseInt(k,10)*5+"px";p.style.minWidth=_,p.style.maxWidth=_}else p.style.width="100%";m(p)}y(C,"setupImage"),setTimeout(()=>{p.complete&&C()}),p.addEventListener("error",C),p.addEventListener("load",C)})))}h=u.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ft(l).selectAll("tspan").attr("font-weight",""),c=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=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}y(La,"addText");async function oC(e,t){var O,W;const r=Ct(),{themeVariables:i}=r,{useGradient:a}=i,o=r.class.padding??12,n=o,s=t.useHtmlLabels??pr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await aC(e,t,r,s,n),{labelStyles:u,nodeStyles:f}=K(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((O=l.styles)==null?void 0:O.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((W=r.class)!=null&&W.hideEmptyMembersBox),p=V.svg(h),m=Q(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=n:l.members.length>0&&l.methods.length===0&&(b+=n*2);const w=-C/2,_=-b/2;let S=g?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(S=o*2);const T=p.rectangle(w-o,_-o-(g?o:l.members.length===0&&l.methods.length===0?-o/2:0),C+2*o,b+2*o+S,m),B=h.insert(()=>T,":first-child");B.attr("class","basic label-container outer-path");const R=B.node().getBBox(),$=h.select(".annotation-group").node().getBBox().height-(g?o/2:0)||0,F=h.select(".label-group").node().getBBox().height-(g?o/2:0)||0,N=h.select(".members-group").node().getBBox().height-(g?o/2:0)||0,M=($+F+_+o-(_-o-(g?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(h.selectAll(".text").each((q,H,D)=>{var _t,it;const X=ft(D[H]),lt=X.attr("transform");let ht=0;if(lt){const Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(lt);Ht&&(ht=parseFloat(Ht[2]))}let Ft=ht+_+o-(g?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(X.attr("class").includes("methods-group")){const St=Math.max(N,n/2);k?Ft=Math.max(M,$+F+St+_+n*2+o)+n*2:Ft=$+F+St+_+n*4+o}l.members.length===0&&l.methods.length===0&&((_t=r.class)!=null&&_t.hideEmptyMembersBox)&&(l.annotations.length>0?Ft=ht-n:Ft=ht),s||(Ft-=4);let gt=w;(X.attr("class").includes("label-group")||X.attr("class").includes("annotation-group"))&&(gt=-((it=X.node())==null?void 0:it.getBBox().width)/2||0,h.selectAll("text").each(function(St,Ht,Pt){window.getComputedStyle(Pt[Ht]).textAnchor==="middle"&&(gt=0)})),X.attr("transform",`translate(${gt}, ${Ft})`)}),l.members.length>0||l.methods.length>0||g){const q=$+F+_+o,H=p.line(R.x,q,R.x+R.width,q+.001,m);h.insert(()=>H).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const q=$+F+N+_+n*2+o,H=p.line(R.x,k?Math.max(M,q):q,R.x+R.width,(k?Math.max(M,q):q)+.001,m);h.insert(()=>H).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),B.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!s){const q=RegExp(/color\s*:\s*([^;]*)/),H=q.exec(d);if(H){const D=H[0].replace("color","fill");h.selectAll("tspan").attr("style",D)}else if(u){const D=q.exec(u);if(D){const X=D[0].replace("color","fill");h.selectAll("tspan").attr("style",X)}}}return J(t,B),t.intersect=function(q){return G.rect(t,q)},h}y(oC,"classBox");async function nC(e,t){var R,$;const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const a=t,o=t,n=20,s=20,l="verifyMethod"in t,h=rt(t),{themeVariables:c}=Ct(),{borderColorArray:u,requirementEdgeLabelBackground:f}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let g;l?g=await Ye(d,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):g=await Ye(d,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let p=g;const m=await Ye(d,a.name,p,t.labelStyle+"; font-weight: bold;");if(p+=m+s,l){const F=await Ye(d,`${a.requirementId?`ID: ${a.requirementId}`:""}`,p,t.labelStyle);p+=F;const N=await Ye(d,`${a.text?`Text: ${a.text}`:""}`,p,t.labelStyle);p+=N;const M=await Ye(d,`${a.risk?`Risk: ${a.risk}`:""}`,p,t.labelStyle);p+=M,await Ye(d,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,p,t.labelStyle)}else{const F=await Ye(d,`${o.type?`Type: ${o.type}`:""}`,p,t.labelStyle);p+=F,await Ye(d,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,p,t.labelStyle)}const C=(((R=d.node())==null?void 0:R.getBBox().width)??200)+n,b=((($=d.node())==null?void 0:$.getBBox().height)??200)+n,k=-C/2,w=-b/2,_=V.svg(d),S=Q(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=_.rectangle(k,w,C,b,S),B=d.insert(()=>T,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const F=t.colorIndex??0;d.attr("data-color-id",`color-${F%u.length}`)}if(d.selectAll(".label").each((F,N,M)=>{const O=ft(M[N]),W=O.attr("transform");let q=0,H=0;if(W){const ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);ht&&(q=parseFloat(ht[1]),H=parseFloat(ht[2]))}const D=H-b/2;let X=k+n/2;(N===0||N===1)&&(X=q),O.attr("transform",`translate(${X}, ${D+n})`)}),p>g+m+s){const F=w+g+m+s;let N;if(t.look==="neo"){const W=[[k,F],[k+C,F],[k+C,F+.001],[k,F+.001]];N=_.polygon(W,S)}else N=_.line(k,F,k+C,F,S);d.insert(()=>N).attr("class","divider")}return J(t,B),t.intersect=function(F){return G.rect(t,F)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}y(nC,"requirementBox");async function Ye(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=Ct(),n=o.htmlLabels??!0,s=await Cr(a,fh(ei(t)),{width:gr(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let l;if(n){const h=s.children[0],c=ft(s);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=s.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=s.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}y(Ye,"addText");var rE=y(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 sC(e,t,{config:r}){var N,M;const{labelStyles:i,nodeStyles:a}=K(t);t.labelStyle=i||"";const o=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await at(e,t,rt(t)),c=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((N=r==null?void 0:r.kanban)!=null&&N.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,p;f?{label:g,bbox:p}=await Qs(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:p}=await Qs(s,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await Qs(s,"assigned"in t&&t.assigned||"",d);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(p.height,C.height)/2,_=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,S=-k/2,T=-_/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*o)+", "+(-w+l.height/2)+")");let B;const{rx:R,ry:$}=t,{cssStyles:F}=t;if(t.look==="handDrawn"){const O=V.svg(s),W=Q(t,{}),q=R||$?O.path(Or(S,T,k,_,R||0),W):O.rectangle(S,T,k,_,W);B=s.insert(()=>q,":first-child"),B.attr("class","basic label-container").attr("style",F||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",$??5).attr("x",S).attr("y",T).attr("width",k).attr("height",_);const O="priority"in t&&t.priority;if(O){const W=s.append("line"),q=S+2,H=T+Math.floor((R??0)/2),D=T+_-Math.floor((R??0)/2);W.attr("x1",q).attr("y1",H).attr("x2",q).attr("y2",D).attr("stroke-width","4").attr("stroke",rE(O))}}return J(t,B),t.height=_,t.intersect=function(O){return G.rect(t,O)},s}y(sC,"kanbanItem");async function lC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:n,label:s}=await at(e,t,rt(t)),l=o.width+10*n,h=o.height+8*n,c=.15*l,{cssStyles:u}=t,f=o.width+20,d=o.height+20,g=Math.max(l,f),p=Math.max(h,d);s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let m;const C=`M0 0
238
+ a${c},${c} 1 0,0 ${g*.25},${-1*p*.1}
239
+ a${c},${c} 1 0,0 ${g*.25},0
240
+ a${c},${c} 1 0,0 ${g*.25},0
241
+ a${c},${c} 1 0,0 ${g*.25},${p*.1}
242
+
243
+ a${c},${c} 1 0,0 ${g*.15},${p*.33}
244
+ a${c*.8},${c*.8} 1 0,0 0,${p*.34}
245
+ a${c},${c} 1 0,0 ${-1*g*.15},${p*.33}
246
+
247
+ a${c},${c} 1 0,0 ${-1*g*.25},${p*.15}
248
+ a${c},${c} 1 0,0 ${-1*g*.25},0
249
+ a${c},${c} 1 0,0 ${-1*g*.25},0
250
+ a${c},${c} 1 0,0 ${-1*g*.25},${-1*p*.15}
251
+
252
+ a${c},${c} 1 0,0 ${-1*g*.1},${-1*p*.33}
253
+ a${c*.8},${c*.8} 1 0,0 0,${-1*p*.34}
254
+ a${c},${c} 1 0,0 ${g*.1},${-1*p*.33}
255
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=V.svg(a),k=Q(t,{}),w=b.path(C,k);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Yt(u))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-g/2}, ${-p/2})`),J(t,m),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return P.info("Bang intersect",t,b),G.rect(t,b)},a}y(lC,"bang");async function hC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:n,label:s}=await at(e,t,rt(t)),l=o.width+2*n,h=o.height+2*n,c=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let p;const m=`M0 0
256
+ a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
257
+ a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
258
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
259
+
260
+ a${c},${c} 1 0,1 ${l*.15},${h*.35}
261
+ a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
262
+
263
+ a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
264
+ a${f},${f} 1 0,1 ${-1*l*.5},0
265
+ a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
266
+
267
+ a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
268
+ a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
269
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=V.svg(a),b=Q(t,{}),k=C.path(m,b);p=a.insert(()=>k,":first-child"),p.attr("class","basic label-container").attr("style",Yt(g))}else p=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),p.attr("transform",`translate(${-l/2}, ${-h/2})`),J(t,p),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return P.info("Cloud intersect",t,C),G.rect(t,C)},a}y(hC,"cloud");async function cC(e,t){const{labelStyles:r,nodeStyles:i}=K(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:n,label:s}=await at(e,t,rt(t)),l=o.width+8*n,h=o.height+2*n,c=5,u=t.look==="neo"?`
270
+ M${-l/2} ${h/2-c}
271
+ v${-h+2*c}
272
+ q0,-${c} ${c},-${c}
273
+ h${l-2*c}
274
+ q${c},0 ${c},${c}
275
+ v${h-c}
276
+ H${-l/2}
277
+ Z
278
+ `:`
279
+ M${-l/2} ${h/2-c}
280
+ v${-h+2*c}
281
+ q0,-${c} ${c},-${c}
282
+ h${l-2*c}
283
+ q${c},0 ${c},${c}
284
+ v${h-2*c}
285
+ q0,${c} ${-c},${c}
286
+ h${-(l-2*c)}
287
+ q${-c},0 ${-c},${-c}
288
+ Z
289
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=a.append("path").attr("id",t.domId).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",h/2).attr("x2",l/2).attr("y2",h/2),s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>s.node()),J(t,f),t.calcIntersect=function(d,g){return G.rect(d,g)},t.intersect=function(d){return G.rect(t,d)},a}y(cC,"defaultMindmapNode");async function uC(e,t){const r={padding:t.padding??0};return mc(e,t,r)}y(uC,"mindmapCircle");var iE=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wy},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ny},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hy},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gy},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:dy},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:mc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lC},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hC},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dy},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xy},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fy},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ly},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ky},{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:vy},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:gy},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zy},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ay},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qy},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:jy},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yy},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yy},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:by},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ly},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:hy},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:cy},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:My},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:eC},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Cy},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Qy},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ay},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:uy},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:fy},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tC},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:iC},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:py},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jy},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:my},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zy},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Oy},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$y},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:iy},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:sy},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vy},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xy},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rC},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Py},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ey}],aE=y(()=>{const t=[...Object.entries({state:Uy,choice:oy,note:Iy,rectWithTitle:Ry,labelRect:By,iconSquare:_y,iconCircle:Ty,icon:ky,iconRounded:wy,imageSquare:Sy,anchor:ey,kanbanItem:sC,mindmapCircle:uC,defaultMindmapNode:cC,classBox:oC,erBox:yc,requirementBox:nC}),...iE.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),dC=aE();function oE(e){return e in dC}y(oE,"isValidShape");var hs=new Map;async function fC(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?dC[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),a=await o(i,t,r)}else a=await o(e,t,r),i=a;return i.attr("data-look",Yt(t.look)),t.tooltip&&a.attr("title",t.tooltip),hs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}y(fC,"insertNode");var zO=y((e,t)=>{hs.set(t.id,e)},"setNodeElem"),WO=y(()=>{hs.clear()},"clear"),HO=y(e=>{const t=hs.get(e.id);P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),nE=y((e,t,r,i,a,o=!1,n)=>{t.arrowTypeStart&&Zd(e,"start",t.arrowTypeStart,r,i,a,o,n),t.arrowTypeEnd&&Zd(e,"end",t.arrowTypeEnd,r,i,a,o,n)},"addEdgeMarkers"),sE={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},lE=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Zd=y((e,t,r,i,a,o,n=!1,s)=>{var g;const l=sE[r],h=l&&lE.includes(l.type);if(!l){P.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${a}_${o}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(s&&s.trim()!==""){const p=s.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${p}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",s),l.fill&&w.setAttribute("fill",s)}),(g=C.parentNode)==null||g.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),hE=y(e=>{var t,r;return typeof e=="string"?e:(r=(t=Ct())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),An=new Map,Vt=new Map,UO=y(()=>{An.clear(),Vt.clear()},"clear"),ba=y(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),cE=y(async(e,t)=>{const r=Ct();let i=ce(r);const{labelStyles:a}=K(t);t.labelStyle=a;const o=e.insert("g").attr("class","edgeLabel"),n=o.insert("g").attr("class","label").attr("data-id",t.id),s=t.labelType==="markdown",h=await Cr(e,t.label,{style:ba(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:s,width:s?void 0:void 0},r);n.node().appendChild(h),P.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],g=ft(h);c=d.getBoundingClientRect(),u=c,g.attr("width",c.width),g.attr("height",c.height)}else{const d=ft(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}n.attr("transform",ga(u,i)),An.set(t.id,o),t.width=c.width,t.height=c.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await kr(g,t.startLabelLeft,ba(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],b=ft(p);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",ga(m,i)),Vt.get(t.id)||Vt.set(t.id,{}),Vt.get(t.id).startLeft=d,Fa(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await kr(g,t.startLabelRight,ba(t.labelStyle)||"",!1,!1);f=p,g.node().appendChild(p);let m=p.getBBox();if(i){const C=p.children[0],b=ft(p);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",ga(m,i)),Vt.get(t.id)||Vt.set(t.id,{}),Vt.get(t.id).startRight=d,Fa(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await kr(g,t.endLabelLeft,ba(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],b=ft(p);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",ga(m,i)),d.node().appendChild(p),Vt.get(t.id)||Vt.set(t.id,{}),Vt.get(t.id).endLeft=d,Fa(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await kr(g,t.endLabelRight,ba(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],b=ft(p);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}g.attr("transform",ga(m,i)),d.node().appendChild(p),Vt.get(t.id)||Vt.set(t.id,{}),Vt.get(t.id).endRight=d,Fa(f,t.endLabelRight)}return h},"insertEdgeLabel");function Fa(e,t){ce(Ct())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}y(Fa,"setTerminalWidth");var uE=y((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,An.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Ct(),{subGraphTitleTotalMargin:a}=ic(i);if(e.label){const o=An.get(e.id);let n=e.x,s=e.y;if(r){const l=De.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",n,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(n=l.x,s=l.y)}o.attr("transform",`translate(${n}, ${s+a/2})`)}if(e.startLabelLeft){const o=Vt.get(e.id).startLeft;let n=e.x,s=e.y;if(r){const l=De.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,s=l.y}o.attr("transform",`translate(${n}, ${s})`)}if(e.startLabelRight){const o=Vt.get(e.id).startRight;let n=e.x,s=e.y;if(r){const l=De.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,s=l.y}o.attr("transform",`translate(${n}, ${s})`)}if(e.endLabelLeft){const o=Vt.get(e.id).endLeft;let n=e.x,s=e.y;if(r){const l=De.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,s=l.y}o.attr("transform",`translate(${n}, ${s})`)}if(e.endLabelRight){const o=Vt.get(e.id).endRight;let n=e.x,s=e.y;if(r){const l=De.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,s=l.y}o.attr("transform",`translate(${n}, ${s})`)}},"positionEdgeLabel"),dE=y((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),o=Math.abs(t.y-i),n=e.width/2,s=e.height/2;return a>=n||o>=s},"outsideNode"),fE=y((e,t,r)=>{P.debug(`intersection calc abc89:
290
+ outsidePoint: ${JSON.stringify(t)}
291
+ insidePoint : ${JSON.stringify(r)}
292
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,o=Math.abs(i-r.x),n=e.width/2;let s=r.x<t.x?n-o:n+o;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;s=c*u/h;const f={x:r.x<t.x?r.x+s:r.x-c+s,y:r.y<t.y?r.y+h-u:r.y-h+u};return s===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),h===0&&(f.y=t.y),P.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${s}`,f),f}else{r.x<t.x?s=t.x-n-i:s=i-n-t.x;let u=h*s/c,f=r.x<t.x?r.x+c-s:r.x-c+s,d=r.y<t.y?r.y+u:r.y-u;return P.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${s}`,{_x:f,_y:d}),s===0&&(f=t.x,d=t.y),c===0&&(f=t.x),h===0&&(d=t.y),{x:f,y:d}}},"intersection"),Qd=y((e,t)=>{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(o=>{if(P.info("abc88 checking point",o,t),!dE(t,o)&&!a){const n=fE(t,i,o);P.debug("abc88 inside",o,i,n),P.debug("abc88 intersection",n,t);let s=!1;r.forEach(l=>{s=s||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?P.warn("abc88 no intersect",n,r):r.push(n),a=!0}else P.warn("abc88 outside",o,i),i=o,a||r.push(o)}),P.debug("returning points",r),r},"cutPathAtIntersect");function gC(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],o=e[i],n=e[i+1];(a.x===o.x&&o.y===n.y&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===n.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-n.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}y(gC,"extractCornerPoints");var Kd=y(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a),n=r/o;return{x:t.x-n*i,y:t.y-n*a}},"findAdjacentPoint"),gE=y(function(e){const{cornerPointPositions:t}=gC(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],o=e[i+1],n=e[i],s=Kd(a,n,5),l=Kd(o,n,5),h=l.x-s.x,c=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let f={x:n.x,y:n.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){P.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const d=5;n.x===s.x?f={x:h<0?s.x-d+u:s.x+d-u,y:c<0?s.y-u:s.y+u}:f={x:h<0?s.x-u:s.x+u,y:c<0?s.y-d+u:s.y+d-u}}else P.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),pE=y((e,t,r)=>{const i=e-t-r,a=2,o=2,n=a+o,s=Math.floor(i/n),l=Array(s).fill(`${a} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),mE=y(function(e,t,r,i,a,o,n,s=!1){var H;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=Ct();let h=t.points,c=!1;const u=a;var f=o;const d=[];for(const D in t.cssCompiledStyles)f0(D)||d.push(t.cssCompiledStyles[D]);P.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!s&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),P.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],f,f.intersect(h[h.length-1])),h.push(f.intersect(h[h.length-1])));const g=btoa(JSON.stringify(h));t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),h=Qd(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Qd(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let p=h.filter(D=>!Number.isNaN(D.y));const m=hE(t.curve);m!=="rounded"&&(p=gE(p));let C=Bi;switch(m){case"linear":C=Bi;break;case"basis":C=wl;break;case"cardinal":C=Gg;break;case"bumpX":C=qg;break;case"bumpY":C=zg;break;case"catmullRom":C=Vg;break;case"monotoneX":C=ep;break;case"monotoneY":C=rp;break;case"natural":C=ap;break;case"step":C=op;break;case"stepAfter":C=sp;break;case"stepBefore":C=np;break;case"rounded":C=Bi;break;default:C=wl}const{x:b,y:k}=cB(t),w=Rg().x(b).y(k).curve(C);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let S,T=m==="rounded"?pC(mC(p,t),5):w(p);const B=Array.isArray(t.style)?t.style:[t.style];let R=B.find(D=>D==null?void 0:D.startsWith("stroke:")),$="";t.animate&&($="edge-animation-fast"),t.animation&&($="edge-animation-"+t.animation);let F=!1;if(t.look==="handDrawn"){const D=V.svg(e);Object.assign([],p);const X=D.path(T,{roughness:.3,seed:l});_+=" transition",S=ft(X).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",B?B.reduce((ht,Ft)=>ht+";"+Ft,""):"");let lt=S.attr("d");S.attr("d",lt),e.node().appendChild(S.node())}else{const D=d.join(";"),X=B?B.reduce((it,St)=>it+St+";",""):"",lt=(D?D+";"+X+";":X)+";"+(B?B.reduce((it,St)=>it+";"+St,""):"");S=e.append("path").attr("d",T).attr("id",`${n}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",lt),R=(H=lt.match(/stroke:([^;]+)/))==null?void 0:H[1],F=t.animate===!0||!!t.animation||D.includes("animation");const ht=S.node(),Ft=typeof ht.getTotalLength=="function"?ht.getTotalLength():0,gt=rd[t.arrowTypeStart]||0,_t=rd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!F){const St=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?pE(Ft,gt,_t):`0 ${gt} ${Ft-gt-_t} ${_t}`}; stroke-dashoffset: 0;`;S.attr("style",St+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",g),S.attr("data-look",Yt(t.look)),t.showPoints&&p.forEach(D=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",D.x).attr("cy",D.y)});let N="";(Ct().flowchart.arrowMarkerAbsolute||Ct().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd);const M=!F&&(t==null?void 0:t.look)==="neo";nE(S,t,N,n,i,M,R);const O=Math.floor(h.length/2),W=h[O];De.isLabelCoordinateInPath(W,S.attr("d"))||(c=!0);let q={};return c&&(q.updatedPath=h),q.originalPath=t.points,q},"insertEdge");function pC(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let o=0;o<i;o++){const n=e[o],s=e[o-1],l=e[o+1];if(o===0)r+=`M${n.x},${n.y}`;else if(o===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-s.x,c=n.y-s.y,u=l.x-n.x,f=l.y-n.y,d=Math.hypot(h,c),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${n.x},${n.y}`;continue}const p=h/d,m=c/d,C=u/g,b=f/g,k=p*C+m*b,w=Math.max(-1,Math.min(1,k)),_=Math.acos(w);if(_<a||Math.abs(Math.PI-_)<a){r+=`L${n.x},${n.y}`;continue}const S=Math.min(t/Math.sin(_/2),d/2,g/2),T=n.x-p*S,B=n.y-m*S,R=n.x+C*S,$=n.y+b*S;r+=`L${T},${B}`,r+=`Q${n.x},${n.y} ${R},${$}`}}return r}y(pC,"generateRoundedPath");function Jl(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}}y(Jl,"calculateDeltaAndAngle");function mC(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&ee[t.arrowTypeStart]){const a=ee[t.arrowTypeStart],o=e[0],n=e[1],{angle:s}=Jl(o,n),l=a*Math.cos(s),h=a*Math.sin(s);r[0].x=o.x+l,r[0].y=o.y+h}const i=e.length;if(i>=2&&ee[t.arrowTypeEnd]){const a=ee[t.arrowTypeEnd],o=e[i-1],n=e[i-2],{angle:s}=Jl(n,o),l=a*Math.cos(s),h=a*Math.sin(s);r[i-1].x=o.x-l,r[i-1].y=o.y-h}return r}y(mC,"applyMarkerOffsetsToPoints");var yE=y((e,t,r,i)=>{t.forEach(a=>{qE[a](e,r,i)})},"insertMarkers"),CE=y((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),xE=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),bE=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),kE=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),TE=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),wE=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),_E=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),SE=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),vE=y((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"),BE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{transitionColor:o}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),LE=y((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"),FE=y((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"),ME=y((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"),AE=y((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"),EE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),$E=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o,mainBkg:n}=a,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),OE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),IE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o,mainBkg:n}=a,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),DE=y((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
293
+ L20,10
294
+ M20,10
295
+ L0,20`)},"requirement_arrow"),PE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
296
+ L20,10
297
+ M20,10
298
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),RE=y((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"),NE=y((e,t,r)=>{const i=Mt(),{themeVariables:a}=i,{strokeWidth:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),qE={extension:CE,composition:xE,aggregation:bE,dependency:kE,lollipop:TE,point:wE,circle:_E,cross:SE,barb:vE,barbNeo:BE,only_one:LE,zero_or_one:FE,one_or_more:ME,zero_or_more:AE,only_one_neo:EE,zero_or_one_neo:$E,one_or_more_neo:OE,zero_or_more_neo:IE,requirement_arrow:DE,requirement_contains:RE,requirement_arrow_neo:PE,requirement_contains_neo:NE},zE=yE,WE={common:Qa,getConfig:Mt,insertCluster:NA,insertEdge:mE,insertEdgeLabel:cE,insertMarkers:zE,insertNode:fC,interpolateToCurve:Qh,labelHelper:at,log:P,positionEdgeLabel:uE},Va={},yC=y(e=>{for(const t of e)Va[t.name]=t},"registerLayoutLoaders"),HE=y(()=>{yC([{name:"dagre",loader:y(async()=>await yt(()=>import("./dagre-KV5264BT-B5okAMLc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"loader")},{name:"cose-bilkent",loader:y(async()=>await yt(()=>import("./cose-bilkent-S5V4N54A-CidaofdU.js"),__vite__mapDeps([8,9,7,6]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");HE();var YO=y(async(e,t)=>{if(!(e.layoutAlgorithm in Va))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=Va[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:n,gradientStart:s,gradientStop:l}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),n){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,WE,{algorithm:r.algorithm})},"render"),jO=y((e="",{fallback:t="dagre"}={})=>{if(e in Va)return e;if(t in Va)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),UE=jm(Object.keys,Object),YE=Object.prototype,jE=YE.hasOwnProperty;function GE(e){if(!es(e))return UE(e);var t=[];for(var r in Object(e))jE.call(e,r)&&r!="constructor"&&t.push(r);return t}var th=hi(Ke,"DataView"),eh=hi(Ke,"Promise"),rh=hi(Ke,"Set"),ih=hi(Ke,"WeakMap"),Jd="[object Map]",XE="[object Object]",tf="[object Promise]",ef="[object Set]",rf="[object WeakMap]",af="[object DataView]",VE=li(th),ZE=li(Ga),QE=li(eh),KE=li(rh),JE=li(ih),qr=Qi;(th&&qr(new th(new ArrayBuffer(1)))!=af||Ga&&qr(new Ga)!=Jd||eh&&qr(eh.resolve())!=tf||rh&&qr(new rh)!=ef||ih&&qr(new ih)!=rf)&&(qr=function(e){var t=Qi(e),r=t==XE?e.constructor:void 0,i=r?li(r):"";if(i)switch(i){case VE:return af;case ZE:return Jd;case QE:return tf;case KE:return ef;case JE:return rf}return t});var t5="[object Map]",e5="[object Set]",r5=Object.prototype,i5=r5.hasOwnProperty;function of(e){if(e==null)return!0;if(rs(e)&&(kn(e)||typeof e=="string"||typeof e.splice=="function"||Vh(e)||Zh(e)||bn(e)))return!e.length;var t=qr(e);if(t==t5||t==e5)return!e.size;if(es(e))return!GE(e).length;for(var r in e)if(i5.call(e,r))return!1;return!0}var CC="c4",a5=y(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),o5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-DYfj69gY.js");return{diagram:t}},__vite__mapDeps([10,11,6,7]),import.meta.url);return{id:CC,diagram:e}},"loader"),n5={id:CC,detector:a5,loader:o5},s5=n5,xC="flowchart",l5=y((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"),h5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CCSeCjR1.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,6,7]),import.meta.url);return{id:xC,diagram:e}},"loader"),c5={id:xC,detector:l5,loader:h5},u5=c5,bC="flowchart-v2",d5=y((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"),f5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CCSeCjR1.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,6,7]),import.meta.url);return{id:bC,diagram:e}},"loader"),g5={id:bC,detector:d5,loader:f5},p5=g5,kC="er",m5=y(e=>/^\s*erDiagram/.test(e),"detector"),y5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-BGcZ-Hfc.js");return{diagram:t}},__vite__mapDeps([16,14,15,6,7]),import.meta.url);return{id:kC,diagram:e}},"loader"),C5={id:kC,detector:m5,loader:y5},x5=C5,TC="gitGraph",b5=y(e=>/^\s*gitGraph/.test(e),"detector"),k5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,4,2,7,6]),import.meta.url);return{id:TC,diagram:e}},"loader"),T5={id:TC,detector:b5,loader:k5},w5=T5,wC="gantt",_5=y(e=>/^\s*gantt/.test(e),"detector"),S5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-BqAoxnNO.js");return{diagram:t}},__vite__mapDeps([21,6,7]),import.meta.url);return{id:wC,diagram:e}},"loader"),v5={id:wC,detector:_5,loader:S5},B5=v5,_C="info",L5=y(e=>/^\s*info/.test(e),"detector"),F5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-Cemw9omR.js");return{diagram:t}},__vite__mapDeps([22,20,4,2,7,6]),import.meta.url);return{id:_C,diagram:e}},"loader"),M5={id:_C,detector:L5,loader:F5},SC="pie",A5=y(e=>/^\s*pie/.test(e),"detector"),E5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-C8vOtX53.js");return{diagram:t}},__vite__mapDeps([23,18,20,4,2,7,6]),import.meta.url);return{id:SC,diagram:e}},"loader"),$5={id:SC,detector:A5,loader:E5},vC="quadrantChart",O5=y(e=>/^\s*quadrantChart/.test(e),"detector"),I5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-LV5yQE3M.js");return{diagram:t}},__vite__mapDeps([24,6,7]),import.meta.url);return{id:vC,diagram:e}},"loader"),D5={id:vC,detector:O5,loader:I5},P5=D5,BC="xychart",R5=y(e=>/^\s*xychart(-beta)?/.test(e),"detector"),N5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-CXfA4uSx.js");return{diagram:t}},__vite__mapDeps([25,6,7]),import.meta.url);return{id:BC,diagram:e}},"loader"),q5={id:BC,detector:R5,loader:N5},z5=q5,LC="requirement",W5=y(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),H5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-Bq6y8VCF.js");return{diagram:t}},__vite__mapDeps([26,14,15,6,7]),import.meta.url);return{id:LC,diagram:e}},"loader"),U5={id:LC,detector:W5,loader:H5},Y5=U5,FC="sequence",j5=y(e=>/^\s*sequenceDiagram/.test(e),"detector"),G5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-Bv9Ckauz.js");return{diagram:t}},__vite__mapDeps([27,11,19,6,7]),import.meta.url);return{id:FC,diagram:e}},"loader"),X5={id:FC,detector:j5,loader:G5},V5=X5,MC="class",Z5=y((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"),Q5=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-DVvX4wPS.js");return{diagram:t}},__vite__mapDeps([28,29,13,11,14,15,6,7]),import.meta.url);return{id:MC,diagram:e}},"loader"),K5={id:MC,detector:Z5,loader:Q5},J5=K5,AC="classDiagram",t3=y((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"),e3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-DVvX4wPS.js");return{diagram:t}},__vite__mapDeps([30,29,13,11,14,15,6,7]),import.meta.url);return{id:AC,diagram:e}},"loader"),r3={id:AC,detector:t3,loader:e3},i3=r3,EC="state",a3=y((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"),o3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-CwYUsnc5.js");return{diagram:t}},__vite__mapDeps([31,32,14,15,1,2,3,4,6,7]),import.meta.url);return{id:EC,diagram:e}},"loader"),n3={id:EC,detector:a3,loader:o3},s3=n3,$C="stateDiagram",l3=y((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"),h3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-aegiqwuH.js");return{diagram:t}},__vite__mapDeps([33,32,14,15,6,7]),import.meta.url);return{id:$C,diagram:e}},"loader"),c3={id:$C,detector:l3,loader:h3},u3=c3,OC="journey",d3=y(e=>/^\s*journey/.test(e),"detector"),f3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-BRkAfzxG.js");return{diagram:t}},__vite__mapDeps([34,13,11,6,7]),import.meta.url);return{id:OC,diagram:e}},"loader"),g3={id:OC,detector:d3,loader:f3},p3=g3,m3=y((e,t,r)=>{P.debug(`rendering svg for syntax error
299
+ `);const i=rv(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Af(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"),IC={draw:m3},y3=IC,C3={db:{},renderer:IC,parser:{parse:y(()=>{},"parse")}},x3=C3,DC="flowchart-elk",b3=y((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"),k3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CCSeCjR1.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,6,7]),import.meta.url);return{id:DC,diagram:e}},"loader"),T3={id:DC,detector:b3,loader:k3},w3=T3,PC="timeline",_3=y(e=>/^\s*timeline/.test(e),"detector"),S3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-BgidC49j.js");return{diagram:t}},__vite__mapDeps([35,6,7]),import.meta.url);return{id:PC,diagram:e}},"loader"),v3={id:PC,detector:_3,loader:S3},B3=v3,RC="mindmap",L3=y(e=>/^\s*mindmap/.test(e),"detector"),F3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-sq4qw8uy.js");return{diagram:t}},__vite__mapDeps([36,14,15,6,7]),import.meta.url);return{id:RC,diagram:e}},"loader"),M3={id:RC,detector:L3,loader:F3},A3=M3,NC="kanban",E3=y(e=>/^\s*kanban/.test(e),"detector"),$3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-DrTcKNPa.js");return{diagram:t}},__vite__mapDeps([37,13,6,7]),import.meta.url);return{id:NC,diagram:e}},"loader"),O3={id:NC,detector:E3,loader:$3},I3=O3,qC="sankey",D3=y(e=>/^\s*sankey(-beta)?/.test(e),"detector"),P3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-DvABiNaK.js");return{diagram:t}},__vite__mapDeps([38,6,7]),import.meta.url);return{id:qC,diagram:e}},"loader"),R3={id:qC,detector:D3,loader:P3},N3=R3,zC="packet",q3=y(e=>/^\s*packet(-beta)?/.test(e),"detector"),z3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-CEU-9NCq.js");return{diagram:t}},__vite__mapDeps([39,18,20,4,2,7,6]),import.meta.url);return{id:zC,diagram:e}},"loader"),W3={id:zC,detector:q3,loader:z3},WC="radar",H3=y(e=>/^\s*radar-beta/.test(e),"detector"),U3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-CFv_32_w.js");return{diagram:t}},__vite__mapDeps([40,18,20,4,2,7,6]),import.meta.url);return{id:WC,diagram:e}},"loader"),Y3={id:WC,detector:H3,loader:U3},HC="block",j3=y(e=>/^\s*block(-beta)?/.test(e),"detector"),G3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-CI8uSrzU.js");return{diagram:t}},__vite__mapDeps([41,13,5,1,2,6,7]),import.meta.url);return{id:HC,diagram:e}},"loader"),X3={id:HC,detector:j3,loader:G3},V3=X3,UC="treeView",Z3=y(e=>/^\s*treeView-beta/.test(e),"detector"),Q3=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-DqlBY-17.js");return{diagram:t}},__vite__mapDeps([42,18,19,20,4,2,7,6]),import.meta.url);return{id:UC,diagram:e}},"loader"),K3={id:UC,detector:Z3,loader:Q3},J3=K3,YC="architecture",t$=y(e=>/^\s*architecture/.test(e),"detector"),e$=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-BZE_2gaA.js");return{diagram:t}},__vite__mapDeps([43,18,20,4,2,7,9,6]),import.meta.url);return{id:YC,diagram:e}},"loader"),r$={id:YC,detector:t$,loader:e$},i$=r$,jC="ishikawa",a$=y(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),o$=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-BYRE-suN.js");return{diagram:t}},__vite__mapDeps([44,6,7]),import.meta.url);return{id:jC,diagram:e}},"loader"),n$={id:jC,detector:a$,loader:o$},GC="venn",s$=y(e=>/^\s*venn-beta/.test(e),"detector"),l$=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-Bzkbjibi.js");return{diagram:t}},__vite__mapDeps([45,6,7]),import.meta.url);return{id:GC,diagram:e}},"loader"),h$={id:GC,detector:s$,loader:l$},c$=h$,XC="treemap",u$=y(e=>/^\s*treemap/.test(e),"detector"),d$=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-BuAFDD-X.js");return{diagram:t}},__vite__mapDeps([46,15,18,20,4,2,7,6]),import.meta.url);return{id:XC,diagram:e}},"loader"),f$={id:XC,detector:u$,loader:d$},VC="wardley-beta",g$=y(e=>/^\s*wardley-beta/i.test(e),"detector"),p$=y(async()=>{const{diagram:e}=await yt(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-DAhT4-uz.js");return{diagram:t}},__vite__mapDeps([47,18,20,4,2,7,6]),import.meta.url);return{id:VC,diagram:e}},"loader"),m$={id:VC,detector:g$,loader:p$},y$=m$,nf=!1,cs=y(()=>{nf||(nf=!0,Yo("error",x3,e=>e.toLowerCase().trim()==="error"),Yo("---",{db:{clear:y(()=>{},"clear")},styles:{},renderer:{draw:y(()=>{},"draw")},parser:{parse:y(()=>{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:y(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),rl(w3,A3,i$),rl(s5,I3,i3,J5,x5,B5,M5,$5,Y5,V5,p5,u5,B3,w5,u3,s3,p3,P5,N3,W3,z5,V3,J3,Y3,n$,f$,c$,y$))},"addDiagrams"),C$=y(async()=>{P.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Vr).map(async([r,{detector:i,loader:a}])=>{if(a)try{nl(r)}catch{try{const{diagram:o,id:n}=await a();Yo(n,o,i)}catch(o){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Vr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(const r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),x$="graphics-document document";function ZC(e,t){e.attr("role",x$),t!==""&&e.attr("aria-roledescription",t)}y(ZC,"setA11yDiagramInfo");function QC(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)}}}y(QC,"addSVGa11yTitleDescription");var Gr,ah=(Gr=class{constructor(t,r,i,a,o){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=o}static async fromText(t,r={}){var h,c;const i=Mt(),a=lh(t,i);t=oM(t)+`
300
+ `;try{nl(a)}catch{const u=i1(a);if(!u)throw new yf(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();Yo(f,d)}const{db:o,parser:n,renderer:s,init:l}=nl(a);return n.parser&&(n.parser.yy=o),(h=o.clear)==null||h.call(o),l==null||l(i),r.title&&((c=o.setDiagramTitle)==null||c.call(o,r.title)),await n.parse(t),new Gr(a,t,o,n,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},y(Gr,"Diagram"),Gr),sf=[],b$=y(()=>{sf.forEach(e=>{e()}),sf=[]},"attachFunctions"),k$=y(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function KC(e){const t=e.match(mf);if(!t)return{text:e,metadata:{}};let r=hB(t[1],{schema:lB})??{};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}}y(KC,"extractFrontMatter");var T$=y(e=>e.replace(/\r\n?/g,`
301
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),w$=y(e=>{const{text:t,metadata:r}=KC(e),{displayMode:i,title:a,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:a,config:o,text:t}},"processFrontmatter"),_$=y(e=>{const t=De.detectInit(e)??{},r=De.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:jF(e),directive:t}},"processDirectives");function Cc(e){const t=T$(e),r=w$(t),i=_$(r.text),a=rc(r.config,i.directive);return e=k$(i.text),{code:e,title:r.title,config:a}}y(Cc,"preprocessDiagram");function JC(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}y(JC,"toBase64");var S$=5e4,v$="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",B$="sandbox",L$="loose",F$="http://www.w3.org/2000/svg",M$="http://www.w3.org/1999/xlink",A$="http://www.w3.org/1999/xhtml",E$="100%",$$="100%",O$="border:0;margin:0;",I$="margin:0",D$="allow-top-navigation-by-user-activation allow-popups",P$='The "iframe" tag is not supported by your browser.',R$=["foreignobject"],N$=["dominant-baseline"];function xc(e){const t=Cc(e);return Ho(),A1(t.config??{}),t}y(xc,"processAndSetConfigs");async function tx(e,t){cs();try{const{code:r,config:i}=xc(e);return{diagramType:(await rx(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}y(tx,"parse");var lf=y((e,t,r=[])=>`
302
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),q$=y((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
303
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
304
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
305
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const n=ce(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{of(s.styles)||n.forEach(l=>{r+=lf(s.id,l,s.styles)}),of(s.textStyles)||(r+=lf(s.id,"tspan",((s==null?void 0:s.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),z$=y((e,t,r,i)=>{const a=q$(e,r),o=Z1(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return xx(kx(`${i}{${o}}`),bx)},"createUserStyles"),W$=y((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ei(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),H$=y((e="",t)=>{var a,o;const r=(o=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":$$,i=JC(`<body style="${I$}">${e}</body>`);return`<iframe style="width:${E$};height:${r};${O$}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${D$}">
306
+ ${P$}
307
+ </iframe>`},"putIntoIFrame"),hf=y((e,t,r,i,a)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const n=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",F$);return a&&n.attr("xmlns:xlink",a),n.append("g"),e},"appendDivSvgG");function oh(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}y(oh,"sandboxedIframe");var U$=y((e,t,r,i)=>{var a,o,n;(a=e.getElementById(t))==null||a.remove(),(o=e.getElementById(r))==null||o.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),Y$=y(async function(e,t,r){var N,M,O,W,q,H;cs();const i=xc(t);t=i.code;const a=Mt();P.debug(a),t.length>((a==null?void 0:a.maxTextSize)??S$)&&(t=v$);const o="#"+e,n="i"+e,s="#"+n,l="d"+e,h="#"+l,c=y(()=>{const X=ft(f?s:h).node();X&&"remove"in X&&X.remove()},"removeTempElements");let u=ft("body");const f=a.securityLevel===B$,d=a.securityLevel===L$,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const D=oh(ft(r),n);u=ft(D.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ft(r);hf(u,e,l,`font-family: ${g}`,M$)}else{if(U$(document,e,l,n),f){const D=oh(ft("body"),n);u=ft(D.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ft("body");hf(u,e,l)}let p,m;try{p=await ah.fromText(t,{title:i.title})}catch(D){if(a.suppressErrorRendering)throw c(),D;p=await ah.fromText("error"),m=D}const C=u.select(h).node(),b=p.type,k=C.firstChild,w=k.firstChild,_=(M=(N=p.renderer).getClasses)==null?void 0:M.call(N,t,p),S=z$(a,b,_,o),T=document.createElement("style");T.innerHTML=S,k.insertBefore(T,w);try{await p.renderer.draw(t,e,"11.14.0",p)}catch(D){throw a.suppressErrorRendering?c():y3.draw(t,e,"11.14.0"),D}const B=u.select(`${h} svg`),R=(W=(O=p.db).getAccTitle)==null?void 0:W.call(O),$=(H=(q=p.db).getAccDescription)==null?void 0:H.call(q);ix(b,B,R,$),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",A$);let F=u.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=W$(F,f,pr(a.arrowMarkerAbsolute)),f){const D=u.select(h+" svg").node();F=H$(F,D)}else d||(F=Xr.sanitize(F,{ADD_TAGS:R$,ADD_ATTR:N$,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(b$(),m)throw m;return c(),{diagramType:b,svg:F,bindFunctions:p.db.bindFunctions}},"render");function ex(e={}){var i;const t=qt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),F1(t),t!=null&&t.theme&&t.theme in lr?t.themeVariables=lr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=lr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?L1(t):Tf();nh(r.logLevel),cs()}y(ex,"initialize");var rx=y((e,t={})=>{const{code:r}=Cc(e);return ah.fromText(r,t)},"getDiagramFromText");function ix(e,t,r,i){ZC(t,e),QC(t,r,i,t.attr("id"))}y(ix,"addA11yInfo");var ii=Object.freeze({render:Y$,parse:tx,getDiagramFromText:rx,initialize:ex,getConfig:Mt,setConfig:wf,getSiteConfig:Tf,updateSiteConfig:M1,reset:y(()=>{Ho()},"reset"),globalReset:y(()=>{Ho(Wi)},"globalReset"),defaultConfig:Wi});nh(Mt().logLevel);Ho(Mt());var j$=y((e,t,r)=>{P.warn(e),ec(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"),ax=y(async function(e={querySelector:".mermaid"}){try{await G$(e)}catch(t){if(ec(t)&&P.error(t.str),be.parseError&&be.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),G$=y(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ii.getConfig();P.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");P.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(P.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),ii.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new De.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const s=[];for(const l of Array.from(a)){if(P.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${o.next()}`;n=l.innerHTML,n=v0(De.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=De.detectInit(n);c&&P.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:f}=await lx(h,n,l);l.innerHTML=u,e&&await e(h),f&&f(l)}catch(u){j$(u,s,be.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ox=y(function(e){ii.initialize(e)},"initialize"),X$=y(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&ox(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ax(i)},"init"),V$=y(async(e,{lazyLoad:t=!0}={})=>{cs(),rl(...e),t===!1&&await C$()},"registerExternalDiagrams"),nx=y(function(){if(be.startOnLoad){const{startOnLoad:e}=ii.getConfig();e&&be.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",nx,!1);var Z$=y(function(e){be.parseError=e},"setParseErrorHandler"),En=[],Js=!1,sx=y(async()=>{if(!Js){for(Js=!0;En.length>0;){const e=En.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}Js=!1}},"executeQueue"),Q$=y(async(e,t)=>new Promise((r,i)=>{const a=y(()=>new Promise((o,n)=>{ii.parse(e,t).then(s=>{o(s),r(s)},s=>{var l;P.error("Error parsing",s),(l=be.parseError)==null||l.call(be,s),n(s),i(s)})}),"performCall");En.push(a),sx().catch(i)}),"parse"),lx=y((e,t,r)=>new Promise((i,a)=>{const o=y(()=>new Promise((n,s)=>{ii.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;P.error("Error parsing",l),(h=be.parseError)==null||h.call(be,l),s(l),a(l)})}),"performCall");En.push(o),sx().catch(a)}),"render"),K$=y(()=>Object.keys(Vr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),be={startOnLoad:!0,mermaidAPI:ii,parse:Q$,render:lx,init:X$,run:ax,registerExternalDiagrams:V$,registerLayoutLoaders:yC,initialize:ox,parseError:void 0,contentLoaded:nx,setParseErrorHandler:Z$,detectType:lh,registerIconPacks:dA,getRegisteredDiagramsMetadata:K$},J$=be;/*! Check if previously processed *//*!
308
+ * Wait for document loaded before starting the execution
309
+ */const GO=Object.freeze(Object.defineProperty({__proto__:null,default:J$},Symbol.toStringTag,{value:"Module"}));export{zg as $,SS as A,yO as B,_S as C,gO as D,Jw as E,n_ as F,pO as G,mO as H,Uw as I,MO as J,Ju as K,$O as L,EO as M,za as N,AO as O,kO as P,Rg as Q,np as R,FO as S,sp as T,op as U,ap as V,rp as W,ep as X,Bi as Y,JS as Z,yt as _,BO as a,cB as a$,qg as a0,wl as a1,GS as a2,jS as a3,tb as a4,eb as a5,J1 as a6,K1 as a7,y as a8,Ct as a9,Mt as aA,ob as aB,rc as aC,kf as aD,QF as aE,rv as aF,is as aG,bO as aH,TO as aI,h1 as aJ,gA as aK,Da as aL,nO as aM,WF as aN,N1 as aO,Mf as aP,Jc as aQ,ZF as aR,Za as aS,qe as aT,E as aU,A as aV,G1 as aW,Ef as aX,NA as aY,fC as aZ,HO as a_,ft as aa,P as ab,Af as ac,qt as ad,gr as ae,Ne as af,fB as ag,tM as ah,Qa as ai,c0 as aj,sO as ak,jO as al,YO as am,De as an,rb as ao,ib as ap,hB as aq,lB as ar,oE as as,OO as at,Xr as au,Q1 as av,lO as aw,Tr as ax,rO as ay,_x as az,vO as b,xL as b$,ce as b0,Cr as b1,ga as b2,ic as b3,l0 as b4,ei as b5,d0 as b6,V as b7,Th as b8,xg as b9,ji as bA,l_ as bB,s_ as bC,nn as bD,ro as bE,Mh as bF,Lh as bG,Hr as bH,on as bI,hO as bJ,so as bK,dA as bL,uA as bM,xO as bN,mF as bO,t0 as bP,Gm as bQ,bL as bR,Cn as bS,kL as bT,oo as bU,qr as bV,uF as bW,pd as bX,si as bY,TL as bZ,Vh as b_,dO as ba,K as bb,f0 as bc,iO as bd,zE as be,WO as bf,UO as bg,qO as bh,J as bi,zO as bj,mE as bk,uE as bl,cE as bm,oO as bn,rs as bo,kn as bp,r0 as bq,ou as br,au as bs,uO as bt,cO as bu,Ag as bv,Eh as bw,Wn as bx,c_ as by,h_ as bz,SO as c,SL as c0,Ki as c1,pF as c2,RF as c3,ML as c4,AF as c5,Gh as c6,of as c7,Qi as c8,TF as c9,GE as ca,ao as cb,bn as cc,$r as cd,Kn as ce,cd as cf,Zh as cg,Vm as ch,Jm as ci,yL as cj,rh as ck,PF as cl,MF as cm,NF as cn,Xh as co,zF as cp,J$ as cq,aO as cr,GO as cs,_O as d,wO as e,qS as f,kg as g,vS as h,BS as i,Og as j,CO as k,LS as l,jw as m,Bu as n,Yw as o,Kw as p,bg as q,fO as r,LO as s,_g as t,a_ as u,o_ as v,i_ as w,TS as x,wS as y,$g as z};