@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.
- package/dist/assets/{App-DJeBpzcc.css → App-D9R-_Pem.css} +1 -1
- package/dist/assets/App-DaOPoP5b.js +223 -0
- package/dist/assets/FeatureGuide-BNBq_PLn.js +1 -0
- package/dist/assets/SubAgentsPanel-CpKXYYmB.js +1 -0
- package/dist/assets/_baseUniq-DVrw3Tro.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-BZE_2gaA.js +36 -0
- package/dist/assets/{blockDiagram-DXYQGD6D-B9y1uS9R.js → blockDiagram-DXYQGD6D-CI8uSrzU.js} +4 -4
- package/dist/assets/{c4Diagram-AHTNJAMY-BRoJcx0b.js → c4Diagram-AHTNJAMY-DYfj69gY.js} +2 -2
- package/dist/assets/chunk-4BX2VUAB-Cw-2rap4.js +1 -0
- package/dist/assets/{chunk-4TB4RGXK-D95yqR9H.js → chunk-4TB4RGXK-jxTPHq0D.js} +3 -3
- package/dist/assets/chunk-55IACEB6-DmAIxchJ.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-FvClTRCF.js +1 -0
- package/dist/assets/{chunk-FMBD7UC4-B0r7CE0W.js → chunk-FMBD7UC4-Dv-f6b4O.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-2_Im5UU8.js → chunk-OYMX7WX6-CUAa_Yz6.js} +3 -3
- package/dist/assets/chunk-QZHKN3VN-D1FDs1aQ.js +1 -0
- package/dist/assets/chunk-YZCP3GAM-C2iPLYG9.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-DVvX4wPS.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-DVvX4wPS.js +1 -0
- package/dist/assets/clone-DRAA6Q7k.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CidaofdU.js +1 -0
- package/dist/assets/dagre-KV5264BT-B5okAMLc.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-DqlBY-17.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-BuAFDD-X.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-CFv_32_w.js +43 -0
- package/dist/assets/diagram-TYMM5635-CEU-9NCq.js +24 -0
- package/dist/assets/en-US-DLwJLted.js +3 -0
- package/dist/assets/{erDiagram-SMLLAGMA-DFjajcpE.js → erDiagram-SMLLAGMA-BGcZ-Hfc.js} +2 -2
- package/dist/assets/{flowDiagram-DWJPFMVM-CmdYRxD2.js → flowDiagram-DWJPFMVM-CCSeCjR1.js} +2 -2
- package/dist/assets/{ganttDiagram-T4ZO3ILL-BdeV_JQv.js → ganttDiagram-T4ZO3ILL-BqAoxnNO.js} +4 -4
- package/dist/assets/gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js +106 -0
- package/dist/assets/{graph-BZhdALnM.js → graph-BxbYGKIB.js} +1 -1
- package/dist/assets/index-AIUPRSCn.css +1 -0
- package/dist/assets/index-B1KXzc0W.js +8 -0
- package/dist/assets/index-B6OABT-M.css +1 -0
- package/dist/assets/index-BEkwZ-K8.js +1 -0
- package/dist/assets/index-BJC7afG8.js +1 -0
- package/dist/assets/index-BylZylqP.js +1 -0
- package/dist/assets/index-CLYKYSO0.css +1 -0
- package/dist/assets/index-CSqXTBwc.js +1 -0
- package/dist/assets/index-Cj9EZ-Bm.js +1 -0
- package/dist/assets/index-CucuFwVZ.css +1 -0
- package/dist/assets/index-D1aobBlB.js +1 -0
- package/dist/assets/index-DLBYvmHv.js +1 -0
- package/dist/assets/index-DNsNCcgt.css +1 -0
- package/dist/assets/index-DPYLJuvQ.js +1 -0
- package/dist/assets/index-D_SsVUqJ.js +21 -0
- package/dist/assets/index-DaK9qR94.js +1 -0
- package/dist/assets/index-Dkb_XCk_.js +1 -0
- package/dist/assets/index-RkUQwJrg.js +1 -0
- package/dist/assets/{index.es-Cn1_mau_.js → index.es-BhiHSeCT.js} +1 -1
- package/dist/assets/infoDiagram-42DDH7IO-Cemw9omR.js +2 -0
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-mjLLHcYj.js → ishikawaDiagram-UXIWVN3A-BYRE-suN.js} +5 -5
- package/dist/assets/{journeyDiagram-VCZTEJTY-DKAns2QR.js → journeyDiagram-VCZTEJTY-BRkAfzxG.js} +3 -3
- package/dist/assets/{kanban-definition-6JOO6SKY-_8RYarrG.js → kanban-definition-6JOO6SKY-DrTcKNPa.js} +7 -7
- package/dist/assets/{layout-BJQnEdOR.js → layout-B2E_GeCC.js} +1 -1
- package/dist/assets/main-CuvqMgTQ.js +6 -0
- package/dist/assets/min-5KBdYKFY.js +1 -0
- package/dist/assets/{mindmap-definition-QFDTVHPH-B8Fqmn2S.js → mindmap-definition-QFDTVHPH-sq4qw8uy.js} +10 -10
- package/dist/assets/onboardingStorage-BVcEpmTy.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-C8vOtX53.js +30 -0
- package/dist/assets/{quadrantDiagram-34T5L4WZ-ea-ItGVk.js → quadrantDiagram-34T5L4WZ-LV5yQE3M.js} +3 -3
- package/dist/assets/{requirementDiagram-MS252O5E-DoJ6ZjPU.js → requirementDiagram-MS252O5E-Bq6y8VCF.js} +4 -4
- package/dist/assets/sankeyDiagram-XADWPNL6-DvABiNaK.js +10 -0
- package/dist/assets/{sequenceDiagram-FGHM5R23-CnFMNFdv.js → sequenceDiagram-FGHM5R23-Bv9Ckauz.js} +2 -2
- package/dist/assets/stateDiagram-FHFEXIEX-CwYUsnc5.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-aegiqwuH.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-Dgx0wfE4.js → timeline-definition-GMOUNBTQ-BgidC49j.js} +3 -3
- package/dist/assets/{vendor-antd-BpW-8RO2.js → vendor-antd-DODjfilb.js} +85 -85
- package/dist/assets/vendor-charts-BYce7JXy.js +65 -0
- package/dist/assets/{vendor-markdown-yOmFo5hK.js → vendor-markdown-DzaXAW9Q.js} +23 -23
- package/dist/assets/vendor-mermaid-De-Yacw-.js +309 -0
- package/dist/assets/{vendor-pdf-xt0MLWhy.js → vendor-pdf-DHgAFQ2M.js} +4 -4
- package/dist/assets/vennDiagram-DHZGUBPP-Bzkbjibi.js +34 -0
- package/dist/assets/{wardley-RL74JXVD-DIGH9Gor.js → wardley-RL74JXVD-CBRp4POe.js} +2 -2
- package/dist/assets/{wardleyDiagram-NUSXRM2D-CMAuUksM.js → wardleyDiagram-NUSXRM2D-DAhT4-uz.js} +3 -3
- package/dist/assets/{xychartDiagram-5P7HB3ND-B4_9m2II.js → xychartDiagram-5P7HB3ND-CXfA4uSx.js} +4 -4
- package/dist/assets/zh-CN-B74Ip0pW.js +3 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +5 -4
- package/package.json +2 -1
- package/dist/assets/App-CIBUzKFV.js +0 -254
- package/dist/assets/_baseUniq-C-LHgpwK.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-knT7SmxI.js +0 -36
- package/dist/assets/chunk-4BX2VUAB-Dg65rhkh.js +0 -1
- package/dist/assets/chunk-55IACEB6-CUbVVgja.js +0 -1
- package/dist/assets/chunk-EDXVE4YY-B_pb0EHW.js +0 -1
- package/dist/assets/chunk-QZHKN3VN-DbGqS_ab.js +0 -1
- package/dist/assets/chunk-YZCP3GAM-DdAJ9t55.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-hQqJj1FL.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-hQqJj1FL.js +0 -1
- package/dist/assets/clone-BnNFRj9O.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-BDxVvsWm.js +0 -1
- package/dist/assets/dagre-KV5264BT-vzGZtZ_w.js +0 -4
- package/dist/assets/diagram-5BDNPKRD-CGYBSS7a.js +0 -10
- package/dist/assets/diagram-G4DWMVQ6-DBeNrz6n.js +0 -24
- package/dist/assets/diagram-MMDJMWI5-CCt9wdnx.js +0 -43
- package/dist/assets/diagram-TYMM5635-B-q2z4os.js +0 -24
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js +0 -106
- package/dist/assets/index-8MhLoQym.js +0 -1
- package/dist/assets/index-BR-Jz13T.js +0 -1
- package/dist/assets/index-Byt6VrzO.js +0 -1
- package/dist/assets/index-CTVpEC_u.js +0 -1
- package/dist/assets/index-jIgpBMFj.js +0 -1
- package/dist/assets/infoDiagram-42DDH7IO-COrckp6q.js +0 -2
- package/dist/assets/main-_fs1sZGu.js +0 -10
- package/dist/assets/min-CEPPgGqS.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-BCklzk2d.js +0 -30
- package/dist/assets/sankeyDiagram-XADWPNL6-CtYEK_8E.js +0 -10
- package/dist/assets/stateDiagram-FHFEXIEX-B_kOGWb-.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js +0 -1
- package/dist/assets/vendor-charts-fIPNnfk-.js +0 -65
- package/dist/assets/vendor-mermaid-DA4JIJaA.js +0 -309
- package/dist/assets/vennDiagram-DHZGUBPP-DcJGrLhu.js +0 -34
- package/dist/vite.svg +0 -1
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KV5264BT-vzGZtZ_w.js","./graph-BZhdALnM.js","./_baseUniq-C-LHgpwK.js","./layout-BJQnEdOR.js","./min-CEPPgGqS.js","./clone-BnNFRj9O.js","./vendor-markdown-yOmFo5hK.js","./vendor-i18n-BNURlJ23.js","./vendor-antd-BpW-8RO2.js","./vendor-charts-fIPNnfk-.js","./cose-bilkent-S5V4N54A-BDxVvsWm.js","./cytoscape.esm-BiciSPf8.js","./c4Diagram-AHTNJAMY-BRoJcx0b.js","./chunk-YZCP3GAM-DdAJ9t55.js","./flowDiagram-DWJPFMVM-CmdYRxD2.js","./chunk-FMBD7UC4-B0r7CE0W.js","./chunk-55IACEB6-CUbVVgja.js","./chunk-EDXVE4YY-B_pb0EHW.js","./erDiagram-SMLLAGMA-DFjajcpE.js","./gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js","./chunk-4BX2VUAB-Dg65rhkh.js","./chunk-QZHKN3VN-DbGqS_ab.js","./wardley-RL74JXVD-DIGH9Gor.js","./ganttDiagram-T4ZO3ILL-BdeV_JQv.js","./infoDiagram-42DDH7IO-COrckp6q.js","./pieDiagram-DEJITSTG-BCklzk2d.js","./quadrantDiagram-34T5L4WZ-ea-ItGVk.js","./xychartDiagram-5P7HB3ND-B4_9m2II.js","./requirementDiagram-MS252O5E-DoJ6ZjPU.js","./sequenceDiagram-FGHM5R23-CnFMNFdv.js","./classDiagram-6PBFFD2Q-hQqJj1FL.js","./chunk-4TB4RGXK-D95yqR9H.js","./classDiagram-v2-HSJHXN6E-hQqJj1FL.js","./stateDiagram-FHFEXIEX-B_kOGWb-.js","./chunk-OYMX7WX6-2_Im5UU8.js","./stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js","./journeyDiagram-VCZTEJTY-DKAns2QR.js","./timeline-definition-GMOUNBTQ-Dgx0wfE4.js","./mindmap-definition-QFDTVHPH-B8Fqmn2S.js","./kanban-definition-6JOO6SKY-_8RYarrG.js","./sankeyDiagram-XADWPNL6-CtYEK_8E.js","./diagram-TYMM5635-B-q2z4os.js","./diagram-MMDJMWI5-CCt9wdnx.js","./blockDiagram-DXYQGD6D-B9y1uS9R.js","./diagram-5BDNPKRD-CGYBSS7a.js","./architectureDiagram-Q4EWVU46-knT7SmxI.js","./ishikawaDiagram-UXIWVN3A-mjLLHcYj.js","./vennDiagram-DHZGUBPP-DcJGrLhu.js","./diagram-G4DWMVQ6-DBeNrz6n.js","./wardleyDiagram-NUSXRM2D-CMAuUksM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var em=Object.defineProperty;var rm=(e,t,r)=>t in e?em(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var mt=(e,t,r)=>rm(e,typeof t!="symbol"?t+"":t,r);import{_ as ut}from"./vendor-markdown-yOmFo5hK.js";import{d as im,s as am,e as sm,f as om}from"./vendor-antd-BpW-8RO2.js";import{i as nm,c as cl,a as ul,b as lm,d as hm,e as cm,s as Uh,f as jh,g as Gh,h as Vh,m as Xh,j as Zh,k as um,l as Ca,n as Kh,o as dm,p as pm,q as Qh,r as gm,t as fm,u as mm,v as Jh,w as tc,x as ym,y as Cm,z as eo,A as xm}from"./vendor-charts-fIPNnfk-.js";var ec=Object.defineProperty,g=(e,t)=>ec(e,"name",{value:t,configurable:!0}),bm=(e,t)=>{for(var r in t)ec(e,r,{get:t[r],enumerable:!0})},Ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Ko=g(function(e="fatal"){let t=Ie.fatal;typeof e=="string"?e.toLowerCase()in Ie&&(t=Ie[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=Ie.fatal&&(I.fatal=console.error?console.error.bind(console,ce("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ce("FATAL"))),t<=Ie.error&&(I.error=console.error?console.error.bind(console,ce("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ce("ERROR"))),t<=Ie.warn&&(I.warn=console.warn?console.warn.bind(console,ce("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ce("WARN"))),t<=Ie.info&&(I.info=console.info?console.info.bind(console,ce("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ce("INFO"))),t<=Ie.debug&&(I.debug=console.debug?console.debug.bind(console,ce("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ce("DEBUG"))),t<=Ie.trace&&(I.trace=console.debug?console.debug.bind(console,ce("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ce("TRACE")))},"setLogLevel"),ce=g(e=>`%c${im().format("ss.SSS")} : ${e} : `,"format");const xa={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,s=2*r-a;switch(i){case"r":return xa.hue2rgb(s,a,e+1/3)*255;case"g":return xa.hue2rgb(s,a,e)*255;case"b":return xa.hue2rgb(s,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),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},km={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},Tm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},rt={channel:xa,lang:km,unit:Tm},Ue={};for(let e=0;e<=255;e++)Ue[e]=rt.unit.dec2hex(e);const Wt={ALL:0,RGB:1,HSL:2};class Sm{constructor(){this.type=Wt.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=Wt.ALL}is(t){return this.type===t}}class wm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Sm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Wt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=rt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=rt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=rt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=rt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=rt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=rt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Wt.HSL)&&r!==void 0?r:(this._ensureHSL(),rt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Wt.RGB)&&r!==void 0?r:(this._ensureRGB(),rt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Wt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Wt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Wt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Wt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Wt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Wt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const os=new wm({r:0,g:0,b:0,a:0},"transparent"),$r={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match($r.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,h=s?0:-1,c=o?255:15;return os.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:s?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${Ue[Math.round(t)]}${Ue[Math.round(r)]}${Ue[Math.round(i)]}${Ue[Math.round(a*255)]}`:`#${Ue[Math.round(t)]}${Ue[Math.round(r)]}${Ue[Math.round(i)]}`}},sr={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(sr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return rt.channel.clamp.h(parseFloat(r)*.9);case"rad":return rt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return rt.channel.clamp.h(parseFloat(r)*360)}}return rt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(sr.re);if(!r)return;const[,i,a,s,o,n]=r;return os.set({h:sr._hue2deg(i),s:rt.channel.clamp.s(parseFloat(a)),l:rt.channel.clamp.l(parseFloat(s)),a:o?rt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${rt.lang.round(t)}, ${rt.lang.round(r)}%, ${rt.lang.round(i)}%, ${a})`:`hsl(${rt.lang.round(t)}, ${rt.lang.round(r)}%, ${rt.lang.round(i)}%)`}},Ei={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=Ei.colors[e];if(t)return $r.parse(t)},stringify:e=>{const t=$r.stringify(e);for(const r in Ei.colors)if(Ei.colors[r]===t)return r}},Ti={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ti.re);if(!r)return;const[,i,a,s,o,n,l,h,c]=r;return os.set({r:rt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:rt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:rt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?rt.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(${rt.lang.round(t)}, ${rt.lang.round(r)}, ${rt.lang.round(i)}, ${rt.lang.round(a)})`:`rgb(${rt.lang.round(t)}, ${rt.lang.round(r)}, ${rt.lang.round(i)})`}},Ce={format:{keyword:Ei,hex:$r,rgb:Ti,rgba:Ti,hsl:sr,hsla:sr},parse:e=>{if(typeof e!="string")return e;const t=$r.parse(e)||Ti.parse(e)||sr.parse(e)||Ei.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Wt.HSL)||e.data.r===void 0?sr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ti.stringify(e):$r.stringify(e)},rc=(e,t)=>{const r=Ce.parse(e);for(const i in t)r[i]=rt.channel.clamp[i](t[i]);return Ce.stringify(r)},Ge=(e,t,r=0,i=1)=>{if(typeof e!="number")return rc(e,{a:t});const a=os.set({r:rt.channel.clamp.r(e),g:rt.channel.clamp.g(t),b:rt.channel.clamp.b(r),a:rt.channel.clamp.a(i)});return Ce.stringify(a)},IL=(e,t)=>rt.lang.round(Ce.parse(e)[t]),vm=e=>{const{r:t,g:r,b:i}=Ce.parse(e),a=.2126*rt.channel.toLinear(t)+.7152*rt.channel.toLinear(r)+.0722*rt.channel.toLinear(i);return rt.lang.round(a)},Bm=e=>vm(e)>=.5,be=e=>!Bm(e),Qo=(e,t,r)=>{const i=Ce.parse(e),a=i[t],s=rt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ce.stringify(i)},A=(e,t)=>Qo(e,"l",t),F=(e,t)=>Qo(e,"l",-t),OL=(e,t)=>Qo(e,"a",-t),x=(e,t)=>{const r=Ce.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return rc(e,i)},_m=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ce.parse(e),{r:n,g:l,b:h,a:c}=Ce.parse(t),d=r/100,p=d*2-1,u=o-c,y=((p*u===-1?p:(p+u)/(1+p*u))+1)/2,f=1-y,C=i*y+n*f,b=a*y+l*f,k=s*y+h*f,S=o*d+c*(1-d);return Ge(C,b,k,S)},_=(e,t=100)=>{const r=Ce.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_m(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:ic,setPrototypeOf:dl,isFrozen:Lm,getPrototypeOf:Fm,getOwnPropertyDescriptor:Am}=Object;let{freeze:Xt,seal:ue,create:Fr}=Object,{apply:ro,construct:io}=typeof Reflect<"u"&&Reflect;Xt||(Xt=function(t){return t});ue||(ue=function(t){return t});ro||(ro=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});io||(io=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 li=_t(Array.prototype.forEach),Em=_t(Array.prototype.lastIndexOf),pl=_t(Array.prototype.pop),hi=_t(Array.prototype.push),Mm=_t(Array.prototype.splice),jt=Array.isArray,Si=_t(String.prototype.toLowerCase),Ps=_t(String.prototype.toString),gl=_t(String.prototype.match),Br=_t(String.prototype.replace),fl=_t(String.prototype.indexOf),Im=_t(String.prototype.trim),Om=_t(Number.prototype.toString),$m=_t(Boolean.prototype.toString),ml=typeof BigInt>"u"?null:_t(BigInt.prototype.toString),yl=typeof Symbol>"u"?null:_t(Symbol.prototype.toString),St=_t(Object.prototype.hasOwnProperty),ci=_t(Object.prototype.toString),Dt=_t(RegExp.prototype.test),na=Dm(TypeError);function _t(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 ro(e,t,i)}}function Dm(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return io(e,r)}}function at(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Si;if(dl&&dl(e,null),!jt(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(Lm(t)||(t[i]=s),a=s)}e[a]=!0}return e}function Pm(e){for(let t=0;t<e.length;t++)St(e,t)||(e[t]=null);return e}function Jt(e){const t=Fr(null);for(const[r,i]of ic(e))St(e,r)&&(jt(i)?t[r]=Pm(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=Jt(i):t[r]=i);return t}function Rm(e){switch(typeof e){case"string":return e;case"number":return Om(e);case"boolean":return $m(e);case"bigint":return ml?ml(e):"0";case"symbol":return yl?yl(e):"Symbol()";case"undefined":return ci(e);case"function":case"object":{if(e===null)return ci(e);const t=e,r=Ar(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:ci(i)}return ci(e)}default:return ci(e)}}function Ar(e,t){for(;e!==null;){const i=Am(e,t);if(i){if(i.get)return _t(i.get);if(typeof i.value=="function")return _t(i.value)}e=Fm(e)}function r(){return null}return r}function qm(e){try{return Dt(e,""),!0}catch{return!1}}const Cl=Xt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Rs=Xt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qs=Xt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nm=Xt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ns=Xt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zm=Xt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xl=Xt(["#text"]),bl=Xt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),zs=Xt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","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"]),kl=Xt(["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"]),la=Xt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wm=ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hm=ue(/<%[\w\W]*|[\w\W]*%>/gm),Ym=ue(/\$\{[\w\W]*/gm),Um=ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),jm=ue(/^aria-[\-\w]+$/),ac=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gm=ue(/^(?:\w+script|data):/i),Vm=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sc=ue(/^html$/i),Xm=ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var Tl=Object.freeze({__proto__:null,ARIA_ATTR:jm,ATTR_WHITESPACE:Vm,CUSTOM_ELEMENT:Xm,DATA_ATTR:Um,DOCTYPE_NAME:sc,ERB_EXPR:Hm,IS_ALLOWED_URI:ac,IS_SCRIPT_OR_DATA:Gm,MUSTACHE_EXPR:Wm,TMPLIT_EXPR:Ym});const ui={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zm=function(){return typeof window>"u"?null:window},Km=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 s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Sl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function oc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zm();const t=Z=>oc(Z);if(t.version="3.4.1",t.removed=[],!e||!e.document||e.document.nodeType!==ui.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:l,NodeFilter:h,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:u}=e,m=l.prototype,y=Ar(m,"cloneNode"),f=Ar(m,"remove"),C=Ar(m,"nextSibling"),b=Ar(m,"childNodes"),k=Ar(m,"parentNode");if(typeof o=="function"){const Z=r.createElement("template");Z.content&&Z.content.ownerDocument&&(r=Z.content.ownerDocument)}let S,w="";const{implementation:B,createNodeIterator:T,createDocumentFragment:L,getElementsByTagName:P}=r,{importNode:M}=i;let E=Sl();t.isSupported=typeof ic=="function"&&typeof k=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:D,TMPLIT_EXPR:q,DATA_ATTR:N,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:J}=Tl;let{IS_ALLOWED_URI:nt}=Tl,ct=null;const qt=at({},[...Cl,...Rs,...qs,...Ns,...xl]);let gt=null;const Lt=at({},[...bl,...zs,...kl,...la]);let ot=Object.seal(Fr(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}})),Ft=null,le=null;const re=Object.seal(Fr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let si=!0,it=!0,lt=!1,kt=!0,wt=!1,ie=!0,Nt=!1,Tr=!1,ra=!1,Te=!1,ia=!1,aa=!1,jn=!0,Gn=!1;const Vn="user-content-";let Bs=!0,oi=!1,Sr={},Se=null;const _s=at({},["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 Xn=null;const Zn=at({},["audio","video","img","source","image","track"]);let Ls=null;const Kn=at({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sa="http://www.w3.org/1998/Math/MathML",oa="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let wr=we,Fs=!1,As=null;const Vf=at({},[sa,oa,we],Ps);let Es=at({},["mi","mo","mn","ms","mtext"]),Ms=at({},["annotation-xml"]);const Xf=at({},["title","style","font","a","script"]);let ni=null;const Zf=["application/xhtml+xml","text/html"],Kf="text/html";let At=null,vr=null;const Qf=r.createElement("form"),Qn=function(v){return v instanceof RegExp||v instanceof Function},Is=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(vr&&vr===v)return;(!v||typeof v!="object")&&(v={}),v=Jt(v),ni=Zf.indexOf(v.PARSER_MEDIA_TYPE)===-1?Kf:v.PARSER_MEDIA_TYPE,At=ni==="application/xhtml+xml"?Ps:Si,ct=St(v,"ALLOWED_TAGS")&&jt(v.ALLOWED_TAGS)?at({},v.ALLOWED_TAGS,At):qt,gt=St(v,"ALLOWED_ATTR")&&jt(v.ALLOWED_ATTR)?at({},v.ALLOWED_ATTR,At):Lt,As=St(v,"ALLOWED_NAMESPACES")&&jt(v.ALLOWED_NAMESPACES)?at({},v.ALLOWED_NAMESPACES,Ps):Vf,Ls=St(v,"ADD_URI_SAFE_ATTR")&&jt(v.ADD_URI_SAFE_ATTR)?at(Jt(Kn),v.ADD_URI_SAFE_ATTR,At):Kn,Xn=St(v,"ADD_DATA_URI_TAGS")&&jt(v.ADD_DATA_URI_TAGS)?at(Jt(Zn),v.ADD_DATA_URI_TAGS,At):Zn,Se=St(v,"FORBID_CONTENTS")&&jt(v.FORBID_CONTENTS)?at({},v.FORBID_CONTENTS,At):_s,Ft=St(v,"FORBID_TAGS")&&jt(v.FORBID_TAGS)?at({},v.FORBID_TAGS,At):Jt({}),le=St(v,"FORBID_ATTR")&&jt(v.FORBID_ATTR)?at({},v.FORBID_ATTR,At):Jt({}),Sr=St(v,"USE_PROFILES")?v.USE_PROFILES&&typeof v.USE_PROFILES=="object"?Jt(v.USE_PROFILES):v.USE_PROFILES:!1,si=v.ALLOW_ARIA_ATTR!==!1,it=v.ALLOW_DATA_ATTR!==!1,lt=v.ALLOW_UNKNOWN_PROTOCOLS||!1,kt=v.ALLOW_SELF_CLOSE_IN_ATTR!==!1,wt=v.SAFE_FOR_TEMPLATES||!1,ie=v.SAFE_FOR_XML!==!1,Nt=v.WHOLE_DOCUMENT||!1,Te=v.RETURN_DOM||!1,ia=v.RETURN_DOM_FRAGMENT||!1,aa=v.RETURN_TRUSTED_TYPE||!1,ra=v.FORCE_BODY||!1,jn=v.SANITIZE_DOM!==!1,Gn=v.SANITIZE_NAMED_PROPS||!1,Bs=v.KEEP_CONTENT!==!1,oi=v.IN_PLACE||!1,nt=qm(v.ALLOWED_URI_REGEXP)?v.ALLOWED_URI_REGEXP:ac,wr=typeof v.NAMESPACE=="string"?v.NAMESPACE:we,Es=St(v,"MATHML_TEXT_INTEGRATION_POINTS")&&v.MATHML_TEXT_INTEGRATION_POINTS&&typeof v.MATHML_TEXT_INTEGRATION_POINTS=="object"?Jt(v.MATHML_TEXT_INTEGRATION_POINTS):at({},["mi","mo","mn","ms","mtext"]),Ms=St(v,"HTML_INTEGRATION_POINTS")&&v.HTML_INTEGRATION_POINTS&&typeof v.HTML_INTEGRATION_POINTS=="object"?Jt(v.HTML_INTEGRATION_POINTS):at({},["annotation-xml"]);const O=St(v,"CUSTOM_ELEMENT_HANDLING")&&v.CUSTOM_ELEMENT_HANDLING&&typeof v.CUSTOM_ELEMENT_HANDLING=="object"?Jt(v.CUSTOM_ELEMENT_HANDLING):Fr(null);if(ot=Fr(null),St(O,"tagNameCheck")&&Qn(O.tagNameCheck)&&(ot.tagNameCheck=O.tagNameCheck),St(O,"attributeNameCheck")&&Qn(O.attributeNameCheck)&&(ot.attributeNameCheck=O.attributeNameCheck),St(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(ot.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),wt&&(it=!1),ia&&(Te=!0),Sr&&(ct=at({},xl),gt=Fr(null),Sr.html===!0&&(at(ct,Cl),at(gt,bl)),Sr.svg===!0&&(at(ct,Rs),at(gt,zs),at(gt,la)),Sr.svgFilters===!0&&(at(ct,qs),at(gt,zs),at(gt,la)),Sr.mathMl===!0&&(at(ct,Ns),at(gt,kl),at(gt,la))),re.tagCheck=null,re.attributeCheck=null,St(v,"ADD_TAGS")&&(typeof v.ADD_TAGS=="function"?re.tagCheck=v.ADD_TAGS:jt(v.ADD_TAGS)&&(ct===qt&&(ct=Jt(ct)),at(ct,v.ADD_TAGS,At))),St(v,"ADD_ATTR")&&(typeof v.ADD_ATTR=="function"?re.attributeCheck=v.ADD_ATTR:jt(v.ADD_ATTR)&&(gt===Lt&&(gt=Jt(gt)),at(gt,v.ADD_ATTR,At))),St(v,"ADD_URI_SAFE_ATTR")&&jt(v.ADD_URI_SAFE_ATTR)&&at(Ls,v.ADD_URI_SAFE_ATTR,At),St(v,"FORBID_CONTENTS")&&jt(v.FORBID_CONTENTS)&&(Se===_s&&(Se=Jt(Se)),at(Se,v.FORBID_CONTENTS,At)),St(v,"ADD_FORBID_CONTENTS")&&jt(v.ADD_FORBID_CONTENTS)&&(Se===_s&&(Se=Jt(Se)),at(Se,v.ADD_FORBID_CONTENTS,At)),Bs&&(ct["#text"]=!0),Nt&&at(ct,["html","head","body"]),ct.table&&(at(ct,["tbody"]),delete Ft.tbody),v.TRUSTED_TYPES_POLICY){if(typeof v.TRUSTED_TYPES_POLICY.createHTML!="function")throw na('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof v.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw na('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=v.TRUSTED_TYPES_POLICY,w=S.createHTML("")}else S===void 0&&(S=Km(u,a)),S!==null&&typeof w=="string"&&(w=S.createHTML(""));Xt&&Xt(v),vr=v},Jn=at({},[...Rs,...qs,...Nm]),tl=at({},[...Ns,...zm]),Jf=function(v){let O=k(v);(!O||!O.tagName)&&(O={namespaceURI:wr,tagName:"template"});const U=Si(v.tagName),Ct=Si(O.tagName);return As[v.namespaceURI]?v.namespaceURI===oa?O.namespaceURI===we?U==="svg":O.namespaceURI===sa?U==="svg"&&(Ct==="annotation-xml"||Es[Ct]):!!Jn[U]:v.namespaceURI===sa?O.namespaceURI===we?U==="math":O.namespaceURI===oa?U==="math"&&Ms[Ct]:!!tl[U]:v.namespaceURI===we?O.namespaceURI===oa&&!Ms[Ct]||O.namespaceURI===sa&&!Es[Ct]?!1:!tl[U]&&(Xf[U]||!Jn[U]):!!(ni==="application/xhtml+xml"&&As[v.namespaceURI]):!1},de=function(v){hi(t.removed,{element:v});try{k(v).removeChild(v)}catch{f(v)}},tr=function(v,O){try{hi(t.removed,{attribute:O.getAttributeNode(v),from:O})}catch{hi(t.removed,{attribute:null,from:O})}if(O.removeAttribute(v),v==="is")if(Te||ia)try{de(O)}catch{}else try{O.setAttribute(v,"")}catch{}},el=function(v){let O=null,U=null;if(ra)v="<remove></remove>"+v;else{const Bt=gl(v,/^[\r\n\t ]+/);U=Bt&&Bt[0]}ni==="application/xhtml+xml"&&wr===we&&(v='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+v+"</body></html>");const Ct=S?S.createHTML(v):v;if(wr===we)try{O=new p().parseFromString(Ct,ni)}catch{}if(!O||!O.documentElement){O=B.createDocument(wr,"template",null);try{O.documentElement.innerHTML=Fs?w:Ct}catch{}}const zt=O.body||O.documentElement;return v&&U&&zt.insertBefore(r.createTextNode(U),zt.childNodes[0]||null),wr===we?P.call(O,Nt?"html":"body")[0]:Nt?O.documentElement:zt},rl=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)},Os=function(v){return v instanceof d&&(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")},$s=function(v){return typeof n=="function"&&v instanceof n};function Me(Z,v,O){li(Z,U=>{U.call(t,v,O,vr)})}const il=function(v){let O=null;if(Me(E.beforeSanitizeElements,v,null),Os(v))return de(v),!0;const U=At(v.nodeName);if(Me(E.uponSanitizeElement,v,{tagName:U,allowedTags:ct}),ie&&v.hasChildNodes()&&!$s(v.firstElementChild)&&Dt(/<[/\w!]/g,v.innerHTML)&&Dt(/<[/\w!]/g,v.textContent)||ie&&v.namespaceURI===we&&U==="style"&&$s(v.firstElementChild)||v.nodeType===ui.progressingInstruction||ie&&v.nodeType===ui.comment&&Dt(/<[/\w]/g,v.data))return de(v),!0;if(Ft[U]||!(re.tagCheck instanceof Function&&re.tagCheck(U))&&!ct[U]){if(!Ft[U]&&sl(U)&&(ot.tagNameCheck instanceof RegExp&&Dt(ot.tagNameCheck,U)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(U)))return!1;if(Bs&&!Se[U]){const Ct=k(v)||v.parentNode,zt=b(v)||v.childNodes;if(zt&&Ct){const Bt=zt.length;for(let Kt=Bt-1;Kt>=0;--Kt){const he=y(zt[Kt],!0);Ct.insertBefore(he,C(v))}}}return de(v),!0}return v instanceof l&&!Jf(v)||(U==="noscript"||U==="noembed"||U==="noframes")&&Dt(/<\/no(script|embed|frames)/i,v.innerHTML)?(de(v),!0):(wt&&v.nodeType===ui.text&&(O=v.textContent,li([z,D,q],Ct=>{O=Br(O,Ct," ")}),v.textContent!==O&&(hi(t.removed,{element:v.cloneNode()}),v.textContent=O)),Me(E.afterSanitizeElements,v,null),!1)},al=function(v,O,U){if(le[O]||jn&&(O==="id"||O==="name")&&(U in r||U in Qf))return!1;if(!(it&&!le[O]&&Dt(N,O))){if(!(si&&Dt(R,O))){if(!(re.attributeCheck instanceof Function&&re.attributeCheck(O,v))){if(!gt[O]||le[O]){if(!(sl(v)&&(ot.tagNameCheck instanceof RegExp&&Dt(ot.tagNameCheck,v)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(v))&&(ot.attributeNameCheck instanceof RegExp&&Dt(ot.attributeNameCheck,O)||ot.attributeNameCheck instanceof Function&&ot.attributeNameCheck(O,v))||O==="is"&&ot.allowCustomizedBuiltInElements&&(ot.tagNameCheck instanceof RegExp&&Dt(ot.tagNameCheck,U)||ot.tagNameCheck instanceof Function&&ot.tagNameCheck(U))))return!1}else if(!Ls[O]){if(!Dt(nt,Br(U,$,""))){if(!((O==="src"||O==="xlink:href"||O==="href")&&v!=="script"&&fl(U,"data:")===0&&Xn[v])){if(!(lt&&!Dt(W,Br(U,$,"")))){if(U)return!1}}}}}}}return!0},tm=at({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),sl=function(v){return!tm[Si(v)]&&Dt(J,v)},ol=function(v){Me(E.beforeSanitizeAttributes,v,null);const{attributes:O}=v;if(!O||Os(v))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gt,forceKeepAttr:void 0};let Ct=O.length;for(;Ct--;){const zt=O[Ct],{name:Bt,namespaceURI:Kt,value:he}=zt,pe=At(Bt),Ds=he;let Ot=Bt==="value"?Ds:Im(Ds);if(U.attrName=pe,U.attrValue=Ot,U.keepAttr=!0,U.forceKeepAttr=void 0,Me(E.uponSanitizeAttribute,v,U),Ot=U.attrValue,Gn&&(pe==="id"||pe==="name")&&fl(Ot,Vn)!==0&&(tr(Bt,v),Ot=Vn+Ot),ie&&Dt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ot)){tr(Bt,v);continue}if(pe==="attributename"&&gl(Ot,"href")){tr(Bt,v);continue}if(U.forceKeepAttr)continue;if(!U.keepAttr){tr(Bt,v);continue}if(!kt&&Dt(/\/>/i,Ot)){tr(Bt,v);continue}wt&&li([z,D,q],hl=>{Ot=Br(Ot,hl," ")});const ll=At(v.nodeName);if(!al(ll,pe,Ot)){tr(Bt,v);continue}if(S&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Kt)switch(u.getAttributeType(ll,pe)){case"TrustedHTML":{Ot=S.createHTML(Ot);break}case"TrustedScriptURL":{Ot=S.createScriptURL(Ot);break}}if(Ot!==Ds)try{Kt?v.setAttributeNS(Kt,Bt,Ot):v.setAttribute(Bt,Ot),Os(v)?de(v):pl(t.removed)}catch{tr(Bt,v)}}Me(E.afterSanitizeAttributes,v,null)},nl=function(v){let O=null;const U=rl(v);for(Me(E.beforeSanitizeShadowDOM,v,null);O=U.nextNode();)Me(E.uponSanitizeShadowNode,O,null),il(O),ol(O),O.content instanceof s&&nl(O.content);Me(E.afterSanitizeShadowDOM,v,null)};return t.sanitize=function(Z){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,U=null,Ct=null,zt=null;if(Fs=!Z,Fs&&(Z="<!-->"),typeof Z!="string"&&!$s(Z)&&(Z=Rm(Z),typeof Z!="string"))throw na("dirty is not a string, aborting");if(!t.isSupported)return Z;if(Tr||Is(v),t.removed=[],typeof Z=="string"&&(oi=!1),oi){const he=Z.nodeName;if(typeof he=="string"){const pe=At(he);if(!ct[pe]||Ft[pe])throw na("root node is forbidden and cannot be sanitized in-place")}}else if(Z instanceof n)O=el("<!---->"),U=O.ownerDocument.importNode(Z,!0),U.nodeType===ui.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?O=U:O.appendChild(U);else{if(!Te&&!wt&&!Nt&&Z.indexOf("<")===-1)return S&&aa?S.createHTML(Z):Z;if(O=el(Z),!O)return Te?null:aa?w:""}O&&ra&&de(O.firstChild);const Bt=rl(oi?Z:O);for(;Ct=Bt.nextNode();)il(Ct),ol(Ct),Ct.content instanceof s&&nl(Ct.content);if(oi)return Z;if(Te){if(wt){O.normalize();let he=O.innerHTML;li([z,D,q],pe=>{he=Br(he,pe," ")}),O.innerHTML=he}if(ia)for(zt=L.call(O.ownerDocument);O.firstChild;)zt.appendChild(O.firstChild);else zt=O;return(gt.shadowroot||gt.shadowrootmode)&&(zt=M.call(i,zt,!0)),zt}let Kt=Nt?O.outerHTML:O.innerHTML;return Nt&&ct["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&Dt(sc,O.ownerDocument.doctype.name)&&(Kt="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
3
|
-
`+Kt),wt&&li([z,D,q],he=>{Kt=Br(Kt,he," ")}),S&&aa?S.createHTML(Kt):Kt},t.setConfig=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Is(Z),Tr=!0},t.clearConfig=function(){vr=null,Tr=!1},t.isValidAttribute=function(Z,v,O){vr||Is({});const U=At(Z),Ct=At(v);return al(U,Ct,O)},t.addHook=function(Z,v){typeof v=="function"&&hi(E[Z],v)},t.removeHook=function(Z,v){if(v!==void 0){const O=Em(E[Z],v);return O===-1?void 0:Mm(E[Z],O,1)[0]}return pl(E[Z])},t.removeHooks=function(Z){E[Z]=[]},t.removeAllHooks=function(){E=Sl()},t}var hr=oc();const $L=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"}));var nc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qm=/\s*%%.*\n/gm,Dr,lc=(Dr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(Dr,"UnknownDiagramError"),Dr),cr={},Jo=g(function(e,t){e=e.replace(nc,"").replace(Mi,"").replace(Qm,`
|
|
4
|
-
`);for(const[r,{detector:i}]of Object.entries(cr))if(i(e,t))return r;throw new lc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ao=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)hc(t,r,i)},"registerLazyLoadedDiagrams"),hc=g((e,t,r)=>{cr[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),cr[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Jm=g(e=>cr[e].loader,"getDiagramLoader"),so=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>so(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),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(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=so(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Mt=so,Le="#ffffff",Fe="#f2f2f2",et=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Pr,ty=(Pr=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,s,o,n,l,h,c,d,p,u,m,y,f,C,b,k,S,w,B,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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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||F(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||F(this.mainBkg,10)):(this.rowOdd=this.rowOdd||A(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||A(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 L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScale"+L]=F(this["cScale"+L],75);else for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScale"+L]=F(this["cScale"+L],25);for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScaleInv"+L]=this["cScaleInv"+L]||_(this["cScale"+L]);for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this.darkMode?this["cScalePeer"+L]=this["cScalePeer"+L]||A(this["cScale"+L],10):this["cScalePeer"+L]=this["cScalePeer"+L]||F(this["cScale"+L],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScaleLabel"+L]=this["cScaleLabel"+L]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let L=0;L<5;L++)this["surface"+L]=this["surface"+L]||x(this.mainBkg,{h:180,s:-15,l:t*(5+L*3)}),this["surfacePeer"+L]=this["surfacePeer"+L]||x(this.mainBkg,{h:180,s:-15,l:t*(8+L*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:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,dataLabelColor:((m=this.xyChart)==null?void 0:m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((y=this.xyChart)==null?void 0:y.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.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:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe,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]})}},g(Pr,"Theme"),Pr),ey=g(e=>{const t=new ty;return t.calculate(e),t},"getThemeVariables"),Rr,ry=(Rr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ge(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=F("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=F(this.sectionBkgColor,10),this.taskBorderColor=Ge(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ge(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||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||F(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,s,o,n,l,h,c,d,p,u,m,y,f,C,b,k,S,w,B;this.secondBkg=A(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=A(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=A(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=_(this.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]||_(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScalePeer"+T]=this["cScalePeer"+T]||A(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)]??A(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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((y=this.radar)==null?void 0:y.axisLabelFontSize)||12,curveOpacity:((f=this.radar)==null?void 0:f.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:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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?F(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.secondaryColor,20),this.git1=A(this.pie2||this.secondaryColor,20),this.git2=A(this.pie3||this.tertiaryColor,20),this.git3=A(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=A(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=A(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=A(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=A(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||A(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A(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]})}},g(Rr,"Theme"),Rr),iy=g(e=>{const t=new ry;return t.calculate(e),t},"getThemeVariables"),qr,ay=(qr=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=et(this.primaryColor,this.darkMode),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=et(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=Ge(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,s,o,n,l,h,c,d,p,u,m,y,f,C,b,k,S,w,B;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||F(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||F(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=F(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||F(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||_(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||_(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||A(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||A(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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((u=this.xyChart)==null?void 0:u.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((y=this.xyChart)==null?void 0:y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.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:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||F(_(this.git0),25),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(qr,"Theme"),qr),sy=g(e=>{const t=new ay;return t.calculate(e),t},"getThemeVariables"),Nr,oy=(Nr=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=A("#cde498",10),this.primaryBorderColor=et(this.primaryColor,this.darkMode),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.primaryColor),this.lineColor=_(this.background),this.textColor=_(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,s,o,n,l,h,c,d,p,u,m,y,f,C,b,k,S,w,B;this.actorBorder=F(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||F(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||F(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=F(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||F(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||A(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||A(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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((u=this.xyChart)==null?void 0:u.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((y=this.xyChart)==null?void 0:y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.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:((S=this.xyChart)==null?void 0:S.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Nr,"Theme"),Nr),ny=g(e=>{const t=new oy;return t.calculate(e),t},"getThemeVariables"),zr,ly=(zr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=A(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=et(this.primaryColor,this.darkMode),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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||A(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,s,o,n,l,h,c,d,p,u,m,y,f,C,b,k,S,w,B;this.secondBkg=A(this.contrast,55),this.border2=this.contrast,this.actorBorder=A(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]||_(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||A(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||F(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=A(this.contrast,30),this.sectionBkgColor2=A(this.contrast,30),this.taskBorderColor=F(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=A(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=F(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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((y=this.radar)==null?void 0:y.axisLabelFontSize)||12,curveOpacity:((f=this.radar)==null?void 0:f.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:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.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=F(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||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(zr,"Theme"),zr),hy=g(e=>{const t=new ly;return t.calculate(e),t},"getThemeVariables"),Wr,cy=(Wr=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=et(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 s,o,n,l,h,c,d,p,u,m,y;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=F(this["cScale"+f],75);else for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=F(this["cScale"+f],25);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||_(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this.darkMode?this["cScalePeer"+f]=this["cScalePeer"+f]||A(this["cScale"+f],10):this["cScalePeer"+f]=this["cScalePeer"+f]||F(this["cScale"+f],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(5+f*3)}),this["surfacePeer"+f]=this["surfacePeer"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(8+f*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Wr,"Theme"),Wr),uy=g(e=>{const t=new cy;return t.calculate(e),t},"getThemeVariables"),Hr,dy=(Hr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(_("#323D47"),10),this.border1="#ccc",this.border2=Ge(255,255,255,.25),this.arrowheadColor=_(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,s,o,n,l,h,c,d,p;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=F(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=F(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||A(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||F(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.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||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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Hr,"Theme"),Hr),py=g(e=>{const t=new dy;return t.calculate(e),t},"getThemeVariables"),Yr,gy=(Yr=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=et("#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 s,o,n,l,h,c,d,p,u,m,y;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=this.mainBkg;if(this.darkMode)for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=F(this["cScale"+f],75);else for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=F(this["cScale"+f],25);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||_(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this.darkMode?this["cScalePeer"+f]=this["cScalePeer"+f]||A(this["cScale"+f],10):this["cScalePeer"+f]=this["cScalePeer"+f]||F(this["cScale"+f],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(5+f*3)}),this["surfacePeer"+f]=this["surfacePeer"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(8+f*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Yr,"Theme"),Yr),fy=g(e=>{const t=new gy;return t.calculate(e),t},"getThemeVariables"),Ur,my=(Ur=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(_("#323D47"),10),this.border1="#ccc",this.border2=Ge(255,255,255,.25),this.arrowheadColor=_(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,s,o,n,l,h,c,d,p;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=F(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=F(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||A(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||F(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.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||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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Ur,"Theme"),Ur),yy=g(e=>{const t=new my;return t.calculate(e),t},"getThemeVariables"),jr,Cy=(jr=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=et(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 s,o,n,l,h,c,d,p,u,m,y;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||_(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this.darkMode?this["cScalePeer"+f]=this["cScalePeer"+f]||A(this["cScale"+f],10):this["cScalePeer"+f]=this["cScalePeer"+f]||F(this["cScale"+f],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(5+f*3)}),this["surfacePeer"+f]=this["surfacePeer"+f]||x(this.mainBkg,{h:180,s:-15,l:a*(8+f*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((y=this.xyChart)==null?void 0:y.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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(jr,"Theme"),jr),xy=g(e=>{const t=new Cy;return t.calculate(e),t},"getThemeVariables"),Gr,by=(Gr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=et(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(_("#323D47"),10),this.border1="#ccc",this.border2=Ge(255,255,255,.25),this.arrowheadColor=_(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,s,o,n,l,h,c,d,p;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||et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?F(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||F(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(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||A(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||_(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||A(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||F(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=F(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||be(this.quadrant1Fill)?A(this.quadrant1Fill):F(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:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.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||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?F(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=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.git0=F(this.git0,25),this.git1=F(this.git1,25),this.git2=F(this.git2,25),this.git3=F(this.git3,25),this.git4=F(this.git4,25),this.git5=F(this.git5,25),this.git6=F(this.git6,25),this.git7=F(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}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]})}},g(Gr,"Theme"),Gr),ky=g(e=>{const t=new by;return t.calculate(e),t},"getThemeVariables"),Pe={base:{getThemeVariables:ey},dark:{getThemeVariables:iy},default:{getThemeVariables:sy},forest:{getThemeVariables:ny},neutral:{getThemeVariables:hy},neo:{getThemeVariables:uy},"neo-dark":{getThemeVariables:py},redux:{getThemeVariables:fy},"redux-dark":{getThemeVariables:yy},"redux-color":{getThemeVariables:xy},"redux-dark-color":{getThemeVariables:ky}},ae={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},cc={...ae,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Pe.default.getThemeVariables(),sequence:{...ae.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ae.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ae.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ae.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ae.pie,useWidth:984},xyChart:{...ae.xyChart,useWidth:void 0},requirement:{...ae.requirement,useWidth:void 0},packet:{...ae.packet},treeView:{...ae.treeView,useWidth:void 0},radar:{...ae.radar},ishikawa:{...ae.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ae.venn}},uc=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...uc(e[i],"")]:[...r,t+i],[]),"keyify"),Ty=new Set(uc(cc,"")),dc=cc,Fa=g(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Fa(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ty.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){I.debug("sanitizing object",t),Fa(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Sy(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]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Sy=g(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"),Zr=Object.freeze(dc),ze=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),te=Mt({},Zr),Aa,ur=[],Ii=Mt({},Zr),ns=g((e,t)=>{let r=Mt({},e),i={};for(const a of t)fc(a),i=Mt(i,a);if(r=Mt(r,i),i.theme&&i.theme in Pe){const a=Mt({},Aa),s=Mt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Pe&&(r.themeVariables=Pe[r.theme].getThemeVariables(s))}return Ii=r,yc(Ii),Ii},"updateCurrentConfig"),wy=g(e=>(te=Mt({},Zr),te=Mt(te,e),e.theme&&Pe[e.theme]&&(te.themeVariables=Pe[e.theme].getThemeVariables(e.themeVariables)),ns(te,ur),te),"setSiteConfig"),vy=g(e=>{Aa=Mt({},e)},"saveConfigFromInitialize"),By=g(e=>(te=Mt(te,e),ns(te,ur),te),"updateSiteConfig"),pc=g(()=>Mt({},te),"getSiteConfig"),gc=g(e=>(yc(e),Mt(Ii,e),bt()),"setConfig"),bt=g(()=>Mt({},Ii),"getConfig"),fc=g(e=>{e&&(["secure",...te.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&fc(e[t])}))},"sanitize"),_y=g(e=>{var t;Fa(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ur.push(e),ns(te,ur)},"addDirective"),Ea=g((e=te)=>{ur=[],ns(e,ur)},"reset"),Ly={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."},wl={},mc=g(e=>{wl[e]||(I.warn(Ly[e]),wl[e]=!0)},"issueWarning"),yc=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&mc("LAZY_LOAD_DEPRECATED")},"checkConfig"),DL=g(()=>{let e={};Aa&&(e=Mt(e,Aa));for(const t of ur)e=Mt(e,t);return e},"getUserDefinedConfig"),Zt=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&mc("FLOWCHART_HTML_LABELS_DEPRECATED"),ze(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ji=/<br\s*\/?>/gi,Fy=g(e=>e?bc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ay=(()=>{let e=!1;return()=>{e||(Cc(),e=!0)}})();function Cc(){const e="data-temp-href-target";hr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),hr.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"))})}g(Cc,"setupDompurifyHooks");var xc=g(e=>(Ay(),hr.sanitize(e)),"removeScript"),vl=g((e,t)=>{if(Zt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=xc(e):r!=="loose"&&(e=bc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Oy(e))}return e},"sanitizeMore"),xe=g((e,t)=>e&&(t.dompurifyConfig?e=hr.sanitize(vl(e,t),t.dompurifyConfig).toString():e=hr.sanitize(vl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Ey=g((e,t)=>typeof e=="string"?xe(e,t):e.flat().map(r=>xe(r,t)),"sanitizeTextOrArray"),My=g(e=>ji.test(e),"hasBreaks"),Iy=g(e=>e.split(ji),"splitBreaks"),Oy=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),bc=g(e=>e.replace(ji,"#br#"),"breakToPlaceholder"),$y=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Dy=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Py=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Bl=g(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 s=t[i-1],o=t[i+1];Ry(s,o)&&(a=s+","+o,i++,r.pop())}r.push(qy(a))}return r.join("")},"parseGenericTypes"),oo=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Ry=g((e,t)=>{const r=oo(e,"~"),i=oo(t,"~");return r===1&&i===1},"shouldCombineSets"),qy=g(e=>{const t=oo(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("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),_l=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),no=/\$\$(.*)\$\$/g,Di=g(e=>{var t;return(((t=e.match(no))==null?void 0:t.length)??0)>0},"hasKatex"),PL=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await kc(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"),Ny=g(async(e,t)=>{if(!Di(e))return e;if(!(_l()||t.legacyMathML||t.forceLegacyMathML))return e.replace(no,"MathML is unsupported in this environment.");{const{default:r}=await ut(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!_l()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ji).map(a=>Di(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(no,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),kc=g(async(e,t)=>xe(await Ny(e,t),t),"renderKatexSanitized"),Gi={getRows:Fy,sanitizeText:xe,sanitizeTextOrArray:Ey,hasBreaks:My,splitBreaks:Iy,lineBreakRegex:ji,removeScript:xc,getUrl:$y,evaluate:ze,getMax:Dy,getMin:Py},zy=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Wy=g(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"),Tc=g(function(e,t,r,i){const a=Wy(t,r,i);zy(e,a)},"configureSvgSize"),Hy=g(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;I.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;I.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,I.info(`Calculated bounds: ${n}x${l}`),Tc(t,l,n,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ba={},Yy=g((e,t,r,i)=>{let a="";return e in ba&&ba[e]?a=ba[e]({...r,svgId:i}):I.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"),Uy=g((e,t)=>{t!==void 0&&(ba[e]=t)},"addStylesForDiagram"),jy=Yy,Sc={};bm(Sc,{clear:()=>Gy,getAccDescription:()=>Ky,getAccTitle:()=>Xy,getDiagramTitle:()=>Jy,setAccDescription:()=>Zy,setAccTitle:()=>Vy,setDiagramTitle:()=>Qy});var tn="",en="",rn="",an=g(e=>xe(e,bt()),"sanitizeText"),Gy=g(()=>{tn="",rn="",en=""},"clear"),Vy=g(e=>{tn=an(e).replace(/^\s+/g,"")},"setAccTitle"),Xy=g(()=>tn,"getAccTitle"),Zy=g(e=>{rn=an(e).replace(/\n\s+/g,`
|
|
123
|
-
`)},"setAccDescription"),Ky=g(()=>rn,"getAccDescription"),Qy=g(e=>{en=an(e)},"setDiagramTitle"),Jy=g(()=>en,"getDiagramTitle"),Ll=I,tC=Ko,dt=bt,RL=gc,qL=Zr,sn=g(e=>xe(e,dt()),"sanitizeText"),eC=Hy,rC=g(()=>Sc,"getCommonDb"),Ma={},Ia=g((e,t,r)=>{var i;Ma[e]&&Ll.warn(`Diagram with id ${e} already registered. Overwriting.`),Ma[e]=t,r&&hc(e,r),Uy(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ll,tC,dt,sn,eC,rC(),()=>{})},"registerDiagram"),lo=g(e=>{if(e in Ma)return Ma[e];throw new iC(e)},"getDiagram"),Vr,iC=(Vr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Vr,"DiagramNotFoundError"),Vr);function aC(e){return e}var ka=1,Ws=2,ho=3,ha=4,Fl=1e-6;function sC(e){return"translate("+e+",0)"}function oC(e){return"translate(0,"+e+")"}function nC(e){return t=>+e(t)}function lC(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function hC(){return!this.__axis}function wc(e,t){var r=[],i=null,a=null,s=6,o=6,n=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===ka||e===ha?-1:1,c=e===ha||e===Ws?"x":"y",d=e===ka||e===ho?sC:oC;function p(u){var m=i??(t.ticks?t.ticks.apply(t,r):t.domain()),y=a??(t.tickFormat?t.tickFormat.apply(t,r):aC),f=Math.max(s,0)+n,C=t.range(),b=+C[0]+l,k=+C[C.length-1]+l,S=(t.bandwidth?lC:nC)(t.copy(),l),w=u.selection?u.selection():u,B=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,t).order(),L=T.exit(),P=T.enter().append("g").attr("class","tick"),M=T.select("line"),E=T.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(P),M=M.merge(P.append("line").attr("stroke","currentColor").attr(c+"2",h*s)),E=E.merge(P.append("text").attr("fill","currentColor").attr(c,h*f).attr("dy",e===ka?"0em":e===ho?"0.71em":"0.32em")),u!==w&&(B=B.transition(u),T=T.transition(u),M=M.transition(u),E=E.transition(u),L=L.transition(u).attr("opacity",Fl).attr("transform",function(z){return isFinite(z=S(z))?d(z+l):this.getAttribute("transform")}),P.attr("opacity",Fl).attr("transform",function(z){var D=this.parentNode.__axis;return d((D&&isFinite(D=D(z))?D:S(z))+l)})),L.remove(),B.attr("d",e===ha||e===Ws?o?"M"+h*o+","+b+"H"+l+"V"+k+"H"+h*o:"M"+l+","+b+"V"+k:o?"M"+b+","+h*o+"V"+l+"H"+k+"V"+h*o:"M"+b+","+l+"H"+k),T.attr("opacity",1).attr("transform",function(z){return d(S(z)+l)}),M.attr(c+"2",h*s),E.attr(c,h*f).text(y),w.filter(hC).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ws?"start":e===ha?"end":"middle"),w.each(function(){this.__axis=S})}return p.scale=function(u){return arguments.length?(t=u,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(u){return arguments.length?(r=u==null?[]:Array.from(u),p):r.slice()},p.tickValues=function(u){return arguments.length?(i=u==null?null:Array.from(u),p):i&&i.slice()},p.tickFormat=function(u){return arguments.length?(a=u,p):a},p.tickSize=function(u){return arguments.length?(s=o=+u,p):s},p.tickSizeInner=function(u){return arguments.length?(s=+u,p):s},p.tickSizeOuter=function(u){return arguments.length?(o=+u,p):o},p.tickPadding=function(u){return arguments.length?(n=+u,p):n},p.offset=function(u){return arguments.length?(l=+u,p):l},p}function NL(e){return wc(ka,e)}function zL(e){return wc(ho,e)}var cC={value:()=>{}};function vc(){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 Ta(r)}function Ta(e){this._=e}function uC(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}})}Ta.prototype=vc.prototype={constructor:Ta,on:function(e,t){var r=this._,i=uC(e+"",r),a,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((a=(e=i[s]).type)&&(a=dC(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(a=(e=i[s]).type)r[a]=Al(r[a],e.name,t);else if(t==null)for(a in r)r[a]=Al(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 Ta(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[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,s=i.length;a<s;++a)i[a].value.apply(t,r)}};function dC(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function Al(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=cC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var co="http://www.w3.org/1999/xhtml";const El={svg:"http://www.w3.org/2000/svg",xhtml:co,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ls(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),El.hasOwnProperty(t)?{space:El[t],local:e}:e}function pC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===co&&t.documentElement.namespaceURI===co?t.createElement(e):t.createElementNS(r,e)}}function gC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bc(e){var t=ls(e);return(t.local?gC:pC)(t)}function fC(){}function on(e){return e==null?fC:function(){return this.querySelector(e)}}function mC(e){typeof e!="function"&&(e=on(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=new Array(o),l,h,c=0;c<o;++c)(l=s[c])&&(h=e.call(l,l.__data__,c,s))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new ne(i,this._parents)}function yC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function CC(){return[]}function _c(e){return e==null?CC:function(){return this.querySelectorAll(e)}}function xC(e){return function(){return yC(e.apply(this,arguments))}}function bC(e){typeof e=="function"?e=xC(e):e=_c(e);for(var t=this._groups,r=t.length,i=[],a=[],s=0;s<r;++s)for(var o=t[s],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),a.push(l));return new ne(i,a)}function Lc(e){return function(){return this.matches(e)}}function Fc(e){return function(t){return t.matches(e)}}var kC=Array.prototype.find;function TC(e){return function(){return kC.call(this.children,e)}}function SC(){return this.firstElementChild}function wC(e){return this.select(e==null?SC:TC(typeof e=="function"?e:Fc(e)))}var vC=Array.prototype.filter;function BC(){return Array.from(this.children)}function _C(e){return function(){return vC.call(this.children,e)}}function LC(e){return this.selectAll(e==null?BC:_C(typeof e=="function"?e:Fc(e)))}function FC(e){typeof e!="function"&&(e=Lc(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,h=0;h<o;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&n.push(l);return new ne(i,this._parents)}function Ac(e){return new Array(e.length)}function AC(){return new ne(this._enter||this._groups.map(Ac),this._parents)}function Oa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Oa.prototype={constructor:Oa,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 EC(e){return function(){return e}}function MC(e,t,r,i,a,s){for(var o=0,n,l=t.length,h=s.length;o<h;++o)(n=t[o])?(n.__data__=s[o],i[o]=n):r[o]=new Oa(e,s[o]);for(;o<l;++o)(n=t[o])&&(a[o]=n)}function IC(e,t,r,i,a,s,o){var n,l,h=new Map,c=t.length,d=s.length,p=new Array(c),u;for(n=0;n<c;++n)(l=t[n])&&(p[n]=u=o.call(l,l.__data__,n,t)+"",h.has(u)?a[n]=l:h.set(u,l));for(n=0;n<d;++n)u=o.call(e,s[n],n,s)+"",(l=h.get(u))?(i[n]=l,l.__data__=s[n],h.delete(u)):r[n]=new Oa(e,s[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(a[n]=l)}function OC(e){return e.__data__}function $C(e,t){if(!arguments.length)return Array.from(this,OC);var r=t?IC:MC,i=this._parents,a=this._groups;typeof e!="function"&&(e=EC(e));for(var s=a.length,o=new Array(s),n=new Array(s),l=new Array(s),h=0;h<s;++h){var c=i[h],d=a[h],p=d.length,u=DC(e.call(c,c&&c.__data__,h,i)),m=u.length,y=n[h]=new Array(m),f=o[h]=new Array(m),C=l[h]=new Array(p);r(c,d,y,f,C,u,t);for(var b=0,k=0,S,w;b<m;++b)if(S=y[b]){for(b>=k&&(k=b+1);!(w=f[k])&&++k<m;);S._next=w||null}}return o=new ne(o,i),o._enter=n,o._exit=l,o}function DC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PC(){return new ne(this._exit||this._groups.map(Ac),this._parents)}function RC(e,t,r){var i=this.enter(),a=this,s=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?s.remove():r(s),i&&a?i.merge(a).order():a}function qC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,s=i.length,o=Math.min(a,s),n=new Array(a),l=0;l<o;++l)for(var h=r[l],c=i[l],d=h.length,p=n[l]=new Array(d),u,m=0;m<d;++m)(u=h[m]||c[m])&&(p[m]=u);for(;l<a;++l)n[l]=r[l];return new ne(n,this._parents)}function NC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,s=i[a],o;--a>=0;)(o=i[a])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function zC(e){e||(e=WC);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var o=r[s],n=o.length,l=a[s]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new ne(a,this._parents).order()}function WC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function HC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function YC(){return Array.from(this)}function UC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length;a<s;++a){var o=i[a];if(o)return o}return null}function jC(){let e=0;for(const t of this)++e;return e}function GC(){return!this.node()}function VC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],s=0,o=a.length,n;s<o;++s)(n=a[s])&&e.call(n,n.__data__,s,a);return this}function XC(e){return function(){this.removeAttribute(e)}}function ZC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function KC(e,t){return function(){this.setAttribute(e,t)}}function QC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function JC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function t0(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function e0(e,t){var r=ls(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?ZC:XC:typeof t=="function"?r.local?t0:JC:r.local?QC:KC)(r,t))}function Ec(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function r0(e){return function(){this.style.removeProperty(e)}}function i0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function a0(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function s0(e,t,r){return arguments.length>1?this.each((t==null?r0:typeof t=="function"?a0:i0)(e,t,r??"")):Kr(this.node(),e)}function Kr(e,t){return e.style.getPropertyValue(t)||Ec(e).getComputedStyle(e,null).getPropertyValue(t)}function o0(e){return function(){delete this[e]}}function n0(e,t){return function(){this[e]=t}}function l0(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function h0(e,t){return arguments.length>1?this.each((t==null?o0:typeof t=="function"?l0:n0)(e,t)):this.node()[e]}function Mc(e){return e.trim().split(/^|\s+/)}function nn(e){return e.classList||new Ic(e)}function Ic(e){this._node=e,this._names=Mc(e.getAttribute("class")||"")}Ic.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 Oc(e,t){for(var r=nn(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function $c(e,t){for(var r=nn(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function c0(e){return function(){Oc(this,e)}}function u0(e){return function(){$c(this,e)}}function d0(e,t){return function(){(t.apply(this,arguments)?Oc:$c)(this,e)}}function p0(e,t){var r=Mc(e+"");if(arguments.length<2){for(var i=nn(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?d0:t?c0:u0)(r,t))}function g0(){this.textContent=""}function f0(e){return function(){this.textContent=e}}function m0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function y0(e){return arguments.length?this.each(e==null?g0:(typeof e=="function"?m0:f0)(e)):this.node().textContent}function C0(){this.innerHTML=""}function x0(e){return function(){this.innerHTML=e}}function b0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function k0(e){return arguments.length?this.each(e==null?C0:(typeof e=="function"?b0:x0)(e)):this.node().innerHTML}function T0(){this.nextSibling&&this.parentNode.appendChild(this)}function S0(){return this.each(T0)}function w0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function v0(){return this.each(w0)}function B0(e){var t=typeof e=="function"?e:Bc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _0(){return null}function L0(e,t){var r=typeof e=="function"?e:Bc(e),i=t==null?_0:typeof t=="function"?t:on(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function F0(){var e=this.parentNode;e&&e.removeChild(this)}function A0(){return this.each(F0)}function E0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function M0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I0(e){return this.select(e?M0:E0)}function O0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $0(e){return function(t){e.call(this,t,this.__data__)}}function D0(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 P0(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,s;r<a;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function R0(e,t,r){return function(){var i=this.__on,a,s=$0(t);if(i){for(var o=0,n=i.length;o<n;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=t;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(a):this.__on=[a]}}function q0(e,t,r){var i=D0(e+""),a,s=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(a=0,c=n[l];a<s;++a)if((o=i[a]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?R0:P0,a=0;a<s;++a)this.each(n(i[a],t,r));return this}function Dc(e,t,r){var i=Ec(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 N0(e,t){return function(){return Dc(this,e,t)}}function z0(e,t){return function(){return Dc(this,e,t.apply(this,arguments))}}function W0(e,t){return this.each((typeof t=="function"?z0:N0)(e,t))}function*H0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length,o;a<s;++a)(o=i[a])&&(yield o)}var Pc=[null];function ne(e,t){this._groups=e,this._parents=t}function Vi(){return new ne([[document.documentElement]],Pc)}function Y0(){return this}ne.prototype=Vi.prototype={constructor:ne,select:mC,selectAll:bC,selectChild:wC,selectChildren:LC,filter:FC,data:$C,enter:AC,exit:PC,join:RC,merge:qC,selection:Y0,order:NC,sort:zC,call:HC,nodes:YC,node:UC,size:jC,empty:GC,each:VC,attr:e0,style:s0,property:h0,classed:p0,text:y0,html:k0,raise:S0,lower:v0,append:B0,insert:L0,remove:A0,clone:I0,datum:O0,on:q0,dispatch:W0,[Symbol.iterator]:H0};function st(e){return typeof e=="string"?new ne([[document.querySelector(e)]],[document.documentElement]):new ne([[e]],Pc)}var Qr=0,wi=0,di=0,Rc=1e3,$a,vi,Da=0,dr=0,hs=0,Pi=typeof performance=="object"&&performance.now?performance:Date,qc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ln(){return dr||(qc(U0),dr=Pi.now()+hs)}function U0(){dr=0}function Pa(){this._call=this._time=this._next=null}Pa.prototype=Nc.prototype={constructor:Pa,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ln():+r)+(t==null?0:+t),!this._next&&vi!==this&&(vi?vi._next=this:$a=this,vi=this),this._call=e,this._time=r,uo()},stop:function(){this._call&&(this._call=null,this._time=1/0,uo())}};function Nc(e,t,r){var i=new Pa;return i.restart(e,t,r),i}function j0(){ln(),++Qr;for(var e=$a,t;e;)(t=dr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qr}function Ml(){dr=(Da=Pi.now())+hs,Qr=wi=0;try{j0()}finally{Qr=0,V0(),dr=0}}function G0(){var e=Pi.now(),t=e-Da;t>Rc&&(hs-=t,Da=e)}function V0(){for(var e,t=$a,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:$a=r);vi=e,uo(i)}function uo(e){if(!Qr){wi&&(wi=clearTimeout(wi));var t=e-dr;t>24?(e<1/0&&(wi=setTimeout(Ml,e-Pi.now()-hs)),di&&(di=clearInterval(di))):(di||(Da=Pi.now(),di=setInterval(G0,Rc)),Qr=1,qc(Ml))}}function Il(e,t,r){var i=new Pa;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var X0=vc("start","end","cancel","interrupt"),Z0=[],zc=0,Ol=1,po=2,Sa=3,$l=4,go=5,wa=6;function cs(e,t,r,i,a,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;K0(e,r,{name:t,index:i,group:a,on:X0,tween:Z0,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:zc})}function hn(e,t){var r=ke(e,t);if(r.state>zc)throw new Error("too late; already scheduled");return r}function Ae(e,t){var r=ke(e,t);if(r.state>Sa)throw new Error("too late; already running");return r}function ke(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function K0(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Nc(s,0,r.time);function s(h){r.state=Ol,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,d,p,u;if(r.state!==Ol)return l();for(c in i)if(u=i[c],u.name===r.name){if(u.state===Sa)return Il(o);u.state===$l?(u.state=wa,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<t&&(u.state=wa,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(Il(function(){r.state===Sa&&(r.state=$l,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=po,r.on.call("start",e,e.__data__,r.index,r.group),r.state===po){for(r.state=Sa,a=new Array(p=r.tween.length),c=0,d=-1;c<p;++c)(u=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(a[++d]=u);a.length=d+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=go,1),d=-1,p=a.length;++d<p;)a[d].call(e,c);r.state===go&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=wa,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Q0(e,t){var r=e.__transition,i,a,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){s=!1;continue}a=i.state>po&&i.state<go,i.state=wa,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}s&&delete e.__transition}}function J0(e){return this.each(function(){Q0(this,e)})}function tx(e,t){var r,i;return function(){var a=Ae(this,e),s=a.tween;if(s!==r){i=r=s;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function ex(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=Ae(this,e),o=s.tween;if(o!==i){a=(i=o).slice();for(var n={name:t,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===t){a[l]=n;break}l===h&&a.push(n)}s.tween=a}}function rx(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ke(this.node(),r).tween,a=0,s=i.length,o;a<s;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?tx:ex)(r,e,t))}function cn(e,t,r){var i=e._id;return e.each(function(){var a=Ae(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return ke(a,i).value[t]}}function Wc(e,t){var r;return(typeof t=="number"?nm:t instanceof cl?ul:(r=cl(t))?(t=r,ul):lm)(e,t)}function ix(e){return function(){this.removeAttribute(e)}}function ax(e){return function(){this.removeAttributeNS(e.space,e.local)}}function sx(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttribute(e);return o===a?null:o===i?s:s=t(i=o,r)}}function ox(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?s:s=t(i=o,r)}}function nx(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function lx(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function hx(e,t){var r=ls(e),i=r==="transform"?hm:Wc;return this.attrTween(e,typeof t=="function"?(r.local?lx:nx)(r,i,cn(this,"attr."+e,t)):t==null?(r.local?ax:ix)(r):(r.local?ox:sx)(r,i,t))}function cx(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function ux(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function dx(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&ux(e,s)),r}return a._value=t,a}function px(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&cx(e,s)),r}return a._value=t,a}function gx(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=ls(e);return this.tween(r,(i.local?dx:px)(i,t))}function fx(e,t){return function(){hn(this,e).delay=+t.apply(this,arguments)}}function mx(e,t){return t=+t,function(){hn(this,e).delay=t}}function yx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fx:mx)(t,e)):ke(this.node(),t).delay}function Cx(e,t){return function(){Ae(this,e).duration=+t.apply(this,arguments)}}function xx(e,t){return t=+t,function(){Ae(this,e).duration=t}}function bx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cx:xx)(t,e)):ke(this.node(),t).duration}function kx(e,t){if(typeof t!="function")throw new Error;return function(){Ae(this,e).ease=t}}function Tx(e){var t=this._id;return arguments.length?this.each(kx(t,e)):ke(this.node(),t).ease}function Sx(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ae(this,e).ease=r}}function wx(e){if(typeof e!="function")throw new Error;return this.each(Sx(this._id,e))}function vx(e){typeof e!="function"&&(e=Lc(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,h=0;h<o;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&n.push(l);return new qe(i,this._parents,this._name,this._id)}function Bx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,s=Math.min(i,a),o=new Array(i),n=0;n<s;++n)for(var l=t[n],h=r[n],c=l.length,d=o[n]=new Array(c),p,u=0;u<c;++u)(p=l[u]||h[u])&&(d[u]=p);for(;n<i;++n)o[n]=t[n];return new qe(o,this._parents,this._name,this._id)}function _x(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 Lx(e,t,r){var i,a,s=_x(t)?hn:Ae;return function(){var o=s(this,e),n=o.on;n!==i&&(a=(i=n).copy()).on(t,r),o.on=a}}function Fx(e,t){var r=this._id;return arguments.length<2?ke(this.node(),r).on.on(e):this.each(Lx(r,e,t))}function Ax(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ex(){return this.on("end.remove",Ax(this._id))}function Mx(e){var t=this._name,r=this._id;typeof e!="function"&&(e=on(e));for(var i=this._groups,a=i.length,s=new Array(a),o=0;o<a;++o)for(var n=i[o],l=n.length,h=s[o]=new Array(l),c,d,p=0;p<l;++p)(c=n[p])&&(d=e.call(c,c.__data__,p,n))&&("__data__"in c&&(d.__data__=c.__data__),h[p]=d,cs(h[p],t,r,p,h,ke(c,r)));return new qe(s,this._parents,t,r)}function Ix(e){var t=this._name,r=this._id;typeof e!="function"&&(e=_c(e));for(var i=this._groups,a=i.length,s=[],o=[],n=0;n<a;++n)for(var l=i[n],h=l.length,c,d=0;d<h;++d)if(c=l[d]){for(var p=e.call(c,c.__data__,d,l),u,m=ke(c,r),y=0,f=p.length;y<f;++y)(u=p[y])&&cs(u,t,r,y,p,m);s.push(p),o.push(c)}return new qe(s,o,t,r)}var Ox=Vi.prototype.constructor;function $x(){return new Ox(this._groups,this._parents)}function Dx(e,t){var r,i,a;return function(){var s=Kr(this,e),o=(this.style.removeProperty(e),Kr(this,e));return s===o?null:s===r&&o===i?a:a=t(r=s,i=o)}}function Hc(e){return function(){this.style.removeProperty(e)}}function Px(e,t,r){var i,a=r+"",s;return function(){var o=Kr(this,e);return o===a?null:o===i?s:s=t(i=o,r)}}function Rx(e,t,r){var i,a,s;return function(){var o=Kr(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Kr(this,e))),o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n))}}function qx(e,t){var r,i,a,s="style."+t,o="end."+s,n;return function(){var l=Ae(this,e),h=l.on,c=l.value[s]==null?n||(n=Hc(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(o,a=c),l.on=i}}function Nx(e,t,r){var i=(e+="")=="transform"?cm:Wc;return t==null?this.styleTween(e,Dx(e,i)).on("end.style."+e,Hc(e)):typeof t=="function"?this.styleTween(e,Rx(e,i,cn(this,"style."+e,t))).each(qx(this._id,e)):this.styleTween(e,Px(e,i,t),r).on("end.style."+e,null)}function zx(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Wx(e,t,r){var i,a;function s(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&zx(e,o,r)),i}return s._value=t,s}function Hx(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Wx(e,t,r??""))}function Yx(e){return function(){this.textContent=e}}function Ux(e){return function(){var t=e(this);this.textContent=t??""}}function jx(e){return this.tween("text",typeof e=="function"?Ux(cn(this,"text",e)):Yx(e==null?"":e+""))}function Gx(e){return function(t){this.textContent=e.call(this,t)}}function Vx(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&Gx(a)),t}return i._value=e,i}function Xx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Vx(e))}function Zx(){for(var e=this._name,t=this._id,r=Yc(),i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=ke(l,t);cs(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new qe(i,this._parents,e,r)}function Kx(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(s,o){var n={value:o},l={value:function(){--a===0&&s()}};r.each(function(){var h=Ae(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),a===0&&s()})}var Qx=0;function qe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Yc(){return++Qx}var Oe=Vi.prototype;qe.prototype={constructor:qe,select:Mx,selectAll:Ix,selectChild:Oe.selectChild,selectChildren:Oe.selectChildren,filter:vx,merge:Bx,selection:$x,transition:Zx,call:Oe.call,nodes:Oe.nodes,node:Oe.node,size:Oe.size,empty:Oe.empty,each:Oe.each,on:Fx,attr:hx,attrTween:gx,style:Nx,styleTween:Hx,text:jx,textTween:Xx,remove:Ex,tween:rx,delay:yx,duration:bx,ease:Tx,easeVarying:wx,end:Kx,[Symbol.iterator]:Oe[Symbol.iterator]};function Jx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var tb={time:null,delay:0,duration:250,ease:Jx};function eb(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function rb(e){var t,r;e instanceof qe?(t=e._id,e=e._name):(t=Yc(),(r=tb).time=ln(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,h=0;h<n;++h)(l=o[h])&&cs(l,e,t,h,o,r||eb(l,t));return new qe(i,this._parents,e,t)}Vi.prototype.interrupt=J0;Vi.prototype.transition=rb;function ib(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function ab(){return this.eachAfter(ib)}function sb(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function ob(e,t){for(var r=this,i=[r],a,s,o=-1;r=i.pop();)if(e.call(t,r,++o,this),a=r.children)for(s=a.length-1;s>=0;--s)i.push(a[s]);return this}function nb(e,t){for(var r=this,i=[r],a=[],s,o,n,l=-1;r=i.pop();)if(a.push(r),s=r.children)for(o=0,n=s.length;o<n;++o)i.push(s[o]);for(;r=a.pop();)e.call(t,r,++l,this);return this}function lb(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function hb(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 cb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ub(e){for(var t=this,r=db(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 db(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 pb(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function gb(){return Array.from(this)}function fb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function mb(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*yb(){var e=this,t,r=[e],i,a,s;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(a=0,s=i.length;a<s;++a)r.push(i[a]);while(r.length)}function Uc(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=bb)):t===void 0&&(t=xb);for(var r=new Ra(e),i,a=[r],s,o,n,l;i=a.pop();)if((o=t(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,n=l-1;n>=0;--n)a.push(s=o[n]=new Ra(o[n])),s.parent=i,s.depth=i.depth+1;return r.eachBefore(Tb)}function Cb(){return Uc(this).eachBefore(kb)}function xb(e){return e.children}function bb(e){return Array.isArray(e)?e[1]:null}function kb(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Tb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ra(e){this.data=e,this.depth=this.height=0,this.parent=null}Ra.prototype=Uc.prototype={constructor:Ra,count:ab,each:sb,eachAfter:nb,eachBefore:ob,find:lb,sum:hb,sort:cb,path:ub,ancestors:pb,descendants:gb,leaves:fb,links:mb,copy:Cb,[Symbol.iterator]:yb};function Sb(e){if(typeof e!="function")throw new Error;return e}function pi(){return 0}function gi(e){return function(){return e}}function wb(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 vb(e,t,r,i,a){for(var s=e.children,o,n=-1,l=s.length,h=e.value&&(i-t)/e.value;++n<l;)o=s[n],o.y0=r,o.y1=a,o.x0=t,o.x1=t+=o.value*h}function Bb(e,t,r,i,a){for(var s=e.children,o,n=-1,l=s.length,h=e.value&&(a-r)/e.value;++n<l;)o=s[n],o.x0=t,o.x1=i,o.y0=r,o.y1=r+=o.value*h}var _b=(1+Math.sqrt(5))/2;function Lb(e,t,r,i,a,s){for(var o=[],n=t.children,l,h,c=0,d=0,p=n.length,u,m,y=t.value,f,C,b,k,S,w,B;c<p;){u=a-r,m=s-i;do f=n[d++].value;while(!f&&d<p);for(C=b=f,w=Math.max(m/u,u/m)/(y*e),B=f*f*w,S=Math.max(b/B,B/C);d<p;++d){if(f+=h=n[d].value,h<C&&(C=h),h>b&&(b=h),B=f*f*w,k=Math.max(b/B,B/C),k>S){f-=h;break}S=k}o.push(l={value:f,dice:u<m,children:n.slice(c,d)}),l.dice?vb(l,r,i,a,y?i+=m*f/y:s):Bb(l,r,i,y?r+=u*f/y:a,s),y-=f,c=d}return o}const Fb=function e(t){function r(i,a,s,o,n){Lb(t,i,a,s,o,n)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r}(_b);function WL(){var e=Fb,t=!1,r=1,i=1,a=[0],s=pi,o=pi,n=pi,l=pi,h=pi;function c(p){return p.x0=p.y0=0,p.x1=r,p.y1=i,p.eachBefore(d),a=[0],t&&p.eachBefore(wb),p}function d(p){var u=a[p.depth],m=p.x0+u,y=p.y0+u,f=p.x1-u,C=p.y1-u;f<m&&(m=f=(m+f)/2),C<y&&(y=C=(y+C)/2),p.x0=m,p.y0=y,p.x1=f,p.y1=C,p.children&&(u=a[p.depth+1]=s(p)/2,m+=h(p)-u,y+=o(p)-u,f-=n(p)-u,C-=l(p)-u,f<m&&(m=f=(m+f)/2),C<y&&(y=C=(y+C)/2),e(p,m,y,f,C))}return c.round=function(p){return arguments.length?(t=!!p,c):t},c.size=function(p){return arguments.length?(r=+p[0],i=+p[1],c):[r,i]},c.tile=function(p){return arguments.length?(e=Sb(p),c):e},c.padding=function(p){return arguments.length?c.paddingInner(p).paddingOuter(p):c.paddingInner()},c.paddingInner=function(p){return arguments.length?(s=typeof p=="function"?p:gi(+p),c):s},c.paddingOuter=function(p){return arguments.length?c.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):c.paddingTop()},c.paddingTop=function(p){return arguments.length?(o=typeof p=="function"?p:gi(+p),c):o},c.paddingRight=function(p){return arguments.length?(n=typeof p=="function"?p:gi(+p),c):n},c.paddingBottom=function(p){return arguments.length?(l=typeof p=="function"?p:gi(+p),c):l},c.paddingLeft=function(p){return arguments.length?(h=typeof p=="function"?p:gi(+p),c):h},c}function Ab(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 HL=Ab("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Bi(e,t,r){this.k=e,this.x=t,this.y=r}Bi.prototype={constructor:Bi,scale:function(e){return e===1?this:new Bi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Bi(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+")"}};Bi.prototype;var Eb=g(e=>{var a;const{securityLevel:t}=dt();let r=st("body");if(t==="sandbox"){const o=((a=st(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=st(o.body)}return r.select(`#${e}`)},"selectSvgElement");function un(e){return typeof e>"u"||e===null}g(un,"isNothing");function jc(e){return typeof e=="object"&&e!==null}g(jc,"isObject");function Gc(e){return Array.isArray(e)?e:un(e)?[]:[e]}g(Gc,"toArray");function Vc(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}g(Vc,"extend");function Xc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Xc,"repeat");function Zc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(Zc,"isNegativeZero");var Mb=un,Ib=jc,Ob=Gc,$b=Xc,Db=Zc,Pb=Vc,It={isNothing:Mb,isObject:Ib,toArray:Ob,repeat:$b,isNegativeZero:Db,extend:Pb};function dn(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}g(dn,"formatError");function Jr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=dn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(Jr,"YAMLException$1");Jr.prototype=Object.create(Error.prototype);Jr.prototype.constructor=Jr;Jr.prototype.toString=g(function(t){return this.name+": "+dn(this,t)},"toString");var ee=Jr;function va(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}g(va,"getLine");function Ba(e,t){return It.repeat(" ",t-e.length)+e}g(Ba,"padStart");function Kc(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=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,d=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=va(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),d),n=It.repeat(" ",t.indent)+Ba((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
126
|
-
`+n;for(h=va(e.buffer,i[o],a[o],e.position,d),n+=It.repeat(" ",t.indent)+Ba((e.line+1).toString(),c)+" | "+h.str+`
|
|
127
|
-
`,n+=It.repeat("-",t.indent+c+3+h.pos)+`^
|
|
128
|
-
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)h=va(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),d),n+=It.repeat(" ",t.indent)+Ba((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
129
|
-
`;return n.replace(/\n$/,"")}g(Kc,"makeSnippet");var Rb=Kc,qb=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Nb=["scalar","sequence","mapping"];function Qc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Qc,"compileStyleAliases");function Jc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(qb.indexOf(r)===-1)throw new ee('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=Qc(t.styleAliases||null),Nb.indexOf(this.kind)===-1)throw new ee('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Jc,"Type$1");var Yt=Jc;function fo(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}g(fo,"compileList");function tu(){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(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(tu,"compileMap");function qa(e){return this.extend(e)}g(qa,"Schema$1");qa.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Yt)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 ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Yt))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Yt))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(qa.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=fo(a,"implicit"),a.compiledExplicit=fo(a,"explicit"),a.compiledTypeMap=tu(a.compiledImplicit,a.compiledExplicit),a},"extend");var zb=qa,Wb=new Yt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),Hb=new Yt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),Yb=new Yt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),Ub=new zb({explicit:[Wb,Hb,Yb]});function eu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(eu,"resolveYamlNull");function ru(){return null}g(ru,"constructYamlNull");function iu(e){return e===null}g(iu,"isNull");var jb=new Yt("tag:yaml.org,2002:null",{kind:"scalar",resolve:eu,construct:ru,predicate:iu,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function au(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")}g(au,"resolveYamlBoolean");function su(e){return e==="true"||e==="True"||e==="TRUE"}g(su,"constructYamlBoolean");function ou(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(ou,"isBoolean");var Gb=new Yt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:au,construct:su,predicate:ou,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function nu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(nu,"isHexCode");function lu(e){return 48<=e&&e<=55}g(lu,"isOctCode");function hu(e){return 48<=e&&e<=57}g(hu,"isDecCode");function cu(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(!nu(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!lu(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!hu(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}g(cu,"resolveYamlInteger");function uu(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)}g(uu,"constructYamlInteger");function du(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!It.isNegativeZero(e)}g(du,"isInteger");var Vb=new Yt("tag:yaml.org,2002:int",{kind:"scalar",resolve:cu,construct:uu,predicate:du,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Xb=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pu(e){return!(e===null||!Xb.test(e)||e[e.length-1]==="_")}g(pu,"resolveYamlFloat");function gu(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)}g(gu,"constructYamlFloat");var Zb=/^[-+]?[0-9]+e/;function fu(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(It.isNegativeZero(e))return"-0.0";return r=e.toString(10),Zb.test(r)?r.replace("e",".e"):r}g(fu,"representYamlFloat");function mu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||It.isNegativeZero(e))}g(mu,"isFloat");var Kb=new Yt("tag:yaml.org,2002:float",{kind:"scalar",resolve:pu,construct:gu,predicate:mu,represent:fu,defaultStyle:"lowercase"}),yu=Ub.extend({implicit:[jb,Gb,Vb,Kb]}),Qb=yu,Cu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),xu=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 bu(e){return e===null?!1:Cu.exec(e)!==null||xu.exec(e)!==null}g(bu,"resolveYamlTimestamp");function ku(e){var t,r,i,a,s,o,n,l=0,h=null,c,d,p;if(t=Cu.exec(e),t===null&&(t=xu.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(s=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,a,s,o,n,l)),h&&p.setTime(p.getTime()-h),p}g(ku,"constructYamlTimestamp");function Tu(e){return e.toISOString()}g(Tu,"representYamlTimestamp");var Jb=new Yt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bu,construct:ku,instanceOf:Date,represent:Tu});function Su(e){return e==="<<"||e===null}g(Su,"resolveYamlMerge");var tk=new Yt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Su}),pn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
130
|
-
\r`;function wu(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=pn;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(wu,"resolveYamlBinary");function vu(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=pn,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}g(vu,"constructYamlBinary");function Bu(e){var t="",r=0,i,a,s=e.length,o=pn;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}g(Bu,"representYamlBinary");function _u(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(_u,"isBinary");var ek=new Yt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wu,construct:vu,predicate:_u,represent:Bu}),rk=Object.prototype.hasOwnProperty,ik=Object.prototype.toString;function Lu(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,ik.call(a)!=="[object Object]")return!1;for(s in a)if(rk.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}g(Lu,"resolveYamlOmap");function Fu(e){return e!==null?e:[]}g(Fu,"constructYamlOmap");var ak=new Yt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Lu,construct:Fu}),sk=Object.prototype.toString;function Au(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],sk.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}g(Au,"resolveYamlPairs");function Eu(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}g(Eu,"constructYamlPairs");var ok=new Yt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Au,construct:Eu}),nk=Object.prototype.hasOwnProperty;function Mu(e){if(e===null)return!0;var t,r=e;for(t in r)if(nk.call(r,t)&&r[t]!==null)return!1;return!0}g(Mu,"resolveYamlSet");function Iu(e){return e!==null?e:{}}g(Iu,"constructYamlSet");var lk=new Yt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Mu,construct:Iu}),Ou=Qb.extend({implicit:[Jb,tk],explicit:[ek,ak,ok,lk]}),Xe=Object.prototype.hasOwnProperty,Na=1,$u=2,Du=3,za=4,Hs=1,hk=2,Dl=3,ck=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uk=/[\x85\u2028\u2029]/,dk=/[,\[\]\{\}]/,Pu=/^(?:!|!!|![a-z\-]+!)$/i,Ru=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function mo(e){return Object.prototype.toString.call(e)}g(mo,"_class");function ye(e){return e===10||e===13}g(ye,"is_EOL");function Ve(e){return e===9||e===32}g(Ve,"is_WHITE_SPACE");function Gt(e){return e===9||e===32||e===10||e===13}g(Gt,"is_WS_OR_EOL");function or(e){return e===44||e===91||e===93||e===123||e===125}g(or,"is_FLOW_INDICATOR");function qu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(qu,"fromHexCode");function Nu(e){return e===120?2:e===117?4:e===85?8:0}g(Nu,"escapedHexLen");function zu(e){return 48<=e&&e<=57?e-48:-1}g(zu,"fromDecimalCode");function yo(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":""}g(yo,"simpleEscapeSequence");function Wu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(Wu,"charFromCodepoint");function gn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(gn,"setProperty");var Hu=new Array(256),Yu=new Array(256);for(er=0;er<256;er++)Hu[er]=yo(er)?1:0,Yu[er]=yo(er);var er;function Uu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ou,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=[]}g(Uu,"State$1");function fn(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=Rb(r),new ee(t,r)}g(fn,"generateError");function X(e,t){throw fn(e,t)}g(X,"throwError");function Ri(e,t){e.onWarning&&e.onWarning.call(null,fn(e,t))}g(Ri,"throwWarning");var Pl={YAML:g(function(t,r,i){var a,s,o;t.version!==null&&X(t,"duplication of %YAML directive"),i.length!==1&&X(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&X(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&X(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Ri(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var a,s;i.length!==2&&X(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Pu.test(a)||X(t,"ill-formed tag handle (first argument) of the TAG directive"),Xe.call(t.tagMap,a)&&X(t,'there is a previously declared suffix for "'+a+'" tag handle'),Ru.test(s)||X(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{X(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Re(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||X(e,"expected valid JSON character");else ck.test(n)&&X(e,"the stream contains non-printable characters");e.result+=n}}g(Re,"captureSegment");function Co(e,t,r,i){var a,s,o,n;for(It.isObject(r)||X(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],Xe.call(t,s)||(gn(t,s,r[s]),i[s]=!0)}g(Co,"mergeMappings");function nr(e,t,r,i,a,s,o,n,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])&&X(e,"nested arrays are not supported inside keys"),typeof a=="object"&&mo(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&mo(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,c=s.length;h<c;h+=1)Co(e,t,s[h],r);else Co(e,t,s,r);else!e.json&&!Xe.call(r,a)&&Xe.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,X(e,"duplicated mapping key")),gn(t,a,s),delete r[a];return t}g(nr,"storeMappingPair");function us(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++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(us,"readLineBreak");function vt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Ve(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(ye(a))for(us(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&&Ri(e,"deficient indentation"),i}g(vt,"skipSeparationSpace");function Xi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Gt(r)))}g(Xi,"testDocumentSeparator");function ds(e,t){t===1?e.result+=" ":t>1&&(e.result+=It.repeat(`
|
|
132
|
-
`,t-1))}g(ds,"writeFoldedLines");function ju(e,t,r){var i,a,s,o,n,l,h,c,d=e.kind,p=e.result,u;if(u=e.input.charCodeAt(e.position),Gt(u)||or(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&or(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;u!==0;){if(u===58){if(a=e.input.charCodeAt(e.position+1),Gt(a)||r&&or(a))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Gt(i))break}else{if(e.position===e.lineStart&&Xi(e)||r&&or(u))break;if(ye(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,vt(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(Re(e,s,o,!1),ds(e,e.line-l),s=o=e.position,n=!1),Ve(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return Re(e,s,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}g(ju,"readPlainScalar");function Gu(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(Re(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 ye(r)?(Re(e,i,a,!0),ds(e,vt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Xi(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}g(Gu,"readSingleQuotedScalar");function Vu(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Re(e,r,e.position,!0),e.position++,!0;if(n===92){if(Re(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ye(n))vt(e,!1,t);else if(n<256&&Hu[n])e.result+=Yu[n],e.position++;else if((o=Nu(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=qu(n))>=0?s=(s<<4)+o:X(e,"expected hexadecimal character");e.result+=Wu(s),e.position++}else X(e,"unknown escape sequence");r=i=e.position}else ye(n)?(Re(e,r,i,!0),ds(e,vt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Xi(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}g(Vu,"readDoubleQuotedScalar");function Xu(e,t){var r=!0,i,a,s,o=e.tag,n,l=e.anchor,h,c,d,p,u,m=Object.create(null),y,f,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,u=!1,n=[];else if(b===123)c=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(vt(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&X(e,"expected the node content, but found ','"):X(e,"missed comma between flow collection entries"),f=y=C=null,d=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Gt(h)&&(d=p=!0,e.position++,vt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,pr(e,t,Na,!1,!0),f=e.tag,y=e.result,vt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),vt(e,!0,t),pr(e,t,Na,!1,!0),C=e.result),u?nr(e,n,m,f,y,C,i,a,s):d?n.push(nr(e,null,m,f,y,C,i,a,s)):n.push(y),vt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}X(e,"unexpected end of the stream within a flow collection")}g(Xu,"readFlowCollection");function Zu(e,t){var r,i,a=Hs,s=!1,o=!1,n=t,l=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Hs===a?a=d===43?Dl:hk:X(e,"repeat of a chomping mode identifier");else if((c=zu(d))>=0)c===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?X(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Ve(d)){do d=e.input.charCodeAt(++e.position);while(Ve(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!ye(d)&&d!==0)}for(;d!==0;){for(us(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),ye(d)){l++;continue}if(e.lineIndent<n){a===Dl?e.result+=It.repeat(`
|
|
133
|
-
`,s?1+l:l):a===Hs&&s&&(e.result+=`
|
|
134
|
-
`);break}for(i?Ve(d)?(h=!0,e.result+=It.repeat(`
|
|
135
|
-
`,s?1+l:l)):h?(h=!1,e.result+=It.repeat(`
|
|
136
|
-
`,l+1)):l===0?s&&(e.result+=" "):e.result+=It.repeat(`
|
|
137
|
-
`,l):e.result+=It.repeat(`
|
|
138
|
-
`,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!ye(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Re(e,r,e.position,!1)}return!0}g(Zu,"readBlockScalar");function xo(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Gt(o))));){if(n=!0,e.position++,vt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,pr(e,t,Du,!1,!0),s.push(e.result),vt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)X(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}g(xo,"readBlockSequence");function Ku(e,t,r){var i,a,s,o,n,l,h=e.tag,c=e.anchor,d={},p=Object.create(null),u=null,m=null,y=null,f=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!f&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Gt(i))b===63?(f&&(nr(e,d,p,u,m,null,o,n,l),u=m=y=null),C=!0,f=!0,a=!0):f?(f=!1,a=!0):X(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!pr(e,r,$u,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Ve(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Gt(b)||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(nr(e,d,p,u,m,null,o,n,l),u=m=y=null),C=!0,f=!1,a=!1,u=e.tag,m=e.result;else if(C)X(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)X(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===s||e.lineIndent>t)&&(f&&(o=e.line,n=e.lineStart,l=e.position),pr(e,t,za,!0,a)&&(f?m=e.result:y=e.result),f||(nr(e,d,p,u,m,y,o,n,l),u=m=y=null),vt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return f&&nr(e,d,p,u,m,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}g(Ku,"readBlockMapping");function Qu(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Gt(o);)o===33&&(i?X(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Pu.test(a)||X(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),dk.test(s)&&X(e,"tag suffix cannot contain flow indicator characters")}s&&!Ru.test(s)&&X(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{X(e,"tag name is malformed: "+s)}return r?e.tag=s:Xe.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:X(e,'undeclared tag handle "'+a+'"'),!0}g(Qu,"readTagProperty");function Ju(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Gt(r)&&!or(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Ju,"readAnchorProperty");function td(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Gt(i)&&!or(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Xe.call(e.anchorMap,r)||X(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],vt(e,!0,-1),!0}g(td,"readAlias");function pr(e,t,r,i,a){var s,o,n,l=1,h=!1,c=!1,d,p,u,m,y,f;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=za===r||Du===r,i&&vt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Qu(e)||Ju(e);)vt(e,!0,-1)?(h=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||a),(l===1||za===r)&&(Na===r||$u===r?y=t:y=t+1,f=e.position-e.lineStart,l===1?n&&(xo(e,f)||Ku(e,f,y))||Xu(e,y)?c=!0:(o&&Zu(e,y)||Gu(e,y)||Vu(e,y)?c=!0:td(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&X(e,"alias node should not have any properties")):ju(e,y,Na===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&xo(e,f))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Xe.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,p=u.length;d<p;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){m=u[d];break}m||X(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(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}g(pr,"composeNode");function ed(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(vt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&X(e,"directive name must not be less than one character in length");o!==0;){for(;Ve(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ye(o));break}if(ye(o))break;for(r=e.position;o!==0&&!Gt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&us(e),Xe.call(Pl,i)?Pl[i](e,i,a):Ri(e,'unknown document directive "'+i+'"')}if(vt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,vt(e,!0,-1)):s&&X(e,"directives end mark is expected"),pr(e,e.lineIndent-1,za,!1,!0),vt(e,!0,-1),e.checkLineBreaks&&uk.test(e.input.slice(t,e.position))&&Ri(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Xi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,vt(e,!0,-1));return}if(e.position<e.length-1)X(e,"end of the stream or a document separator is expected");else return}g(ed,"readDocument");function mn(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 Uu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,X(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;)ed(r);return r.documents}g(mn,"loadDocuments");function pk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=mn(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}g(pk,"loadAll$1");function rd(e,t){var r=mn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ee("expected a single document in the stream, but found more")}}g(rd,"load$1");var gk=rd,fk={load:gk},id=Object.prototype.toString,ad=Object.prototype.hasOwnProperty,yn=65279,mk=9,qi=10,yk=13,Ck=32,xk=33,bk=34,bo=35,kk=37,Tk=38,Sk=39,wk=42,sd=44,vk=45,Wa=58,Bk=61,_k=62,Lk=63,Fk=64,od=91,nd=93,Ak=96,ld=123,Ek=124,hd=125,Ut={};Ut[0]="\\0";Ut[7]="\\a";Ut[8]="\\b";Ut[9]="\\t";Ut[10]="\\n";Ut[11]="\\v";Ut[12]="\\f";Ut[13]="\\r";Ut[27]="\\e";Ut[34]='\\"';Ut[92]="\\\\";Ut[133]="\\N";Ut[160]="\\_";Ut[8232]="\\L";Ut[8233]="\\P";var Mk=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ik=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function cd(e,t){var r,i,a,s,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&ad.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}g(cd,"compileStyleMap");function ud(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 ee("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+It.repeat("0",i-t.length)+t}g(ud,"encodeHex");var Ok=1,Ni=2;function dd(e){this.schema=e.schema||Ou,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=It.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=cd(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==='"'?Ni:Ok,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}g(dd,"State");function ko(e,t){for(var r=It.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
|
|
140
|
-
`,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
|
|
141
|
-
`&&(s+=r),s+=o;return s}g(ko,"indentString");function Ha(e,t){return`
|
|
142
|
-
`+It.repeat(" ",e.indent*t)}g(Ha,"generateNextLine");function pd(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}g(pd,"testImplicitResolving");function zi(e){return e===Ck||e===mk}g(zi,"isWhitespace");function ti(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yn||65536<=e&&e<=1114111}g(ti,"isPrintable");function To(e){return ti(e)&&e!==yn&&e!==yk&&e!==qi}g(To,"isNsCharOrWhitespace");function So(e,t,r){var i=To(e),a=i&&!zi(e);return(r?i:i&&e!==sd&&e!==od&&e!==nd&&e!==ld&&e!==hd)&&e!==bo&&!(t===Wa&&!a)||To(t)&&!zi(t)&&e===bo||t===Wa&&a}g(So,"isPlainSafe");function gd(e){return ti(e)&&e!==yn&&!zi(e)&&e!==vk&&e!==Lk&&e!==Wa&&e!==sd&&e!==od&&e!==nd&&e!==ld&&e!==hd&&e!==bo&&e!==Tk&&e!==wk&&e!==xk&&e!==Ek&&e!==Bk&&e!==_k&&e!==Sk&&e!==bk&&e!==kk&&e!==Fk&&e!==Ak}g(gd,"isPlainSafeFirst");function fd(e){return!zi(e)&&e!==Wa}g(fd,"isPlainSafeLast");function Or(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Or,"codePointAt");function Cn(e){var t=/^\n* /;return t.test(e)}g(Cn,"needIndentIndicator");var md=1,wo=2,yd=3,Cd=4,Er=5;function xd(e,t,r,i,a,s,o,n){var l,h=0,c=null,d=!1,p=!1,u=i!==-1,m=-1,y=gd(Or(e,0))&&fd(Or(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Or(e,l),!ti(h))return Er;y=y&&So(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Or(e,l),h===qi)d=!0,u&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!ti(h))return Er;y=y&&So(h,c,n),c=h}p=p||u&&l-m-1>i&&e[m+1]!==" "}return!d&&!p?y&&!o&&!a(e)?md:s===Ni?Er:wo:r>9&&Cn(e)?Er:o?s===Ni?Er:wo:p?Cd:yd}g(xd,"chooseScalarStyle");function bd(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===Ni?'""':"''";if(!e.noCompatMode&&(Mk.indexOf(t)!==-1||Ik.test(t)))return e.quotingType===Ni?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return pd(e,h)}switch(g(l,"testAmbiguity"),xd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case md:return t;case wo:return"'"+t.replace(/'/g,"''")+"'";case yd:return"|"+vo(t,e.indent)+Bo(ko(t,s));case Cd:return">"+vo(t,e.indent)+Bo(ko(kd(t,o),s));case Er:return'"'+Td(t)+'"';default:throw new ee("impossible error: invalid scalar style")}}()}g(bd,"writeScalar");function vo(e,t){var r=Cn(e)?String(t):"",i=e[e.length-1]===`
|
|
143
|
-
`,a=i&&(e[e.length-2]===`
|
|
144
|
-
`||e===`
|
|
145
|
-
`),s=a?"+":i?"":"-";return r+s+`
|
|
146
|
-
`}g(vo,"blockHeader");function Bo(e){return e[e.length-1]===`
|
|
147
|
-
`?e.slice(0,-1):e}g(Bo,"dropEndingNewline");function kd(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,_o(e.slice(0,h),t)}(),a=e[0]===`
|
|
149
|
-
`||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],l=o[2];s=l[0]===" ",i+=n+(!a&&!s&&l!==""?`
|
|
150
|
-
`:"")+_o(l,t),a=s}return i}g(kd,"foldString");function _o(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,l+=`
|
|
151
|
-
`+e.slice(a,s),a=s+1),o=n;return l+=`
|
|
152
|
-
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
|
|
153
|
-
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}g(_o,"foldLine");function Td(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Or(e,a),i=Ut[r],!i&&ti(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||ud(r);return t}g(Td,"escapeString");function Sd(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(_e(e,t,n,!1,!1)||typeof n>"u"&&_e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}g(Sd,"writeFlowSequence");function Lo(e,t,r,i){var a="",s=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(_e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&_e(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=Ha(e,t)),e.dump&&qi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}g(Lo,"writeBlockSequence");function wd(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,l,h,c;for(o=0,n=s.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),_e(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),_e(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}g(wd,"writeFlowMapping");function vd(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,l,h,c,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||a!=="")&&(p+=Ha(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),_e(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&qi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=Ha(e,t)),_e(e,t+1,c,!0,d)&&(e.dump&&qi===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,a+=p));e.tag=s,e.dump=a||"{}"}g(vd,"writeBlockMapping");function Fo(e,t,r){var i,a,s,o,n,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,id.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(ad.call(n.represent,l))i=n.represent[l](t,l);else throw new ee("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(Fo,"detectType");function _e(e,t,r,i,a,s,o){e.tag=null,e.dump=r,Fo(e,r,!1)||Fo(e,r,!0);var n=id.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",d,p;if(c&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(a=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(vd(e,t,e.dump,a),p&&(e.dump="&ref_"+d+e.dump)):(wd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Lo(e,t-1,e.dump,a):Lo(e,t,e.dump,a),p&&(e.dump="&ref_"+d+e.dump)):(Sd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&bd(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}g(_e,"writeNode");function Bd(e,t){var r=[],i=[],a,s;for(Ya(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}g(Bd,"getDuplicateReferences");function Ya(e,t,r){var i,a,s;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,s=e.length;a<s;a+=1)Ya(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Ya(e[i[a]],t,r)}g(Ya,"inspectNode");function $k(e,t){t=t||{};var r=new dd(t);r.noRefs||Bd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),_e(r,0,i,!0,!0)?r.dump+`
|
|
154
|
-
`:""}g($k,"dump$1");function Dk(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.")}}g(Dk,"renamed");var Pk=yu,Rk=fk.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 fi=g((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"),Ht={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},Rl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function _i(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(_i,"calculateDeltaAndAngle");var xt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),qk=g(e=>({x:g(function(t,r,i){let a=0;const s=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:u,deltaX:m}=_i(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.cos(u)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:u,deltaX:m}=_i(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.cos(u)*(m>=0?1:-1)}const o=Math.abs(xt(t).x-xt(i[i.length-1]).x),n=Math.abs(xt(t).y-xt(i[i.length-1]).y),l=Math.abs(xt(t).x-xt(i[0]).x),h=Math.abs(xt(t).y-xt(i[0]).y),c=Ht[e.arrowTypeStart],d=Ht[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=s==="right"?-1:1,a-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=s==="right"?-1:1,a+=u}return xt(t).x+a},"x"),y:g(function(t,r,i){let a=0;const s=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:u,deltaY:m}=_i(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.abs(Math.sin(u))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:u,deltaY:m}=_i(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(m>=0?1:-1)}const o=Math.abs(xt(t).y-xt(i[i.length-1]).y),n=Math.abs(xt(t).x-xt(i[i.length-1]).x),l=Math.abs(xt(t).y-xt(i[0]).y),h=Math.abs(xt(t).x-xt(i[0]).x),c=Ht[e.arrowTypeStart],d=Ht[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=s==="up"?-1:1,a-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=s==="up"?-1:1,a+=u}return xt(t).y+a},"y")}),"getLineFunctionsWithOffset"),ca={},Et={},ql;function Nk(){return ql||(ql=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.BLANK_URL=Et.relativeFirstCharacters=Et.whitespaceEscapeCharsRegex=Et.urlSchemeRegex=Et.ctrlCharactersRegex=Et.htmlCtrlEntityRegex=Et.htmlEntitiesRegex=Et.invalidProtocolRegex=void 0,Et.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Et.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Et.htmlCtrlEntityRegex=/&(newline|tab);/gi,Et.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Et.urlSchemeRegex=/^.+(:|:)/gim,Et.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Et.relativeFirstCharacters=[".","/"],Et.BLANK_URL="about:blank"),Et}var Nl;function zk(){if(Nl)return ca;Nl=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.sanitizeUrl=s;var e=Nk();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),d=c.match(e.urlSchemeRegex);if(!d)return h;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return u;if(p==="http:"||p==="https:"){if(!i(u))return e.BLANK_URL;var m=new URL(u);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return u}return ca}var Wk=zk(),_d=typeof global=="object"&&global&&global.Object===Object&&global,Hk=typeof self=="object"&&self&&self.Object===Object&&self,Ee=_d||Hk||Function("return this")(),Ua=Ee.Symbol,Ld=Object.prototype,Yk=Ld.hasOwnProperty,Uk=Ld.toString,mi=Ua?Ua.toStringTag:void 0;function jk(e){var t=Yk.call(e,mi),r=e[mi];try{e[mi]=void 0;var i=!0}catch{}var a=Uk.call(e);return i&&(t?e[mi]=r:delete e[mi]),a}var Gk=Object.prototype,Vk=Gk.toString;function Xk(e){return Vk.call(e)}var Zk="[object Null]",Kk="[object Undefined]",zl=Ua?Ua.toStringTag:void 0;function ei(e){return e==null?e===void 0?Kk:Zk:zl&&zl in Object(e)?jk(e):Xk(e)}function Cr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Qk="[object AsyncFunction]",Jk="[object Function]",t1="[object GeneratorFunction]",e1="[object Proxy]";function xn(e){if(!Cr(e))return!1;var t=ei(e);return t==Jk||t==t1||t==Qk||t==e1}var Ys=Ee["__core-js_shared__"],Wl=function(){var e=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function r1(e){return!!Wl&&Wl in e}var i1=Function.prototype,a1=i1.toString;function xr(e){if(e!=null){try{return a1.call(e)}catch{}try{return e+""}catch{}}return""}var s1=/[\\^$.*+?()[\]{}|]/g,o1=/^\[object .+?Constructor\]$/,n1=Function.prototype,l1=Object.prototype,h1=n1.toString,c1=l1.hasOwnProperty,u1=RegExp("^"+h1.call(c1).replace(s1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d1(e){if(!Cr(e)||r1(e))return!1;var t=xn(e)?u1:o1;return t.test(xr(e))}function p1(e,t){return e==null?void 0:e[t]}function br(e,t){var r=p1(e,t);return d1(r)?r:void 0}var Wi=br(Object,"create");function g1(){this.__data__=Wi?Wi(null):{},this.size=0}function f1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var m1="__lodash_hash_undefined__",y1=Object.prototype,C1=y1.hasOwnProperty;function x1(e){var t=this.__data__;if(Wi){var r=t[e];return r===m1?void 0:r}return C1.call(t,e)?t[e]:void 0}var b1=Object.prototype,k1=b1.hasOwnProperty;function T1(e){var t=this.__data__;return Wi?t[e]!==void 0:k1.call(t,e)}var S1="__lodash_hash_undefined__";function w1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wi&&t===void 0?S1:t,this}function gr(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])}}gr.prototype.clear=g1;gr.prototype.delete=f1;gr.prototype.get=x1;gr.prototype.has=T1;gr.prototype.set=w1;function v1(){this.__data__=[],this.size=0}function ps(e,t){return e===t||e!==e&&t!==t}function gs(e,t){for(var r=e.length;r--;)if(ps(e[r][0],t))return r;return-1}var B1=Array.prototype,_1=B1.splice;function L1(e){var t=this.__data__,r=gs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():_1.call(t,r,1),--this.size,!0}function F1(e){var t=this.__data__,r=gs(t,e);return r<0?void 0:t[r][1]}function A1(e){return gs(this.__data__,e)>-1}function E1(e,t){var r=this.__data__,i=gs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function We(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])}}We.prototype.clear=v1;We.prototype.delete=L1;We.prototype.get=F1;We.prototype.has=A1;We.prototype.set=E1;var Hi=br(Ee,"Map");function M1(){this.size=0,this.__data__={hash:new gr,map:new(Hi||We),string:new gr}}function I1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function fs(e,t){var r=e.__data__;return I1(t)?r[typeof t=="string"?"string":"hash"]:r.map}function O1(e){var t=fs(this,e).delete(e);return this.size-=t?1:0,t}function $1(e){return fs(this,e).get(e)}function D1(e){return fs(this,e).has(e)}function P1(e,t){var r=fs(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=M1;Qe.prototype.delete=O1;Qe.prototype.get=$1;Qe.prototype.has=D1;Qe.prototype.set=P1;var R1="Expected a function";function Zi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(R1);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Zi.Cache||Qe),r}Zi.Cache=Qe;function q1(){this.__data__=new We,this.size=0}function N1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function z1(e){return this.__data__.get(e)}function W1(e){return this.__data__.has(e)}var H1=200;function Y1(e,t){var r=this.__data__;if(r instanceof We){var i=r.__data__;if(!Hi||i.length<H1-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qe(i)}return r.set(e,t),this.size=r.size,this}function ri(e){var t=this.__data__=new We(e);this.size=t.size}ri.prototype.clear=q1;ri.prototype.delete=N1;ri.prototype.get=z1;ri.prototype.has=W1;ri.prototype.set=Y1;var ja=function(){try{var e=br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function bn(e,t,r){t=="__proto__"&&ja?ja(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ao(e,t,r){(r!==void 0&&!ps(e[t],r)||r===void 0&&!(t in e))&&bn(e,t,r)}function U1(e){return function(t,r,i){for(var a=-1,s=Object(t),o=i(t),n=o.length;n--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var j1=U1(),Fd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hl=Fd&&typeof module=="object"&&module&&!module.nodeType&&module,G1=Hl&&Hl.exports===Fd,Yl=G1?Ee.Buffer:void 0,Ul=Yl?Yl.allocUnsafe:void 0;function V1(e,t){if(t)return e.slice();var r=e.length,i=Ul?Ul(r):new e.constructor(r);return e.copy(i),i}var jl=Ee.Uint8Array;function X1(e){var t=new e.constructor(e.byteLength);return new jl(t).set(new jl(e)),t}function Z1(e,t){var r=t?X1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function K1(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Gl=Object.create,Q1=function(){function e(){}return function(t){if(!Cr(t))return{};if(Gl)return Gl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Ad(e,t){return function(r){return e(t(r))}}var Ed=Ad(Object.getPrototypeOf,Object),J1=Object.prototype;function ms(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||J1;return e===r}function t2(e){return typeof e.constructor=="function"&&!ms(e)?Q1(Ed(e)):{}}function Ki(e){return e!=null&&typeof e=="object"}var e2="[object Arguments]";function Vl(e){return Ki(e)&&ei(e)==e2}var Md=Object.prototype,r2=Md.hasOwnProperty,i2=Md.propertyIsEnumerable,Ga=Vl(function(){return arguments}())?Vl:function(e){return Ki(e)&&r2.call(e,"callee")&&!i2.call(e,"callee")},Va=Array.isArray,a2=9007199254740991;function Id(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=a2}function ys(e){return e!=null&&Id(e.length)&&!xn(e)}function s2(e){return Ki(e)&&ys(e)}function o2(){return!1}var Od=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xl=Od&&typeof module=="object"&&module&&!module.nodeType&&module,n2=Xl&&Xl.exports===Od,Zl=n2?Ee.Buffer:void 0,l2=Zl?Zl.isBuffer:void 0,kn=l2||o2,h2="[object Object]",c2=Function.prototype,u2=Object.prototype,$d=c2.toString,d2=u2.hasOwnProperty,p2=$d.call(Object);function g2(e){if(!Ki(e)||ei(e)!=h2)return!1;var t=Ed(e);if(t===null)return!0;var r=d2.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&$d.call(r)==p2}var f2="[object Arguments]",m2="[object Array]",y2="[object Boolean]",C2="[object Date]",x2="[object Error]",b2="[object Function]",k2="[object Map]",T2="[object Number]",S2="[object Object]",w2="[object RegExp]",v2="[object Set]",B2="[object String]",_2="[object WeakMap]",L2="[object ArrayBuffer]",F2="[object DataView]",A2="[object Float32Array]",E2="[object Float64Array]",M2="[object Int8Array]",I2="[object Int16Array]",O2="[object Int32Array]",$2="[object Uint8Array]",D2="[object Uint8ClampedArray]",P2="[object Uint16Array]",R2="[object Uint32Array]",yt={};yt[A2]=yt[E2]=yt[M2]=yt[I2]=yt[O2]=yt[$2]=yt[D2]=yt[P2]=yt[R2]=!0;yt[f2]=yt[m2]=yt[L2]=yt[y2]=yt[F2]=yt[C2]=yt[x2]=yt[b2]=yt[k2]=yt[T2]=yt[S2]=yt[w2]=yt[v2]=yt[B2]=yt[_2]=!1;function q2(e){return Ki(e)&&Id(e.length)&&!!yt[ei(e)]}function N2(e){return function(t){return e(t)}}var Dd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oi=Dd&&typeof module=="object"&&module&&!module.nodeType&&module,z2=Oi&&Oi.exports===Dd,Us=z2&&_d.process,Kl=function(){try{var e=Oi&&Oi.require&&Oi.require("util").types;return e||Us&&Us.binding&&Us.binding("util")}catch{}}(),Ql=Kl&&Kl.isTypedArray,Tn=Ql?N2(Ql):q2;function Eo(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var W2=Object.prototype,H2=W2.hasOwnProperty;function Y2(e,t,r){var i=e[t];(!(H2.call(e,t)&&ps(i,r))||r===void 0&&!(t in e))&&bn(e,t,r)}function U2(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var n=t[s],l=void 0;l===void 0&&(l=e[n]),a?bn(r,n,l):Y2(r,n,l)}return r}function j2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var G2=9007199254740991,V2=/^(?:0|[1-9]\d*)$/;function Pd(e,t){var r=typeof e;return t=t??G2,!!t&&(r=="number"||r!="symbol"&&V2.test(e))&&e>-1&&e%1==0&&e<t}var X2=Object.prototype,Z2=X2.hasOwnProperty;function K2(e,t){var r=Va(e),i=!r&&Ga(e),a=!r&&!i&&kn(e),s=!r&&!i&&!a&&Tn(e),o=r||i||a||s,n=o?j2(e.length,String):[],l=n.length;for(var h in e)(t||Z2.call(e,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Pd(h,l)))&&n.push(h);return n}function Q2(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var J2=Object.prototype,tT=J2.hasOwnProperty;function eT(e){if(!Cr(e))return Q2(e);var t=ms(e),r=[];for(var i in e)i=="constructor"&&(t||!tT.call(e,i))||r.push(i);return r}function Rd(e){return ys(e)?K2(e,!0):eT(e)}function rT(e){return U2(e,Rd(e))}function iT(e,t,r,i,a,s,o){var n=Eo(e,r),l=Eo(t,r),h=o.get(l);if(h){Ao(e,r,h);return}var c=s?s(n,l,r+"",e,t,o):void 0,d=c===void 0;if(d){var p=Va(l),u=!p&&kn(l),m=!p&&!u&&Tn(l);c=l,p||u||m?Va(n)?c=n:s2(n)?c=K1(n):u?(d=!1,c=V1(l,!0)):m?(d=!1,c=Z1(l,!0)):c=[]:g2(l)||Ga(l)?(c=n,Ga(n)?c=rT(n):(!Cr(n)||xn(n))&&(c=t2(l))):d=!1}d&&(o.set(l,c),a(c,l,i,s,o),o.delete(l)),Ao(e,r,c)}function qd(e,t,r,i,a){e!==t&&j1(t,function(s,o){if(a||(a=new ri),Cr(s))iT(e,t,o,r,qd,i,a);else{var n=i?i(Eo(e,o),s,o+"",e,t,a):void 0;n===void 0&&(n=s),Ao(e,o,n)}},Rd)}function Nd(e){return e}function aT(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 Jl=Math.max;function sT(e,t,r){return t=Jl(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=Jl(i.length-t,0),o=Array(s);++a<s;)o[a]=i[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=i[a];return n[t]=r(o),aT(e,this,n)}}function oT(e){return function(){return e}}var nT=ja?function(e,t){return ja(e,"toString",{configurable:!0,enumerable:!1,value:oT(t),writable:!0})}:Nd,lT=800,hT=16,cT=Date.now;function uT(e){var t=0,r=0;return function(){var i=cT(),a=hT-(i-r);if(r=i,a>0){if(++t>=lT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dT=uT(nT);function pT(e,t){return dT(sT(e,t,Nd),e+"")}function gT(e,t,r){if(!Cr(r))return!1;var i=typeof t;return(i=="number"?ys(r)&&Pd(t,r.length):i=="string"&&t in r)?ps(r[t],e):!1}function fT(e){return pT(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&gT(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var n=r[i];n&&e(t,n,i,s)}return t})}var mT=fT(function(e,t,r){qd(e,t,r)}),yT="",CT={curveBasis:eo,curveBasisClosed:Cm,curveBasisOpen:ym,curveBumpX:tc,curveBumpY:Jh,curveBundle:mm,curveCardinalClosed:fm,curveCardinalOpen:gm,curveCardinal:Qh,curveCatmullRomClosed:pm,curveCatmullRomOpen:dm,curveCatmullRom:Kh,curveLinear:Ca,curveLinearClosed:um,curveMonotoneX:Zh,curveMonotoneY:Xh,curveNatural:Vh,curveStep:Gh,curveStepAfter:jh,curveStepBefore:Uh},xT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bT=g(function(e,t){const r=zd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Fa(o),i=Mt(i,[...o])}else i=r.args;if(!i)return;let a=Jo(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),zd=g(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${xT.source})(?=[}][%]{2}).*
|
|
159
|
-
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=Mi.exec(e))!==null;)if(s.index===Mi.lastIndex&&Mi.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const n=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return I.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),kT=g(function(e){return e.replace(Mi,"")},"removeDirectives"),TT=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Sn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return CT[r]??t}g(Sn,"interpolateToCurve");function Wd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Wk.sanitizeUrl(r):r}g(Wd,"formatUrl");var ST=g((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){I.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function wn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(wn,"distance");function Hd(e){let t,r=0;e.forEach(a=>{r+=wn(a,t),t=a});const i=r/2;return vn(e,i)}g(Hd,"traverseEdge");function Yd(e){return e.length===1?e[0]:Hd(e)}g(Yd,"calcLabelPosition");var th=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),vn=g((e,t)=>{let r,i=t;for(const a of e){if(r){const s=wn(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:th((1-o)*r.x+o*a.x,5),y:th((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),wT=g((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=vn(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function Ud(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=vn(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}g(Ud,"calcTerminalLabelPosition");function jd(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}}g(jd,"getStylesFromArray");var eh=0,vT=g(()=>(eh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+eh),"generateId");function Gd(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}g(Gd,"makeRandomHex");var BT=g(e=>Gd(e.length),"random"),_T=g(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"),LT=g(function(e,t){const r=t.text.replace(Gi.lineBreakRegex," "),[,i]=Cs(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 s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),FT=Zi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Gi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=Ne(`${o} `,r),h=Ne(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:u}=AT(o,t,"-",r);a.push(s,...p),s=u}else h+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),AT=Zi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const h=`${o}${n}`;if(Ne(h,i)>=t){const d=l+1,p=a.length===d,u=`${h}${r}`;s.push(p?h:u),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Vd(e,t){return Bn(e,t).height}g(Vd,"calculateTextHeight");function Ne(e,t){return Bn(e,t).width}g(Ne,"calculateTextWidth");var Bn=Zi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Cs(r),o=["sans-serif",i],n=e.split(Gi.lineBreakRegex),l=[],h=st("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let u=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const f=_T();f.text=y||yT;const C=LT(c,f).style("font-size",s).style("font-weight",a).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),u=Math.round(b.height),m.height+=u,m.lineHeight=Math.round(Math.max(m.lineHeight,u))}l.push(m)}c.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Xr,ET=(Xr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Xr,"InitIDGenerator"),Xr),ua,MT=g(function(e){return ua=ua||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ua.innerHTML=e,unescape(ua.textContent)},"entityDecode");function _n(e){return"str"in e}g(_n,"isDetailedError");var IT=g((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.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"),Cs=g(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 Ln(e,t){return mT({},e,t)}g(Ln,"cleanAndMerge");var me={assignWithDepth:Mt,wrapLabel:FT,calculateTextHeight:Vd,calculateTextWidth:Ne,calculateTextDimensions:Bn,cleanAndMerge:Ln,detectInit:bT,detectDirective:zd,isSubstringInArray:TT,interpolateToCurve:Sn,calcLabelPosition:Yd,calcCardinalityPosition:wT,calcTerminalLabelPosition:Ud,formatUrl:Wd,getStylesFromArray:jd,generateId:vT,random:BT,runFunc:ST,entityDecode:MT,insertTitle:IT,isLabelCoordinateInPath:Xd,parseFontSize:Cs,InitIDGenerator:ET},OT=g(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"),fr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),YL=g((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function $t(e){return e??null}g($t,"handleUndefinedAttr");function Xd(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}g(Xd,"isLabelCoordinateInPath");var Fn=g(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Zd(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(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=dc.fontSize]=Cs(n),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}g(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}g(Zd,"configureLabelImages");var $T=g(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ii=g(e=>{const t=DT([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),DT=g(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"),Kd=g(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"),G=g(e=>{const{stylesArray:t}=ii(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];Kd(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),j=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=ii(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:PT(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),PT=g(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 RT=Object.freeze({left:0,top:0,width:16,height:16}),Xa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qd=Object.freeze({...RT,...Xa}),qT=Object.freeze({...Qd,body:"",hidden:!1}),NT=Object.freeze({width:null,height:null}),zT=Object.freeze({...NT,...Xa}),WT=(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 n=a.pop(),l=a.pop(),h={provider:a.length>0?a[0]:i,prefix:l,name:n};return js(h)?h:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return js(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return js(n,r)?n:null}return null},js=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function HT(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 rh(e,t){const r=HT(e,t);for(const i in qT)i in Xa?i in e&&!(i in r)&&(r[i]=Xa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function YT(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function ih(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=rh(i[n]||a[n],s)}return o(t),r.forEach(o),rh(e,s)}function UT(e,t){if(e.icons[t])return ih(e,t,[]);const r=YT(e,[t])[t];return r?ih(e,t,r):null}const jT=/(-?[0-9.]*[0-9]+[0-9.]*)/g,GT=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ah(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(jT);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=GT.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function VT(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function XT(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ZT(e,t,r){const i=VT(e);return XT(i.defs,t+i.content+r)}const KT=e=>e==="unset"||e==="undefined"||e==="none";function QT(e,t){const r={...Qd,...e},i={...zT,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(y=>{const f=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=2:(f.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),f.push("scale(-1 1)"),a.top=a.left=0):b&&(f.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),f.push("scale(1 -1)"),a.top=a.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=a.height/2+a.top,f.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:f.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,f.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),f.length&&(s=ZT(s,'<g transform="'+f.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,h=a.height;let c,d;o===null?(d=n===null?"1em":n==="auto"?h:n,c=ah(d,l/h)):(c=o==="auto"?l:o,d=n===null?ah(c,h/l):n==="auto"?h:n);const p={},u=(y,f)=>{KT(f)||(p[y]=f.toString())};u("width",c),u("height",d);const m=[a.left,a.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:s}}const JT=/\sid="(\S+)"/g,sh=new Map;function tS(e){e=e.replace(/[0-9]+$/,"")||"a";const t=sh.get(e)||0;return sh.set(e,t+1),t?`${e}${t}`:e}function eS(e){const t=[];let r;for(;r=JT.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 s=tS(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function rS(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 An(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kr=An();function Jd(e){kr=e}var $i={exec:()=>null};function pt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Vt.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var iS=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Vt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},aS=/^(?:[ \t]*(?:\n|$))+/,sS=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oS=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nS=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,En=/(?:[*+-]|\d{1,9}[.)])/,tp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ep=pt(tp).replace(/bull/g,En).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(),lS=pt(tp).replace(/bull/g,En).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(),Mn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,hS=/^[^\n]+/,In=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cS=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",In).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uS=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,En).getRegex(),xs="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",On=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dS=pt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",On).replace("tag",xs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rp=pt(Mn).replace("hr",Qi).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",xs).getRegex(),pS=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rp).getRegex(),$n={blockquote:pS,code:sS,def:cS,fences:oS,heading:nS,hr:Qi,html:dS,lheading:ep,list:uS,newline:aS,paragraph:rp,table:$i,text:hS},oh=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qi).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",xs).getRegex(),gS={...$n,lheading:lS,table:oh,paragraph:pt(Mn).replace("hr",Qi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",oh).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",xs).getRegex()},fS={...$n,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",On).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:$i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(Mn).replace("hr",Qi).replace("heading",` *#{1,6} *[^
|
|
160
|
-
]`).replace("lheading",ep).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},mS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ip=/^( {2,}|\\)\n(?!\s*$)/,CS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bs=/[\p{P}\p{S}]/u,Dn=/[\s\p{P}\p{S}]/u,ap=/[^\s\p{P}\p{S}]/u,xS=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Dn).getRegex(),sp=/(?!~)[\p{P}\p{S}]/u,bS=/(?!~)[\s\p{P}\p{S}]/u,kS=/(?:[^\s\p{P}\p{S}]|~)/u,TS=pt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iS?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),op=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,SS=pt(op,"u").replace(/punct/g,bs).getRegex(),wS=pt(op,"u").replace(/punct/g,sp).getRegex(),np="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vS=pt(np,"gu").replace(/notPunctSpace/g,ap).replace(/punctSpace/g,Dn).replace(/punct/g,bs).getRegex(),BS=pt(np,"gu").replace(/notPunctSpace/g,kS).replace(/punctSpace/g,bS).replace(/punct/g,sp).getRegex(),_S=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ap).replace(/punctSpace/g,Dn).replace(/punct/g,bs).getRegex(),LS=pt(/\\(punct)/,"gu").replace(/punct/g,bs).getRegex(),FS=pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),AS=pt(On).replace("(?:-->|$)","-->").getRegex(),ES=pt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",AS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Za=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,MS=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Za).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lp=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",Za).replace("ref",In).getRegex(),hp=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",In).getRegex(),IS=pt("reflink|nolink(?!\\()","g").replace("reflink",lp).replace("nolink",hp).getRegex(),nh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pn={_backpedal:$i,anyPunctuation:LS,autolink:FS,blockSkip:TS,br:ip,code:yS,del:$i,emStrongLDelim:SS,emStrongRDelimAst:vS,emStrongRDelimUnd:_S,escape:mS,link:MS,nolink:hp,punctuation:xS,reflink:lp,reflinkSearch:IS,tag:ES,text:CS,url:$i},OS={...Pn,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",Za).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Za).getRegex()},Mo={...Pn,emStrongRDelimAst:BS,emStrongLDelim:wS,url:pt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nh).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:pt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nh).getRegex()},$S={...Mo,br:pt(ip).replace("{2,}","*").getRegex(),text:pt(Mo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},da={normal:$n,gfm:gS,pedantic:fS},yi={normal:Pn,gfm:Mo,breaks:$S,pedantic:OS},DS={"&":"&","<":"<",">":">",'"':""","'":"'"},lh=e=>DS[e];function ve(e,t){if(t){if(Vt.escapeTest.test(e))return e.replace(Vt.escapeReplace,lh)}else if(Vt.escapeTestNoEncode.test(e))return e.replace(Vt.escapeReplaceNoEncode,lh);return e}function hh(e){try{e=encodeURI(e).replace(Vt.percentDecode,"%")}catch{return null}return e}function ch(e,t){var s;let r=e.replace(Vt.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Vt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.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(Vt.slashPipe,"|");return i}function Ci(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 PS(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 uh(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function RS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
161
|
-
`).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
|
|
162
|
-
`)}var Ka=class{constructor(t){mt(this,"options");mt(this,"rules");mt(this,"lexer");this.options=t||kr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ci(i,`
|
|
163
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=RS(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=Ci(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:Ci(r[0],`
|
|
164
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ci(r[0],`
|
|
165
|
-
`).split(`
|
|
166
|
-
`),a="",s="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
167
|
-
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
168
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
169
|
-
${c}`:c,s=s?`${s}
|
|
170
|
-
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=p,i.length===0)break;let u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let m=u,y=m.raw+`
|
|
171
|
-
`+i.join(`
|
|
172
|
-
`),f=this.blockquote(y);o[o.length-1]=f,a=a.substring(0,a.length-m.raw.length)+f.raw,s=s.substring(0,s.length-m.text.length)+f.text;break}else if((u==null?void 0:u.type)==="list"){let m=u,y=m.raw+`
|
|
173
|
-
`+i.join(`
|
|
174
|
-
`),f=this.list(y);o[o.length-1]=f,a=a.substring(0,a.length-u.raw.length)+f.raw,s=s.substring(0,s.length-m.raw.length)+f.raw,i=y.substring(o.at(-1).raw.length).split(`
|
|
175
|
-
`);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
|
|
176
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|
177
|
-
`,1)[0],m=!p.trim(),y=0;if(this.options.pedantic?(y=2,d=p.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=p.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(u)&&(c+=u+`
|
|
178
|
-
`,t=t.substring(u.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),S=this.rules.other.fencesBeginRegex(y),w=this.rules.other.headingBeginRegex(y),B=this.rules.other.htmlBeginRegex(y);for(;t;){let T=t.split(`
|
|
179
|
-
`,1)[0],L;if(u=T,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),L=u):L=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||w.test(u)||B.test(u)||b.test(u)||k.test(u))break;if(L.search(this.rules.other.nonSpaceChar)>=y||!u.trim())d+=`
|
|
180
|
-
`+L.slice(y);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||w.test(p)||k.test(p))break;d+=`
|
|
181
|
-
`+u}!m&&!u.trim()&&(m=!0),c+=T+`
|
|
182
|
-
`,t=t.substring(T.length+1),p=L.slice(y)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let f=null,C;this.options.gfm&&(f=this.rules.other.listIsTask.exec(d),f&&(C=f[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!f,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=c}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let c=s.items[h].tokens.filter(p=>p.type==="space"),d=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=d}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}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"):"",s=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:s}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ch(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
183
|
-
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of s)o.rows.push(ch(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
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 o=Ci(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=PS(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=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)),uh(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return uh(i,s,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 s=[...a[0]].length-1,o,n,l=s,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+s);(a=c.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(n=[...o].length,a[3]||a[4]){l+=n;continue}else if((a[5]||a[6])&&s%3&&!((s+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let d=[...a[0]][0].length,p=t.slice(0,s+a.index+d+n);if(Math.min(s,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let u=p.slice(2,-2);return{type:"strong",raw:p,text:u,tokens:this.lexer.inlineTokens(u)}}}}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),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(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,s;if(r[2]==="@")a=r[0],s="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,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}}}},ge=class Io{constructor(t){mt(this,"tokens");mt(this,"options");mt(this,"state");mt(this,"tokenizer");mt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kr,this.options.tokenizer=this.options.tokenizer||new Ka,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Vt,block:da.normal,inline:yi.normal};this.options.pedantic?(r.block=da.pedantic,r.inline=yi.pedantic):this.options.gfm&&(r.block=da.gfm,this.options.breaks?r.inline=yi.breaks:r.inline=yi.gfm),this.tokenizer.rules=r}static get rules(){return{block:da,inline:yi}}static lex(t,r){return new Io(r).lex(t)}static lexInline(t,r){return new Io(r).inlineTokens(t)}lex(t){t=t.replace(Vt.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,s,o;for(this.options.pedantic&&(t=t.replace(Vt.tabCharGlobal," ").replace(Vt.spaceLine,""));t;){let n;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
186
|
-
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
187
|
-
`)?"":`
|
|
188
|
-
`)+n.raw,h.text+=`
|
|
189
|
-
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
190
|
-
`)?"":`
|
|
191
|
-
`)+n.raw,h.text+=`
|
|
192
|
-
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
193
|
-
`)?"":`
|
|
194
|
-
`)+n.raw,h.text+=`
|
|
195
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
196
|
-
`)?"":`
|
|
197
|
-
`)+n.raw,h.text+=`
|
|
198
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,d,p;let i=t,a=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.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 s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(y=>(u=y.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let y=r.at(-1);u.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=u.raw,y.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,n)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let y=1/0,f=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},f),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(u=this.tokenizer.inlineText(m)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),o=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=u.raw,y.text+=u.text):r.push(u);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},Qa=class{constructor(t){mt(this,"options");mt(this,"parser");this.options=t||kr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(Vt.notSpaceStart))==null?void 0:o[0],s=t.replace(Vt.endingNewline,"")+`
|
|
199
|
-
`;return a?'<pre><code class="language-'+ve(a)+'">'+(i?s:ve(s,!0))+`</code></pre>
|
|
200
|
-
`:"<pre><code>"+(i?s:ve(s,!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 n=0;n<t.items.length;n++){let l=t.items[n];a+=this.listitem(l)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
|
|
206
|
-
`+a+"</"+s+`>
|
|
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+" "+ve(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 s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);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>${ve(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),s=hh(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+ve(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=hh(t);if(s===null)return ve(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ve(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ve(t.text)}},Rn=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""}},fe=class Oo{constructor(t){mt(this,"options");mt(this,"renderer");mt(this,"textRenderer");this.options=t||kr,this.options.renderer=this.options.renderer||new Qa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rn}static parse(t,r){return new Oo(r).parse(t)}static parseInline(t,r){return new Oo(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
|
|
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,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},ya,Li=(ya=class{constructor(t){mt(this,"options");mt(this,"block");this.options=t||kr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ge.lex:ge.lexInline}provideParser(){return this.block?fe.parse:fe.parseInline}},mt(ya,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),mt(ya,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ya),qS=class{constructor(...t){mt(this,"defaults",An());mt(this,"options",this.setOptions);mt(this,"parse",this.parseMarkdown(!0));mt(this,"parseInline",this.parseMarkdown(!1));mt(this,"Parser",fe);mt(this,"Renderer",Qa);mt(this,"TextRenderer",Rn);mt(this,"Lexer",ge);mt(this,"Tokenizer",Ka);mt(this,"Hooks",Li);this.use(...t)}walkTokens(t,r){var a,s;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new Qa(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=s[n];s[n]=(...c)=>{let d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ka(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=s[n];s[n]=(...c)=>{let d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Li;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=s[n];Li.passThroughHooks.has(o)?s[n]=c=>{if(this.defaults.async&&Li.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(s,c);return h.call(s,p)})();let d=l.call(s,c);return h.call(s,d)}:s[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,c);return p===!1&&(p=await h.apply(s,c)),p})();let d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ge.lex(t,r??this.defaults)}parser(t,r){return fe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ge.lex:ge.lexInline)(n,s),h=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser():t?fe.parse:fe.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?ge.lex:ge.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?fe.parse:fe.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return o(n)}}}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>"+ve(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},mr=new qS;function ft(e,t){return mr.parse(e,t)}ft.options=ft.setOptions=function(e){return mr.setOptions(e),ft.defaults=mr.defaults,Jd(ft.defaults),ft};ft.getDefaults=An;ft.defaults=kr;ft.use=function(...e){return mr.use(...e),ft.defaults=mr.defaults,Jd(ft.defaults),ft};ft.walkTokens=function(e,t){return mr.walkTokens(e,t)};ft.parseInline=mr.parseInline;ft.Parser=fe;ft.parser=fe.parse;ft.Renderer=Qa;ft.TextRenderer=Rn;ft.Lexer=ge;ft.lexer=ge.lex;ft.Tokenizer=Ka;ft.Hooks=Li;ft.parse=ft;ft.options;ft.setOptions;ft.use;ft.walkTokens;ft.parseInline;fe.parse;ge.lex;function cp(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(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var d,p;return(p=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var s=new RegExp(`
|
|
219
|
-
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
|
|
220
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
221
|
-
`)&&(d=String(n).split(`
|
|
222
|
-
`).map(function(p,u){return u===0?p:""+c+p}).join(`
|
|
223
|
-
`)),o+=d+i[l+1]}),o}var NS={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},$o=new Map,up=new Map,zS=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",t.name),"loader"in t)up.set(t.name,t.loader);else if("icons"in t)$o.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),dp=g(async(e,t)=>{const r=WT(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=$o.get(i);if(!a){const o=up.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},$o.set(i,a)}catch(n){throw I.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=UT(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),WS=g(async e=>{try{return await dp(e),!0}catch{return!1}},"isIconAvailable"),Ji=g(async(e,t,r)=>{let i;try{i=await dp(e,t==null?void 0:t.fallbackPrefix)}catch(o){I.error(o),i=NS}const a=QT(i,t),s=rS(eS(a.body),{...a.attributes,...r});return xe(s,bt())},"getIconSVG");function pp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
224
|
-
`).replace(/\n{2,}/g,`
|
|
225
|
-
`);return cp(i)}g(pp,"preprocessMarkdown");function gp(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"})))??[]})}g(gp,"nonMarkdownToLines");function fp(e,t={}){const r=pp(e,t),i=ft.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
226
|
-
`).forEach((c,d)=>{d!==0&&(s++,a.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&a[s].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return g(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}g(fp,"markdownToLines");function mp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(mp,"nonMarkdownToHTML");function yp(e,{markdownAutoWrap:t}={}){const r=ft.lexer(e);function i(a){var s,o,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(I.warn(`Unsupported markdown: ${a.type}`),a.raw)}return g(i,"output"),r.map(i).join("")}g(yp,"markdownToHTML");function Cp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Cp,"splitTextToChars");function xp(e,t){const r=Cp(t.content);return qn(e,[],r,t.type)}g(xp,"splitWordToFitWidth");function qn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?qn(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(qn,"splitWordToFitWidthRecursion");function bp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
227
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ja(e,t)}g(bp,"splitLineToFitWidth");function Ja(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 s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Ja(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=xp(t,s);r.push([n]),l.content&&e.unshift(l)}return Ja(e,t,r)}g(Ja,"splitLineToFitWidthRecursion");function Do(e,t){t&&e.attr("style",t)}g(Do,"applyStyle");var dh=16384;async function kp(e,t,r,i,a=!1,s=bt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,dh)}px`),o.attr("height",`${Math.min(10*r,dh)}px`);const n=o.append("xhtml:div"),l=Di(t.label)?await kc(t.label.replace(Gi.lineBreakRegex,`
|
|
228
|
-
`),s):xe(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Do(c,t.labelStyle),c.attr("class",`${h} ${i}`),Do(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),o.node()}g(kp,"addHtmlSpan");function ks(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}g(ks,"createTspan");function Tp(e,t,r){const i=e.append("text"),a=ks(i,1,t);Ts(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}g(Tp,"computeWidthOfText");function HS(e,t,r){var o;const i=e.append("text"),a=ks(i,1,t);Ts(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}g(HS,"computeDimensionOfText");function Sp(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let h=0;for(const c of r){const d=g(u=>Tp(o,1.1,u)<=e,"checkWidth"),p=d(c)?[c]:bp(c,d);for(const u of p){const m=ks(l,h,1.1,a);Ts(m,u),h++}}if(i){const c=l.node().getBBox(),d=2;return n.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),o.node()}else return l.node()}g(Sp,"createFormattedText");function Po(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}})}g(Po,"decodeHTMLEntities");function Ts(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(Po(r.content)):a.text(" "+Po(r.content))})}g(Ts,"updateTextContentAndStyles");async function wp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await WS(n)?await Ji(n,void 0,{class:"label-icon"}):`<i class='${xe(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(wp,"replaceIconSubstring");var He=g(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(I.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",h),s){const d=o?yp(t,c):mp(t),p=await wp(fr(d),c),u=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Di(t)?u:p,labelStyle:r.replace("fill:","color:")};return await kp(e,m,l,a,h,c)}else{const d=fr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?fp(d.replace("<br>","<br/>"),c):gp(d),u=Sp(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");st(u).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");st(u).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");st(u).select("text").attr("style",y)}return i?st(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):st(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Gs(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-a)*n+i,l[1]=(h-i)*n+(c-a)*o+a}}}function YS(e,t){return e[0]===t[0]&&e[1]===t[1]}function US(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const h of o)Gs(h,n,a);const l=function(h,c,d){const p=[];for(const b of h){const k=[...b];YS(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const u=[];c=Math.max(c,.1);const m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],w=b[k+1];if(S[1]!==w[1]){const B=Math.min(S[1],w[1]);m.push({ymin:B,ymax:Math.max(S[1],w[1]),x:B===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(m.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)),!m.length)return u;let y=[],f=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>f);k++)b=k;m.splice(0,b+1).forEach(k=>{y.push({s:f,edge:k})})}if(y=y.filter(b=>!(b.edge.ymax<=f)),y.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(d!==1||C%c==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const S=y[b].edge,w=y[k].edge;u.push([[Math.round(S.x),f],[Math.round(w.x),f]])}f+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),C++}return u}(o,s,i);if(a){for(const h of o)Gs(h,n,-a);(function(h,c,d){const p=[];h.forEach(u=>p.push(...u)),Gs(p,c,d)})(l,n,-a)}return l}function ta(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 s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),US(e,a,i,s||1)}class Nn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ta(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 Ss(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 jS extends Nn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=ta(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[h,c]of a)Ss([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class GS extends Nn{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class VS{constructor(t){this.helper=t}fillPolygons(t,r){const i=ta(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 s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=Ss(n),h=l/a,c=Math.ceil(h)-1,d=l-c*a,p=(n[0][0]+n[1][0])/2-a/4,u=Math.min(n[0][1],n[1][1]);for(let m=0;m<c;m++){const y=u+d+m*a,f=p-o+2*Math.random()*o,C=y-o+2*Math.random()*o,b=this.helper.ellipse(f,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class XS{constructor(t){this.helper=t}fillPolygons(t,r){const i=ta(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,s=[];return t.forEach(o=>{const n=Ss(o),l=Math.floor(n/(i+a)),h=(n+a-l*(i+a))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const m=u*(i+a),y=m+i,f=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+y*Math.cos(p)+h*Math.cos(p),c[1]+y*Math.sin(p)+h*Math.sin(p)];s.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],r))}}),s}}class ZS{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,s=ta(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(s=>{const o=Ss(s),n=Math.round(o/(2*r));let l=s[0],h=s[1];l[0]>h[0]&&(l=s[1],h=s[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,u=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],f=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[y[0]+m*Math.cos(c+Math.PI/4),y[1]+m*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],f[0],f[1],i))}}),a}}const Qt={};class KS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const QS=0,Vs=1,ph=2,pa={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 zn(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:QS,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Vs,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:ph,text:""},n}(e);let i="BOD",a=0,s=r[a];for(;!Xs(s,ph);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return zn("M0,0"+e);a++,o=pa[s.text],i=s.text}else Xs(s,Vs)?o=pa[i]:(a++,o=pa[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const h=r[l];if(!Xs(h,Vs))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof pa[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function vp(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((h,c)=>c%2?h+r:h+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function Bp(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[s,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],n=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 d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=a+(a-l)):(d=i,p=a),t.push({key:"C",data:[d,p,...c]}),n=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[d,p]=c;let u=0,m=0;r==="Q"||r==="T"?(u=i+(i-n),m=a+(a-l)):(u=i,m=a);const y=i+2*(u-i)/3,f=a+2*(m-a)/3,C=d+2*(u-d)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[y,f,C,b,d,p]}),n=u,l=m,i=d,a=p;break}case"Q":{const[d,p,u,m]=c,y=i+2*(d-i)/3,f=a+2*(p-a)/3,C=u+2*(d-u)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[y,f,C,b,u,m]}),n=d,l=p,i=u,a=m;break}case"A":{const d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],m=c[3],y=c[4],f=c[5],C=c[6];d===0||p===0?(t.push({key:"C",data:[i,a,f,C,f,C]}),i=f,a=C):(i!==f||a!==C)&&(_p(i,a,f,C,d,p,u,m,y).forEach(function(b){t.push({key:"C",data:b})}),i=f,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=h}return t}function xi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function _p(e,t,r,i,a,s,o,n,l,h){const c=(d=o,Math.PI*d/180);var d;let p=[],u=0,m=0,y=0,f=0;if(h)[u,m,y,f]=h;else{[e,t]=xi(e,t,-c),[r,i]=xi(r,i,-c);const D=(e-r)/2,q=(t-i)/2;let N=D*D/(a*a)+q*q/(s*s);N>1&&(N=Math.sqrt(N),a*=N,s*=N);const R=a*a,W=s*s,$=R*W-R*q*q-W*D*D,J=R*q*q+W*D*D,nt=(n===l?-1:1)*Math.sqrt(Math.abs($/J));y=nt*a*q/s+(e+r)/2,f=nt*-s*D/a+(t+i)/2,u=Math.asin(parseFloat(((t-f)/s).toFixed(9))),m=Math.asin(parseFloat(((i-f)/s).toFixed(9))),e<y&&(u=Math.PI-u),r<y&&(m=Math.PI-m),u<0&&(u=2*Math.PI+u),m<0&&(m=2*Math.PI+m),l&&u>m&&(u-=2*Math.PI),!l&&m>u&&(m-=2*Math.PI)}let C=m-u;if(Math.abs(C)>120*Math.PI/180){const D=m,q=r,N=i;m=l&&m>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=_p(r=y+a*Math.cos(m),i=f+s*Math.sin(m),q,N,a,s,o,0,l,[m,D,y,f])}C=m-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(m),w=Math.sin(m),B=Math.tan(C/4),T=4/3*a*B,L=4/3*s*B,P=[e,t],M=[e+T*k,t-L*b],E=[r+T*w,i-L*S],z=[r,i];if(M[0]=2*P[0]-M[0],M[1]=2*P[1]-M[1],h)return[M,E,z].concat(p);{p=[M,E,z].concat(p);const D=[];for(let q=0;q<p.length;q+=3){const N=xi(p[q][0],p[q][1],c),R=xi(p[q+1][0],p[q+1][1],c),W=xi(p[q+2][0],p[q+2][1],c);D.push([N[0],N[1],R[0],R[1],W[0],W[1]])}return D}}const JS={randOffset:function(e,t){return tt(e,t)},randOffsetWithRange:function(e,t,r){return ts(e,t,r)},ellipse:function(e,t,r,i,a){const s=Fp(r,i,a);return Ro(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Ze(e,t,r,i,a,!0)}};function Lp(e,t,r,i,a){return{type:"path",ops:Ze(e,t,r,i,a)}}function _a(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Ze(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Ze(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Lp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function tw(e,t,r,i,a){return function(s,o){return _a(s,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function gh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ga(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:ga(r[0],1.5*(1+.22*t.roughness),yh(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=ga(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ga(o,1.5*(1+.22*t.roughness),yh(t));for(const h of n)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 Fp(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)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=tt(o*l,r),n+=tt(n*l,r),{increment:s,rx:o,ry:n}}function Ro(e,t,r,i){const[a,s]=Ch(i.increment,e,t,i.rx,i.ry,1,i.increment*ts(.1,ts(.4,1,r),r),r);let o=es(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Ch(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=es(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function fh(e,t,r,i,a,s,o,n,l){const h=e,c=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=tt(.01*d,l),p+=tt(.01*p,l);let u=a,m=s;for(;u<0;)u+=2*Math.PI,m+=2*Math.PI;m-u>2*Math.PI&&(u=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,f=Math.min(y/2,(m-u)/2),C=xh(f,h,c,d,p,u,m,1,l);if(!l.disableMultiStroke){const b=xh(f,h,c,d,p,u,m,1.5,l);C.push(...b)}return o&&(n?C.push(...Ze(h,c,h+d*Math.cos(u),c+p*Math.sin(u),l),...Ze(h,c,h+d*Math.cos(m),c+p*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:C}}function mh(e,t){const r=Bp(vp(zn(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Ze(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,h,c,d,p,u]=n;i.push(...ew(l,h,c,d,p,u,s,t)),s=[p,u];break}case"Z":i.push(...Ze(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Zs(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+tt(a,t),i[0][1]+tt(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+tt(a,t),i[o][1]+tt(a,t)]})}}return{type:"fillPath",ops:r}}function _r(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Qt[a])switch(a){case"zigzag":Qt[a]||(Qt[a]=new jS(i));break;case"cross-hatch":Qt[a]||(Qt[a]=new GS(i));break;case"dots":Qt[a]||(Qt[a]=new VS(i));break;case"dashed":Qt[a]||(Qt[a]=new XS(i));break;case"zigzag-line":Qt[a]||(Qt[a]=new ZS(i));break;default:a="hachure",Qt[a]||(Qt[a]=new Nn(i))}return Qt[a]}(t,JS).fillPolygons(e,t)}function yh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ap(e){return e.randomizer||(e.randomizer=new KS(e.seed||0)),e.randomizer.next()}function ts(e,t,r,i=1){return r.roughness*i*(Ap(r)*(t-e)+e)}function tt(e,t,r=1){return ts(-e,e,t,r)}function Ze(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=qo(e,t,r,i,a,!0,!1);if(o)return n;const l=qo(e,t,r,i,a,!0,!0);return n.concat(l)}function qo(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,p=.2+.2*Ap(a);let u=a.bowing*a.maxRandomnessOffset*(i-t)/200,m=a.bowing*a.maxRandomnessOffset*(e-r)/200;u=tt(u,a,h),m=tt(m,a,h);const y=[],f=()=>tt(d,a,h),C=()=>tt(c,a,h),b=a.preserveVertices;return o?y.push({op:"move",data:[e+(b?0:f()),t+(b?0:f())]}):y.push({op:"move",data:[e+(b?0:tt(c,a,h)),t+(b?0:tt(c,a,h))]}),o?y.push({op:"bcurveTo",data:[u+e+(r-e)*p+f(),m+t+(i-t)*p+f(),u+e+2*(r-e)*p+f(),m+t+2*(i-t)*p+f(),r+(b?0:f()),i+(b?0:f())]}):y.push({op:"bcurveTo",data:[u+e+(r-e)*p+C(),m+t+(i-t)*p+C(),u+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),y}function ga(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]),i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+tt(t,r),e[a][1]+tt(t,r)]),a===e.length-1&&i.push([e[a][0]+tt(t,r),e[a][1]+tt(t,r)]);return es(i,null,r)}function es(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[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(...qo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Ch(e,t,r,i,a,s,o,n){const l=[],h=[];if(n.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 d=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(d),h.push(d)}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=tt(.5,n)-Math.PI/2;h.push([tt(s,n)+t+.9*i*Math.cos(c-e),tt(s,n)+r+.9*a*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let p=c;p<d;p+=e){const u=[tt(s,n)+t+i*Math.cos(p),tt(s,n)+r+a*Math.sin(p)];l.push(u),h.push(u)}h.push([tt(s,n)+t+i*Math.cos(c+2*Math.PI+.5*o),tt(s,n)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([tt(s,n)+t+.98*i*Math.cos(c+o),tt(s,n)+r+.98*a*Math.sin(c+o)]),h.push([tt(s,n)+t+.9*i*Math.cos(c+.5*o),tt(s,n)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function xh(e,t,r,i,a,s,o,n,l){const h=s+tt(.1,l),c=[];c.push([tt(n,l)+t+.9*i*Math.cos(h-e),tt(n,l)+r+.9*a*Math.sin(h-e)]);for(let d=h;d<=o;d+=e)c.push([tt(n,l)+t+i*Math.cos(d),tt(n,l)+r+a*Math.sin(d)]);return c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),es(c,null,l)}function ew(e,t,r,i,a,s,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:tt(h[0],n)),o[1]+(p?0:tt(h[0],n))]}),c=p?[a,s]:[a+tt(h[u],n),s+tt(h[u],n)],l.push({op:"bcurveTo",data:[e+tt(h[u],n),t+tt(h[u],n),r+tt(h[u],n),i+tt(h[u],n),c[0],c[1]]});return l}function bi(e){return[...e]}function bh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(bi(e[0]),bi(e[1]),bi(e[2]),bi(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(bi(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function La(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function rw(e,t,r){const i=La(t,r);if(i===0)return La(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)),La(e,ir(t,r,a))}function ir(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function No(e,t,r,i){const a=i||[];if(function(n,l){const h=n[l+0],c=n[l+1],d=n[l+2],p=n[l+3];let u=3*c[0]-2*h[0]-p[0];u*=u;let m=3*c[1]-2*h[1]-p[1];m*=m;let y=3*d[0]-2*p[0]-h[0];y*=y;let f=3*d[1]-2*p[1]-h[1];return f*=f,u<y&&(u=y),m<f&&(m=f),u+m}(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(La(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],p=ir(l,h,.5),u=ir(h,c,.5),m=ir(c,d,.5),y=ir(p,u,.5),f=ir(u,m,.5),C=ir(y,f,.5);No([l,p,y,C],0,r,a),No([C,f,m,d],0,r,a)}var s,o;return a}function iw(e,t){return rs(e,0,e.length,t)}function rs(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const d=rw(e[c],o,n);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(rs(e,t,h+1,i,s),rs(e,h,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Ks(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)No(e,3*s,t,i);return r&&r>0?rs(i,0,i.length,r):i}const se="none";class is{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,s){const o=this._o(s);return this._d("line",[Lp(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=tw(t,r,i,a,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(Zs([h],o)):n.push(_r([h],o))}return o.stroke!==se&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=Fp(i,a,o),h=Ro(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=Ro(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(_r([h.estimatedPoints],o));return o.stroke!==se&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[_a(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const h=this._o(l),c=[],d=fh(t,r,i,a,s,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const u=fh(t,r,i,a,s,o,!0,!1,p);u.type="fillPath",c.push(u)}else c.push(function(p,u,m,y,f,C,b){const k=p,S=u;let w=Math.abs(m/2),B=Math.abs(y/2);w+=tt(.01*w,b),B+=tt(.01*B,b);let T=f,L=C;for(;T<0;)T+=2*Math.PI,L+=2*Math.PI;L-T>2*Math.PI&&(T=0,L=2*Math.PI);const P=(L-T)/b.curveStepCount,M=[];for(let E=T;E<=L;E+=P)M.push([k+w*Math.cos(E),S+B*Math.sin(E)]);return M.push([k+w*Math.cos(L),S+B*Math.sin(L)]),M.push([k,S]),_r([M],b)}(t,r,i,a,s,o,h));return h.stroke!==se&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=gh(t,i);if(i.fill&&i.fill!==se)if(i.fillStyle==="solid"){const o=gh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Ks(bh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Ks(bh(h),10,(1+i.roughness)/2))}o.length&&a.push(_r([o],i))}return i.stroke!==se&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=_a(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Zs([t],i)):a.push(_r([t],i))),i.stroke!==se&&a.push(s),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 s=i.fill&&i.fill!=="transparent"&&i.fill!==se,o=i.stroke!==se,n=!!(i.simplification&&i.simplification<1),l=function(c,d,p){const u=Bp(vp(zn(c))),m=[];let y=[],f=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Ks(C,d)),C=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:w,data:B}of u)switch(w){case"M":k(),f=[B[0],B[1]],y.push(f);break;case"L":b(),y.push([B[0],B[1]]);break;case"C":if(!C.length){const T=y.length?y[y.length-1]:f;C.push([T[0],T[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),y.push([f[0],f[1]])}if(k(),!p)return m;const S=[];for(const w of m){const B=iw(w,p);B.length&&S.push(B)}return S}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=mh(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const c=mh(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(Zs(l,i));else a.push(_r(l,i));return o&&(n?l.forEach(c=>{a.push(_a(c,!1,i))}):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map(o=>+o.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:se};break;case"fillPath":o={d:this.opsToPath(s),stroke:se,strokeWidth:0,fill:i.fill||se};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||se,strokeWidth:i,fill:se}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class aw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new is(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map(n=>+n.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}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,s,o,n=!1,l){const h=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const fa="http://www.w3.org/2000/svg";class sw{constructor(t,r){this.svg=t,this.gen=new is(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(fa,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(fa,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(fa,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(fa,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}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,s,o,n=!1,l){const h=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new aw(e,t),svg:(e,t)=>new sw(e,t),generator:e=>new is(e),newSeed:()=>is.newSeed()},Q=g(async(e,t,r)=>{var u,m;let i;const a=t.useHtmlLabels||ze((u=dt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",$t(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await He(o,xe(fr(n),dt()),{useHtmlLabels:a,width:t.width||((m=dt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},dt());let d=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(a){const y=c.children[0],f=st(c);await Zd(y,n),d=y.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return a?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:p,label:o}},"labelHelper"),Qs=g(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Zt(dt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await He(a,xe(fr(t),dt()),{useHtmlLabels:i,width:r.width||((h=(l=dt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Zt(dt())){const c=s.children[0],d=st(s);o=c.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),V=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(ht,"createPathFromPoints");function Ke(e,t,r,i,a,s){const o=[],l=r-e,h=i-t,c=l/s,d=2*Math.PI/c,p=t+h/2;for(let u=0;u<=50;u++){const m=u/50,y=e+m*l,f=p+a*Math.sin(d*(y-e));o.push({x:y,y:f})}return o}g(Ke,"generateFullSineWavePoints");function Yi(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-u,y:-m})}return o}g(Yi,"generateCirclePoints");function zo(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"),s=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(a){const l={fill:o(a,"fill"),"fill-opacity":o(a,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(s){const l={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(zo,"mergePaths");var ow=g((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,h=n):(a<0&&(o=-o),l=o,h=a===0?0:o*s/a),{x:r+l,y:i+h}},"intersectRect"),ai=ow,nw=g(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=dt(),n=Zt(o);return await He(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),je=nw,Je=g((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"),Ep=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Zt(r),u=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await He(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await je(u,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Zt(r)){const T=m.children[0],L=st(m);y=T.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}const f=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(f-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-f/2,k=t.y-C/2;I.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const T=Y.svg(d),L=j(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=T.path(Je(b,k,f,C,0),L);S=d.insert(()=>(I.debug("Rough node insert CXC",P),P),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",f).attr("height",C);const{subGraphTitleTopMargin:w}=Fn(r);if(u.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),n){const T=u.select("span");T&&T.attr("style",n)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=y.height-t.padding/2,t.intersect=function(T){return ai(t,T)},{cluster:d,labelBBox:y}},"rect"),lw=g((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,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return ai(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),hw=g(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const u=await je(d,t.label,t.labelStyle,void 0,!0);let m=u.getBBox();if(Zt(r)){const P=u.children[0],M=st(u);m=P.getBoundingClientRect(),M.attr("width",m.width),M.attr("height",m.height)}const y=0*t.padding,f=y/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+y,k=t.height+y-m.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-f+m.height+2;let T;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),M=Y.svg(h),E=t.rx||t.ry?M.path(Je(S,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):M.rectangle(S,w,C,b,{seed:a});T=h.insert(()=>E,":first-child");const z=M.rectangle(S,B,C,k,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:l,seed:a});T=h.insert(()=>E,":first-child"),p=h.insert(()=>z)}else T=c.insert("rect",":first-child"),T.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",B).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(Zt(r)?0:3)})`);const L=T.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(P){return ai(t,P)},{cluster:h,labelBBox:m}},"roundedWithTitle"),cw=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Zt(r),u=d.insert("g").attr("class","cluster-label "),m=await He(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=m.getBBox();if(Zt(r)){const T=m.children[0],L=st(m);y=T.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}const f=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(f-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-f/2,k=t.y-C/2;I.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const T=Y.svg(d),L=j(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=T.path(Je(b,k,f,C,t.rx),L);S=d.insert(()=>(I.debug("Rough node insert CXC",P),P),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",f).attr("height",C);const{subGraphTitleTopMargin:w}=Fn(r);if(u.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+w})`),n){const T=u.select("span");T&&T.attr("style",n)}const B=S.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=y.height-t.padding/2,t.intersect=function(T){return ai(t,T)},{cluster:d,labelBBox:y}},"kanbanSection"),uw=g((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,d=t.x-h/2,p=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const f=Y.svg(o).rectangle(d,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});u=o.insert(()=>f,":first-child")}else{u=n.insert("rect",":first-child");let y="outer";t.look,y="divider",u.attr("class",y).attr("x",d).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=u.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return ai(t,y)},{cluster:o,labelBBox:{}}},"divider"),dw=Ep,pw={rect:Ep,squareRect:dw,roundedWithTitle:hw,noteGroup:lw,divider:uw,kanbanSection:cw},Mp=new Map,gw=g(async(e,t)=>{const r=t.shape||"rect",i=await pw[r](e,t);return Mp.set(t.id,i),i},"insertCluster"),ZL=g(()=>{Mp=new Map},"clear");function Ip(e,t){return e.intersect(t)}g(Ip,"intersectNode");var fw=Ip;function Op(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<a&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<s&&(c=-c),{x:a+h,y:s+c}}g(Op,"intersectEllipse");var $p=Op;function Dp(e,t,r){return $p(e,t,t,r)}g(Dp,"intersectCircle");var mw=Dp;function Pp(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,h=1e-6;if(n!==0&&l!==0&&Wo(n,l))return;const c=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+p,m=c*t.x+d*t.y+p;if(Math.abs(u)<h&&Math.abs(m)<h&&Wo(u,m))return;const y=a*d-c*s;if(y===0)return;const f=Math.abs(y/2);let C=s*p-d*o;const b=C<0?(C-f)/y:(C+f)/y;C=c*o-a*p;const k=C<0?(C-f)/y:(C+f)/y;return{x:b,y:k}}}g(Pp,"intersectLine");function Wo(e,t){return e*t>0}g(Wo,"sameSign");var yw=Pp;function Rp(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=a-e.height/2-n;for(let c=0;c<t.length;c++){let d=t[c],p=t[c<t.length-1?c+1:0],u=yw(e,r,{x:l+d.x,y:h+d.y},{x:l+p.x,y:h+p.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(c,d){let p=c.x-r.x,u=c.y-r.y,m=Math.sqrt(p*p+u*u),y=d.x-r.x,f=d.y-r.y,C=Math.sqrt(y*y+f*f);return m<C?-1:m===C?0:1}),s[0]):e}g(Rp,"intersectPolygon");var Cw=Rp,H={node:fw,circle:mw,ellipse:$p,polygon:Cw,rect:ai};function qp(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Y.svg(s),h=j(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),d=s.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",$t(n)),V(t,d),t.intersect=function(p){return I.info("Circle intersect",t,o,p),H.circle(t,o,p)},s}g(qp,"anchor");function Ho(e,t,r,i,a,s,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,u=d/a,m=p/s,y=Math.sqrt(u**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const f=Math.sqrt(1-y**2),C=l+f*s*Math.sin(c)*(o?-1:1),b=h-f*a*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/s,(e-C)/a);let w=Math.atan2((i-b)/s,(r-C)/a)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const B=[];for(let T=0;T<20;T++){const L=T/19,P=k+L*w,M=C+a*Math.cos(P),E=b+s*Math.sin(P);B.push({x:M,y:E})}return B}g(Ho,"generateArcPoints");function Np(e,t,r){const[i,a]=[t,r].sort((s,o)=>o-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}g(Np,"calculateArcSagitta");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=g(P=>P+o,"calcTotalHeight"),l=g(P=>{const M=P/2;return[M/(2.5+P/50),M]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await Q(e,t,K(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,u]=l(d),m=Np(d,p,u),f=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+m-m,C=d,{cssStyles:b}=t,k=[{x:f/2,y:-C/2},{x:-f/2,y:-C/2},...Ho(-f/2,-C/2,-f/2,C/2,p,u,!1),{x:f/2,y:C/2},...Ho(f/2,C/2,f/2,-C/2,p,u,!0)],S=Y.svg(h),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=ht(k),T=S.path(B,w),L=h.insert(()=>T,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${p/2}, 0)`),V(t,L),t.intersect=function(P){return H.polygon(t,k,P)},h}g(zp,"bowTieRect");function Ye(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+")")}g(Ye,"insertPolygonShape");var ma=12;async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,o=t.look==="neo"?24:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+ma),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),d=0,p=h,u=-c,m=0,y=[{x:d+ma,y:u},{x:p,y:u},{x:p,y:m},{x:d,y:m},{x:d,y:u+ma},{x:d+ma,y:u}];let f;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(n),k=j(t,{}),S=ht(y),w=b.path(S,k);f=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&f.attr("style",C)}else f=Ye(n,h,c,y);return i&&f.attr("style",i),V(t,f),t.intersect=function(b){return H.polygon(t,y,b)},n}g(Wp,"card");function Hp(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=Y.svg(i),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=ht(o),c=n.path(h,l),d=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return H.polygon(t,o,p)},i}g(Hp,"choice");async function Wn(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await Q(e,t,K(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Y.svg(s),m=j(t,{}),y=u.circle(0,0,c*2,m);d=s.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",$t(p))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return V(t,d),t.calcIntersect=function(u,m){const y=u.width/2;return H.circle(u,y,m)},t.intersect=function(u){return I.info("Circle intersect",t,c,u),H.circle(t,c,u)},s}g(Wn,"circle");function Yp(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},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
|
|
229
|
-
M ${a.x},${a.y} L ${o.x},${o.y}`}g(Yp,"createLine");function Up(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Y.svg(a),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,s*2,l),c=Yp(s),d=n.path(c,l),p=a.insert(()=>h,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),V(t,p),t.intersect=function(u){return I.info("crossedCircle intersect",t,{radius:s,point:u}),H.circle(t,s,u)},a}g(Up,"crossedCircle");function $e(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-u,y:-m})}return o}g($e,"generateCirclePoints");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await Q(e,t,K(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+n,c=s.height+l,d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...$e(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...$e(h/2+d*2,-d,d,20,-180,-270),...$e(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...$e(h/2,c/2,d,20,0,90)],m=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...$e(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...$e(h/2+h*.1,-d,d,20,-180,-270),...$e(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...$e(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],y=Y.svg(a),f=j(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const b=ht(u).replace("Z",""),k=y.path(b,f),S=ht(m),w=y.path(S,{...f}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-h/2+d-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),V(t,B),t.intersect=function(T){return H.polygon(t,m,T)},a}g(jp,"curlyBraceLeft");function De(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:u,y:m})}return o}g(De,"generateCirclePoints");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await Q(e,t,K(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?n*2:n),c=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...De(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...De(h/2+d*2,-d,d,20,-180,-270),...De(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...De(h/2,c/2,d,20,0,90)],m=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...De(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...De(h/2+d*2,-d,d,20,-180,-270),...De(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...De(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],y=Y.svg(a),f=j(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const b=ht(u).replace("Z",""),k=y.path(b,f),S=ht(m),w=y.path(S,{...f}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),V(t,B),t.intersect=function(T){return H.polygon(t,m,T)},a}g(Gp,"curlyBraceRight");function Pt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-u,y:-m})}return o}g(Pt,"generateCirclePoints");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await Q(e,t,K(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?n*2:n),c=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...Pt(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...Pt(h/2+d*2,-d,d,20,-180,-270),...Pt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...Pt(h/2,c/2,d,20,0,90)],m=[...Pt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Pt(-h/2-d/2,-d,d,20,0,90),...Pt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Pt(-h/2+d+d/2,c/2,d,30,-180,-270)],y=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...Pt(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...Pt(h/2+d*2,-d,d,20,-180,-270),...Pt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...Pt(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...Pt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Pt(-h/2-d/2,-d,d,20,0,90),...Pt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Pt(-h/2+d+d/2,c/2,d,30,-180,-270)],f=Y.svg(a),C=j(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ht(u).replace("Z",""),S=f.path(k,C),B=ht(m).replace("Z",""),T=f.path(B,C),L=ht(y),P=f.path(L,{...C}),M=a.insert("g",":first-child");return M.insert(()=>P,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>T,":first-child"),M.attr("class","text"),p&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),V(t,M),t.intersect=function(E){return H.polygon(t,y,E)},a}g(Vp,"curlyBraces");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=20,l=5,{shapeSvg:h,bbox:c}=await Q(e,t,K(t)),d=Math.max(n,(c.width+s*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),u=p/2,{cssStyles:m}=t,y=Y.svg(h),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const C=d,b=p,k=C-u,S=b/4,w=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...Yi(-k,-b/2,u,50,270,90)],B=ht(w),T=y.path(B,f),L=h.insert(()=>T,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-d/2}, ${-p/2})`),V(t,L),t.intersect=function(P){return H.polygon(t,w,P)},h}g(Xp,"curvedTrapezoid");var xw=g((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),bw=g((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),kw=g((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),kh=8,Th=8;async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,o=t.look==="neo"?24:a;if(t.width||t.height){const f=t.width??0;t.width=(t.width??0)-o,t.width<Th&&(t.width=Th);const b=f/2/(2.5+f/50);t.height=(t.height??0)-s-b*3,t.height<kh&&(t.height=kh)}const{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=(t.width?t.width:l.width)+o,d=c/2,p=d/(2.5+c/50),u=(t.height?t.height:l.height)+s+p;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const f=Y.svg(n),C=bw(0,0,c,u,d,p),b=kw(0,p,c,u,d,p),k=j(t,{}),S=f.path(C,k),w=f.path(b,j(t,{fill:"none"}));m=n.insert(()=>w,":first-child"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const f=xw(0,0,c,u,d,p);m=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container outer-path").attr("style",$t(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),V(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(f){const C=H.rect(t,f),b=C.x-(t.x??0);if(d!=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-p)){let k=p*p*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,f.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}g(Zp,"cylinder");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=n.width+a,c=n.height+s,d=c*.2,p=-h/2,u=-c/2-d/2,{cssStyles:m}=t,y=Y.svg(o),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const C=[{x:p,y:u+d},{x:-p,y:u+d},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+d}],b=y.polygon(C.map(S=>[S.x,S.y]),f),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),V(t,k),t.intersect=function(S){return H.rect(t,S)},o}g(Kp,"dividedRectangle");async function Qp(e,t){var u,m;const{labelStyles:r,nodeStyles:i}=G(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-a;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const y=Y.svg(n),f=j(t,{roughness:.2,strokeWidth:2.5}),C=j(t,{roughness:.2,strokeWidth:1.5}),b=y.circle(0,0,h*2,f),k=y.circle(0,0,c*2,C);d=n.insert("g",":first-child"),d.attr("class",$t(t.cssClasses)).attr("style",$t(p)),(u=d.node())==null||u.appendChild(b),(m=d.node())==null||m.appendChild(k)}else{d=n.insert("g",":first-child");const y=d.insert("circle",":first-child"),f=d.insert("circle");d.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return V(t,d),t.intersect=function(y){return I.info("DoubleCircle intersect",t,h,y),H.circle(t,h,y)},n}g(Qp,"doublecircle");function Jp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Y.svg(s),{nodeBorder:h}=r,c=j(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,o*2,c),p=s.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),V(t,p),t.intersect=function(u){return I.info("filledCircle intersect",t,{radius:o,point:u}),H.circle(t,o,u)},s}g(Jp,"filledCircle");var Sh=10,wh=10;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Sh&&(t.height=Sh),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<wh&&(t.width=wh));const{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(s??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=c,p=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,m=Y.svg(o),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=ht(p),C=m.path(f,y),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,V(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return I.info("Triangle intersect",t,p,k),H.polygon(t,p,k)},o}g(tg,"flippedTriangle");function eg(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=G(t);t.label="";const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,d=-1*h/2,p=Y.svg(o),u=j(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const m=p.rectangle(c,d,l,h,u),y=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),V(t,y);const f=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=f/2||0,t.height+=f/2||0),t.intersect=function(C){return H.rect(t,C)},o}g(eg,"forkJoin");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=15,s=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:h}=await Q(e,t,K(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+n*2,p=d/2,{cssStyles:u}=t,m=Y.svg(l),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-c/2,y:-d/2},{x:c/2-p,y:-d/2},...Yi(-c/2+p,0,p,50,90,270),{x:c/2-p,y:d/2},{x:-c/2,y:d/2}],C=ht(f),b=m.path(C,y),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),V(t,k),t.intersect=function(S){return I.info("Pill intersect",t,{radius:p,point:S}),H.polygon(t,f,S)},l}g(rg,"halfRoundedRectangle");var Tw=g((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 ig(e,t){const{labelStyles:r,nodeStyles:i}=G(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,o=70,n=32,l=t.look==="neo"?o:s,h=t.look==="neo"?n:s;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:d}=await Q(e,t,K(t)),p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=p/a,m=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,y=[{x:u,y:0},{x:m-u,y:0},{x:m,y:-p/2},{x:m-u,y:-p},{x:u,y:-p},{x:0,y:-p/2}];let f;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(c),k=j(t,{}),S=Tw(0,0,m,p,u),w=b.path(S,k);f=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&f.attr("style",C)}else f=Ye(c,m,p,y);return i&&f.attr("style",i),t.width=m,t.height=p,V(t,f),t.intersect=function(b){return H.polygon(t,y,b)},c}g(ig,"hexagon");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await Q(e,t,K(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Y.svg(a),h=j(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],d=ht(c),p=l.path(d,h),u=a.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-o/2})`),V(t,u),t.intersect=function(m){return I.info("Pill intersect",t,{points:c}),H.polygon(t,c,m)},a}g(ag,"hourglass");async function sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await Q(e,t,"icon-shape default"),p=t.pos==="t",u=n,m=n,{nodeBorder:y}=r,{stylesMap:f}=ii(t),C=-m/2,b=-u/2,k=t.label?8:0,S=Y.svg(h),w=j(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=S.rectangle(C,b,m,u,w),T=Math.max(m,c.width),L=u+c.height+k,P=S.rectangle(-T/2,-L/2,T,L,{...w,fill:"transparent",stroke:"none"}),M=h.insert(()=>B,":first-child"),E=h.insert(()=>P);if(t.icon){const z=h.append("g");z.html(`<g>${await Ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const D=z.node().getBBox(),q=D.width,N=D.height,R=D.x,W=D.y;z.attr("transform",`translate(${-q/2-R},${p?c.height/2+k/2-N/2-W:-c.height/2-k/2-N/2-W})`),z.attr("style",`color: ${f.get("stroke")??y};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),M.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),V(t,E),t.intersect=function(z){if(I.info("iconSquare intersect",t,z),!t.label)return H.rect(t,z);const D=t.x??0,q=t.y??0,N=t.height??0;let R=[];return p?R=[{x:D-c.width/2,y:q-N/2},{x:D+c.width/2,y:q-N/2},{x:D+c.width/2,y:q-N/2+c.height+k},{x:D+m/2,y:q-N/2+c.height+k},{x:D+m/2,y:q+N/2},{x:D-m/2,y:q+N/2},{x:D-m/2,y:q-N/2+c.height+k},{x:D-c.width/2,y:q-N/2+c.height+k}]:R=[{x:D-m/2,y:q-N/2},{x:D+m/2,y:q-N/2},{x:D+m/2,y:q-N/2+u},{x:D+c.width/2,y:q-N/2+u},{x:D+c.width/2/2,y:q+N/2},{x:D-c.width/2,y:q+N/2},{x:D-c.width/2,y:q-N/2+u},{x:D-m/2,y:q-N/2+u}],H.polygon(t,R,z)},h}g(sg,"icon");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await Q(e,t,"icon-shape default"),p=20,u=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:f}=r,{stylesMap:C}=ii(t),b=Y.svg(h),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??f;const w=h.append("g");t.icon&&w.html(`<g>${await Ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),T=B.width,L=B.height,P=B.x,M=B.y,E=Math.max(T,L)*Math.SQRT2+p*2,z=b.circle(0,0,E,k),D=Math.max(E,c.width),q=E+c.height+u,N=b.rectangle(-D/2,-q/2,D,q,{...k,fill:"transparent",stroke:"none"}),R=h.insert(()=>z,":first-child"),W=h.insert(()=>N);return w.attr("transform",`translate(${-T/2-P},${m?c.height/2+u/2-L/2-M:-c.height/2-u/2-L/2-M})`),w.attr("style",`color: ${C.get("stroke")??y};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-q/2:q/2-c.height})`),R.attr("transform",`translate(0,${m?c.height/2+u/2:-c.height/2-u/2})`),V(t,W),t.intersect=function($){return I.info("iconSquare intersect",t,$),H.rect(t,$)},h}g(og,"iconCircle");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),u=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:f,mainBkg:C}=r,{stylesMap:b}=ii(t),k=-y/2,S=-m/2,w=t.label?8:0,B=Y.svg(h),T=j(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=b.get("fill");T.stroke=L??C;const P=B.path(Je(k,S,y,m,5),T),M=Math.max(y,c.width),E=m+c.height+w,z=B.rectangle(-M/2,-E/2,M,E,{...T,fill:"transparent",stroke:"none"}),D=h.insert(()=>P,":first-child").attr("class","icon-shape2"),q=h.insert(()=>z);if(t.icon){const N=h.append("g");N.html(`<g>${await Ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),W=R.width,$=R.height,J=R.x,nt=R.y;N.attr("transform",`translate(${-W/2-J},${u?c.height/2+w/2-$/2-nt:-c.height/2-w/2-$/2-nt})`),N.attr("style",`color: ${b.get("stroke")??f};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-E/2:E/2-c.height})`),D.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),V(t,q),t.intersect=function(N){if(I.info("iconSquare intersect",t,N),!t.label)return H.rect(t,N);const R=t.x??0,W=t.y??0,$=t.height??0;let J=[];return u?J=[{x:R-c.width/2,y:W-$/2},{x:R+c.width/2,y:W-$/2},{x:R+c.width/2,y:W-$/2+c.height+w},{x:R+y/2,y:W-$/2+c.height+w},{x:R+y/2,y:W+$/2},{x:R-y/2,y:W+$/2},{x:R-y/2,y:W-$/2+c.height+w},{x:R-c.width/2,y:W-$/2+c.height+w}]:J=[{x:R-y/2,y:W-$/2},{x:R+y/2,y:W-$/2},{x:R+y/2,y:W-$/2+m},{x:R+c.width/2,y:W-$/2+m},{x:R+c.width/2/2,y:W+$/2},{x:R-c.width/2,y:W+$/2},{x:R-c.width/2,y:W-$/2+m},{x:R-y/2,y:W-$/2+m}],H.polygon(t,J,N)},h}g(ng,"iconRounded");async function lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),u=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:f,mainBkg:C}=r,{stylesMap:b}=ii(t),k=-y/2,S=-m/2,w=t.label?8:0,B=Y.svg(h),T=j(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=b.get("fill");T.stroke=L??C;const P=B.path(Je(k,S,y,m,.1),T),M=Math.max(y,c.width),E=m+c.height+w,z=B.rectangle(-M/2,-E/2,M,E,{...T,fill:"transparent",stroke:"none"}),D=h.insert(()=>P,":first-child"),q=h.insert(()=>z);if(t.icon){const N=h.append("g");N.html(`<g>${await Ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),W=R.width,$=R.height,J=R.x,nt=R.y;N.attr("transform",`translate(${-W/2-J},${u?c.height/2+w/2-$/2-nt:-c.height/2-w/2-$/2-nt})`),N.attr("style",`color: ${b.get("stroke")??f};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-E/2:E/2-c.height})`),D.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),V(t,q),t.intersect=function(N){if(I.info("iconSquare intersect",t,N),!t.label)return H.rect(t,N);const R=t.x??0,W=t.y??0,$=t.height??0;let J=[];return u?J=[{x:R-c.width/2,y:W-$/2},{x:R+c.width/2,y:W-$/2},{x:R+c.width/2,y:W-$/2+c.height+w},{x:R+y/2,y:W-$/2+c.height+w},{x:R+y/2,y:W+$/2},{x:R-y/2,y:W+$/2},{x:R-y/2,y:W-$/2+c.height+w},{x:R-c.width/2,y:W-$/2+c.height+w}]:J=[{x:R-y/2,y:W-$/2},{x:R+y/2,y:W-$/2},{x:R+y/2,y:W-$/2+m},{x:R+c.width/2,y:W-$/2+m},{x:R+c.width/2/2,y:W+$/2},{x:R-c.width/2,y:W+$/2},{x:R-c.width/2,y:W-$/2+m},{x:R-y/2,y:W-$/2+m}],H.polygon(t,J,N)},h}g(lg,"iconSquare");async function hg(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","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=G(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??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)??s;t.width=Math.max(h,n??0);const{shapeSvg:d,bbox:p,label:u}=await Q(e,t,"image-shape default"),m=t.pos==="t",y=-h/2,f=-c/2,C=t.label?8:0,b=Y.svg(d),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(y,f,h,c,k),w=Math.max(h,p.width),B=c+p.height+C,T=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),L=d.insert(()=>S,":first-child"),P=d.insert(()=>T);if(t.img){const M=d.append("image");M.attr("href",t.img),M.attr("width",h),M.attr("height",c),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-h/2},${m?B/2-c:-B/2})`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),L.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),V(t,P),t.intersect=function(M){if(I.info("iconSquare intersect",t,M),!t.label)return H.rect(t,M);const E=t.x??0,z=t.y??0,D=t.height??0;let q=[];return m?q=[{x:E-p.width/2,y:z-D/2},{x:E+p.width/2,y:z-D/2},{x:E+p.width/2,y:z-D/2+p.height+C},{x:E+h/2,y:z-D/2+p.height+C},{x:E+h/2,y:z+D/2},{x:E-h/2,y:z+D/2},{x:E-h/2,y:z-D/2+p.height+C},{x:E-p.width/2,y:z-D/2+p.height+C}]:q=[{x:E-h/2,y:z-D/2},{x:E+h/2,y:z-D/2},{x:E+h/2,y:z-D/2+c},{x:E+p.width/2,y:z-D/2+c},{x:E+p.width/2/2,y:z+D/2},{x:E-p.width/2,y:z+D/2},{x:E-p.width/2,y:z-D/2+c},{x:E-h/2,y:z-D/2+c}],H.polygon(t,q,M)},d}g(hg,"imageSquare");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(s??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(n),y=j(t,{}),f=ht(d),C=m.path(f,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ye(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,V(t,p),t.intersect=function(m){return H.polygon(t,d,m)},n}g(cg,"inv_trapezoid");async function ea(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await Q(e,t,K(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let d,{rx:p,ry:u}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,u=r.ry),t.look==="handDrawn"){const y=Y.svg(s),f=j(t,{}),C=p||u?y.path(Je(h,c,n,l,p||0),f):y.rectangle(h,c,n,l,f);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",$t(m))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",$t(p)).attr("ry",$t(u)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return V(t,d),t.calcIntersect=function(y,f){return H.rect(y,f)},t.intersect=function(y){return H.rect(t,y)},s}g(ea,"drawRect");async function ug(e,t){const{shapeSvg:r,bbox:i,label:a}=await Q(e,t,"label"),s=r.insert("rect",":first-child");return s.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))})`),V(t,s),t.intersect=function(l){return H.rect(t,l)},r}g(ug,"labelRect");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(n),y=j(t,{}),f=ht(d),C=m.path(f,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=Ye(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,V(t,p),t.intersect=function(m){return H.polygon(t,d,m)},n}g(dg,"lean_left");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(n),y=j(t,{}),f=ht(d),C=m.path(f,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=Ye(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,V(t,p),t.intersect=function(m){return H.polygon(t,d,m)},n}g(pg,"lean_right");function gg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=Y.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=ht(h),u=c.path(p,d),m=a.insert(()=>u,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),V(t,m),t.intersect=function(y){return I.info("lightningBolt intersect",t,y),H.polygon(t,h,y)},a}g(gg,"lightningBolt");var Sw=g((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ww=g((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),vw=g((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),vh=10,Bh=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<Bh&&(t.width=Bh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<vh&&(t.height=vh)}const{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,d=c/2,p=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,m=u*.1;let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const C=Y.svg(n),b=ww(0,0,c,u,d,p,m),k=vw(0,p,c,u,d,p),S=j(t,{}),w=C.path(b,S),B=C.path(k,S);n.insert(()=>B,":first-child").attr("class","line"),y=n.insert(()=>w,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{const C=Sw(0,0,c,u,d,p,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",$t(f)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),V(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=H.rect(t,C),k=b.x-(t.x??0);if(d!=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-p)){let S=p*p*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}g(fg,"linedCylinder");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?d/4:d/8,u=d+p,{cssStyles:m}=t,y=Y.svg(n),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...Ke(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,p,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],b=y.polygon(C.map(S=>[S.x,S.y]),f),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),V(t,k),t.intersect=function(S){return H.polygon(t,C,S)},n}g(mg,"linedWaveEdgedRect");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await Q(e,t,K(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,u=d-2*n,m=p-2*n,y=-u/2,f=-m/2,{cssStyles:C}=t,b=Y.svg(l),k=j(t,{}),S=[{x:y-n,y:f+n},{x:y-n,y:f+m+n},{x:y+u-n,y:f+m+n},{x:y+u-n,y:f+m},{x:y+u,y:f+m},{x:y+u,y:f+m-n},{x:y+u+n,y:f+m-n},{x:y+u+n,y:f-n},{x:y+n,y:f-n},{x:y+n,y:f},{x:y,y:f},{x:y,y:f+n}],w=[{x:y,y:f+n},{x:y+u-n,y:f+n},{x:y+u-n,y:f+m},{x:y+u,y:f+m},{x:y+u,y:f},{x:y,y:f}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=ht(S);let T=b.path(B,k);const L=ht(w);let P=b.path(L,k);t.look!=="handDrawn"&&(T=zo(T),P=zo(P));const M=l.insert("g",":first-child");return M.insert(()=>T),M.insert(()=>P),M.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),V(t,M),t.intersect=function(E){return H.polygon(t,S,E)},l}g(yg,"multiRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await Q(e,t,K(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?p/4:p/8,m=p+(c?u/2:-u/2),y=-d/2,f=-m/2,C=10,{cssStyles:b}=t,k=Ke(y-C,f+m+C,y+d-C,f+m+C,u,.8),S=k==null?void 0:k[k.length-1],w=[{x:y-C,y:f+C},{x:y-C,y:f+m+C},...k,{x:y+d-C,y:S.y-C},{x:y+d,y:S.y-C},{x:y+d,y:S.y-2*C},{x:y+d+C,y:S.y-2*C},{x:y+d+C,y:f-C},{x:y+C,y:f-C},{x:y+C,y:f},{x:y,y:f},{x:y,y:f+C}],B=[{x:y,y:f+C},{x:y+d-C,y:f+C},{x:y+d-C,y:S.y-C},{x:y+d,y:S.y-C},{x:y+d,y:f},{x:y,y:f}],T=Y.svg(a),L=j(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=ht(w),M=T.path(P,L),E=ht(B),z=T.path(E,L),D=a.insert(()=>M,":first-child");return D.insert(()=>z),D.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),V(t,D),t.intersect=function(q){return H.polygon(t,w,q)},a}g(Cg,"multiWaveEdgedRectangle");async function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||Zt(bt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,p=-c/2,{cssStyles:u}=t,m=Y.svg(o),y=j(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=m.rectangle(d,p,h,c,y),C=o.insert(()=>f,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),V(t,C),t.intersect=function(b){return H.rect(t,b)},o}g(xg,"note");var Bw=g((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 bg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await Q(e,t,K(t)),o=s.width+(t.padding??0),n=s.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Y.svg(a),m=j(t,{}),y=Bw(0,0,l),f=u.path(y,m);d=a.insert(()=>f,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&d.attr("style",p)}else d=Ye(a,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),V(t,d),t.calcIntersect=function(u,m){const y=u.width,f=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=H.polygon(u,f,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},a}g(bg,"question");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,o=t.look==="neo"?12:a??0,{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,u=-d/2,m=u/2,y=[{x:p+m,y:u},{x:p,y:0},{x:p+m,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:f}=t,C=Y.svg(n),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ht(y),S=C.path(k,b),w=n.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),V(t,w),t.intersect=function(B){return H.polygon(t,y,B)},n}g(kg,"rect_left_inv_arrow");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await je(n,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(Zt(dt())){const L=c.children[0],P=st(c);d=L.getBoundingClientRect(),P.attr("width",d.width),P.attr("height",d.height)}I.info("Text 2",l);const p=l||[],u=c.getBBox(),m=await je(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=m.children[0],f=st(m);d=y.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height);const C=(t.padding||0)/2;st(m).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),st(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-C,w=-d.height/2-C;let B,T;if(t.look==="handDrawn"){const L=Y.svg(s),P=j(t,{}),M=L.path(Je(S,w,b,k,t.rx||0),P),E=L.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,P);T=s.insert(()=>(I.debug("Rough node insert CXC",M),E),":first-child"),B=s.insert(()=>(I.debug("Rough node insert CXC",M),M),":first-child")}else B=o.insert("rect",":first-child"),T=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return V(t,B),t.intersect=function(L){return H.rect(t,L)},s}g(Tg,"rectWithTitle");async function Sg(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 ea(e,t,a)}g(Sg,"roundedRect");var rr=8;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.width)??n.width)+a*2+(t.look==="neo"?rr:rr*2),c=((t==null?void 0:t.height)??n.height)+s*2,d=h-rr,p=c,u=rr-h/2,m=-c/2,{cssStyles:y}=t,f=Y.svg(o),C=j(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y:m},{x:u+d,y:m},{x:u+d,y:m+p},{x:u-rr,y:m+p},{x:u-rr,y:m},{x:u,y:m},{x:u,y:m+p}],k=f.polygon(b.map(w=>[w.x,w.y]),C),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",$t(y)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${rr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),V(t,S),t.intersect=function(w){return H.rect(t,w)},o}g(wg,"shadedProcess");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,u=d/1.5,m=-p/2,y=-u/2,{cssStyles:f}=t,C=Y.svg(n),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+u},{x:m+p,y:y+u},{x:m+p,y:y-u/2}],S=ht(k),w=C.path(S,b),B=n.insert(()=>w,":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),B.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),V(t,B),t.intersect=function(T){return H.polygon(t,k,T)},n}g(vg,"slopedRect");async function Bg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return ea(e,t,s)}g(Bg,"squareRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?s*2:s),d=h/2,{cssStyles:p}=t,u=Y.svg(n),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...Yi(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...Yi(c/2-d,0,d,50,270,450)],f=ht(y),C=u.path(f,m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),V(t,b),t.intersect=function(k){return H.polygon(t,y,k)},n}g(_g,"stadium");async function Lg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ea(e,t,r)}g(Lg,"state");function Fg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=Y.svg(c),p=j(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=d.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,f=d.circle(0,0,y,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>f),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return V(t,C),t.intersect=function(S){return H.circle(t,(t.width??0)/2,S)},c}g(Fg,"stateEnd");function Ag(e,t,{config:{themeVariables:r}}){var n,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 s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=Y.svg(s).circle(0,0,t.width,$T(i));o=s.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return V(t,o),t.intersect=function(h){return H.circle(t,(t.width??7)/2,h)},s}g(Ag,"stateStart");var Lr=8;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.width)??l.width)+2*Lr+s,c=((t==null?void 0:t.height)??l.height)+o,d=h-2*Lr,p=c,u=-h/2,m=-c/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const f=Y.svg(n),C=j(t,{}),b=f.rectangle(u,m,d+16,p,C),k=f.line(u+Lr,m,u+Lr,m+p,C),S=f.line(u+Lr+d,m,u+Lr+d,m+p,C);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",$t(B)),V(t,w)}else{const f=Ye(n,d,p,y);i&&f.attr("style",i),V(t,f)}return t.intersect=function(f){return H.polygon(t,y,f)},n}g(Eg,"subroutine");var Js=.2;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Js*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Js*h,d=Js*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+c-c,m=h,y=-u/2,f=-m/2,{cssStyles:C}=t,b=Y.svg(n),k=j(t,{}),S=[{x:y-c/2,y:f},{x:y+u+c/2,y:f},{x:y+u+c/2,y:f+m},{x:y-c/2,y:f+m}],w=[{x:y+u-c/2,y:f+m},{x:y+u+c/2,y:f+m},{x:y+u+c/2,y:f+m-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=ht(S),T=b.path(B,k),L=ht(w),P=b.path(L,{...k,fillStyle:"solid"}),M=n.insert(()=>P,":first-child");return M.insert(()=>T,":first-child"),M.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),V(t,M),t.intersect=function(E){return H.polygon(t,S,E)},n}g(Mg,"taggedRect");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await Q(e,t,K(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,d=.2*l,p=l+h,{cssStyles:u}=t,m=Y.svg(a),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-n/2-n/2*.1,y:p/2},...Ke(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...Ke(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],S=ht(f),w=m.path(S,y),B=ht(k),T=m.path(B,{...y,fillStyle:"solid"}),L=a.insert(()=>T,":first-child");return L.insert(()=>w,":first-child"),L.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),V(t,L),t.intersect=function(P){return H.polygon(t,f,P)},a}g(Ig,"taggedWaveEdgedRectangle");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await Q(e,t,K(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/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",o).attr("height",n),V(t,c),t.intersect=function(d){return H.rect(t,d)},a}g(Og,"text");var _w=g((e,t,r,i,a,s)=>`M${e},${t}
|
|
230
|
-
a${a},${s} 0,0,1 0,${-i}
|
|
231
|
-
l${r},0
|
|
232
|
-
a${a},${s} 0,0,1 0,${i}
|
|
233
|
-
M${r},${-i}
|
|
234
|
-
a${a},${s} 0,0,0 0,${i}
|
|
235
|
-
l${-r},0`,"createCylinderPathD"),Lw=g((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Fw=g((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),_h=5,Lh=10;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const y=t.height??0;t.height=(t.height??0)-s,t.height<_h&&(t.height=_h);const C=y/2/(2.5+y/50);t.width=(t.width??0)-s-C*3,t.width<Lh&&(t.width=Lh)}const{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=(t.height?t.height:n.height)+s,c=h/2,d=c/(2.5+h/50),p=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let m;if(t.look==="handDrawn"){const y=Y.svg(o),f=Lw(0,0,p,h,d,c),C=Fw(0,0,p,h,d,c),b=y.path(f,j(t,{})),k=y.path(C,j(t,{fill:"none"}));m=o.insert(()=>k,":first-child"),m=o.insert(()=>b,":first-child"),m.attr("class","basic label-container"),u&&m.attr("style",u)}else{const y=_w(0,0,p,h,d,c);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",$t(u)).attr("style",i),m.attr("class","basic label-container outer-path"),u&&m.selectAll("path").attr("style",u),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),V(t,m),t.intersect=function(y){const f=H.rect(t,y),C=f.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(f.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(t.x??0)>0&&(b=-b),f.x+=b}return f},o}g($g,"tiltedCylinder");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(n),y=j(t,{}),f=ht(d),C=m.path(f,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=Ye(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,V(t,p),t.intersect=function(m){return H.polygon(t,d,m)},n}g(Dg,"trapezoid");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await Q(e,t,K(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:u}=t,m=Y.svg(h),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-d/2*.8,y:-p/2},{x:d/2*.8,y:-p/2},{x:d/2,y:-p/2*.6},{x:d/2,y:p/2},{x:-d/2,y:p/2},{x:-d/2,y:-p/2*.6}],C=ht(f),b=m.path(C,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),V(t,k),t.intersect=function(S){return H.polygon(t,f,S)},h}g(Pg,"trapezoidalPentagon");var Fh=10,Ah=10;async function Rg(e,t){var S;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<Ah&&(t.width=Ah),t.height=(t==null?void 0:t.height)??0,t.height<Fh&&(t.height=Fh));const{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=ze((S=dt().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s,d=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=d,u=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:m}=t,y=Y.svg(o),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const C=ht(u),b=y.path(C,f),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=d,V(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return I.info("Triangle intersect",t,u,w),H.polygon(t,u,w)},o}g(Rg,"triangle");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await Q(e,t,K(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,u=t.look==="neo"?p/4:p/8,m=p+(n?u:-u),{cssStyles:y}=t,C=14-d,b=C>0?C/2:0,k=Y.svg(l),S=j(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-d/2-b,y:m/2},...Ke(-d/2-b,m/2,d/2+b,m/2,u,.8),{x:d/2+b,y:-m/2},{x:-d/2-b,y:-m/2}],B=ht(w),T=k.path(B,S),L=l.insert(()=>T,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-u-(h.y-(h.top??0))})`),V(t,L),t.intersect=function(P){return H.polygon(t,w,P)},l}g(qg,"waveEdgedRectangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=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 S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-S*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await Q(e,t,K(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,d=c/8,p=c+d*2,{cssStyles:u}=t,m=Y.svg(n),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-h/2,y:p/2},...Ke(-h/2,p/2,h/2,p/2,d,1),{x:h/2,y:-p/2},...Ke(h/2,-p/2,-h/2,-p/2,d,-1)],C=ht(f),b=m.path(C,y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),V(t,k),t.intersect=function(S){return H.polygon(t,f,S)},n}g(Ng,"waveRectangle");var Tt=10;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Tt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Tt,10));const{shapeSvg:o,bbox:n,label:l}=await Q(e,t,K(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a*2+Tt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+s*2+Tt,d=h-Tt,p=c-Tt,u=-d/2,m=-p/2,{cssStyles:y}=t,f=Y.svg(o),C=j(t,{}),b=[{x:u-Tt,y:m-Tt},{x:u-Tt,y:m+p},{x:u+d,y:m+p},{x:u+d,y:m-Tt}],k=`M${u-Tt},${m-Tt} L${u+d},${m-Tt} L${u+d},${m+p} L${u-Tt},${m+p} L${u-Tt},${m-Tt}
|
|
236
|
-
M${u-Tt},${m} L${u+d},${m}
|
|
237
|
-
M${u},${m-Tt} L${u},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=f.path(k,C),w=o.insert(()=>S,":first-child");return w.attr("transform",`translate(${Tt/2}, ${Tt/2})`),w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Tt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Tt/2-(n.y-(n.top??0))})`),V(t,w),t.intersect=function(B){return H.polygon(t,b,B)},o}g(zg,"windowPane");var Eh=new Set(["redux-color","redux-dark-color"]),Aw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Hn(e,t){var Ft,le,re,si;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=bt(),{rowEven:s,rowOdd:o,nodeBorder:n,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:it}=bt(),{background:lt}=it,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${lt}`]};await Hn(e,kt)}const h=bt();t.useHtmlLabels=h.htmlLabels;let c=((Ft=h.er)==null?void 0:Ft.diagramPadding)??10,d=((le=h.er)==null?void 0:le.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:u,nodeStyles:m}=G(t);if(r.attributes.length===0&&t.label){const it={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ne(t.label,h)+it.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const lt=await ea(e,t,it);if(i!=null&&Eh.has(i)){const kt=r.colorIndex??0;lt.attr("data-color-id",`color-${kt%l.length}`)}if(!ze(h.htmlLabels)){const kt=lt.select("text"),wt=(re=kt.node())==null?void 0:re.getBBox();kt.attr("transform",`translate(${-wt.width/2}, 0)`)}return lt}h.htmlLabels||(c*=1.25,d*=1.25);let y=K(t);y||(y="node default");const f=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await Mr(f,t.label??"",h,0,0,["name"],u);C.height+=d;let b=0;const k=[],S=[];let w=0,B=0,T=0,L=0,P=!0,M=!0;for(const it of r.attributes){const lt=await Mr(f,it.type,h,0,b,["attribute-type"],u);w=Math.max(w,lt.width+c);const kt=await Mr(f,it.name,h,0,b,["attribute-name"],u);B=Math.max(B,kt.width+c);const wt=await Mr(f,it.keys.join(),h,0,b,["attribute-keys"],u);T=Math.max(T,wt.width+c);const ie=await Mr(f,it.comment,h,0,b,["attribute-comment"],u);L=Math.max(L,ie.width+c);const Nt=Math.max(lt.height,kt.height,wt.height,ie.height)+d;S.push({yOffset:b,rowHeight:Nt}),b+=Nt}let E=4;T<=c&&(P=!1,T=0,E--),L<=c&&(M=!1,L=0,E--);const z=f.node().getBBox();if(C.width+c*2-(w+B+T+L)>0){const it=C.width+c*2-(w+B+T+L);w+=it/E,B+=it/E,T>0&&(T+=it/E),L>0&&(L+=it/E)}const D=w+B+T+L,q=Y.svg(f),N=j(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let R=0;S.length>0&&(R=S.reduce((it,lt)=>it+((lt==null?void 0:lt.rowHeight)??0),0));const W=Math.max(z.width+c*2,(t==null?void 0:t.width)||0,D),$=Math.max((R??0)+C.height,(t==null?void 0:t.height)||0),J=-W/2,nt=-$/2;if(f.selectAll("g:not(:first-child)").each((it,lt,kt)=>{const wt=st(kt[lt]),ie=wt.attr("transform");let Nt=0,Tr=0;if(ie){const Te=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);Te&&(Nt=parseFloat(Te[1]),Tr=parseFloat(Te[2]),wt.attr("class").includes("attribute-name")?Nt+=w:wt.attr("class").includes("attribute-keys")?Nt+=w+B:wt.attr("class").includes("attribute-comment")&&(Nt+=w+B+T))}wt.attr("transform",`translate(${J+c/2+Nt}, ${Tr+nt+C.height+d/2})`)}),f.select(".name").attr("transform","translate("+-C.width/2+", "+(nt+d/2)+")"),i!=null&&Eh.has(i)){const it=r.colorIndex??0;f.attr("data-color-id",`color-${it%l.length}`)}const ct=q.rectangle(J,nt,W,$,N),qt=f.insert(()=>ct,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[it,lt]of S.entries()){const wt=(it+1)%2===0&<.yOffset!==0,ie=q.rectangle(J,C.height+nt+(lt==null?void 0:lt.yOffset),W,lt==null?void 0:lt.rowHeight,{...N,fill:wt?s:o,stroke:n});f.insert(()=>ie,"g.label").attr("style",p.join("")).attr("class",`row-rect-${wt?"even":"odd"}`)}const gt=1e-4;let Lt=Ir(J,C.height+nt,W+J,C.height+nt,gt),ot=q.polygon(Lt.map(it=>[it.x,it.y]),N);if(f.insert(()=>ot).attr("class","divider"),Lt=Ir(w+J,C.height+nt,w+J,$+nt,gt),ot=q.polygon(Lt.map(it=>[it.x,it.y]),N),f.insert(()=>ot).attr("class","divider"),P){const it=w+B+J;Lt=Ir(it,C.height+nt,it,$+nt,gt),ot=q.polygon(Lt.map(lt=>[lt.x,lt.y]),N),f.insert(()=>ot).attr("class","divider")}if(M){const it=w+B+T+J;Lt=Ir(it,C.height+nt,it,$+nt,gt),ot=q.polygon(Lt.map(lt=>[lt.x,lt.y]),N),f.insert(()=>ot).attr("class","divider")}for(const it of k){const lt=C.height+nt+it;Lt=Ir(J,lt,W+J,lt,gt),ot=q.polygon(Lt.map(kt=>[kt.x,kt.y]),N),f.insert(()=>ot).attr("class","divider")}if(V(t,qt),m&&t.look!=="handDrawn")if(i!=null&&Aw.has(i))f.selectAll("path").attr("style",m);else{const it=m.split(";"),lt=(si=it==null?void 0:it.filter(kt=>kt.includes("stroke")))==null?void 0:si.map(kt=>`${kt}`).join("; ");f.selectAll("path").attr("style",lt??""),f.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(it){return H.rect(t,it)},f}g(Hn,"erBox");async function Mr(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==Bl(t)&&(t=Bl(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await He(n,t,{width:Ne(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(ze(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=st(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}g(Mr,"addText");function Ir(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}]}g(Ir,"lineToPolygon");async function Wg(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,d=0,p=0,u=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Fi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Fi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=o.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Fi(h,b,y,[b.parseClassifier()]);y+=k+s}u=h.node().getBBox().height,u<=0&&(u=a/2),c=o.insert("g").attr("class","methods-group text");let f=0;for(const b of t.methods){const k=await Fi(c,b,f,[b.parseClassifier()]);f+=k+s}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+p+a*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+p+(u?u+a*4:a*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}g(Wg,"textHelper");async function Fi(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=bt();let o="useHtmlLabels"in t?t.useHtmlLabels:ze(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Di(n)&&(o=!0);const l=await He(a,sn(fr(n)),{width:Ne(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let h,c=1;if(o){const d=l.children[0],p=st(l);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const m=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(y=>new Promise(f=>{function C(){var b;if(y.style.display="flex",y.style.flexDirection="column",m){const k=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";f(y)}g(C,"setupImage"),setTimeout(()=>{y.complete&&C()}),y.addEventListener("error",C),y.addEventListener("load",C)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&st(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}g(Fi,"addText");async function Hg(e,t){var q,N;const r=dt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,o=s,n=t.useHtmlLabels??ze(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Wg(e,t,r,n,o),{labelStyles:d,nodeStyles:p}=G(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((q=l.styles)==null?void 0:q.join(";"))||p||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((N=r.class)!=null&&N.hideEmptyMembersBox),y=Y.svg(h),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.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+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const S=-C/2,w=-b/2;let B=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(B=s*2);const T=y.rectangle(S-s,w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+B,f),L=h.insert(()=>T,":first-child");L.attr("class","basic label-container outer-path");const P=L.node().getBBox(),M=h.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,E=h.select(".label-group").node().getBBox().height-(m?s/2:0)||0,z=h.select(".members-group").node().getBBox().height-(m?s/2:0)||0,D=(M+E+w+s-(w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((R,W,$)=>{var Lt,ot;const J=st($[W]),nt=J.attr("transform");let ct=0;if(nt){const le=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(nt);le&&(ct=parseFloat(le[2]))}let qt=ct+w+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(J.attr("class").includes("methods-group")){const Ft=Math.max(z,o/2);k?qt=Math.max(D,M+E+Ft+w+o*2+s)+o*2:qt=M+E+Ft+w+o*4+s}l.members.length===0&&l.methods.length===0&&((Lt=r.class)!=null&&Lt.hideEmptyMembersBox)&&(l.annotations.length>0?qt=ct-o:qt=ct),n||(qt-=4);let gt=S;(J.attr("class").includes("label-group")||J.attr("class").includes("annotation-group"))&&(gt=-((ot=J.node())==null?void 0:ot.getBBox().width)/2||0,h.selectAll("text").each(function(Ft,le,re){window.getComputedStyle(re[le]).textAnchor==="middle"&&(gt=0)})),J.attr("transform",`translate(${gt}, ${qt})`)}),l.members.length>0||l.methods.length>0||m){const R=M+E+w+s,W=y.line(P.x,R,P.x+P.width,R+.001,f);h.insert(()=>W).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(m||l.members.length>0||l.methods.length>0){const R=M+E+z+w+o*2+s,W=y.line(P.x,k?Math.max(D,R):R,P.x+P.width,(k?Math.max(D,R):R)+.001,f);h.insert(()=>W).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),L.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!n){const R=RegExp(/color\s*:\s*([^;]*)/),W=R.exec(u);if(W){const $=W[0].replace("color","fill");h.selectAll("tspan").attr("style",$)}else if(d){const $=R.exec(d);if($){const J=$[0].replace("color","fill");h.selectAll("tspan").attr("style",J)}}}return V(t,L),t.intersect=function(R){return H.rect(t,R)},h}g(Hg,"classBox");async function Yg(e,t){var P,M;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,l="verifyMethod"in t,h=K(t),{themeVariables:c}=dt(),{borderColorArray:d,requirementEdgeLabelBackground:p}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Be(u,`<<${a.type}>>`,0,t.labelStyle):m=await Be(u,"<<Element>>",0,t.labelStyle);let y=m;const f=await Be(u,a.name,y,t.labelStyle+"; font-weight: bold;");if(y+=f+n,l){const E=await Be(u,`${a.requirementId?`ID: ${a.requirementId}`:""}`,y,t.labelStyle);y+=E;const z=await Be(u,`${a.text?`Text: ${a.text}`:""}`,y,t.labelStyle);y+=z;const D=await Be(u,`${a.risk?`Risk: ${a.risk}`:""}`,y,t.labelStyle);y+=D,await Be(u,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,y,t.labelStyle)}else{const E=await Be(u,`${s.type?`Type: ${s.type}`:""}`,y,t.labelStyle);y+=E,await Be(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,y,t.labelStyle)}const C=(((P=u.node())==null?void 0:P.getBBox().width)??200)+o,b=(((M=u.node())==null?void 0:M.getBBox().height)??200)+o,k=-C/2,S=-b/2,w=Y.svg(u),B=j(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const T=w.rectangle(k,S,C,b,B),L=u.insert(()=>T,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const E=t.colorIndex??0;u.attr("data-color-id",`color-${E%d.length}`)}if(u.selectAll(".label").each((E,z,D)=>{const q=st(D[z]),N=q.attr("transform");let R=0,W=0;if(N){const ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);ct&&(R=parseFloat(ct[1]),W=parseFloat(ct[2]))}const $=W-b/2;let J=k+o/2;(z===0||z===1)&&(J=R),q.attr("transform",`translate(${J}, ${$+o})`)}),y>m+f+n){const E=S+m+f+n;let z;if(t.look==="neo"){const N=[[k,E],[k+C,E],[k+C,E+.001],[k,E+.001]];z=w.polygon(N,B)}else z=w.line(k,E,k+C,E,B);u.insert(()=>z).attr("class","divider")}return V(t,L),t.intersect=function(E){return H.rect(t,E)},i&&t.look!=="handDrawn"&&(p||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}g(Yg,"requirementBox");async function Be(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=dt(),o=s.htmlLabels??!0,n=await He(a,sn(fr(t)),{width:Ne(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const h=n.children[0],c=st(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(Be,"addText");var Ew=g(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 Ug(e,t,{config:r}){var z,D;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await Q(e,t,K(t)),c=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(d=(D=r==null?void 0:r.kanban)==null?void 0:D.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;p?{label:m,bbox:y}=await Qs(p,"ticket"in t&&t.ticket||"",u):{label:m,bbox:y}=await Qs(n,"ticket"in t&&t.ticket||"",u);const{label:f,bbox:C}=await Qs(n,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(y.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,B=-k/2,T=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-S+l.height/2)+")"),f.attr("transform","translate("+(c+k/2-C.width-2*s)+", "+(-S+l.height/2)+")");let L;const{rx:P,ry:M}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const q=Y.svg(n),N=j(t,{}),R=P||M?q.path(Je(B,T,k,w,P||0),N):q.rectangle(B,T,k,w,N);L=n.insert(()=>R,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",M??5).attr("x",B).attr("y",T).attr("width",k).attr("height",w);const q="priority"in t&&t.priority;if(q){const N=n.append("line"),R=B+2,W=T+Math.floor((P??0)/2),$=T+w-Math.floor((P??0)/2);N.attr("x1",R).attr("y1",W).attr("x2",R).attr("y2",$).attr("stroke-width","4").attr("stroke",Ew(q))}}return V(t,L),t.height=w,t.intersect=function(q){return H.rect(t,q)},n}g(Ug,"kanbanItem");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await Q(e,t,K(t)),l=s.width+10*o,h=s.height+8*o,c=.15*l,{cssStyles:d}=t,p=s.width+20,u=s.height+20,m=Math.max(l,p),y=Math.max(h,u);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let f;const C=`M0 0
|
|
238
|
-
a${c},${c} 1 0,0 ${m*.25},${-1*y*.1}
|
|
239
|
-
a${c},${c} 1 0,0 ${m*.25},0
|
|
240
|
-
a${c},${c} 1 0,0 ${m*.25},0
|
|
241
|
-
a${c},${c} 1 0,0 ${m*.25},${y*.1}
|
|
242
|
-
|
|
243
|
-
a${c},${c} 1 0,0 ${m*.15},${y*.33}
|
|
244
|
-
a${c*.8},${c*.8} 1 0,0 0,${y*.34}
|
|
245
|
-
a${c},${c} 1 0,0 ${-1*m*.15},${y*.33}
|
|
246
|
-
|
|
247
|
-
a${c},${c} 1 0,0 ${-1*m*.25},${y*.15}
|
|
248
|
-
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
249
|
-
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
250
|
-
a${c},${c} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
251
|
-
|
|
252
|
-
a${c},${c} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
253
|
-
a${c*.8},${c*.8} 1 0,0 0,${-1*y*.34}
|
|
254
|
-
a${c},${c} 1 0,0 ${m*.1},${-1*y*.33}
|
|
255
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(a),k=j(t,{}),S=b.path(C,k);f=a.insert(()=>S,":first-child"),f.attr("class","basic label-container").attr("style",$t(d))}else f=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return f.attr("transform",`translate(${-m/2}, ${-y/2})`),V(t,f),t.calcIntersect=function(b,k){return H.rect(b,k)},t.intersect=function(b){return I.info("Bang intersect",t,b),H.rect(t,b)},a}g(jg,"bang");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await Q(e,t,K(t)),l=s.width+2*o,h=s.height+2*o,c=.15*l,d=.25*l,p=.35*l,u=.2*l,{cssStyles:m}=t;let y;const f=`M0 0
|
|
256
|
-
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
257
|
-
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
258
|
-
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
259
|
-
|
|
260
|
-
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
261
|
-
a${u},${u} 1 0,1 ${-1*l*.15},${h*.65}
|
|
262
|
-
|
|
263
|
-
a${d},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
264
|
-
a${p},${p} 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${u},${u} 1 0,1 ${l*.1},${-1*h*.65}
|
|
269
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=Y.svg(a),b=j(t,{}),k=C.path(f,b);y=a.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",$t(m))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",f);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-l/2}, ${-h/2})`),V(t,y),t.calcIntersect=function(C,b){return H.rect(C,b)},t.intersect=function(C){return I.info("Cloud intersect",t,C),H.rect(t,C)},a}g(Gg,"cloud");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await Q(e,t,K(t)),l=s.width+8*o,h=s.height+2*o,c=5,d=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 p=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),V(t,p),t.calcIntersect=function(u,m){return H.rect(u,m)},t.intersect=function(u){return H.rect(t,u)},a}g(Vg,"defaultMindmapNode");async function Xg(e,t){const r={padding:t.padding??0};return Wn(e,t,r)}g(Xg,"mindmapCircle");var Mw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Bg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Sg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:_g},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Eg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Zp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Wn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:jg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Gg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ig},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:dg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Dg},{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:cg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Qp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Og},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Wp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:wg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ag},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:eg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ag},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Gp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Vp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:gg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:rg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:$g},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Xp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Kp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:zg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Jp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Pg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:vg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Cg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:yg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:zp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Up},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ig},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Mg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ng},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:mg}],Iw=g(()=>{const t=[...Object.entries({state:Lg,choice:Hp,note:xg,rectWithTitle:Tg,labelRect:ug,iconSquare:lg,iconCircle:og,icon:sg,iconRounded:ng,imageSquare:hg,anchor:qp,kanbanItem:Ug,mindmapCircle:Xg,defaultMindmapNode:Vg,classBox:Hg,erBox:Hn,requirementBox:Yg}),...Mw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Zg=Iw();function Ow(e){return e in Zg}g(Ow,"isValidShape");var ws=new Map;async function Kg(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Zg[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",$t(t.look)),t.tooltip&&a.attr("title",t.tooltip),ws.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(Kg,"insertNode");var KL=g((e,t)=>{ws.set(t.id,e)},"setNodeElem"),QL=g(()=>{ws.clear()},"clear"),JL=g(e=>{const t=ws.get(e.id);I.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),$w=g((e,t,r,i,a,s=!1,o)=>{t.arrowTypeStart&&Mh(e,"start",t.arrowTypeStart,r,i,a,s,o),t.arrowTypeEnd&&Mh(e,"end",t.arrowTypeEnd,r,i,a,s,o)},"addEdgeMarkers"),Dw={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}},Pw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Mh=g((e,t,r,i,a,s,o=!1,n)=>{var m;const l=Dw[r],h=l&&Pw.includes(l.type);if(!l){I.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${a}_${s}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),f=`${u}_${y}`;if(!document.getElementById(f)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=f,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),Rw=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=dt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),as=new Map,Rt=new Map,tF=g(()=>{as.clear(),Rt.clear()},"clear"),ki=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),qw=g(async(e,t)=>{const r=dt();let i=Zt(r);const{labelStyles:a}=G(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await He(e,t.label,{style:ki(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),I.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],m=st(h);c=u.getBoundingClientRect(),d=c,m.attr("width",c.width),m.attr("height",c.height)}else{const u=st(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",fi(d,i)),as.set(t.id,s),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),y=await je(m,t.startLabelLeft,ki(t.labelStyle)||"",!1,!1);p=y;let f=y.getBBox();if(i){const C=y.children[0],b=st(y);f=C.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}m.attr("transform",fi(f,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startLeft=u,Ai(p,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),y=await je(m,t.startLabelRight,ki(t.labelStyle)||"",!1,!1);p=y,m.node().appendChild(y);let f=y.getBBox();if(i){const C=y.children[0],b=st(y);f=C.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}m.attr("transform",fi(f,i)),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).startRight=u,Ai(p,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),y=await je(m,t.endLabelLeft,ki(t.labelStyle)||"",!1,!1);p=y;let f=y.getBBox();if(i){const C=y.children[0],b=st(y);f=C.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}m.attr("transform",fi(f,i)),u.node().appendChild(y),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endLeft=u,Ai(p,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),y=await je(m,t.endLabelRight,ki(t.labelStyle)||"",!1,!1);p=y;let f=y.getBBox();if(i){const C=y.children[0],b=st(y);f=C.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}m.attr("transform",fi(f,i)),u.node().appendChild(y),Rt.get(t.id)||Rt.set(t.id,{}),Rt.get(t.id).endRight=u,Ai(p,t.endLabelRight)}return h},"insertEdgeLabel");function Ai(e,t){Zt(dt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Ai,"setTerminalWidth");var Nw=g((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,as.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:a}=Fn(i);if(e.label){const s=as.get(e.id);let o=e.x,n=e.y;if(r){const l=me.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Rt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Rt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Rt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Rt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),zw=g((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),Ww=g((e,t,r)=>{I.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,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;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)*o>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-a:a-l-t.y;n=c*d/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-d:r.y-h+d};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),I.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let d=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,u=r.y<t.y?r.y+d:r.y-d;return I.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${n}`,{_x:p,_y:u}),n===0&&(p=t.x,u=t.y),c===0&&(p=t.x),h===0&&(u=t.y),{x:p,y:u}}},"intersection"),Ih=g((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(I.info("abc88 checking point",s,t),!zw(t,s)&&!a){const o=Ww(t,i,s);I.debug("abc88 inside",s,i,o),I.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?I.warn("abc88 no intersect",o,r):r.push(o),a=!0}else I.warn("abc88 outside",s,i),i=s,a||r.push(s)}),I.debug("returning points",r),r},"cutPathAtIntersect");function Qg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Qg,"extractCornerPoints");var Oh=g(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Hw=g(function(e){const{cornerPointPositions:t}=Qg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=Oh(a,o,5),l=Oh(s,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){I.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const u=5;o.x===n.x?p={x:h<0?n.x-u+d:n.x+u-d,y:c<0?n.y-d:n.y+d}:p={x:h<0?n.x-d:n.x+d,y:c<0?n.y-u+d:n.y+u-d}}else I.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),Yw=g((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Uw=g(function(e,t,r,i,a,s,o,n=!1){var W;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=dt();let h=t.points,c=!1;const d=a;var p=s;const u=[];for(const $ in t.cssCompiledStyles)Kd($)||u.push(t.cssCompiledStyles[$]);I.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),I.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),h=Ih(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Ih(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let y=h.filter($=>!Number.isNaN($.y));const f=Rw(t.curve);f!=="rounded"&&(y=Hw(y));let C=Ca;switch(f){case"linear":C=Ca;break;case"basis":C=eo;break;case"cardinal":C=Qh;break;case"bumpX":C=tc;break;case"bumpY":C=Jh;break;case"catmullRom":C=Kh;break;case"monotoneX":C=Zh;break;case"monotoneY":C=Xh;break;case"natural":C=Vh;break;case"step":C=Gh;break;case"stepAfter":C=jh;break;case"stepBefore":C=Uh;break;case"rounded":C=Ca;break;default:C=eo}const{x:b,y:k}=qk(t),S=xm().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let B,T=f==="rounded"?Jg(tf(y,t),5):S(y);const L=Array.isArray(t.style)?t.style:[t.style];let P=L.find($=>$==null?void 0:$.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const $=Y.svg(e);Object.assign([],y);const J=$.path(T,{roughness:.3,seed:l});w+=" transition",B=st(J).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",L?L.reduce((ct,qt)=>ct+";"+qt,""):"");let nt=B.attr("d");B.attr("d",nt),e.node().appendChild(B.node())}else{const $=u.join(";"),J=L?L.reduce((ot,Ft)=>ot+Ft+";",""):"",nt=($?$+";"+J+";":J)+";"+(L?L.reduce((ot,Ft)=>ot+";"+Ft,""):"");B=e.append("path").attr("d",T).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",nt),P=(W=nt.match(/stroke:([^;]+)/))==null?void 0:W[1],E=t.animate===!0||!!t.animation||$.includes("animation");const ct=B.node(),qt=typeof ct.getTotalLength=="function"?ct.getTotalLength():0,gt=Rl[t.arrowTypeStart]||0,Lt=Rl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const Ft=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Yw(qt,gt,Lt):`0 ${gt} ${qt-gt-Lt} ${Lt}`}; stroke-dashoffset: 0;`;B.attr("style",Ft+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",$t(t.look)),t.showPoints&&y.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let z="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd);const D=!E&&(t==null?void 0:t.look)==="neo";$w(B,t,z,o,i,D,P);const q=Math.floor(h.length/2),N=h[q];me.isLabelCoordinateInPath(N,B.attr("d"))||(c=!0);let R={};return c&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function Jg(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,d=l.x-o.x,p=l.y-o.y,u=Math.hypot(h,c),m=Math.hypot(d,p);if(u<a||m<a){r+=`L${o.x},${o.y}`;continue}const y=h/u,f=c/u,C=d/m,b=p/m,k=y*C+f*b,S=Math.max(-1,Math.min(1,k)),w=Math.acos(S);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(w/2),u/2,m/2),T=o.x-y*B,L=o.y-f*B,P=o.x+C*B,M=o.y+b*B;r+=`L${T},${L}`,r+=`Q${o.x},${o.y} ${P},${M}`}}return r}g(Jg,"generateRoundedPath");function Yo(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}}g(Yo,"calculateDeltaAndAngle");function tf(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Ht[t.arrowTypeStart]){const a=Ht[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=Yo(s,o),l=a*Math.cos(n),h=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+h}const i=e.length;if(i>=2&&Ht[t.arrowTypeEnd]){const a=Ht[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=Yo(o,s),l=a*Math.cos(n),h=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-h}return r}g(tf,"applyMarkerOffsetsToPoints");var jw=g((e,t,r,i)=>{t.forEach(a=>{fv[a](e,r,i)})},"insertMarkers"),Gw=g((e,t,r)=>{I.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),Vw=g((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"),Xw=g((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"),Zw=g((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"),Kw=g((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"),Qw=g((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"),Jw=g((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"),tv=g((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"),ev=g((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"),rv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{transitionColor:s}=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",`${s}`)},"barbNeo"),iv=g((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"),av=g((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"),sv=g((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"),ov=g((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"),nv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s}=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",`${s}`),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",`${s}`)},"only_one_neo"),lv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),hv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s}=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",`${s}`),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",`${s}`)},"one_or_more_neo"),cv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),uv=g((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"),dv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s}=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",`${s}`).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"),pv=g((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"),gv=g((e,t,r)=>{const i=bt(),{themeVariables:a}=i,{strokeWidth:s}=a,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),fv={extension:Gw,composition:Vw,aggregation:Xw,dependency:Zw,lollipop:Kw,point:Qw,circle:Jw,cross:tv,barb:ev,barbNeo:rv,only_one:iv,zero_or_one:av,one_or_more:sv,zero_or_more:ov,only_one_neo:nv,zero_or_one_neo:lv,one_or_more_neo:hv,zero_or_more_neo:cv,requirement_arrow:uv,requirement_contains:pv,requirement_arrow_neo:dv,requirement_contains_neo:gv},mv=jw,yv={common:Gi,getConfig:bt,insertCluster:gw,insertEdge:Uw,insertEdgeLabel:qw,insertMarkers:mv,insertNode:Kg,interpolateToCurve:Sn,labelHelper:Q,log:I,positionEdgeLabel:Nw},Ui={},ef=g(e=>{for(const t of e)Ui[t.name]=t},"registerLayoutLoaders"),Cv=g(()=>{ef([{name:"dagre",loader:g(async()=>await ut(()=>import("./dagre-KV5264BT-vzGZtZ_w.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),"loader")},{name:"cose-bilkent",loader:g(async()=>await ut(()=>import("./cose-bilkent-S5V4N54A-BDxVvsWm.js"),__vite__mapDeps([10,11,7,6,8,9]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Cv();var eF=g(async(e,t)=>{if(!(e.layoutAlgorithm in Ui))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const d=c.domId||c.id;c.domId=`${e.diagramId}-${d}`}const r=Ui[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=s,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"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,yv,{algorithm:r.algorithm})},"render"),rF=g((e="",{fallback:t="dagre"}={})=>{if(e in Ui)return e;if(t in Ui)return I.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),xv=Ad(Object.keys,Object),bv=Object.prototype,kv=bv.hasOwnProperty;function Tv(e){if(!ms(e))return xv(e);var t=[];for(var r in Object(e))kv.call(e,r)&&r!="constructor"&&t.push(r);return t}var Uo=br(Ee,"DataView"),jo=br(Ee,"Promise"),Go=br(Ee,"Set"),Vo=br(Ee,"WeakMap"),$h="[object Map]",Sv="[object Object]",Dh="[object Promise]",Ph="[object Set]",Rh="[object WeakMap]",qh="[object DataView]",wv=xr(Uo),vv=xr(Hi),Bv=xr(jo),_v=xr(Go),Lv=xr(Vo),ar=ei;(Uo&&ar(new Uo(new ArrayBuffer(1)))!=qh||Hi&&ar(new Hi)!=$h||jo&&ar(jo.resolve())!=Dh||Go&&ar(new Go)!=Ph||Vo&&ar(new Vo)!=Rh)&&(ar=function(e){var t=ei(e),r=t==Sv?e.constructor:void 0,i=r?xr(r):"";if(i)switch(i){case wv:return qh;case vv:return $h;case Bv:return Dh;case _v:return Ph;case Lv:return Rh}return t});var Fv="[object Map]",Av="[object Set]",Ev=Object.prototype,Mv=Ev.hasOwnProperty;function Nh(e){if(e==null)return!0;if(ys(e)&&(Va(e)||typeof e=="string"||typeof e.splice=="function"||kn(e)||Tn(e)||Ga(e)))return!e.length;var t=ar(e);if(t==Fv||t==Av)return!e.size;if(ms(e))return!Tv(e).length;for(var r in e)if(Mv.call(e,r))return!1;return!0}var rf="c4",Iv=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Ov=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-BRoJcx0b.js");return{diagram:t}},__vite__mapDeps([12,13,6,7,8,9]),import.meta.url);return{id:rf,diagram:e}},"loader"),$v={id:rf,detector:Iv,loader:Ov},Dv=$v,af="flowchart",Pv=g((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"),Rv=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CmdYRxD2.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,6,7,8,9]),import.meta.url);return{id:af,diagram:e}},"loader"),qv={id:af,detector:Pv,loader:Rv},Nv=qv,sf="flowchart-v2",zv=g((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"),Wv=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CmdYRxD2.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,6,7,8,9]),import.meta.url);return{id:sf,diagram:e}},"loader"),Hv={id:sf,detector:zv,loader:Wv},Yv=Hv,of="er",Uv=g(e=>/^\s*erDiagram/.test(e),"detector"),jv=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-DFjajcpE.js");return{diagram:t}},__vite__mapDeps([18,16,17,6,7,8,9]),import.meta.url);return{id:of,diagram:e}},"loader"),Gv={id:of,detector:Uv,loader:jv},Vv=Gv,nf="gitGraph",Xv=g(e=>/^\s*gitGraph/.test(e),"detector"),Zv=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,6,7,8,4,2,9]),import.meta.url);return{id:nf,diagram:e}},"loader"),Kv={id:nf,detector:Xv,loader:Zv},Qv=Kv,lf="gantt",Jv=g(e=>/^\s*gantt/.test(e),"detector"),tB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-BdeV_JQv.js");return{diagram:t}},__vite__mapDeps([23,8,7,9,6]),import.meta.url);return{id:lf,diagram:e}},"loader"),eB={id:lf,detector:Jv,loader:tB},rB=eB,hf="info",iB=g(e=>/^\s*info/.test(e),"detector"),aB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-COrckp6q.js");return{diagram:t}},__vite__mapDeps([24,22,6,7,8,4,2,9]),import.meta.url);return{id:hf,diagram:e}},"loader"),sB={id:hf,detector:iB,loader:aB},cf="pie",oB=g(e=>/^\s*pie/.test(e),"detector"),nB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-BCklzk2d.js");return{diagram:t}},__vite__mapDeps([25,20,22,6,7,8,4,2,9]),import.meta.url);return{id:cf,diagram:e}},"loader"),lB={id:cf,detector:oB,loader:nB},uf="quadrantChart",hB=g(e=>/^\s*quadrantChart/.test(e),"detector"),cB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-ea-ItGVk.js");return{diagram:t}},__vite__mapDeps([26,9,7,8,6]),import.meta.url);return{id:uf,diagram:e}},"loader"),uB={id:uf,detector:hB,loader:cB},dB=uB,df="xychart",pB=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),gB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-B4_9m2II.js");return{diagram:t}},__vite__mapDeps([27,9,7,8,6]),import.meta.url);return{id:df,diagram:e}},"loader"),fB={id:df,detector:pB,loader:gB},mB=fB,pf="requirement",yB=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),CB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-DoJ6ZjPU.js");return{diagram:t}},__vite__mapDeps([28,16,17,6,7,8,9]),import.meta.url);return{id:pf,diagram:e}},"loader"),xB={id:pf,detector:yB,loader:CB},bB=xB,gf="sequence",kB=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),TB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-CnFMNFdv.js");return{diagram:t}},__vite__mapDeps([29,13,21,6,7,8,9]),import.meta.url);return{id:gf,diagram:e}},"loader"),SB={id:gf,detector:kB,loader:TB},wB=SB,ff="class",vB=g((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"),BB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-hQqJj1FL.js");return{diagram:t}},__vite__mapDeps([30,31,15,13,16,17,6,7,8,9]),import.meta.url);return{id:ff,diagram:e}},"loader"),_B={id:ff,detector:vB,loader:BB},LB=_B,mf="classDiagram",FB=g((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"),AB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-hQqJj1FL.js");return{diagram:t}},__vite__mapDeps([32,31,15,13,16,17,6,7,8,9]),import.meta.url);return{id:mf,diagram:e}},"loader"),EB={id:mf,detector:FB,loader:AB},MB=EB,yf="state",IB=g((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"),OB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-B_kOGWb-.js");return{diagram:t}},__vite__mapDeps([33,34,16,17,1,2,3,4,9,7,8,6]),import.meta.url);return{id:yf,diagram:e}},"loader"),$B={id:yf,detector:IB,loader:OB},DB=$B,Cf="stateDiagram",PB=g((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"),RB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js");return{diagram:t}},__vite__mapDeps([35,34,16,17,6,7,8,9]),import.meta.url);return{id:Cf,diagram:e}},"loader"),qB={id:Cf,detector:PB,loader:RB},NB=qB,xf="journey",zB=g(e=>/^\s*journey/.test(e),"detector"),WB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-DKAns2QR.js");return{diagram:t}},__vite__mapDeps([36,15,13,9,7,8,6]),import.meta.url);return{id:xf,diagram:e}},"loader"),HB={id:xf,detector:zB,loader:WB},YB=HB,UB=g((e,t,r)=>{I.debug(`rendering svg for syntax error
|
|
299
|
-
`);const i=Eb(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Tc(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"),bf={draw:UB},jB=bf,GB={db:{},renderer:bf,parser:{parse:g(()=>{},"parse")}},VB=GB,kf="flowchart-elk",XB=g((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"),ZB=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-CmdYRxD2.js");return{diagram:t}},__vite__mapDeps([14,15,13,16,17,6,7,8,9]),import.meta.url);return{id:kf,diagram:e}},"loader"),KB={id:kf,detector:XB,loader:ZB},QB=KB,Tf="timeline",JB=g(e=>/^\s*timeline/.test(e),"detector"),t_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-Dgx0wfE4.js");return{diagram:t}},__vite__mapDeps([37,9,7,8,6]),import.meta.url);return{id:Tf,diagram:e}},"loader"),e_={id:Tf,detector:JB,loader:t_},r_=e_,Sf="mindmap",i_=g(e=>/^\s*mindmap/.test(e),"detector"),a_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-B8Fqmn2S.js");return{diagram:t}},__vite__mapDeps([38,16,17,6,7,8,9]),import.meta.url);return{id:Sf,diagram:e}},"loader"),s_={id:Sf,detector:i_,loader:a_},o_=s_,wf="kanban",n_=g(e=>/^\s*kanban/.test(e),"detector"),l_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-_8RYarrG.js");return{diagram:t}},__vite__mapDeps([39,15,6,7,8,9]),import.meta.url);return{id:wf,diagram:e}},"loader"),h_={id:wf,detector:n_,loader:l_},c_=h_,vf="sankey",u_=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),d_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-CtYEK_8E.js");return{diagram:t}},__vite__mapDeps([40,9,7,8,6]),import.meta.url);return{id:vf,diagram:e}},"loader"),p_={id:vf,detector:u_,loader:d_},g_=p_,Bf="packet",f_=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),m_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-B-q2z4os.js");return{diagram:t}},__vite__mapDeps([41,20,22,6,7,8,4,2,9]),import.meta.url);return{id:Bf,diagram:e}},"loader"),y_={id:Bf,detector:f_,loader:m_},_f="radar",C_=g(e=>/^\s*radar-beta/.test(e),"detector"),x_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-CCt9wdnx.js");return{diagram:t}},__vite__mapDeps([42,20,22,6,7,8,4,2,9]),import.meta.url);return{id:_f,diagram:e}},"loader"),b_={id:_f,detector:C_,loader:x_},Lf="block",k_=g(e=>/^\s*block(-beta)?/.test(e),"detector"),T_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-B9y1uS9R.js");return{diagram:t}},__vite__mapDeps([43,15,5,1,2,9,7,8,6]),import.meta.url);return{id:Lf,diagram:e}},"loader"),S_={id:Lf,detector:k_,loader:T_},w_=S_,Ff="treeView",v_=g(e=>/^\s*treeView-beta/.test(e),"detector"),B_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CGYBSS7a.js");return{diagram:t}},__vite__mapDeps([44,20,21,22,6,7,8,4,2,9]),import.meta.url);return{id:Ff,diagram:e}},"loader"),__={id:Ff,detector:v_,loader:B_},L_=__,Af="architecture",F_=g(e=>/^\s*architecture/.test(e),"detector"),A_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-knT7SmxI.js");return{diagram:t}},__vite__mapDeps([45,20,22,6,7,8,4,2,11,9]),import.meta.url);return{id:Af,diagram:e}},"loader"),E_={id:Af,detector:F_,loader:A_},M_=E_,Ef="ishikawa",I_=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),O_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-mjLLHcYj.js");return{diagram:t}},__vite__mapDeps([46,6,7,8,9]),import.meta.url);return{id:Ef,diagram:e}},"loader"),$_={id:Ef,detector:I_,loader:O_},Mf="venn",D_=g(e=>/^\s*venn-beta/.test(e),"detector"),P_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-DcJGrLhu.js");return{diagram:t}},__vite__mapDeps([47,6,7,8,9]),import.meta.url);return{id:Mf,diagram:e}},"loader"),R_={id:Mf,detector:D_,loader:P_},q_=R_,If="treemap",N_=g(e=>/^\s*treemap/.test(e),"detector"),z_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-DBeNrz6n.js");return{diagram:t}},__vite__mapDeps([48,17,20,22,6,7,8,4,2,9]),import.meta.url);return{id:If,diagram:e}},"loader"),W_={id:If,detector:N_,loader:z_},Of="wardley-beta",H_=g(e=>/^\s*wardley-beta/i.test(e),"detector"),Y_=g(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-CMAuUksM.js");return{diagram:t}},__vite__mapDeps([49,20,22,6,7,8,4,2,9]),import.meta.url);return{id:Of,diagram:e}},"loader"),U_={id:Of,detector:H_,loader:Y_},j_=U_,zh=!1,vs=g(()=>{zh||(zh=!0,Ia("error",VB,e=>e.toLowerCase().trim()==="error"),Ia("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{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:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ao(QB,o_,M_),ao(Dv,c_,MB,LB,Vv,rB,sB,lB,bB,wB,Yv,Nv,r_,Qv,NB,DB,YB,dB,g_,y_,mB,w_,L_,b_,$_,W_,q_,j_))},"addDiagrams"),G_=g(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(cr).map(async([r,{detector:i,loader:a}])=>{if(a)try{lo(r)}catch{try{const{diagram:s,id:o}=await a();Ia(o,s,i)}catch(s){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete cr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),V_="graphics-document document";function $f(e,t){e.attr("role",V_),t!==""&&e.attr("aria-roledescription",t)}g($f,"setA11yDiagramInfo");function Df(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)}}}g(Df,"addSVGa11yTitleDescription");var lr,Xo=(lr=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var h,c;const i=bt(),a=Jo(t,i);t=OT(t)+`
|
|
300
|
-
`;try{lo(a)}catch{const d=Jm(a);if(!d)throw new lc(`Diagram ${a} not found.`);const{id:p,diagram:u}=await d();Ia(p,u)}const{db:s,parser:o,renderer:n,init:l}=lo(a);return o.parser&&(o.parser.yy=s),(h=s.clear)==null||h.call(s),l==null||l(i),r.title&&((c=s.setDiagramTitle)==null||c.call(s,r.title)),await o.parse(t),new lr(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(lr,"Diagram"),lr),Wh=[],X_=g(()=>{Wh.forEach(e=>{e()}),Wh=[]},"attachFunctions"),Z_=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Pf(e){const t=e.match(nc);if(!t)return{text:e,metadata:{}};let r=Rk(t[1],{schema:Pk})??{};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}}g(Pf,"extractFrontMatter");var K_=g(e=>e.replace(/\r\n?/g,`
|
|
301
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Q_=g(e=>{const{text:t,metadata:r}=Pf(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),J_=g(e=>{const t=me.detectInit(e)??{},r=me.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:kT(e),directive:t}},"processDirectives");function Yn(e){const t=K_(e),r=Q_(t),i=J_(r.text),a=Ln(r.config,i.directive);return e=Z_(i.text),{code:e,title:r.title,config:a}}g(Yn,"preprocessDiagram");function Rf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Rf,"toBase64");var tL=5e4,eL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rL="sandbox",iL="loose",aL="http://www.w3.org/2000/svg",sL="http://www.w3.org/1999/xlink",oL="http://www.w3.org/1999/xhtml",nL="100%",lL="100%",hL="border:0;margin:0;",cL="margin:0",uL="allow-top-navigation-by-user-activation allow-popups",dL='The "iframe" tag is not supported by your browser.',pL=["foreignobject"],gL=["dominant-baseline"];function Un(e){const t=Yn(e);return Ea(),_y(t.config??{}),t}g(Un,"processAndSetConfigs");async function qf(e,t){vs();try{const{code:r,config:i}=Un(e);return{diagramType:(await zf(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}g(qf,"parse");var Hh=g((e,t,r=[])=>`
|
|
302
|
-
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),fL=g((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 o=Zt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{Nh(n.styles)||o.forEach(l=>{r+=Hh(n.id,l,n.styles)}),Nh(n.textStyles)||(r+=Hh(n.id,"tspan",((n==null?void 0:n.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),mL=g((e,t,r,i)=>{const a=fL(e,r),s=jy(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return am(om(`${i}{${s}}`),sm)},"createUserStyles"),yL=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=fr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),CL=g((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":lL,i=Rf(`<body style="${cL}">${e}</body>`);return`<iframe style="width:${nL};height:${r};${hL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${uL}">
|
|
306
|
-
${dL}
|
|
307
|
-
</iframe>`},"putIntoIFrame"),Yh=g((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",aL);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function Zo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Zo,"sandboxedIframe");var xL=g((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),bL=g(async function(e,t,r){var z,D,q,N,R,W;vs();const i=Un(t);t=i.code;const a=bt();I.debug(a),t.length>((a==null?void 0:a.maxTextSize)??tL)&&(t=eL);const s="#"+e,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=g(()=>{const J=st(p?n:h).node();J&&"remove"in J&&J.remove()},"removeTempElements");let d=st("body");const p=a.securityLevel===rL,u=a.securityLevel===iL,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const $=Zo(st(r),o);d=st($.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=st(r);Yh(d,e,l,`font-family: ${m}`,sL)}else{if(xL(document,e,l,o),p){const $=Zo(st("body"),o);d=st($.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=st("body");Yh(d,e,l)}let y,f;try{y=await Xo.fromText(t,{title:i.title})}catch($){if(a.suppressErrorRendering)throw c(),$;y=await Xo.fromText("error"),f=$}const C=d.select(h).node(),b=y.type,k=C.firstChild,S=k.firstChild,w=(D=(z=y.renderer).getClasses)==null?void 0:D.call(z,t,y),B=mL(a,b,w,s),T=document.createElement("style");T.innerHTML=B,k.insertBefore(T,S);try{await y.renderer.draw(t,e,"11.14.0",y)}catch($){throw a.suppressErrorRendering?c():jB.draw(t,e,"11.14.0"),$}const L=d.select(`${h} svg`),P=(N=(q=y.db).getAccTitle)==null?void 0:N.call(q),M=(W=(R=y.db).getAccDescription)==null?void 0:W.call(R);Wf(b,L,P,M),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",oL);let E=d.select(h).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=yL(E,p,ze(a.arrowMarkerAbsolute)),p){const $=d.select(h+" svg").node();E=CL(E,$)}else u||(E=hr.sanitize(E,{ADD_TAGS:pL,ADD_ATTR:gL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(X_(),f)throw f;return c(),{diagramType:b,svg:E,bindFunctions:y.db.bindFunctions}},"render");function Nf(e={}){var i;const t=Mt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),vy(t),t!=null&&t.theme&&t.theme in Pe?t.themeVariables=Pe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Pe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?wy(t):pc();Ko(r.logLevel),vs()}g(Nf,"initialize");var zf=g((e,t={})=>{const{code:r}=Yn(e);return Xo.fromText(r,t)},"getDiagramFromText");function Wf(e,t,r,i){$f(t,e),Df(t,r,i,t.attr("id"))}g(Wf,"addA11yInfo");var yr=Object.freeze({render:bL,parse:qf,getDiagramFromText:zf,initialize:Nf,getConfig:bt,setConfig:gc,getSiteConfig:pc,updateSiteConfig:By,reset:g(()=>{Ea()},"reset"),globalReset:g(()=>{Ea(Zr)},"globalReset"),defaultConfig:Zr});Ko(bt().logLevel);Ea(bt());var kL=g((e,t,r)=>{I.warn(e),_n(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"),Hf=g(async function(e={querySelector:".mermaid"}){try{await TL(e)}catch(t){if(_n(t)&&I.error(t.str),oe.parseError&&oe.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),TL=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=yr.getConfig();I.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");I.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),yr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new me.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;o=l.innerHTML,o=cp(me.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=me.detectInit(o);c&&I.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:p}=await Gf(h,o,l);l.innerHTML=d,e&&await e(h),p&&p(l)}catch(d){kL(d,n,oe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Yf=g(function(e){yr.initialize(e)},"initialize"),SL=g(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&Yf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Hf(i)},"init"),wL=g(async(e,{lazyLoad:t=!0}={})=>{vs(),ao(...e),t===!1&&await G_()},"registerExternalDiagrams"),Uf=g(function(){if(oe.startOnLoad){const{startOnLoad:e}=yr.getConfig();e&&oe.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Uf,!1);var vL=g(function(e){oe.parseError=e},"setParseErrorHandler"),ss=[],to=!1,jf=g(async()=>{if(!to){for(to=!0;ss.length>0;){const e=ss.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}to=!1}},"executeQueue"),BL=g(async(e,t)=>new Promise((r,i)=>{const a=g(()=>new Promise((s,o)=>{yr.parse(e,t).then(n=>{s(n),r(n)},n=>{var l;I.error("Error parsing",n),(l=oe.parseError)==null||l.call(oe,n),o(n),i(n)})}),"performCall");ss.push(a),jf().catch(i)}),"parse"),Gf=g((e,t,r)=>new Promise((i,a)=>{const s=g(()=>new Promise((o,n)=>{yr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;I.error("Error parsing",l),(h=oe.parseError)==null||h.call(oe,l),n(l),a(l)})}),"performCall");ss.push(s),jf().catch(a)}),"render"),_L=g(()=>Object.keys(cr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),oe={startOnLoad:!0,mermaidAPI:yr,parse:BL,render:Gf,init:SL,run:Hf,registerExternalDiagrams:wL,registerLayoutLoaders:ef,initialize:Yf,parseError:void 0,contentLoaded:Uf,setParseErrorHandler:vL,detectType:Jo,registerIconPacks:zS,getRegisteredDiagramsMetadata:_L},LL=oe;/*! Check if previously processed *//*!
|
|
308
|
-
* Wait for document loaded before starting the execution
|
|
309
|
-
*/const iF=Object.freeze(Object.defineProperty({__proto__:null,default:LL},Symbol.toStringTag,{value:"Module"}));export{Sc as $,qL as A,Ge as B,IL as C,bm as D,bt as E,eC as F,Ln as G,dc as H,BT as I,Pk as J,Eb as K,Cs as L,sy as M,HS as N,Di as O,PL as P,$y as Q,kc as R,Bl as S,vT as T,ji as U,be as V,A as W,F as X,Hy as Y,yT as Z,g as _,Xy as a,Qe as a$,gw as a0,Kg as a1,JL as a2,qk as a3,Zt as a4,He as a5,fi as a6,Fn as a7,jd as a8,fr as a9,U2 as aA,Rd as aB,Ed as aC,X1 as aD,Ua as aE,Z1 as aF,Ki as aG,ar as aH,N2 as aI,Kl as aJ,Cr as aK,K1 as aL,kn as aM,V1 as aN,t2 as aO,ri as aP,Y2 as aQ,pT as aR,s2 as aS,oT as aT,xn as aU,Nh as aV,ei as aW,K2 as aX,Tv as aY,Zi as aZ,Ga as a_,Zd as aa,Y as ab,Uc as ac,WL as ad,G as ae,Kd as af,OL as ag,mv as ah,QL as ai,tF as aj,ZL as ak,V as al,KL as am,Uw as an,Nw as ao,qw as ap,DL as aq,ys as ar,Va as as,Nd as at,zL as au,NL as av,Ji as aw,zS as ax,NS as ay,HL as az,Vy as b,ps as b0,jl as b1,Tn as b2,Id as b3,Pd as b4,j1 as b5,Go as b6,dT as b7,sT as b8,gT as b9,bn as ba,mT as bb,LL as bc,$L as bd,iF as be,dt as c,st as d,Tc as e,Mt as f,Ky as g,Ne as h,xe as i,Wk as j,Gi as k,I as l,Vd as m,RL as n,rF as o,Qy as p,Jy as q,eF as r,Zy as s,Rk as t,me as u,Ow as v,FT as w,YL as x,hr as y,Gy as z};
|