orbitchat 3.10.7 → 3.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/assets/{ChartRenderer-9FnwPEBX.js → ChartRenderer-DmEe5ux0.js} +1 -1
- package/dist/assets/MermaidRenderer-BNgxU_bM.js +312 -0
- package/dist/assets/architectureDiagram-3BPJPVTR-Bfi6eFLn.js +36 -0
- package/dist/assets/blockDiagram-GPEHLZMM-C_xOdSW3.js +132 -0
- package/dist/assets/{c4Diagram-LMCZKHZV-BUftbNWY.js → c4Diagram-AAUBKEIU-CfvQYM_q.js} +1 -1
- package/dist/assets/channel-zLwrxaPB.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-uT68_7rT.js → chunk-2J33WTMH-DeY8TrNw.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BjHi_aEM.js → chunk-4BX2VUAB-DIj3bLrU.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-BrvJt-u-.js → chunk-55IACEB6-I4-oEJEd.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-hSR6fEWT.js → chunk-727SXJPM-DCx2l0Oh.js} +4 -4
- package/dist/assets/chunk-AQP2D5EJ-D4KlRvHF.js +231 -0
- package/dist/assets/{chunk-5VM5RSS4-CQacO1HV.js → chunk-FMBD7UC4-CqHLqk3L.js} +1 -1
- package/dist/assets/{chunk-32BRIVSS-DnDG740s.js → chunk-ND2GUHAM-CHJjdC0m.js} +1 -1
- package/dist/assets/{chunk-2Q5K7J3B-CdU2Q6YZ.js → chunk-QZHKN3VN-slcsUOxD.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-CDbYhIhU.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-CDbYhIhU.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-C0vhiJLV.js → cose-bilkent-S5V4N54A-HnZrIUzr.js} +1 -1
- package/dist/assets/{cynefin-VYW2F7L2-CyM6ijR6.js → cynefin-VYW2F7L2-CPNTSJVR.js} +1 -1
- package/dist/assets/dagre-BM42HDAG-Cl88doFf.js +4 -0
- package/dist/assets/diagram-2AECGRRQ-2lPidS0l.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-_tROgYB3.js +10 -0
- package/dist/assets/{diagram-FQU43EPY-IlESJ0wh.js → diagram-KO2AKTUF-7mueA6fZ.js} +3 -3
- package/dist/assets/{diagram-NH7WQ7WH-B63W-pyC.js → diagram-LMA3HP47-BxKOasa5.js} +2 -2
- package/dist/assets/diagram-OG6HWLK6-Bwf3i6eI.js +24 -0
- package/dist/assets/erDiagram-TEJ5UH35-hortthG_.js +85 -0
- package/dist/assets/flowDiagram-I6XJVG4X-DgvKpDc5.js +162 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-DR5xWqhT.js +292 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-DsT87XU7.js → gitGraphDiagram-PVQCEYII-RJLy0nV8.js} +7 -7
- package/dist/assets/{graph-C9eacEi8.js → graph-CAnANduQ.js} +1 -1
- package/dist/assets/{index-DfypiZL2.js → index-DnyY0OCY.js} +3 -3
- package/dist/assets/{infoDiagram-FWYZ7A6U-CkLm2oOh.js → infoDiagram-5YYISTIA-CdzF2MjL.js} +2 -2
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-BEPnPebm.js → ishikawaDiagram-YF4QCWOH-8YrFferA.js} +5 -5
- package/dist/assets/{journeyDiagram-5HDEW3XC-B3Sx5g-O.js → journeyDiagram-JHISSGLW-Bix7jj_6.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-BZwqoKM8.js → kanban-definition-UN3LZRKU-CJP7JJpX.js} +6 -6
- package/dist/assets/layout-DGIYPm2g.js +1 -0
- package/dist/assets/{mindmap-definition-LN4V7U3C-CyjRWos4.js → mindmap-definition-RKZ34NQL-Dk78wf-k.js} +9 -9
- package/dist/assets/pieDiagram-4H26LBE5-DkAjb9PV.js +30 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-DW4gRbec.js → quadrantDiagram-W4KKPZXB-DhA3Ltj3.js} +3 -3
- package/dist/assets/{requirementDiagram-TGXJPOKE-D898qBnU.js → requirementDiagram-4Y6WPE33-BwRKT1Ti.js} +1 -1
- package/dist/assets/sankeyDiagram-5OEKKPKP-Cq7Z3xZr.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-IjZb9M7w.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-CbH0JxsR.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-CzKw24Ws.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-CgFiawCT.js → timeline-definition-PNZ67QCA-ZZ8vXqsw.js} +3 -3
- package/dist/assets/vennDiagram-CIIHVFJN-Dqi0_zje.js +34 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-CtRzQ3q6.js → wardleyDiagram-YWT4CUSO-D7_vAxp3.js} +3 -3
- package/dist/assets/xychartDiagram-2RQKCTM6-BgFNWh3u.js +7 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/MermaidRenderer-CnzIvTlj.js +0 -317
- package/dist/assets/abnfDiagram-VRR7QNED-DChuAW5u.js +0 -1
- package/dist/assets/architectureDiagram-ZJ3FMSHR-DHJZWJhu.js +0 -36
- package/dist/assets/blockDiagram-677ZJIJ3-H_CNYF5m.js +0 -132
- package/dist/assets/channel-Cfw3OpIn.js +0 -1
- package/dist/assets/chunk-EX3LRPZG-Bq0HhB2B.js +0 -231
- package/dist/assets/chunk-MOJQB5TN-D2zfH4wm.js +0 -88
- package/dist/assets/chunk-RYQCIY6F-DSJh0d2F.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BkFPBJiF.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BkFPBJiF.js +0 -1
- package/dist/assets/cynefinDiagram-TSTJHNR4-MevACWGH.js +0 -62
- package/dist/assets/dagre-VKFMJZFB-BqR7tzk8.js +0 -4
- package/dist/assets/diagram-G47NLZAW-Bqjk3ZYu.js +0 -24
- package/dist/assets/diagram-OA4YK3LP-B0THRF0G.js +0 -30
- package/dist/assets/diagram-WEI45ONY-IZZ69bsz.js +0 -41
- package/dist/assets/ebnfDiagram-CCIWWBDH-B_U7c6VT.js +0 -1
- package/dist/assets/erDiagram-Q63AITRT-oGWxlmE8.js +0 -85
- package/dist/assets/flowDiagram-23GEKE2U-0scCMi71.js +0 -156
- package/dist/assets/ganttDiagram-NO4QXBWP-DIS-iO_q.js +0 -292
- package/dist/assets/layout-DEXfKzaS.js +0 -1
- package/dist/assets/map-Czzmt4hB.js +0 -1
- package/dist/assets/pegDiagram-2B236MQR-DItVX4G3.js +0 -1
- package/dist/assets/pieDiagram-ENE6RG2P-CTRyME0H.js +0 -39
- package/dist/assets/railroadDiagram-RFXS5EU6-_rBw9Q9b.js +0 -1
- package/dist/assets/sankeyDiagram-HTMAVEWB-doAkRLNI.js +0 -40
- package/dist/assets/sequenceDiagram-DBY2YBRQ-D4HUsfB2.js +0 -162
- package/dist/assets/sizeCapture-X5ZJPWSS-DJJLR6R7.js +0 -1
- package/dist/assets/stateDiagram-2N3HPSRC-0IOXcLaP.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BjcuRalB.js +0 -1
- package/dist/assets/swimlanes-5IMT3BWC-HIPL1mdx.js +0 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-usVEFD6y.js +0 -8
- package/dist/assets/vennDiagram-L72KCM5P-DiY3ySIT.js +0 -34
- package/dist/assets/xychartDiagram-FW5EYKEG-OjszPLMV.js +0 -7
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-Cl88doFf.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/vendor-markdown-BRX1CUPf.js","assets/vendor-syntax-DG6Vo7Ci.js","assets/purify.es-D6gMnemd.js","assets/isPrototype-DezZrpQP.js","assets/cose-bilkent-S5V4N54A-HnZrIUzr.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-AAUBKEIU-CfvQYM_q.js","assets/chunk-ND2GUHAM-CHJjdC0m.js","assets/flowDiagram-I6XJVG4X-DgvKpDc5.js","assets/chunk-FMBD7UC4-CqHLqk3L.js","assets/chunk-55IACEB6-I4-oEJEd.js","assets/chunk-2J33WTMH-DeY8TrNw.js","assets/channel-zLwrxaPB.js","assets/erDiagram-TEJ5UH35-hortthG_.js","assets/gitGraphDiagram-PVQCEYII-RJLy0nV8.js","assets/chunk-4BX2VUAB-DIj3bLrU.js","assets/chunk-QZHKN3VN-slcsUOxD.js","assets/cynefin-VYW2F7L2-CPNTSJVR.js","assets/ganttDiagram-6RSMTGT7-DR5xWqhT.js","assets/time-DJ0lCX4i.js","assets/linear-BGneeY6s.js","assets/init-Dmth1JHB.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CdzF2MjL.js","assets/pieDiagram-4H26LBE5-DkAjb9PV.js","assets/arc-1qRI0DXn.js","assets/ordinal-DILIJJjt.js","assets/quadrantDiagram-W4KKPZXB-DhA3Ltj3.js","assets/xychartDiagram-2RQKCTM6-BgFNWh3u.js","assets/band-CquvqAHh.js","assets/requirementDiagram-4Y6WPE33-BwRKT1Ti.js","assets/sequenceDiagram-3UESZ5HK-IjZb9M7w.js","assets/classDiagram-4FO5ZUOK-CDbYhIhU.js","assets/chunk-727SXJPM-DCx2l0Oh.js","assets/classDiagram-v2-Q7XG4LA2-CDbYhIhU.js","assets/stateDiagram-AJRCARHV-CbH0JxsR.js","assets/chunk-AQP2D5EJ-D4KlRvHF.js","assets/stateDiagram-v2-BHNVJYJU-CzKw24Ws.js","assets/journeyDiagram-JHISSGLW-Bix7jj_6.js","assets/timeline-definition-PNZ67QCA-ZZ8vXqsw.js","assets/mindmap-definition-RKZ34NQL-Dk78wf-k.js","assets/kanban-definition-UN3LZRKU-CJP7JJpX.js","assets/sankeyDiagram-5OEKKPKP-Cq7Z3xZr.js","assets/diagram-LMA3HP47-BxKOasa5.js","assets/diagram-2AECGRRQ-2lPidS0l.js","assets/blockDiagram-GPEHLZMM-C_xOdSW3.js","assets/diagram-5GNKFQAL-_tROgYB3.js","assets/architectureDiagram-3BPJPVTR-Bfi6eFLn.js","assets/diagram-KO2AKTUF-7mueA6fZ.js","assets/ishikawaDiagram-YF4QCWOH-8YrFferA.js","assets/vennDiagram-CIIHVFJN-Dqi0_zje.js","assets/diagram-OG6HWLK6-Bwf3i6eI.js","assets/wardleyDiagram-YWT4CUSO-D7_vAxp3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Gg=Object.defineProperty;var Zg=(e,t,r)=>t in e?Gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>Zg(e,typeof t!="symbol"?t+"":t,r);import{g as Kg,r as Yt,j as vt}from"./vendor-markdown-BRX1CUPf.js";import{_ as ot}from"./vendor-syntax-DG6Vo7Ci.js";import{p as Cr}from"./purify.es-D6gMnemd.js";import{Z as De,_ as $o,$ as Io,a0 as Qg,a1 as jn,a2 as qi,e as Oo,n as Vn,a3 as Jg,a4 as tp,a5 as ep,a6 as Hs,a7 as Gn,a8 as Do,a9 as rp,aa as Po,ab as As,q as Si,ac as ip,ad as sp,ae as Zn,af as Kn,ag as Qn,ah as Jn,ai as tl,aj as el,ak as ap,al as Ti,am as rl,an as il,ao as op,ap as np,c as Ys,l as lp}from"./isPrototype-DezZrpQP.js";var vi={exports:{}},hp=vi.exports,Ro;function cp(){return Ro||(Ro=1,(function(e,t){(function(r,i){e.exports=i()})(hp,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",l="hour",h="day",c="week",d="month",g="quarter",u="year",m="date",f="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var A=["th","st","nd","rd"],L=P%100;return"["+P+(A[(L-20)%10]||A[L]||A[0])+"]"}},b=function(P,A,L){var E=String(P);return!E||E.length>=A?P:""+Array(A+1-E.length).join(L)+P},T={s:b,z:function(P){var A=-P.utcOffset(),L=Math.abs(A),E=Math.floor(L/60),F=L%60;return(A<=0?"+":"-")+b(E,2,"0")+":"+b(F,2,"0")},m:function P(A,L){if(A.date()<L.date())return-P(L,A);var E=12*(L.year()-A.year())+(L.month()-A.month()),F=A.clone().add(E,d),S=L-F<0,R=A.clone().add(E+(S?-1:1),d);return+(-(E+(L-F)/(S?F-R:R-F))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:u,w:c,d:h,D:m,h:l,m:o,s:n,ms:a,Q:g}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},w="en",v={};v[w]=k;var M="$isDayjsObject",B=function(P){return P instanceof N||!(!P||!P[M])},W=function P(A,L,E){var F;if(!A)return w;if(typeof A=="string"){var S=A.toLowerCase();v[S]&&(F=S),L&&(v[S]=L,F=S);var R=A.split("-");if(!F&&R.length>1)return P(R[0])}else{var et=A.name;v[et]=A,F=et}return!E&&F&&(w=F),F||!E&&w},I=function(P,A){if(B(P))return P.clone();var L=typeof A=="object"?A:{};return L.date=P,L.args=arguments,new N(L)},$=T;$.l=W,$.i=B,$.w=function(P,A){return I(P,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var N=(function(){function P(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[M]=!0}var A=P.prototype;return A.parse=function(L){this.$d=(function(E){var F=E.date,S=E.utc;if(F===null)return new Date(NaN);if($.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var R=F.match(y);if(R){var et=R[2]-1||0,st=(R[7]||"0").substring(0,3);return S?new Date(Date.UTC(R[1],et,R[3]||1,R[4]||0,R[5]||0,R[6]||0,st)):new Date(R[1],et,R[3]||1,R[4]||0,R[5]||0,R[6]||0,st)}}return new Date(F)})(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return $},A.isValid=function(){return this.$d.toString()!==f},A.isSame=function(L,E){var F=I(L);return this.startOf(E)<=F&&F<=this.endOf(E)},A.isAfter=function(L,E){return I(L)<this.startOf(E)},A.isBefore=function(L,E){return this.endOf(E)<I(L)},A.$g=function(L,E,F){return $.u(L)?this[E]:this.set(F,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,E){var F=this,S=!!$.u(E)||E,R=$.p(L),et=function(re,G){var rt=$.w(F.$u?Date.UTC(F.$y,G,re):new Date(F.$y,G,re),F);return S?rt:rt.endOf(h)},st=function(re,G){return $.w(F.toDate()[re].apply(F.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(G)),F)},lt=this.$W,nt=this.$M,dt=this.$D,xt="set"+(this.$u?"UTC":"");switch(R){case u:return S?et(1,0):et(31,11);case d:return S?et(1,nt):et(0,nt+1);case c:var $t=this.$locale().weekStart||0,ee=(lt<$t?lt+7:lt)-$t;return et(S?dt-ee:dt+(6-ee),nt);case h:case m:return st(xt+"Hours",0);case l:return st(xt+"Minutes",1);case o:return st(xt+"Seconds",2);case n:return st(xt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,E){var F,S=$.p(L),R="set"+(this.$u?"UTC":""),et=(F={},F[h]=R+"Date",F[m]=R+"Date",F[d]=R+"Month",F[u]=R+"FullYear",F[l]=R+"Hours",F[o]=R+"Minutes",F[n]=R+"Seconds",F[a]=R+"Milliseconds",F)[S],st=S===h?this.$D+(E-this.$W):E;if(S===d||S===u){var lt=this.clone().set(m,1);lt.$d[et](st),lt.init(),this.$d=lt.set(m,Math.min(this.$D,lt.daysInMonth())).$d}else et&&this.$d[et](st);return this.init(),this},A.set=function(L,E){return this.clone().$set(L,E)},A.get=function(L){return this[$.p(L)]()},A.add=function(L,E){var F,S=this;L=Number(L);var R=$.p(E),et=function(nt){var dt=I(S);return $.w(dt.date(dt.date()+Math.round(nt*L)),S)};if(R===d)return this.set(d,this.$M+L);if(R===u)return this.set(u,this.$y+L);if(R===h)return et(1);if(R===c)return et(7);var st=(F={},F[o]=i,F[l]=s,F[n]=r,F)[R]||1,lt=this.$d.getTime()+L*st;return $.w(lt,this)},A.subtract=function(L,E){return this.add(-1*L,E)},A.format=function(L){var E=this,F=this.$locale();if(!this.isValid())return F.invalidDate||f;var S=L||"YYYY-MM-DDTHH:mm:ssZ",R=$.z(this),et=this.$H,st=this.$m,lt=this.$M,nt=F.weekdays,dt=F.months,xt=F.meridiem,$t=function(G,rt,pt,Tt){return G&&(G[rt]||G(E,S))||pt[rt].slice(0,Tt)},ee=function(G){return $.s(et%12||12,G,"0")},re=xt||function(G,rt,pt){var Tt=G<12?"AM":"PM";return pt?Tt.toLowerCase():Tt};return S.replace(C,(function(G,rt){return rt||(function(pt){switch(pt){case"YY":return String(E.$y).slice(-2);case"YYYY":return $.s(E.$y,4,"0");case"M":return lt+1;case"MM":return $.s(lt+1,2,"0");case"MMM":return $t(F.monthsShort,lt,dt,3);case"MMMM":return $t(dt,lt);case"D":return E.$D;case"DD":return $.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return $t(F.weekdaysMin,E.$W,nt,2);case"ddd":return $t(F.weekdaysShort,E.$W,nt,3);case"dddd":return nt[E.$W];case"H":return String(et);case"HH":return $.s(et,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return re(et,st,!0);case"A":return re(et,st,!1);case"m":return String(st);case"mm":return $.s(st,2,"0");case"s":return String(E.$s);case"ss":return $.s(E.$s,2,"0");case"SSS":return $.s(E.$ms,3,"0");case"Z":return R}return null})(G)||R.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(L,E,F){var S,R=this,et=$.p(E),st=I(L),lt=(st.utcOffset()-this.utcOffset())*i,nt=this-st,dt=function(){return $.m(R,st)};switch(et){case u:S=dt()/12;break;case d:S=dt();break;case g:S=dt()/3;break;case c:S=(nt-lt)/6048e5;break;case h:S=(nt-lt)/864e5;break;case l:S=nt/s;break;case o:S=nt/i;break;case n:S=nt/r;break;default:S=nt}return F?S:$.a(S)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return v[this.$L]},A.locale=function(L,E){if(!L)return this.$L;var F=this.clone(),S=W(L,E,!0);return S&&(F.$L=S),F},A.clone=function(){return $.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},P})(),z=N.prototype;return I.prototype=z,[["$ms",a],["$s",n],["$m",o],["$H",l],["$W",h],["$M",d],["$y",u],["$D",m]].forEach((function(P){z[P[1]]=function(A){return this.$g(A,P[0],P[1])}})),I.extend=function(P,A){return P.$i||(P(A,N,I),P.$i=!0),I},I.locale=W,I.isDayjs=B,I.unix=function(P){return I(1e3*P)},I.en=v[w],I.Ls=v,I.p={},I}))})(vi)),vi.exports}var dp=cp();const up=Kg(dp);var sl=Object.defineProperty,p=(e,t)=>sl(e,"name",{value:t,configurable:!0}),gp=(e,t)=>{for(var r in t)sl(e,r,{get:t[r],enumerable:!0})},ue={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Da=p(function(e="fatal"){let t=ue.fatal;typeof e=="string"?e.toLowerCase()in ue&&(t=ue[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=ue.fatal&&(q.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),t<=ue.error&&(q.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),t<=ue.warn&&(q.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),t<=ue.info&&(q.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),t<=ue.debug&&(q.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),t<=ue.trace&&(q.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=p(e=>`%c${up().format("ss.SSS")} : ${e} : `,"format");const Bi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Bi.hue2rgb(a,s,e+1/3)*255;case"g":return Bi.hue2rgb(a,s,e)*255;case"b":return Bi.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,l=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},pp={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},fp={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},tt={channel:Bi,lang:pp,unit:fp},Te={};for(let e=0;e<=255;e++)Te[e]=tt.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class mp{constructor(){this.type=Ft.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ft.ALL}is(t){return this.type===t}}class yp{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new mp}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const gs=new yp({r:0,g:0,b:0,a:0},"transparent"),rr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(rr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,l=n?8:4,h=a?0:-1,c=n?255:15;return gs.set({r:(i>>l*(h+3)&c)*o,g:(i>>l*(h+2)&c)*o,b:(i>>l*(h+1)&c)*o,a:a?(i&c)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Te[Math.round(t)]}${Te[Math.round(r)]}${Te[Math.round(i)]}${Te[Math.round(s*255)]}`:`#${Te[Math.round(t)]}${Te[Math.round(r)]}${Te[Math.round(i)]}`}},Re={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(Re.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Re.re);if(!r)return;const[,i,s,a,n,o]=r;return gs.set({h:Re._hue2deg(i),s:tt.channel.clamp.s(parseFloat(s)),l:tt.channel.clamp.l(parseFloat(a)),a:n?tt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${s})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},Ur={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=Ur.colors[e];if(t)return rr.parse(t)},stringify:e=>{const t=rr.stringify(e);for(const r in Ur.colors)if(Ur.colors[r]===t)return r}},Pr={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(Pr.re);if(!r)return;const[,i,s,a,n,o,l,h,c]=r;return gs.set({r:tt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:tt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?tt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(s)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},ne={format:{keyword:Ur,hex:rr,rgb:Pr,rgba:Pr,hsl:Re,hsla:Re},parse:e=>{if(typeof e!="string")return e;const t=rr.parse(e)||Pr.parse(e)||Re.parse(e)||Ur.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?Re.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Pr.stringify(e):rr.stringify(e)},al=(e,t)=>{const r=ne.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return ne.stringify(r)},_e=(e,t,r=0,i=1)=>{if(typeof e!="number")return al(e,{a:t});const s=gs.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return ne.stringify(s)},Cp=e=>{const{r:t,g:r,b:i}=ne.parse(e),s=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(s)},xp=e=>Cp(e)>=.5,Jt=e=>!xp(e),ol=(e,t,r)=>{const i=ne.parse(e),s=i[t],a=tt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),ne.stringify(i)},O=(e,t)=>ol(e,"l",t),D=(e,t)=>ol(e,"l",-t),x=(e,t)=>{const r=ne.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return al(e,i)},kp=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=ne.parse(e),{r:o,g:l,b:h,a:c}=ne.parse(t),d=r/100,g=d*2-1,u=n-c,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,y=1-f,C=i*f+o*y,k=s*f+l*y,b=a*f+h*y,T=n*d+c*(1-d);return _e(C,k,b,T)},_=(e,t=100)=>{const r=ne.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,kp(r,e,t)};var nl=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Xr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bp=/\s*%%.*\n/gm,sr,ll=(sr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(sr,"UnknownDiagramError"),sr),Ne={},Pa=p(function(e,t){e=e.replace(nl,"").replace(Xr,"").replace(bp,`
|
|
3
|
+
`);for(const[r,{detector:i}]of Object.entries(Ne))if(i(e,t))return r;throw new ll(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Us=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)hl(t,r,i)},"registerLazyLoadedDiagrams"),hl=p((e,t,r)=>{Ne[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),Ne[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),wp=p(e=>Ne[e].loader,"getDiagramLoader"),Xs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Xs(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Xs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),wt=Xs,he="#ffffff",ce="#f2f2f2",J=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ar,Sp=(ar=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,n,o,l,h,c,d,g,u,m,f,y,C,k,b,T,w,v,M,B,W,I,$,N,z,P,A,L,E,F,S;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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 R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=D(this["cScale"+R],75);else for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=D(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||_(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||O(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||D(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||x(this.mainBkg,{h:180,s:-15,l:t*(5+R*3)}),this["surfacePeer"+R]=this["surfacePeer"+R]||x(this.mainBkg,{h:180,s:-15,l:t*(8+R*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((u=this.wardley)==null?void 0:u.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((f=this.wardley)==null?void 0:f.gridColor)||this.gridColor,componentFill:((y=this.wardley)==null?void 0:y.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((k=this.wardley)==null?void 0:k.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((T=this.wardley)==null?void 0:T.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((v=this.wardley)==null?void 0:v.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(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:((B=this.xyChart)==null?void 0:B.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((I=this.xyChart)==null?void 0:I.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:(($=this.xyChart)==null?void 0:$.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((N=this.xyChart)==null?void 0:N.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((z=this.xyChart)==null?void 0:z.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((P=this.xyChart)==null?void 0:P.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((F=this.xyChart)==null?void 0:F.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ar,"Theme"),ar),Tp=p(e=>{const t=new Sp;return t.calculate(e),t},"getThemeVariables"),or,vp=(or=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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=O(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=_e(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=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=_e(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_e(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,n,o,l,h,c,d,g,u,m,f,y,C,k,b,T,w,v,M,B,W,I,$,N,z,P,A,L,E,F;this.secondBkg=O(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=O(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=O(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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||_(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScalePeer"+S]=this["cScalePeer"+S]||O(this["cScale"+S],10);for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-10+S*4)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-7+S*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??O(this["cScale"+S],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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((k=this.radar)==null?void 0:k.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((B=this.wardley)==null?void 0:B.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((I=this.wardley)==null?void 0:I.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.mainBkg,componentStroke:((N=this.wardley)==null?void 0:N.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((E=this.wardley)==null?void 0:E.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?D(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(or,"Theme"),or),Bp=p(e=>{const t=new vp;return t.calculate(e),t},"getThemeVariables"),nr,_p=(nr=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=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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=J(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=_e(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,n,o,l,h,c,d,g,u,m,f,y,C,k,b,T,w,v,M,B,W,I,$,N,z,P,A,L,E,F;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||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=D(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,l:-(7+S*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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||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||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((b=this.wardley)==null?void 0:b.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((B=this.xyChart)==null?void 0:B.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((N=this.xyChart)==null?void 0:N.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)),this.gitInv0=this.gitInv0||D(_(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(nr,"Theme"),nr),Lp=p(e=>{const t=new _p;return t.calculate(e),t},"getThemeVariables"),lr,Fp=(lr=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=O("#cde498",10),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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,s,a,n,o,l,h,c,d,g,u,m,f,y,C,k,b,T,w,v,M,B,W,I,$,N,z,P,A,L,E,F;this.actorBorder=D(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||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=D(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(8+S*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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((m=this.wardley)==null?void 0:m.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((y=this.wardley)==null?void 0:y.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((b=this.wardley)==null?void 0:b.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((v=this.wardley)==null?void 0:v.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((B=this.xyChart)==null?void 0:B.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((N=this.xyChart)==null?void 0:N.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(lr,"Theme"),lr),Mp=p(e=>{const t=new Fp;return t.calculate(e),t},"getThemeVariables"),hr,Ap=(hr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,n,o,l,h,c,d,g,u,m,f,y,C,k,b,T,w,v,M,B,W,I,$,N,z,P,A,L,E,F;this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||_(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||O(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||D(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{l:-(8+S*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=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=D(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=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=D(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 S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];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 S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??this["cScale"+S];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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((k=this.radar)==null?void 0:k.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((B=this.wardley)==null?void 0:B.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((I=this.wardley)==null?void 0:I.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((N=this.wardley)==null?void 0:N.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:((E=this.wardley)==null?void 0:E.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(hr,"Theme"),hr),Ep=p(e=>{const t=new Ap;return t.calculate(e),t},"getThemeVariables"),cr,$p=(cr=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=J(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,n,o,l,h,c,d,g,u,m,f;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=D(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=D(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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:((f=this.xyChart)==null?void 0:f.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(cr,"Theme"),cr),Ip=p(e=>{const t=new $p;return t.calculate(e),t},"getThemeVariables"),dr,Op=(dr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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=O(_("#323D47"),10),this.border1="#ccc",this.border2=_e(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,s,a,n,o,l,h,c,d,g;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(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]=D(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=D(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]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||D(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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(dr,"Theme"),dr),Dp=p(e=>{const t=new Op;return t.calculate(e),t},"getThemeVariables"),ur,Pp=(ur=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=J("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,d,g,u,m,f;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=D(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=D(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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:((f=this.xyChart)==null?void 0:f.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ur,"Theme"),ur),Rp=p(e=>{const t=new Pp;return t.calculate(e),t},"getThemeVariables"),gr,qp=(gr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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=O(_("#323D47"),10),this.border1="#ccc",this.border2=_e(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,s,a,n,o,l,h,c,d,g;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(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]=D(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=D(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]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||D(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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(gr,"Theme"),gr),Wp=p(e=>{const t=new qp;return t.calculate(e),t},"getThemeVariables"),pr,zp=(pr=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=J(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,d,g,u,m,f;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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:((f=this.xyChart)==null?void 0:f.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(pr,"Theme"),pr),Np=p(e=>{const t=new zp;return t.calculate(e),t},"getThemeVariables"),fr,Hp=(fr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(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=O(_("#323D47"),10),this.border1="#ccc",this.border2=_e(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,s,a,n,o,l,h,c,d,g;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||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(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?D(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||D(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||O(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]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||D(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=D(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||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):D(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?D(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(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||he,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ce}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(fr,"Theme"),fr),Yp=p(e=>{const t=new Hp;return t.calculate(e),t},"getThemeVariables"),me={base:{getThemeVariables:Tp},dark:{getThemeVariables:Bp},default:{getThemeVariables:Lp},forest:{getThemeVariables:Mp},neutral:{getThemeVariables:Ep},neo:{getThemeVariables:Ip},"neo-dark":{getThemeVariables:Dp},redux:{getThemeVariables:Rp},"redux-dark":{getThemeVariables:Wp},"redux-color":{getThemeVariables:Np},"redux-dark-color":{getThemeVariables:Yp}},It={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},cl={...It,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:me.default.getThemeVariables(),sequence:{...It.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...It.gantt,tickInterval:void 0,useWidth:void 0},c4:{...It.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...It.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...It.pie,useWidth:984},xyChart:{...It.xyChart,useWidth:void 0},requirement:{...It.requirement,useWidth:void 0},packet:{...It.packet},eventmodeling:{...It.eventmodeling},treeView:{...It.treeView,useWidth:void 0},radar:{...It.radar},ishikawa:{...It.ishikawa},sankey:{...It.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...It.venn}},dl=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...dl(e[i],"")]:[...r,t+i],[]),"keyify"),Up=new Set(dl(cl,"")),ul=cl,Wi=p(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Wi(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Up.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(q.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else q.debug("sanitizing object",t),Wi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=gl(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]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),gl=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),xr=Object.freeze(ul),ke=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),qt=wt({},xr),zi,He=[],jr=wt({},xr),ps=p((e,t)=>{let r=wt({},e),i={};for(const s of t)ml(s),i=wt(i,s);if(r=wt(r,i),i.theme&&i.theme in me){const s=wt({},zi),a=wt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in me&&(r.themeVariables=me[r.theme].getThemeVariables(a))}return jr=r,Cl(jr),jr},"updateCurrentConfig"),Xp=p(e=>(qt=wt({},xr),qt=wt(qt,e),e.theme&&me[e.theme]&&(qt.themeVariables=me[e.theme].getThemeVariables(e.themeVariables)),ps(qt,He),qt),"setSiteConfig"),jp=p(e=>{zi=wt({},e)},"saveConfigFromInitialize"),Vp=p(e=>(qt=wt(qt,e),ps(qt,He),qt),"updateSiteConfig"),pl=p(()=>wt({},qt),"getSiteConfig"),fl=p(e=>(Cl(e),wt(jr,e),mt()),"setConfig"),mt=p(()=>wt({},jr),"getConfig"),ml=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.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"&&ml(e[t])}))},"sanitize"),Gp=p(e=>{var t;Wi(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),He.push(e),ps(qt,He)},"addDirective"),Ni=p((e=qt)=>{He=[],ps(e,He)},"reset"),Zp={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."},qo={},yl=p(e=>{qo[e]||(q.warn(Zp[e]),qo[e]=!0)},"issueWarning"),Cl=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&yl("LAZY_LOAD_DEPRECATED")},"checkConfig"),bS=p(()=>{let e={};zi&&(e=wt(e,zi));for(const t of He)e=wt(e,t);return e},"getUserDefinedConfig"),Pt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&yl("FLOWCHART_HTML_LABELS_DEPRECATED"),ke(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ai=/<br\s*\/?>/gi,Kp=p(e=>e?bl(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Qp=(()=>{let e=!1;return()=>{e||(xl(),e=!0)}})();function xl(){const e="data-temp-href-target";Cr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Cr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(xl,"setupDompurifyHooks");var kl=p(e=>(Qp(),Cr.sanitize(e)),"removeScript"),Wo=p((e,t)=>{if(Pt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=kl(e):r!=="loose"&&(e=bl(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=rf(e))}return e},"sanitizeMore"),Qt=p((e,t)=>e&&(t.dompurifyConfig?e=Cr.sanitize(Wo(e,t),t.dompurifyConfig).toString():e=Cr.sanitize(Wo(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Jp=p((e,t)=>typeof e=="string"?Qt(e,t):e.flat().map(r=>Qt(r,t)),"sanitizeTextOrArray"),tf=p(e=>ai.test(e),"hasBreaks"),ef=p(e=>e.split(ai),"splitBreaks"),rf=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),bl=p(e=>e.replace(ai,"#br#"),"breakToPlaceholder"),sf=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),af=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),of=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zo=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];nf(a,n)&&(s=a+","+n,i++,r.pop())}r.push(lf(s))}return r.join("")},"parseGenericTypes"),js=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),nf=p((e,t)=>{const r=js(e,"~"),i=js(t,"~");return r===1&&i===1},"shouldCombineSets"),lf=p(e=>{const t=js(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),No=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Vs=/\$\$(.*)\$\$/g,Zr=p(e=>{var t;return(((t=e.match(Vs))==null?void 0:t.length)??0)>0},"hasKatex"),wS=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await wl(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),hf=p(async(e,t)=>{if(!Zr(e))return e;if(!(No()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Vs,"MathML is unsupported in this environment.");{const{default:r}=await ot(async()=>{const{default:s}=await import("./vendor-markdown-BRX1CUPf.js").then(a=>a.h);return{default:s}},[]),i=t.forceLegacyMathML||!No()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ai).map(s=>Zr(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Vs,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),wl=p(async(e,t)=>Qt(await hf(e,t),t),"renderKatexSanitized"),oi={getRows:Kp,sanitizeText:Qt,sanitizeTextOrArray:Jp,hasBreaks:tf,splitBreaks:ef,lineBreakRegex:ai,removeScript:kl,getUrl:sf,evaluate:ke,getMax:af,getMin:of},cf=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),df=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Sl=p(function(e,t,r,i){const s=df(t,r,i);cf(e,s)},"configureSvgSize"),uf=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;q.info(`SVG bounds: ${a}x${n}`,s);let o=0,l=0;q.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=n+r*2,q.info(`Calculated bounds: ${o}x${l}`),Sl(t,l,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),_i={};function Gs(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
4
|
+
`)}p(Gs,"cssStyleSheetToString");var gf=p((e,t,r,i)=>{let s="";return e in _i&&_i[e]?s=_i[e]({...r,svgId:i}):q.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
|
+
${s}
|
|
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"),pf=p((e,t)=>{t!==void 0&&(_i[e]=t)},"addStylesForDiagram"),ff=gf,Tl={};gp(Tl,{clear:()=>mf,getAccDescription:()=>kf,getAccTitle:()=>Cf,getDiagramTitle:()=>wf,setAccDescription:()=>xf,setAccTitle:()=>yf,setDiagramTitle:()=>bf});var Ra="",qa="",Wa="",za=p(e=>Qt(e,mt()),"sanitizeText"),mf=p(()=>{Ra="",Wa="",qa=""},"clear"),yf=p(e=>{Ra=za(e).replace(/^\s+/g,"")},"setAccTitle"),Cf=p(()=>Ra,"getAccTitle"),xf=p(e=>{Wa=za(e).replace(/\n\s+/g,`
|
|
123
|
+
`)},"setAccDescription"),kf=p(()=>Wa,"getAccDescription"),bf=p(e=>{qa=za(e)},"setDiagramTitle"),wf=p(()=>qa,"getDiagramTitle"),Ho=q,Sf=Da,ht=mt,SS=fl,TS=xr,Na=p(e=>Qt(e,ht()),"sanitizeText"),Tf=uf,vf=p(()=>Tl,"getCommonDb"),Hi={},Yi=p((e,t,r)=>{var i;Hi[e]&&Ho.warn(`Diagram with id ${e} already registered. Overwriting.`),Hi[e]=t,r&&hl(e,r),pf(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ho,Sf,ht,Na,Tf,vf(),()=>{})},"registerDiagram"),Zs=p(e=>{if(e in Hi)return Hi[e];throw new Bf(e)},"getDiagram"),mr,Bf=(mr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(mr,"DiagramNotFoundError"),mr),_f={value:()=>{}};function vl(){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 Li(r)}function Li(e){this._=e}function Lf(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Li.prototype=vl.prototype={constructor:Li,on:function(e,t){var r=this._,i=Lf(e+"",r),s,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((s=(e=i[a]).type)&&(s=Ff(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<n;)if(s=(e=i[a]).type)r[s]=Yo(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Yo(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Li(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function Ff(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Yo(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=_f,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ks="http://www.w3.org/1999/xhtml";const Uo={svg:"http://www.w3.org/2000/svg",xhtml:Ks,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fs(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Uo.hasOwnProperty(t)?{space:Uo[t],local:e}:e}function Mf(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ks&&t.documentElement.namespaceURI===Ks?t.createElement(e):t.createElementNS(r,e)}}function Af(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bl(e){var t=fs(e);return(t.local?Af:Mf)(t)}function Ef(){}function Ha(e){return e==null?Ef:function(){return this.querySelector(e)}}function $f(e){typeof e!="function"&&(e=Ha(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),l,h,c=0;c<n;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),o[c]=h);return new Ht(i,this._parents)}function If(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Of(){return[]}function _l(e){return e==null?Of:function(){return this.querySelectorAll(e)}}function Df(e){return function(){return If(e.apply(this,arguments))}}function Pf(e){typeof e=="function"?e=Df(e):e=_l(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,l,h=0;h<o;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),s.push(l));return new Ht(i,s)}function Ll(e){return function(){return this.matches(e)}}function Fl(e){return function(t){return t.matches(e)}}var Rf=Array.prototype.find;function qf(e){return function(){return Rf.call(this.children,e)}}function Wf(){return this.firstElementChild}function zf(e){return this.select(e==null?Wf:qf(typeof e=="function"?e:Fl(e)))}var Nf=Array.prototype.filter;function Hf(){return Array.from(this.children)}function Yf(e){return function(){return Nf.call(this.children,e)}}function Uf(e){return this.selectAll(e==null?Hf:Yf(typeof e=="function"?e:Fl(e)))}function Xf(e){typeof e!="function"&&(e=Ll(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,h=0;h<n;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&o.push(l);return new Ht(i,this._parents)}function Ml(e){return new Array(e.length)}function jf(){return new Ht(this._enter||this._groups.map(Ml),this._parents)}function Ui(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ui.prototype={constructor:Ui,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 Vf(e){return function(){return e}}function Gf(e,t,r,i,s,a){for(var n=0,o,l=t.length,h=a.length;n<h;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new Ui(e,a[n]);for(;n<l;++n)(o=t[n])&&(s[n]=o)}function Zf(e,t,r,i,s,a,n){var o,l,h=new Map,c=t.length,d=a.length,g=new Array(c),u;for(o=0;o<c;++o)(l=t[o])&&(g[o]=u=n.call(l,l.__data__,o,t)+"",h.has(u)?s[o]=l:h.set(u,l));for(o=0;o<d;++o)u=n.call(e,a[o],o,a)+"",(l=h.get(u))?(i[o]=l,l.__data__=a[o],h.delete(u)):r[o]=new Ui(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(g[o])===l&&(s[o]=l)}function Kf(e){return e.__data__}function Qf(e,t){if(!arguments.length)return Array.from(this,Kf);var r=t?Zf:Gf,i=this._parents,s=this._groups;typeof e!="function"&&(e=Vf(e));for(var a=s.length,n=new Array(a),o=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=s[h],g=d.length,u=Jf(e.call(c,c&&c.__data__,h,i)),m=u.length,f=o[h]=new Array(m),y=n[h]=new Array(m),C=l[h]=new Array(g);r(c,d,f,y,C,u,t);for(var k=0,b=0,T,w;k<m;++k)if(T=f[k]){for(k>=b&&(b=k+1);!(w=y[b])&&++b<m;);T._next=w||null}}return n=new Ht(n,i),n._enter=o,n._exit=l,n}function Jf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tm(){return new Ht(this._exit||this._groups.map(Ml),this._parents)}function em(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function rm(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),l=0;l<n;++l)for(var h=r[l],c=i[l],d=h.length,g=o[l]=new Array(d),u,m=0;m<d;++m)(u=h[m]||c[m])&&(g[m]=u);for(;l<s;++l)o[l]=r[l];return new Ht(o,this._parents)}function im(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function sm(e){e||(e=am);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var n=r[a],o=n.length,l=s[a]=new Array(o),h,c=0;c<o;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new Ht(s,this._parents).order()}function am(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function om(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function nm(){return Array.from(this)}function lm(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function hm(){let e=0;for(const t of this)++e;return e}function cm(){return!this.node()}function dm(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function um(e){return function(){this.removeAttribute(e)}}function gm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pm(e,t){return function(){this.setAttribute(e,t)}}function fm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mm(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ym(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 Cm(e,t){var r=fs(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?gm:um:typeof t=="function"?r.local?ym:mm:r.local?fm:pm)(r,t))}function Al(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xm(e){return function(){this.style.removeProperty(e)}}function km(e,t,r){return function(){this.style.setProperty(e,t,r)}}function bm(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function wm(e,t,r){return arguments.length>1?this.each((t==null?xm:typeof t=="function"?bm:km)(e,t,r??"")):kr(this.node(),e)}function kr(e,t){return e.style.getPropertyValue(t)||Al(e).getComputedStyle(e,null).getPropertyValue(t)}function Sm(e){return function(){delete this[e]}}function Tm(e,t){return function(){this[e]=t}}function vm(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bm(e,t){return arguments.length>1?this.each((t==null?Sm:typeof t=="function"?vm:Tm)(e,t)):this.node()[e]}function El(e){return e.trim().split(/^|\s+/)}function Ya(e){return e.classList||new $l(e)}function $l(e){this._node=e,this._names=El(e.getAttribute("class")||"")}$l.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 Il(e,t){for(var r=Ya(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Ol(e,t){for(var r=Ya(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function _m(e){return function(){Il(this,e)}}function Lm(e){return function(){Ol(this,e)}}function Fm(e,t){return function(){(t.apply(this,arguments)?Il:Ol)(this,e)}}function Mm(e,t){var r=El(e+"");if(arguments.length<2){for(var i=Ya(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Fm:t?_m:Lm)(r,t))}function Am(){this.textContent=""}function Em(e){return function(){this.textContent=e}}function $m(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Im(e){return arguments.length?this.each(e==null?Am:(typeof e=="function"?$m:Em)(e)):this.node().textContent}function Om(){this.innerHTML=""}function Dm(e){return function(){this.innerHTML=e}}function Pm(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Rm(e){return arguments.length?this.each(e==null?Om:(typeof e=="function"?Pm:Dm)(e)):this.node().innerHTML}function qm(){this.nextSibling&&this.parentNode.appendChild(this)}function Wm(){return this.each(qm)}function zm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Nm(){return this.each(zm)}function Hm(e){var t=typeof e=="function"?e:Bl(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ym(){return null}function Um(e,t){var r=typeof e=="function"?e:Bl(e),i=t==null?Ym:typeof t=="function"?t:Ha(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Xm(){var e=this.parentNode;e&&e.removeChild(this)}function jm(){return this.each(Xm)}function Vm(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gm(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zm(e){return this.select(e?Gm:Vm)}function Km(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Qm(e){return function(t){e.call(this,t,this.__data__)}}function Jm(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 ty(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ey(e,t,r){return function(){var i=this.__on,s,a=Qm(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function ry(e,t,r){var i=Jm(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,c;l<h;++l)for(s=0,c=o[l];s<a;++s)if((n=i[s]).type===c.type&&n.name===c.name)return c.value}return}for(o=t?ey:ty,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function Dl(e,t,r){var i=Al(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function iy(e,t){return function(){return Dl(this,e,t)}}function sy(e,t){return function(){return Dl(this,e,t.apply(this,arguments))}}function ay(e,t){return this.each((typeof t=="function"?sy:iy)(e,t))}function*oy(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var Pl=[null];function Ht(e,t){this._groups=e,this._parents=t}function ni(){return new Ht([[document.documentElement]],Pl)}function ny(){return this}Ht.prototype=ni.prototype={constructor:Ht,select:$f,selectAll:Pf,selectChild:zf,selectChildren:Uf,filter:Xf,data:Qf,enter:jf,exit:tm,join:em,merge:rm,selection:ny,order:im,sort:sm,call:om,nodes:nm,node:lm,size:hm,empty:cm,each:dm,attr:Cm,style:wm,property:Bm,classed:Mm,text:Im,html:Rm,raise:Wm,lower:Nm,append:Hm,insert:Um,remove:jm,clone:Zm,datum:Km,on:ry,dispatch:ay,[Symbol.iterator]:oy};function it(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],Pl)}var Xo=180/Math.PI,Qs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rl(e,t,r,i,s,a){var n,o,l;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,n=-n),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Xo,skewX:Math.atan(l)*Xo,scaleX:n,scaleY:o}}var gi;function ly(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qs:Rl(t.a,t.b,t.c,t.d,t.e,t.f)}function hy(e){return e==null||(gi||(gi=document.createElementNS("http://www.w3.org/2000/svg","g")),gi.setAttribute("transform",e),!(e=gi.transform.baseVal.consolidate()))?Qs:(e=e.matrix,Rl(e.a,e.b,e.c,e.d,e.e,e.f))}function ql(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,c,d,g,u,m){if(h!==d||c!==g){var f=u.push("translate(",null,t,null,r);m.push({i:f-4,x:De(h,d)},{i:f-2,x:De(c,g)})}else(d||g)&&u.push("translate("+d+t+g+r)}function n(h,c,d,g){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),g.push({i:d.push(s(d)+"rotate(",null,i)-2,x:De(h,c)})):c&&d.push(s(d)+"rotate("+c+i)}function o(h,c,d,g){h!==c?g.push({i:d.push(s(d)+"skewX(",null,i)-2,x:De(h,c)}):c&&d.push(s(d)+"skewX("+c+i)}function l(h,c,d,g,u,m){if(h!==d||c!==g){var f=u.push(s(u)+"scale(",null,",",null,")");m.push({i:f-4,x:De(h,d)},{i:f-2,x:De(c,g)})}else(d!==1||g!==1)&&u.push(s(u)+"scale("+d+","+g+")")}return function(h,c){var d=[],g=[];return h=e(h),c=e(c),a(h.translateX,h.translateY,c.translateX,c.translateY,d,g),n(h.rotate,c.rotate,d,g),o(h.skewX,c.skewX,d,g),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,d,g),h=c=null,function(u){for(var m=-1,f=g.length,y;++m<f;)d[(y=g[m]).i]=y.x(u);return d.join("")}}}var cy=ql(ly,"px, ","px)","deg)"),dy=ql(hy,", ",")",")"),br=0,Rr=0,Mr=0,Wl=1e3,Xi,qr,ji=0,Ye=0,ms=0,Kr=typeof performance=="object"&&performance.now?performance:Date,zl=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ua(){return Ye||(zl(uy),Ye=Kr.now()+ms)}function uy(){Ye=0}function Vi(){this._call=this._time=this._next=null}Vi.prototype=Nl.prototype={constructor:Vi,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ua():+r)+(t==null?0:+t),!this._next&&qr!==this&&(qr?qr._next=this:Xi=this,qr=this),this._call=e,this._time=r,Js()},stop:function(){this._call&&(this._call=null,this._time=1/0,Js())}};function Nl(e,t,r){var i=new Vi;return i.restart(e,t,r),i}function gy(){Ua(),++br;for(var e=Xi,t;e;)(t=Ye-e._time)>=0&&e._call.call(void 0,t),e=e._next;--br}function jo(){Ye=(ji=Kr.now())+ms,br=Rr=0;try{gy()}finally{br=0,fy(),Ye=0}}function py(){var e=Kr.now(),t=e-ji;t>Wl&&(ms-=t,ji=e)}function fy(){for(var e,t=Xi,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:Xi=r);qr=e,Js(i)}function Js(e){if(!br){Rr&&(Rr=clearTimeout(Rr));var t=e-Ye;t>24?(e<1/0&&(Rr=setTimeout(jo,e-Kr.now()-ms)),Mr&&(Mr=clearInterval(Mr))):(Mr||(ji=Kr.now(),Mr=setInterval(py,Wl)),br=1,zl(jo))}}function Vo(e,t,r){var i=new Vi;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var my=vl("start","end","cancel","interrupt"),yy=[],Hl=0,Go=1,ta=2,Fi=3,Zo=4,ea=5,Mi=6;function ys(e,t,r,i,s,a){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;Cy(e,r,{name:t,index:i,group:s,on:my,tween:yy,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Hl})}function Xa(e,t){var r=te(e,t);if(r.state>Hl)throw new Error("too late; already scheduled");return r}function de(e,t){var r=te(e,t);if(r.state>Fi)throw new Error("too late; already running");return r}function te(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Cy(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Nl(a,0,r.time);function a(h){r.state=Go,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var c,d,g,u;if(r.state!==Go)return l();for(c in i)if(u=i[c],u.name===r.name){if(u.state===Fi)return Vo(n);u.state===Zo?(u.state=Mi,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<t&&(u.state=Mi,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(Vo(function(){r.state===Fi&&(r.state=Zo,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=ta,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ta){for(r.state=Fi,s=new Array(g=r.tween.length),c=0,d=-1;c<g;++c)(u=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function o(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=ea,1),d=-1,g=s.length;++d<g;)s[d].call(e,c);r.state===ea&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Mi,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function xy(e,t){var r=e.__transition,i,s,a=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){a=!1;continue}s=i.state>ta&&i.state<ea,i.state=Mi,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}a&&delete e.__transition}}function ky(e){return this.each(function(){xy(this,e)})}function by(e,t){var r,i;return function(){var s=de(this,e),a=s.tween;if(a!==r){i=r=a;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}s.tween=i}}function wy(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=de(this,e),n=a.tween;if(n!==i){s=(i=n).slice();for(var o={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=o;break}l===h&&s.push(o)}a.tween=s}}function Sy(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=te(this.node(),r).tween,s=0,a=i.length,n;s<a;++s)if((n=i[s]).name===e)return n.value;return null}return this.each((t==null?by:wy)(r,e,t))}function ja(e,t,r){var i=e._id;return e.each(function(){var s=de(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return te(s,i).value[t]}}function Yl(e,t){var r;return(typeof t=="number"?De:t instanceof $o?Io:(r=$o(t))?(t=r,Io):Qg)(e,t)}function Ty(e){return function(){this.removeAttribute(e)}}function vy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function By(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttribute(e);return n===s?null:n===i?a:a=t(i=n,r)}}function _y(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttributeNS(e.space,e.local);return n===s?null:n===i?a:a=t(i=n,r)}}function Ly(e,t,r){var i,s,a;return function(){var n,o=r(this),l;return o==null?void this.removeAttribute(e):(n=this.getAttribute(e),l=o+"",n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o)))}}function Fy(e,t,r){var i,s,a;return function(){var n,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),l=o+"",n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o)))}}function My(e,t){var r=fs(e),i=r==="transform"?dy:Yl;return this.attrTween(e,typeof t=="function"?(r.local?Fy:Ly)(r,i,ja(this,"attr."+e,t)):t==null?(r.local?vy:Ty)(r):(r.local?_y:By)(r,i,t))}function Ay(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Ey(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function $y(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ey(e,a)),r}return s._value=t,s}function Iy(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ay(e,a)),r}return s._value=t,s}function Oy(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=fs(e);return this.tween(r,(i.local?$y:Iy)(i,t))}function Dy(e,t){return function(){Xa(this,e).delay=+t.apply(this,arguments)}}function Py(e,t){return t=+t,function(){Xa(this,e).delay=t}}function Ry(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Dy:Py)(t,e)):te(this.node(),t).delay}function qy(e,t){return function(){de(this,e).duration=+t.apply(this,arguments)}}function Wy(e,t){return t=+t,function(){de(this,e).duration=t}}function zy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qy:Wy)(t,e)):te(this.node(),t).duration}function Ny(e,t){if(typeof t!="function")throw new Error;return function(){de(this,e).ease=t}}function Hy(e){var t=this._id;return arguments.length?this.each(Ny(t,e)):te(this.node(),t).ease}function Yy(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;de(this,e).ease=r}}function Uy(e){if(typeof e!="function")throw new Error;return this.each(Yy(this._id,e))}function Xy(e){typeof e!="function"&&(e=Ll(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,h=0;h<n;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&o.push(l);return new Ce(i,this._parents,this._name,this._id)}function jy(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),n=new Array(i),o=0;o<a;++o)for(var l=t[o],h=r[o],c=l.length,d=n[o]=new Array(c),g,u=0;u<c;++u)(g=l[u]||h[u])&&(d[u]=g);for(;o<i;++o)n[o]=t[o];return new Ce(n,this._parents,this._name,this._id)}function Vy(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 Gy(e,t,r){var i,s,a=Vy(t)?Xa:de;return function(){var n=a(this,e),o=n.on;o!==i&&(s=(i=o).copy()).on(t,r),n.on=s}}function Zy(e,t){var r=this._id;return arguments.length<2?te(this.node(),r).on.on(e):this.each(Gy(r,e,t))}function Ky(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Qy(){return this.on("end.remove",Ky(this._id))}function Jy(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ha(e));for(var i=this._groups,s=i.length,a=new Array(s),n=0;n<s;++n)for(var o=i[n],l=o.length,h=a[n]=new Array(l),c,d,g=0;g<l;++g)(c=o[g])&&(d=e.call(c,c.__data__,g,o))&&("__data__"in c&&(d.__data__=c.__data__),h[g]=d,ys(h[g],t,r,g,h,te(c,r)));return new Ce(a,this._parents,t,r)}function tC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=_l(e));for(var i=this._groups,s=i.length,a=[],n=[],o=0;o<s;++o)for(var l=i[o],h=l.length,c,d=0;d<h;++d)if(c=l[d]){for(var g=e.call(c,c.__data__,d,l),u,m=te(c,r),f=0,y=g.length;f<y;++f)(u=g[f])&&ys(u,t,r,f,g,m);a.push(g),n.push(c)}return new Ce(a,n,t,r)}var eC=ni.prototype.constructor;function rC(){return new eC(this._groups,this._parents)}function iC(e,t){var r,i,s;return function(){var a=kr(this,e),n=(this.style.removeProperty(e),kr(this,e));return a===n?null:a===r&&n===i?s:s=t(r=a,i=n)}}function Ul(e){return function(){this.style.removeProperty(e)}}function sC(e,t,r){var i,s=r+"",a;return function(){var n=kr(this,e);return n===s?null:n===i?a:a=t(i=n,r)}}function aC(e,t,r){var i,s,a;return function(){var n=kr(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),kr(this,e))),n===l?null:n===i&&l===s?a:(s=l,a=t(i=n,o))}}function oC(e,t){var r,i,s,a="style."+t,n="end."+a,o;return function(){var l=de(this,e),h=l.on,c=l.value[a]==null?o||(o=Ul(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(n,s=c),l.on=i}}function nC(e,t,r){var i=(e+="")=="transform"?cy:Yl;return t==null?this.styleTween(e,iC(e,i)).on("end.style."+e,Ul(e)):typeof t=="function"?this.styleTween(e,aC(e,i,ja(this,"style."+e,t))).each(oC(this._id,e)):this.styleTween(e,sC(e,i,t),r).on("end.style."+e,null)}function lC(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function hC(e,t,r){var i,s;function a(){var n=t.apply(this,arguments);return n!==s&&(i=(s=n)&&lC(e,n,r)),i}return a._value=t,a}function cC(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,hC(e,t,r??""))}function dC(e){return function(){this.textContent=e}}function uC(e){return function(){var t=e(this);this.textContent=t??""}}function gC(e){return this.tween("text",typeof e=="function"?uC(ja(this,"text",e)):dC(e==null?"":e+""))}function pC(e){return function(t){this.textContent=e.call(this,t)}}function fC(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&pC(s)),t}return i._value=e,i}function mC(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,fC(e))}function yC(){for(var e=this._name,t=this._id,r=Xl(),i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,l,h=0;h<o;++h)if(l=n[h]){var c=te(l,t);ys(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ce(i,this._parents,e,r)}function CC(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,n){var o={value:n},l={value:function(){--s===0&&a()}};r.each(function(){var h=de(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),h.on=t}),s===0&&a()})}var xC=0;function Ce(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Xl(){return++xC}var ge=ni.prototype;Ce.prototype={constructor:Ce,select:Jy,selectAll:tC,selectChild:ge.selectChild,selectChildren:ge.selectChildren,filter:Xy,merge:jy,selection:rC,transition:yC,call:ge.call,nodes:ge.nodes,node:ge.node,size:ge.size,empty:ge.empty,each:ge.each,on:Zy,attr:My,attrTween:Oy,style:nC,styleTween:cC,text:gC,textTween:mC,remove:Qy,tween:Sy,delay:Ry,duration:zy,ease:Hy,easeVarying:Uy,end:CC,[Symbol.iterator]:ge[Symbol.iterator]};function kC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bC={time:null,delay:0,duration:250,ease:kC};function wC(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 SC(e){var t,r;e instanceof Ce?(t=e._id,e=e._name):(t=Xl(),(r=bC).time=Ua(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,l,h=0;h<o;++h)(l=n[h])&&ys(l,e,t,h,n,r||wC(l,t));return new Ce(i,this._parents,e,t)}ni.prototype.interrupt=ky;ni.prototype.transition=SC;function jl(e,t){this._basis=new jn(e),this._beta=t}jl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(s+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const TC=(function e(t){function r(i){return t===1?new jn(i):new jl(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Gi(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Va(e,t){this._context=e,this._k=(1-t)/6}Va.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Gi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Gi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vl=(function e(t){function r(i){return new Va(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ga(e,t){this._context=e,this._k=(1-t)/6}Ga.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Gi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vC=(function e(t){function r(i){return new Ga(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Za(e,t){this._context=e,this._k=(1-t)/6}Za.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const BC=(function e(t){function r(i){return new Za(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ka(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>Oo){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Oo){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function Gl(e,t){this._context=e,this._alpha=t}Gl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ka(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Zl=(function e(t){function r(i){return t?new Gl(i,t):new Va(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Kl(e,t){this._context=e,this._alpha=t}Kl.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ka(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _C=(function e(t){function r(i){return t?new Kl(i,t):new Ga(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ql(e,t){this._context=e,this._alpha=t}Ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ka(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const LC=(function e(t){function r(i){return t?new Ql(i,t):new Za(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Wr(e,t,r){this.k=e,this.x=t,this.y=r}Wr.prototype={constructor:Wr,scale:function(e){return e===1?this:new Wr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wr(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+")"}};Wr.prototype;var FC=p(e=>{var s;const{securityLevel:t}=ht();let r=it("body");if(t==="sandbox"){const n=((s=it(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=it(n.body)}return r.select(`#${e}`)},"selectSvgElement");function Qa(e){return typeof e>"u"||e===null}p(Qa,"isNothing");function Jl(e){return typeof e=="object"&&e!==null}p(Jl,"isObject");function th(e){return Array.isArray(e)?e:Qa(e)?[]:[e]}p(th,"toArray");function eh(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}p(eh,"extend");function rh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(rh,"repeat");function ih(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(ih,"isNegativeZero");var MC=Qa,AC=Jl,EC=th,$C=rh,IC=ih,OC=eh,St={isNothing:MC,isObject:AC,toArray:EC,repeat:$C,isNegativeZero:IC,extend:OC};function Ja(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}p(Ja,"formatError");function wr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ja(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(wr,"YAMLException$1");wr.prototype=Object.create(Error.prototype);wr.prototype.constructor=wr;wr.prototype.toString=p(function(t){return this.name+": "+Ja(this,t)},"toString");var Wt=wr;function Ai(e,t,r,i,s){var a="",n="",o=Math.floor(s/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(n=" ...",r=i+o-n.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+n,pos:i-t+a.length}}p(Ai,"getLine");function Ei(e,t){return St.repeat(" ",t-e.length)+e}p(Ei,"padStart");function sh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,n=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var o="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Ai(e.buffer,i[n-l],s[n-l],e.position-(i[n]-i[n-l]),d),o=St.repeat(" ",t.indent)+Ei((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
126
|
+
`+o;for(h=Ai(e.buffer,i[n],s[n],e.position,d),o+=St.repeat(" ",t.indent)+Ei((e.line+1).toString(),c)+" | "+h.str+`
|
|
127
|
+
`,o+=St.repeat("-",t.indent+c+3+h.pos)+`^
|
|
128
|
+
`,l=1;l<=t.linesAfter&&!(n+l>=s.length);l++)h=Ai(e.buffer,i[n+l],s[n+l],e.position-(i[n]-i[n+l]),d),o+=St.repeat(" ",t.indent)+Ei((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
129
|
+
`;return o.replace(/\n$/,"")}p(sh,"makeSnippet");var DC=sh,PC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],RC=["scalar","sequence","mapping"];function ah(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(ah,"compileStyleAliases");function oh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(PC.indexOf(r)===-1)throw new Wt('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=ah(t.styleAliases||null),RC.indexOf(this.kind)===-1)throw new Wt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(oh,"Type$1");var At=oh;function ra(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,n){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=n)}),r[s]=i}),r}p(ra,"compileList");function nh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(nh,"compileMap");function Zi(e){return this.extend(e)}p(Zi,"Schema$1");Zi.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof At)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 Wt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof At))throw new Wt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Wt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Wt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof At))throw new Wt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Zi.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=ra(s,"implicit"),s.compiledExplicit=ra(s,"explicit"),s.compiledTypeMap=nh(s.compiledImplicit,s.compiledExplicit),s},"extend");var qC=Zi,WC=new At("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),zC=new At("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),NC=new At("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),HC=new qC({explicit:[WC,zC,NC]});function lh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(lh,"resolveYamlNull");function hh(){return null}p(hh,"constructYamlNull");function ch(e){return e===null}p(ch,"isNull");var YC=new At("tag:yaml.org,2002:null",{kind:"scalar",resolve:lh,construct:hh,predicate:ch,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function dh(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(dh,"resolveYamlBoolean");function uh(e){return e==="true"||e==="True"||e==="TRUE"}p(uh,"constructYamlBoolean");function gh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(gh,"isBoolean");var UC=new At("tag:yaml.org,2002:bool",{kind:"scalar",resolve:dh,construct:uh,predicate:gh,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ph(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(ph,"isHexCode");function fh(e){return 48<=e&&e<=55}p(fh,"isOctCode");function mh(e){return 48<=e&&e<=57}p(mh,"isDecCode");function yh(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!ph(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!fh(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!mh(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(yh,"resolveYamlInteger");function Ch(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Ch,"constructYamlInteger");function xh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!St.isNegativeZero(e)}p(xh,"isInteger");var XC=new At("tag:yaml.org,2002:int",{kind:"scalar",resolve:yh,construct:Ch,predicate:xh,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),jC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function kh(e){return!(e===null||!jC.test(e)||e[e.length-1]==="_")}p(kh,"resolveYamlFloat");function bh(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(bh,"constructYamlFloat");var VC=/^[-+]?[0-9]+e/;function wh(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(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),VC.test(r)?r.replace("e",".e"):r}p(wh,"representYamlFloat");function Sh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||St.isNegativeZero(e))}p(Sh,"isFloat");var GC=new At("tag:yaml.org,2002:float",{kind:"scalar",resolve:kh,construct:bh,predicate:Sh,represent:wh,defaultStyle:"lowercase"}),Th=HC.extend({implicit:[YC,UC,XC,GC]}),ZC=Th,vh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Bh=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 _h(e){return e===null?!1:vh.exec(e)!==null||Bh.exec(e)!==null}p(_h,"resolveYamlTimestamp");function Lh(e){var t,r,i,s,a,n,o,l=0,h=null,c,d,g;if(t=vh.exec(e),t===null&&(t=Bh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],n=+t[5],o=+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)),g=new Date(Date.UTC(r,i,s,a,n,o,l)),h&&g.setTime(g.getTime()-h),g}p(Lh,"constructYamlTimestamp");function Fh(e){return e.toISOString()}p(Fh,"representYamlTimestamp");var KC=new At("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_h,construct:Lh,instanceOf:Date,represent:Fh});function Mh(e){return e==="<<"||e===null}p(Mh,"resolveYamlMerge");var QC=new At("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mh}),to=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
130
|
+
\r`;function Ah(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=to;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Ah,"resolveYamlBinary");function Eh(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=to,n=0,o=[];for(t=0;t<s;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):r===18?(o.push(n>>10&255),o.push(n>>2&255)):r===12&&o.push(n>>4&255),new Uint8Array(o)}p(Eh,"constructYamlBinary");function $h(e){var t="",r=0,i,s,a=e.length,n=to;for(i=0;i<a;i++)i%3===0&&i&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):s===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):s===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}p($h,"representYamlBinary");function Ih(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Ih,"isBinary");var JC=new At("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ah,construct:Eh,predicate:Ih,represent:$h}),t0=Object.prototype.hasOwnProperty,e0=Object.prototype.toString;function Oh(e){if(e===null)return!0;var t=[],r,i,s,a,n,o=e;for(r=0,i=o.length;r<i;r+=1){if(s=o[r],n=!1,e0.call(s)!=="[object Object]")return!1;for(a in s)if(t0.call(s,a))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Oh,"resolveYamlOmap");function Dh(e){return e!==null?e:[]}p(Dh,"constructYamlOmap");var r0=new At("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Oh,construct:Dh}),i0=Object.prototype.toString;function Ph(e){if(e===null)return!0;var t,r,i,s,a,n=e;for(a=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(i=n[t],i0.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}p(Ph,"resolveYamlPairs");function Rh(e){if(e===null)return[];var t,r,i,s,a,n=e;for(a=new Array(n.length),t=0,r=n.length;t<r;t+=1)i=n[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}p(Rh,"constructYamlPairs");var s0=new At("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ph,construct:Rh}),a0=Object.prototype.hasOwnProperty;function qh(e){if(e===null)return!0;var t,r=e;for(t in r)if(a0.call(r,t)&&r[t]!==null)return!1;return!0}p(qh,"resolveYamlSet");function Wh(e){return e!==null?e:{}}p(Wh,"constructYamlSet");var o0=new At("tag:yaml.org,2002:set",{kind:"mapping",resolve:qh,construct:Wh}),zh=ZC.extend({implicit:[KC,QC],explicit:[JC,r0,s0,o0]}),Fe=Object.prototype.hasOwnProperty,Ki=1,Nh=2,Hh=3,Qi=4,Es=1,n0=2,Ko=3,l0=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h0=/[\x85\u2028\u2029]/,c0=/[,\[\]\{\}]/,Yh=/^(?:!|!!|![a-z\-]+!)$/i,Uh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ia(e){return Object.prototype.toString.call(e)}p(ia,"_class");function Zt(e){return e===10||e===13}p(Zt,"is_EOL");function Le(e){return e===9||e===32}p(Le,"is_WHITE_SPACE");function Ot(e){return e===9||e===32||e===10||e===13}p(Ot,"is_WS_OR_EOL");function qe(e){return e===44||e===91||e===93||e===123||e===125}p(qe,"is_FLOW_INDICATOR");function Xh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Xh,"fromHexCode");function jh(e){return e===120?2:e===117?4:e===85?8:0}p(jh,"escapedHexLen");function Vh(e){return 48<=e&&e<=57?e-48:-1}p(Vh,"fromDecimalCode");function sa(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":""}p(sa,"simpleEscapeSequence");function Gh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Gh,"charFromCodepoint");function eo(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(eo,"setProperty");var Zh=new Array(256),Kh=new Array(256);for(Ie=0;Ie<256;Ie++)Zh[Ie]=sa(Ie)?1:0,Kh[Ie]=sa(Ie);var Ie;function Qh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Qh,"State$1");function ro(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=DC(r),new Wt(t,r)}p(ro,"generateError");function V(e,t){throw ro(e,t)}p(V,"throwError");function Qr(e,t){e.onWarning&&e.onWarning.call(null,ro(e,t))}p(Qr,"throwWarning");var Qo={YAML:p(function(t,r,i){var s,a,n;t.version!==null&&V(t,"duplication of %YAML directive"),i.length!==1&&V(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&V(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),n=parseInt(s[2],10),a!==1&&V(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&Qr(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,a;i.length!==2&&V(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],Yh.test(s)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),Fe.call(t.tagMap,s)&&V(t,'there is a previously declared suffix for "'+s+'" tag handle'),Uh.test(a)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{V(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function ye(e,t,r,i){var s,a,n,o;if(t<r){if(o=e.input.slice(t,r),i)for(s=0,a=o.length;s<a;s+=1)n=o.charCodeAt(s),n===9||32<=n&&n<=1114111||V(e,"expected valid JSON character");else l0.test(o)&&V(e,"the stream contains non-printable characters");e.result+=o}}p(ye,"captureSegment");function aa(e,t,r,i){var s,a,n,o;for(St.isObject(r)||V(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),n=0,o=s.length;n<o;n+=1)a=s[n],Fe.call(t,a)||(eo(t,a,r[a]),i[a]=!0)}p(aa,"mergeMappings");function We(e,t,r,i,s,a,n,o,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&V(e,"nested arrays are not supported inside keys"),typeof s=="object"&&ia(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&ia(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)aa(e,t,a[h],r);else aa(e,t,a,r);else!e.json&&!Fe.call(r,s)&&Fe.call(t,s)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,V(e,"duplicated mapping key")),eo(t,s,a),delete r[s];return t}p(We,"storeMappingPair");function Cs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):V(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Cs,"readLineBreak");function Ct(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Le(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Zt(s))for(Cs(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Qr(e,"deficient indentation"),i}p(Ct,"skipSeparationSpace");function li(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||Ot(r)))}p(li,"testDocumentSeparator");function xs(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
|
|
132
|
+
`,t-1))}p(xs,"writeFoldedLines");function Jh(e,t,r){var i,s,a,n,o,l,h,c,d=e.kind,g=e.result,u;if(u=e.input.charCodeAt(e.position),Ot(u)||qe(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)&&(s=e.input.charCodeAt(e.position+1),Ot(s)||r&&qe(s)))return!1;for(e.kind="scalar",e.result="",a=n=e.position,o=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),Ot(s)||r&&qe(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Ot(i))break}else{if(e.position===e.lineStart&&li(e)||r&&qe(u))break;if(Zt(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=h,e.lineIndent=c;break}}o&&(ye(e,a,n,!1),xs(e,e.line-l),a=n=e.position,o=!1),Le(u)||(n=e.position+1),u=e.input.charCodeAt(++e.position)}return ye(e,a,n,!1),e.result?!0:(e.kind=d,e.result=g,!1)}p(Jh,"readPlainScalar");function tc(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(ye(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Zt(r)?(ye(e,i,s,!0),xs(e,Ct(e,!1,t)),i=s=e.position):e.position===e.lineStart&&li(e)?V(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);V(e,"unexpected end of the stream within a single quoted scalar")}p(tc,"readSingleQuotedScalar");function ec(e,t){var r,i,s,a,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return ye(e,r,e.position,!0),e.position++,!0;if(o===92){if(ye(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Zt(o))Ct(e,!1,t);else if(o<256&&Zh[o])e.result+=Kh[o],e.position++;else if((n=jh(o))>0){for(s=n,a=0;s>0;s--)o=e.input.charCodeAt(++e.position),(n=Xh(o))>=0?a=(a<<4)+n:V(e,"expected hexadecimal character");e.result+=Gh(a),e.position++}else V(e,"unknown escape sequence");r=i=e.position}else Zt(o)?(ye(e,r,i,!0),xs(e,Ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&li(e)?V(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}V(e,"unexpected end of the stream within a double quoted scalar")}p(ec,"readDoubleQuotedScalar");function rc(e,t){var r=!0,i,s,a,n=e.tag,o,l=e.anchor,h,c,d,g,u,m=Object.create(null),f,y,C,k;if(k=e.input.charCodeAt(e.position),k===91)c=93,u=!1,o=[];else if(k===123)c=125,u=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),k=e.input.charCodeAt(++e.position);k!==0;){if(Ct(e,!0,t),k=e.input.charCodeAt(e.position),k===c)return e.position++,e.tag=n,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=o,!0;r?k===44&&V(e,"expected the node content, but found ','"):V(e,"missed comma between flow collection entries"),y=f=C=null,d=g=!1,k===63&&(h=e.input.charCodeAt(e.position+1),Ot(h)&&(d=g=!0,e.position++,Ct(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,Ue(e,t,Ki,!1,!0),y=e.tag,f=e.result,Ct(e,!0,t),k=e.input.charCodeAt(e.position),(g||e.line===i)&&k===58&&(d=!0,k=e.input.charCodeAt(++e.position),Ct(e,!0,t),Ue(e,t,Ki,!1,!0),C=e.result),u?We(e,o,m,y,f,C,i,s,a):d?o.push(We(e,null,m,y,f,C,i,s,a)):o.push(f),Ct(e,!0,t),k=e.input.charCodeAt(e.position),k===44?(r=!0,k=e.input.charCodeAt(++e.position)):r=!1}V(e,"unexpected end of the stream within a flow collection")}p(rc,"readFlowCollection");function ic(e,t){var r,i,s=Es,a=!1,n=!1,o=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)Es===s?s=d===43?Ko:n0:V(e,"repeat of a chomping mode identifier");else if((c=Vh(d))>=0)c===0?V(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?V(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(Le(d)){do d=e.input.charCodeAt(++e.position);while(Le(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Zt(d)&&d!==0)}for(;d!==0;){for(Cs(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),Zt(d)){l++;continue}if(e.lineIndent<o){s===Ko?e.result+=St.repeat(`
|
|
133
|
+
`,a?1+l:l):s===Es&&a&&(e.result+=`
|
|
134
|
+
`);break}for(i?Le(d)?(h=!0,e.result+=St.repeat(`
|
|
135
|
+
`,a?1+l:l)):h?(h=!1,e.result+=St.repeat(`
|
|
136
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=St.repeat(`
|
|
137
|
+
`,l):e.result+=St.repeat(`
|
|
138
|
+
`,a?1+l:l),a=!0,n=!0,l=0,r=e.position;!Zt(d)&&d!==0;)d=e.input.charCodeAt(++e.position);ye(e,r,e.position,!1)}return!0}p(ic,"readBlockScalar");function oa(e,t){var r,i=e.tag,s=e.anchor,a=[],n,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!Ot(n))));){if(o=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Ue(e,t,Hh,!1,!0),a.push(e.result),Ct(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)V(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}p(oa,"readBlockSequence");function sc(e,t,r){var i,s,a,n,o,l,h=e.tag,c=e.anchor,d={},g=Object.create(null),u=null,m=null,f=null,y=!1,C=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),k=e.input.charCodeAt(e.position);k!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(k===63||k===58)&&Ot(i))k===63?(y&&(We(e,d,g,u,m,null,n,o,l),u=m=f=null),C=!0,y=!0,s=!0):y?(y=!1,s=!0):V(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=i;else{if(n=e.line,o=e.lineStart,l=e.position,!Ue(e,r,Nh,!1,!0))break;if(e.line===a){for(k=e.input.charCodeAt(e.position);Le(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),Ot(k)||V(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,d,g,u,m,null,n,o,l),u=m=f=null),C=!0,y=!1,s=!1,u=e.tag,m=e.result;else if(C)V(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)V(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(y&&(n=e.line,o=e.lineStart,l=e.position),Ue(e,t,Qi,!0,s)&&(y?m=e.result:f=e.result),y||(We(e,d,g,u,m,f,n,o,l),u=m=f=null),Ct(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&k!==0)V(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,d,g,u,m,null,n,o,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}p(sc,"readBlockMapping");function ac(e){var t,r=!1,i=!1,s,a,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&V(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(i=!0,s="!!",n=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(a=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):V(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Ot(n);)n===33&&(i?V(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Yh.test(s)||V(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),c0.test(a)&&V(e,"tag suffix cannot contain flow indicator characters")}a&&!Uh.test(a)&&V(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{V(e,"tag name is malformed: "+a)}return r?e.tag=a:Fe.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:V(e,'undeclared tag handle "'+s+'"'),!0}p(ac,"readTagProperty");function oc(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&V(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ot(r)&&!qe(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(oc,"readAnchorProperty");function nc(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&&!Ot(i)&&!qe(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Fe.call(e.anchorMap,r)||V(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}p(nc,"readAlias");function Ue(e,t,r,i,s){var a,n,o,l=1,h=!1,c=!1,d,g,u,m,f,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=n=o=Qi===r||Hh===r,i&&Ct(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;ac(e)||oc(e);)Ct(e,!0,-1)?(h=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=h||s),(l===1||Qi===r)&&(Ki===r||Nh===r?f=t:f=t+1,y=e.position-e.lineStart,l===1?o&&(oa(e,y)||sc(e,y,f))||rc(e,f)?c=!0:(n&&ic(e,f)||tc(e,f)||ec(e,f)?c=!0:nc(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&V(e,"alias node should not have any properties")):Jh(e,f,Ki===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=o&&oa(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&V(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,g=e.implicitTypes.length;d<g;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(Fe.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,g=u.length;d<g;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){m=u[d];break}m||V(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&V(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)):V(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}p(Ue,"composeNode");function lc(e){var t=e.position,r,i,s,a=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(a=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!Ot(n);)n=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&V(e,"directive name must not be less than one character in length");n!==0;){for(;Le(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!Zt(n));break}if(Zt(n))break;for(r=e.position;n!==0&&!Ot(n);)n=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}n!==0&&Cs(e),Fe.call(Qo,i)?Qo[i](e,i,s):Qr(e,'unknown document directive "'+i+'"')}if(Ct(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,Ct(e,!0,-1)):a&&V(e,"directives end mark is expected"),Ue(e,e.lineIndent-1,Qi,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&h0.test(e.input.slice(t,e.position))&&Qr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&li(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1));return}if(e.position<e.length-1)V(e,"end of the stream or a document separator is expected");else return}p(lc,"readDocument");function io(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 Qh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,V(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)lc(r);return r.documents}p(io,"loadDocuments");function d0(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=io(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}p(d0,"loadAll$1");function hc(e,t){var r=io(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Wt("expected a single document in the stream, but found more")}}p(hc,"load$1");var u0=hc,g0={load:u0},cc=Object.prototype.toString,dc=Object.prototype.hasOwnProperty,so=65279,p0=9,Jr=10,f0=13,m0=32,y0=33,C0=34,na=35,x0=37,k0=38,b0=39,w0=42,uc=44,S0=45,Ji=58,T0=61,v0=62,B0=63,_0=64,gc=91,pc=93,L0=96,fc=123,F0=124,mc=125,Et={};Et[0]="\\0";Et[7]="\\a";Et[8]="\\b";Et[9]="\\t";Et[10]="\\n";Et[11]="\\v";Et[12]="\\f";Et[13]="\\r";Et[27]="\\e";Et[34]='\\"';Et[92]="\\\\";Et[133]="\\N";Et[160]="\\_";Et[8232]="\\L";Et[8233]="\\P";var M0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yc(e,t){var r,i,s,a,n,o,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)n=i[s],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&dc.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[n]=o;return r}p(yc,"compileStyleMap");function Cc(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 Wt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+St.repeat("0",i-t.length)+t}p(Cc,"encodeHex");var E0=1,ti=2;function xc(e){this.schema=e.schema||zh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=yc(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==='"'?ti:E0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(xc,"State");function la(e,t){for(var r=St.repeat(" ",t),i=0,s=-1,a="",n,o=e.length;i<o;)s=e.indexOf(`
|
|
140
|
+
`,i),s===-1?(n=e.slice(i),i=o):(n=e.slice(i,s+1),i=s+1),n.length&&n!==`
|
|
141
|
+
`&&(a+=r),a+=n;return a}p(la,"indentString");function ts(e,t){return`
|
|
142
|
+
`+St.repeat(" ",e.indent*t)}p(ts,"generateNextLine");function kc(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(kc,"testImplicitResolving");function ei(e){return e===m0||e===p0}p(ei,"isWhitespace");function Sr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==so||65536<=e&&e<=1114111}p(Sr,"isPrintable");function ha(e){return Sr(e)&&e!==so&&e!==f0&&e!==Jr}p(ha,"isNsCharOrWhitespace");function ca(e,t,r){var i=ha(e),s=i&&!ei(e);return(r?i:i&&e!==uc&&e!==gc&&e!==pc&&e!==fc&&e!==mc)&&e!==na&&!(t===Ji&&!s)||ha(t)&&!ei(t)&&e===na||t===Ji&&s}p(ca,"isPlainSafe");function bc(e){return Sr(e)&&e!==so&&!ei(e)&&e!==S0&&e!==B0&&e!==Ji&&e!==uc&&e!==gc&&e!==pc&&e!==fc&&e!==mc&&e!==na&&e!==k0&&e!==w0&&e!==y0&&e!==F0&&e!==T0&&e!==v0&&e!==b0&&e!==C0&&e!==x0&&e!==_0&&e!==L0}p(bc,"isPlainSafeFirst");function wc(e){return!ei(e)&&e!==Ji}p(wc,"isPlainSafeLast");function er(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(er,"codePointAt");function ao(e){var t=/^\n* /;return t.test(e)}p(ao,"needIndentIndicator");var Sc=1,da=2,Tc=3,vc=4,Qe=5;function Bc(e,t,r,i,s,a,n,o){var l,h=0,c=null,d=!1,g=!1,u=i!==-1,m=-1,f=bc(er(e,0))&&wc(er(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=er(e,l),!Sr(h))return Qe;f=f&&ca(h,c,o),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=er(e,l),h===Jr)d=!0,u&&(g=g||l-m-1>i&&e[m+1]!==" ",m=l);else if(!Sr(h))return Qe;f=f&&ca(h,c,o),c=h}g=g||u&&l-m-1>i&&e[m+1]!==" "}return!d&&!g?f&&!n&&!s(e)?Sc:a===ti?Qe:da:r>9&&ao(e)?Qe:n?a===ti?Qe:da:g?vc:Tc}p(Bc,"chooseScalarStyle");function _c(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===ti?'""':"''";if(!e.noCompatMode&&(M0.indexOf(t)!==-1||A0.test(t)))return e.quotingType===ti?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return kc(e,h)}switch(p(l,"testAmbiguity"),Bc(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,s)){case Sc:return t;case da:return"'"+t.replace(/'/g,"''")+"'";case Tc:return"|"+ua(t,e.indent)+ga(la(t,a));case vc:return">"+ua(t,e.indent)+ga(la(Lc(t,n),a));case Qe:return'"'+Fc(t)+'"';default:throw new Wt("impossible error: invalid scalar style")}})()}p(_c,"writeScalar");function ua(e,t){var r=ao(e)?String(t):"",i=e[e.length-1]===`
|
|
143
|
+
`,s=i&&(e[e.length-2]===`
|
|
144
|
+
`||e===`
|
|
145
|
+
`),a=s?"+":i?"":"-";return r+a+`
|
|
146
|
+
`}p(ua,"blockHeader");function ga(e){return e[e.length-1]===`
|
|
147
|
+
`?e.slice(0,-1):e}p(ga,"dropEndingNewline");function Lc(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,pa(e.slice(0,h),t)})(),s=e[0]===`
|
|
149
|
+
`||e[0]===" ",a,n;n=r.exec(e);){var o=n[1],l=n[2];a=l[0]===" ",i+=o+(!s&&!a&&l!==""?`
|
|
150
|
+
`:"")+pa(l,t),s=a}return i}p(Lc,"foldString");function pa(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,n=0,o=0,l="";i=r.exec(e);)o=i.index,o-s>t&&(a=n>s?n:o,l+=`
|
|
151
|
+
`+e.slice(s,a),s=a+1),n=o;return l+=`
|
|
152
|
+
`,e.length-s>t&&n>s?l+=e.slice(s,n)+`
|
|
153
|
+
`+e.slice(n+1):l+=e.slice(s),l.slice(1)}p(pa,"foldLine");function Fc(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=er(e,s),i=Et[r],!i&&Sr(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Cc(r);return t}p(Fc,"escapeString");function Mc(e,t,r){var i="",s=e.tag,a,n,o;for(a=0,n=r.length;a<n;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(le(e,t,o,!1,!1)||typeof o>"u"&&le(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(Mc,"writeFlowSequence");function fa(e,t,r,i){var s="",a=e.tag,n,o,l;for(n=0,o=r.length;n<o;n+=1)l=r[n],e.replacer&&(l=e.replacer.call(r,String(n),l)),(le(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&le(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=ts(e,t)),e.dump&&Jr===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}p(fa,"writeBlockSequence");function Ac(e,t,r){var i="",s=e.tag,a=Object.keys(r),n,o,l,h,c;for(n=0,o=a.length;n<o;n+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),le(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),le(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}p(Ac,"writeFlowMapping");function Ec(e,t,r,i){var s="",a=e.tag,n=Object.keys(r),o,l,h,c,d,g;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new Wt("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)g="",(!i||s!=="")&&(g+=ts(e,t)),h=n[o],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),le(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Jr===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=ts(e,t)),le(e,t+1,c,!0,d)&&(e.dump&&Jr===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,s+=g));e.tag=a,e.dump=s||"{}"}p(Ec,"writeBlockMapping");function ma(e,t,r){var i,s,a,n,o,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,n=s.length;a<n;a+=1)if(o=s[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,cc.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(dc.call(o.represent,l))i=o.represent[l](t,l);else throw new Wt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(ma,"detectType");function le(e,t,r,i,s,a,n){e.tag=null,e.dump=r,ma(e,r,!1)||ma(e,r,!0);var o=cc.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",d,g;if(c&&(d=e.duplicates.indexOf(r),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(s=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Ec(e,t,e.dump,s),g&&(e.dump="&ref_"+d+e.dump)):(Ac(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?fa(e,t-1,e.dump,s):fa(e,t,e.dump,s),g&&(e.dump="&ref_"+d+e.dump)):(Mc(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&_c(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Wt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}p(le,"writeNode");function $c(e,t){var r=[],i=[],s,a;for(es(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}p($c,"getDuplicateReferences");function es(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)es(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)es(e[i[s]],t,r)}p(es,"inspectNode");function $0(e,t){t=t||{};var r=new xc(t);r.noRefs||$c(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),le(r,0,i,!0,!0)?r.dump+`
|
|
154
|
+
`:""}p($0,"dump$1");function I0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(I0,"renamed");var O0=Th,D0=g0.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 Ar=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Mt={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},Jo={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function zr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ft(e),t=ft(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}p(zr,"calculateDeltaAndAngle");var ft=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),P0=p(e=>({x:p(function(t,r,i){let s=0;const a=ft(i[0]).x<ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Mt,e.arrowTypeStart)){const{angle:u,deltaX:m}=zr(i[0],i[1]);s=Mt[e.arrowTypeStart]*Math.cos(u)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Mt,e.arrowTypeEnd)){const{angle:u,deltaX:m}=zr(i[i.length-1],i[i.length-2]);s=Mt[e.arrowTypeEnd]*Math.cos(u)*(m>=0?1:-1)}const n=Math.abs(ft(t).x-ft(i[i.length-1]).x),o=Math.abs(ft(t).y-ft(i[i.length-1]).y),l=Math.abs(ft(t).x-ft(i[0]).x),h=Math.abs(ft(t).y-ft(i[0]).y),c=Mt[e.arrowTypeStart],d=Mt[e.arrowTypeEnd],g=1;if(n<d&&n>0&&o<d){let u=d+g-n;u*=a==="right"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=a==="right"?-1:1,s+=u}return ft(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=ft(i[0]).y<ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Mt,e.arrowTypeStart)){const{angle:u,deltaY:m}=zr(i[0],i[1]);s=Mt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Mt,e.arrowTypeEnd)){const{angle:u,deltaY:m}=zr(i[i.length-1],i[i.length-2]);s=Mt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(m>=0?1:-1)}const n=Math.abs(ft(t).y-ft(i[i.length-1]).y),o=Math.abs(ft(t).x-ft(i[i.length-1]).x),l=Math.abs(ft(t).y-ft(i[0]).y),h=Math.abs(ft(t).x-ft(i[0]).x),c=Mt[e.arrowTypeStart],d=Mt[e.arrowTypeEnd],g=1;if(n<d&&n>0&&o<d){let u=d+g-n;u*=a==="up"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=a==="up"?-1:1,s+=u}return ft(t).y+s},"y")}),"getLineFunctionsWithOffset"),pi={},bt={},tn;function R0(){return tn||(tn=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.BLANK_URL=bt.relativeFirstCharacters=bt.whitespaceEscapeCharsRegex=bt.urlSchemeRegex=bt.ctrlCharactersRegex=bt.htmlCtrlEntityRegex=bt.htmlEntitiesRegex=bt.invalidProtocolRegex=void 0,bt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,bt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,bt.htmlCtrlEntityRegex=/&(newline|tab);/gi,bt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,bt.urlSchemeRegex=/^.+(:|:)/gim,bt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,bt.relativeFirstCharacters=[".","/"],bt.BLANK_URL="about:blank"),bt}var en;function q0(){if(en)return pi;en=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.sanitizeUrl=a;var e=R0();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,l=s(n.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.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 g=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(g))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return u;if(g==="http:"||g==="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 pi}var W0=q0();function z0(){}function hi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(hi.Cache||Map),r}hi.Cache=Map;function N0(e){if(Vn(e))return e;if(Array.isArray(e)||Jg(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function H0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const n=r[a];s=$i(s,n,i,new Map)}return s}function $i(e,t,r,i){if(Vn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return N0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...tp(t)];for(let a=0;a<s.length;a++){const n=s[a];if(ep(n))continue;let o=t[n],l=e[n];if(Hs(o)&&(o={...o}),Hs(l)&&(l={...l}),Gn(o)&&(o=Do(o)),Array.isArray(o))if(Array.isArray(l)){const c=[],d=Reflect.ownKeys(l);for(let g=0;g<d.length;g++){const u=d[g];c[u]=l[u]}l=c}else if(rp(l)){const c=[];for(let d=0;d<l.length;d++)c[d]=l[d];l=c}else l=[];const h=r(l,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Po(l)&&Po(o)&&(As(l)||As(o)||Si(l)||Si(o))?e[n]=$i(l,o,r,i):l==null&&As(o)?e[n]=$i({},o,r,i):l==null&&Si(o)?e[n]=Do(o):(l===void 0||o!==void 0)&&(e[n]=o)}return e}function Y0(e,...t){return H0(e,...t,z0)}function rn(e){if(e==null)return!0;if(ip(e))return typeof e.splice!="function"&&typeof e!="string"&&!Gn(e)&&!Si(e)&&!Hs(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return sp(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var U0="",X0={curveBasis:Ys,curveBasisClosed:np,curveBasisOpen:op,curveBumpX:il,curveBumpY:rl,curveBundle:TC,curveCardinalClosed:vC,curveCardinalOpen:BC,curveCardinal:Vl,curveCatmullRomClosed:_C,curveCatmullRomOpen:LC,curveCatmullRom:Zl,curveLinear:Ti,curveLinearClosed:ap,curveMonotoneX:el,curveMonotoneY:tl,curveNatural:Jn,curveStep:Qn,curveStepAfter:Kn,curveStepBefore:Zn},j0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,V0=p(function(e,t){const r=Ic(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Wi(n),i=wt(i,[...n])}else i=r.args;if(!i)return;let s=Pa(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Ic=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${j0.source})(?=[}][%]{2}).*
|
|
159
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=Xr.exec(e))!==null;)if(a.index===Xr.lastIndex&&Xr.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return q.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),G0=p(function(e){return e.replace(Xr,"")},"removeDirectives"),Z0=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function oo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return X0[r]??t}p(oo,"interpolateToCurve");function Oc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?W0.sanitizeUrl(r):r}p(Oc,"formatUrl");var K0=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){q.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function no(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(no,"distance");function Dc(e){let t,r=0;e.forEach(s=>{r+=no(s,t),t=s});const i=r/2;return lo(e,i)}p(Dc,"traverseEdge");function Pc(e){return e.length===1?e[0]:Dc(e)}p(Pc,"calcLabelPosition");var sn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),lo=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=no(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:sn((1-n)*r.x+n*s.x,5),y:sn((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Q0=p((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=lo(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function Rc(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=lo(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}p(Rc,"calcTerminalLabelPosition");function qc(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(qc,"getStylesFromArray");var an=0,J0=p(()=>(an++,"id-"+Math.random().toString(36).substr(2,12)+"-"+an),"generateId");function Wc(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Wc,"makeRandomHex");var tx=p(e=>Wc(e.length),"random"),ex=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),rx=p(function(e,t){const r=t.text.replace(oi.lineBreakRegex," "),[,i]=ks(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),ix=hi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),oi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const l=xe(`${n} `,r),h=xe(a,r);if(l>t){const{hyphenatedStrings:g,remainingWord:u}=sx(n,t,"-",r);s.push(a,...g),a=u}else h+l>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sx=hi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,l)=>{const h=`${n}${o}`;if(xe(h,i)>=t){const d=l+1,g=s.length===d,u=`${h}${r}`;a.push(g?h:u),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function zc(e,t){return ho(e,t).height}p(zc,"calculateTextHeight");function xe(e,t){return ho(e,t).width}p(xe,"calculateTextWidth");var ho=hi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=ks(r),n=["sans-serif",i],o=e.split(oi.lineBreakRegex),l=[],h=it("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const g of n){let u=0;const m={width:0,height:0,lineHeight:0};for(const f of o){const y=ex();y.text=f||U0;const C=rx(c,y).style("font-size",a).style("font-weight",s).style("font-family",g),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),u=Math.round(k.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}`),yr,ax=(yr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(yr,"InitIDGenerator"),yr),fi,ox=p(function(e){return fi=fi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),fi.innerHTML=e,unescape(fi.textContent)},"entityDecode");function co(e){return"str"in e}p(co,"isDetailedError");var nx=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),ks=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function uo(e,t){return Y0({},e,t)}p(uo,"cleanAndMerge");var Gt={assignWithDepth:wt,wrapLabel:ix,calculateTextHeight:zc,calculateTextWidth:xe,calculateTextDimensions:ho,cleanAndMerge:uo,detectInit:V0,detectDirective:Ic,isSubstringInArray:Z0,interpolateToCurve:oo,calcLabelPosition:Pc,calcCardinalityPosition:Q0,calcTerminalLabelPosition:Rc,formatUrl:Oc,getStylesFromArray:qc,generateId:J0,random:tx,runFunc:K0,entityDecode:ox,insertTitle:nx,isLabelCoordinateInPath:Nc,parseFontSize:ks,InitIDGenerator:ax},lx=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Xe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),vS=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Bt(e){return e??null}p(Bt,"handleUndefinedAttr");function Nc(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Nc,"isLabelCoordinateInPath");var go=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Hc(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function n(){if(s.style.display="flex",s.style.flexDirection="column",i){const o=ht().fontSize?ht().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=ul.fontSize]=ks(o),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}p(n,"setupImage"),setTimeout(()=>{s.complete&&n()}),s.addEventListener("error",n),s.addEventListener("load",n)})))}p(Hc,"configureLabelImages");var hx=p(e=>{const{handDrawnSeed:t}=ht();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Br=p(e=>{const t=cx([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),cx=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Yc=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),X=p(e=>{const{stylesArray:t}=Br(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];Yc(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),U=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=ht(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Br(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||s,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:dx(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),dx=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const ux=Object.freeze({left:0,top:0,width:16,height:16}),rs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uc=Object.freeze({...ux,...rs}),gx=Object.freeze({...Uc,body:"",hidden:!1}),px=Object.freeze({width:null,height:null}),fx=Object.freeze({...px,...rs}),mx=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:o};return $s(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return $s(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return $s(o,r)?o:null}return null},$s=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function yx(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 on(e,t){const r=yx(e,t);for(const i in gx)i in rs?i in e&&!(i in r)&&(r[i]=rs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Cx(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,l=o&&a(o);l&&(s[n]=[o].concat(l))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function nn(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=on(i[o]||s[o],a)}return n(t),r.forEach(n),on(e,a)}function xx(e,t){if(e.icons[t])return nn(e,t,[]);const r=Cx(e,[t])[t];return r?nn(e,t,r):null}const kx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ln(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(kx);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=bx.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function wx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function Sx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Tx(e,t,r){const i=wx(e);return Sx(i.defs,t+i.content+r)}const vx=e=>e==="unset"||e==="undefined"||e==="none";function Bx(e,t){const r={...Uc,...e},i={...fx,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(f=>{const y=[],C=f.hFlip,k=f.vFlip;let b=f.rotate;C?k?b+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):k&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let T;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:T=s.height/2+s.top,y.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,y.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}b%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),y.length&&(a=Tx(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=s.width,h=s.height;let c,d;n===null?(d=o===null?"1em":o==="auto"?h:o,c=ln(d,l/h)):(c=n==="auto"?l:n,d=o===null?ln(c,h/l):o==="auto"?h:o);const g={},u=(f,y)=>{vx(y)||(g[f]=y.toString())};u("width",c),u("height",d);const m=[s.left,s.top,l,h];return g.viewBox=m.join(" "),{attributes:g,viewBox:m,body:a}}const _x=/\sid="(\S+)"/g,hn=new Map;function Lx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=hn.get(e)||0;return hn.set(e,t+1),t?`${e}${t}`:e}function Fx(e){const t=[];let r;for(;r=_x.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=Lx(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Mx(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 po(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ge=po();function Xc(e){Ge=e}var Vr={exec:()=>null};function ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(Dt.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var Ax=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Dt={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")},Ex=/^(?:[ \t]*(?:\n|$))+/,$x=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ix=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ci=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ox=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fo=/(?:[*+-]|\d{1,9}[.)])/,jc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Vc=ct(jc).replace(/bull/g,fo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Dx=ct(jc).replace(/bull/g,fo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Px=/^[^\n]+/,yo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rx=ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qx=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fo).getRegex(),bs="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",Co=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Wx=ct("^ {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",Co).replace("tag",bs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gc=ct(mo).replace("hr",ci).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",bs).getRegex(),zx=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gc).getRegex(),xo={blockquote:zx,code:$x,def:Rx,fences:Ix,heading:Ox,hr:ci,html:Wx,lheading:Vc,list:qx,newline:Ex,paragraph:Gc,table:Vr,text:Px},cn=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ci).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",bs).getRegex(),Nx={...xo,lheading:Dx,table:cn,paragraph:ct(mo).replace("hr",ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cn).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",bs).getRegex()},Hx={...xo,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Co).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:Vr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(mo).replace("hr",ci).replace("heading",` *#{1,6} *[^
|
|
160
|
+
]`).replace("lheading",Vc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Yx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ux=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zc=/^( {2,}|\\)\n(?!\s*$)/,Xx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ws=/[\p{P}\p{S}]/u,ko=/[\s\p{P}\p{S}]/u,Kc=/[^\s\p{P}\p{S}]/u,jx=ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ko).getRegex(),Qc=/(?!~)[\p{P}\p{S}]/u,Vx=/(?!~)[\s\p{P}\p{S}]/u,Gx=/(?:[^\s\p{P}\p{S}]|~)/u,Zx=ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ax?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Jc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kx=ct(Jc,"u").replace(/punct/g,ws).getRegex(),Qx=ct(Jc,"u").replace(/punct/g,Qc).getRegex(),td="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Jx=ct(td,"gu").replace(/notPunctSpace/g,Kc).replace(/punctSpace/g,ko).replace(/punct/g,ws).getRegex(),tk=ct(td,"gu").replace(/notPunctSpace/g,Gx).replace(/punctSpace/g,Vx).replace(/punct/g,Qc).getRegex(),ek=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Kc).replace(/punctSpace/g,ko).replace(/punct/g,ws).getRegex(),rk=ct(/\\(punct)/,"gu").replace(/punct/g,ws).getRegex(),ik=ct(/^<(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(),sk=ct(Co).replace("(?:-->|$)","-->").getRegex(),ak=ct("^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",sk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),is=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ok=ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",is).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ed=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",is).replace("ref",yo).getRegex(),rd=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",yo).getRegex(),nk=ct("reflink|nolink(?!\\()","g").replace("reflink",ed).replace("nolink",rd).getRegex(),dn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bo={_backpedal:Vr,anyPunctuation:rk,autolink:ik,blockSkip:Zx,br:Zc,code:Ux,del:Vr,emStrongLDelim:Kx,emStrongRDelimAst:Jx,emStrongRDelimUnd:ek,escape:Yx,link:ok,nolink:rd,punctuation:jx,reflink:ed,reflinkSearch:nk,tag:ak,text:Xx,url:Vr},lk={...bo,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",is).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",is).getRegex()},ya={...bo,emStrongRDelimAst:tk,emStrongLDelim:Qx,url:ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dn).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:ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dn).getRegex()},hk={...ya,br:ct(Zc).replace("{2,}","*").getRegex(),text:ct(ya.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mi={normal:xo,gfm:Nx,pedantic:Hx},Er={normal:bo,gfm:ya,breaks:hk,pedantic:lk},ck={"&":"&","<":"<",">":">",'"':""","'":"'"},un=e=>ck[e];function se(e,t){if(t){if(Dt.escapeTest.test(e))return e.replace(Dt.escapeReplace,un)}else if(Dt.escapeTestNoEncode.test(e))return e.replace(Dt.escapeReplaceNoEncode,un);return e}function gn(e){try{e=encodeURI(e).replace(Dt.percentDecode,"%")}catch{return null}return e}function pn(e,t){var a;let r=e.replace(Dt.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Dt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Dt.slashPipe,"|");return i}function $r(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function dk(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 fn(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function uk(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
161
|
+
`).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
162
|
+
`)}var ss=class{constructor(t){gt(this,"options");gt(this,"rules");gt(this,"lexer");this.options=t||Ge}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:$r(i,`
|
|
163
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=uk(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=$r(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:$r(r[0],`
|
|
164
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=$r(r[0],`
|
|
165
|
+
`).split(`
|
|
166
|
+
`),s="",a="",n=[];for(;i.length>0;){let o=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),o=!0;else if(!o)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,"");s=s?`${s}
|
|
169
|
+
${c}`:c,a=a?`${a}
|
|
170
|
+
${d}`:d;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=g,i.length===0)break;let u=n.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let m=u,f=m.raw+`
|
|
171
|
+
`+i.join(`
|
|
172
|
+
`),y=this.blockquote(f);n[n.length-1]=y,s=s.substring(0,s.length-m.raw.length)+y.raw,a=a.substring(0,a.length-m.text.length)+y.text;break}else if((u==null?void 0:u.type)==="list"){let m=u,f=m.raw+`
|
|
173
|
+
`+i.join(`
|
|
174
|
+
`),y=this.list(f);n[n.length-1]=y,s=s.substring(0,s.length-u.raw.length)+y.raw,a=a.substring(0,a.length-m.raw.length)+y.raw,i=f.substring(n.at(-1).raw.length).split(`
|
|
175
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,c="",d="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let g=r[2].split(`
|
|
176
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),u=t.split(`
|
|
177
|
+
`,1)[0],m=!g.trim(),f=0;if(this.options.pedantic?(f=2,d=g.trimStart()):m?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=g.slice(f),f+=r[1].length),m&&this.rules.other.blankLine.test(u)&&(c+=u+`
|
|
178
|
+
`,t=t.substring(u.length+1),h=!0),!h){let k=this.rules.other.nextBulletRegex(f),b=this.rules.other.hrRegex(f),T=this.rules.other.fencesBeginRegex(f),w=this.rules.other.headingBeginRegex(f),v=this.rules.other.htmlBeginRegex(f);for(;t;){let M=t.split(`
|
|
179
|
+
`,1)[0],B;if(u=M,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),B=u):B=u.replace(this.rules.other.tabCharGlobal," "),T.test(u)||w.test(u)||v.test(u)||k.test(u)||b.test(u))break;if(B.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+=`
|
|
180
|
+
`+B.slice(f);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(g)||w.test(g)||b.test(g))break;d+=`
|
|
181
|
+
`+u}!m&&!u.trim()&&(m=!0),c+=M+`
|
|
182
|
+
`,t=t.substring(M.length+1),g=B.slice(f)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(g=>g.type==="space"),d=c.length>0&&c.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=d}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=pn(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
183
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of a)n.rows.push(pn(l,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
184
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=$r(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=dk(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),fn(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return fn(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){l+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);let d=[...s[0]][0].length,g=t.slice(0,a+s.index+d+o);if(Math.min(a,o)%2){let m=g.slice(1,-1);return{type:"em",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}let u=g.slice(2,-2);return{type:"strong",raw:g,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," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},jt=class Ca{constructor(t){gt(this,"tokens");gt(this,"options");gt(this,"state");gt(this,"tokenizer");gt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ge,this.options.tokenizer=this.options.tokenizer||new ss,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:Dt,block:mi.normal,inline:Er.normal};this.options.pedantic?(r.block=mi.pedantic,r.inline=Er.pedantic):this.options.gfm&&(r.block=mi.gfm,this.options.breaks?r.inline=Er.breaks:r.inline=Er.gfm),this.tokenizer.rules=r}static get rules(){return{block:mi,inline:Er}}static lex(t,r){return new Ca(r).lex(t)}static lexInline(t,r){return new Ca(r).inlineTokens(t)}lex(t){t=t.replace(Dt.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 s,a,n;for(this.options.pedantic&&(t=t.replace(Dt.tabCharGlobal," ").replace(Dt.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
186
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.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
|
+
`)+o.raw,h.text+=`
|
|
189
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.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
|
+
`)+o.raw,h.text+=`
|
|
192
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(g=>{d=g.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&&(o=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+o.raw,h.text+=`
|
|
195
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+o.raw,h.text+=`
|
|
198
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);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,g;let i=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(f=>(u=f.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 f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,o)){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((g=this.options.extensions)!=null&&g.startInline){let f=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(k=>{C=k.call({lexer:this},y),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(m=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(m)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(o=u.raw.slice(-1)),n=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},as=class{constructor(t){gt(this,"options");gt(this,"parser");this.options=t||Ge}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(Dt.notSpaceStart))==null?void 0:n[0],a=t.replace(Dt.endingNewline,"")+`
|
|
199
|
+
`;return s?'<pre><code class="language-'+se(s)+'">'+(i?a:se(a,!0))+`</code></pre>
|
|
200
|
+
`:"<pre><code>"+(i?a:se(a,!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,s="";for(let o=0;o<t.items.length;o++){let l=t.items[o];s+=this.listitem(l)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
|
|
206
|
+
`+s+"</"+a+`>
|
|
207
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+se(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
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 a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
210
|
+
<thead>
|
|
211
|
+
`+r+`</thead>
|
|
212
|
+
`+s+`</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>${se(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=gn(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+se(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=gn(t);if(a===null)return se(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${se(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:se(t.text)}},wo=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""}},Vt=class xa{constructor(t){gt(this,"options");gt(this,"renderer");gt(this,"textRenderer");this.options=t||Ge,this.options.renderer=this.options.renderer||new as,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wo}static parse(t,r){return new xa(r).parse(t)}static parseInline(t,r){return new xa(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,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=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],c+=`
|
|
217
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let l=o;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}},wi,Nr=(wi=class{constructor(t){gt(this,"options");gt(this,"block");this.options=t||Ge}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?jt.lex:jt.lexInline}provideParser(){return this.block?Vt.parse:Vt.parseInline}},gt(wi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),gt(wi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),wi),gk=class{constructor(...t){gt(this,"defaults",po());gt(this,"options",this.setOptions);gt(this,"parse",this.parseMarkdown(!0));gt(this,"parseInline",this.parseMarkdown(!1));gt(this,"Parser",Vt);gt(this,"Renderer",as);gt(this,"TextRenderer",wo);gt(this,"Lexer",jt);gt(this,"Tokenizer",ss);gt(this,"Hooks",Nr);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let h=o[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new as(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],h=a[o];a[o]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new ss(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],h=a[o];a[o]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Nr;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],h=a[o];Nr.passThroughHooks.has(n)?a[o]=c=>{if(this.defaults.async&&Nr.passThroughHooksRespectAsync.has(n))return(async()=>{let g=await l.call(a,c);return h.call(a,g)})();let d=l.call(a,c);return h.call(a,d)}:a[o]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(a,c);return g===!1&&(g=await h.apply(a,c)),g})();let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return jt.lex(t,r??this.defaults)}parser(t,r){return Vt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?jt.lex:jt.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Vt.parse:Vt.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?jt.lex:jt.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Vt.parse:Vt.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
218
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+se(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},je=new gk;function ut(e,t){return je.parse(e,t)}ut.options=ut.setOptions=function(e){return je.setOptions(e),ut.defaults=je.defaults,Xc(ut.defaults),ut};ut.getDefaults=po;ut.defaults=Ge;ut.use=function(...e){return je.use(...e),ut.defaults=je.defaults,Xc(ut.defaults),ut};ut.walkTokens=function(e,t){return je.walkTokens(e,t)};ut.parseInline=je.parseInline;ut.Parser=Vt;ut.parser=Vt.parse;ut.Renderer=as;ut.TextRenderer=wo;ut.Lexer=jt;ut.lexer=jt.lex;ut.Tokenizer=ss;ut.Hooks=Nr;ut.parse=ut;ut.options;ut.setOptions;ut.use;ut.walkTokens;ut.parseInline;Vt.parse;jt.lex;function id(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(c){var d,g;return(g=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&g!==void 0?g:0})):o},[]);if(s.length){var a=new RegExp(`
|
|
219
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
|
|
220
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,l){var h=n.match(/(?:^|\n)( *)$/),c=h?h[1]:"",d=o;typeof o=="string"&&o.includes(`
|
|
221
|
+
`)&&(d=String(o).split(`
|
|
222
|
+
`).map(function(g,u){return u===0?g:"".concat(c).concat(g)}).join(`
|
|
223
|
+
`)),n+=d+i[l+1]}),n}var pk={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},ka=new Map,sd=new Map,fk=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(q.debug("Registering icon pack:",t.name),"loader"in t)sd.set(t.name,t.loader);else if("icons"in t)ka.set(t.name,t.icons);else throw q.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),ad=p(async(e,t)=>{const r=mx(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=ka.get(i);if(!s){const n=sd.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},ka.set(i,s)}catch(o){throw q.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=xx(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),mk=p(async e=>{try{return await ad(e),!0}catch{return!1}},"isIconAvailable"),di=p(async(e,t,r)=>{let i;try{i=await ad(e,t==null?void 0:t.fallbackPrefix)}catch(n){q.error(n),i=pk}const s=Bx(i,t),a=Mx(Fx(s.body),{...s.attributes,...r});return Qt(a,mt())},"getIconSVG");function od(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
224
|
+
`).replace(/\n{2,}/g,`
|
|
225
|
+
`);return id(i)}p(od,"preprocessMarkdown");function nd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(nd,"nonMarkdownToLines");function ld(e,t={}){const r=od(e,t),i=ut.lexer(r),s=[[]];let a=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
226
|
+
`).forEach((c,d)=>{d!==0&&(a++,s.push([])),c.split(" ").forEach(g=>{g=g.replace(/'/g,"'"),g&&s[a].push({content:g,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return p(n,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}p(ld,"markdownToLines");function hd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(hd,"nonMarkdownToHTML");function cd(e,{markdownAutoWrap:t}={}){const r=ut.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(q.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(cd,"markdownToHTML");function dd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(dd,"splitTextToChars");function ud(e,t){const r=dd(t.content);return So(e,[],r,t.type)}p(ud,"splitWordToFitWidth");function So(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?So(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(So,"splitWordToFitWidthRecursion");function gd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
227
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return os(e,t)}p(gd,"splitLineToFitWidth");function os(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return os(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=ud(t,a);r.push([o]),l.content&&e.unshift(l)}return os(e,t,r)}p(os,"splitLineToFitWidthRecursion");function ba(e,t){t&&e.attr("style",t)}p(ba,"applyStyle");var mn=16384;async function pd(e,t,r,i,s=!1,a=mt()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,mn)}px`),n.attr("height",`${Math.min(10*r,mn)}px`);const o=n.append("xhtml:div"),l=Zr(t.label)?await wl(t.label.replace(oi.lineBreakRegex,`
|
|
228
|
+
`),a):Qt(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(l),ba(c,t.labelStyle),c.attr("class",`${h} ${i}`),ba(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&o.attr("class","labelBkg");let d=o.node().getBoundingClientRect();return d.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),d=o.node().getBoundingClientRect()),n.node()}p(pd,"addHtmlSpan");function Ss(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(Ss,"createTspan");function fd(e,t,r){const i=e.append("text"),s=Ss(i,1,t);Ts(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(fd,"computeWidthOfText");function yk(e,t,r){var n;const i=e.append("text"),s=Ss(i,1,t);Ts(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}p(yk,"computeDimensionOfText");function md(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const d=p(u=>fd(n,1.1,u)<=e,"checkWidth"),g=d(c)?[c]:gd(c,d);for(const u of g){const m=Ss(l,h,1.1,s);Ts(m,u),h++}}if(i){const c=l.node().getBBox(),d=2;return o.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),n.node()}else return l.node()}p(md,"createFormattedText");function wa(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(wa,"decodeHTMLEntities");function Ts(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(wa(r.content)):s.text(" "+wa(r.content))})}p(Ts,"updateTextContentAndStyles");async function yd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await mk(o)?await di(o,void 0,{class:"label-icon"}):`<i class='${Qt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(yd,"replaceIconSubstring");var be=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(q.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",h),a){const d=n?cd(t,c):hd(t),g=await yd(Xe(d),c),u=t.replace(/\\\\/g,"\\"),m={isNode:o,label:Zr(t)?u:g,labelStyle:r.replace("fill:","color:")};return await pd(e,m,l,s,h,c)}else{const d=Xe(t.replace(/<br\s*\/?>/g,"<br/>")),g=n?ld(d.replace("<br>","<br/>"),c):nd(d),u=md(l,e,g,t?h:!1,!o);if(o){/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:");it(u).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");it(u).select("rect").attr("style",m.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(u).select("text").attr("style",f)}return i?it(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):it(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Is(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-s)*o+i,l[1]=(h-i)*o+(c-s)*n+s}}}function Ck(e,t){return e[0]===t[0]&&e[1]===t[1]}function xk(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)Is(h,o,s);const l=(function(h,c,d){const g=[];for(const k of h){const b=[...k];Ck(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&g.push(b)}const u=[];c=Math.max(c,.1);const m=[];for(const k of g)for(let b=0;b<k.length-1;b++){const T=k[b],w=k[b+1];if(T[1]!==w[1]){const v=Math.min(T[1],w[1]);m.push({ymin:v,ymax:Math.max(T[1],w[1]),x:v===T[1]?T[0]:w[0],islope:(w[0]-T[0])/(w[1]-T[1])})}}if(m.sort(((k,b)=>k.ymin<b.ymin?-1:k.ymin>b.ymin?1:k.x<b.x?-1:k.x>b.x?1:k.ymax===b.ymax?0:(k.ymax-b.ymax)/Math.abs(k.ymax-b.ymax))),!m.length)return u;let f=[],y=m[0].ymin,C=0;for(;f.length||m.length;){if(m.length){let k=-1;for(let b=0;b<m.length&&!(m[b].ymin>y);b++)k=b;m.splice(0,k+1).forEach((b=>{f.push({s:y,edge:b})}))}if(f=f.filter((k=>!(k.edge.ymax<=y))),f.sort(((k,b)=>k.edge.x===b.edge.x?0:(k.edge.x-b.edge.x)/Math.abs(k.edge.x-b.edge.x))),(d!==1||C%c==0)&&f.length>1)for(let k=0;k<f.length;k+=2){const b=k+1;if(b>=f.length)break;const T=f[k].edge,w=f[b].edge;u.push([[Math.round(T.x),y],[Math.round(w.x),y]])}y+=d,f.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),C++}return u})(n,a,i);if(s){for(const h of n)Is(h,o,-s);(function(h,c,d){const g=[];h.forEach((u=>g.push(...u))),Is(g,c,d)})(l,o,-s)}return l}function ui(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),xk(e,s,i,a||1)}class To{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ui(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function vs(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 kk extends To{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ui(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)vs([h,c])&&n.push([[h[0]-o,h[1]+l],[...c]],[[h[0]+o,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class bk extends To{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class wk{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const l=vs(o),h=l/s,c=Math.ceil(h)-1,d=l-c*s,g=(o[0][0]+o[1][0])/2-s/4,u=Math.min(o[0][1],o[1][1]);for(let m=0;m<c;m++){const f=u+d+m*s,y=g-n+2*Math.random()*n,C=f-n+2*Math.random()*n,k=this.helper.ellipse(y,C,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class Sk{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=vs(n),l=Math.floor(o/(i+s)),h=(o+s-l*(i+s))/2;let c=n[0],d=n[1];c[0]>d[0]&&(c=n[1],d=n[0]);const g=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const m=u*(i+s),f=m+i,y=[c[0]+m*Math.cos(g)+h*Math.cos(g),c[1]+m*Math.sin(g)+h*Math.sin(g)],C=[c[0]+f*Math.cos(g)+h*Math.cos(g),c[1]+f*Math.sin(g)+h*Math.sin(g)];a.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),a}}class Tk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=ui(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=vs(a),o=Math.round(n/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<o;d++){const g=2*d*r,u=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+g*Math.cos(c),l[1]+g*Math.sin(c)],y=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[f[0]+m*Math.cos(c+Math.PI/4),f[1]+m*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),s}}const Rt={};class vk{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Bk=0,Os=1,yn=2,yi={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 Ds(e,t){return e.type===t}function vo(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:Bk,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Os,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:yn,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!Ds(a,yn);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return vo("M0,0"+e);s++,n=yi[a.text],i=a.text}else Ds(a,Os)?n=yi[i]:(s++,n=yi[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let l=s;l<s+n;l++){const h=r[l];if(!Ds(h,Os))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof yi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Cd(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function xd(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],o=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,g=0;r==="C"||r==="S"?(d=i+(i-o),g=s+(s-l)):(d=i,g=s),t.push({key:"C",data:[d,g,...c]}),o=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[d,g]=c;let u=0,m=0;r==="Q"||r==="T"?(u=i+(i-o),m=s+(s-l)):(u=i,m=s);const f=i+2*(u-i)/3,y=s+2*(m-s)/3,C=d+2*(u-d)/3,k=g+2*(m-g)/3;t.push({key:"C",data:[f,y,C,k,d,g]}),o=u,l=m,i=d,s=g;break}case"Q":{const[d,g,u,m]=c,f=i+2*(d-i)/3,y=s+2*(g-s)/3,C=u+2*(d-u)/3,k=m+2*(g-m)/3;t.push({key:"C",data:[f,y,C,k,u,m]}),o=d,l=g,i=u,s=m;break}case"A":{const d=Math.abs(c[0]),g=Math.abs(c[1]),u=c[2],m=c[3],f=c[4],y=c[5],C=c[6];d===0||g===0?(t.push({key:"C",data:[i,s,y,C,y,C]}),i=y,s=C):(i!==y||s!==C)&&(kd(i,s,y,C,d,g,u,m,f).forEach((function(k){t.push({key:"C",data:k})})),i=y,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function Ir(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function kd(e,t,r,i,s,a,n,o,l,h){const c=(d=n,Math.PI*d/180);var d;let g=[],u=0,m=0,f=0,y=0;if(h)[u,m,f,y]=h;else{[e,t]=Ir(e,t,-c),[r,i]=Ir(r,i,-c);const z=(e-r)/2,P=(t-i)/2;let A=z*z/(s*s)+P*P/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const L=s*s,E=a*a,F=L*E-L*P*P-E*z*z,S=L*P*P+E*z*z,R=(o===l?-1:1)*Math.sqrt(Math.abs(F/S));f=R*s*P/a+(e+r)/2,y=R*-a*z/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/a).toFixed(9))),m=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(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 z=m,P=r,A=i;m=l&&m>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,g=kd(r=f+s*Math.cos(m),i=y+a*Math.sin(m),P,A,s,a,n,0,l,[m,z,f,y])}C=m-u;const k=Math.cos(u),b=Math.sin(u),T=Math.cos(m),w=Math.sin(m),v=Math.tan(C/4),M=4/3*s*v,B=4/3*a*v,W=[e,t],I=[e+M*b,t-B*k],$=[r+M*w,i-B*T],N=[r,i];if(I[0]=2*W[0]-I[0],I[1]=2*W[1]-I[1],h)return[I,$,N].concat(g);{g=[I,$,N].concat(g);const z=[];for(let P=0;P<g.length;P+=3){const A=Ir(g[P][0],g[P][1],c),L=Ir(g[P+1][0],g[P+1][1],c),E=Ir(g[P+2][0],g[P+2][1],c);z.push([A[0],A[1],L[0],L[1],E[0],E[1]])}return z}}const _k={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return ns(e,t,r)},ellipse:function(e,t,r,i,s){const a=wd(r,i,s);return Sa(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Me(e,t,r,i,s,!0)}};function bd(e,t,r,i,s){return{type:"path",ops:Me(e,t,r,i,s)}}function Ii(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Me(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?bd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Lk(e,t,r,i,s){return(function(a,n){return Ii(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Cn(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ci(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ci(r[0],1.5*(1+.22*t.roughness),bn(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=Ci(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ci(n,1.5*(1+.22*t.roughness),bn(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function wd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=Q(n*l,r),o+=Q(o*l,r),{increment:a,rx:n,ry:o}}function Sa(e,t,r,i){const[s,a]=wn(i.increment,e,t,i.rx,i.ry,1,i.increment*ns(.1,ns(.4,1,r),r),r);let n=ls(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=wn(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ls(o,null,r);n=n.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function xn(e,t,r,i,s,a,n,o,l){const h=e,c=t;let d=Math.abs(r/2),g=Math.abs(i/2);d+=Q(.01*d,l),g+=Q(.01*g,l);let u=s,m=a;for(;u<0;)u+=2*Math.PI,m+=2*Math.PI;m-u>2*Math.PI&&(u=0,m=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(m-u)/2),C=Sn(y,h,c,d,g,u,m,1,l);if(!l.disableMultiStroke){const k=Sn(y,h,c,d,g,u,m,1.5,l);C.push(...k)}return n&&(o?C.push(...Me(h,c,h+d*Math.cos(u),c+g*Math.sin(u),l),...Me(h,c,h+d*Math.cos(m),c+g*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+g*Math.sin(u)]})),{type:"path",ops:C}}function kn(e,t){const r=xd(Cd(vo(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...Me(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,h,c,d,g,u]=o;i.push(...Fk(l,h,c,d,g,u,a,t)),a=[g,u];break}case"Z":i.push(...Me(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Ps(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Q(s,t),i[0][1]+Q(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Q(s,t),i[n][1]+Q(s,t)]})}}return{type:"fillPath",ops:r}}function Ze(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Rt[s])switch(s){case"zigzag":Rt[s]||(Rt[s]=new kk(i));break;case"cross-hatch":Rt[s]||(Rt[s]=new bk(i));break;case"dots":Rt[s]||(Rt[s]=new wk(i));break;case"dashed":Rt[s]||(Rt[s]=new Sk(i));break;case"zigzag-line":Rt[s]||(Rt[s]=new Tk(i));break;default:s="hachure",Rt[s]||(Rt[s]=new To(i))}return Rt[s]})(t,_k).fillPolygons(e,t)}function bn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sd(e){return e.randomizer||(e.randomizer=new vk(e.seed||0)),e.randomizer.next()}function ns(e,t,r,i=1){return r.roughness*i*(Sd(r)*(t-e)+e)}function Q(e,t,r=1){return ns(-e,e,t,r)}function Me(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=Ta(e,t,r,i,s,!0,!1);if(n)return o;const l=Ta(e,t,r,i,s,!0,!0);return o.concat(l)}function Ta(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>o&&(c=l/10);const d=c/2,g=.2+.2*Sd(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=Q(u,s,h),m=Q(m,s,h);const f=[],y=()=>Q(d,s,h),C=()=>Q(c,s,h),k=s.preserveVertices;return n?f.push({op:"move",data:[e+(k?0:y()),t+(k?0:y())]}):f.push({op:"move",data:[e+(k?0:Q(c,s,h)),t+(k?0:Q(c,s,h))]}),n?f.push({op:"bcurveTo",data:[u+e+(r-e)*g+y(),m+t+(i-t)*g+y(),u+e+2*(r-e)*g+y(),m+t+2*(i-t)*g+y(),r+(k?0:y()),i+(k?0:y())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*g+C(),m+t+(i-t)*g+C(),u+e+2*(r-e)*g+C(),m+t+2*(i-t)*g+C(),r+(k?0:C()),i+(k?0:C())]}),f}function Ci(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Q(t,r),e[s][1]+Q(t,r)]),s===e.length-1&&i.push([e[s][0]+Q(t,r),e[s][1]+Q(t,r)]);return ls(i,null,r)}function ls(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*e[o+1][0]-n*e[o-1][0])/6,l[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Ta(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function wn(e,t,r,i,s,a,n,o){const l=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(d),h.push(d)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=Q(.5,o)-Math.PI/2;h.push([Q(a,o)+t+.9*i*Math.cos(c-e),Q(a,o)+r+.9*s*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let g=c;g<d;g+=e){const u=[Q(a,o)+t+i*Math.cos(g),Q(a,o)+r+s*Math.sin(g)];l.push(u),h.push(u)}h.push([Q(a,o)+t+i*Math.cos(c+2*Math.PI+.5*n),Q(a,o)+r+s*Math.sin(c+2*Math.PI+.5*n)]),h.push([Q(a,o)+t+.98*i*Math.cos(c+n),Q(a,o)+r+.98*s*Math.sin(c+n)]),h.push([Q(a,o)+t+.9*i*Math.cos(c+.5*n),Q(a,o)+r+.9*s*Math.sin(c+.5*n)])}return[h,l]}function Sn(e,t,r,i,s,a,n,o,l){const h=a+Q(.1,l),c=[];c.push([Q(o,l)+t+.9*i*Math.cos(h-e),Q(o,l)+r+.9*s*Math.sin(h-e)]);for(let d=h;d<=n;d+=e)c.push([Q(o,l)+t+i*Math.cos(d),Q(o,l)+r+s*Math.sin(d)]);return c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),ls(c,null,l)}function Fk(e,t,r,i,s,a,n,o){const l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let c=[0,0];const d=o.disableMultiStroke?1:2,g=o.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(g?0:Q(h[0],o)),n[1]+(g?0:Q(h[0],o))]}),c=g?[s,a]:[s+Q(h[u],o),a+Q(h[u],o)],l.push({op:"bcurveTo",data:[e+Q(h[u],o),t+Q(h[u],o),r+Q(h[u],o),i+Q(h[u],o),c[0],c[1]]});return l}function Or(e){return[...e]}function Tn(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(Or(e[0]),Or(e[1]),Or(e[2]),Or(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(Or(s[0]));for(let o=1;o+2<s.length;o++){const l=s[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*s[o+1][0]-n*s[o-1][0])/6,l[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function Oi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Mk(e,t,r){const i=Oi(t,r);if(i===0)return Oi(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Oi(e,Pe(t,r,s))}function Pe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function va(e,t,r,i){const s=i||[];if((function(o,l){const h=o[l+0],c=o[l+1],d=o[l+2],g=o[l+3];let u=3*c[0]-2*h[0]-g[0];u*=u;let m=3*c[1]-2*h[1]-g[1];m*=m;let f=3*d[0]-2*g[0]-h[0];f*=f;let y=3*d[1]-2*g[1]-h[1];return y*=y,u<f&&(u=f),m<y&&(m=y),u+m})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(Oi(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],g=Pe(l,h,.5),u=Pe(h,c,.5),m=Pe(c,d,.5),f=Pe(g,u,.5),y=Pe(u,m,.5),C=Pe(f,y,.5);va([l,g,f,C],0,r,s),va([C,y,m,d],0,r,s)}var a,n;return s}function Ak(e,t){return hs(e,0,e.length,t)}function hs(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const d=Mk(e[c],n,o);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(hs(e,t,h+1,i,a),hs(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function Rs(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)va(e,3*a,t,i);return r&&r>0?hs(i,0,i.length,r):i}const zt="none";class cs{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const n=this._o(a);return this._d("line",[bd(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],l=Lk(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(Ps([h],n)):o.push(Ze([h],n))}return n.stroke!==zt&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],l=wd(i,s,n),h=Sa(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Sa(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(Ze([h.estimatedPoints],n));return n.stroke!==zt&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ii(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,l){const h=this._o(l),c=[],d=xn(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const u=xn(t,r,i,s,a,n,!0,!1,g);u.type="fillPath",c.push(u)}else c.push((function(g,u,m,f,y,C,k){const b=g,T=u;let w=Math.abs(m/2),v=Math.abs(f/2);w+=Q(.01*w,k),v+=Q(.01*v,k);let M=y,B=C;for(;M<0;)M+=2*Math.PI,B+=2*Math.PI;B-M>2*Math.PI&&(M=0,B=2*Math.PI);const W=(B-M)/k.curveStepCount,I=[];for(let $=M;$<=B;$+=W)I.push([b+w*Math.cos($),T+v*Math.sin($)]);return I.push([b+w*Math.cos(B),T+v*Math.sin(B)]),I.push([b,T]),Ze([I],k)})(t,r,i,s,a,n,h));return h.stroke!==zt&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Cn(t,i);if(i.fill&&i.fill!==zt)if(i.fillStyle==="solid"){const n=Cn(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const h of l)h.length<3?n.push(...h):h.length===3?n.push(...Rs(Tn([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Rs(Tn(h),10,(1+i.roughness)/2))}n.length&&s.push(Ze([n],i))}return i.stroke!==zt&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ii(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Ps([t],i)):s.push(Ze([t],i))),i.stroke!==zt&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==zt,n=i.stroke!==zt,o=!!(i.simplification&&i.simplification<1),l=(function(c,d,g){const u=xd(Cd(vo(c))),m=[];let f=[],y=[0,0],C=[];const k=()=>{C.length>=4&&f.push(...Rs(C,d)),C=[]},b=()=>{k(),f.length&&(m.push(f),f=[])};for(const{key:w,data:v}of u)switch(w){case"M":b(),y=[v[0],v[1]],f.push(y);break;case"L":k(),f.push([v[0],v[1]]);break;case"C":if(!C.length){const M=f.length?f[f.length-1]:y;C.push([M[0],M[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.push([v[4],v[5]]);break;case"Z":k(),f.push([y[0],y[1]])}if(b(),!g)return m;const T=[];for(const w of m){const v=Ak(w,g);v.length&&T.push(v)}return T})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=kn(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=kn(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Ps(l,i));else s.push(Ze(l,i));return n&&(o?l.forEach((c=>{s.push(Ii(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:zt};break;case"fillPath":n={d:this.opsToPath(a),stroke:zt,strokeWidth:0,fill:i.fill||zt};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||zt,strokeWidth:i,fill:zt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class Ek{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new cs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,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 xi="http://www.w3.org/2000/svg";class $k{constructor(t,r){this.svg=t,this.gen=new cs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(xi,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=s.createElementNS(xi,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(xi,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(xi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,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 Ek(e,t),svg:(e,t)=>new $k(e,t),generator:e=>new cs(e),newSeed:()=>cs.newSeed()},K=p(async(e,t,r)=>{var u,m;let i;const s=t.useHtmlLabels||ke((u=ht())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",Bt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await be(n,Qt(Xe(o),ht()),{useHtmlLabels:s,width:t.width||((m=ht().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},ht());let d=c.getBBox();const g=((t==null?void 0:t.padding)??0)/2;if(s){const f=c.children[0],y=it(c);await Hc(f,o),d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height)}return s?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:g,label:n}},"labelHelper"),qs=p(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Pt(ht()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await be(s,Qt(Xe(t),ht()),{useHtmlLabels:i,width:r.width||((h=(l=ht())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let n=a.getBBox();const o=r.padding/2;if(Pt(ht())){const c=a.children[0],d=it(a);n=c.getBoundingClientRect(),d.attr("width",n.width),d.attr("height",n.height)}return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),j=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Z=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function at(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(at,"createPathFromPoints");function Ae(e,t,r,i,s,a){const n=[],l=r-e,h=i-t,c=l/a,d=2*Math.PI/c,g=t+h/2;for(let u=0;u<=50;u++){const m=u/50,f=e+m*l,y=g+s*Math.sin(d*(f-e));n.push({x:f,y})}return n}p(Ae,"generateFullSineWavePoints");function ri(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p(ri,"generateCirclePoints");function Ba(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),n=p((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}p(Ba,"mergePaths");var Ik=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,l,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),l=a===0?0:o*s/a,h=o):(s<0&&(n=-n),l=n,h=s===0?0:n*a/s),{x:r+l,y:i+h}},"intersectRect"),_r=Ik,Ok=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=ht(),o=Pt(n);return await be(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),ve=Ok,Ee=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Td=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=X(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Pt(r),u=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await be(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):m=await ve(u,t.label,t.labelStyle||"",!1,!0);let f=m.getBBox();if(Pt(r)){const M=m.children[0],B=it(m);f=M.getBoundingClientRect(),B.attr("width",f.width),B.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-y/2,b=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=Y.svg(d),B=U(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),W=M.path(Ee(k,b,y,C,0),B);T=d.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",b).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=go(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),o){const M=u.select("span");M&&M.attr("style",o)}const v=T.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return _r(t,M)},{cluster:d,labelBBox:f}},"rect"),Dk=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return _r(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Pk=p(async(e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:n,compositeTitleBackground:o,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 g=h.append("rect");const u=await ve(d,t.label,t.labelStyle,void 0,!0);let m=u.getBBox();if(Pt(r)){const W=u.children[0],I=it(u);m=W.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const f=0*t.padding,y=f/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+f;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+f,b=t.height+f-m.height-6,T=t.x-C/2,w=t.y-k/2;t.width=C;const v=t.y-t.height/2-y+m.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),I=Y.svg(h),$=t.rx||t.ry?I.path(Ee(T,w,C,k,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:s}):I.rectangle(T,w,C,k,{seed:s});M=h.insert(()=>$,":first-child");const N=I.rectangle(T,v,C,b,{fill:W?a:n,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>$,":first-child"),g=h.insert(()=>N)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",T).attr("y",w).attr("width",C).attr("height",k).attr("data-look",t.look),g.attr("class","inner").attr("x",T).attr("y",v).attr("width",C).attr("height",b);d.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(Pt(r)?0:3)})`);const B=M.node().getBBox();return t.height=B.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return _r(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),Rk=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=X(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Pt(r),u=d.insert("g").attr("class","cluster-label "),m=await be(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let f=m.getBBox();if(Pt(r)){const M=m.children[0],B=it(m);f=M.getBoundingClientRect(),B.attr("width",f.width),B.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-y/2,b=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=Y.svg(d),B=U(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),W=M.path(Ee(k,b,y,C,t.rx),B);T=d.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",b).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=go(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),o){const M=u.select("span");M&&M.attr("style",o)}const v=T.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return _r(t,M)},{cluster:d,labelBBox:f}},"kanbanSection"),qk=p((e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,n=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=n.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,g=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const y=Y.svg(n).rectangle(d,g,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});u=n.insert(()=>y,":first-child")}else{u=o.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",g).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(f){return _r(t,f)},{cluster:n,labelBBox:{}}},"divider"),Wk=Td,zk={rect:Td,squareRect:Wk,roundedWithTitle:Pk,noteGroup:Dk,divider:qk,kanbanSection:Rk},vd=new Map,Nk=p(async(e,t)=>{const r=t.shape||"rect",i=await zk[r](e,t);return vd.set(t.id,i),i},"insertCluster"),AS=p(()=>{vd=new Map},"clear");function Bd(e,t){return e.intersect(t)}p(Bd,"intersectNode");var Hk=Bd;function _d(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/l);i.x<s&&(h=-h);var c=Math.abs(t*r*o/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}p(_d,"intersectEllipse");var Ld=_d;function Fd(e,t,r){return Ld(e,t,t,r)}p(Fd,"intersectCircle");var Yk=Fd;function Md(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,l=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&l!==0&&_a(o,l))return;const c=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+g,m=c*t.x+d*t.y+g;if(Math.abs(u)<h&&Math.abs(m)<h&&_a(u,m))return;const f=s*d-c*a;if(f===0)return;const y=Math.abs(f/2);let C=a*g-d*n;const k=C<0?(C-y)/f:(C+y)/f;C=c*n-s*g;const b=C<0?(C-y)/f:(C+y)/f;return{x:k,y:b}}}p(Md,"intersectLine");function _a(e,t){return e*t>0}p(_a,"sameSign");var Uk=Md;function Ad(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){n=Math.min(n,c.x),o=Math.min(o,c.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let l=i-e.width/2-n,h=s-e.height/2-o;for(let c=0;c<t.length;c++){let d=t[c],g=t[c<t.length-1?c+1:0],u=Uk(e,r,{x:l+d.x,y:h+d.y},{x:l+g.x,y:h+g.y});u&&a.push(u)}return a.length?(a.length>1&&a.sort(function(c,d){let g=c.x-r.x,u=c.y-r.y,m=Math.sqrt(g*g+u*u),f=d.x-r.x,y=d.y-r.y,C=Math.sqrt(f*f+y*y);return m<C?-1:m===C?0:1}),a[0]):e}p(Ad,"intersectPolygon");var Xk=Ad,H={node:Hk,circle:Yk,ellipse:Ld,polygon:Xk,rect:_r};function Ed(e,t){const{labelStyles:r}=X(t);t.labelStyle=r;const i=Z(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=Y.svg(a),h=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),d=a.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",Bt(o)),j(t,d),t.intersect=function(g){return q.info("Circle intersect",t,n,g),H.circle(t,n,g)},a}p(Ed,"anchor");function La(e,t,r,i,s,a,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,g=(i-t)/2,u=d/s,m=g/a,f=Math.sqrt(u**2+m**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-f**2),C=l+y*a*Math.sin(c)*(n?-1:1),k=h-y*s*Math.cos(c)*(n?-1:1),b=Math.atan2((t-k)/a,(e-C)/s);let w=Math.atan2((i-k)/a,(r-C)/s)-b;n&&w<0&&(w+=2*Math.PI),!n&&w>0&&(w-=2*Math.PI);const v=[];for(let M=0;M<20;M++){const B=M/19,W=b+B*w,I=C+s*Math.cos(W),$=k+a*Math.sin(W);v.push({x:I,y:$})}return v}p(La,"generateArcPoints");function $d(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p($d,"calculateArcSagitta");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=p(W=>W+n,"calcTotalHeight"),l=p(W=>{const I=W/2;return[I/(2.5+W/50),I]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[g,u]=l(d),m=$d(d,g,u),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+m-m,C=d,{cssStyles:k}=t,b=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...La(-y/2,-C/2,-y/2,C/2,g,u,!1),{x:y/2,y:C/2},...La(y/2,C/2,y/2,-C/2,g,u,!0)],T=Y.svg(h),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=at(b),M=T.path(v,w),B=h.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${g/2}, 0)`),j(t,B),t.intersect=function(W){return H.polygon(t,b,W)},h}p(Id,"bowTieRect");function we(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(we,"insertPolygonShape");var ki=12;async function Od(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ki),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),d=0,g=h,u=-c,m=0,f=[{x:d+ki,y:u},{x:g,y:u},{x:g,y:m},{x:d,y:m},{x:d,y:u+ki},{x:d+ki,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=Y.svg(o),b=U(t,{}),T=at(f),w=k.path(T,b);y=o.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=we(o,h,c,f);return i&&y.attr("style",i),j(t,y),t.intersect=function(k){return H.polygon(t,f,k)},o}p(Od,"card");function Dd(e,t){const{nodeStyles:r}=X(t);t.label="";const i=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Y.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=at(n),c=o.path(h,l),d=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return H.polygon(t,n,g)},i}p(Dd,"choice");async function Bo(e,t,r){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await K(e,t,Z(t)),l=16,h=(r==null?void 0:r.padding)??o,c=t.look==="neo"?n.width/2+l*2:n.width/2+h;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=Y.svg(a),m=U(t,{}),f=u.circle(0,0,c*2,m);d=a.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",Bt(g))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return j(t,d),t.calcIntersect=function(u,m){const f=u.width/2;return H.circle(u,f,m)},t.intersect=function(u){return q.info("Circle intersect",t,c,u),H.circle(t,c,u)},a}p(Bo,"circle");function Pd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
229
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}p(Pd,"createLine");function Rd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=Y.svg(s),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,a*2,l),c=Pd(a),d=o.path(c,l),g=s.insert(()=>h,":first-child");return g.insert(()=>d),g.attr("class","outer-path"),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),j(t,g),t.intersect=function(u){return q.info("crossedCircle intersect",t,{radius:a,point:u}),H.circle(t,a,u)},s}p(Rd,"crossedCircle");function pe(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p(pe,"generateCirclePoints");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+o,c=a.height+l,d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...pe(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...pe(h/2+d*2,-d,d,20,-180,-270),...pe(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...pe(h/2,c/2,d,20,0,90)],m=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...pe(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...pe(h/2+h*.1,-d,d,20,-180,-270),...pe(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...pe(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Y.svg(s),y=U(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const k=at(u).replace("Z",""),b=f.path(k,y),T=at(m),w=f.path(T,{...y}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>b,":first-child"),v.attr("class","text"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${d}, 0)`),n.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),j(t,v),t.intersect=function(M){return H.polygon(t,m,M)},s}p(qd,"curlyBraceLeft");function fe(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:u,y:m})}return n}p(fe,"generateCirclePoints");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...fe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...fe(h/2+d*2,-d,d,20,-180,-270),...fe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...fe(h/2,c/2,d,20,0,90)],m=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...fe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...fe(h/2+d*2,-d,d,20,-180,-270),...fe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...fe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Y.svg(s),y=U(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const k=at(u).replace("Z",""),b=f.path(k,y),T=at(m),w=f.path(T,{...y}),v=s.insert("g",":first-child");return v.insert(()=>w,":first-child").attr("stroke-opacity",0),v.insert(()=>b,":first-child"),v.attr("class","text"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-d}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),j(t,v),t.intersect=function(M){return H.polygon(t,m,M)},s}p(Wd,"curlyBraceRight");function _t(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p(_t,"generateCirclePoints");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await K(e,t,Z(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[..._t(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},..._t(h/2+d*2,-d,d,20,-180,-270),..._t(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},..._t(h/2,c/2,d,20,0,90)],m=[..._t(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},..._t(-h/2-d/2,-d,d,20,0,90),..._t(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},..._t(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},..._t(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},..._t(h/2+d*2,-d,d,20,-180,-270),..._t(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},..._t(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},..._t(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},..._t(-h/2-d/2,-d,d,20,0,90),..._t(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},..._t(-h/2+d+d/2,c/2,d,30,-180,-270)],y=Y.svg(s),C=U(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=at(u).replace("Z",""),T=y.path(b,C),v=at(m).replace("Z",""),M=y.path(v,C),B=at(f),W=y.path(B,{...C}),I=s.insert("g",":first-child");return I.insert(()=>W,":first-child").attr("stroke-opacity",0),I.insert(()=>T,":first-child"),I.insert(()=>M,":first-child"),I.attr("class","text"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${d-d/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),j(t,I),t.intersect=function($){return H.polygon(t,f,$)},s}p(zd,"curlyBraces");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,l=5,{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=Math.max(o,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),g=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),u=g/2,{cssStyles:m}=t,f=Y.svg(h),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,k=g,b=C-u,T=k/4,w=[{x:b,y:0},{x:T,y:0},{x:0,y:k/2},{x:T,y:k},{x:b,y:k},...ri(-b,-k/2,u,50,270,90)],v=at(w),M=f.path(v,y),B=h.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(${-d/2}, ${-g/2})`),j(t,B),t.intersect=function(W){return H.polygon(t,w,W)},h}p(Nd,"curvedTrapezoid");var jk=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Vk=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Gk=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),vn=8,Bn=8;async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-n,t.width<Bn&&(t.width=Bn);const k=y/2/(2.5+y/50);t.height=(t.height??0)-a-k*3,t.height<vn&&(t.height=vn)}const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=(t.width?t.width:l.width)+n,d=c/2,g=d/(2.5+c/50),u=(t.height?t.height:l.height)+a+g;let m;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=Y.svg(o),C=Vk(0,0,c,u,d,g),k=Gk(0,g,c,u,d,g),b=U(t,{}),T=y.path(C,b),w=y.path(k,U(t,{fill:"none"}));m=o.insert(()=>w,":first-child"),m=o.insert(()=>T,":first-child"),m.attr("class","basic label-container"),f&&m.attr("style",f)}else{const y=jk(0,0,c,u,d,g);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Bt(f)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),j(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=H.rect(t,y),k=C.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-g)){let b=g*g*(1-k*k/(d*d));b>0&&(b=Math.sqrt(b)),b=g-b,y.y-(t.y??0)>0&&(b=-b),C.y+=b}return C},o}p(Hd,"cylinder");async function Lr(e,t,r){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await K(e,t,Z(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,c=-l/2;let d,{rx:g,ry:u}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(g=r.rx,u=r.ry),t.look==="handDrawn"){const f=Y.svg(a),y=U(t,{}),C=g||u?f.path(Ee(h,c,o,l,g||0),y):f.rectangle(h,c,o,l,y);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Bt(m))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Bt(g)).attr("ry",Bt(u)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return j(t,d),t.calcIntersect=function(f,y){return H.rect(f,y)},t.intersect=function(f){return H.rect(t,f)},a}p(Lr,"drawRect");async function Yd(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Lr(e,t,l);if(t.look==="handDrawn"){const u=Y.svg(h),m=U(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),y=f.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||n)??0,g=(Number(c.attr("height"))||o)??0;return d>0&&g>0&&c.attr("stroke-dasharray",`${d} ${g}`),h}p(Yd,"datastore");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=o.width+s,c=o.height+a,d=c*.2,g=-h/2,u=-c/2-d/2,{cssStyles:m}=t,f=Y.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:g,y:u+d},{x:-g,y:u+d},{x:-g,y:-u},{x:g,y:-u},{x:g,y:u},{x:-g,y:u},{x:-g,y:u+d}],k=f.polygon(C.map(T=>[T.x,T.y]),y),b=n.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${g+(t.padding??0)/2-(o.x-(o.left??0))}, ${u+d+(t.padding??0)/2-(o.y-(o.top??0))})`),j(t,b),t.intersect=function(T){return H.rect(t,T)},n}p(Ud,"dividedRectangle");async function Xd(e,t){var u,m;const{labelStyles:r,nodeStyles:i}=X(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),c=h-s;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=Y.svg(o),y=U(t,{roughness:.2,strokeWidth:2.5}),C=U(t,{roughness:.2,strokeWidth:1.5}),k=f.circle(0,0,h*2,y),b=f.circle(0,0,c*2,C);d=o.insert("g",":first-child"),d.attr("class",Bt(t.cssClasses)).attr("style",Bt(g)),(u=d.node())==null||u.appendChild(k),(m=d.node())==null||m.appendChild(b)}else{d=o.insert("g",":first-child");const f=d.insert("circle",":first-child"),y=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return j(t,d),t.intersect=function(f){return q.info("DoubleCircle intersect",t,h,f),H.circle(t,h,f)},o}p(Xd,"doublecircle");function jd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=X(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=Y.svg(a),{nodeBorder:h}=r,c=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,n*2,c),g=a.insert(()=>d,":first-child");return g.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),j(t,g),t.intersect=function(u){return q.info("filledCircle intersect",t,{radius:n,point:u}),H.circle(t,n,u)},a}p(jd,"filledCircle");var _n=10,Ln=10;async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<_n&&(t.height=_n),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Ln&&(t.width=Ln));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+o.height,d=c,g=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,m=Y.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=at(g),C=m.path(y,f),k=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=c,j(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(b){return q.info("Triangle intersect",t,g,b),H.polygon(t,g,b)},n}p(Vd,"flippedTriangle");function Gd(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=X(t);t.label="";const n=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:o}=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,g=Y.svg(n),u=U(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const m=g.rectangle(c,d,l,h,u),f=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),j(t,f);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return H.rect(t,C)},n}p(Gd,"forkJoin");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+n*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,g=d/2,{cssStyles:u}=t,m=Y.svg(l),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-c/2,y:-d/2},{x:c/2-g,y:-d/2},...ri(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},{x:-c/2,y:d/2}],C=at(y),k=m.path(C,f),b=l.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),j(t,b),t.intersect=function(T){return q.info("Pill intersect",t,{radius:g,point:T}),H.polygon(t,y,T)},l}p(Zd,"halfRoundedRectangle");var Zk=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=X(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,l=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const b=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*b-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:d}=await K(e,t,Z(t)),g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=g/s,m=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:m-u,y:0},{x:m,y:-g/2},{x:m-u,y:-g},{x:u,y:-g},{x:0,y:-g/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=Y.svg(c),b=U(t,{}),T=Zk(0,0,m,g,u),w=k.path(T,b);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${g/2})`),C&&y.attr("style",C)}else y=we(c,m,g,f);return i&&y.attr("style",i),t.width=m,t.height=g,j(t,y),t.intersect=function(k){return H.polygon(t,f,k)},c}p(Kd,"hexagon");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await K(e,t,Z(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=Y.svg(s),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],d=at(c),g=l.path(d,h),u=s.insert(()=>g,":first-child");return u.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-a/2}, ${-n/2})`),j(t,u),t.intersect=function(m){return q.info("Pill intersect",t,{points:c}),H.polygon(t,c,m)},s}p(Qd,"hourglass");async function Jd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:d}=await K(e,t,"icon-shape default"),g=t.pos==="t",u=o,m=o,{nodeBorder:f}=r,{stylesMap:y}=Br(t),C=-m/2,k=-u/2,b=t.label?8:0,T=Y.svg(h),w=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=T.rectangle(C,k,m,u,w),M=Math.max(m,c.width),B=u+c.height+b,W=T.rectangle(-M/2,-B/2,M,B,{...w,fill:"transparent",stroke:"none"}),I=h.insert(()=>v,":first-child"),$=h.insert(()=>W);if(t.icon){const N=h.append("g");N.html(`<g>${await di(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const z=N.node().getBBox(),P=z.width,A=z.height,L=z.x,E=z.y;N.attr("transform",`translate(${-P/2-L},${g?c.height/2+b/2-A/2-E:-c.height/2-b/2-A/2-E})`),N.attr("style",`color: ${y.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-B/2:B/2-c.height})`),I.attr("transform",`translate(0,${g?c.height/2+b/2:-c.height/2-b/2})`),j(t,$),t.intersect=function(N){if(q.info("iconSquare intersect",t,N),!t.label)return H.rect(t,N);const z=t.x??0,P=t.y??0,A=t.height??0;let L=[];return g?L=[{x:z-c.width/2,y:P-A/2},{x:z+c.width/2,y:P-A/2},{x:z+c.width/2,y:P-A/2+c.height+b},{x:z+m/2,y:P-A/2+c.height+b},{x:z+m/2,y:P+A/2},{x:z-m/2,y:P+A/2},{x:z-m/2,y:P-A/2+c.height+b},{x:z-c.width/2,y:P-A/2+c.height+b}]:L=[{x:z-m/2,y:P-A/2},{x:z+m/2,y:P-A/2},{x:z+m/2,y:P-A/2+u},{x:z+c.width/2,y:P-A/2+u},{x:z+c.width/2/2,y:P+A/2},{x:z-c.width/2,y:P+A/2},{x:z-c.width/2,y:P-A/2+u},{x:z-m/2,y:P-A/2+u}],H.polygon(t,L,N)},h}p(Jd,"icon");async function tu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:d}=await K(e,t,"icon-shape default"),g=20,u=t.label?8:0,m=t.pos==="t",{nodeBorder:f,mainBkg:y}=r,{stylesMap:C}=Br(t),k=Y.svg(h),b=U(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=C.get("fill");b.stroke=T??y;const w=h.append("g");t.icon&&w.html(`<g>${await di(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=w.node().getBBox(),M=v.width,B=v.height,W=v.x,I=v.y,$=Math.max(M,B)*Math.SQRT2+g*2,N=k.circle(0,0,$,b),z=Math.max($,c.width),P=$+c.height+u,A=k.rectangle(-z/2,-P/2,z,P,{...b,fill:"transparent",stroke:"none"}),L=h.insert(()=>N,":first-child"),E=h.insert(()=>A);return w.attr("transform",`translate(${-M/2-W},${m?c.height/2+u/2-B/2-I:-c.height/2-u/2-B/2-I})`),w.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-P/2:P/2-c.height})`),L.attr("transform",`translate(0,${m?c.height/2+u/2:-c.height/2-u/2})`),j(t,E),t.intersect=function(F){return q.info("iconSquare intersect",t,F),H.rect(t,F)},h}p(tu,"iconCircle");async function eu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await K(e,t,"icon-shape default"),u=t.pos==="t",m=o+d*2,f=o+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:k}=Br(t),b=-f/2,T=-m/2,w=t.label?8:0,v=Y.svg(h),M=U(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const B=k.get("fill");M.stroke=B??C;const W=v.path(Ee(b,T,f,m,5),M),I=Math.max(f,c.width),$=m+c.height+w,N=v.rectangle(-I/2,-$/2,I,$,{...M,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child").attr("class","icon-shape2"),P=h.insert(()=>N);if(t.icon){const A=h.append("g");A.html(`<g>${await di(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),E=L.width,F=L.height,S=L.x,R=L.y;A.attr("transform",`translate(${-E/2-S},${u?c.height/2+w/2-F/2-R:-c.height/2-w/2-F/2-R})`),A.attr("style",`color: ${k.get("stroke")??y};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-$/2:$/2-c.height})`),z.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),j(t,P),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return H.rect(t,A);const L=t.x??0,E=t.y??0,F=t.height??0;let S=[];return u?S=[{x:L-c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2+c.height+w},{x:L+f/2,y:E-F/2+c.height+w},{x:L+f/2,y:E+F/2},{x:L-f/2,y:E+F/2},{x:L-f/2,y:E-F/2+c.height+w},{x:L-c.width/2,y:E-F/2+c.height+w}]:S=[{x:L-f/2,y:E-F/2},{x:L+f/2,y:E-F/2},{x:L+f/2,y:E-F/2+m},{x:L+c.width/2,y:E-F/2+m},{x:L+c.width/2/2,y:E+F/2},{x:L-c.width/2,y:E+F/2},{x:L-c.width/2,y:E-F/2+m},{x:L-f/2,y:E-F/2+m}],H.polygon(t,S,A)},h}p(eu,"iconRounded");async function ru(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=X(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await K(e,t,"icon-shape default"),u=t.pos==="t",m=o+d*2,f=o+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:k}=Br(t),b=-f/2,T=-m/2,w=t.label?8:0,v=Y.svg(h),M=U(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const B=k.get("fill");M.stroke=B??C;const W=v.path(Ee(b,T,f,m,.1),M),I=Math.max(f,c.width),$=m+c.height+w,N=v.rectangle(-I/2,-$/2,I,$,{...M,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child"),P=h.insert(()=>N);if(t.icon){const A=h.append("g");A.html(`<g>${await di(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),E=L.width,F=L.height,S=L.x,R=L.y;A.attr("transform",`translate(${-E/2-S},${u?c.height/2+w/2-F/2-R:-c.height/2-w/2-F/2-R})`),A.attr("style",`color: ${k.get("stroke")??y};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-$/2:$/2-c.height})`),z.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),j(t,P),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return H.rect(t,A);const L=t.x??0,E=t.y??0,F=t.height??0;let S=[];return u?S=[{x:L-c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2},{x:L+c.width/2,y:E-F/2+c.height+w},{x:L+f/2,y:E-F/2+c.height+w},{x:L+f/2,y:E+F/2},{x:L-f/2,y:E+F/2},{x:L-f/2,y:E-F/2+c.height+w},{x:L-c.width/2,y:E-F/2+c.height+w}]:S=[{x:L-f/2,y:E-F/2},{x:L+f/2,y:E-F/2},{x:L+f/2,y:E-F/2+m},{x:L+c.width/2,y:E-F/2+m},{x:L+c.width/2/2,y:E+F/2},{x:L-c.width/2,y:E+F/2},{x:L-c.width/2,y:E-F/2+m},{x:L-f/2,y:E-F/2+m}],H.polygon(t,S,A)},h}p(ru,"iconSquare");async function iu(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=X(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:d,bbox:g,label:u}=await K(e,t,"image-shape default"),m=t.pos==="t",f=-h/2,y=-c/2,C=t.label?8:0,k=Y.svg(d),b=U(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=k.rectangle(f,y,h,c,b),w=Math.max(h,g.width),v=c+g.height+C,M=k.rectangle(-w/2,-v/2,w,v,{...b,fill:"none",stroke:"none"}),B=d.insert(()=>T,":first-child"),W=d.insert(()=>M);if(t.img){const I=d.append("image");I.attr("href",t.img),I.attr("width",h),I.attr("height",c),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${m?v/2-c:-v/2})`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${m?-c/2-g.height/2-C/2:c/2-g.height/2+C/2})`),B.attr("transform",`translate(0,${m?g.height/2+C/2:-g.height/2-C/2})`),j(t,W),t.intersect=function(I){if(q.info("iconSquare intersect",t,I),!t.label)return H.rect(t,I);const $=t.x??0,N=t.y??0,z=t.height??0;let P=[];return m?P=[{x:$-g.width/2,y:N-z/2},{x:$+g.width/2,y:N-z/2},{x:$+g.width/2,y:N-z/2+g.height+C},{x:$+h/2,y:N-z/2+g.height+C},{x:$+h/2,y:N+z/2},{x:$-h/2,y:N+z/2},{x:$-h/2,y:N-z/2+g.height+C},{x:$-g.width/2,y:N-z/2+g.height+C}]:P=[{x:$-h/2,y:N-z/2},{x:$+h/2,y:N-z/2},{x:$+h/2,y:N-z/2+c},{x:$+g.width/2,y:N-z/2+c},{x:$+g.width/2/2,y:N+z/2},{x:$-g.width/2,y:N+z/2},{x:$-g.width/2,y:N-z/2+c},{x:$-h/2,y:N-z/2+c}],H.polygon(t,P,I)},d}p(iu,"imageSquare");async function su(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=Math.max(l.width+(n??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??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 g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(o),f=U(t,{}),y=at(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&g.attr("style",u)}else g=we(o,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,j(t,g),t.intersect=function(m){return H.polygon(t,d,m)},o}p(su,"inv_trapezoid");async function au(e,t){const{shapeSvg:r,bbox:i,label:s}=await K(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),j(t,a),t.intersect=function(l){return H.rect(t,l)},r}p(au,"labelRect");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(o),f=U(t,{}),y=at(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=we(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,j(t,g),t.intersect=function(m){return H.polygon(t,d,m)},o}p(ou,"lean_left");async function nu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(o),f=U(t,{}),y=at(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=we(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,j(t,g),t.intersect=function(m){return H.polygon(t,d,m)},o}p(nu,"lean_right");function lu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:n,y:0},{x:0,y:o+l/2},{x:n-2*l,y:o+l/2},{x:0,y:2*o},{x:n,y:o-l/2},{x:2*l,y:o-l/2}],c=Y.svg(s),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=at(h),u=c.path(g,d),m=s.insert(()=>u,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),j(t,m),t.intersect=function(f){return q.info("lightningBolt intersect",t,f),H.polygon(t,h,f)},s}p(lu,"lightningBolt");var Kk=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Qk=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Jk=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Fn=10,Mn=10;async function hu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Mn&&(t.width=Mn);const b=C/2/(2.5+C/50);t.height=(t.height??0)-n-b*3,t.height<Fn&&(t.height=Fn)}const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=c/2,g=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+g+n*2,m=u*.1;let f;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=Y.svg(o),k=Qk(0,0,c,u,d,g,m),b=Jk(0,g,c,u,d,g),T=U(t,{}),w=C.path(k,T),v=C.path(b,T);o.insert(()=>v,":first-child").attr("class","line"),f=o.insert(()=>w,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const C=Kk(0,0,c,u,d,g,m);f=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Bt(y)).attr("style",i)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),j(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+g-(l.y-(l.top??0))})`),t.intersect=function(C){const k=H.rect(t,C),b=k.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-g)){let T=g*g*(1-b*b/(d*d));T>0&&(T=Math.sqrt(T)),T=g-T,C.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},o}p(hu,"linedCylinder");async function cu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,g=t.look==="neo"?d/4:d/8,u=d+g,{cssStyles:m}=t,f=Y.svg(o),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...Ae(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,g,.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}],k=f.polygon(C.map(T=>[T.x,T.y]),y),b=o.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-g/2-(l.y-(l.top??0))})`),j(t,b),t.intersect=function(T){return H.polygon(t,C,T)},o}p(cu,"linedWaveEdgedRect");async function du(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:l,bbox:h,label:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,u=d-2*o,m=g-2*o,f=-u/2,y=-m/2,{cssStyles:C}=t,k=Y.svg(l),b=U(t,{}),T=[{x:f-o,y:y+o},{x:f-o,y:y+m+o},{x:f+u-o,y:y+m+o},{x:f+u-o,y:y+m},{x:f+u,y:y+m},{x:f+u,y:y+m-o},{x:f+u+o,y:y+m-o},{x:f+u+o,y:y-o},{x:f+o,y:y-o},{x:f+o,y},{x:f,y},{x:f,y:y+o}],w=[{x:f,y:y+o},{x:f+u-o,y:y+o},{x:f+u-o,y:y+m},{x:f+u,y:y+m},{x:f+u,y},{x:f,y}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const v=at(T);let M=k.path(v,b);const B=at(w);let W=k.path(B,b);t.look!=="handDrawn"&&(M=Ba(M),W=Ba(W));const I=l.insert("g",":first-child");return I.insert(()=>M),I.insert(()=>W),I.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),j(t,I),t.intersect=function($){return H.polygon(t,T,$)},l}p(du,"multiRect");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await K(e,t,Z(t)),o=t.padding??0,l=t.look==="neo"?16:o,h=t.look==="neo"?12:o;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(a.width,(t==null?void 0:t.width)??0)+l*2,g=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?g/4:g/8,m=g+(c?u/2:-u/2),f=-d/2,y=-m/2,C=10,{cssStyles:k}=t,b=Ae(f-C,y+m+C,f+d-C,y+m+C,u,.8),T=b==null?void 0:b[b.length-1],w=[{x:f-C,y:y+C},{x:f-C,y:y+m+C},...b,{x:f+d-C,y:T.y-C},{x:f+d,y:T.y-C},{x:f+d,y:T.y-2*C},{x:f+d+C,y:T.y-2*C},{x:f+d+C,y:y-C},{x:f+C,y:y-C},{x:f+C,y},{x:f,y},{x:f,y:y+C}],v=[{x:f,y:y+C},{x:f+d-C,y:y+C},{x:f+d-C,y:T.y-C},{x:f+d,y:T.y-C},{x:f+d,y},{x:f,y}],M=Y.svg(s),B=U(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const W=at(w),I=M.path(W,B),$=at(v),N=M.path($,B),z=s.insert(()=>I,":first-child");return z.insert(()=>N),z.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-u/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-u/2-(a.y-(a.top??0))})`),j(t,z),t.intersect=function(P){return H.polygon(t,w,P)},s}p(uu,"multiWaveEdgedRectangle");async function gu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i,t.useHtmlLabels||Pt(mt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,g=-c/2,{cssStyles:u}=t,m=Y.svg(n),f=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=m.rectangle(d,g,h,c,f),C=n.insert(()=>y,":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),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),j(t,C),t.intersect=function(k){return H.rect(t,k)},n}p(gu,"note");var tb=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function pu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await K(e,t,Z(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),l=n+o,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:g}=t;if(t.look==="handDrawn"){const u=Y.svg(s),m=U(t,{}),f=tb(0,0,l),y=u.path(f,m);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),g&&d.attr("style",g)}else d=we(s,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),j(t,d),t.calcIntersect=function(u,m){const f=u.width,y=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=H.polygon(u,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}p(pu,"question");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),g=-c/2,u=-d/2,m=u/2,f=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:y}=t,C=Y.svg(o),k=U(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const b=at(f),T=C.path(b,k),w=o.insert(()=>T,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),j(t,w),t.intersect=function(v){return H.polygon(t,f,v)},o}p(fu,"rect_left_inv_arrow");async function mu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await ve(o,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(Pt(ht())){const B=c.children[0],W=it(c);d=B.getBoundingClientRect(),W.attr("width",d.width),W.attr("height",d.height)}q.info("Text 2",l);const g=l||[],u=c.getBBox(),m=await ve(o,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),f=m.children[0],y=it(m);d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;it(m).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),it(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const k=d.width+(t.padding||0),b=d.height+(t.padding||0),T=-d.width/2-C,w=-d.height/2-C;let v,M;if(t.look==="handDrawn"){const B=Y.svg(a),W=U(t,{}),I=B.path(Ee(T,w,k,b,t.rx||0),W),$=B.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,W);M=a.insert(()=>(q.debug("Rough node insert CXC",I),$),":first-child"),v=a.insert(()=>(q.debug("Rough node insert CXC",I),I),":first-child")}else v=n.insert("rect",":first-child"),M=n.insert("line"),v.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)),M.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 j(t,v),t.intersect=function(B){return H.rect(t,B)},a}p(mu,"rectWithTitle");async function yu(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Lr(e,t,s)}p(yu,"roundedRect");var Oe=8;async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?Oe:Oe*2),c=((t==null?void 0:t.height)??o.height)+a*2,d=h-Oe,g=c,u=Oe-h/2,m=-c/2,{cssStyles:f}=t,y=Y.svg(n),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:u,y:m},{x:u+d,y:m},{x:u+d,y:m+g},{x:u-Oe,y:m+g},{x:u-Oe,y:m},{x:u,y:m},{x:u,y:m+g}],b=y.polygon(k.map(w=>[w.x,w.y]),C),T=n.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Bt(f)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${Oe/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),j(t,T),t.intersect=function(w){return H.rect(t,w)},n}p(Cu,"shadedProcess");async function xu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,g=c,u=d/1.5,m=-g/2,f=-u/2,{cssStyles:y}=t,C=Y.svg(o),k=U(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const b=[{x:m,y:f},{x:m,y:f+u},{x:m+g,y:f+u},{x:m+g,y:f-u/2}],T=at(b),w=C.path(T,k),v=o.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-g/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),j(t,v),t.intersect=function(M){return H.polygon(t,b,M)},o}p(xu,"slopedRect");async function ku(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Lr(e,t,a)}p(ku,"squareRect");async function bu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?a*2:a),d=h/2,{cssStyles:g}=t,u=Y.svg(o),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...ri(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...ri(c/2-d,0,d,50,270,450)],y=at(f),C=u.path(y,m),k=o.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),j(t,k),t.intersect=function(b){return H.polygon(t,f,b)},o}p(bu,"stadium");async function wu(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Lr(e,t,r)}p(wu,"state");function Su(e,t,{config:{themeVariables:r}}){var k,b;const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,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),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const u=d.circle(0,0,t.width,{...g,stroke:n,strokeWidth:2}),m=o??l,f=(t.width??0)*5/14,y=d.circle(0,0,f,{...g,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const T=((b=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:b.id)??"",w=T?`${T}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return j(t,C),t.intersect=function(T){return H.circle(t,(t.width??0)/2,T)},c}p(Su,"stateEnd");function Tu(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=Y.svg(a).circle(0,0,t.width,hx(i));n=a.insert(()=>c),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${c})`)}return j(t,n),t.intersect=function(h){return H.circle(t,(t.width??7)/2,h)},a}p(Tu,"stateStart");var Ke=8;async function vu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+2*Ke+a,c=((t==null?void 0:t.height)??l.height)+n,d=h-2*Ke,g=c,u=-h/2,m=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const y=Y.svg(o),C=U(t,{}),k=y.rectangle(u,m,d+16,g,C),b=y.line(u+Ke,m,u+Ke,m+g,C),T=y.line(u+Ke+d,m,u+Ke+d,m+g,C);o.insert(()=>b,":first-child"),o.insert(()=>T,":first-child");const w=o.insert(()=>k,":first-child"),{cssStyles:v}=t;w.attr("class","basic label-container").attr("style",Bt(v)),j(t,w)}else{const y=we(o,d,g,f);i&&y.attr("style",i),j(t,y)}return t.intersect=function(y){return H.polygon(t,f,y)},o}p(vu,"subroutine");var Ws=.2;async function Bu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Ws*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=Ws*h,d=Ws*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,m=h,f=-u/2,y=-m/2,{cssStyles:C}=t,k=Y.svg(o),b=U(t,{}),T=[{x:f-c/2,y},{x:f+u+c/2,y},{x:f+u+c/2,y:y+m},{x:f-c/2,y:y+m}],w=[{x:f+u-c/2,y:y+m},{x:f+u+c/2,y:y+m},{x:f+u+c/2,y:y+m-d}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const v=at(T),M=k.path(v,b),B=at(w),W=k.path(B,{...b,fillStyle:"solid"}),I=o.insert(()=>W,":first-child");return I.insert(()=>M,":first-child"),I.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),j(t,I),t.intersect=function($){return H.polygon(t,T,$)},o}p(Bu,"taggedRect");async function _u(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await K(e,t,Z(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*o,d=.2*l,g=l+h,{cssStyles:u}=t,m=Y.svg(s),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:g/2},...Ae(-o/2-o/2*.1,g/2,o/2+o/2*.1,g/2,h,.8),{x:o/2+o/2*.1,y:-g/2},{x:-o/2-o/2*.1,y:-g/2}],C=-o/2+o/2*.1,k=-g/2-d*.4,b=[{x:C+o-c,y:(k+l)*1.3},{x:C+o,y:k+l-d},{x:C+o,y:(k+l)*.9},...Ae(C+o,(k+l)*1.25,C+o-c,(k+l)*1.3,-l*.02,.5)],T=at(y),w=m.path(T,f),v=at(b),M=m.path(v,{...f,fillStyle:"solid"}),B=s.insert(()=>M,":first-child");return B.insert(()=>w,":first-child"),B.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),j(t,B),t.intersect=function(W){return H.polygon(t,y,W)},s}p(_u,"taggedWaveEdgedRectangle");async function Lu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await K(e,t,Z(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-o/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",o),j(t,c),t.intersect=function(d){return H.rect(t,d)},s}p(Lu,"text");var eb=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
230
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
231
|
+
l${r},0
|
|
232
|
+
a${s},${a} 0,0,1 0,${i}
|
|
233
|
+
M${r},${-i}
|
|
234
|
+
a${s},${a} 0,0,0 0,${i}
|
|
235
|
+
l${-r},0`,"createCylinderPathD"),rb=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ib=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),An=5,En=10;async function Fu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-a,t.height<An&&(t.height=An);const C=f/2/(2.5+f/50);t.width=(t.width??0)-a-C*3,t.width<En&&(t.width=En)}const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t.height?t.height:o.height)+a,c=h/2,d=c/(2.5+h/50),g=(t.width?t.width:o.width)+d+a,{cssStyles:u}=t;let m;if(t.look==="handDrawn"){const f=Y.svg(n),y=rb(0,0,g,h,d,c),C=ib(0,0,g,h,d,c),k=f.path(y,U(t,{})),b=f.path(C,U(t,{fill:"none"}));m=n.insert(()=>b,":first-child"),m=n.insert(()=>k,":first-child"),m.attr("class","basic label-container"),u&&m.attr("style",u)}else{const f=eb(0,0,g,h,d,c);m=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Bt(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(${-g/2}, ${h/2} )`),l.attr("transform",`translate(${-(o.width/2)-d-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),j(t,m),t.intersect=function(f){const y=H.rect(t,f),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let k=d*d*(1-C*C/(c*c));k!=0&&(k=Math.sqrt(Math.abs(k))),k=d-k,f.x-(t.x??0)>0&&(k=-k),y.x+=k}return y},n}p(Fu,"tiltedCylinder");async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=Y.svg(o),f=U(t,{}),y=at(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=we(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,j(t,g),t.intersect=function(m){return H.polygon(t,d,m)},o}p(Mu,"trapezoid");async function Au(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:u}=t,m=Y.svg(h),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-d/2*.8,y:-g/2},{x:d/2*.8,y:-g/2},{x:d/2,y:-g/2*.6},{x:d/2,y:g/2},{x:-d/2,y:g/2},{x:-d/2,y:-g/2*.6}],C=at(y),k=m.path(C,f),b=h.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),j(t,b),t.intersect=function(T){return H.polygon(t,y,T)},h}p(Au,"trapezoidalPentagon");var $n=10,In=10;async function Eu(e,t){var T;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<In&&(t.width=In),t.height=(t==null?void 0:t.height)??0,t.height<$n&&(t.height=$n));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=ke((T=ht().flowchart)==null?void 0:T.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,d=t!=null&&t.height?t==null?void 0:t.height:c+o.height,g=d,u=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-d}],{cssStyles:m}=t,f=Y.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=at(u),k=f.path(C,y),b=n.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=d,j(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${d/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return q.info("Triangle intersect",t,u,w),H.polygon(t,u,w)},n}p(Eu,"triangle");async function $u(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,u=t.look==="neo"?g/4:g/8,m=g+(o?u:-u),{cssStyles:f}=t,C=14-d,k=C>0?C/2:0,b=Y.svg(l),T=U(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const w=[{x:-d/2-k,y:m/2},...Ae(-d/2-k,m/2,d/2+k,m/2,u,.8),{x:d/2+k,y:-m/2},{x:-d/2-k,y:-m/2}],v=at(w),M=b.path(v,T),B=l.insert(()=>M,":first-child");return B.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-g/2+(t.padding??0)-u-(h.y-(h.top??0))})`),j(t,B),t.intersect=function(W){return H.polygon(t,w,W)},l}p($u,"waveEdgedRectangle");async function Iu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n,d=c/8,g=c+d*2,{cssStyles:u}=t,m=Y.svg(o),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:g/2},...Ae(-h/2,g/2,h/2,g/2,d,1),{x:h/2,y:-g/2},...Ae(h/2,-g/2,-h/2,-g/2,d,-1)],C=at(y),k=m.path(C,f),b=o.insert(()=>k,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),j(t,b),t.intersect=function(T){return H.polygon(t,y,T)},o}p(Iu,"waveRectangle");var yt=10;async function Ou(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-yt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-yt,10));const{shapeSvg:n,bbox:o,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+yt,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+yt,d=h-yt,g=c-yt,u=-d/2,m=-g/2,{cssStyles:f}=t,y=Y.svg(n),C=U(t,{}),k=[{x:u-yt,y:m-yt},{x:u-yt,y:m+g},{x:u+d,y:m+g},{x:u+d,y:m-yt}],b=`M${u-yt},${m-yt} L${u+d},${m-yt} L${u+d},${m+g} L${u-yt},${m+g} L${u-yt},${m-yt}
|
|
236
|
+
M${u-yt},${m} L${u+d},${m}
|
|
237
|
+
M${u},${m-yt} L${u},${m+g}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=y.path(b,C),w=n.insert(()=>T,":first-child");return w.attr("transform",`translate(${yt/2}, ${yt/2})`),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),l.attr("transform",`translate(${-(o.width/2)+yt/2-(o.x-(o.left??0))}, ${-(o.height/2)+yt/2-(o.y-(o.top??0))})`),j(t,w),t.intersect=function(v){return H.polygon(t,k,v)},n}p(Ou,"windowPane");var On=new Set(["redux-color","redux-dark-color"]),sb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function _o(e,t){var xt,$t,ee,re;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=mt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:G}=mt(),{background:rt}=G,pt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${rt}`]};await _o(e,pt)}const h=mt();t.useHtmlLabels=h.htmlLabels;let c=((xt=h.er)==null?void 0:xt.diagramPadding)??10,d=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:g}=t,{labelStyles:u,nodeStyles:m}=X(t);if(r.attributes.length===0&&t.label){const G={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};xe(t.label,h)+G.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const rt=await Lr(e,t,G);if(i!=null&&On.has(i)){const pt=r.colorIndex??0;rt.attr("data-color-id",`color-${pt%l.length}`)}if(!ke(h.htmlLabels)){const pt=rt.select("text"),Tt=(ee=pt.node())==null?void 0:ee.getBBox();pt.attr("transform",`translate(${-Tt.width/2}, 0)`)}return rt}h.htmlLabels||(c*=1.25,d*=1.25);let f=Z(t);f||(f="node default");const y=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await Je(y,t.label??"",h,0,0,["name"],u);C.height+=d;let k=0;const b=[],T=[];let w=0,v=0,M=0,B=0,W=!0,I=!0;for(const G of r.attributes){const rt=await Je(y,G.type,h,0,k,["attribute-type"],u);w=Math.max(w,rt.width+c);const pt=await Je(y,G.name,h,0,k,["attribute-name"],u);v=Math.max(v,pt.width+c);const Tt=await Je(y,G.keys.join(),h,0,k,["attribute-keys"],u);M=Math.max(M,Tt.width+c);const $e=await Je(y,G.comment,h,0,k,["attribute-comment"],u);B=Math.max(B,$e.width+c);const Se=Math.max(rt.height,pt.height,Tt.height,$e.height)+d;T.push({yOffset:k,rowHeight:Se}),k+=Se}let $=4;M<=c&&(W=!1,M=0,$--),B<=c&&(I=!1,B=0,$--);const N=y.node().getBBox();if(C.width+c*2-(w+v+M+B)>0){const G=C.width+c*2-(w+v+M+B);w+=G/$,v+=G/$,M>0&&(M+=G/$),B>0&&(B+=G/$)}const z=w+v+M+B,P=Y.svg(y),A=U(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let L=0;T.length>0&&(L=T.reduce((G,rt)=>G+((rt==null?void 0:rt.rowHeight)??0),0));const E=Math.max(N.width+c*2,(t==null?void 0:t.width)||0,z),F=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),S=-E/2,R=-F/2;if(y.selectAll("g:not(:first-child)").each((G,rt,pt)=>{const Tt=it(pt[rt]),$e=Tt.attr("transform");let Se=0,Eo=0;if($e){const Ms=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($e);Ms&&(Se=parseFloat(Ms[1]),Eo=parseFloat(Ms[2]),Tt.attr("class").includes("attribute-name")?Se+=w:Tt.attr("class").includes("attribute-keys")?Se+=w+v:Tt.attr("class").includes("attribute-comment")&&(Se+=w+v+M))}Tt.attr("transform",`translate(${S+c/2+Se}, ${Eo+R+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(R+d/2)+")"),i!=null&&On.has(i)){const G=r.colorIndex??0;y.attr("data-color-id",`color-${G%l.length}`)}const et=P.rectangle(S,R,E,F,A),st=y.insert(()=>et,":first-child").attr("class","outer-path").attr("style",g.join(""));b.push(0);for(const[G,rt]of T.entries()){const Tt=(G+1)%2===0&&rt.yOffset!==0,$e=P.rectangle(S,C.height+R+(rt==null?void 0:rt.yOffset),E,rt==null?void 0:rt.rowHeight,{...A,fill:Tt?a:n,stroke:o});y.insert(()=>$e,"g.label").attr("style",g.join("")).attr("class",`row-rect-${Tt?"even":"odd"}`)}const lt=1e-4;let nt=tr(S,C.height+R,E+S,C.height+R,lt),dt=P.polygon(nt.map(G=>[G.x,G.y]),A);if(y.insert(()=>dt).attr("class","divider"),nt=tr(w+S,C.height+R,w+S,F+R,lt),dt=P.polygon(nt.map(G=>[G.x,G.y]),A),y.insert(()=>dt).attr("class","divider"),W){const G=w+v+S;nt=tr(G,C.height+R,G,F+R,lt),dt=P.polygon(nt.map(rt=>[rt.x,rt.y]),A),y.insert(()=>dt).attr("class","divider")}if(I){const G=w+v+M+S;nt=tr(G,C.height+R,G,F+R,lt),dt=P.polygon(nt.map(rt=>[rt.x,rt.y]),A),y.insert(()=>dt).attr("class","divider")}for(const G of b){const rt=C.height+R+G;nt=tr(S,rt,E+S,rt,lt),dt=P.polygon(nt.map(pt=>[pt.x,pt.y]),A),y.insert(()=>dt).attr("class","divider")}if(j(t,st),m&&t.look!=="handDrawn")if(i!=null&&sb.has(i))y.selectAll("path").attr("style",m);else{const G=m.split(";"),rt=(re=G==null?void 0:G.filter(pt=>pt.includes("stroke")))==null?void 0:re.map(pt=>`${pt}`).join("; ");y.selectAll("path").attr("style",rt??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(G){return H.rect(t,G)},y}p(_o,"erBox");async function Je(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==zo(t)&&(t=zo(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await be(o,t,{width:xe(t,r)+100,style:n,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(ke(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=it(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}p(Je,"addText");function tr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(tr,"lineToPolygon");async function Du(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",Z(t)).attr("id",t.domId||t.id);let o=null,l=null,h=null,c=null,d=0,g=0,u=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Hr(o,{text:`«${k}»`},0),d=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Hr(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();g=m.height,h=n.insert("g").attr("class","members-group text");let f=0;for(const k of t.members){const b=await Hr(h,k,f,[k.parseClassifier()]);f+=b+a}u=h.node().getBBox().height,u<=0&&(u=s/2),c=n.insert("g").attr("class","methods-group text");let y=0;for(const k of t.methods){const b=await Hr(c,k,y,[k.parseClassifier()]);y+=b+a}let C=n.node().getBBox();if(o!==null){const k=o.node().getBBox();o.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${d+g+s*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${d+g+(u?u+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}p(Du,"textHelper");async function Hr(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=mt();let n="useHtmlLabels"in t?t.useHtmlLabels:ke(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),Zr(o)&&(n=!0);const l=await be(s,Na(Xe(o)),{width:xe(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,c=1;if(n){const d=l.children[0],g=it(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=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(y=>{function C(){var k;if(f.style.display="flex",f.style.flexDirection="column",m){const b=((k=a.fontSize)==null?void 0:k.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(b,10)*5+"px";f.style.minWidth=w,f.style.maxWidth=w}else f.style.width="100%";y(f)}p(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}else{i.includes("font-weight: bolder")&&it(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(Hr,"addText");async function Pu(e,t){var P,A;const r=ht(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,n=a,o=t.useHtmlLabels??ke(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Du(e,t,r,o,n),{labelStyles:d,nodeStyles:g}=X(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((P=l.styles)==null?void 0:P.join(";"))||g||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),f=Y.svg(h),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let k=Math.max(t.height??0,c.height);const b=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?k+=n:l.members.length>0&&l.methods.length===0&&(k+=n*2);const T=-C/2,w=-k/2;let v=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;b&&(v=a*2);const M=f.rectangle(T-a,w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,k+2*a+v,y),B=h.insert(()=>M,":first-child");B.attr("class","basic label-container outer-path");const W=B.node().getBBox(),I=h.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,$=h.select(".label-group").node().getBBox().height-(m?a/2:0)||0,N=h.select(".members-group").node().getBBox().height-(m?a/2:0)||0,z=(I+$+w+a-(w-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,E,F)=>{var nt,dt;const S=it(F[E]),R=S.attr("transform");let et=0;if(R){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);$t&&(et=parseFloat($t[2]))}let st=et+w+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(S.attr("class").includes("methods-group")){const xt=Math.max(N,n/2);b?st=Math.max(z,I+$+xt+w+n*2+a)+n*2:st=I+$+xt+w+n*4+a}l.members.length===0&&l.methods.length===0&&((nt=r.class)!=null&&nt.hideEmptyMembersBox)&&(l.annotations.length>0?st=et-n:st=et),o||(st-=4);let lt=T;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(lt=-((dt=S.node())==null?void 0:dt.getBBox().width)/2||0,h.selectAll("text").each(function(xt,$t,ee){window.getComputedStyle(ee[$t]).textAnchor==="middle"&&(lt=0)})),S.attr("transform",`translate(${lt}, ${st})`)}),l.members.length>0||l.methods.length>0||m){const L=I+$+w+a,E=f.line(W.x,L,W.x+W.width,L+.001,y);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(m||l.members.length>0||l.methods.length>0){const L=I+$+N+w+n*2+a,E=f.line(W.x,b?Math.max(z,L):L,W.x+W.width,(b?Math.max(z,L):L)+.001,y);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),B.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),!o){const L=RegExp(/color\s*:\s*([^;]*)/),E=L.exec(u);if(E){const F=E[0].replace("color","fill");h.selectAll("tspan").attr("style",F)}else if(d){const F=L.exec(d);if(F){const S=F[0].replace("color","fill");h.selectAll("tspan").attr("style",S)}}}return j(t,B),t.intersect=function(L){return H.rect(t,L)},h}p(Pu,"classBox");async function Ru(e,t){var W,I;const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,l="verifyMethod"in t,h=Z(t),{themeVariables:c}=ht(),{borderColorArray:d,requirementEdgeLabelBackground:g}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await ae(u,`<<${s.type}>>`,0,t.labelStyle):m=await ae(u,"<<Element>>",0,t.labelStyle);let f=m;const y=await ae(u,s.name,f,t.labelStyle+"; font-weight: bold;");if(f+=y+o,l){const $=await ae(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,f,t.labelStyle);f+=$;const N=await ae(u,`${s.text?`Text: ${s.text}`:""}`,f,t.labelStyle);f+=N;const z=await ae(u,`${s.risk?`Risk: ${s.risk}`:""}`,f,t.labelStyle);f+=z,await ae(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,f,t.labelStyle)}else{const $=await ae(u,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=$,await ae(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const C=(((W=u.node())==null?void 0:W.getBBox().width)??200)+n,k=(((I=u.node())==null?void 0:I.getBBox().height)??200)+n,b=-C/2,T=-k/2,w=Y.svg(u),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const M=w.rectangle(b,T,C,k,v),B=u.insert(()=>M,":first-child");if(B.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const $=t.colorIndex??0;u.attr("data-color-id",`color-${$%d.length}`)}if(u.selectAll(".label").each(($,N,z)=>{const P=it(z[N]),A=P.attr("transform");let L=0,E=0;if(A){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);et&&(L=parseFloat(et[1]),E=parseFloat(et[2]))}const F=E-k/2;let S=b+n/2;(N===0||N===1)&&(S=L),P.attr("transform",`translate(${S}, ${F+n})`)}),f>m+y+o){const $=T+m+y+o;let N;if(t.look==="neo"){const A=[[b,$],[b+C,$],[b+C,$+.001],[b,$+.001]];N=w.polygon(A,v)}else N=w.line(b,$,b+C,$,v);u.insert(()=>N).attr("class","divider")}return j(t,B),t.intersect=function($){return H.rect(t,$)},i&&t.look!=="handDrawn"&&(g||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}p(Ru,"requirementBox");async function ae(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=ht(),n=a.htmlLabels??!0,o=await be(s,Na(Xe(t)),{width:xe(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let l;if(n){const h=o.children[0],c=it(o);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=o.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=o.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ae,"addText");var ab=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function qu(e,t,{config:r}){var N,z;const{labelStyles:i,nodeStyles:s}=X(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await K(e,t,Z(t)),c=t.padding||10;let d="",g;"ticket"in t&&t.ticket&&((N=r==null?void 0:r.kanban)!=null&&N.ticketBaseUrl)&&(d=(z=r==null?void 0:r.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",t.ticket),g=o.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,f;g?{label:m,bbox:f}=await qs(g,"ticket"in t&&t.ticket||"",u):{label:m,bbox:f}=await qs(o,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await qs(o,"assigned"in t&&t.assigned||"",u);t.width=n;const k=10,b=(t==null?void 0:t.width)||0,T=Math.max(f.height,C.height)/2,w=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+T,v=-b/2,M=-w/2;h.attr("transform","translate("+(c-b/2)+", "+(-T-l.height/2)+")"),m.attr("transform","translate("+(c-b/2)+", "+(-T+l.height/2)+")"),y.attr("transform","translate("+(c+b/2-C.width-2*a)+", "+(-T+l.height/2)+")");let B;const{rx:W,ry:I}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const P=Y.svg(o),A=U(t,{}),L=W||I?P.path(Ee(v,M,b,w,W||0),A):P.rectangle(v,M,b,w,A);B=o.insert(()=>L,":first-child"),B.attr("class","basic label-container").attr("style",$||null)}else{B=o.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",I??5).attr("x",v).attr("y",M).attr("width",b).attr("height",w);const P="priority"in t&&t.priority;if(P){const A=o.append("line"),L=v+2,E=M+Math.floor((W??0)/2),F=M+w-Math.floor((W??0)/2);A.attr("x1",L).attr("y1",E).attr("x2",L).attr("y2",F).attr("stroke-width","4").attr("stroke",ab(P))}}return j(t,B),t.height=w,t.intersect=function(P){return H.rect(t,P)},o}p(qu,"kanbanItem");async function Wu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await K(e,t,Z(t)),l=a.width+10*n,h=a.height+8*n,c=.15*l,{cssStyles:d}=t,g=a.width+20,u=a.height+20,m=Math.max(l,g),f=Math.max(h,u);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const C=`M0 0
|
|
238
|
+
a${c},${c} 1 0,0 ${m*.25},${-1*f*.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},${f*.1}
|
|
242
|
+
|
|
243
|
+
a${c},${c} 1 0,0 ${m*.15},${f*.33}
|
|
244
|
+
a${c*.8},${c*.8} 1 0,0 0,${f*.34}
|
|
245
|
+
a${c},${c} 1 0,0 ${-1*m*.15},${f*.33}
|
|
246
|
+
|
|
247
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${f*.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*f*.15}
|
|
251
|
+
|
|
252
|
+
a${c},${c} 1 0,0 ${-1*m*.1},${-1*f*.33}
|
|
253
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
|
|
254
|
+
a${c},${c} 1 0,0 ${m*.1},${-1*f*.33}
|
|
255
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const k=Y.svg(s),b=U(t,{}),T=k.path(C,b);y=s.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",Bt(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-f/2})`),j(t,y),t.calcIntersect=function(k,b){return H.rect(k,b)},t.intersect=function(k){return q.info("Bang intersect",t,k),H.rect(t,k)},s}p(Wu,"bang");async function zu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await K(e,t,Z(t)),l=a.width+2*n,h=a.height+2*n,c=.15*l,d=.25*l,g=.35*l,u=.2*l,{cssStyles:m}=t;let f;const y=`M0 0
|
|
256
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
257
|
+
a${g},${g} 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${g},${g} 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(s),k=U(t,{}),b=C.path(y,k);f=s.insert(()=>b,":first-child"),f.attr("class","basic label-container").attr("style",Bt(m))}else f=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),j(t,f),t.calcIntersect=function(C,k){return H.rect(C,k)},t.intersect=function(C){return q.info("Cloud intersect",t,C),H.rect(t,C)},s}p(zu,"cloud");async function Nu(e,t){const{labelStyles:r,nodeStyles:i}=X(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await K(e,t,Z(t)),l=a.width+8*n,h=a.height+2*n,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 g=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),j(t,g),t.calcIntersect=function(u,m){return H.rect(u,m)},t.intersect=function(u){return H.rect(t,u)},s}p(Nu,"defaultMindmapNode");async function Hu(e,t){const r={padding:t.padding??0};return Bo(e,t,r)}p(Hu,"mindmapCircle");var ob=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ku},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:yu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:bu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:vu},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Hd},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Yd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Bo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Wu},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:zu},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:pu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Kd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:nu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ou},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Mu},{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:su},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Xd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Lu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Od},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Tu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Su},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Gd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Qd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:qd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Wd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:zd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:lu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:$u},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Zd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:hu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Nd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ud},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Eu},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ou},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:jd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Au},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Vd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:xu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:uu},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:du},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Id},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Rd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:_u},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Bu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Iu},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fu},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:cu}],nb=p(()=>{const t=[...Object.entries({state:wu,choice:Dd,note:gu,rectWithTitle:mu,labelRect:au,iconSquare:ru,iconCircle:tu,icon:Jd,iconRounded:eu,imageSquare:iu,anchor:Ed,kanbanItem:qu,mindmapCircle:Hu,defaultMindmapNode:Nu,classBox:Pu,erBox:_o,requirementBox:Ru}),...ob.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Yu=nb();function lb(e){return e in Yu}p(lb,"isValidShape");var Bs=new Map;async function Uu(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Yu[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Bt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Bs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Uu,"insertNode");var ES=p((e,t)=>{Bs.set(t.id,e)},"setNodeElem"),$S=p(()=>{Bs.clear()},"clear"),IS=p(e=>{const t=Bs.get(e.id);q.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"),hb=p((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&Dn(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&Dn(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),cb={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}},db=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Dn=p((e,t,r,i,s,a,n=!1,o)=>{var m;const l=cb[r],h=l&&db.includes(l.type);if(!l){q.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${s}_${a}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),y=`${u}_${f}`;if(!document.getElementById(y)){const C=document.getElementById(u);if(C){const k=C.cloneNode(!0);k.id=y,k.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),l.fill&&T.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),ub=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=ht())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),ds=new Map,Lt=new Map,OS=p(()=>{ds.clear(),Lt.clear()},"clear"),Dr=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),gb=p(async(e,t)=>{const r=ht();let i=Pt(r);const{labelStyles:s}=X(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await be(e,t.label,{style:Dr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),q.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],m=it(h);c=u.getBoundingClientRect(),d=c,m.attr("width",c.width),m.attr("height",c.height)}else{const u=it(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}n.attr("transform",Ar(d,i)),ds.set(t.id,a),t.width=c.width,t.height=c.height;let g;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(m,t.startLabelLeft,Dr(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=it(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Ar(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startLeft=u,Yr(g,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(m,t.startLabelRight,Dr(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=it(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Ar(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startRight=u,Yr(g,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(u,t.endLabelLeft,Dr(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=it(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Ar(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endLeft=u,Yr(g,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(u,t.endLabelRight,Dr(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=it(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Ar(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endRight=u,Yr(g,t.endLabelRight)}return h},"insertEdgeLabel");function Yr(e,t){Pt(ht())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Yr,"setTerminalWidth");var pb=p((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,ds.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ht(),{subGraphTitleTotalMargin:s}=go(i);if(e.label){const a=ds.get(e.id);let n=e.x,o=e.y;if(r){const l=Gt.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",n,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(n=l.x,o=l.y)}a.attr("transform",`translate(${n}, ${o+s/2})`)}if(e.startLabelLeft){const a=Lt.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=Lt.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=Lt.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=Lt.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),fb=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),mb=p((e,t,r)=>{q.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,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;o=c*d/h;const g={x:r.x<t.x?r.x+o:r.x-c+o,y:r.y<t.y?r.y+h-d:r.y-h+d};return o===0&&(g.x=t.x,g.y=t.y),c===0&&(g.x=t.x),h===0&&(g.y=t.y),q.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${o}`,g),g}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let d=h*o/c,g=r.x<t.x?r.x+c-o:r.x-c+o,u=r.y<t.y?r.y+d:r.y-d;return q.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${o}`,{_x:g,_y:u}),o===0&&(g=t.x,u=t.y),c===0&&(g=t.x),h===0&&(u=t.y),{x:g,y:u}}},"intersection"),Pn=p((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(q.info("abc88 checking point",a,t),!fb(t,a)&&!s){const n=mb(t,i,a);q.debug("abc88 inside",a,i,n),q.debug("abc88 intersection",n,t);let o=!1;r.forEach(l=>{o=o||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?q.warn("abc88 no intersect",n,r):r.push(n),s=!0}else q.warn("abc88 outside",a,i),i=a,s||r.push(a)}),q.debug("returning points",r),r},"cutPathAtIntersect");function Xu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Xu,"extractCornerPoints");var Rn=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),yb=p(function(e){const{cornerPointPositions:t}=Xu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=Rn(s,n,5),l=Rn(a,n,5),h=l.x-o.x,c=l.y-o.y;r.push(o);const d=Math.sqrt(2)*2;let g={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){q.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const u=5;n.x===o.x?g={x:h<0?o.x-u+d:o.x+u-d,y:c<0?o.y-d:o.y+d}:g={x:h<0?o.x-d:o.x+d,y:c<0?o.y-u+d:o.y+u-d}}else q.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(g,l)}else r.push(e[i]);return r},"fixCorners"),Cb=p((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),l=Array(o).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),xb=p(function(e,t,r,i,s,a,n,o=!1){var E;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=ht();let h=t.points,c=!1;const d=s;var g=a;const u=[];for(const F in t.cssCompiledStyles)Yc(F)||u.push(t.cssCompiledStyles[F]);q.debug("UIO intersect check",t.points,g.x,d.x),g.intersect&&d.intersect&&!o&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),q.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],g,g.intersect(h[h.length-1])),h.push(g.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=Pn(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Pn(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(F=>!Number.isNaN(F.y));const y=ub(t.curve);y!=="rounded"&&(f=yb(f));let C=Ti;switch(y){case"linear":C=Ti;break;case"basis":C=Ys;break;case"cardinal":C=Vl;break;case"bumpX":C=il;break;case"bumpY":C=rl;break;case"catmullRom":C=Zl;break;case"monotoneX":C=el;break;case"monotoneY":C=tl;break;case"natural":C=Jn;break;case"step":C=Qn;break;case"stepAfter":C=Kn;break;case"stepBefore":C=Zn;break;case"rounded":C=Ti;break;default:C=Ys}const{x:k,y:b}=P0(t),T=lp().x(k).y(b).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let v,M=y==="rounded"?ju(Vu(f,t),5):T(f);const B=Array.isArray(t.style)?t.style:[t.style];let W=B.find(F=>F==null?void 0:F.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let $=!1;if(t.look==="handDrawn"){const F=Y.svg(e);Object.assign([],f);const S=F.path(M,{roughness:.3,seed:l});w+=" transition",v=it(S).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",B?B.reduce((et,st)=>et+";"+st,""):"");let R=v.attr("d");v.attr("d",R),e.node().appendChild(v.node())}else{const F=u.join(";"),S=B?B.reduce((dt,xt)=>dt+xt+";",""):"",R=(F?F+";"+S+";":S)+";"+(B?B.reduce((dt,xt)=>dt+";"+xt,""):"");v=e.append("path").attr("d",M).attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",R),W=(E=R.match(/stroke:([^;]+)/))==null?void 0:E[1],$=t.animate===!0||!!t.animation||F.includes("animation");const et=v.node(),st=typeof et.getTotalLength=="function"?et.getTotalLength():0,lt=Jo[t.arrowTypeStart]||0,nt=Jo[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Cb(st,lt,nt):`0 ${lt} ${st-lt-nt} ${nt}`}; stroke-dashoffset: 0;`;v.attr("style",xt+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",m),v.attr("data-look",Bt(t.look)),t.showPoints&&f.forEach(F=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",F.x).attr("cy",F.y)});let N="";(ht().flowchart.arrowMarkerAbsolute||ht().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const z=!$&&(t==null?void 0:t.look)==="neo";hb(v,t,N,n,i,z,W);const P=Math.floor(h.length/2),A=h[P];Gt.isLabelCoordinateInPath(A,v.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function ju(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,c=n.y-o.y,d=l.x-n.x,g=l.y-n.y,u=Math.hypot(h,c),m=Math.hypot(d,g);if(u<s||m<s){r+=`L${n.x},${n.y}`;continue}const f=h/u,y=c/u,C=d/m,k=g/m,b=f*C+y*k,T=Math.max(-1,Math.min(1,b)),w=Math.acos(T);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${n.x},${n.y}`;continue}const v=Math.min(t/Math.sin(w/2),u/2,m/2),M=n.x-f*v,B=n.y-y*v,W=n.x+C*v,I=n.y+k*v;r+=`L${M},${B}`,r+=`Q${n.x},${n.y} ${W},${I}`}}return r}p(ju,"generateRoundedPath");function Fa(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Fa,"calculateDeltaAndAngle");function Vu(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Mt[t.arrowTypeStart]){const s=Mt[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=Fa(a,n),l=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Mt[t.arrowTypeEnd]){const s=Mt[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=Fa(n,a),l=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}p(Vu,"applyMarkerOffsetsToPoints");var kb=p((e,t,r,i)=>{t.forEach(s=>{Hb[s](e,r,i)})},"insertMarkers"),bb=p((e,t,r)=>{q.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),wb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Sb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Tb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),vb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Bb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),_b=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Lb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Fb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Mb=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Ab=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Eb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),$b=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Ib=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Ob=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Db=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Pb=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Rb=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),qb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
293
|
+
L20,10
|
|
294
|
+
M20,10
|
|
295
|
+
L0,20`)},"requirement_arrow"),Wb=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
296
|
+
L20,10
|
|
297
|
+
M20,10
|
|
298
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),zb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Nb=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Hb={extension:bb,composition:wb,aggregation:Sb,dependency:Tb,lollipop:vb,point:Bb,circle:_b,cross:Lb,barb:Fb,barbNeo:Mb,only_one:Ab,zero_or_one:Eb,one_or_more:$b,zero_or_more:Ib,only_one_neo:Ob,zero_or_one_neo:Db,one_or_more_neo:Pb,zero_or_more_neo:Rb,requirement_arrow:qb,requirement_contains:zb,requirement_arrow_neo:Wb,requirement_contains_neo:Nb},Yb=kb,Ub={common:oi,getConfig:mt,insertCluster:Nk,insertEdge:xb,insertEdgeLabel:gb,insertMarkers:Yb,insertNode:Uu,interpolateToCurve:oo,labelHelper:K,log:q,positionEdgeLabel:pb},ii={},Gu=p(e=>{for(const t of e)ii[t.name]=t},"registerLayoutLoaders"),Xb=p(()=>{Gu([{name:"dagre",loader:p(async()=>await ot(()=>import("./dagre-BM42HDAG-Cl88doFf.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:p(async()=>await ot(()=>import("./cose-bilkent-S5V4N54A-HnZrIUzr.js"),__vite__mapDeps([7,8,3,4,5,6])),"loader")}])},"registerDefaultLayoutLoaders");Xb();var DS=p(async(e,t)=>{if(!(e.layoutAlgorithm in ii))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=ii[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:o,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),n){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Ub,{algorithm:r.algorithm})},"render"),PS=p((e="",{fallback:t="dagre"}={})=>{if(e in ii)return e;if(t in ii)return q.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"),Lo="comm",Zu="rule",Ku="decl",jb="@media",Vb="@import",Gb="@supports",Zb="@namespace",Ma="@keyframes",Qu="@layer",Kb="@scope",Qb=Math.abs,Gr=String.fromCharCode;function Ju(e){return e.trim()}function Aa(e,t,r){return e.replace(t,r)}function ir(e,t){return e.charCodeAt(t)|0}function Tr(e,t,r){return e.slice(t,r)}function oe(e){return e.length}function tg(e){return e.length}function bi(e,t){return t.push(e),e}var _s=1,vr=1,eg=0,Xt=0,kt=0,Fr="";function Fo(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:_s,column:vr,length:n,return:"",siblings:o}}function Jb(){return kt}function t1(){return kt=Xt>0?ir(Fr,--Xt):0,vr--,kt===10&&(vr=1,_s--),kt}function Kt(){return kt=Xt<eg?ir(Fr,Xt++):0,vr++,kt===10&&(vr=1,_s++),kt}function Be(){return ir(Fr,Xt)}function Di(){return Xt}function Ls(e,t){return Tr(Fr,e,t)}function si(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function e1(e){return _s=vr=1,eg=oe(Fr=e),Xt=0,[]}function r1(e){return Fr="",e}function zs(e){return Ju(Ls(Xt-1,Ea(e===91?e+2:e===40?e+1:e)))}function i1(e){for(;(kt=Be())&&kt<33;)Kt();return si(e)>2||si(kt)>3?"":" "}function s1(e,t){for(;--t&&Kt()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Ls(e,Di()+(t<6&&Be()==32&&Kt()==32))}function Ea(e){for(;Kt();)switch(kt){case e:return Xt;case 34:case 39:e!==34&&e!==39&&Ea(kt);break;case 40:e===41&&Ea(e);break;case 92:Kt();break}return Xt}function a1(e,t){for(;Kt()&&e+kt!==57;)if(e+kt===84&&Be()===47)break;return"/*"+Ls(t,Xt-1)+"*"+Gr(e===47?e:Kt())}function o1(e){for(;!si(Be());)Kt();return Ls(e,Xt)}function n1(e){return r1(Pi("",null,null,null,[""],e=e1(e),0,[0],e))}function Pi(e,t,r,i,s,a,n,o,l){for(var h=0,c=0,d=n,g=0,u=0,m=0,f=1,y=1,C=1,k=0,b=0,T="",w=s,v=a,M=i,B=T;y;)switch(m=b,b=Kt()){case 40:m!=108&&ir(B,d-1)==58?(k++,B+="("):B+=zs(b);break;case 41:k--,B+=")";break;case 34:case 39:case 91:B+=zs(b);break;case 9:case 10:case 13:case 32:if(k>0){B+=Gr(b);break}B+=i1(m);break;case 92:B+=s1(Di()-1,7);continue;case 47:switch(Be()){case 42:case 47:bi(l1(a1(Kt(),Di()),t,r,l),l),(si(m||1)==5||si(Be()||1)==5)&&oe(B)&&Tr(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*f:o[h++]=oe(B)*C;case 125*f:case 59:case 0:if(k>0&&b){B+=Gr(b);break}switch(b){case 0:case 125:y=0;case 59+c:C==-1&&(B=Aa(B,/\f/g,"")),u>0&&(oe(B)-d||f===0)&&bi(u>32?Wn(B+";",i,r,d-1,l):Wn(Aa(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(bi(M=qn(B,t,r,h,c,s,o,T,w=[],v=[],d,a),a),b===123)if(c===0)Pi(B,t,M,M,w,a,d,o,v);else{switch(g){case 99:if(ir(B,3)===110)break;case 108:if(ir(B,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Pi(e,M,M,i&&bi(qn(e,M,M,0,0,s,o,T,s,w=[],d,v),v),s,v,d,o,i?w:v):Pi(B,M,M,M,[""],v,0,o,v)}}h=c=u=0,f=C=1,T=B="",d=n;break;case 58:d=1+oe(B),u=m;default:if(f<1){if(b==123)--f;else if(b==125&&f++==0&&t1()==125)continue}switch(B+=Gr(b),b*f){case 38:C=c>0?1:(B+="\f",-1);break;case 44:if(k>0)break;o[h++]=(oe(B)-1)*C,C=1;break;case 64:Be()===45&&(B+=zs(Kt())),g=Be(),c=d=oe(T=B+=o1(Di())),b++;break;case 45:m===45&&oe(B)==2&&(f=0)}}return a}function qn(e,t,r,i,s,a,n,o,l,h,c,d){for(var g=s-1,u=s===0?a:[""],m=tg(u),f=0,y=0,C=0;f<i;++f)for(var k=0,b=Tr(e,g+1,g=Qb(y=n[f])),T=e;k<m;++k)(T=Ju(y>0?u[k]+" "+b:Aa(b,/&\f/g,u[k])))&&(l[C++]=T);return Fo(e,t,r,s===0?Zu:o,l,h,c,d)}function l1(e,t,r,i){return Fo(e,t,r,Lo,Gr(Jb()),Tr(e,2,-2),0,i)}function Wn(e,t,r,i,s){return Fo(e,t,r,Ku,Tr(e,0,i),Tr(e,i+1,-1),i,s)}function $a(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function h1(e,t,r,i){switch(e.type){case Qu:if(e.children.length)break;case Vb:case Zb:case Ku:return e.return=e.return||e.value;case Lo:return"";case Ma:return e.return=e.value+"{"+$a(e.children,i)+"}";case Zu:if(!oe(e.value=e.props.join(",")))return""}return oe(r=$a(e.children,i))?e.return=e.value+"{"+r+"}":""}function c1(e){var t=tg(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var rg="c4",d1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),u1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-CfvQYM_q.js");return{diagram:t}},__vite__mapDeps([9,10,3,4,5,6]));return{id:rg,diagram:e}},"loader"),g1={id:rg,detector:d1,loader:u1},p1=g1,ig="flowchart",f1=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),m1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DgvKpDc5.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,5,15,3,4,6]));return{id:ig,diagram:e}},"loader"),y1={id:ig,detector:f1,loader:m1},C1=y1,sg="flowchart-v2",x1=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),k1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DgvKpDc5.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,5,15,3,4,6]));return{id:sg,diagram:e}},"loader"),b1={id:sg,detector:x1,loader:k1},w1=b1,ag="er",S1=p(e=>/^\s*erDiagram/.test(e),"detector"),T1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-hortthG_.js");return{diagram:t}},__vite__mapDeps([16,13,14,15,3,4,5,6]));return{id:ag,diagram:e}},"loader"),v1={id:ag,detector:S1,loader:T1},B1=v1,og="gitGraph",_1=p(e=>/^\s*gitGraph/.test(e),"detector"),L1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-RJLy0nV8.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,4,3,5,6]));return{id:og,diagram:e}},"loader"),F1={id:og,detector:_1,loader:L1},M1=F1,ng="gantt",A1=p(e=>/^\s*gantt/.test(e),"detector"),E1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DR5xWqhT.js");return{diagram:t}},__vite__mapDeps([21,3,22,23,6,24,25,4,5]));return{id:ng,diagram:e}},"loader"),$1={id:ng,detector:A1,loader:E1},I1=$1,lg="info",O1=p(e=>/^\s*info/.test(e),"detector"),D1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CdzF2MjL.js");return{diagram:t}},__vite__mapDeps([26,20,4,3,5,6]));return{id:lg,diagram:e}},"loader"),P1={id:lg,detector:O1,loader:D1},hg="pie",R1=p(e=>/^\s*pie/.test(e),"detector"),q1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-DkAjb9PV.js");return{diagram:t}},__vite__mapDeps([27,18,20,4,3,28,6,29,24,5]));return{id:hg,diagram:e}},"loader"),W1={id:hg,detector:R1,loader:q1},cg="quadrantChart",z1=p(e=>/^\s*quadrantChart/.test(e),"detector"),N1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DhA3Ltj3.js");return{diagram:t}},__vite__mapDeps([30,23,6,24,25,3,4,5]));return{id:cg,diagram:e}},"loader"),H1={id:cg,detector:z1,loader:N1},Y1=H1,dg="xychart",U1=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),X1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-BgFNWh3u.js");return{diagram:t}},__vite__mapDeps([31,32,24,29,23,6,25,3,4,5]));return{id:dg,diagram:e}},"loader"),j1={id:dg,detector:U1,loader:X1},V1=j1,ug="requirement",G1=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Z1=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-BwRKT1Ti.js");return{diagram:t}},__vite__mapDeps([33,13,14,3,4,5,6]));return{id:ug,diagram:e}},"loader"),K1={id:ug,detector:G1,loader:Z1},Q1=K1,gg="sequence",J1=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),t2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-IjZb9M7w.js");return{diagram:t}},__vite__mapDeps([34,10,19,3,4,5,6]));return{id:gg,diagram:e}},"loader"),e2={id:gg,detector:J1,loader:t2},r2=e2,pg="class",i2=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),s2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-CDbYhIhU.js");return{diagram:t}},__vite__mapDeps([35,36,12,10,13,14,5,3,4,6]));return{id:pg,diagram:e}},"loader"),a2={id:pg,detector:i2,loader:s2},o2=a2,fg="classDiagram",n2=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),l2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-CDbYhIhU.js");return{diagram:t}},__vite__mapDeps([37,36,12,10,13,14,5,3,4,6]));return{id:fg,diagram:e}},"loader"),h2={id:fg,detector:n2,loader:l2},c2=h2,mg="state",d2=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),u2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CbH0JxsR.js");return{diagram:t}},__vite__mapDeps([38,39,13,14,1,2,6,3,4,5]));return{id:mg,diagram:e}},"loader"),g2={id:mg,detector:d2,loader:u2},p2=g2,yg="stateDiagram",f2=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),m2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-CzKw24Ws.js");return{diagram:t}},__vite__mapDeps([40,39,13,14,3,4,5,6]));return{id:yg,diagram:e}},"loader"),y2={id:yg,detector:f2,loader:m2},C2=y2,Cg="journey",x2=p(e=>/^\s*journey/.test(e),"detector"),k2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-Bix7jj_6.js");return{diagram:t}},__vite__mapDeps([41,12,10,28,6,3,4,5]));return{id:Cg,diagram:e}},"loader"),b2={id:Cg,detector:x2,loader:k2},w2=b2,S2=p((e,t,r)=>{q.debug(`rendering svg for syntax error
|
|
299
|
+
`);const i=FC(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Sl(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),xg={draw:S2},T2=xg,v2={db:{},renderer:xg,parser:{parse:p(()=>{},"parse")}},B2=v2,kg="flowchart-elk",_2=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),L2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DgvKpDc5.js");return{diagram:t}},__vite__mapDeps([11,12,10,13,14,5,15,3,4,6]));return{id:kg,diagram:e}},"loader"),F2={id:kg,detector:_2,loader:L2},M2=F2,bg="timeline",A2=p(e=>/^\s*timeline/.test(e),"detector"),E2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-ZZ8vXqsw.js");return{diagram:t}},__vite__mapDeps([42,28,6,3,4,5]));return{id:bg,diagram:e}},"loader"),$2={id:bg,detector:A2,loader:E2},I2=$2,wg="mindmap",O2=p(e=>/^\s*mindmap/.test(e),"detector"),D2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-Dk78wf-k.js");return{diagram:t}},__vite__mapDeps([43,13,14,3,4,5,6]));return{id:wg,diagram:e}},"loader"),P2={id:wg,detector:O2,loader:D2},R2=P2,Sg="kanban",q2=p(e=>/^\s*kanban/.test(e),"detector"),W2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-CJP7JJpX.js");return{diagram:t}},__vite__mapDeps([44,12,3,4,5,6]));return{id:Sg,diagram:e}},"loader"),z2={id:Sg,detector:q2,loader:W2},N2=z2,Tg="sankey",H2=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Y2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-Cq7Z3xZr.js");return{diagram:t}},__vite__mapDeps([45,29,24,3,4,5,6]));return{id:Tg,diagram:e}},"loader"),U2={id:Tg,detector:H2,loader:Y2},X2=U2,vg="packet",j2=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),V2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-BxKOasa5.js");return{diagram:t}},__vite__mapDeps([46,18,20,4,3,5,6]));return{id:vg,diagram:e}},"loader"),G2={id:vg,detector:j2,loader:V2},Bg="radar",Z2=p(e=>/^\s*radar-beta/.test(e),"detector"),K2=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-2lPidS0l.js");return{diagram:t}},__vite__mapDeps([47,18,20,4,3,5,6]));return{id:Bg,diagram:e}},"loader"),Q2={id:Bg,detector:Z2,loader:K2},_g="block",J2=p(e=>/^\s*block(-beta)?/.test(e),"detector"),tw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-C_xOdSW3.js");return{diagram:t}},__vite__mapDeps([48,12,6,1,15,3,4,5]));return{id:_g,diagram:e}},"loader"),ew={id:_g,detector:J2,loader:tw},rw=ew,Lg="treeView",iw=p(e=>/^\s*treeView-beta/.test(e),"detector"),sw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-_tROgYB3.js");return{diagram:t}},__vite__mapDeps([49,18,19,20,4,3,5,6]));return{id:Lg,diagram:e}},"loader"),aw={id:Lg,detector:iw,loader:sw},ow=aw,Fg="architecture",nw=p(e=>/^\s*architecture/.test(e),"detector"),lw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-Bfi6eFLn.js");return{diagram:t}},__vite__mapDeps([50,18,20,4,3,8,5,6]));return{id:Fg,diagram:e}},"loader"),hw={id:Fg,detector:nw,loader:lw},cw=hw,Mg="eventmodeling",dw=p(e=>/^\s*eventmodeling/.test(e),"detector"),uw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-7mueA6fZ.js");return{diagram:t}},__vite__mapDeps([51,18,20,4,3,5,6]));return{id:Mg,diagram:e}},"loader"),gw={id:Mg,detector:dw,loader:uw},pw=gw,Ag="ishikawa",fw=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),mw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-8YrFferA.js");return{diagram:t}},__vite__mapDeps([52,3,4,5,6]));return{id:Ag,diagram:e}},"loader"),yw={id:Ag,detector:fw,loader:mw},Eg="venn",Cw=p(e=>/^\s*venn-beta/.test(e),"detector"),xw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-Dqi0_zje.js");return{diagram:t}},__vite__mapDeps([53,3,4,5,6]));return{id:Eg,diagram:e}},"loader"),kw={id:Eg,detector:Cw,loader:xw},bw=kw,$g="treemap",ww=p(e=>/^\s*treemap/.test(e),"detector"),Sw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-Bwf3i6eI.js");return{diagram:t}},__vite__mapDeps([54,14,18,20,4,3,25,29,24,5,6]));return{id:$g,diagram:e}},"loader"),Tw={id:$g,detector:ww,loader:Sw},Ig="wardley-beta",vw=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Bw=p(async()=>{const{diagram:e}=await ot(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-D7_vAxp3.js");return{diagram:t}},__vite__mapDeps([55,18,20,4,3,5,6]));return{id:Ig,diagram:e}},"loader"),_w={id:Ig,detector:vw,loader:Bw},Lw=_w,zn=!1,Fs=p(()=>{zn||(zn=!0,Yi("error",B2,e=>e.toLowerCase().trim()==="error"),Yi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Us(M2,R2,cw),Us(p1,N2,c2,o2,B1,I1,P1,W1,Q1,r2,w1,C1,I2,M1,C2,p2,w2,Y1,X2,G2,V1,rw,pw,ow,Q2,yw,Tw,bw,Lw))},"addDiagrams"),Fw=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ne).map(async([r,{detector:i,loader:s}])=>{if(s)try{Zs(r)}catch{try{const{diagram:a,id:n}=await s();Yi(n,a,i)}catch(a){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ne[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Mw="graphics-document document";function Og(e,t){e.attr("role",Mw),t!==""&&e.attr("aria-roledescription",t)}p(Og,"setA11yDiagramInfo");function Dg(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(Dg,"addSVGa11yTitleDescription");var ze,Ia=(ze=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=mt(),s=Pa(t,i);t=lx(t)+`
|
|
300
|
+
`;try{Zs(s)}catch{const d=wp(s);if(!d)throw new ll(`Diagram ${s} not found.`);const{id:g,diagram:u}=await d();Yi(g,u)}const{db:a,parser:n,renderer:o,init:l}=Zs(s);return n.parser&&(n.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await n.parse(t),new ze(s,t,a,n,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ze,"Diagram"),ze),Nn=[],Aw=p(()=>{Nn.forEach(e=>{e()}),Nn=[]},"attachFunctions"),Ew=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Pg(e){const t=e.match(nl);if(!t)return{text:e,metadata:{}};let r=D0(t[1],{schema:O0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Pg,"extractFrontMatter");var $w=p(e=>e.replace(/\r\n?/g,`
|
|
301
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Iw=p(e=>{const{text:t,metadata:r}=Pg(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Ow=p(e=>{const t=Gt.detectInit(e)??{},r=Gt.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:G0(e),directive:t}},"processDirectives");function Mo(e){const t=$w(e),r=Iw(t),i=Ow(r.text),s=uo(r.config,i.directive);return e=Ew(i.text),{code:e,title:r.title,config:s}}p(Mo,"preprocessDiagram");function Rg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Rg,"toBase64");var Dw=5e4,Pw="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Rw="sandbox",qw="loose",Ww="http://www.w3.org/2000/svg",zw="http://www.w3.org/1999/xlink",Nw="http://www.w3.org/1999/xhtml",Hw="100%",Yw="100%",Uw="border:0;margin:0;",Xw="margin:0",jw="allow-top-navigation-by-user-activation allow-popups",Vw='The "iframe" tag is not supported by your browser.',Gw=["foreignobject"],Zw=["dominant-baseline"];function Ao(e){const t=Mo(e);return Ni(),Gp(t.config??{}),t}p(Ao,"processAndSetConfigs");async function qg(e,t){Fs();try{const{code:r,config:i}=Ao(e);return{diagramType:(await zg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(qg,"parse");var Hn=p((e,t,r=[])=>{const i=gl(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),Kw=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=Pt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{rn(l.styles)||o.forEach(h=>{r.insertRule(Hn(l.id,h,l.styles),r.cssRules.length)}),rn(l.textStyles)||r.insertRule(Hn(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Gs(s)+`
|
|
302
|
+
`}else i+=`${e.themeCSS}
|
|
303
|
+
`;return i+Gs(r)},"createCssStyles"),Qw=p((e,t)=>$a(n1(`${e}{${t}}`),c1([p(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Ma)return;i.props=i.props.map(o=>o.startsWith(e)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[jb,Gb,Qu,Kb,"@container","@starting-style"],Ma].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Lo))},"addNamespace"),h1])),"compileCSS"),Jw=p((e,t,r,i)=>{const s=Kw(e,r),a=ff(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return Qw(i,a)},"createUserStyles"),tS=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Xe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),eS=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":Yw,i=Rg(`<body style="${Xw}">${e}</body>`);return`<iframe style="width:${Hw};height:${r};${Uw}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${jw}">
|
|
304
|
+
${Vw}
|
|
305
|
+
</iframe>`},"putIntoIFrame"),Yn=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Ww);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function Oa(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Oa,"sandboxedIframe");var rS=p((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),iS=p(async function(e,t,r){var N,z,P,A,L,E;Fs();const i=Ao(t);t=i.code;const s=mt();q.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Dw)&&(t=Pw);const a=`#${e}`,n="i"+e,o="#"+n,l="d"+e,h="#"+l,c=p(()=>{const S=it(g?o:h).node();S&&"remove"in S&&S.remove()},"removeTempElements");let d=it(document.body);const g=s.securityLevel===Rw,u=s.securityLevel===qw,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const F=Oa(it(r),n);d=it(F.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=it(r);Yn(d,e,l,`font-family: ${m}`,zw)}else{if(rS(document,e,l,n),g){const F=Oa(it(document.body),n);d=it(F.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=it("body");Yn(d,e,l)}let f,y;try{f=await Ia.fromText(t,{title:i.title})}catch(F){if(s.suppressErrorRendering)throw c(),F;f=await Ia.fromText("error"),y=F}const C=d.select(h).node(),k=f.type,b=C.firstChild,T=b.firstChild,w=(z=(N=f.renderer).getClasses)==null?void 0:z.call(N,t,f),v=Jw(s,k,w,a),M=document.createElement("style");M.innerHTML=v,b.insertBefore(M,T);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(F){throw s.suppressErrorRendering?c():T2.draw(t,e,"11.15.0"),F}const B=d.select(`${h} svg`),W=(A=(P=f.db).getAccTitle)==null?void 0:A.call(P),I=(E=(L=f.db).getAccDescription)==null?void 0:E.call(L);Ng(k,B,W,I),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Nw);let $=d.select(h).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),$=tS($,g,ke(s.arrowMarkerAbsolute)),g){const F=d.select(h+" svg").node();$=eS($,F)}else u||($=Cr.sanitize($,{ADD_TAGS:Gw,ADD_ATTR:Zw,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Aw(),y)throw y;return c(),{diagramType:k,svg:$,bindFunctions:f.db.bindFunctions}},"render");function Wg(e={}){var i;const t=wt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),jp(t),t!=null&&t.theme&&t.theme in me?t.themeVariables=me[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=me.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Xp(t):pl();Da(r.logLevel),Fs()}p(Wg,"initialize");var zg=p((e,t={})=>{const{code:r}=Mo(e);return Ia.fromText(r,t)},"getDiagramFromText");function Ng(e,t,r,i){Og(t,e),Dg(t,r,i,t.attr("id"))}p(Ng,"addA11yInfo");var Ve=Object.freeze({render:iS,parse:qg,getDiagramFromText:zg,initialize:Wg,getConfig:mt,setConfig:fl,getSiteConfig:pl,updateSiteConfig:Vp,reset:p(()=>{Ni()},"reset"),globalReset:p(()=>{Ni(xr)},"globalReset"),defaultConfig:xr});Da(mt().logLevel);Ni(mt());var sS=p((e,t,r)=>{q.warn(e),co(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Hg=p(async function(e={querySelector:".mermaid"}){try{await aS(e)}catch(t){if(co(t)&&q.error(t.str),Nt.parseError&&Nt.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),aS=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ve.getConfig();q.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");q.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(q.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ve.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Gt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(s)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=l.innerHTML,n=id(Gt.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Gt.detectInit(n);c&&q.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:g}=await jg(h,n,l);l.innerHTML=d,e&&await e(h),g&&g(l)}catch(d){sS(d,o,Nt.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Yg=p(function(e){Ve.initialize(e)},"initialize"),oS=p(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&Yg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Hg(i)},"init"),nS=p(async(e,{lazyLoad:t=!0}={})=>{Fs(),Us(...e),t===!1&&await Fw()},"registerExternalDiagrams"),Ug=p(function(){if(Nt.startOnLoad){const{startOnLoad:e}=Ve.getConfig();e&&Nt.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Ug,!1);var lS=p(function(e){Nt.parseError=e},"setParseErrorHandler"),us=[],Ns=!1,Xg=p(async()=>{if(!Ns){for(Ns=!0;us.length>0;){const e=us.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}Ns=!1}},"executeQueue"),hS=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,n)=>{Ve.parse(e,t).then(o=>{a(o),r(o)},o=>{var l;q.error("Error parsing",o),(l=Nt.parseError)==null||l.call(Nt,o),n(o),i(o)})}),"performCall");us.push(s),Xg().catch(i)}),"parse"),jg=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((n,o)=>{Ve.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;q.error("Error parsing",l),(h=Nt.parseError)==null||h.call(Nt,l),o(l),s(l)})}),"performCall");us.push(a),Xg().catch(s)}),"render"),cS=p(()=>Object.keys(Ne).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Nt={startOnLoad:!0,mermaidAPI:Ve,parse:hS,render:jg,init:oS,run:Hg,registerExternalDiagrams:nS,registerLayoutLoaders:Gu,initialize:Yg,parseError:void 0,contentLoaded:Ug,setParseErrorHandler:lS,detectType:Pa,registerIconPacks:fk,getRegisteredDiagramsMetadata:cS},Ri=Nt;/*! Check if previously processed *//*!
|
|
306
|
+
* Wait for document loaded before starting the execution
|
|
307
|
+
*/const Vg={light:{background:"#ffffff",primaryColor:"#e0e7ff",secondaryColor:"#ddd6fe",tertiaryColor:"#fce7f3",primaryTextColor:"#111827",secondaryTextColor:"#4b5563",primaryBorderColor:"#6366f1",lineColor:"#111827",pie1:"#3b82f6",pie2:"#8b5cf6",pie3:"#ec4899",pie4:"#f59e0b",pie5:"#10b981",pie6:"#06b6d4",pie7:"#6366f1",pie8:"#ef4444",pieStrokeColor:"#ffffff",pieStrokeWidth:"2px",pieTitleTextColor:"#111827",pieLegendTextColor:"#374151"},dark:{background:"#000000",primaryColor:"#3b82f6",secondaryColor:"#8b5cf6",tertiaryColor:"#6366f1",primaryTextColor:"#f1f5f9",secondaryTextColor:"#cbd5e1",primaryBorderColor:"#60a5fa",lineColor:"#f1f5f9",pie1:"#60a5fa",pie2:"#a78bfa",pie3:"#f472b6",pie4:"#fbbf24",pie5:"#34d399",pie6:"#22d3ee",pie7:"#818cf8",pie8:"#f87171",pieStrokeColor:"#000000",pieStrokeWidth:"2px",pieTitleTextColor:"#f1f5f9",pieLegendTextColor:"#e2e8f0"}};let Un=!1;const dS=()=>{if(!(typeof window>"u"||Un))try{Ri.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",themeVariables:Vg.light}),Un=!0}catch(e){console.warn("Failed to initialize Mermaid:",e)}},uS=e=>{let t="Failed to render Mermaid diagram";if(e instanceof Error){const r=e.message||"";if(r.includes("Syntax error")){const i=r.match(/line\s+(\d+)/i),s=r.match(/token\s+['"]([^'"]+)['"]/i),a=[];i&&a.push(`Line ${i[1]}`),s&&a.push(`Unexpected token: ${s[1]}`),t=`Syntax error${a.length?` (${a.join(", ")})`:""}`}else r&&(t=r.length>160?`${r.substring(0,157)}...`:r)}else typeof e=="string"&&(t=e);return t},ie=(e,t)=>{if(typeof window>"u"||!e)return;const r=window.getComputedStyle(e).getPropertyValue(t);if(!r)return;const i=r.trim();return i.length?i:void 0},gS=(e,t)=>{const r=Vg[e];if(typeof window>"u"||!t)return r;const i={background:e==="dark"?ie(t,"--md-chart-bg")??ie(t,"--md-bg-primary"):ie(t,"--md-bg-primary"),primaryColor:ie(t,"--md-bg-secondary"),secondaryColor:ie(t,"--md-bg-tertiary"),tertiaryColor:ie(t,"--md-bg-primary"),primaryTextColor:ie(t,"--md-text-primary"),secondaryTextColor:ie(t,"--md-text-secondary"),primaryBorderColor:ie(t,"--md-border-color"),lineColor:ie(t,"--md-text-primary")},s=Object.entries(i).filter(([,a])=>typeof a=="string"&&a.length);return s.length?{...r,...Object.fromEntries(s)}:r},Xn=e=>{if(!e)return null;const t=e.getAttribute("data-theme");return t==="dark"?"dark":t==="light"?"light":e.classList.contains("dark")?"dark":e.classList.contains("light")?"light":null},pS=({code:e})=>{const t=Yt.useRef(null),r=Yt.useRef(null),i=Yt.useRef(0),[s,a]=Yt.useState(null),[n,o]=Yt.useState(null),[l,h]=Yt.useState(null),[c,d]=Yt.useState(!1),[g,u]=Yt.useState("light"),m=Yt.useRef("light");Yt.useEffect(()=>{var W;if(typeof window>"u")return;const C=t.current;if(!C)return;const k=C.closest(".markdown-content")??C,b=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-color-scheme: dark)"),T=()=>{const I=!!(b!=null&&b.matches);return Xn(k)??Xn(document.documentElement)??(I?"dark":"light")},w=()=>{const I=T();I!==m.current&&(m.current=I,u(I))};w();const v=new MutationObserver(w);v.observe(k,{attributes:!0,attributeFilter:["class","data-theme"]});let M=null;k!==document.documentElement&&(M=new MutationObserver(w),M.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}));const B=()=>w();return b==null||b.addEventListener("change",B),()=>{v.disconnect(),M==null||M.disconnect(),b==null||b.removeEventListener("change",B)}},[]),Yt.useEffect(()=>{if(!e.trim()){o(null),a(null),h(null);return}return(async()=>{var b;const k=++i.current;try{dS();const T=`mermaid-${Math.random().toString(36).substring(2,11)}`;await Ri.parse(e);const w=((b=t.current)==null?void 0:b.closest(".markdown-content"))??t.current,v=gS(g,w);Ri.initialize({startOnLoad:!1,theme:g==="dark"?"dark":"default",securityLevel:"loose",themeVariables:v,flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",padding:15,nodeSpacing:50,rankSpacing:50},sequence:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:15,actorMargin:50,width:120,height:40,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:35,mirrorActors:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12,wrap:!0,wrapPadding:10},gantt:{useMaxWidth:!0,barHeight:24,barGap:4,topPadding:40,leftPadding:80,gridLineStartPadding:40,fontSize:12,sectionFontSize:13,numberSectionStyles:4},er:{useMaxWidth:!0,fontSize:12,entityPadding:15},pie:{useMaxWidth:!0,textPosition:.75},journey:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:20,leftMargin:100,width:120,height:50,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:30},gitGraph:{useMaxWidth:!0,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0}},class:{useMaxWidth:!0,padding:10},state:{useMaxWidth:!0,padding:8,dividerMargin:10},mindmap:{useMaxWidth:!0,padding:10},timeline:{useMaxWidth:!0,padding:10},quadrantChart:{useMaxWidth:!0},sankey:{useMaxWidth:!0}});const M=await Ri.render(T,e);if(i.current!==k)return;o(M.svg),h(()=>M.bindFunctions?M.bindFunctions:null),a(null)}catch(T){if(i.current!==k)return;a(uS(T)),o(null),h(null),d(!1)}})(),()=>{i.current+=1}},[e,g]),Yt.useEffect(()=>{if(!(!n||!l||!r.current))try{l(r.current)}catch(C){console.warn("Failed to bind Mermaid interactions:",C)}},[n,l]);const f=()=>vt.jsxs("div",{className:"graph-error",children:[vt.jsxs("div",{className:"graph-error-header",children:[vt.jsx("div",{className:"graph-error-icon",children:"⚠️"}),vt.jsxs("div",{className:"graph-error-content",children:[vt.jsx("div",{className:"graph-error-title",children:"Mermaid Diagram Error"}),vt.jsx("div",{className:"graph-error-message",children:s})]})]}),vt.jsxs("button",{className:"graph-error-toggle",onClick:()=>d(!c),type:"button",children:[c?"Hide":"Show"," Details"]}),c&&vt.jsxs("details",{className:"graph-error-details",open:!0,children:[vt.jsx("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:500},children:"Mermaid Code"}),vt.jsx("pre",{style:{marginTop:"8px",fontSize:"0.8em",opacity:.8,padding:"8px",background:"rgba(0, 0, 0, 0.05)",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},children:vt.jsx("code",{children:e})})]})]}),y=()=>s?f():n?vt.jsx("div",{ref:r,className:"mermaid-svg-container",style:{display:"flex",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",overflowX:"auto",overflowY:"visible"},dangerouslySetInnerHTML:{__html:n}}):vt.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"30px 20px",color:"var(--md-text-secondary, #6b7280)",minHeight:"120px"},children:[vt.jsx("svg",{style:{animation:"spin 1s linear infinite",marginBottom:"10px",width:"28px",height:"28px"},viewBox:"0 0 24 24",fill:"none",children:vt.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"32",strokeLinecap:"round"})}),vt.jsx("span",{style:{fontWeight:500,fontSize:"14px"},children:"Rendering diagram..."}),vt.jsx("style",{children:`
|
|
308
|
+
@keyframes spin {
|
|
309
|
+
from { transform: rotate(0deg); }
|
|
310
|
+
to { transform: rotate(360deg); }
|
|
311
|
+
}
|
|
312
|
+
`})]});return vt.jsx("div",{className:"graph-container mermaid-container",ref:t,style:{padding:"16px",minHeight:"100px"},children:y()})},RS=Object.freeze(Object.defineProperty({__proto__:null,MermaidRenderer:pS},Symbol.toStringTag,{value:"Module"}));export{Uu as $,_e as A,gp as B,mt as C,Tf as D,uo as E,ul as F,tx as G,FC as H,Lp as I,O0 as J,yk as K,Zr as L,wS as M,ks as N,sf as O,wl as P,zo as Q,J0 as R,ai as S,Jt as T,O as U,D as V,uf as W,Tl as X,Nk as Y,U0 as Z,p as _,Cf as a,IS as a0,tt as a1,ne as a2,ho as a3,Y as a4,P0 as a5,Pt as a6,be as a7,Ar as a8,go as a9,qc as aa,Xe as ab,Hc as ac,ol as ad,Yb as ae,$S as af,OS as ag,AS as ah,j as ai,ES as aj,xb as ak,pb as al,gb as am,bS as an,di as ao,fk as ap,pk as aq,up as ar,X as as,Yc as at,RS as au,yf as b,ht as c,it as d,Sl as e,wt as f,kf as g,xe as h,Qt as i,W0 as j,oi as k,q as l,zc as m,SS as n,PS as o,bf as p,wf as q,DS as r,xf as s,D0 as t,Gt as u,lb as v,ix as w,vS as x,mf as y,TS as z};
|