@markus-global/cli 0.8.4 → 0.8.5-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/commands/agent.js +9 -9
  2. package/dist/commands/agent.js.map +1 -1
  3. package/dist/commands/doctor.d.ts +3 -1
  4. package/dist/commands/doctor.d.ts.map +1 -1
  5. package/dist/commands/doctor.js +27 -1
  6. package/dist/commands/doctor.js.map +1 -1
  7. package/dist/commands/models.d.ts.map +1 -1
  8. package/dist/commands/models.js +6 -7
  9. package/dist/commands/models.js.map +1 -1
  10. package/dist/commands/project.d.ts +3 -0
  11. package/dist/commands/project.d.ts.map +1 -0
  12. package/dist/commands/project.js +25 -0
  13. package/dist/commands/project.js.map +1 -0
  14. package/dist/commands/requirement.d.ts +3 -0
  15. package/dist/commands/requirement.d.ts.map +1 -0
  16. package/dist/commands/requirement.js +34 -0
  17. package/dist/commands/requirement.js.map +1 -0
  18. package/dist/commands/start.d.ts.map +1 -1
  19. package/dist/commands/start.js +42 -1
  20. package/dist/commands/start.js.map +1 -1
  21. package/dist/commands/task.d.ts +3 -0
  22. package/dist/commands/task.d.ts.map +1 -0
  23. package/dist/commands/task.js +110 -0
  24. package/dist/commands/task.js.map +1 -0
  25. package/dist/index.js +8 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/markus.mjs +3770 -965
  28. package/dist/output.d.ts +3 -1
  29. package/dist/output.d.ts.map +1 -1
  30. package/dist/output.js +34 -3
  31. package/dist/output.js.map +1 -1
  32. package/dist/web-ui/assets/arc-azDa9rNQ.js +1 -0
  33. package/dist/web-ui/assets/architectureDiagram-3BPJPVTR-CWoGp8TB.js +36 -0
  34. package/dist/web-ui/assets/blockDiagram-GPEHLZMM-C2Tq3zqo.js +132 -0
  35. package/dist/web-ui/assets/c4Diagram-AAUBKEIU-C2tj98or.js +10 -0
  36. package/dist/web-ui/assets/channel-D0Q-P9rQ.js +1 -0
  37. package/dist/web-ui/assets/chunk-2J33WTMH-DMhlyS99.js +1 -0
  38. package/dist/web-ui/assets/chunk-4BX2VUAB-C8hL0QFv.js +1 -0
  39. package/dist/web-ui/assets/chunk-55IACEB6-BPCe4caz.js +1 -0
  40. package/dist/web-ui/assets/chunk-727SXJPM-C5EAjSrN.js +206 -0
  41. package/dist/web-ui/assets/chunk-AQP2D5EJ-BLSz7iPE.js +231 -0
  42. package/dist/web-ui/assets/chunk-FMBD7UC4-Sk4yLzwq.js +15 -0
  43. package/dist/web-ui/assets/chunk-ND2GUHAM-DbuQgWyn.js +1 -0
  44. package/dist/web-ui/assets/chunk-QZHKN3VN-REM6PaDE.js +1 -0
  45. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-BcOPwdcC.js +1 -0
  46. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-BcOPwdcC.js +1 -0
  47. package/dist/web-ui/assets/cose-bilkent-S5V4N54A-Chu2Y9EC.js +1 -0
  48. package/dist/web-ui/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
  49. package/dist/web-ui/assets/dagre-BM42HDAG-BGQGbUMF.js +4 -0
  50. package/dist/web-ui/assets/defaultLocale-DX6XiGOO.js +1 -0
  51. package/dist/web-ui/assets/diagram-2AECGRRQ-DnZ1SQGN.js +43 -0
  52. package/dist/web-ui/assets/diagram-5GNKFQAL-B0S37NyM.js +10 -0
  53. package/dist/web-ui/assets/diagram-KO2AKTUF-BxDwUDuY.js +3 -0
  54. package/dist/web-ui/assets/diagram-LMA3HP47-5UC8M7Iq.js +24 -0
  55. package/dist/web-ui/assets/diagram-OG6HWLK6-C-eMeMRG.js +24 -0
  56. package/dist/web-ui/assets/erDiagram-TEJ5UH35-CVWhzHKv.js +85 -0
  57. package/dist/web-ui/assets/flowDiagram-I6XJVG4X-CMG-a-kh.js +162 -0
  58. package/dist/web-ui/assets/ganttDiagram-6RSMTGT7-DbVJ6VGB.js +292 -0
  59. package/dist/web-ui/assets/gitGraphDiagram-PVQCEYII-DcCuYR-R.js +106 -0
  60. package/dist/web-ui/assets/graph--OzhPTMs.js +1 -0
  61. package/dist/web-ui/assets/index-PVrVcpcl.css +1 -0
  62. package/dist/web-ui/assets/index-zJq4U9RT.js +776 -0
  63. package/dist/web-ui/assets/infoDiagram-5YYISTIA-CaY7gJ4a.js +2 -0
  64. package/dist/web-ui/assets/init-Gi6I4Gst.js +1 -0
  65. package/dist/web-ui/assets/ishikawaDiagram-YF4QCWOH-l4_2NV1P.js +70 -0
  66. package/dist/web-ui/assets/journeyDiagram-JHISSGLW-BVeQNwa5.js +139 -0
  67. package/dist/web-ui/assets/kanban-definition-UN3LZRKU-CtvPOV3r.js +89 -0
  68. package/dist/web-ui/assets/layout-SsrduOYp.js +1 -0
  69. package/dist/web-ui/assets/linear-B0DfGdNc.js +1 -0
  70. package/dist/web-ui/assets/mermaid.core-Bz3avYM5.js +303 -0
  71. package/dist/web-ui/assets/mindmap-definition-RKZ34NQL-1X-u7gPH.js +96 -0
  72. package/dist/web-ui/assets/ordinal-Cboi1Yqb.js +1 -0
  73. package/dist/web-ui/assets/pieDiagram-4H26LBE5-BO8LpJ1H.js +30 -0
  74. package/dist/web-ui/assets/plantuml-DezRDxd4.js +357 -0
  75. package/dist/web-ui/assets/quadrantDiagram-W4KKPZXB-BBYmPM7O.js +7 -0
  76. package/dist/web-ui/assets/requirementDiagram-4Y6WPE33-CUU8gZny.js +84 -0
  77. package/dist/web-ui/assets/sankeyDiagram-5OEKKPKP-k6GjcALi.js +40 -0
  78. package/dist/web-ui/assets/sequenceDiagram-3UESZ5HK-CScOE6Nf.js +162 -0
  79. package/dist/web-ui/assets/stateDiagram-AJRCARHV-BcvHRBZl.js +1 -0
  80. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-p321ujvX.js +1 -0
  81. package/dist/web-ui/assets/timeline-definition-PNZ67QCA-D7tGfjR6.js +120 -0
  82. package/dist/web-ui/assets/vennDiagram-CIIHVFJN-AU7MqjmN.js +34 -0
  83. package/dist/web-ui/assets/viz-global-C_AyN6D9.js +9 -0
  84. package/dist/web-ui/assets/wardley-L42UT6IY-DKQmSXOS.js +161 -0
  85. package/dist/web-ui/assets/wardleyDiagram-YWT4CUSO-DVMv24j_.js +78 -0
  86. package/dist/web-ui/assets/xychartDiagram-2RQKCTM6-CGQCKCak.js +7 -0
  87. package/dist/web-ui/index.html +2 -2
  88. package/package.json +2 -1
  89. package/templates/roles/SHARED.md +113 -8
  90. package/templates/roles/ai-engineer/ROLE.md +35 -0
  91. package/templates/roles/ai-engineer/agent.json +1 -1
  92. package/templates/roles/architect/ROLE.md +15 -0
  93. package/templates/roles/architect/agent.json +1 -1
  94. package/templates/roles/content-writer/HEARTBEAT.md +29 -0
  95. package/templates/roles/content-writer/POLICIES.md +30 -0
  96. package/templates/roles/content-writer/ROLE.md +235 -19
  97. package/templates/roles/data-engineer/ROLE.md +29 -0
  98. package/templates/roles/data-engineer/agent.json +1 -1
  99. package/templates/roles/developer/HEARTBEAT.md +25 -7
  100. package/templates/roles/developer/POLICIES.md +24 -6
  101. package/templates/roles/developer/ROLE.md +335 -55
  102. package/templates/roles/devops/HEARTBEAT.md +30 -0
  103. package/templates/roles/devops/POLICIES.md +30 -0
  104. package/templates/roles/devops/ROLE.md +126 -20
  105. package/templates/roles/org-manager/ROLE.md +15 -0
  106. package/templates/roles/product-manager/POLICIES.md +29 -0
  107. package/templates/roles/product-manager/ROLE.md +126 -17
  108. package/templates/roles/project-manager/HEARTBEAT.md +30 -0
  109. package/templates/roles/project-manager/POLICIES.md +29 -0
  110. package/templates/roles/project-manager/ROLE.md +18 -0
  111. package/templates/roles/qa-engineer/HEARTBEAT.md +29 -0
  112. package/templates/roles/qa-engineer/POLICIES.md +29 -0
  113. package/templates/roles/qa-engineer/ROLE.md +133 -26
  114. package/templates/roles/research-assistant/HEARTBEAT.md +29 -0
  115. package/templates/roles/research-assistant/POLICIES.md +29 -0
  116. package/templates/roles/research-assistant/ROLE.md +310 -48
  117. package/templates/roles/reviewer/POLICIES.md +29 -0
  118. package/templates/roles/reviewer/ROLE.md +49 -0
  119. package/templates/roles/scrum-master/ROLE.md +6 -0
  120. package/templates/roles/skill-architect/HEARTBEAT.md +29 -0
  121. package/templates/roles/skill-architect/POLICIES.md +29 -0
  122. package/templates/roles/skill-architect/ROLE.md +267 -20
  123. package/templates/roles/sre/agent.json +1 -1
  124. package/templates/roles/tech-writer/HEARTBEAT.md +29 -0
  125. package/templates/roles/tech-writer/POLICIES.md +28 -0
  126. package/templates/roles/tech-writer/ROLE.md +258 -21
  127. package/templates/skills/claude-code/SKILL.md +239 -0
  128. package/templates/skills/claude-code/skill.json +17 -0
  129. package/templates/skills/codex/SKILL.md +217 -0
  130. package/templates/skills/codex/skill.json +17 -0
  131. package/templates/skills/coding-tools/SKILL.md +300 -0
  132. package/templates/skills/coding-tools/skill.json +17 -0
  133. package/templates/skills/cursor-agent/SKILL.md +262 -0
  134. package/templates/skills/cursor-agent/skill.json +17 -0
  135. package/templates/skills/feishu-interaction/SKILL.md +103 -0
  136. package/templates/skills/feishu-interaction/skill.json +26 -0
  137. package/templates/skills/self-evolution/SKILL.md +31 -0
  138. package/templates/teams/content-team/NORMS.md +17 -0
  139. package/templates/teams/dev-squad/NORMS.md +26 -0
  140. package/templates/teams/dev-squad/team.json +4 -4
  141. package/templates/teams/engineering-pod/NORMS.md +33 -0
  142. package/templates/teams/engineering-pod/team.json +4 -4
  143. package/templates/teams/research-lab/NORMS.md +15 -0
  144. package/templates/teams/startup-team/NORMS.md +17 -0
  145. package/templates/teams/startup-team/team.json +1 -1
  146. package/dist/web-ui/assets/index-CZL1VHgy.css +0 -1
  147. package/dist/web-ui/assets/index-DZjXJ0HZ.js +0 -724
@@ -0,0 +1,303 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-zJq4U9RT.js","assets/index-PVrVcpcl.css","assets/dagre-BM42HDAG-BGQGbUMF.js","assets/graph--OzhPTMs.js","assets/layout-SsrduOYp.js","assets/cose-bilkent-S5V4N54A-Chu2Y9EC.js","assets/cytoscape.esm-D3_iZ_3b.js","assets/c4Diagram-AAUBKEIU-C2tj98or.js","assets/chunk-ND2GUHAM-DbuQgWyn.js","assets/flowDiagram-I6XJVG4X-CMG-a-kh.js","assets/chunk-FMBD7UC4-Sk4yLzwq.js","assets/chunk-55IACEB6-BPCe4caz.js","assets/chunk-2J33WTMH-DMhlyS99.js","assets/channel-D0Q-P9rQ.js","assets/erDiagram-TEJ5UH35-CVWhzHKv.js","assets/gitGraphDiagram-PVQCEYII-DcCuYR-R.js","assets/chunk-4BX2VUAB-C8hL0QFv.js","assets/chunk-QZHKN3VN-REM6PaDE.js","assets/wardley-L42UT6IY-DKQmSXOS.js","assets/ganttDiagram-6RSMTGT7-DbVJ6VGB.js","assets/linear-B0DfGdNc.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-CaY7gJ4a.js","assets/pieDiagram-4H26LBE5-BO8LpJ1H.js","assets/arc-azDa9rNQ.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-BBYmPM7O.js","assets/xychartDiagram-2RQKCTM6-CGQCKCak.js","assets/requirementDiagram-4Y6WPE33-CUU8gZny.js","assets/sequenceDiagram-3UESZ5HK-CScOE6Nf.js","assets/classDiagram-4FO5ZUOK-BcOPwdcC.js","assets/chunk-727SXJPM-C5EAjSrN.js","assets/classDiagram-v2-Q7XG4LA2-BcOPwdcC.js","assets/stateDiagram-AJRCARHV-BcvHRBZl.js","assets/chunk-AQP2D5EJ-BLSz7iPE.js","assets/stateDiagram-v2-BHNVJYJU-p321ujvX.js","assets/journeyDiagram-JHISSGLW-BVeQNwa5.js","assets/timeline-definition-PNZ67QCA-D7tGfjR6.js","assets/mindmap-definition-RKZ34NQL-1X-u7gPH.js","assets/kanban-definition-UN3LZRKU-CtvPOV3r.js","assets/sankeyDiagram-5OEKKPKP-k6GjcALi.js","assets/diagram-LMA3HP47-5UC8M7Iq.js","assets/diagram-2AECGRRQ-DnZ1SQGN.js","assets/blockDiagram-GPEHLZMM-C2Tq3zqo.js","assets/diagram-5GNKFQAL-B0S37NyM.js","assets/architectureDiagram-3BPJPVTR-CWoGp8TB.js","assets/diagram-KO2AKTUF-BxDwUDuY.js","assets/ishikawaDiagram-YF4QCWOH-l4_2NV1P.js","assets/vennDiagram-CIIHVFJN-AU7MqjmN.js","assets/diagram-OG6HWLK6-C-eMeMRG.js","assets/wardleyDiagram-YWT4CUSO-DVMv24j_.js"])))=>i.map(i=>d[i]);
2
+ import{g as $f,_ as gt,s as lt}from"./index-zJq4U9RT.js";var co={exports:{}},Of=co.exports,el;function If(){return el||(el=1,(function(e,t){(function(r,i){e.exports=i()})(Of,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",p="quarter",u="year",f="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var A=["th","st","nd","rd"],L=D%100;return"["+D+(A[(L-20)%10]||A[L]||A[0])+"]"}},k=function(D,A,L){var O=String(D);return!O||O.length>=A?D:""+Array(A+1-O.length).join(L)+D},S={s:k,z:function(D){var A=-D.utcOffset(),L=Math.abs(A),O=Math.floor(L/60),P=L%60;return(A<=0?"+":"-")+k(O,2,"0")+":"+k(P,2,"0")},m:function D(A,L){if(A.date()<L.date())return-D(L,A);var O=12*(L.year()-A.year())+(L.month()-A.month()),P=A.clone().add(O,d),H=L-P<0,j=A.clone().add(O+(H?-1:1),d);return+(-(O+(L-P)/(H?P-j:j-P))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:u,w:h,d:c,D:f,h:l,m:n,s:a,ms:s,Q:p}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",_={};_[w]=b;var E="$isDayjsObject",v=function(D){return D instanceof W||!(!D||!D[E])},N=function D(A,L,O){var P;if(!A)return w;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(P=H),L&&(_[H]=L,P=H);var j=A.split("-");if(!P&&j.length>1)return D(j[0])}else{var J=A.name;_[J]=A,P=J}return!O&&P&&(w=P),P||!O&&w},I=function(D,A){if(v(D))return D.clone();var L=typeof A=="object"?A:{};return L.date=D,L.args=arguments,new W(L)},R=S;R.l=N,R.i=v,R.w=function(D,A){return I(D,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var W=(function(){function D(L){this.$L=N(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var A=D.prototype;return A.parse=function(L){this.$d=(function(O){var P=O.date,H=O.utc;if(P===null)return new Date(NaN);if(R.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var j=P.match(y);if(j){var J=j[2]-1||0,ft=(j[7]||"0").substring(0,3);return H?new Date(Date.UTC(j[1],J,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ft)):new Date(j[1],J,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ft)}}return new Date(P)})(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 R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(L,O){var P=I(L);return this.startOf(O)<=P&&P<=this.endOf(O)},A.isAfter=function(L,O){return I(L)<this.startOf(O)},A.isBefore=function(L,O){return this.endOf(O)<I(L)},A.$g=function(L,O,P){return R.u(L)?this[O]:this.set(P,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,O){var P=this,H=!!R.u(O)||O,j=R.p(L),J=function(Bt,wt){var nt=R.w(P.$u?Date.UTC(P.$y,wt,Bt):new Date(P.$y,wt,Bt),P);return H?nt:nt.endOf(c)},ft=function(Bt,wt){return R.w(P.toDate()[Bt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(wt)),P)},dt=this.$W,ut=this.$M,bt=this.$D,st="set"+(this.$u?"UTC":"");switch(j){case u:return H?J(1,0):J(31,11);case d:return H?J(1,ut):J(0,ut+1);case h:var ct=this.$locale().weekStart||0,Tt=(dt<ct?dt+7:dt)-ct;return J(H?bt-Tt:bt+(6-Tt),ut);case c:case f:return ft(st+"Hours",0);case l:return ft(st+"Minutes",1);case n:return ft(st+"Seconds",2);case a:return ft(st+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,O){var P,H=R.p(L),j="set"+(this.$u?"UTC":""),J=(P={},P[c]=j+"Date",P[f]=j+"Date",P[d]=j+"Month",P[u]=j+"FullYear",P[l]=j+"Hours",P[n]=j+"Minutes",P[a]=j+"Seconds",P[s]=j+"Milliseconds",P)[H],ft=H===c?this.$D+(O-this.$W):O;if(H===d||H===u){var dt=this.clone().set(f,1);dt.$d[J](ft),dt.init(),this.$d=dt.set(f,Math.min(this.$D,dt.daysInMonth())).$d}else J&&this.$d[J](ft);return this.init(),this},A.set=function(L,O){return this.clone().$set(L,O)},A.get=function(L){return this[R.p(L)]()},A.add=function(L,O){var P,H=this;L=Number(L);var j=R.p(O),J=function(ut){var bt=I(H);return R.w(bt.date(bt.date()+Math.round(ut*L)),H)};if(j===d)return this.set(d,this.$M+L);if(j===u)return this.set(u,this.$y+L);if(j===c)return J(1);if(j===h)return J(7);var ft=(P={},P[n]=i,P[l]=o,P[a]=r,P)[j]||1,dt=this.$d.getTime()+L*ft;return R.w(dt,this)},A.subtract=function(L,O){return this.add(-1*L,O)},A.format=function(L){var O=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var H=L||"YYYY-MM-DDTHH:mm:ssZ",j=R.z(this),J=this.$H,ft=this.$m,dt=this.$M,ut=P.weekdays,bt=P.months,st=P.meridiem,ct=function(wt,nt,he,St){return wt&&(wt[nt]||wt(O,H))||he[nt].slice(0,St)},Tt=function(wt){return R.s(J%12||12,wt,"0")},Bt=st||function(wt,nt,he){var St=wt<12?"AM":"PM";return he?St.toLowerCase():St};return H.replace(C,(function(wt,nt){return nt||(function(he){switch(he){case"YY":return String(O.$y).slice(-2);case"YYYY":return R.s(O.$y,4,"0");case"M":return dt+1;case"MM":return R.s(dt+1,2,"0");case"MMM":return ct(P.monthsShort,dt,bt,3);case"MMMM":return ct(bt,dt);case"D":return O.$D;case"DD":return R.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ct(P.weekdaysMin,O.$W,ut,2);case"ddd":return ct(P.weekdaysShort,O.$W,ut,3);case"dddd":return ut[O.$W];case"H":return String(J);case"HH":return R.s(J,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return Bt(J,ft,!0);case"A":return Bt(J,ft,!1);case"m":return String(ft);case"mm":return R.s(ft,2,"0");case"s":return String(O.$s);case"ss":return R.s(O.$s,2,"0");case"SSS":return R.s(O.$ms,3,"0");case"Z":return j}return null})(wt)||j.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(L,O,P){var H,j=this,J=R.p(O),ft=I(L),dt=(ft.utcOffset()-this.utcOffset())*i,ut=this-ft,bt=function(){return R.m(j,ft)};switch(J){case u:H=bt()/12;break;case d:H=bt();break;case p:H=bt()/3;break;case h:H=(ut-dt)/6048e5;break;case c:H=(ut-dt)/864e5;break;case l:H=ut/o;break;case n:H=ut/i;break;case a:H=ut/r;break;default:H=ut}return P?H:R.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(L,O){if(!L)return this.$L;var P=this.clone(),H=N(L,O,!0);return H&&(P.$L=H),P},A.clone=function(){return R.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()},D})(),z=W.prototype;return I.prototype=z,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",f]].forEach((function(D){z[D[1]]=function(A){return this.$g(A,D[0],D[1])}})),I.extend=function(D,A){return D.$i||(D(A,W,I),D.$i=!0),I},I.locale=N,I.isDayjs=v,I.unix=function(D){return I(1e3*D)},I.en=_[w],I.Ls=_,I.p={},I}))})(co)),co.exports}var Df=If();const Pf=$f(Df);var Th=Object.defineProperty,g=(e,t)=>Th(e,"name",{value:t,configurable:!0}),Rf=(e,t)=>{for(var r in t)Th(e,r,{get:t[r],enumerable:!0})},Ee={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Pa=g(function(e="fatal"){let t=Ee.fatal;typeof e=="string"?e.toLowerCase()in Ee&&(t=Ee[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=Ee.fatal&&(q.fatal=console.error?console.error.bind(console,ne("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ne("FATAL"))),t<=Ee.error&&(q.error=console.error?console.error.bind(console,ne("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ne("ERROR"))),t<=Ee.warn&&(q.warn=console.warn?console.warn.bind(console,ne("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ne("WARN"))),t<=Ee.info&&(q.info=console.info?console.info.bind(console,ne("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ne("INFO"))),t<=Ee.debug&&(q.debug=console.debug?console.debug.bind(console,ne("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("DEBUG"))),t<=Ee.trace&&(q.trace=console.debug?console.debug.bind(console,ne("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ne("TRACE")))},"setLogLevel"),ne=g(e=>`%c${Pf().format("ss.SSS")} : ${e} : `,"format");const uo={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 o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return uo.hue2rgb(s,o,e+1/3)*255;case"g":return uo.hue2rgb(s,o,e)*255;case"b":return uo.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},qf={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},Nf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:uo,lang:qf,unit:Nf},Ue={};for(let e=0;e<=255;e++)Ue[e]=at.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class zf{constructor(){this.type=jt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=jt.ALL}is(t){return this.type===t}}class Wf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new zf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Go=new Wf({r:0,g:0,b:0,a:0},"transparent"),Dr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Dr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return Go.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Ue[Math.round(t)]}${Ue[Math.round(r)]}${Ue[Math.round(i)]}${Ue[Math.round(o*255)]}`:`#${Ue[Math.round(t)]}${Ue[Math.round(r)]}${Ue[Math.round(i)]}`}},hr={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(hr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(hr.re);if(!r)return;const[,i,o,s,a,n]=r;return Go.set({h:hr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},vi={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=vi.colors[e];if(t)return Dr.parse(t)},stringify:e=>{const t=Dr.stringify(e);for(const r in vi.colors)if(vi.colors[r]===t)return r}},ki={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(ki.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return Go.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Be={format:{keyword:vi,hex:Dr,rgb:ki,rgba:ki,hsl:hr,hsla:hr},parse:e=>{if(typeof e!="string")return e;const t=Dr.parse(e)||ki.parse(e)||hr.parse(e)||vi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?hr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ki.stringify(e):Dr.stringify(e)},Sh=(e,t)=>{const r=Be.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Be.stringify(r)},Ve=(e,t,r=0,i=1)=>{if(typeof e!="number")return Sh(e,{a:t});const o=Go.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Be.stringify(o)},Hf=e=>{const{r:t,g:r,b:i}=Be.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},Yf=e=>Hf(e)>=.5,Ce=e=>!Yf(e),wh=(e,t,r)=>{const i=Be.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Be.stringify(i)},M=(e,t)=>wh(e,"l",t),$=(e,t)=>wh(e,"l",-t),x=(e,t)=>{const r=Be.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Sh(e,i)},Uf=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Be.parse(e),{r:n,g:l,b:c,a:h}=Be.parse(t),d=r/100,p=d*2-1,u=a-h,m=((p*u===-1?p:(p+u)/(1+p*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,S=a*d+h*(1-d);return Ve(C,b,k,S)},B=(e,t=100)=>{const r=Be.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Uf(r,e,t)};function rl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function jf(e){if(Array.isArray(e))return e}function Gf(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Xf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vf(e,t){return jf(e)||Gf(e,t)||Zf(e,t)||Xf()}function Zf(e,t){if(e){if(typeof e=="string")return rl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rl(e,t):void 0}}const _h=Object.entries,il=Object.setPrototypeOf,Kf=Object.isFrozen,Qf=Object.getPrototypeOf,Jf=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Ar=Object.create,Bh=typeof Reflect<"u"&&Reflect,Ys=Bh.apply,Us=Bh.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Ys||(Ys=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Us||(Us=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const ui=Ot(Array.prototype.forEach),tm=Ot(Array.prototype.lastIndexOf),ol=Ot(Array.prototype.pop),Br=Ot(Array.prototype.push),em=Ot(Array.prototype.splice),je=Array.isArray,Ti=Ot(String.prototype.toLowerCase),Bs=Ot(String.prototype.toString),sl=Ot(String.prototype.match),pi=Ot(String.prototype.replace),al=Ot(String.prototype.indexOf),rm=Ot(String.prototype.trim),im=Ot(Number.prototype.toString),om=Ot(Boolean.prototype.toString),nl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),ll=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),qt=Ot(Object.prototype.hasOwnProperty),gi=Ot(Object.prototype.toString),zt=Ot(RegExp.prototype.test),or=sm(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Ys(e,t,i)}}function sm(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Us(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(il&&il(e,null),!je(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(Kf(t)||(t[i]=s),o=s)}e[o]=!0}return e}function am(e){for(let t=0;t<e.length;t++)qt(e,t)||(e[t]=null);return e}function Qt(e){const t=Ar(null);for(const i of _h(e)){var r=Vf(i,2);const o=r[0],s=r[1];qt(e,o)&&(je(s)?t[o]=am(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Qt(s):t[o]=s)}return t}function nm(e){switch(typeof e){case"string":return e;case"number":return im(e);case"boolean":return om(e);case"bigint":return nl?nl(e):"0";case"symbol":return ll?ll(e):"Symbol()";case"undefined":return gi(e);case"function":case"object":{if(e===null)return gi(e);const t=e,r=Te(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:gi(i)}return gi(e)}default:return gi(e)}}function Te(e,t){for(;e!==null;){const i=Jf(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Qf(e)}function r(){return null}return r}function lm(e){try{return zt(e,""),!0}catch{return!1}}const hl=Yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),vs=Yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ls=Yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hm=Yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Fs=Yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cm=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cl=Yt(["#text"]),dl=Yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),As=Yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ul=Yt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),eo=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dm=Ut(/{{[\w\W]*|^[\w\W]*}}/g),um=Ut(/<%[\w\W]*|^[\w\W]*%>/g),pm=Ut(/\${[\w\W]*/g),gm=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),fm=Ut(/^aria-[\-\w]+$/),pl=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mm=Ut(/^(?:\w+script|data):/i),ym=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cm=Ut(/^html$/i),xm=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),gl=Ut(/<[/\w!]/g),bm=Ut(/<[/\w]/g),km=Ut(/<\/no(script|embed|frames)/i),Tm=Ut(/\/>/i),ke={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Sm=function(){return typeof window>"u"?null:window},wm=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ye=function(t,r,i,o){return qt(t,r)&&je(t[r])?mt(o.base?Qt(o.base):{},t[r],o.transform):i};function vh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sm();const t=U=>vh(U);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==ke.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,p=n.prototype,u=Te(p,"cloneNode"),f=Te(p,"remove"),m=Te(p,"nextSibling"),y=Te(p,"childNodes"),C=Te(p,"parentNode"),b=Te(p,"shadowRoot"),k=Te(p,"attributes"),S=a&&a.prototype?Te(a.prototype,"nodeType"):null,w=a&&a.prototype?Te(a.prototype,"nodeName"):null;if(typeof s=="function"){const U=r.createElement("template");U.content&&U.content.ownerDocument&&(r=U.content.ownerDocument)}let _,E="",v,N=!1,I=0;const R=function(){if(I>0)throw or('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},W=function(T){R(),I++;try{return _.createHTML(T)}finally{I--}},z=function(T){R(),I++;try{return _.createScriptURL(T)}finally{I--}},D=function(){return N||(v=wm(d,o),N=!0),v},A=r,L=A.implementation,O=A.createNodeIterator,P=A.createDocumentFragment,H=A.getElementsByTagName,j=i.importNode;let J=fl();t.isSupported=typeof _h=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const ft=dm,dt=um,ut=pm,bt=gm,st=fm,ct=mm,Tt=ym,Bt=xm;let wt=pl,nt=null;const he=mt({},[...hl,...vs,...Ls,...Fs,...cl]);let St=null;const br=mt({},[...dl,...As,...ul,...eo]);let Lt=Object.seal(Ar(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),li=null,$n=null;const ze=Object.seal(Ar(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let On=!0,hs=!0,In=!1,Dn=!0,We=!1,hi=!0,rr=!1,cs=!1,ds=null,us=null,ps=!1,kr=!1,Xi=!1,Vi=!1,Pn=!0,Rn=!1;const qn="user-content-";let gs=!0,fs=!1,Tr={},xe=null;const ms=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nn=null;const zn=mt({},["audio","video","img","source","image","track"]);let ys=null;const Wn=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zi="http://www.w3.org/1998/Math/MathML",Ki="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let Sr=be,Cs=!1,xs=null;const yf=mt({},[Zi,Ki,be],Bs),Hn=Yt(["mi","mo","mn","ms","mtext"]);let bs=mt({},Hn);const Yn=Yt(["annotation-xml"]);let ks=mt({},Yn);const Cf=mt({},["title","style","font","a","script"]);let ci=null;const xf=["application/xhtml+xml","text/html"],bf="text/html";let Ft=null,wr=null;const kf=r.createElement("form"),Un=function(T){return T instanceof RegExp||T instanceof Function},Ts=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wr&&wr===T)return;(!T||typeof T!="object")&&(T={}),T=Qt(T),ci=xf.indexOf(T.PARSER_MEDIA_TYPE)===-1?bf:T.PARSER_MEDIA_TYPE,Ft=ci==="application/xhtml+xml"?Bs:Ti,nt=Ye(T,"ALLOWED_TAGS",he,{transform:Ft}),St=Ye(T,"ALLOWED_ATTR",br,{transform:Ft}),xs=Ye(T,"ALLOWED_NAMESPACES",yf,{transform:Bs}),ys=Ye(T,"ADD_URI_SAFE_ATTR",Wn,{transform:Ft,base:Wn}),Nn=Ye(T,"ADD_DATA_URI_TAGS",zn,{transform:Ft,base:zn}),xe=Ye(T,"FORBID_CONTENTS",ms,{transform:Ft}),li=Ye(T,"FORBID_TAGS",Qt({}),{transform:Ft}),$n=Ye(T,"FORBID_ATTR",Qt({}),{transform:Ft}),Tr=qt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Qt(T.USE_PROFILES):T.USE_PROFILES:!1,On=T.ALLOW_ARIA_ATTR!==!1,hs=T.ALLOW_DATA_ATTR!==!1,In=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Dn=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,We=T.SAFE_FOR_TEMPLATES||!1,hi=T.SAFE_FOR_XML!==!1,rr=T.WHOLE_DOCUMENT||!1,kr=T.RETURN_DOM||!1,Xi=T.RETURN_DOM_FRAGMENT||!1,Vi=T.RETURN_TRUSTED_TYPE||!1,ps=T.FORCE_BODY||!1,Pn=T.SANITIZE_DOM!==!1,Rn=T.SANITIZE_NAMED_PROPS||!1,gs=T.KEEP_CONTENT!==!1,fs=T.IN_PLACE||!1,wt=lm(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:pl,Sr=typeof T.NAMESPACE=="string"?T.NAMESPACE:be,bs=qt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Hn),ks=qt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Qt(T.HTML_INTEGRATION_POINTS):mt({},Yn);const F=qt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Qt(T.CUSTOM_ELEMENT_HANDLING):Ar(null);if(Lt=Ar(null),qt(F,"tagNameCheck")&&Un(F.tagNameCheck)&&(Lt.tagNameCheck=F.tagNameCheck),qt(F,"attributeNameCheck")&&Un(F.attributeNameCheck)&&(Lt.attributeNameCheck=F.attributeNameCheck),qt(F,"allowCustomizedBuiltInElements")&&typeof F.allowCustomizedBuiltInElements=="boolean"&&(Lt.allowCustomizedBuiltInElements=F.allowCustomizedBuiltInElements),Ut(Lt),We&&(hs=!1),Xi&&(kr=!0),Tr&&(nt=mt({},cl),St=Ar(null),Tr.html===!0&&(mt(nt,hl),mt(St,dl)),Tr.svg===!0&&(mt(nt,vs),mt(St,As),mt(St,eo)),Tr.svgFilters===!0&&(mt(nt,Ls),mt(St,As),mt(St,eo)),Tr.mathMl===!0&&(mt(nt,Fs),mt(St,ul),mt(St,eo))),ze.tagCheck=null,ze.attributeCheck=null,qt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ze.tagCheck=T.ADD_TAGS:je(T.ADD_TAGS)&&(nt===he&&(nt=Qt(nt)),mt(nt,T.ADD_TAGS,Ft))),qt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ze.attributeCheck=T.ADD_ATTR:je(T.ADD_ATTR)&&(St===br&&(St=Qt(St)),mt(St,T.ADD_ATTR,Ft))),qt(T,"ADD_URI_SAFE_ATTR")&&je(T.ADD_URI_SAFE_ATTR)&&mt(ys,T.ADD_URI_SAFE_ATTR,Ft),qt(T,"FORBID_CONTENTS")&&je(T.FORBID_CONTENTS)&&(xe===ms&&(xe=Qt(xe)),mt(xe,T.FORBID_CONTENTS,Ft)),qt(T,"ADD_FORBID_CONTENTS")&&je(T.ADD_FORBID_CONTENTS)&&(xe===ms&&(xe=Qt(xe)),mt(xe,T.ADD_FORBID_CONTENTS,Ft)),gs&&(nt["#text"]=!0),rr&&mt(nt,["html","head","body"]),nt.table&&(mt(nt,["tbody"]),delete li.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Y=_;_=T.TRUSTED_TYPES_POLICY;try{E=W("")}catch(Q){throw _=Y,Q}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,E=""):(_===void 0&&(_=D()),_&&typeof E=="string"&&(E=W("")));Yt&&Yt(T),wr=T},jn=mt({},[...vs,...Ls,...hm]),Gn=mt({},[...Fs,...cm]),Tf=function(T,F,Y){return F.namespaceURI===be?T==="svg":F.namespaceURI===Zi?T==="svg"&&(Y==="annotation-xml"||bs[Y]):!!jn[T]},Sf=function(T,F,Y){return F.namespaceURI===be?T==="math":F.namespaceURI===Ki?T==="math"&&ks[Y]:!!Gn[T]},wf=function(T,F,Y){return F.namespaceURI===Ki&&!ks[Y]||F.namespaceURI===Zi&&!bs[Y]?!1:!Gn[T]&&(Cf[T]||!jn[T])},_f=function(T){let F=C(T);(!F||!F.tagName)&&(F={namespaceURI:Sr,tagName:"template"});const Y=Ti(T.tagName),Q=Ti(F.tagName);return xs[T.namespaceURI]?T.namespaceURI===Ki?Tf(Y,F,Q):T.namespaceURI===Zi?Sf(Y,F,Q):T.namespaceURI===be?wf(Y,F,Q):!!(ci==="application/xhtml+xml"&&xs[T.namespaceURI]):!1},He=function(T){Br(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(f(T),!C(T))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Xn=function(T){const F=y(T);if(F){const Q=[];ui(F,ht=>{Br(Q,ht)}),ui(Q,ht=>{try{f(ht)}catch{}})}const Y=k(T);if(Y)for(let Q=Y.length-1;Q>=0;--Q){const ht=Y[Q],yt=ht&&ht.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},ir=function(T,F){try{Br(t.removed,{attribute:F.getAttributeNode(T),from:F})}catch{Br(t.removed,{attribute:null,from:F})}if(F.removeAttribute(T),T==="is")if(kr||Xi)try{He(F)}catch{}else try{F.setAttribute(T,"")}catch{}},Bf=function(T){const F=k(T);if(F)for(let Y=F.length-1;Y>=0;--Y){const Q=F[Y],ht=Q&&Q.name;if(!(typeof ht!="string"||St[Ft(ht)]))try{T.removeAttribute(ht)}catch{}}},vf=function(T){const F=[T];for(;F.length>0;){const Y=F.pop();(S?S(Y):Y.nodeType)===ke.element&&Bf(Y);const ht=y(Y);if(ht)for(let yt=ht.length-1;yt>=0;--yt)F.push(ht[yt])}},Vn=function(T){let F=null,Y=null;if(ps)T="<remove></remove>"+T;else{const yt=sl(T,/^[\r\n\t ]+/);Y=yt&&yt[0]}ci==="application/xhtml+xml"&&Sr===be&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const Q=_?W(T):T;if(Sr===be)try{F=new h().parseFromString(Q,ci)}catch{}if(!F||!F.documentElement){F=L.createDocument(Sr,"template",null);try{F.documentElement.innerHTML=Cs?E:Q}catch{}}const ht=F.body||F.documentElement;return T&&Y&&ht.insertBefore(r.createTextNode(Y),ht.childNodes[0]||null),Sr===be?H.call(F,rr?"html":"body")[0]:rr?F.documentElement:ht},Zn=function(T){return O.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Qi=function(T){return T=pi(T,ft," "),T=pi(T,dt," "),T=pi(T,ut," "),T},Ss=function(T){var F;T.normalize();const Y=O.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Q=Y.nextNode();for(;Q;)Q.data=Qi(Q.data),Q=Y.nextNode();const ht=(F=T.querySelectorAll)===null||F===void 0?void 0:F.call(T,"template");ht&&ui(ht,yt=>{_r(yt.content)&&Ss(yt.content)})},Ji=function(T){const F=w?w(T):null;return typeof F!="string"||Ft(F)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==y(T)},_r=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===ke.documentFragment}catch{return!1}},di=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function Ae(U,T,F){U.length!==0&&ui(U,Y=>{Y.call(t,T,F,wr)})}const Lf=function(T,F){return!!(hi&&T.hasChildNodes()&&!di(T.firstElementChild)&&zt(gl,T.textContent)&&zt(gl,T.innerHTML)||hi&&T.namespaceURI===be&&F==="style"&&di(T.firstElementChild)||T.nodeType===ke.processingInstruction||hi&&T.nodeType===ke.comment&&zt(bm,T.data))},Ff=function(T,F){if(!li[F]&&Jn(F)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,F)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(F)))return!1;if(gs&&!xe[F]){const Y=C(T),Q=y(T);if(Q&&Y){const ht=Q.length;for(let yt=ht-1;yt>=0;--yt){const Rt=fs?Q[yt]:u(Q[yt],!0);Y.insertBefore(Rt,m(T))}}}return He(T),!0},Kn=function(T){if(Ae(J.beforeSanitizeElements,T,null),Ji(T))return He(T),!0;const F=Ft(w?w(T):T.nodeName);if(Ae(J.uponSanitizeElement,T,{tagName:F,allowedTags:nt}),Lf(T,F))return He(T),!0;if(li[F]||!(ze.tagCheck instanceof Function&&ze.tagCheck(F))&&!nt[F])return Ff(T,F);if((S?S(T):T.nodeType)===ke.element&&!_f(T)||(F==="noscript"||F==="noembed"||F==="noframes")&&zt(km,T.innerHTML))return He(T),!0;if(We&&T.nodeType===ke.text){const Q=Qi(T.textContent);T.textContent!==Q&&(Br(t.removed,{element:T.cloneNode()}),T.textContent=Q)}return Ae(J.afterSanitizeElements,T,null),!1},Qn=function(T,F,Y){if($n[F]||Pn&&(F==="id"||F==="name")&&(Y in r||Y in kf))return!1;const Q=St[F]||ze.attributeCheck instanceof Function&&ze.attributeCheck(F,T);if(!(hs&&zt(bt,F))){if(!(On&&zt(st,F))){if(Q){if(!ys[F]){if(!zt(wt,pi(Y,Tt,""))){if(!((F==="src"||F==="xlink:href"||F==="href")&&T!=="script"&&al(Y,"data:")===0&&Nn[T])){if(!(In&&!zt(ct,pi(Y,Tt,"")))){if(Y)return!1}}}}}else if(!(Jn(T)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,T)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(T))&&(Lt.attributeNameCheck instanceof RegExp&&zt(Lt.attributeNameCheck,F)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(F,T))||F==="is"&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,Y)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(Y))))return!1}}return!0},Af=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jn=function(T){return!Af[Ti(T)]&&zt(Bt,T)},Ef=function(T,F,Y,Q){if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Y)switch(d.getAttributeType(T,F)){case"TrustedHTML":return W(Q);case"TrustedScriptURL":return z(Q)}return Q},Mf=function(T,F,Y,Q){try{Y?T.setAttributeNS(Y,F,Q):T.setAttribute(F,Q),Ji(T)?He(T):ol(t.removed)}catch{ir(F,T)}},tl=function(T){Ae(J.beforeSanitizeAttributes,T,null);const F=T.attributes;if(!F||Ji(T))return;const Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:St,forceKeepAttr:void 0};let Q=F.length;const ht=Ft(T.nodeName);for(;Q--;){const yt=F[Q],Rt=yt.name,Mt=yt.namespaceURI,ae=yt.value,ce=Ft(Rt),_s=ae;let Zt=Rt==="value"?_s:rm(_s);if(Y.attrName=ce,Y.attrValue=Zt,Y.keepAttr=!0,Y.forceKeepAttr=void 0,Ae(J.uponSanitizeAttribute,T,Y),Zt=Y.attrValue,Rn&&(ce==="id"||ce==="name")&&al(Zt,qn)!==0&&(ir(Rt,T),Zt=qn+Zt),hi&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){ir(Rt,T);continue}if(ce==="attributename"&&sl(Zt,"href")){ir(Rt,T);continue}if(!Y.forceKeepAttr){if(!Y.keepAttr){ir(Rt,T);continue}if(!Dn&&zt(Tm,Zt)){ir(Rt,T);continue}if(We&&(Zt=Qi(Zt)),!Qn(ht,ce,Zt)){ir(Rt,T);continue}Zt=Ef(ht,ce,Mt,Zt),Zt!==_s&&Mf(T,Rt,Mt,Zt)}}Ae(J.afterSanitizeAttributes,T,null)},to=function(T){let F=null;const Y=Zn(T);for(Ae(J.beforeSanitizeShadowDOM,T,null);F=Y.nextNode();)if(Ae(J.uponSanitizeShadowNode,F,null),Kn(F),tl(F),_r(F.content)&&to(F.content),(S?S(F):F.nodeType)===ke.element){const ht=b(F);_r(ht)&&(ws(ht),to(ht))}Ae(J.afterSanitizeShadowDOM,T,null)},ws=function(T){const F=[{node:T,shadow:null}];for(;F.length>0;){const Y=F.pop();if(Y.shadow){to(Y.shadow);continue}const Q=Y.node,yt=(S?S(Q):Q.nodeType)===ke.element,Rt=y(Q);if(Rt)for(let Mt=Rt.length-1;Mt>=0;--Mt)F.push({node:Rt[Mt],shadow:null});if(yt){const Mt=w?w(Q):null;if(typeof Mt=="string"&&Ft(Mt)==="template"){const ae=Q.content;_r(ae)&&F.push({node:ae,shadow:null})}}if(yt){const Mt=b(Q);_r(Mt)&&F.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}};return t.sanitize=function(U){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,Y=null,Q=null,ht=null;if(Cs=!U,Cs&&(U="<!-->"),typeof U!="string"&&!di(U)&&(U=nm(U),typeof U!="string"))throw or("dirty is not a string, aborting");if(!t.isSupported)return U;cs?(nt=ds,St=us):Ts(T),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(nt=Qt(nt)),J.uponSanitizeAttribute.length>0&&(St=Qt(St)),t.removed=[];const yt=fs&&typeof U!="string"&&di(U);if(yt){const ae=w?w(U):U.nodeName;if(typeof ae=="string"){const ce=Ft(ae);if(!nt[ce]||li[ce])throw or("root node is forbidden and cannot be sanitized in-place")}if(Ji(U))throw or("root node is clobbered and cannot be sanitized in-place");try{ws(U)}catch(ce){throw Xn(U),ce}}else if(di(U))F=Vn("<!---->"),Y=F.ownerDocument.importNode(U,!0),Y.nodeType===ke.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?F=Y:F.appendChild(Y),ws(Y);else{if(!kr&&!We&&!rr&&U.indexOf("<")===-1)return _&&Vi?W(U):U;if(F=Vn(U),!F)return kr?null:Vi?E:""}F&&ps&&He(F.firstChild);const Rt=Zn(yt?U:F);try{for(;Q=Rt.nextNode();)Kn(Q),tl(Q),_r(Q.content)&&to(Q.content)}catch(ae){throw yt&&Xn(U),ae}if(yt)return ui(t.removed,ae=>{ae.element&&vf(ae.element)}),We&&Ss(U),U;if(kr){if(We&&Ss(F),Xi)for(ht=P.call(F.ownerDocument);F.firstChild;)ht.appendChild(F.firstChild);else ht=F;return(St.shadowroot||St.shadowrootmode)&&(ht=j.call(i,ht,!0)),ht}let Mt=rr?F.outerHTML:F.innerHTML;return rr&&nt["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&zt(Cm,F.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
4
+ `+Mt),We&&(Mt=Qi(Mt)),_&&Vi?W(Mt):Mt},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ts(U),cs=!0,ds=nt,us=St},t.clearConfig=function(){wr=null,cs=!1,ds=null,us=null,_=v,E=""},t.isValidAttribute=function(U,T,F){wr||Ts({});const Y=Ft(U),Q=Ft(T);return Qn(Y,Q,F)},t.addHook=function(U,T){typeof T=="function"&&qt(J,U)&&Br(J[U],T)},t.removeHook=function(U,T){if(qt(J,U)){if(T!==void 0){const F=tm(J[U],T);return F===-1?void 0:em(J[U],F,1)[0]}return ol(J[U])}},t.removeHooks=function(U){qt(J,U)&&(J[U]=[])},t.removeAllHooks=function(){J=fl()},t}var Qr=vh(),Lh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Li=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_m=/\s*%%.*\n/gm,Rr,Fh=(Rr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(Rr,"UnknownDiagramError"),Rr),pr={},Ra=g(function(e,t){e=e.replace(Lh,"").replace(Li,"").replace(_m,`
5
+ `);for(const[r,{detector:i}]of Object.entries(pr))if(i(e,t))return r;throw new Fh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),js=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ah(t,r,i)},"registerLazyLoadedDiagrams"),Ah=g((e,t,r)=>{pr[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),pr[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Bm=g(e=>pr[e].loader,"getDiagramLoader"),Gs=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Gs(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Gs(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=Gs,Le="#ffffff",Fe="#f2f2f2",ot=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),qr,vm=(qr=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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,10)):(this.rowOdd=this.rowOdd||M(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||M(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]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(qr,"Theme"),qr),Lm=g(e=>{const t=new vm;return t.calculate(e),t},"getThemeVariables"),Nr,Fm=(Nr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ve(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=$("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=$(this.sectionBkgColor,10),this.taskBorderColor=Ve(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ve(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||M(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(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(){this.secondBkg=M(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=M(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=M(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=B(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||M(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??M(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=M(this.secondaryColor,20),this.git1=M(this.pie2||this.secondaryColor,20),this.git2=M(this.pie3||this.tertiaryColor,20),this.git3=M(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=M(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=M(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=M(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=M(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||M("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||M("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||M("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||M("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||M(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||M(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||M(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||M(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Nr,"Theme"),Nr),Am=g(e=>{const t=new Fm;return t.calculate(e),t},"getThemeVariables"),zr,Em=(zr=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=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(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=Ve(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(){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||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=$(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||$(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||x(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||B(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||B(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||M(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||M(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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||$(B(this.git0),25),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(zr,"Theme"),zr),Mm=g(e=>{const t=new Em;return t.calculate(e),t},"getThemeVariables"),Wr,$m=(Wr=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=M("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(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(){this.actorBorder=$(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||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=$(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||$(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||x(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||M(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||M(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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Wr,"Theme"),Wr),Om=g(e=>{const t=new $m;return t.calculate(e),t},"getThemeVariables"),Hr,Im=(Hr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=M(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(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||M(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(){this.secondBkg=M(this.contrast,55),this.border2=this.contrast,this.actorBorder=M(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||M(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||$(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=M(this.contrast,30),this.sectionBkgColor2=M(this.contrast,30),this.taskBorderColor=$(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=M(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=$(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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=$(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||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(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||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Hr,"Theme"),Hr),Dm=g(e=>{const t=new Im;return t.calculate(e),t},"getThemeVariables"),Yr,Pm=(Yr=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=ot(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||B(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Yr,"Theme"),Yr),Rm=g(e=>{const t=new Pm;return t.calculate(e),t},"getThemeVariables"),Ur,qm=(Ur=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(B("#323D47"),10),this.border1="#ccc",this.border2=Ve(255,255,255,.25),this.arrowheadColor=B(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(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.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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ur,"Theme"),Ur),Nm=g(e=>{const t=new qm;return t.calculate(e),t},"getThemeVariables"),jr,zm=(jr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=$(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||B(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(jr,"Theme"),jr),Wm=g(e=>{const t=new zm;return t.calculate(e),t},"getThemeVariables"),Gr,Hm=(Gr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(B("#323D47"),10),this.border1="#ccc",this.border2=Ve(255,255,255,.25),this.arrowheadColor=B(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=$(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(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.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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Gr,"Theme"),Gr),Ym=g(e=>{const t=new Hm;return t.calculate(e),t},"getThemeVariables"),Xr,Um=(Xr=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=ot(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||B(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||M(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||$(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||x(this.mainBkg,{h:180,s:-15,l:o*(8+s*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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),jm=g(e=>{const t=new Um;return t.calculate(e),t},"getThemeVariables"),Vr,Gm=(Vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=M(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=M(B("#323D47"),10),this.border1="#ccc",this.border2=Ve(255,255,255,.25),this.arrowheadColor=B(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(){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||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?$(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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||M(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||B(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||M(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||$(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=$(this["cScale"+r],75);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.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||Ce(this.quadrant1Fill)?M(this.quadrant1Fill):$(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?$(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=M(this.git0,25),this.git1=M(this.git1,25),this.git2=M(this.git2,25),this.git3=M(this.git3,25),this.git4=M(this.git4,25),this.git5=M(this.git5,25),this.git6=M(this.git6,25),this.git7=M(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),Xm=g(e=>{const t=new Gm;return t.calculate(e),t},"getThemeVariables"),Oe={base:{getThemeVariables:Lm},dark:{getThemeVariables:Am},default:{getThemeVariables:Mm},forest:{getThemeVariables:Om},neutral:{getThemeVariables:Dm},neo:{getThemeVariables:Rm},"neo-dark":{getThemeVariables:Nm},redux:{getThemeVariables:Wm},"redux-dark":{getThemeVariables:Ym},"redux-color":{getThemeVariables:jm},"redux-dark-color":{getThemeVariables:Xm}},Kt={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},Eh={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Oe.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn}},Mh=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Mh(e[i],"")]:[...r,t+i],[]),"keyify"),Vm=new Set(Mh(Eh,"")),$h=Eh,To=g(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>To(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Vm.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 o of Object.keys(e[t]))(typeof e[t][o]!="string"||!i.test(e[t][o]))&&(q.debug("sanitize deleting invalid color:",o,e[t][o]),delete e[t][o])}else q.debug("sanitizing object",t),To(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=Oh(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),Oh=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Jr=Object.freeze($h),Re=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=Dt({},Jr),So,gr=[],Fi=Dt({},Jr),Xo=g((e,t)=>{let r=Dt({},e),i={};for(const o of t)Ph(o),i=Dt(i,o);if(r=Dt(r,i),i.theme&&i.theme in Oe){const o=Dt({},So),s=Dt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in Oe&&(r.themeVariables=Oe[r.theme].getThemeVariables(s))}return Fi=r,qh(Fi),Fi},"updateCurrentConfig"),Zm=g(e=>(ie=Dt({},Jr),ie=Dt(ie,e),e.theme&&Oe[e.theme]&&(ie.themeVariables=Oe[e.theme].getThemeVariables(e.themeVariables)),Xo(ie,gr),ie),"setSiteConfig"),Km=g(e=>{So=Dt({},e)},"saveConfigFromInitialize"),Qm=g(e=>(ie=Dt(ie,e),Xo(ie,gr),ie),"updateSiteConfig"),Ih=g(()=>Dt({},ie),"getSiteConfig"),Dh=g(e=>(qh(e),Dt(Fi,e),vt()),"setConfig"),vt=g(()=>Dt({},Fi),"getConfig"),Ph=g(e=>{e&&(["secure",...ie.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"&&Ph(e[t])}))},"sanitize"),Jm=g(e=>{To(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Xo(ie,gr)},"addDirective"),wo=g((e=ie)=>{gr=[],Xo(e,gr)},"reset"),ty={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."},ml={},Rh=g(e=>{ml[e]||(q.warn(ty[e]),ml[e]=!0)},"issueWarning"),qh=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Rh("LAZY_LOAD_DEPRECATED")},"checkConfig"),eS=g(()=>{let e={};So&&(e=Dt(e,So));for(const t of gr)e=Dt(e,t);return e},"getUserDefinedConfig"),ee=g(e=>(e.flowchart?.htmlLabels!=null&&Rh("FLOWCHART_HTML_LABELS_DEPRECATED"),Re(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),zi=/<br\s*\/?>/gi,ey=g(e=>e?Wh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ry=(()=>{let e=!1;return()=>{e||(Nh(),e=!0)}})();function Nh(){const e="data-temp-href-target";Qr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Qr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(Nh,"setupDompurifyHooks");var zh=g(e=>(ry(),Qr.sanitize(e)),"removeScript"),yl=g((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=zh(e):r!=="loose"&&(e=Wh(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=ay(e))}return e},"sanitizeMore"),ye=g((e,t)=>e&&(t.dompurifyConfig?e=Qr.sanitize(yl(e,t),t.dompurifyConfig).toString():e=Qr.sanitize(yl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),iy=g((e,t)=>typeof e=="string"?ye(e,t):e.flat().map(r=>ye(r,t)),"sanitizeTextOrArray"),oy=g(e=>zi.test(e),"hasBreaks"),sy=g(e=>e.split(zi),"splitBreaks"),ay=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Wh=g(e=>e.replace(zi,"#br#"),"breakToPlaceholder"),ny=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),ly=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),hy=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Cl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];cy(s,a)&&(o=s+","+a,i++,r.pop())}r.push(dy(o))}return r.join("")},"parseGenericTypes"),Xs=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),cy=g((e,t)=>{const r=Xs(e,"~"),i=Xs(t,"~");return r===1&&i===1},"shouldCombineSets"),dy=g(e=>{const t=Xs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),xl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Vs=/\$\$(.*)\$\$/g,$i=g(e=>(e.match(Vs)?.length??0)>0,"hasKatex"),rS=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Hh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),uy=g(async(e,t)=>{if(!$i(e))return e;if(!(xl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Vs,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:o}=await import("./index-zJq4U9RT.js").then(s=>s.k);return{default:o}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!xl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(zi).map(o=>$i(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Vs,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Hh=g(async(e,t)=>ye(await uy(e,t),t),"renderKatexSanitized"),Wi={getRows:ey,sanitizeText:ye,sanitizeTextOrArray:iy,hasBreaks:oy,splitBreaks:sy,lineBreakRegex:zi,removeScript:zh,getUrl:ny,evaluate:Re,getMax:ly,getMin:hy},py=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),gy=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Yh=g(function(e,t,r,i){const o=gy(t,r,i);py(e,o)},"configureSvgSize"),fy=g(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;q.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,q.info(`Calculated bounds: ${n}x${l}`),Yh(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),po={};function Zs(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}g(Zs,"cssStyleSheetToString");var my=g((e,t,r,i)=>{let o="";return e in po&&po[e]?o=po[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),` & {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${o}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+
89
+
90
+ [data-look="neo"].node path {
91
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
92
+ stroke-width: ${r.strokeWidth??1}px;
93
+ }
94
+
95
+ [data-look="neo"].node .outer-path {
96
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
97
+ }
98
+
99
+ [data-look="neo"].node .neo-line path {
100
+ stroke: ${r.nodeBorder};
101
+ filter: none;
102
+ }
103
+
104
+ [data-look="neo"].node circle{
105
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
106
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
107
+ }
108
+
109
+ [data-look="neo"].node circle .state-start{
110
+ fill: #000000;
111
+ }
112
+
113
+ [data-look="neo"].icon-shape .icon {
114
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
115
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
116
+ }
117
+
118
+ [data-look="neo"].icon-shape .icon-neo path {
119
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
120
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
121
+ }
122
+
123
+ ${t}
124
+ `},"getStyles"),yy=g((e,t)=>{t!==void 0&&(po[e]=t)},"addStylesForDiagram"),Cy=my,Uh={};Rf(Uh,{clear:()=>xy,getAccDescription:()=>Sy,getAccTitle:()=>ky,getDiagramTitle:()=>_y,setAccDescription:()=>Ty,setAccTitle:()=>by,setDiagramTitle:()=>wy});var qa="",Na="",za="",Wa=g(e=>ye(e,vt()),"sanitizeText"),xy=g(()=>{qa="",za="",Na=""},"clear"),by=g(e=>{qa=Wa(e).replace(/^\s+/g,"")},"setAccTitle"),ky=g(()=>qa,"getAccTitle"),Ty=g(e=>{za=Wa(e).replace(/\n\s+/g,`
125
+ `)},"setAccDescription"),Sy=g(()=>za,"getAccDescription"),wy=g(e=>{Na=Wa(e)},"setDiagramTitle"),_y=g(()=>Na,"getDiagramTitle"),bl=q,By=Pa,Ct=vt,iS=Dh,oS=Jr,Ha=g(e=>ye(e,Ct()),"sanitizeText"),vy=fy,Ly=g(()=>Uh,"getCommonDb"),_o={},Bo=g((e,t,r)=>{_o[e]&&bl.warn(`Diagram with id ${e} already registered. Overwriting.`),_o[e]=t,r&&Ah(e,r),yy(e,t.styles),t.injectUtils?.(bl,By,Ct,Ha,vy,Ly(),()=>{})},"registerDiagram"),Ks=g(e=>{if(e in _o)return _o[e];throw new Fy(e)},"getDiagram"),Zr,Fy=(Zr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Zr,"DiagramNotFoundError"),Zr);const Qs=Math.PI,Js=2*Qs,nr=1e-6,Ay=Js-nr;function jh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Ey(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return jh;const r=10**t;return function(i){this._+=i[0];for(let o=1,s=i.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class My{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?jh:Ey(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,s,a){this._append`C${+t},${+r},${+i},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,o,s){if(t=+t,r=+r,i=+i,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,n=this._y1,l=i-t,c=o-r,h=a-t,d=n-r,p=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>nr)if(!(Math.abs(d*l-c*h)>nr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,f=o-n,m=l*l+c*c,y=u*u+f*f,C=Math.sqrt(m),b=Math.sqrt(p),k=s*Math.tan((Qs-Math.acos((m+p-y)/(2*C*b)))/2),S=k/b,w=k/C;Math.abs(S-1)>nr&&this._append`L${t+S*h},${r+S*d}`,this._append`A${s},${s},0,0,${+(d*u>h*f)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,o,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(o),l=i*Math.sin(o),c=t+n,h=r+l,d=1^a,p=a?o-s:s-o;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>nr||Math.abs(this._y1-h)>nr)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%Js+Js),p>Ay?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>nr&&this._append`A${i},${i},0,${+(p>=Qs)},${d},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function vr(e){return function(){return e}}const sS=Math.abs,aS=Math.atan2,nS=Math.cos,lS=Math.max,hS=Math.min,cS=Math.sin,dS=Math.sqrt,kl=1e-12,Ya=Math.PI,Tl=Ya/2,uS=2*Ya;function pS(e){return e>1?0:e<-1?Ya:Math.acos(e)}function gS(e){return e>=1?Tl:e<=-1?-Tl:Math.asin(e)}function $y(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new My(t)}function Oy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gh(e){this._context=e}Gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ai(e){return new Gh(e)}function Iy(e){return e[0]}function Dy(e){return e[1]}function Py(e,t){var r=vr(!0),i=null,o=Ai,s=null,a=$y(n);e=typeof e=="function"?e:e===void 0?Iy:vr(e),t=typeof t=="function"?t:t===void 0?Dy:vr(t);function n(l){var c,h=(l=Oy(l)).length,d,p=!1,u;for(i==null&&(s=o(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(d,c,l),+t(d,c,l));if(u)return s=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:vr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:vr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:vr(!!l),n):r},n.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),n):o},n.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),n):i},n}class Xh{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Vh(e){return new Xh(e,!0)}function Zh(e){return new Xh(e,!1)}function Ke(){}function vo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Vo(e){this._context=e}Vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ta(e){return new Vo(e)}function Kh(e){this._context=e}Kh.prototype={areaStart:Ke,areaEnd:Ke,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ry(e){return new Kh(e)}function Qh(e){this._context=e}Qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:vo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qy(e){return new Qh(e)}function Jh(e,t){this._basis=new Vo(e),this._beta=t}Jh.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],o=t[0],s=e[r]-i,a=t[r]-o,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Ny=(function e(t){function r(i){return t===1?new Vo(i):new Jh(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Lo(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 Ua(e,t){this._context=e,this._k=(1-t)/6}Ua.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:Lo(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:Lo(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 tc=(function e(t){function r(i){return new Ua(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ja(e,t){this._context=e,this._k=(1-t)/6}ja.prototype={areaStart:Ke,areaEnd:Ke,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:Lo(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 zy=(function e(t){function r(i){return new ja(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: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:Lo(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 Wy=(function e(t){function r(i){return new Ga(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Xa(e,t,r){var i=e._x1,o=e._y1,s=e._x2,a=e._y2;if(e._l01_a>kl){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>kl){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,o,s,a,e._x2,e._y2)}function ec(e,t){this._context=e,this._alpha=t}ec.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:Xa(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 rc=(function e(t){function r(i){return t?new ec(i,t):new Ua(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ic(e,t){this._context=e,this._alpha=t}ic.prototype={areaStart:Ke,areaEnd:Ke,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:Xa(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 Hy=(function e(t){function r(i){return t?new ic(i,t):new ja(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function oc(e,t){this._context=e,this._alpha=t}oc.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:Xa(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 Yy=(function e(t){function r(i){return t?new oc(i,t):new Ga(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function sc(e){this._context=e}sc.prototype={areaStart:Ke,areaEnd:Ke,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Uy(e){return new sc(e)}function Sl(e){return e<0?-1:1}function wl(e,t,r){var i=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(i||o<0&&-0),a=(r-e._y1)/(o||i<0&&-0),n=(s*o+a*i)/(i+o);return(Sl(s)+Sl(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(n))||0}function _l(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Es(e,t,r){var i=e._x0,o=e._y0,s=e._x1,a=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,o+n*t,s-n,a-n*r,s,a)}function Fo(e){this._context=e}Fo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Es(this,this._t0,_l(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Es(this,_l(this,r=wl(this,e,t)),r);break;default:Es(this,this._t0,r=wl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ac(e){this._context=new nc(e)}(ac.prototype=Object.create(Fo.prototype)).point=function(e,t){Fo.prototype.point.call(this,t,e)};function nc(e){this._context=e}nc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,o,s){this._context.bezierCurveTo(t,e,i,r,s,o)}};function lc(e){return new Fo(e)}function hc(e){return new ac(e)}function cc(e){this._context=e}cc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Bl(e),o=Bl(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],o[0][s],i[1][s],o[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Bl(e){var t,r=e.length-1,i,o=new Array(r),s=new Array(r),a=new Array(r);for(o[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(o[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-o[t+1];return[o,s]}function dc(e){return new cc(e)}function Zo(e,t){this._context=e,this._t=t}Zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function uc(e){return new Zo(e,.5)}function pc(e){return new Zo(e,0)}function gc(e){return new Zo(e,1)}var jy=g(e=>{const{securityLevel:t}=Ct();let r=lt("body");if(t==="sandbox"){const s=lt(`#i${e}`).node()?.contentDocument??document;r=lt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Va(e){return typeof e>"u"||e===null}g(Va,"isNothing");function fc(e){return typeof e=="object"&&e!==null}g(fc,"isObject");function mc(e){return Array.isArray(e)?e:Va(e)?[]:[e]}g(mc,"toArray");function yc(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}g(yc,"extend");function Cc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Cc,"repeat");function xc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(xc,"isNegativeZero");var Gy=Va,Xy=fc,Vy=mc,Zy=Cc,Ky=xc,Qy=yc,Pt={isNothing:Gy,isObject:Xy,toArray:Vy,repeat:Zy,isNegativeZero:Ky,extend:Qy};function Za(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
126
+
127
+ `+e.mark.snippet),i+" "+r):i}g(Za,"formatError");function ti(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Za(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(ti,"YAMLException$1");ti.prototype=Object.create(Error.prototype);ti.prototype.constructor=ti;ti.prototype.toString=g(function(t){return this.name+": "+Za(this,t)},"toString");var oe=ti;function go(e,t,r,i,o){var s="",a="",n=Math.floor(o/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}g(go,"getLine");function fo(e,t){return Pt.repeat(" ",t-e.length)+e}g(fo,"padStart");function bc(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],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=go(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),d),n=Pt.repeat(" ",t.indent)+fo((e.line-l+1).toString(),h)+" | "+c.str+`
128
+ `+n;for(c=go(e.buffer,i[a],o[a],e.position,d),n+=Pt.repeat(" ",t.indent)+fo((e.line+1).toString(),h)+" | "+c.str+`
129
+ `,n+=Pt.repeat("-",t.indent+h+3+c.pos)+`^
130
+ `,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)c=go(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),d),n+=Pt.repeat(" ",t.indent)+fo((e.line+l+1).toString(),h)+" | "+c.str+`
131
+ `;return n.replace(/\n$/,"")}g(bc,"makeSnippet");var Jy=bc,tC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],eC=["scalar","sequence","mapping"];function kc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(kc,"compileStyleAliases");function Tc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(tC.indexOf(r)===-1)throw new oe('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=kc(t.styleAliases||null),eC.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Tc,"Type$1");var Xt=Tc;function ea(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}g(ea,"compileList");function Sc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Sc,"compileMap");function Ao(e){return this.extend(e)}g(Ao,"Schema$1");Ao.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Xt)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 oe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Xt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new oe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Xt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Ao.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=ea(o,"implicit"),o.compiledExplicit=ea(o,"explicit"),o.compiledTypeMap=Sc(o.compiledImplicit,o.compiledExplicit),o},"extend");var rC=Ao,iC=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),oC=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),sC=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),aC=new rC({explicit:[iC,oC,sC]});function wc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(wc,"resolveYamlNull");function _c(){return null}g(_c,"constructYamlNull");function Bc(e){return e===null}g(Bc,"isNull");var nC=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:wc,construct:_c,predicate:Bc,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function vc(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(vc,"resolveYamlBoolean");function Lc(e){return e==="true"||e==="True"||e==="TRUE"}g(Lc,"constructYamlBoolean");function Fc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Fc,"isBoolean");var lC=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:vc,construct:Lc,predicate:Fc,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ac(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Ac,"isHexCode");function Ec(e){return 48<=e&&e<=55}g(Ec,"isOctCode");function Mc(e){return 48<=e&&e<=57}g(Mc,"isDecCode");function $c(e){if(e===null)return!1;var t=e.length,r=0,i=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Ac(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Ec(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!Mc(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}g($c,"resolveYamlInteger");function Oc(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(Oc,"constructYamlInteger");function Ic(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Pt.isNegativeZero(e)}g(Ic,"isInteger");var hC=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:$c,construct:Oc,predicate:Ic,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Dc(e){return!(e===null||!cC.test(e)||e[e.length-1]==="_")}g(Dc,"resolveYamlFloat");function Pc(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Pc,"constructYamlFloat");var dC=/^[-+]?[0-9]+e/;function Rc(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(Pt.isNegativeZero(e))return"-0.0";return r=e.toString(10),dC.test(r)?r.replace("e",".e"):r}g(Rc,"representYamlFloat");function qc(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Pt.isNegativeZero(e))}g(qc,"isFloat");var uC=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Dc,construct:Pc,predicate:qc,represent:Rc,defaultStyle:"lowercase"}),Nc=aC.extend({implicit:[nC,lC,hC,uC]}),pC=Nc,zc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wc=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 Hc(e){return e===null?!1:zc.exec(e)!==null||Wc.exec(e)!==null}g(Hc,"resolveYamlTimestamp");function Yc(e){var t,r,i,o,s,a,n,l=0,c=null,h,d,p;if(t=zc.exec(e),t===null&&(t=Wc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,i,o));if(s=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),p=new Date(Date.UTC(r,i,o,s,a,n,l)),c&&p.setTime(p.getTime()-c),p}g(Yc,"constructYamlTimestamp");function Uc(e){return e.toISOString()}g(Uc,"representYamlTimestamp");var gC=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Hc,construct:Yc,instanceOf:Date,represent:Uc});function jc(e){return e==="<<"||e===null}g(jc,"resolveYamlMerge");var fC=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:jc}),Ka=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
+ \r`;function Gc(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=Ka;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(Gc,"resolveYamlBinary");function Xc(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Ka,a=0,n=[];for(t=0;t<o;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}g(Xc,"constructYamlBinary");function Vc(e){var t="",r=0,i,o,s=e.length,a=Ka;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}g(Vc,"representYamlBinary");function Zc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Zc,"isBinary");var mC=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Gc,construct:Xc,predicate:Zc,represent:Vc}),yC=Object.prototype.hasOwnProperty,CC=Object.prototype.toString;function Kc(e){if(e===null)return!0;var t=[],r,i,o,s,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(o=n[r],a=!1,CC.call(o)!=="[object Object]")return!1;for(s in o)if(yC.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}g(Kc,"resolveYamlOmap");function Qc(e){return e!==null?e:[]}g(Qc,"constructYamlOmap");var xC=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Kc,construct:Qc}),bC=Object.prototype.toString;function Jc(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],bC.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}g(Jc,"resolveYamlPairs");function td(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}g(td,"constructYamlPairs");var kC=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Jc,construct:td}),TC=Object.prototype.hasOwnProperty;function ed(e){if(e===null)return!0;var t,r=e;for(t in r)if(TC.call(r,t)&&r[t]!==null)return!1;return!0}g(ed,"resolveYamlSet");function rd(e){return e!==null?e:{}}g(rd,"constructYamlSet");var SC=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:ed,construct:rd}),id=pC.extend({implicit:[gC,fC],explicit:[mC,xC,kC,SC]}),Qe=Object.prototype.hasOwnProperty,Eo=1,od=2,sd=3,Mo=4,Ms=1,wC=2,vl=3,_C=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,BC=/[\x85\u2028\u2029]/,vC=/[,\[\]\{\}]/,ad=/^(?:!|!!|![a-z\-]+!)$/i,nd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ra(e){return Object.prototype.toString.call(e)}g(ra,"_class");function fe(e){return e===10||e===13}g(fe,"is_EOL");function Ze(e){return e===9||e===32}g(Ze,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}g(Jt,"is_WS_OR_EOL");function cr(e){return e===44||e===91||e===93||e===123||e===125}g(cr,"is_FLOW_INDICATOR");function ld(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(ld,"fromHexCode");function hd(e){return e===120?2:e===117?4:e===85?8:0}g(hd,"escapedHexLen");function cd(e){return 48<=e&&e<=57?e-48:-1}g(cd,"fromDecimalCode");function ia(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
133
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(ia,"simpleEscapeSequence");function dd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(dd,"charFromCodepoint");function Qa(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(Qa,"setProperty");var ud=new Array(256),pd=new Array(256);for(sr=0;sr<256;sr++)ud[sr]=ia(sr)?1:0,pd[sr]=ia(sr);var sr;function gd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||id,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(gd,"State$1");function Ja(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=Jy(r),new oe(t,r)}g(Ja,"generateError");function tt(e,t){throw Ja(e,t)}g(tt,"throwError");function Oi(e,t){e.onWarning&&e.onWarning.call(null,Ja(e,t))}g(Oi,"throwWarning");var Ll={YAML:g(function(t,r,i){var o,s,a;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&tt(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Oi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var o,s;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),o=i[0],s=i[1],ad.test(o)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Qe.call(t.tagMap,o)&&tt(t,'there is a previously declared suffix for "'+o+'" tag handle'),nd.test(s)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{tt(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s},"handleTagDirective")};function Ie(e,t,r,i){var o,s,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(o=0,s=n.length;o<s;o+=1)a=n.charCodeAt(o),a===9||32<=a&&a<=1114111||tt(e,"expected valid JSON character");else _C.test(n)&&tt(e,"the stream contains non-printable characters");e.result+=n}}g(Ie,"captureSegment");function oa(e,t,r,i){var o,s,a,n;for(Pt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,n=o.length;a<n;a+=1)s=o[a],Qe.call(t,s)||(Qa(t,s,r[s]),i[s]=!0)}g(oa,"mergeMappings");function dr(e,t,r,i,o,s,a,n,l){var c,h;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,h=o.length;c<h;c+=1)Array.isArray(o[c])&&tt(e,"nested arrays are not supported inside keys"),typeof o=="object"&&ra(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&ra(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)oa(e,t,s[c],r);else oa(e,t,s,r);else!e.json&&!Qe.call(r,o)&&Qe.call(t,o)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),Qa(t,o,s),delete r[o];return t}g(dr,"storeMappingPair");function Ko(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Ko,"readLineBreak");function Et(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Ze(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(fe(o))for(Ko(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Oi(e,"deficient indentation"),i}g(Et,"skipSeparationSpace");function Hi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Jt(r)))}g(Hi,"testDocumentSeparator");function Qo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Pt.repeat(`
134
+ `,t-1))}g(Qo,"writeFoldedLines");function fd(e,t,r){var i,o,s,a,n,l,c,h,d=e.kind,p=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||cr(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)&&(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&cr(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,n=!1;u!==0;){if(u===58){if(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&cr(o))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&Hi(e)||r&&cr(u))break;if(fe(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ie(e,s,a,!1),Qo(e,e.line-l),s=a=e.position,n=!1),Ze(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Ie(e,s,a,!1),e.result?!0:(e.kind=d,e.result=p,!1)}g(fd,"readPlainScalar");function md(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ie(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else fe(r)?(Ie(e,i,o,!0),Qo(e,Et(e,!1,t)),i=o=e.position):e.position===e.lineStart&&Hi(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}g(md,"readSingleQuotedScalar");function yd(e,t){var r,i,o,s,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ie(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ie(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),fe(n))Et(e,!1,t);else if(n<256&&ud[n])e.result+=pd[n],e.position++;else if((a=hd(n))>0){for(o=a,s=0;o>0;o--)n=e.input.charCodeAt(++e.position),(a=ld(n))>=0?s=(s<<4)+a:tt(e,"expected hexadecimal character");e.result+=dd(s),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else fe(n)?(Ie(e,r,i,!0),Qo(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Hi(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}g(yd,"readDoubleQuotedScalar");function Cd(e,t){var r=!0,i,o,s,a=e.tag,n,l=e.anchor,c,h,d,p,u,f=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=C=null,d=p=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Jt(c)&&(d=p=!0,e.position++,Et(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,fr(e,t,Eo,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),fr(e,t,Eo,!1,!0),C=e.result),u?dr(e,n,f,y,m,C,i,o,s):d?n.push(dr(e,null,f,y,m,C,i,o,s)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}g(Cd,"readFlowCollection");function xd(e,t){var r,i,o=Ms,s=!1,a=!1,n=t,l=0,c=!1,h,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)Ms===o?o=d===43?vl:wC:tt(e,"repeat of a chomping mode identifier");else if((h=cd(d))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?tt(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(Ze(d)){do d=e.input.charCodeAt(++e.position);while(Ze(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!fe(d)&&d!==0)}for(;d!==0;){for(Ko(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),fe(d)){l++;continue}if(e.lineIndent<n){o===vl?e.result+=Pt.repeat(`
135
+ `,s?1+l:l):o===Ms&&s&&(e.result+=`
136
+ `);break}for(i?Ze(d)?(c=!0,e.result+=Pt.repeat(`
137
+ `,s?1+l:l)):c?(c=!1,e.result+=Pt.repeat(`
138
+ `,l+1)):l===0?s&&(e.result+=" "):e.result+=Pt.repeat(`
139
+ `,l):e.result+=Pt.repeat(`
140
+ `,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!fe(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ie(e,r,e.position,!1)}return!0}g(xd,"readBlockScalar");function sa(e,t){var r,i=e.tag,o=e.anchor,s=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Jt(a))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,fr(e,t,sd,!1,!0),s.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}g(sa,"readBlockSequence");function bd(e,t,r){var i,o,s,a,n,l,c=e.tag,h=e.anchor,d={},p=Object.create(null),u=null,f=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(dr(e,d,p,u,f,null,a,n,l),u=f=m=null),C=!0,y=!0,o=!0):y?(y=!1,o=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!fr(e,r,od,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Ze(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(dr(e,d,p,u,f,null,a,n,l),u=f=m=null),C=!0,y=!1,o=!1,u=e.tag,f=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),fr(e,t,Mo,!0,o)&&(y?f=e.result:m=e.result),y||(dr(e,d,p,u,f,m,a,n,l),u=f=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&dr(e,d,p,u,f,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}g(bd,"readBlockMapping");function kd(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Jt(a);)a===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),ad.test(o)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),vC.test(s)&&tt(e,"tag suffix cannot contain flow indicator characters")}s&&!nd.test(s)&&tt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{tt(e,"tag name is malformed: "+s)}return r?e.tag=s:Qe.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:tt(e,'undeclared tag handle "'+o+'"'),!0}g(kd,"readTagProperty");function Td(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!cr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Td,"readAnchorProperty");function Sd(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!cr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Qe.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Et(e,!0,-1),!0}g(Sd,"readAlias");function fr(e,t,r,i,o){var s,a,n,l=1,c=!1,h=!1,d,p,u,f,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=n=Mo===r||sd===r,i&&Et(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;kd(e)||Td(e);)Et(e,!0,-1)?(c=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||o),(l===1||Mo===r)&&(Eo===r||od===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(sa(e,y)||bd(e,y,m))||Cd(e,m)?h=!0:(a&&xd(e,m)||md(e,m)||yd(e,m)?h=!0:Sd(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):fd(e,m,Eo===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&sa(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(f=e.implicitTypes[d],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Qe.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,p=u.length;d<p;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){f=u[d];break}f||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(fr,"composeNode");function wd(e){var t=e.position,r,i,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Et(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),o=[],i.length<1&&tt(e,"directive name must not be less than one character in length");a!==0;){for(;Ze(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!fe(a));break}if(fe(a))break;for(r=e.position;a!==0&&!Jt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&Ko(e),Qe.call(Ll,i)?Ll[i](e,i,o):Oi(e,'unknown document directive "'+i+'"')}if(Et(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,Et(e,!0,-1)):s&&tt(e,"directives end mark is expected"),fr(e,e.lineIndent-1,Mo,!1,!0),Et(e,!0,-1),e.checkLineBreaks&&BC.test(e.input.slice(t,e.position))&&Oi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Hi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Et(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}g(wd,"readDocument");function tn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
141
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new gd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)wd(r);return r.documents}g(tn,"loadDocuments");function LC(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=tn(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}g(LC,"loadAll$1");function _d(e,t){var r=tn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new oe("expected a single document in the stream, but found more")}}g(_d,"load$1");var FC=_d,AC={load:FC},Bd=Object.prototype.toString,vd=Object.prototype.hasOwnProperty,en=65279,EC=9,Ii=10,MC=13,$C=32,OC=33,IC=34,aa=35,DC=37,PC=38,RC=39,qC=42,Ld=44,NC=45,$o=58,zC=61,WC=62,HC=63,YC=64,Fd=91,Ad=93,UC=96,Ed=123,jC=124,Md=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var GC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],XC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $d(e,t){var r,i,o,s,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&vd.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}g($d,"compileStyleMap");function Od(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 oe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pt.repeat("0",i-t.length)+t}g(Od,"encodeHex");var VC=1,Di=2;function Id(e){this.schema=e.schema||id,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=$d(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==='"'?Di:VC,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Id,"State");function na(e,t){for(var r=Pt.repeat(" ",t),i=0,o=-1,s="",a,n=e.length;i<n;)o=e.indexOf(`
142
+ `,i),o===-1?(a=e.slice(i),i=n):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
143
+ `&&(s+=r),s+=a;return s}g(na,"indentString");function Oo(e,t){return`
144
+ `+Pt.repeat(" ",e.indent*t)}g(Oo,"generateNextLine");function Dd(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}g(Dd,"testImplicitResolving");function Pi(e){return e===$C||e===EC}g(Pi,"isWhitespace");function ei(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==en||65536<=e&&e<=1114111}g(ei,"isPrintable");function la(e){return ei(e)&&e!==en&&e!==MC&&e!==Ii}g(la,"isNsCharOrWhitespace");function ha(e,t,r){var i=la(e),o=i&&!Pi(e);return(r?i:i&&e!==Ld&&e!==Fd&&e!==Ad&&e!==Ed&&e!==Md)&&e!==aa&&!(t===$o&&!o)||la(t)&&!Pi(t)&&e===aa||t===$o&&o}g(ha,"isPlainSafe");function Pd(e){return ei(e)&&e!==en&&!Pi(e)&&e!==NC&&e!==HC&&e!==$o&&e!==Ld&&e!==Fd&&e!==Ad&&e!==Ed&&e!==Md&&e!==aa&&e!==PC&&e!==qC&&e!==OC&&e!==jC&&e!==zC&&e!==WC&&e!==RC&&e!==IC&&e!==DC&&e!==YC&&e!==UC}g(Pd,"isPlainSafeFirst");function Rd(e){return!Pi(e)&&e!==$o}g(Rd,"isPlainSafeLast");function Or(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Or,"codePointAt");function rn(e){var t=/^\n* /;return t.test(e)}g(rn,"needIndentIndicator");var qd=1,ca=2,Nd=3,zd=4,Er=5;function Wd(e,t,r,i,o,s,a,n){var l,c=0,h=null,d=!1,p=!1,u=i!==-1,f=-1,m=Pd(Or(e,0))&&Rd(Or(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),!ei(c))return Er;m=m&&ha(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Or(e,l),c===Ii)d=!0,u&&(p=p||l-f-1>i&&e[f+1]!==" ",f=l);else if(!ei(c))return Er;m=m&&ha(c,h,n),h=c}p=p||u&&l-f-1>i&&e[f+1]!==" "}return!d&&!p?m&&!a&&!o(e)?qd:s===Di?Er:ca:r>9&&rn(e)?Er:a?s===Di?Er:ca:p?zd:Nd}g(Wd,"chooseScalarStyle");function Hd(e,t,r,i,o){e.dump=(function(){if(t.length===0)return e.quotingType===Di?'""':"''";if(!e.noCompatMode&&(GC.indexOf(t)!==-1||XC.test(t)))return e.quotingType===Di?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Dd(e,c)}switch(g(l,"testAmbiguity"),Wd(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case qd:return t;case ca:return"'"+t.replace(/'/g,"''")+"'";case Nd:return"|"+da(t,e.indent)+ua(na(t,s));case zd:return">"+da(t,e.indent)+ua(na(Yd(t,a),s));case Er:return'"'+Ud(t)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}g(Hd,"writeScalar");function da(e,t){var r=rn(e)?String(t):"",i=e[e.length-1]===`
145
+ `,o=i&&(e[e.length-2]===`
146
+ `||e===`
147
+ `),s=o?"+":i?"":"-";return r+s+`
148
+ `}g(da,"blockHeader");function ua(e){return e[e.length-1]===`
149
+ `?e.slice(0,-1):e}g(ua,"dropEndingNewline");function Yd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
150
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,pa(e.slice(0,c),t)})(),o=e[0]===`
151
+ `||e[0]===" ",s,a;a=r.exec(e);){var n=a[1],l=a[2];s=l[0]===" ",i+=n+(!o&&!s&&l!==""?`
152
+ `:"")+pa(l,t),o=s}return i}g(Yd,"foldString");function pa(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-o>t&&(s=a>o?a:n,l+=`
153
+ `+e.slice(o,s),o=s+1),a=n;return l+=`
154
+ `,e.length-o>t&&a>o?l+=e.slice(o,a)+`
155
+ `+e.slice(a+1):l+=e.slice(o),l.slice(1)}g(pa,"foldLine");function Ud(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Or(e,o),i=Vt[r],!i&&ei(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||Od(r);return t}g(Ud,"escapeString");function jd(e,t,r){var i="",o=e.tag,s,a,n;for(s=0,a=r.length;s<a;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(ve(e,t,n,!1,!1)||typeof n>"u"&&ve(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}g(jd,"writeFlowSequence");function ga(e,t,r,i){var o="",s=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(ve(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ve(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=Oo(e,t)),e.dump&&Ii===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}g(ga,"writeBlockSequence");function Gd(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,n,l,c,h;for(a=0,n=s.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ve(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ve(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=o,e.dump="{"+i+"}"}g(Gd,"writeFlowMapping");function Xd(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),n,l,c,h,d,p;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)p="",(!i||o!=="")&&(p+=Oo(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ve(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Ii===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=Oo(e,t)),ve(e,t+1,h,!0,d)&&(e.dump&&Ii===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,o+=p));e.tag=s,e.dump=o||"{}"}g(Xd,"writeBlockMapping");function fa(e,t,r){var i,o,s,a,n,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(n=o[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Bd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(vd.call(n.represent,l))i=n.represent[l](t,l);else throw new oe("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(fa,"detectType");function ve(e,t,r,i,o,s,a){e.tag=null,e.dump=r,fa(e,r,!1)||fa(e,r,!0);var n=Bd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,p;if(h&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(o=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Xd(e,t,e.dump,o),p&&(e.dump="&ref_"+d+e.dump)):(Gd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?ga(e,t-1,e.dump,o):ga(e,t,e.dump,o),p&&(e.dump="&ref_"+d+e.dump)):(jd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Hd(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}g(ve,"writeNode");function Vd(e,t){var r=[],i=[],o,s;for(Io(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}g(Vd,"getDuplicateReferences");function Io(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Io(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Io(e[i[o]],t,r)}g(Io,"inspectNode");function ZC(e,t){t=t||{};var r=new Id(t);r.noRefs||Vd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ve(r,0,i,!0,!0)?r.dump+`
156
+ `:""}g(ZC,"dump$1");function KC(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(KC,"renamed");var QC=Nc,JC=AC.load;var fi=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Gt={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},Fl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Si(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(Si,"calculateDeltaAndAngle");var _t=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),t0=g(e=>({x:g(function(t,r,i){let o=0;const s=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:f}=Si(i[0],i[1]);o=Gt[e.arrowTypeStart]*Math.cos(u)*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:f}=Si(i[i.length-1],i[i.length-2]);o=Gt[e.arrowTypeEnd]*Math.cos(u)*(f>=0?1:-1)}const a=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(a<d&&a>0&&n<d){let u=d+p-a;u*=s==="right"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+p-l;u*=s==="right"?-1:1,o+=u}return _t(t).x+o},"x"),y:g(function(t,r,i){let o=0;const s=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:f}=Si(i[0],i[1]);o=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(f>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:f}=Si(i[i.length-1],i[i.length-2]);o=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(f>=0?1:-1)}const a=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(a<d&&a>0&&n<d){let u=d+p-a;u*=s==="up"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+p-l;u*=s==="up"?-1:1,o+=u}return _t(t).y+o},"y")}),"getLineFunctionsWithOffset"),ro={},It={},Al;function e0(){return Al||(Al=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|&colon;)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var El;function r0(){if(El)return ro;El=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.sanitizeUrl=s;var e=e0();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return u;if(p==="http:"||p==="https:"){if(!i(u))return e.BLANK_URL;var f=new URL(u);return f.protocol=f.protocol.toLowerCase(),f.hostname=f.hostname.toLowerCase(),f.toString()}return u}return ro}var i0=r0();function $s(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function o0(){}function Zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function on(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const s0="[object RegExp]",Kd="[object String]",Qd="[object Number]",Jd="[object Boolean]",tu="[object Arguments]",a0="[object Symbol]",n0="[object Date]",l0="[object Map]",h0="[object Set]",c0="[object Array]",d0="[object ArrayBuffer]",u0="[object Object]",p0="[object DataView]",g0="[object Uint8Array]",f0="[object Uint8ClampedArray]",m0="[object Uint16Array]",y0="[object Uint32Array]",C0="[object Int8Array]",x0="[object Int16Array]",b0="[object Int32Array]",k0="[object Float32Array]",T0="[object Float64Array]",Ml=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function sn(e){return typeof Ml.Buffer<"u"&&Ml.Buffer.isBuffer(e)}function S0(e){return Number.isSafeInteger(e)&&e>=0}function eu(e){return e!=null&&typeof e!="function"&&S0(e.length)}function w0(e){return e==="__proto__"}function an(e){return e==null||typeof e!="object"&&typeof e!="function"}function nn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _0(e,t){return Ir(e,void 0,e,new Map,t)}function Ir(e,t,r,i=new Map,o=void 0){const s=o?.(e,t,r,i);if(s!==void 0)return s;if(an(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ir(e[n],n,r,i,o);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Ir(l,n,r,i,o));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Ir(n,void 0,r,i,o));return a}if(sn(e))return e.subarray();if(nn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ir(e[n],n,r,i,o);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),de(a,e,r,i,o),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),de(a,e,r,i,o),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),de(a,e,r,i,o),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,de(a,e,r,i,o),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),de(a,e,r,i,o),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),de(a,e,r,i,o),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),de(a,e,r,i,o),a}if(typeof e=="object"&&B0(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),de(a,e,r,i,o),a}return e}function de(e,t,r=e,i,o){const s=[...Object.keys(t),...Zd(t)];for(let a=0;a<s.length;a++){const n=s[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Ir(t[n],n,r,i,o))}}function B0(e){switch(on(e)){case tu:case c0:case d0:case p0:case Jd:case n0:case k0:case T0:case C0:case x0:case b0:case l0:case Qd:case u0:case s0:case h0:case Kd:case a0:case g0:case f0:case m0:case y0:return!0;default:return!1}}function v0(e,t){return _0(e,(r,i,o,s)=>{if(typeof e=="object"){if(on(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return s.set(e,a),de(a,e,o,s),a}switch(Object.prototype.toString.call(e)){case Qd:case Kd:case Jd:{const a=new e.constructor(e?.valueOf());return de(a,e),a}case tu:{const a={};return de(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function $l(e){return v0(e)}function ma(e){return e!==null&&typeof e=="object"&&on(e)==="[object Arguments]"}function ya(e){return typeof e=="object"&&e!==null}function L0(e){return ya(e)&&eu(e)}function Yi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);const a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(Yi.Cache||Map),r}Yi.Cache=Map;function mo(e){return nn(e)}function F0(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function A0(e){if(an(e))return e;if(Array.isArray(e)||nn(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 E0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let o=e;for(let s=0;s<r.length;s++){const a=r[s];o=yo(o,a,i,new Map)}return o}function yo(e,t,r,i){if(an(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return A0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const o=[...Object.keys(t),...Zd(t)];for(let s=0;s<o.length;s++){const a=o[s];if(w0(a))continue;let n=t[a],l=e[a];if(ma(n)&&(n={...n}),ma(l)&&(l={...l}),sn(n)&&(n=$l(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let p=0;p<d.length;p++){const u=d[p];h[u]=l[u]}l=h}else if(L0(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||ya(l)&&ya(n)&&($s(l)||$s(n)||mo(l)||mo(n))?e[a]=yo(l,n,r,i):l==null&&$s(n)?e[a]=yo({},n,r,i):l==null&&mo(n)?e[a]=$l(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function M0(e,...t){return E0(e,...t,o0)}function Ol(e){if(e==null)return!0;if(eu(e))return typeof e.splice!="function"&&typeof e!="string"&&!sn(e)&&!mo(e)&&!ma(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 F0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var $0="​",O0={curveBasis:ta,curveBasisClosed:Ry,curveBasisOpen:qy,curveBumpX:Vh,curveBumpY:Zh,curveBundle:Ny,curveCardinalClosed:zy,curveCardinalOpen:Wy,curveCardinal:tc,curveCatmullRomClosed:Hy,curveCatmullRomOpen:Yy,curveCatmullRom:rc,curveLinear:Ai,curveLinearClosed:Uy,curveMonotoneX:lc,curveMonotoneY:hc,curveNatural:dc,curveStep:uc,curveStepAfter:gc,curveStepBefore:pc},I0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,D0=g(function(e,t){const r=ru(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);To(a),i=Dt(i,[...a])}else i=r.args;if(!i)return;let o=Ra(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),ru=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${I0.source})(?=[}][%]{2}).*
157
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=Li.exec(e))!==null;)if(i.index===Li.lastIndex&&Li.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return q.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),P0=g(function(e){return e.replace(Li,"")},"removeDirectives"),R0=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function ln(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return O0[r]??t}g(ln,"interpolateToCurve");function iu(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?i0.sanitizeUrl(r):r}g(iu,"formatUrl");var q0=g((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){q.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function hn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(hn,"distance");function ou(e){let t,r=0;e.forEach(o=>{r+=hn(o,t),t=o});const i=r/2;return cn(e,i)}g(ou,"traverseEdge");function su(e){return e.length===1?e[0]:ou(e)}g(su,"calcLabelPosition");var Il=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),cn=g((e,t)=>{let r,i=t;for(const o of e){if(r){const s=hn(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Il((1-a)*r.x+a*o.x,5),y:Il((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),N0=g((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=cn(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function au(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=cn(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}g(au,"calcTerminalLabelPosition");function nu(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(nu,"getStylesFromArray");var Dl=0,z0=g(()=>(Dl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Dl),"generateId");function lu(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(lu,"makeRandomHex");var W0=g(e=>lu(e.length),"random"),H0=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Y0=g(function(e,t){const r=t.text.replace(Wi.lineBreakRegex," "),[,i]=Jo(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),U0=Yi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Wi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=De(`${a} `,r),c=De(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:u}=j0(a,t,"-",r);o.push(s,...p),s=u}else c+l>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),j0=Yi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,l)=>{const c=`${a}${n}`;if(De(c,i)>=t){const d=l+1,p=o.length===d,u=`${c}${r}`;s.push(p?c:u),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function hu(e,t){return dn(e,t).height}g(hu,"calculateTextHeight");function De(e,t){return dn(e,t).width}g(De,"calculateTextWidth");var dn=Yi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=Jo(r),a=["sans-serif",i],n=e.split(Wi.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of a){let u=0;const f={width:0,height:0,lineHeight:0};for(const m of n){const y=H0();y.text=m||$0;const C=Y0(h,y).style("font-size",s).style("font-weight",o).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,b.width)),u=Math.round(b.height),f.height+=u,f.lineHeight=Math.round(Math.max(f.lineHeight,u))}l.push(f)}h.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}`),Kr,G0=(Kr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Kr,"InitIDGenerator"),Kr),io,X0=g(function(e){return io=io||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),io.innerHTML=e,unescape(io.textContent)},"entityDecode");function un(e){return"str"in e}g(un,"isDetailedError");var V0=g((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Jo=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function pn(e,t){return M0({},e,t)}g(pn,"cleanAndMerge");var ge={assignWithDepth:Dt,wrapLabel:U0,calculateTextHeight:hu,calculateTextWidth:De,calculateTextDimensions:dn,cleanAndMerge:pn,detectInit:D0,detectDirective:ru,isSubstringInArray:R0,interpolateToCurve:ln,calcLabelPosition:su,calcCardinalityPosition:N0,calcTerminalLabelPosition:au,formatUrl:iu,getStylesFromArray:nu,generateId:z0,random:W0,runFunc:q0,entityDecode:X0,insertTitle:V0,isLabelCoordinateInPath:cu,parseFontSize:Jo,InitIDGenerator:G0},Z0=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),mr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),fS=g((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function Nt(e){return e??null}g(Nt,"handleUndefinedAttr");function cu(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}g(cu,"isLabelCoordinateInPath");var gn=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function du(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(o=>new Promise(s=>{function a(){if(o.style.display="flex",o.style.flexDirection="column",i){const n=Ct().fontSize?Ct().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=$h.fontSize]=Jo(n),h=c*l+"px";o.style.minWidth=h,o.style.maxWidth=h}else o.style.width="100%";s(o)}g(a,"setupImage"),setTimeout(()=>{o.complete&&a()}),o.addEventListener("error",a),o.addEventListener("load",a)})))}g(du,"configureLabelImages");var K0=g(e=>{const{handDrawnSeed:t}=Ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),oi=g(e=>{const t=Q0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Q0=g(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),uu=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Z=g(e=>{const{stylesArray:t}=oi(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];uu(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),V=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ct(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=oi(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:J0(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),J0=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const tx=Object.freeze({left:0,top:0,width:16,height:16}),Do=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),pu=Object.freeze({...tx,...Do}),ex=Object.freeze({...pu,body:"",hidden:!1}),rx=Object.freeze({width:null,height:null}),ix=Object.freeze({...rx,...Do}),ox=(e,t,r,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const n=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:n};return Os(c)?c:null}const s=o[0],a=s.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Os(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Os(n,r)?n:null}return null},Os=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function sx(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 Pl(e,t){const r=sx(e,t);for(const i in ex)i in Do?i in e&&!(i in r)&&(r[i]=Do[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function ax(e,t){const r=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const n=i[a]&&i[a].parent,l=n&&s(n);l&&(o[a]=[n].concat(l))}return o[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),o}function Rl(e,t,r){const i=e.icons,o=e.aliases||Object.create(null);let s={};function a(n){s=Pl(i[n]||o[n],s)}return a(t),r.forEach(a),Pl(e,s)}function nx(e,t){if(e.icons[t])return Rl(e,t,[]);const r=ax(e,[t])[t];return r?Rl(e,t,r):null}const lx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ql(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(lx);if(i===null||!i.length)return e;const o=[];let s=i.shift(),a=hx.test(s);for(;;){if(a){const n=parseFloat(s);isNaN(n)?o.push(s):o.push(Math.ceil(n*t*r)/r)}else o.push(s);if(s=i.shift(),s===void 0)return o.join("");a=!a}}function cx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const o=e.indexOf(">",i),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function dx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ux(e,t,r){const i=cx(e);return dx(i.defs,t+i.content+r)}const px=e=>e==="unset"||e==="undefined"||e==="none";function gx(e,t){const r={...pu,...e},i={...ix,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],C=m.hFlip,b=m.vFlip;let k=m.rotate;C?b?k+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):b&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s=ux(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=o.width,c=o.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=ql(d,l/c)):(h=a==="auto"?l:a,d=n===null?ql(h,c/l):n==="auto"?c:n);const p={},u=(m,y)=>{px(y)||(p[m]=y.toString())};u("width",h),u("height",d);const f=[o.left,o.top,l,c];return p.viewBox=f.join(" "),{attributes:p,viewBox:f,body:s}}const fx=/\sid="(\S+)"/g,Nl=new Map;function mx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nl.get(e)||0;return Nl.set(e,t+1),t?`${e}${t}`:e}function yx(e){const t=[];let r;for(;r=fx.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const s=mx(o),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Cx(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 fn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xr=fn();function gu(e){xr=e}var Ei={exec:()=>null};function xt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(te.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var xx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},bx=/^(?:[ \t]*(?:\n|$))+/,kx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Tx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ui=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mn=/(?:[*+-]|\d{1,9}[.)])/,fu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mu=xt(fu).replace(/bull/g,mn).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(),wx=xt(fu).replace(/bull/g,mn).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(),yn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_x=/^[^\n]+/,Cn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bx=xt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Cn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vx=xt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mn).getRegex(),ts="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",xn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Lx=xt("^ {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",xn).replace("tag",ts).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yu=xt(yn).replace("hr",Ui).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",ts).getRegex(),Fx=xt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yu).getRegex(),bn={blockquote:Fx,code:kx,def:Bx,fences:Tx,heading:Sx,hr:Ui,html:Lx,lheading:mu,list:vx,newline:bx,paragraph:yu,table:Ei,text:_x},zl=xt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ui).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",ts).getRegex(),Ax={...bn,lheading:wx,table:zl,paragraph:xt(yn).replace("hr",Ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zl).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",ts).getRegex()},Ex={...bn,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xn).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:Ei,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(yn).replace("hr",Ui).replace("heading",` *#{1,6} *[^
158
+ ]`).replace("lheading",mu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Mx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$x=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cu=/^( {2,}|\\)\n(?!\s*$)/,Ox=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,es=/[\p{P}\p{S}]/u,kn=/[\s\p{P}\p{S}]/u,xu=/[^\s\p{P}\p{S}]/u,Ix=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kn).getRegex(),bu=/(?!~)[\p{P}\p{S}]/u,Dx=/(?!~)[\s\p{P}\p{S}]/u,Px=/(?:[^\s\p{P}\p{S}]|~)/u,Rx=xt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",xx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ku=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qx=xt(ku,"u").replace(/punct/g,es).getRegex(),Nx=xt(ku,"u").replace(/punct/g,bu).getRegex(),Tu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zx=xt(Tu,"gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,kn).replace(/punct/g,es).getRegex(),Wx=xt(Tu,"gu").replace(/notPunctSpace/g,Px).replace(/punctSpace/g,Dx).replace(/punct/g,bu).getRegex(),Hx=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,kn).replace(/punct/g,es).getRegex(),Yx=xt(/\\(punct)/,"gu").replace(/punct/g,es).getRegex(),Ux=xt(/^<(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(),jx=xt(xn).replace("(?:-->|$)","-->").getRegex(),Gx=xt("^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",jx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Po=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Xx=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Po).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Su=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",Po).replace("ref",Cn).getRegex(),wu=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Cn).getRegex(),Vx=xt("reflink|nolink(?!\\()","g").replace("reflink",Su).replace("nolink",wu).getRegex(),Wl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Tn={_backpedal:Ei,anyPunctuation:Yx,autolink:Ux,blockSkip:Rx,br:Cu,code:$x,del:Ei,emStrongLDelim:qx,emStrongRDelimAst:zx,emStrongRDelimUnd:Hx,escape:Mx,link:Xx,nolink:wu,punctuation:Ix,reflink:Su,reflinkSearch:Vx,tag:Gx,text:Ox,url:Ei},Zx={...Tn,link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Po).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Po).getRegex()},Ca={...Tn,emStrongRDelimAst:Wx,emStrongLDelim:Nx,url:xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wl).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:xt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wl).getRegex()},Kx={...Ca,br:xt(Cu).replace("{2,}","*").getRegex(),text:xt(Ca.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},oo={normal:bn,gfm:Ax,pedantic:Ex},mi={normal:Tn,gfm:Ca,breaks:Kx,pedantic:Zx},Qx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hl=e=>Qx[e];function Se(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Hl)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Hl);return e}function Yl(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function Ul(e,t){let r=e.replace(te.findPipe,(s,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(te.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(te.slashPipe,"|");return i}function yi(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function Jx(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 jl(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function tb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
159
+ `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
160
+ `)}var Ro=class{options;rules;lexer;constructor(t){this.options=t||xr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:yi(i,`
161
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=tb(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:o}}}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 o=yi(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:yi(r[0],`
162
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=yi(r[0],`
163
+ `).split(`
164
+ `),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
165
+ `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
166
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
167
+ ${h}`:h,s=s?`${s}
168
+ ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=p,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let f=u,m=f.raw+`
169
+ `+i.join(`
170
+ `),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-f.raw.length)+y.raw,s=s.substring(0,s.length-f.text.length)+y.text;break}else if(u?.type==="list"){let f=u,m=f.raw+`
171
+ `+i.join(`
172
+ `),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-u.raw.length)+y.raw,s=s.substring(0,s.length-f.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
173
+ `);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
174
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
175
+ `,1)[0],f=!p.trim(),m=0;if(this.options.pedantic?(m=2,d=p.trimStart()):f?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=p.slice(m),m+=r[1].length),f&&this.rules.other.blankLine.test(u)&&(h+=u+`
176
+ `,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),S=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(`
177
+ `,1)[0],v;if(u=E,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),v=u):v=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||w.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(v.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
178
+ `+v.slice(m);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||w.test(p)||k.test(p))break;d+=`
179
+ `+u}!f&&!u.trim()&&(f=!0),h+=E+`
180
+ `,t=t.substring(E.length+1),p=v.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!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,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(p=>p.type==="space"),d=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Ul(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
181
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(Ul(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}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)===`
182
+ `?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 a=yi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Jx(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),jl(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return jl(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,p=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}let u=p.slice(2,-2);return{type:"strong",raw:p,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}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}}}},ue=class xa{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||xr,this.options.tokenizer=this.options.tokenizer||new Ro,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:te,block:oo.normal,inline:mi.normal};this.options.pedantic?(r.block=oo.pedantic,r.inline=mi.pedantic):this.options.gfm&&(r.block=oo.gfm,this.options.breaks?r.inline=mi.breaks:r.inline=mi.gfm),this.tokenizer.rules=r}static get rules(){return{block:oo,inline:mi}}static lex(t,r){return new xa(r).lex(t)}static lexInline(t,r){return new xa(r).inlineTokens(t)}lex(t){t=t.replace(te.carriageReturn,`
183
+ `),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){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.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 a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
184
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
185
+ `)?"":`
186
+ `)+o.raw,a.text+=`
187
+ `+o.text,this.inlineQueue.at(-1).src=a.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 a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
188
+ `)?"":`
189
+ `)+o.raw,a.text+=`
190
+ `+o.raw,this.inlineQueue.at(-1).src=a.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 s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
191
+ `)?"":`
192
+ `)+o.raw,a.text+=`
193
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
194
+ `)?"":`
195
+ `)+o.raw,a.text+=`
196
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},d),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);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 r}},qo=class{options;parser;constructor(t){this.options=t||xr}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(te.notSpaceStart)?.[0],s=t.replace(te.endingNewline,"")+`
197
+ `;return o?'<pre><code class="language-'+Se(o)+'">'+(i?s:Se(s,!0))+`</code></pre>
198
+ `:"<pre><code>"+(i?s:Se(s,!0))+`</code></pre>
199
+ `}blockquote({tokens:t}){return`<blockquote>
200
+ ${this.parser.parse(t)}</blockquote>
201
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
202
+ `}hr(t){return`<hr>
203
+ `}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
204
+ `+o+"</"+s+`>
205
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+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=i+" "+Se(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
206
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
207
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
208
+ <thead>
209
+ `+r+`</thead>
210
+ `+o+`</table>
211
+ `}tablerow({text:t}){return`<tr>
212
+ ${t}</tr>
213
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
214
+ `}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 o=this.parser.parseInline(i),s=Yl(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Se(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=Yl(t);if(s===null)return Se(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Se(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Se(t.text)}},Sn=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""}},pe=class ba{options;renderer;textRenderer;constructor(t){this.options=t||xr,this.options.renderer=this.options.renderer||new qo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Sn}static parse(t,r){return new ba(r).parse(t)}static parseInline(t,r){return new ba(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
215
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},wi=class{options;block;constructor(t){this.options=t||xr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ue.lex:ue.lexInline}provideParser(){return this.block?pe.parse:pe.parseInline}},eb=class{defaults=fn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=pe;Renderer=qo;TextRenderer=Sn;Lexer=ue;Tokenizer=Ro;Hooks=wi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new qo(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ro(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new wi;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];wi.passThroughHooks.has(a)?s[n]=h=>{if(this.defaults.async&&wi.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await l.call(s,h);return c.call(s,p)})();let d=l.call(s,h);return c.call(s,d)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,h);return p===!1&&(p=await c.apply(s,h)),p})();let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ue.lex(t,r??this.defaults)}parser(t,r){return pe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ue.lex:ue.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?pe.parse:pe.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?ue.lex:ue.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?pe.parse:pe.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
216
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Se(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},yr=new eb;function kt(e,t){return yr.parse(e,t)}kt.options=kt.setOptions=function(e){return yr.setOptions(e),kt.defaults=yr.defaults,gu(kt.defaults),kt};kt.getDefaults=fn;kt.defaults=xr;kt.use=function(...e){return yr.use(...e),kt.defaults=yr.defaults,gu(kt.defaults),kt};kt.walkTokens=function(e,t){return yr.walkTokens(e,t)};kt.parseInline=yr.parseInline;kt.Parser=pe;kt.parser=pe.parse;kt.Renderer=qo;kt.TextRenderer=Sn;kt.Lexer=ue;kt.lexer=ue.lex;kt.Tokenizer=Ro;kt.Hooks=wi;kt.parse=kt;kt.options;kt.setOptions;kt.use;kt.walkTokens;kt.parseInline;pe.parse;ue.lex;function _u(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 o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(o.length){var s=new RegExp(`
217
+ [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
218
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
219
+ `)&&(d=String(n).split(`
220
+ `).map(function(p,u){return u===0?p:"".concat(h).concat(p)}).join(`
221
+ `)),a+=d+i[l+1]}),a}var rb={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,Bu=new Map,ib=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(q.debug("Registering icon pack:",t.name),"loader"in t)Bu.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"),vu=g(async(e,t)=>{const r=ox(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 o=ka.get(i);if(!o){const a=Bu.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},ka.set(i,o)}catch(n){throw q.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=nx(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),ob=g(async e=>{try{return await vu(e),!0}catch{return!1}},"isIconAvailable"),ji=g(async(e,t,r)=>{let i;try{i=await vu(e,t?.fallbackPrefix)}catch(a){q.error(a),i=rb}const o=gx(i,t),s=Cx(yx(o.body),{...o.attributes,...r});return ye(s,vt())},"getIconSVG");function Lu(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
222
+ `).replace(/\n{2,}/g,`
223
+ `);return _u(i)}g(Lu,"preprocessMarkdown");function Fu(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(Fu,"nonMarkdownToLines");function Au(e,t={}){const r=Lu(e,t),i=kt.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
224
+ `).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(p=>{p=p.replace(/&#39;/g,"'"),p&&o[s].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}g(Au,"markdownToLines");function Eu(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(Eu,"nonMarkdownToHTML");function Mu(e,{markdownAutoWrap:t}={}){const r=kt.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(q.warn(`Unsupported markdown: ${o.type}`),o.raw)}return g(i,"output"),r.map(i).join("")}g(Mu,"markdownToHTML");function $u(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g($u,"splitTextToChars");function Ou(e,t){const r=$u(t.content);return wn(e,[],r,t.type)}g(Ou,"splitWordToFitWidth");function wn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?wn(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(wn,"splitWordToFitWidthRecursion");function Iu(e,t){if(e.some(({content:r})=>r.includes(`
225
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return No(e,t)}g(Iu,"splitLineToFitWidth");function No(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return No(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=Ou(t,s);r.push([n]),l.content&&e.unshift(l)}return No(e,t,r)}g(No,"splitLineToFitWidthRecursion");function Ta(e,t){t&&e.attr("style",t)}g(Ta,"applyStyle");var Gl=16384;async function Du(e,t,r,i,o=!1,s=vt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Gl)}px`),a.attr("height",`${Math.min(10*r,Gl)}px`);const n=a.append("xhtml:div"),l=$i(t.label)?await Hh(t.label.replace(Wi.lineBreakRegex,`
226
+ `),s):ye(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Ta(h,t.labelStyle),h.attr("class",`${c} ${i}`),Ta(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}g(Du,"addHtmlSpan");function rs(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}g(rs,"createTspan");function Pu(e,t,r){const i=e.append("text"),o=rs(i,1,t);is(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}g(Pu,"computeWidthOfText");function sb(e,t,r){const i=e.append("text"),o=rs(i,1,t);is(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}g(sb,"computeDimensionOfText");function Ru(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>Pu(a,1.1,u)<=e,"checkWidth"),p=d(h)?[h]:Iu(h,d);for(const u of p){const f=rs(l,c,1.1,o);is(f,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}g(Ru,"createFormattedText");function Sa(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(Sa,"decodeHTMLEntities");function is(e,t){e.text(""),t.forEach((r,i)=>{const o=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?o.text(Sa(r.content)):o.text(" "+Sa(r.content))})}g(is,"updateTextContentAndStyles");async function qu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await ob(n)?await ji(n,void 0,{class:"label-icon"}):`<i class='${ye(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(qu,"replaceIconSubstring");var qe=g(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(q.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?Mu(t,h):Eu(t),p=await qu(mr(d),h),u=t.replace(/\\\\/g,"\\"),f={isNode:n,label:$i(t)?u:p,labelStyle:r.replace("fill:","color:")};return await Du(e,f,l,o,c,h)}else{const d=mr(t.replace(/<br\s*\/?>/g,"<br/>")),p=a?Au(d.replace("<br>","<br/>"),h):Fu(d),u=Ru(l,e,p,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(u).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(u).select("rect").attr("style",f.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(u).select("text").attr("style",m)}return i?lt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):lt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Is(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function ab(e,t){return e[0]===t[0]&&e[1]===t[1]}function nb(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)Is(c,n,o);const l=(function(c,h,d){const p=[];for(const b of c){const k=[...b];ab(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const u=[];h=Math.max(h,.1);const f=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],w=b[k+1];if(S[1]!==w[1]){const _=Math.min(S[1],w[1]);f.push({ymin:_,ymax:Math.max(S[1],w[1]),x:_===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(f.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!f.length)return u;let m=[],y=f[0].ymin,C=0;for(;m.length||f.length;){if(f.length){let b=-1;for(let k=0;k<f.length&&!(f[k].ymin>y);k++)b=k;f.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const S=m[b].edge,w=m[k].edge;u.push([[Math.round(S.x),y],[Math.round(w.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(a,s,i);if(o){for(const c of a)Is(c,n,-o);(function(c,h,d){const p=[];c.forEach((u=>p.push(...u))),Is(p,h,d)})(l,n,-o)}return l}function Gi(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),nb(e,o,i,s||1)}class _n{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Gi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}}function os(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 lb extends _n{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=Gi(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of o)os([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class hb extends _n{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}}class cb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const l=os(n),c=l/o,h=Math.ceil(c)-1,d=l-h*o,p=(n[0][0]+n[1][0])/2-o/4,u=Math.min(n[0][1],n[1][1]);for(let f=0;f<h;f++){const m=u+d+f*o,y=p-a+2*Math.random()*a,C=m-a+2*Math.random()*a,b=this.helper.ellipse(y,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class db{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gi(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,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=os(a),l=Math.floor(n/(i+o)),c=(n+o-l*(i+o))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const p=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const f=u*(i+o),m=f+i,y=[h[0]+f*Math.cos(p)+c*Math.cos(p),h[1]+f*Math.sin(p)+c*Math.sin(p)],C=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),s}}class ub{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=Gi(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=os(s),n=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,u=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],C=[m[0]+f*Math.cos(h+Math.PI/4),m[1]+f*Math.sin(h+Math.PI/4)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),o}}const re={};class pb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const gb=0,Ds=1,Xl=2,so={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 Ps(e,t){return e.type===t}function Bn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:gb,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ds,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Xl,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!Ps(s,Xl);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Bn("M0,0"+e);o++,a=so[s.text],i=s.text}else Ps(s,Ds)?a=so[i]:(o++,a=so[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let l=o;l<o+a;l++){const c=r[l];if(!Ps(c,Ds))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof so[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Nu(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function zu(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,o]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],o=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,o]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,o]});break;case"V":o=h[0],t.push({key:"L",data:[i,o]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=o+(o-l)):(d=i,p=o),t.push({key:"C",data:[d,p,...h]}),n=h[0],l=h[1],i=h[2],o=h[3];break}case"T":{const[d,p]=h;let u=0,f=0;r==="Q"||r==="T"?(u=i+(i-n),f=o+(o-l)):(u=i,f=o);const m=i+2*(u-i)/3,y=o+2*(f-o)/3,C=d+2*(u-d)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[m,y,C,b,d,p]}),n=u,l=f,i=d,o=p;break}case"Q":{const[d,p,u,f]=h,m=i+2*(d-i)/3,y=o+2*(p-o)/3,C=u+2*(d-u)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,y,C,b,u,f]}),n=d,l=p,i=u,o=f;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),u=h[2],f=h[3],m=h[4],y=h[5],C=h[6];d===0||p===0?(t.push({key:"C",data:[i,o,y,C,y,C]}),i=y,o=C):(i!==y||o!==C)&&(Wu(i,o,y,C,d,p,u,f,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,o=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function Ci(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Wu(e,t,r,i,o,s,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let p=[],u=0,f=0,m=0,y=0;if(c)[u,f,m,y]=c;else{[e,t]=Ci(e,t,-h),[r,i]=Ci(r,i,-h);const z=(e-r)/2,D=(t-i)/2;let A=z*z/(o*o)+D*D/(s*s);A>1&&(A=Math.sqrt(A),o*=A,s*=A);const L=o*o,O=s*s,P=L*O-L*D*D-O*z*z,H=L*D*D+O*z*z,j=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));m=j*o*D/s+(e+r)/2,y=j*-s*z/o+(t+i)/2,u=Math.asin(parseFloat(((t-y)/s).toFixed(9))),f=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(f=Math.PI-f),u<0&&(u=2*Math.PI+u),f<0&&(f=2*Math.PI+f),l&&u>f&&(u-=2*Math.PI),!l&&f>u&&(f-=2*Math.PI)}let C=f-u;if(Math.abs(C)>120*Math.PI/180){const z=f,D=r,A=i;f=l&&f>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Wu(r=m+o*Math.cos(f),i=y+s*Math.sin(f),D,A,o,s,a,0,l,[f,z,m,y])}C=f-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(f),w=Math.sin(f),_=Math.tan(C/4),E=4/3*o*_,v=4/3*s*_,N=[e,t],I=[e+E*k,t-v*b],R=[r+E*w,i-v*S],W=[r,i];if(I[0]=2*N[0]-I[0],I[1]=2*N[1]-I[1],c)return[I,R,W].concat(p);{p=[I,R,W].concat(p);const z=[];for(let D=0;D<p.length;D+=3){const A=Ci(p[D][0],p[D][1],h),L=Ci(p[D+1][0],p[D+1][1],h),O=Ci(p[D+2][0],p[D+2][1],h);z.push([A[0],A[1],L[0],L[1],O[0],O[1]])}return z}}const fb={randOffset:function(e,t){return it(e,t)},randOffsetWithRange:function(e,t,r){return zo(e,t,r)},ellipse:function(e,t,r,i,o){const s=Yu(r,i,o);return wa(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return Je(e,t,r,i,o,!0)}};function Hu(e,t,r,i,o){return{type:"path",ops:Je(e,t,r,i,o)}}function Co(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...Je(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...Je(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?Hu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function mb(e,t,r,i,o){return(function(s,a){return Co(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function Vl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ao(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:ao(r[0],1.5*(1+.22*t.roughness),Ql(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=ao(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ao(a,1.5*(1+.22*t.roughness),Ql(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Yu(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=it(a*l,r),n+=it(n*l,r),{increment:s,rx:a,ry:n}}function wa(e,t,r,i){const[o,s]=Jl(i.increment,e,t,i.rx,i.ry,1,i.increment*zo(.1,zo(.4,1,r),r),r);let a=Wo(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Jl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Wo(n,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function Zl(e,t,r,i,o,s,a,n,l){const c=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=it(.01*d,l),p+=it(.01*p,l);let u=o,f=s;for(;u<0;)u+=2*Math.PI,f+=2*Math.PI;f-u>2*Math.PI&&(u=0,f=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(f-u)/2),C=th(y,c,h,d,p,u,f,1,l);if(!l.disableMultiStroke){const b=th(y,c,h,d,p,u,f,1.5,l);C.push(...b)}return a&&(n?C.push(...Je(c,h,c+d*Math.cos(u),h+p*Math.sin(u),l),...Je(c,h,c+d*Math.cos(f),h+p*Math.sin(f),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+p*Math.sin(u)]})),{type:"path",ops:C}}function Kl(e,t){const r=zu(Nu(Bn(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...Je(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,d,p,u]=n;i.push(...yb(l,c,h,d,p,u,s,t)),s=[p,u];break}case"Z":i.push(...Je(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function Rs(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+it(o,t),i[0][1]+it(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+it(o,t),i[a][1]+it(o,t)]})}}return{type:"fillPath",ops:r}}function Lr(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!re[o])switch(o){case"zigzag":re[o]||(re[o]=new lb(i));break;case"cross-hatch":re[o]||(re[o]=new hb(i));break;case"dots":re[o]||(re[o]=new cb(i));break;case"dashed":re[o]||(re[o]=new db(i));break;case"zigzag-line":re[o]||(re[o]=new ub(i));break;default:o="hachure",re[o]||(re[o]=new _n(i))}return re[o]})(t,fb).fillPolygons(e,t)}function Ql(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Uu(e){return e.randomizer||(e.randomizer=new pb(e.seed||0)),e.randomizer.next()}function zo(e,t,r,i=1){return r.roughness*i*(Uu(r)*(t-e)+e)}function it(e,t,r=1){return zo(-e,e,t,r)}function Je(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=_a(e,t,r,i,o,!0,!1);if(a)return n;const l=_a(e,t,r,i,o,!0,!0);return n.concat(l)}function _a(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=o.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,p=.2+.2*Uu(o);let u=o.bowing*o.maxRandomnessOffset*(i-t)/200,f=o.bowing*o.maxRandomnessOffset*(e-r)/200;u=it(u,o,c),f=it(f,o,c);const m=[],y=()=>it(d,o,c),C=()=>it(h,o,c),b=o.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:it(h,o,c)),t+(b?0:it(h,o,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*p+y(),f+t+(i-t)*p+y(),u+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*p+C(),f+t+(i-t)*p+C(),u+e+2*(r-e)*p+C(),f+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),m}function ao(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+it(t,r),e[0][1]+it(t,r)]),i.push([e[0][0]+it(t,r),e[0][1]+it(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+it(t,r),e[o][1]+it(t,r)]),o===e.length-1&&i.push([e[o][0]+it(t,r),e[o][1]+it(t,r)]);return Wo(i,null,r)}function Wo(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(..._a(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function Jl(e,t,r,i,o,s,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+o*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const h=it(.5,n)-Math.PI/2;c.push([it(s,n)+t+.9*i*Math.cos(h-e),it(s,n)+r+.9*o*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const u=[it(s,n)+t+i*Math.cos(p),it(s,n)+r+o*Math.sin(p)];l.push(u),c.push(u)}c.push([it(s,n)+t+i*Math.cos(h+2*Math.PI+.5*a),it(s,n)+r+o*Math.sin(h+2*Math.PI+.5*a)]),c.push([it(s,n)+t+.98*i*Math.cos(h+a),it(s,n)+r+.98*o*Math.sin(h+a)]),c.push([it(s,n)+t+.9*i*Math.cos(h+.5*a),it(s,n)+r+.9*o*Math.sin(h+.5*a)])}return[c,l]}function th(e,t,r,i,o,s,a,n,l){const c=s+it(.1,l),h=[];h.push([it(n,l)+t+.9*i*Math.cos(c-e),it(n,l)+r+.9*o*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([it(n,l)+t+i*Math.cos(d),it(n,l)+r+o*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),Wo(h,null,l)}function yb(e,t,r,i,o,s,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(p?0:it(c[0],n)),a[1]+(p?0:it(c[0],n))]}),h=p?[o,s]:[o+it(c[u],n),s+it(c[u],n)],l.push({op:"bcurveTo",data:[e+it(c[u],n),t+it(c[u],n),r+it(c[u],n),i+it(c[u],n),h[0],h[1]]});return l}function xi(e){return[...e]}function eh(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(xi(e[0]),xi(e[1]),xi(e[2]),xi(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(xi(o[0]));for(let n=1;n+2<o.length;n++){const l=o[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*o[n+1][0]-a*o[n-1][0])/6,l[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function xo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Cb(e,t,r){const i=xo(t,r);if(i===0)return xo(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),xo(e,lr(t,r,o))}function lr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ba(e,t,r,i){const o=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],p=n[l+3];let u=3*h[0]-2*c[0]-p[0];u*=u;let f=3*h[1]-2*c[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-c[0];m*=m;let y=3*d[1]-2*p[1]-c[1];return y*=y,u<m&&(u=m),f<y&&(f=y),u+f})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(xo(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],p=lr(l,c,.5),u=lr(c,h,.5),f=lr(h,d,.5),m=lr(p,u,.5),y=lr(u,f,.5),C=lr(m,y,.5);Ba([l,p,m,C],0,r,o),Ba([C,y,f,d],0,r,o)}var s,a;return o}function xb(e,t){return Ho(e,0,e.length,t)}function Ho(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=Cb(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Ho(e,t,c+1,i,s),Ho(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function qs(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)Ba(e,3*s,t,i);return r&&r>0?Ho(i,0,i.length,r):i}const se="none";class Yo{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,o,s){const a=this._o(s);return this._d("line",[Hu(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],l=mb(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(Rs([c],a)):n.push(Lr([c],a))}return a.stroke!==se&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],l=Yu(i,o,a),c=wa(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=wa(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Lr([c.estimatedPoints],a));return a.stroke!==se&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Co(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,l){const c=this._o(l),h=[],d=Zl(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const u=Zl(t,r,i,o,s,a,!0,!1,p);u.type="fillPath",h.push(u)}else h.push((function(p,u,f,m,y,C,b){const k=p,S=u;let w=Math.abs(f/2),_=Math.abs(m/2);w+=it(.01*w,b),_+=it(.01*_,b);let E=y,v=C;for(;E<0;)E+=2*Math.PI,v+=2*Math.PI;v-E>2*Math.PI&&(E=0,v=2*Math.PI);const N=(v-E)/b.curveStepCount,I=[];for(let R=E;R<=v;R+=N)I.push([k+w*Math.cos(R),S+_*Math.sin(R)]);return I.push([k+w*Math.cos(v),S+_*Math.sin(v)]),I.push([k,S]),Lr([I],b)})(t,r,i,o,s,a,c));return c.stroke!==se&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),o=[],s=Vl(t,i);if(i.fill&&i.fill!==se)if(i.fillStyle==="solid"){const a=Vl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...qs(eh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...qs(eh(c),10,(1+i.roughness)/2))}a.length&&o.push(Lr([a],i))}return i.stroke!==se&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=Co(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(Rs([t],i)):o.push(Lr([t],i))),i.stroke!==se&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==se,a=i.stroke!==se,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,p){const u=zu(Nu(Bn(h))),f=[];let m=[],y=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...qs(C,d)),C=[]},k=()=>{b(),m.length&&(f.push(m),m=[])};for(const{key:w,data:_}of u)switch(w){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!C.length){const E=m.length?m[m.length-1]:y;C.push([E[0],E[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!p)return f;const S=[];for(const w of f){const _=xb(w,p);_.length&&S.push(_)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Kl(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=Kl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else o.push(Rs(l,i));else o.push(Lr(l,i));return a&&(n?l.forEach((h=>{o.push(Co(h,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:se};break;case"fillPath":a={d:this.opsToPath(s),stroke:se,strokeWidth:0,fill:i.fill||se};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||se,strokeWidth:i,fill:se}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class bb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Yo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const no="http://www.w3.org/2000/svg";class kb{constructor(t,r){this.svg=t,this.gen=new Yo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(no,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=o.createElementNS(no,"path"),l.setAttribute("d",this.opsToPath(n,a)),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=o.createElementNS(no,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(o,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(no,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var X={canvas:(e,t)=>new bb(e,t),svg:(e,t)=>new kb(e,t),generator:e=>new Yo(e),newSeed:()=>Yo.newSeed()},rt=g(async(e,t,r)=>{let i;const o=t.useHtmlLabels||Re(Ct()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await qe(a,ye(mr(n),Ct()),{useHtmlLabels:o,width:t.width||Ct().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Ct());let d=h.getBBox();const p=(t?.padding??0)/2;if(o){const u=h.children[0],f=lt(h);await du(u,n),d=u.getBoundingClientRect(),f.attr("width",d.width),f.attr("height",d.height)}return o?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:p,label:a}},"labelHelper"),Ns=g(async(e,t,r)=>{const i=r.useHtmlLabels??ee(Ct()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await qe(o,ye(mr(t),Ct()),{useHtmlLabels:i,width:r.width||Ct()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=s.getBBox();const n=r.padding/2;if(ee(Ct())){const l=s.children[0],c=lt(s);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):o.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:o}},"insertLabel"),K=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),et=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(pt,"createPathFromPoints");function tr(e,t,r,i,o,s){const a=[],l=r-e,c=i-t,h=l/s,d=2*Math.PI/h,p=t+c/2;for(let u=0;u<=50;u++){const f=u/50,m=e+f*l,y=p+o*Math.sin(d*(m-e));a.push({x:m,y})}return a}g(tr,"generateFullSineWavePoints");function Ri(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);a.push({x:-u,y:-f})}return a}g(Ri,"generateCirclePoints");function va(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 o=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=g((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(o){const l={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(va,"mergePaths");var Tb=g((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),l=s===0?0:n*o/s,c=n):(o<0&&(a=-a),l=a,c=o===0?0:a*s/o),{x:r+l,y:i+c}},"intersectRect"),si=Tb,Sb=g(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=Ct(),n=ee(a);return await qe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Ge=Sb,er=g((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),ju=g(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label ");let f;t.labelType==="markdown"?f=await qe(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):f=await Ge(u,t.label,t.labelStyle||"",!1,!0);let m=f.getBBox();if(ee(r)){const E=f.children[0],v=lt(f);m=E.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const E=X.svg(d),v=V(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),N=E.path(er(b,k,y,C,0),v);S=d.insert(()=>(q.debug("Rough node insert CXC",N),N),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=gn(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const E=u.select("span");E&&E.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return si(t,E)},{cluster:d,labelBBox:m}},"rect"),wb=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return si(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_b=g(async(e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const u=await Ge(d,t.label,t.labelStyle,void 0,!0);let f=u.getBBox();if(ee(r)){const N=u.children[0],I=lt(u);f=N.getBoundingClientRect(),I.attr("width",f.width),I.attr("height",f.height)}const m=0*t.padding,y=m/2,C=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-f.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const _=t.y-t.height/2-y+f.height+2;let E;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),I=X.svg(c),R=t.rx||t.ry?I.path(er(S,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):I.rectangle(S,w,C,b,{seed:o});E=c.insert(()=>R,":first-child");const W=I.rectangle(S,_,C,k,{fill:N?s:a,fillStyle:N?"hachure":"solid",stroke:l,seed:o});E=c.insert(()=>R,":first-child"),p=c.insert(()=>W)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",_).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-f.width/2}, ${w+1-(ee(r)?0:3)})`);const v=E.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(N){return si(t,N)},{cluster:c,labelBBox:f}},"roundedWithTitle"),Bb=g(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label "),f=await qe(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(ee(r)){const E=f.children[0],v=lt(f);m=E.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const E=X.svg(d),v=V(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),N=E.path(er(b,k,y,C,t.rx),v);S=d.insert(()=>(q.debug("Rough node insert CXC",N),N),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=gn(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),n){const E=u.select("span");E&&E.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return si(t,E)},{cluster:d,labelBBox:m}},"kanbanSection"),vb=g((e,t)=>{const r=Ct(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,p=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=X.svg(a).rectangle(d,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const f=u.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return si(t,m)},{cluster:a,labelBBox:{}}},"divider"),Lb=ju,Fb={rect:ju,squareRect:Lb,roundedWithTitle:_b,noteGroup:wb,divider:vb,kanbanSection:Bb},Gu=new Map,Ab=g(async(e,t)=>{const r=t.shape||"rect",i=await Fb[r](e,t);return Gu.set(t.id,i),i},"insertCluster"),kS=g(()=>{Gu=new Map},"clear");function Xu(e,t){return e.intersect(t)}g(Xu,"intersectNode");var Eb=Xu;function Vu(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<o&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:o+c,y:s+h}}g(Vu,"intersectEllipse");var Zu=Vu;function Ku(e,t,r){return Zu(e,t,t,r)}g(Ku,"intersectCircle");var Mb=Ku;function Qu(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,l=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&l!==0&&La(n,l))return;const h=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+p,f=h*t.x+d*t.y+p;if(Math.abs(u)<c&&Math.abs(f)<c&&La(u,f))return;const m=o*d-h*s;if(m===0)return;const y=Math.abs(m/2);let C=s*p-d*a;const b=C<0?(C-y)/m:(C+y)/m;C=h*a-o*p;const k=C<0?(C-y)/m:(C+y)/m;return{x:b,y:k}}}g(Qu,"intersectLine");function La(e,t){return e*t>0}g(La,"sameSign");var $b=Qu;function Ju(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=o-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],p=t[h<t.length-1?h+1:0],u=$b(e,r,{x:l+d.x,y:c+d.y},{x:l+p.x,y:c+p.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(h,d){let p=h.x-r.x,u=h.y-r.y,f=Math.sqrt(p*p+u*u),m=d.x-r.x,y=d.y-r.y,C=Math.sqrt(m*m+y*y);return f<C?-1:f===C?0:1}),s[0]):e}g(Ju,"intersectPolygon");var Ob=Ju,G={node:Eb,circle:Mb,ellipse:Zu,polygon:Ob,rect:si};function tp(e,t){const{labelStyles:r}=Z(t);t.labelStyle=r;const i=et(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=X.svg(s),c=V(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=s.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Nt(n)),K(t,d),t.intersect=function(p){return q.info("Circle intersect",t,a,p),G.circle(t,a,p)},s}g(tp,"anchor");function Fa(e,t,r,i,o,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,u=d/o,f=p/s,m=Math.sqrt(u**2+f**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),C=l+y*s*Math.sin(h)*(a?-1:1),b=c-y*o*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/s,(e-C)/o);let w=Math.atan2((i-b)/s,(r-C)/o)-k;a&&w<0&&(w+=2*Math.PI),!a&&w>0&&(w-=2*Math.PI);const _=[];for(let E=0;E<20;E++){const v=E/19,N=k+v*w,I=C+o*Math.cos(N),R=b+s*Math.sin(N);_.push({x:I,y:R})}return _}g(Fa,"generateArcPoints");function ep(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}g(ep,"calculateArcSagitta");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=g(N=>N+a,"calcTotalHeight"),l=g(N=>{const I=N/2;return[I/(2.5+N/50),I]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=n(t?.height?t?.height:h.height),[p,u]=l(d),f=ep(d,p,u),y=(t?.width?t?.width:h.width)+s*2+f-f,C=d,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Fa(-y/2,-C/2,-y/2,C/2,p,u,!1),{x:y/2,y:C/2},...Fa(y/2,C/2,y/2,-C/2,p,u,!0)],S=X.svg(c),w=V(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=pt(k),E=S.path(_,w),v=c.insert(()=>E,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),K(t,v),t.intersect=function(N){return G.polygon(t,k,N)},c}g(rp,"bowTieRect");function Ne(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ne,"insertPolygonShape");var lo=12;async function ip(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+lo),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,p=c,u=-h,f=0,m=[{x:d+lo,y:u},{x:p,y:u},{x:p,y:f},{x:d,y:f},{x:d,y:u+lo},{x:d+lo,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=V(t,{}),S=pt(m),w=b.path(S,k);y=n.insert(()=>w,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&y.attr("style",C)}else y=Ne(n,c,h,m);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return G.polygon(t,m,b)},n}g(ip,"card");function op(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=X.svg(i),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=pt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return G.polygon(t,a,p)},i}g(op,"choice");async function vn(e,t,r){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await rt(e,t,et(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=X.svg(s),f=V(t,{}),m=u.circle(0,0,h*2,f);d=s.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Nt(p))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return K(t,d),t.calcIntersect=function(u,f){const m=u.width/2;return G.circle(u,m,f)},t.intersect=function(u){return q.info("Circle intersect",t,h,u),G.circle(t,h,u)},s}g(vn,"circle");function sp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},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};return`M ${s.x},${s.y} L ${n.x},${n.y}
227
+ M ${o.x},${o.y} L ${a.x},${a.y}`}g(sp,"createLine");function ap(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=X.svg(o),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=sp(s),d=n.path(h,l),p=o.insert(()=>c,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),K(t,p),t.intersect=function(u){return q.info("crossedCircle intersect",t,{radius:s,point:u}),G.circle(t,s,u)},o}g(ap,"crossedCircle");function Me(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);a.push({x:-u,y:-f})}return a}g(Me,"generateCirclePoints");async function np(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...Me(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Me(c/2+d*2,-d,d,20,-180,-270),...Me(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Me(c/2,h/2,d,20,0,90)],f=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Me(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Me(c/2+c*.1,-d,d,20,-180,-270),...Me(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Me(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(u).replace("Z",""),k=m.path(b,y),S=pt(f),w=m.path(S,{...y}),_=o.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,f,E)},o}g(np,"curlyBraceLeft");function $e(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);a.push({x:u,y:f})}return a}g($e,"generateCirclePoints");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...$e(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...$e(c/2+d*2,-d,d,20,-180,-270),...$e(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...$e(c/2,h/2,d,20,0,90)],f=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...$e(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...$e(c/2+d*2,-d,d,20,-180,-270),...$e(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...$e(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(u).replace("Z",""),k=m.path(b,y),S=pt(f),w=m.path(S,{...y}),_=o.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,f,E)},o}g(lp,"curlyBraceRight");function Wt(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,u=e+r*Math.cos(p),f=t+r*Math.sin(p);a.push({x:-u,y:-f})}return a}g(Wt,"generateCirclePoints");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,u=[...Wt(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Wt(c/2+d*2,-d,d,20,-180,-270),...Wt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Wt(c/2,h/2,d,20,0,90)],f=[...Wt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Wt(-c/2-d/2,-d,d,20,0,90),...Wt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Wt(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Wt(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Wt(c/2+d*2,-d,d,20,-180,-270),...Wt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Wt(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Wt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Wt(-c/2-d/2,-d,d,20,0,90),...Wt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Wt(-c/2+d+d/2,h/2,d,30,-180,-270)],y=X.svg(o),C=V(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(u).replace("Z",""),S=y.path(k,C),_=pt(f).replace("Z",""),E=y.path(_,C),v=pt(m),N=y.path(v,{...C}),I=o.insert("g",":first-child");return I.insert(()=>N,":first-child").attr("stroke-opacity",0),I.insert(()=>S,":first-child"),I.insert(()=>E,":first-child"),I.attr("class","text"),p&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,I),t.intersect=function(R){return G.polygon(t,m,R)},o}g(hp,"curlyBraces");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,l=5,{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=Math.max(n,(h.width+s*2)*1.25,t?.width??0),p=Math.max(l,h.height+a*2,t?.height??0),u=p/2,{cssStyles:f}=t,m=X.svg(c),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,b=p,k=C-u,S=b/4,w=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...Ri(-k,-b/2,u,50,270,90)],_=pt(w),E=m.path(_,y),v=c.insert(()=>E,":first-child");return v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-p/2})`),K(t,v),t.intersect=function(N){return G.polygon(t,w,N)},c}g(cp,"curvedTrapezoid");var Ib=g((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Db=g((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Pb=g((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),rh=8,ih=8;async function dp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<ih&&(t.width=ih);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<rh&&(t.height=rh)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t.width?t.width:l.width)+a,d=h/2,p=d/(2.5+h/50),u=(t.height?t.height:l.height)+s+p;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=X.svg(n),C=Db(0,0,h,u,d,p),b=Pb(0,p,h,u,d,p),k=V(t,{}),S=y.path(C,k),w=y.path(b,V(t,{fill:"none"}));f=n.insert(()=>w,":first-child"),f=n.insert(()=>S,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const y=Ib(0,0,h,u,d,p);f=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(m)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-h/2}, ${-(u/2+p)})`),K(t,f),c.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=G.rect(t,y),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}g(dp,"cylinder");async function ai(e,t,r){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await rt(e,t,et(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:p,ry:u}=t;const{cssStyles:f}=t;if(r?.rx&&r.ry&&(p=r.rx,u=r.ry),t.look==="handDrawn"){const m=X.svg(s),y=V(t,{}),C=p||u?m.path(er(c,h,n,l,p||0),y):m.rectangle(c,h,n,l,y);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Nt(f))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",Nt(p)).attr("ry",Nt(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return K(t,d),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},s}g(ai,"drawRect");async function up(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await ai(e,t,l);if(t.look==="handDrawn"){const u=X.svg(c),f=V(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return c;return c.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,f),".basic.label-container g.label"),c.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,f),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,p=(Number(h.attr("height"))||n)??0;return d>0&&p>0&&h.attr("stroke-dasharray",`${d} ${p}`),c}g(up,"datastore");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=n.width+o,h=n.height+s,d=h*.2,p=-c/2,u=-h/2-d/2,{cssStyles:f}=t,m=X.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:p,y:u+d},{x:-p,y:u+d},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+d}],b=m.polygon(C.map(S=>[S.x,S.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),K(t,k),t.intersect=function(S){return G.rect(t,S)},a}g(pp,"dividedRectangle");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-o;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=X.svg(n),f=V(t,{roughness:.2,strokeWidth:2.5}),m=V(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,f),C=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Nt(t.cssClasses)).attr("style",Nt(p)),d.node()?.appendChild(y),d.node()?.appendChild(C)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),f=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return K(t,d),t.intersect=function(u){return q.info("DoubleCircle intersect",t,c,u),G.circle(t,c,u)},n}g(gp,"doublecircle");function fp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=X.svg(s),{nodeBorder:c}=r,h=V(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),p=s.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),K(t,p),t.intersect=function(u){return q.info("filledCircle intersect",t,{radius:a,point:u}),G.circle(t,a,u)},s}g(fp,"filledCircle");var oh=10,sh=10;async function mp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<oh&&(t.height=oh),t.width=(t?.width??0)-s-s/2,t.width<sh&&(t.width=sh));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,d=h,p=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,f=X.svg(a),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=pt(p),C=f.path(y,m),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,K(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return q.info("Triangle intersect",t,p,k),G.polygon(t,p,k)},a}g(mp,"flippedTriangle");function yp(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=Z(t);t.label="";const a=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,p=X.svg(a),u=V(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=p.rectangle(h,d,l,c,u),m=a.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),K(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return G.rect(t,C)},a}g(yp,"forkJoin");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:l,bbox:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:Math.max(o,c.width))+a*2,d=(t?.height?t?.height:Math.max(s,c.height))+n*2,p=d/2,{cssStyles:u}=t,f=X.svg(l),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-p,y:-d/2},...Ri(-h/2+p,0,p,50,90,270),{x:h/2-p,y:d/2},{x:-h/2,y:d/2}],C=pt(y),b=f.path(C,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(S){return q.info("Pill intersect",t,{radius:p,point:S}),G.polygon(t,y,S)},l}g(Cp,"halfRoundedRectangle");var Rb=g((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function xp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,l=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const k=(t.height??0)/o;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await rt(e,t,et(t)),p=(t?.height?t?.height:d.height)+l,u=p/o,f=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:f-u,y:0},{x:f,y:-p/2},{x:f-u,y:-p},{x:u,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(h),k=V(t,{}),S=Rb(0,0,f,p,u),w=b.path(S,k);y=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),C&&y.attr("style",C)}else y=Ne(h,f,p,m);return i&&y.attr("style",i),t.width=f,t.height=p,K(t,y),t.intersect=function(b){return G.polygon(t,m,b)},h}g(xp,"hexagon");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await rt(e,t,et(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=X.svg(o),c=V(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],d=pt(h),p=l.path(d,c),u=o.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-a/2})`),K(t,u),t.intersect=function(f){return q.info("Pill intersect",t,{points:h}),G.polygon(t,h,f)},o}g(bp,"hourglass");async function kp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await rt(e,t,"icon-shape default"),p=t.pos==="t",u=n,f=n,{nodeBorder:m}=r,{stylesMap:y}=oi(t),C=-f/2,b=-u/2,k=t.label?8:0,S=X.svg(c),w=V(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=S.rectangle(C,b,f,u,w),E=Math.max(f,h.width),v=u+h.height+k,N=S.rectangle(-E/2,-v/2,E,v,{...w,fill:"transparent",stroke:"none"}),I=c.insert(()=>_,":first-child"),R=c.insert(()=>N);if(t.icon){const W=c.append("g");W.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const z=W.node().getBBox(),D=z.width,A=z.height,L=z.x,O=z.y;W.attr("transform",`translate(${-D/2-L},${p?h.height/2+k/2-A/2-O:-h.height/2-k/2-A/2-O})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-v/2:v/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),K(t,R),t.intersect=function(W){if(q.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const z=t.x??0,D=t.y??0,A=t.height??0;let L=[];return p?L=[{x:z-h.width/2,y:D-A/2},{x:z+h.width/2,y:D-A/2},{x:z+h.width/2,y:D-A/2+h.height+k},{x:z+f/2,y:D-A/2+h.height+k},{x:z+f/2,y:D+A/2},{x:z-f/2,y:D+A/2},{x:z-f/2,y:D-A/2+h.height+k},{x:z-h.width/2,y:D-A/2+h.height+k}]:L=[{x:z-f/2,y:D-A/2},{x:z+f/2,y:D-A/2},{x:z+f/2,y:D-A/2+u},{x:z+h.width/2,y:D-A/2+u},{x:z+h.width/2/2,y:D+A/2},{x:z-h.width/2,y:D+A/2},{x:z-h.width/2,y:D-A/2+u},{x:z-f/2,y:D-A/2+u}],G.polygon(t,L,W)},c}g(kp,"icon");async function Tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await rt(e,t,"icon-shape default"),p=20,u=t.label?8:0,f=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:C}=oi(t),b=X.svg(c),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??y;const w=c.append("g");t.icon&&w.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=w.node().getBBox(),E=_.width,v=_.height,N=_.x,I=_.y,R=Math.max(E,v)*Math.SQRT2+p*2,W=b.circle(0,0,R,k),z=Math.max(R,h.width),D=R+h.height+u,A=b.rectangle(-z/2,-D/2,z,D,{...k,fill:"transparent",stroke:"none"}),L=c.insert(()=>W,":first-child"),O=c.insert(()=>A);return w.attr("transform",`translate(${-E/2-N},${f?h.height/2+u/2-v/2-I:-h.height/2-u/2-v/2-I})`),w.attr("style",`color: ${C.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),L.attr("transform",`translate(0,${f?h.height/2+u/2:-h.height/2-u/2})`),K(t,O),t.intersect=function(P){return q.info("iconSquare intersect",t,P),G.rect(t,P)},c}g(Tp,"iconCircle");async function Sp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await rt(e,t,"icon-shape default"),u=t.pos==="t",f=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=oi(t),k=-m/2,S=-f/2,w=t.label?8:0,_=X.svg(c),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const v=b.get("fill");E.stroke=v??C;const N=_.path(er(k,S,m,f,5),E),I=Math.max(m,h.width),R=f+h.height+w,W=_.rectangle(-I/2,-R/2,I,R,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>N,":first-child").attr("class","icon-shape2"),D=c.insert(()=>W);if(t.icon){const A=c.append("g");A.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),O=L.width,P=L.height,H=L.x,j=L.y;A.attr("transform",`translate(${-O/2-H},${u?h.height/2+w/2-P/2-j:-h.height/2-w/2-P/2-j})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),z.attr("transform",`translate(0,${u?h.height/2+w/2:-h.height/2-w/2})`),K(t,D),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return G.rect(t,A);const L=t.x??0,O=t.y??0,P=t.height??0;let H=[];return u?H=[{x:L-h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2+h.height+w},{x:L+m/2,y:O-P/2+h.height+w},{x:L+m/2,y:O+P/2},{x:L-m/2,y:O+P/2},{x:L-m/2,y:O-P/2+h.height+w},{x:L-h.width/2,y:O-P/2+h.height+w}]:H=[{x:L-m/2,y:O-P/2},{x:L+m/2,y:O-P/2},{x:L+m/2,y:O-P/2+f},{x:L+h.width/2,y:O-P/2+f},{x:L+h.width/2/2,y:O+P/2},{x:L-h.width/2,y:O+P/2},{x:L-h.width/2,y:O-P/2+f},{x:L-m/2,y:O-P/2+f}],G.polygon(t,H,A)},c}g(Sp,"iconRounded");async function wp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Z(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await rt(e,t,"icon-shape default"),u=t.pos==="t",f=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=oi(t),k=-m/2,S=-f/2,w=t.label?8:0,_=X.svg(c),E=V(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const v=b.get("fill");E.stroke=v??C;const N=_.path(er(k,S,m,f,.1),E),I=Math.max(m,h.width),R=f+h.height+w,W=_.rectangle(-I/2,-R/2,I,R,{...E,fill:"transparent",stroke:"none"}),z=c.insert(()=>N,":first-child"),D=c.insert(()=>W);if(t.icon){const A=c.append("g");A.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=A.node().getBBox(),O=L.width,P=L.height,H=L.x,j=L.y;A.attr("transform",`translate(${-O/2-H},${u?h.height/2+w/2-P/2-j:-h.height/2-w/2-P/2-j})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),z.attr("transform",`translate(0,${u?h.height/2+w/2:-h.height/2-w/2})`),K(t,D),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return G.rect(t,A);const L=t.x??0,O=t.y??0,P=t.height??0;let H=[];return u?H=[{x:L-h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2},{x:L+h.width/2,y:O-P/2+h.height+w},{x:L+m/2,y:O-P/2+h.height+w},{x:L+m/2,y:O+P/2},{x:L-m/2,y:O+P/2},{x:L-m/2,y:O-P/2+h.height+w},{x:L-h.width/2,y:O-P/2+h.height+w}]:H=[{x:L-m/2,y:O-P/2},{x:L+m/2,y:O-P/2},{x:L+m/2,y:O-P/2+f},{x:L+h.width/2,y:O-P/2+f},{x:L+h.width/2/2,y:O+P/2},{x:L-h.width/2,y:O+P/2},{x:L-h.width/2,y:O-P/2+f},{x:L-m/2,y:O-P/2+f}],G.polygon(t,H,A)},c}g(wp,"iconSquare");async function _p(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=Z(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:p,label:u}=await rt(e,t,"image-shape default"),f=t.pos==="t",m=-c/2,y=-h/2,C=t.label?8:0,b=X.svg(d),k=V(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(m,y,c,h,k),w=Math.max(c,p.width),_=h+p.height+C,E=b.rectangle(-w/2,-_/2,w,_,{...k,fill:"none",stroke:"none"}),v=d.insert(()=>S,":first-child"),N=d.insert(()=>E);if(t.img){const I=d.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${f?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-h/2-p.height/2-C/2:h/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${f?p.height/2+C/2:-p.height/2-C/2})`),K(t,N),t.intersect=function(I){if(q.info("iconSquare intersect",t,I),!t.label)return G.rect(t,I);const R=t.x??0,W=t.y??0,z=t.height??0;let D=[];return f?D=[{x:R-p.width/2,y:W-z/2},{x:R+p.width/2,y:W-z/2},{x:R+p.width/2,y:W-z/2+p.height+C},{x:R+c/2,y:W-z/2+p.height+C},{x:R+c/2,y:W+z/2},{x:R-c/2,y:W+z/2},{x:R-c/2,y:W-z/2+p.height+C},{x:R-p.width/2,y:W-z/2+p.height+C}]:D=[{x:R-c/2,y:W-z/2},{x:R+c/2,y:W-z/2},{x:R+c/2,y:W-z/2+h},{x:R+p.width/2,y:W-z/2+h},{x:R+p.width/2/2,y:W+z/2},{x:R-p.width/2,y:W+z/2},{x:R-p.width/2,y:W-z/2+h},{x:R-c/2,y:W-z/2+h}],G.polygon(t,D,I)},d}g(_p,"imageSquare");async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(s??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),m=V(t,{}),y=pt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=Ne(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(f){return G.polygon(t,d,f)},n}g(Bp,"inv_trapezoid");async function vp(e,t){const{shapeSvg:r,bbox:i,label:o}=await rt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,s),t.intersect=function(l){return G.rect(t,l)},r}g(vp,"labelRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),m=V(t,{}),y=pt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ne(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(f){return G.polygon(t,d,f)},n}g(Lp,"lean_left");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),m=V(t,{}),y=pt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ne(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(f){return G.polygon(t,d,f)},n}g(Fp,"lean_right");function Ap(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=X.svg(o),d=V(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=pt(c),u=h.path(p,d),f=o.insert(()=>u,":first-child");return f.attr("class","outer-path"),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),f.attr("transform",`translate(-${a/2},${-n})`),K(t,f),t.intersect=function(m){return q.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},o}g(Ap,"lightningBolt");var qb=g((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Nb=g((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),zb=g((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ah=10,nh=10;async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<nh&&(t.width=nh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<ah&&(t.height=ah)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+s*2,d=h/2,p=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+p+a*2,f=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=Nb(0,0,h,u,d,p,f),k=zb(0,p,h,u,d,p),S=V(t,{}),w=C.path(b,S),_=C.path(k,S);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=qb(0,0,h,u,d,p,f);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-h/2}, ${-(u/2+p)})`),K(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let S=p*p*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}g(Ep,"linedCylinder");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,p=t.look==="neo"?d/4:d/8,u=d+p,{cssStyles:f}=t,m=X.svg(n),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...tr(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,p,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(C.map(S=>[S.x,S.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(S){return G.polygon(t,C,S)},n}g(Mp,"linedWaveEdgedRect");async function $p(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:c.width)+s*2+2*n,p=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,f=p-2*n,m=-u/2,y=-f/2,{cssStyles:C}=t,b=X.svg(l),k=V(t,{}),S=[{x:m-n,y:y+n},{x:m-n,y:y+f+n},{x:m+u-n,y:y+f+n},{x:m+u-n,y:y+f},{x:m+u,y:y+f},{x:m+u,y:y+f-n},{x:m+u+n,y:y+f-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],w=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+f},{x:m+u,y:y+f},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=pt(S);let E=b.path(_,k);const v=pt(w);let N=b.path(v,k);t.look!=="handDrawn"&&(E=va(E),N=va(N));const I=l.insert("g",":first-child");return I.insert(()=>E),I.insert(()=>N),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),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),K(t,I),t.intersect=function(R){return G.polygon(t,S,R)},l}g($p,"multiRect");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(s.width,t?.width??0)+l*2,p=Math.max(s.height,t?.height??0)+c*3,u=t.look==="neo"?p/4:p/8,f=p+(h?u/2:-u/2),m=-d/2,y=-f/2,C=10,{cssStyles:b}=t,k=tr(m-C,y+f+C,m+d-C,y+f+C,u,.8),S=k?.[k.length-1],w=[{x:m-C,y:y+C},{x:m-C,y:y+f+C},...k,{x:m+d-C,y:S.y-C},{x:m+d,y:S.y-C},{x:m+d,y:S.y-2*C},{x:m+d+C,y:S.y-2*C},{x:m+d+C,y:y-C},{x:m+C,y:y-C},{x:m+C,y},{x:m,y},{x:m,y:y+C}],_=[{x:m,y:y+C},{x:m+d-C,y:y+C},{x:m+d-C,y:S.y-C},{x:m+d,y:S.y-C},{x:m+d,y},{x:m,y}],E=X.svg(o),v=V(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const N=pt(w),I=E.path(N,v),R=pt(_),W=E.path(R,v),z=o.insert(()=>I,":first-child");return z.insert(()=>W),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),K(t,z),t.intersect=function(D){return G.polygon(t,w,D)},o}g(Op,"multiWaveEdgedRectangle");async function Ip(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i,t.useHtmlLabels||ee(vt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,p=-h/2,{cssStyles:u}=t,f=X.svg(a),m=V(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=f.rectangle(d,p,c,h,m),C=a.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),o&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",o),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,C),t.intersect=function(b){return G.rect(t,b)},a}g(Ip,"note");var Wb=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await rt(e,t,et(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=X.svg(o),f=V(t,{}),m=Wb(0,0,l),y=u.path(m,f);d=o.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&d.attr("style",p)}else d=Ne(o,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),K(t,d),t.calcIntersect=function(u,f){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],C=G.polygon(u,y,f);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},o}g(Dp,"question");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width??l.width)+(t.look==="neo"?s*2:s),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),p=-h/2,u=-d/2,f=u/2,m=[{x:p+f,y:u},{x:p,y:0},{x:p+f,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(m),S=C.path(k,b),w=n.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-f/2},0)`),c.attr("transform",`translate(${-f/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,w),t.intersect=function(_){return G.polygon(t,m,_)},n}g(Pp,"rect_left_inv_arrow");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Ge(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(Ct())){const v=h.children[0],N=lt(h);d=v.getBoundingClientRect(),N.attr("width",d.width),N.attr("height",d.height)}q.info("Text 2",l);const p=l||[],u=h.getBBox(),f=await Ge(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),m=f.children[0],y=lt(f);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;lt(f).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),lt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-C,w=-d.height/2-C;let _,E;if(t.look==="handDrawn"){const v=X.svg(s),N=V(t,{}),I=v.path(er(S,w,b,k,t.rx||0),N),R=v.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,N);E=s.insert(()=>(q.debug("Rough node insert CXC",I),R),":first-child"),_=s.insert(()=>(q.debug("Rough node insert CXC",I),I),":first-child")}else _=a.insert("rect",":first-child"),E=a.insert("line"),_.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)),E.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 K(t,_),t.intersect=function(v){return G.rect(t,v)},s}g(Rp,"rectWithTitle");async function qp(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return ai(e,t,o)}g(qp,"roundedRect");var ar=8;async function Np(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?ar:ar*2),h=(t?.height??n.height)+s*2,d=c-ar,p=h,u=ar-c/2,f=-h/2,{cssStyles:m}=t,y=X.svg(a),C=V(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y:f},{x:u+d,y:f},{x:u+d,y:f+p},{x:u-ar,y:f+p},{x:u-ar,y:f},{x:u,y:f},{x:u,y:f+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",Nt(m)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${ar/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,S),t.intersect=function(w){return G.rect(t,w)},a}g(Np,"shadedProcess");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=(t?.width?t?.width:l.width)+s*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,p=h,u=d/1.5,f=-p/2,m=-u/2,{cssStyles:y}=t,C=X.svg(n),b=V(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:f,y:m},{x:f,y:m+u},{x:f+p,y:m+u},{x:f+p,y:m-u/2}],S=pt(k),w=C.path(S,b),_=n.insert(()=>w,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,_),t.intersect=function(E){return G.polygon(t,k,E)},n}g(zp,"slopedRect");async function Wp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return ai(e,t,s)}g(Wp,"squareRect");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),d=c/2,{cssStyles:p}=t,u=X.svg(n),f=V(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Ri(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Ri(h/2-d,0,d,50,270,450)],y=pt(m),C=u.path(y,f),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),K(t,b),t.intersect=function(k){return G.polygon(t,m,k)},n}g(Hp,"stadium");async function Yp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ai(e,t,r)}g(Yp,"state");function Up(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=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 h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=X.svg(h),p=V(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=d.circle(0,0,t.width,{...p,stroke:a,strokeWidth:2}),f=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...p,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>u,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),o&&C.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${k})`)}return K(t,C),t.intersect=function(b){return G.circle(t,(t.width??0)/2,b)},h}g(Up,"stateEnd");function jp(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=X.svg(s).circle(0,0,t.width,K0(i));a=s.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return K(t,a),t.intersect=function(n){return G.circle(t,(t.width??7)/2,n)},s}g(jp,"stateStart");var Fr=8;async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width??l.width)+2*Fr+s,h=(t?.height??l.height)+a,d=c-2*Fr,p=h,u=-c/2,f=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=X.svg(n),C=V(t,{}),b=y.rectangle(u,f,d+16,p,C),k=y.line(u+Fr,f,u+Fr,f+p,C),S=y.line(u+Fr+d,f,u+Fr+d,f+p,C);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:_}=t;w.attr("class","basic label-container").attr("style",Nt(_)),K(t,w)}else{const y=Ne(n,d,p,m);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return G.polygon(t,m,y)},n}g(Gp,"subroutine");var zs=.2;async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-zs*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height?t?.height:l.height)+a*2,h=zs*c,d=zs*c,u=(t?.width?t?.width:l.width)+s*2+h-h,f=c,m=-u/2,y=-f/2,{cssStyles:C}=t,b=X.svg(n),k=V(t,{}),S=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+f},{x:m-h/2,y:y+f}],w=[{x:m+u-h/2,y:y+f},{x:m+u+h/2,y:y+f},{x:m+u+h/2,y:y+f-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=pt(S),E=b.path(_,k),v=pt(w),N=b.path(v,{...k,fillStyle:"solid"}),I=n.insert(()=>N,":first-child");return I.insert(()=>E,":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),K(t,I),t.intersect=function(R){return G.polygon(t,S,R)},n}g(Xp,"taggedRect");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,p=l+c,{cssStyles:u}=t,f=X.svg(o),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:p/2},...tr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,k=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...tr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],S=pt(y),w=f.path(S,m),_=pt(k),E=f.path(_,{...m,fillStyle:"solid"}),v=o.insert(()=>E,":first-child");return v.insert(()=>w,":first-child"),v.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),K(t,v),t.intersect=function(N){return G.polygon(t,y,N)},o}g(Vp,"taggedWaveEdgedRectangle");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await rt(e,t,et(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=o.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),K(t,h),t.intersect=function(d){return G.rect(t,d)},o}g(Zp,"text");var Hb=g((e,t,r,i,o,s)=>`M${e},${t}
228
+ a${o},${s} 0,0,1 0,${-i}
229
+ l${r},0
230
+ a${o},${s} 0,0,1 0,${i}
231
+ M${r},${-i}
232
+ a${o},${s} 0,0,0 0,${i}
233
+ l${-r},0`,"createCylinderPathD"),Yb=g((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Ub=g((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),lh=5,hh=10;async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<lh&&(t.height=lh);const C=m/2/(2.5+m/50);t.width=(t.width??0)-s-C*3,t.width<hh&&(t.width=hh)}const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t.height?t.height:n.height)+s,h=c/2,d=h/(2.5+c/50),p=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let f;if(t.look==="handDrawn"){const m=X.svg(a),y=Yb(0,0,p,c,d,h),C=Ub(0,0,p,c,d,h),b=m.path(y,V(t,{})),k=m.path(C,V(t,{fill:"none"}));f=a.insert(()=>k,":first-child"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),u&&f.attr("style",u)}else{const m=Hb(0,0,p,c,d,h);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(u)).attr("style",i),f.attr("class","basic label-container outer-path"),u&&f.selectAll("path").attr("style",u),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-p/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,f),t.intersect=function(m){const y=G.rect(t,m),C=y.y-(t.y??0);if(h!=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 b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}g(Kp,"tiltedCylinder");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=X.svg(n),m=V(t,{}),y=pt(d),C=f.path(y,m);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=Ne(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(f){return G.polygon(t,d,f)},n}g(Qp,"trapezoid");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:h.width)+s*2,p=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,f=X.svg(c),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-p/2},{x:d/2*.8,y:-p/2},{x:d/2,y:-p/2*.6},{x:d/2,y:p/2},{x:-d/2,y:p/2},{x:-d/2,y:-p/2*.6}],C=pt(y),b=f.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(S){return G.polygon(t,y,S)},c}g(Jp,"trapezoidalPentagon");var ch=10,dh=10;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<dh&&(t.width=dh),t.height=t?.height??0,t.height<ch&&(t.height=ch));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=Re(Ct().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,p=d,u=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:f}=t,m=X.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(u),b=m.path(C,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,K(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return q.info("Triangle intersect",t,u,S),G.polygon(t,u,S)},a}g(tg,"triangle");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:c.width)+(s??0)*2,p=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?p/4:p/8,f=p+(n?u:-u),{cssStyles:m}=t,C=14-d,b=C>0?C/2:0,k=X.svg(l),S=V(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-d/2-b,y:f/2},...tr(-d/2-b,f/2,d/2+b,f/2,u,.8),{x:d/2+b,y:-f/2},{x:-d/2-b,y:-f/2}],_=pt(w),E=k.path(_,S),v=l.insert(()=>E,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-u-(c.y-(c.top??0))})`),K(t,v),t.intersect=function(N){return G.polygon(t,w,N)},l}g(eg,"waveEdgedRectangle");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-S*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+a,d=h/8,p=h+d*2,{cssStyles:u}=t,f=X.svg(n),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:p/2},...tr(-c/2,p/2,c/2,p/2,d,1),{x:c/2,y:-p/2},...tr(c/2,-p/2,-c/2,-p/2,d,-1)],C=pt(y),b=f.path(C,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),K(t,k),t.intersect=function(S){return G.polygon(t,y,S)},n}g(rg,"waveRectangle");var At=10;async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-At,10),t.height=Math.max((t?.height??0)-s*2-At,10));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t?.width?t?.width:n.width)+o*2+At,h=(t?.height?t?.height:n.height)+s*2+At,d=c-At,p=h-At,u=-d/2,f=-p/2,{cssStyles:m}=t,y=X.svg(a),C=V(t,{}),b=[{x:u-At,y:f-At},{x:u-At,y:f+p},{x:u+d,y:f+p},{x:u+d,y:f-At}],k=`M${u-At},${f-At} L${u+d},${f-At} L${u+d},${f+p} L${u-At},${f+p} L${u-At},${f-At}
234
+ M${u-At},${f} L${u+d},${f}
235
+ M${u},${f-At} L${u},${f+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=y.path(k,C),w=a.insert(()=>S,":first-child");return w.attr("transform",`translate(${At/2}, ${At/2})`),w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+At/2-(n.x-(n.left??0))}, ${-(n.height/2)+At/2-(n.y-(n.top??0))})`),K(t,w),t.intersect=function(_){return G.polygon(t,b,_)},a}g(ig,"windowPane");var uh=new Set(["redux-color","redux-dark-color"]),jb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ln(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=vt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:st}=vt(),{background:ct}=st,Tt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Ln(e,Tt)}const c=vt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:p}=t,{labelStyles:u,nodeStyles:f}=Z(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};De(t.label,c)+st.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ct=await ai(e,t,st);if(i!=null&&uh.has(i)){const Tt=r.colorIndex??0;ct.attr("data-color-id",`color-${Tt%l.length}`)}if(!Re(c.htmlLabels)){const Tt=ct.select("text"),Bt=Tt.node()?.getBBox();Tt.attr("transform",`translate(${-Bt.width/2}, 0)`)}return ct}c.htmlLabels||(h*=1.25,d*=1.25);let m=et(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Mr(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],S=[];let w=0,_=0,E=0,v=0,N=!0,I=!0;for(const st of r.attributes){const ct=await Mr(y,st.type,c,0,b,["attribute-type"],u);w=Math.max(w,ct.width+h);const Tt=await Mr(y,st.name,c,0,b,["attribute-name"],u);_=Math.max(_,Tt.width+h);const Bt=await Mr(y,st.keys.join(),c,0,b,["attribute-keys"],u);E=Math.max(E,Bt.width+h);const wt=await Mr(y,st.comment,c,0,b,["attribute-comment"],u);v=Math.max(v,wt.width+h);const nt=Math.max(ct.height,Tt.height,Bt.height,wt.height)+d;S.push({yOffset:b,rowHeight:nt}),b+=nt}let R=4;E<=h&&(N=!1,E=0,R--),v<=h&&(I=!1,v=0,R--);const W=y.node().getBBox();if(C.width+h*2-(w+_+E+v)>0){const st=C.width+h*2-(w+_+E+v);w+=st/R,_+=st/R,E>0&&(E+=st/R),v>0&&(v+=st/R)}const z=w+_+E+v,D=X.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let L=0;S.length>0&&(L=S.reduce((st,ct)=>st+(ct?.rowHeight??0),0));const O=Math.max(W.width+h*2,t?.width||0,z),P=Math.max((L??0)+C.height,t?.height||0),H=-O/2,j=-P/2;if(y.selectAll("g:not(:first-child)").each((st,ct,Tt)=>{const Bt=lt(Tt[ct]),wt=Bt.attr("transform");let nt=0,he=0;if(wt){const br=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(wt);br&&(nt=parseFloat(br[1]),he=parseFloat(br[2]),Bt.attr("class").includes("attribute-name")?nt+=w:Bt.attr("class").includes("attribute-keys")?nt+=w+_:Bt.attr("class").includes("attribute-comment")&&(nt+=w+_+E))}Bt.attr("transform",`translate(${H+h/2+nt}, ${he+j+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(j+d/2)+")"),i!=null&&uh.has(i)){const st=r.colorIndex??0;y.attr("data-color-id",`color-${st%l.length}`)}const J=D.rectangle(H,j,O,P,A),ft=y.insert(()=>J,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[st,ct]of S.entries()){const Bt=(st+1)%2===0&&ct.yOffset!==0,wt=D.rectangle(H,C.height+j+ct?.yOffset,O,ct?.rowHeight,{...A,fill:Bt?s:a,stroke:n});y.insert(()=>wt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Bt?"even":"odd"}`)}const dt=1e-4;let ut=$r(H,C.height+j,O+H,C.height+j,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A);if(y.insert(()=>bt).attr("class","divider"),ut=$r(w+H,C.height+j,w+H,P+j,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A),y.insert(()=>bt).attr("class","divider"),N){const st=w+_+H;ut=$r(st,C.height+j,st,P+j,dt),bt=D.polygon(ut.map(ct=>[ct.x,ct.y]),A),y.insert(()=>bt).attr("class","divider")}if(I){const st=w+_+E+H;ut=$r(st,C.height+j,st,P+j,dt),bt=D.polygon(ut.map(ct=>[ct.x,ct.y]),A),y.insert(()=>bt).attr("class","divider")}for(const st of k){const ct=C.height+j+st;ut=$r(H,ct,O+H,ct,dt),bt=D.polygon(ut.map(Tt=>[Tt.x,Tt.y]),A),y.insert(()=>bt).attr("class","divider")}if(K(t,ft),f&&t.look!=="handDrawn")if(i!=null&&jb.has(i))y.selectAll("path").attr("style",f);else{const ct=f.split(";")?.filter(Tt=>Tt.includes("stroke"))?.map(Tt=>`${Tt}`).join("; ");y.selectAll("path").attr("style",ct??""),y.selectAll(".row-rect-even path").attr("style",f)}return t.intersect=function(st){return G.rect(t,st)},y}g(Ln,"erBox");async function Mr(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==Cl(t)&&(t=Cl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await qe(n,t,{width:De(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(Re(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=lt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(Mr,"addText");function $r(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}g($r,"lineToPolygon");async function og(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",et(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,p=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await _i(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await _i(l,t,0,["font-weight: bolder"]);const f=l.node().getBBox();p=f.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await _i(c,b,m,[b.parseClassifier()]);m+=k+s}u=c.node().getBBox().height,u<=0&&(u=o/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await _i(h,b,y,[b.parseClassifier()]);y+=k+s}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${d})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+p+o*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(u?u+o*4:o*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}g(og,"textHelper");async function _i(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=vt();let a="useHtmlLabels"in t?t.useHtmlLabels:Re(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),$i(n)&&(a=!0);const l=await qe(o,Ha(mr(n)),{width:De(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const d=l.children[0],p=lt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const f=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function C(){if(m.style.display="flex",m.style.flexDirection="column",f){const b=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}g(C,"setupImage"),setTimeout(()=>{m.complete&&C()}),m.addEventListener("error",C),m.addEventListener("load",C)})))}c=d.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&lt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(_i,"addText");async function sg(e,t){const r=Ct(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??Re(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await og(e,t,r,n,a),{labelStyles:d,nodeStyles:p}=Z(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=X.svg(c),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const S=-C/2,w=-b/2;let _=f?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(_=s*2);const E=m.rectangle(S-s,w-s-(f?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+_,y),v=c.insert(()=>E,":first-child");v.attr("class","basic label-container outer-path");const N=v.node().getBBox(),I=c.select(".annotation-group").node().getBBox().height-(f?s/2:0)||0,R=c.select(".label-group").node().getBBox().height-(f?s/2:0)||0,W=c.select(".members-group").node().getBBox().height-(f?s/2:0)||0,z=(I+R+w+s-(w-s-(f?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((D,A,L)=>{const O=lt(L[A]),P=O.attr("transform");let H=0;if(P){const dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);dt&&(H=parseFloat(dt[2]))}let j=H+w+s-(f?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(O.attr("class").includes("methods-group")){const ft=Math.max(W,a/2);k?j=Math.max(z,I+R+ft+w+a*2+s)+a*2:j=I+R+ft+w+a*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?j=H-a:j=H),n||(j-=4);let J=S;(O.attr("class").includes("label-group")||O.attr("class").includes("annotation-group"))&&(J=-O.node()?.getBBox().width/2||0,c.selectAll("text").each(function(ft,dt,ut){window.getComputedStyle(ut[dt]).textAnchor==="middle"&&(J=0)})),O.attr("transform",`translate(${J}, ${j})`)}),l.members.length>0||l.methods.length>0||f){const D=I+R+w+s,A=m.line(N.x,D,N.x+N.width,D+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(f||l.members.length>0||l.methods.length>0){const D=I+R+W+w+a*2+s,A=m.line(N.x,k?Math.max(z,D):D,N.x+N.width,(k?Math.max(z,D):D)+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const D=RegExp(/color\s*:\s*([^;]*)/),A=D.exec(u);if(A){const L=A[0].replace("color","fill");c.selectAll("tspan").attr("style",L)}else if(d){const L=D.exec(d);if(L){const O=L[0].replace("color","fill");c.selectAll("tspan").attr("style",O)}}}return K(t,v),t.intersect=function(D){return G.rect(t,D)},c}g(sg,"classBox");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,l="verifyMethod"in t,c=et(t),{themeVariables:h}=Ct(),{borderColorArray:d,requirementEdgeLabelBackground:p}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let f;l?f=await we(u,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):f=await we(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=f;const y=await we(u,o.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const N=await we(u,`${o.requirementId?`ID: ${o.requirementId}`:""}`,m,t.labelStyle);m+=N;const I=await we(u,`${o.text?`Text: ${o.text}`:""}`,m,t.labelStyle);m+=I;const R=await we(u,`${o.risk?`Risk: ${o.risk}`:""}`,m,t.labelStyle);m+=R,await we(u,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,m,t.labelStyle)}else{const N=await we(u,`${s.type?`Type: ${s.type}`:""}`,m,t.labelStyle);m+=N,await we(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,m,t.labelStyle)}const C=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-C/2,S=-b/2,w=X.svg(u),_=V(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const E=w.rectangle(k,S,C,b,_),v=u.insert(()=>E,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),d?.length){const N=t.colorIndex??0;u.attr("data-color-id",`color-${N%d.length}`)}if(u.selectAll(".label").each((N,I,R)=>{const W=lt(R[I]),z=W.attr("transform");let D=0,A=0;if(z){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);H&&(D=parseFloat(H[1]),A=parseFloat(H[2]))}const L=A-b/2;let O=k+a/2;(I===0||I===1)&&(O=D),W.attr("transform",`translate(${O}, ${L+a})`)}),m>f+y+n){const N=S+f+y+n;let I;if(t.look==="neo"){const z=[[k,N],[k+C,N],[k+C,N+.001],[k,N+.001]];I=w.polygon(z,_)}else I=w.line(k,N,k+C,N,_);u.insert(()=>I).attr("class","divider")}return K(t,v),t.intersect=function(N){return G.rect(t,N)},i&&t.look!=="handDrawn"&&(p||d?.length)&&u.selectAll("path").attr("style",i),u}g(ag,"requirementBox");async function we(e,t,r,i=""){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),s=Ct(),a=s.htmlLabels??!0,n=await qe(o,Ha(mr(t)),{width:De(t,s)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},s);let l;if(a){const c=n.children[0],h=lt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(we,"addText");var Gb=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ng(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=Z(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await rt(e,t,et(t)),h=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let f,m;p?{label:f,bbox:m}=await Ns(p,"ticket"in t&&t.ticket||"",u):{label:f,bbox:m}=await Ns(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await Ns(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,S=Math.max(m.height,C.height)/2,w=Math.max(l.height+b*2,t?.height||0)+S,_=-k/2,E=-w/2;c.attr("transform","translate("+(h-k/2)+", "+(-S-l.height/2)+")"),f.attr("transform","translate("+(h-k/2)+", "+(-S+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-C.width-2*s)+", "+(-S+l.height/2)+")");let v;const{rx:N,ry:I}=t,{cssStyles:R}=t;if(t.look==="handDrawn"){const W=X.svg(n),z=V(t,{}),D=N||I?W.path(er(_,E,k,w,N||0),z):W.rectangle(_,E,k,w,z);v=n.insert(()=>D,":first-child"),v.attr("class","basic label-container").attr("style",R||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",I??5).attr("x",_).attr("y",E).attr("width",k).attr("height",w);const W="priority"in t&&t.priority;if(W){const z=n.append("line"),D=_+2,A=E+Math.floor((N??0)/2),L=E+w-Math.floor((N??0)/2);z.attr("x1",D).attr("y1",A).attr("x2",D).attr("y2",L).attr("stroke-width","4").attr("stroke",Gb(W))}}return K(t,v),t.height=w,t.intersect=function(W){return G.rect(t,W)},n}g(ng,"kanbanItem");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:d}=t,p=s.width+20,u=s.height+20,f=Math.max(l,p),m=Math.max(c,u);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
236
+ a${h},${h} 1 0,0 ${f*.25},${-1*m*.1}
237
+ a${h},${h} 1 0,0 ${f*.25},0
238
+ a${h},${h} 1 0,0 ${f*.25},0
239
+ a${h},${h} 1 0,0 ${f*.25},${m*.1}
240
+
241
+ a${h},${h} 1 0,0 ${f*.15},${m*.33}
242
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
243
+ a${h},${h} 1 0,0 ${-1*f*.15},${m*.33}
244
+
245
+ a${h},${h} 1 0,0 ${-1*f*.25},${m*.15}
246
+ a${h},${h} 1 0,0 ${-1*f*.25},0
247
+ a${h},${h} 1 0,0 ${-1*f*.25},0
248
+ a${h},${h} 1 0,0 ${-1*f*.25},${-1*m*.15}
249
+
250
+ a${h},${h} 1 0,0 ${-1*f*.1},${-1*m*.33}
251
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
252
+ a${h},${h} 1 0,0 ${f*.1},${-1*m*.33}
253
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(o),k=V(t,{}),S=b.path(C,k);y=o.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",Nt(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-f/2}, ${-m/2})`),K(t,y),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return q.info("Bang intersect",t,b),G.rect(t,b)},o}g(lg,"bang");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,p=.35*l,u=.2*l,{cssStyles:f}=t;let m;const y=`M0 0
254
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
255
+ a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
256
+ a${d},${d} 1 0,1 ${l*.35},${l*.2}
257
+
258
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
259
+ a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
260
+
261
+ a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
262
+ a${p},${p} 1 0,1 ${-1*l*.5},0
263
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
264
+
265
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
266
+ a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
267
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=X.svg(o),b=V(t,{}),k=C.path(y,b);m=o.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Nt(f))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),K(t,m),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return q.info("Cloud intersect",t,C),G.rect(t,C)},o}g(hg,"cloud");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
268
+ M${-l/2} ${c/2-h}
269
+ v${-c+2*h}
270
+ q0,-${h} ${h},-${h}
271
+ h${l-2*h}
272
+ q${h},0 ${h},${h}
273
+ v${c-h}
274
+ H${-l/2}
275
+ Z
276
+ `:`
277
+ M${-l/2} ${c/2-h}
278
+ v${-c+2*h}
279
+ q0,-${h} ${h},-${h}
280
+ h${l-2*h}
281
+ q${h},0 ${h},${h}
282
+ v${c-2*h}
283
+ q0,${h} ${-h},${h}
284
+ h${-(l-2*h)}
285
+ q${-h},0 ${-h},${-h}
286
+ Z
287
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),K(t,p),t.calcIntersect=function(u,f){return G.rect(u,f)},t.intersect=function(u){return G.rect(t,u)},o}g(cg,"defaultMindmapNode");async function dg(e,t){const r={padding:t.padding??0};return vn(e,t,r)}g(dg,"mindmapCircle");var Xb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:qp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:dp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:up},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:vn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qp},{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:Bp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:gp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ip},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Np},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:jp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Up},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:np},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ap},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:eg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Cp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Kp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ep},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:cp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ig},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:fp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:mp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Op},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$p},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ap},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Pp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Mp}],Vb=g(()=>{const t=[...Object.entries({state:Yp,choice:op,note:Ip,rectWithTitle:Rp,labelRect:vp,iconSquare:wp,iconCircle:Tp,icon:kp,iconRounded:Sp,imageSquare:_p,anchor:tp,kanbanItem:ng,mindmapCircle:dg,defaultMindmapNode:cg,classBox:sg,erBox:Ln,requirementBox:ag}),...Xb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ug=Vb();function Zb(e){return e in ug}g(Zb,"isValidShape");var ss=new Map;async function pg(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?ug[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",Nt(t.look)),t.tooltip&&o.attr("title",t.tooltip),ss.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(pg,"insertNode");var TS=g((e,t)=>{ss.set(t.id,e)},"setNodeElem"),SS=g(()=>{ss.clear()},"clear"),wS=g(e=>{const t=ss.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"),Kb=g((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&ph(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&ph(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),Qb={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}},Jb=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ph=g((e,t,r,i,o,s,a=!1,n)=>{const l=Qb[r],c=l&&Jb.includes(l.type);if(!l){q.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${o}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const f=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${f}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const C=y.cloneNode(!0);C.id=m,C.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),tk=g(e=>typeof e=="string"?e:Ct()?.flowchart?.curve,"resolveEdgeCurveType"),Uo=new Map,Ht=new Map,_S=g(()=>{Uo.clear(),Ht.clear()},"clear"),bi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ek=g(async(e,t)=>{const r=Ct();let i=ee(r);const{labelStyles:o}=Z(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await qe(e,t.label,{style:bi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),q.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],f=lt(c);h=u.getBoundingClientRect(),d=h,f.attr("width",h.width),f.attr("height",h.height)}else{const u=lt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",fi(d,i)),Uo.set(t.id,s),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ge(f,t.startLabelLeft,bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=lt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",fi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=u,Bi(p,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ge(f,t.startLabelRight,bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=lt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",fi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=u,Bi(p,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ge(u,t.endLabelLeft,bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=lt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",fi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=u,Bi(p,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),f=u.insert("g").attr("class","inner"),m=await Ge(u,t.endLabelRight,bi(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){const C=m.children[0],b=lt(m);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}f.attr("transform",fi(y,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=u,Bi(p,t.endLabelRight)}return c},"insertEdgeLabel");function Bi(e,t){ee(Ct())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Bi,"setTerminalWidth");var rk=g((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,Uo.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Ct(),{subGraphTitleTotalMargin:o}=gn(i);if(e.label){const s=Uo.get(e.id);let a=e.x,n=e.y;if(r){const l=ge.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Ht.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Ht.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Ht.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Ht.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),ik=g((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),ok=g((e,t,r)=>{q.debug(`intersection calc abc89:
288
+ outsidePoint: ${JSON.stringify(t)}
289
+ insidePoint : ${JSON.stringify(r)}
290
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),q.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return q.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:u}),n===0&&(p=t.x,u=t.y),h===0&&(p=t.x),c===0&&(u=t.y),{x:p,y:u}}},"intersection"),gh=g((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(q.info("abc88 checking point",s,t),!ik(t,s)&&!o){const a=ok(t,i,s);q.debug("abc88 inside",s,i,a),q.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?q.warn("abc88 no intersect",a,r):r.push(a),o=!0}else q.warn("abc88 outside",s,i),i=s,o||r.push(s)}),q.debug("returning points",r),r},"cutPathAtIntersect");function gg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(gg,"extractCornerPoints");var fh=g(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),sk=g(function(e){const{cornerPointPositions:t}=gg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=fh(o,a,5),l=fh(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){q.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const u=5;a.x===n.x?p={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:p={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else q.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),ak=g((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Array(n).fill(`${o} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),nk=g(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=Ct();let c=t.points,h=!1;const d=o;var p=s;const u=[];for(const O in t.cssCompiledStyles)uu(O)||u.push(t.cssCompiledStyles[O]);q.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(d.intersect(c[0])),q.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],p,p.intersect(c[c.length-1])),c.push(p.intersect(c[c.length-1])));const f=btoa(JSON.stringify(c));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),c=gh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=gh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(O=>!Number.isNaN(O.y));const y=tk(t.curve);y!=="rounded"&&(m=sk(m));let C=Ai;switch(y){case"linear":C=Ai;break;case"basis":C=ta;break;case"cardinal":C=tc;break;case"bumpX":C=Vh;break;case"bumpY":C=Zh;break;case"catmullRom":C=rc;break;case"monotoneX":C=lc;break;case"monotoneY":C=hc;break;case"natural":C=dc;break;case"step":C=uc;break;case"stepAfter":C=gc;break;case"stepBefore":C=pc;break;case"rounded":C=Ai;break;default:C=ta}const{x:b,y:k}=t0(t),S=Py().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let _,E=y==="rounded"?fg(mg(m,t),5):S(m);const v=Array.isArray(t.style)?t.style:[t.style];let N=v.find(O=>O?.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let R=!1;if(t.look==="handDrawn"){const O=X.svg(e);Object.assign([],m);const P=O.path(E,{roughness:.3,seed:l});w+=" transition",_=lt(P).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",v?v.reduce((j,J)=>j+";"+J,""):"");let H=_.attr("d");_.attr("d",H),e.node().appendChild(_.node())}else{const O=u.join(";"),P=v?v.reduce((ut,bt)=>ut+bt+";",""):"",H=(O?O+";"+P+";":P)+";"+(v?v.reduce((ut,bt)=>ut+";"+bt,""):"");_=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",H),N=H.match(/stroke:([^;]+)/)?.[1],R=t.animate===!0||!!t.animation||O.includes("animation");const j=_.node(),J=typeof j.getTotalLength=="function"?j.getTotalLength():0,ft=Fl[t.arrowTypeStart]||0,dt=Fl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ak(J,ft,dt):`0 ${ft} ${J-ft-dt} ${dt}`}; stroke-dashoffset: 0;`;_.attr("style",bt+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",f),_.attr("data-look",Nt(t.look)),t.showPoints&&m.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let W="";(Ct().flowchart.arrowMarkerAbsolute||Ct().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const z=!R&&t?.look==="neo";Kb(_,t,W,a,i,z,N);const D=Math.floor(c.length/2),A=c[D];ge.isLabelCoordinateInPath(A,_.attr("d"))||(h=!0);let L={};return h&&(L.updatedPath=c),L.originalPath=t.points,L},"insertEdge");function fg(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,p=l.y-a.y,u=Math.hypot(c,h),f=Math.hypot(d,p);if(u<o||f<o){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,C=d/f,b=p/f,k=m*C+y*b,S=Math.max(-1,Math.min(1,k)),w=Math.acos(S);if(w<o||Math.abs(Math.PI-w)<o){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(w/2),u/2,f/2),E=a.x-m*_,v=a.y-y*_,N=a.x+C*_,I=a.y+b*_;r+=`L${E},${v}`,r+=`Q${a.x},${a.y} ${N},${I}`}}return r}g(fg,"generateRoundedPath");function Aa(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Aa,"calculateDeltaAndAngle");function mg(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&Gt[t.arrowTypeStart]){const o=Gt[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=Aa(s,a),l=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const o=Gt[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=Aa(a,s),l=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}g(mg,"applyMarkerOffsetsToPoints");var lk=g((e,t,r,i)=>{t.forEach(o=>{Ek[o](e,r,i)})},"insertMarkers"),hk=g((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"),ck=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),dk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),uk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),pk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),gk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),fk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),mk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),yk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Ck=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{transitionColor:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),xk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),bk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),kk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Tk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Sk=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),wk=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),_k=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),Bk=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),vk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
291
+ L20,10
292
+ M20,10
293
+ L0,20`)},"requirement_arrow"),Lk=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
294
+ L20,10
295
+ M20,10
296
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Fk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Ak=g((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=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");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Ek={extension:hk,composition:ck,aggregation:dk,dependency:uk,lollipop:pk,point:gk,circle:fk,cross:mk,barb:yk,barbNeo:Ck,only_one:xk,zero_or_one:bk,one_or_more:kk,zero_or_more:Tk,only_one_neo:Sk,zero_or_one_neo:wk,one_or_more_neo:_k,zero_or_more_neo:Bk,requirement_arrow:vk,requirement_contains:Fk,requirement_arrow_neo:Lk,requirement_contains_neo:Ak},Mk=lk,$k={common:Wi,getConfig:vt,insertCluster:Ab,insertEdge:nk,insertEdgeLabel:ek,insertMarkers:Mk,insertNode:pg,interpolateToCurve:ln,labelHelper:rt,log:q,positionEdgeLabel:rk},qi={},yg=g(e=>{for(const t of e)qi[t.name]=t},"registerLayoutLoaders"),Ok=g(()=>{yg([{name:"dagre",loader:g(async()=>await gt(()=>import("./dagre-BM42HDAG-BGQGbUMF.js"),__vite__mapDeps([2,3,4,0,1])),"loader")},{name:"cose-bilkent",loader:g(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-Chu2Y9EC.js"),__vite__mapDeps([5,6,0,1])),"loader")}])},"registerDefaultLayoutLoaders");Ok();var BS=g(async(e,t)=>{if(!(e.layoutAlgorithm in qi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=qi[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,$k,{algorithm:r.algorithm})},"render"),vS=g((e="",{fallback:t="dagre"}={})=>{if(e in qi)return e;if(t in qi)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"),Fn="comm",Cg="rule",xg="decl",Ik="@media",Dk="@import",Pk="@supports",Rk="@namespace",Ea="@keyframes",bg="@layer",qk="@scope",Nk=Math.abs,Mi=String.fromCharCode;function kg(e){return e.trim()}function Ma(e,t,r){return e.replace(t,r)}function Pr(e,t){return e.charCodeAt(t)|0}function ri(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function Tg(e){return e.length}function ho(e,t){return t.push(e),e}var as=1,ii=1,Sg=0,le=0,$t=0,ni="";function An(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:as,column:ii,length:a,return:"",siblings:n}}function zk(){return $t}function Wk(){return $t=le>0?Pr(ni,--le):0,ii--,$t===10&&(ii=1,as--),$t}function me(){return $t=le<Sg?Pr(ni,le++):0,ii++,$t===10&&(ii=1,as++),$t}function Xe(){return Pr(ni,le)}function bo(){return le}function ns(e,t){return ri(ni,e,t)}function Ni(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 Hk(e){return as=ii=1,Sg=_e(ni=e),le=0,[]}function Yk(e){return ni="",e}function Ws(e){return kg(ns(le-1,$a(e===91?e+2:e===40?e+1:e)))}function Uk(e){for(;($t=Xe())&&$t<33;)me();return Ni(e)>2||Ni($t)>3?"":" "}function jk(e,t){for(;--t&&me()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return ns(e,bo()+(t<6&&Xe()==32&&me()==32))}function $a(e){for(;me();)switch($t){case e:return le;case 34:case 39:e!==34&&e!==39&&$a($t);break;case 40:e===41&&$a(e);break;case 92:me();break}return le}function Gk(e,t){for(;me()&&e+$t!==57;)if(e+$t===84&&Xe()===47)break;return"/*"+ns(t,le-1)+"*"+Mi(e===47?e:me())}function Xk(e){for(;!Ni(Xe());)me();return ns(e,le)}function Vk(e){return Yk(ko("",null,null,null,[""],e=Hk(e),0,[0],e))}function ko(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,p=0,u=0,f=0,m=1,y=1,C=1,b=0,k=0,S="",w=o,_=s,E=i,v=S;y;)switch(f=k,k=me()){case 40:f!=108&&Pr(v,d-1)==58?(b++,v+="("):v+=Ws(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Ws(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Mi(k);break}v+=Uk(f);break;case 92:v+=jk(bo()-1,7);continue;case 47:switch(Xe()){case 42:case 47:ho(Zk(Gk(me(),bo()),t,r,l),l),(Ni(f||1)==5||Ni(Xe()||1)==5)&&_e(v)&&ri(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=_e(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Mi(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=Ma(v,/\f/g,"")),u>0&&(_e(v)-d||m===0)&&ho(u>32?yh(v+";",i,r,d-1,l):yh(Ma(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(ho(E=mh(v,t,r,c,h,o,n,S,w=[],_=[],d,s),s),k===123)if(h===0)ko(v,t,E,E,w,s,d,n,_);else{switch(p){case 99:if(Pr(v,3)===110)break;case 108:if(Pr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ko(e,E,E,i&&ho(mh(e,E,E,0,0,o,n,S,o,w=[],d,_),_),o,_,d,n,i?w:_):ko(v,E,E,E,[""],_,0,n,_)}}c=h=u=0,m=C=1,S=v="",d=a;break;case 58:d=1+_e(v),u=f;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&Wk()==125)continue}switch(v+=Mi(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(_e(v)-1)*C,C=1;break;case 64:Xe()===45&&(v+=Ws(me())),p=Xe(),h=d=_e(S=v+=Xk(bo())),k++;break;case 45:f===45&&_e(v)==2&&(m=0)}}return s}function mh(e,t,r,i,o,s,a,n,l,c,h,d){for(var p=o-1,u=o===0?s:[""],f=Tg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=ri(e,p+1,p=Nk(y=a[m])),S=e;b<f;++b)(S=kg(y>0?u[b]+" "+k:Ma(k,/&\f/g,u[b])))&&(l[C++]=S);return An(e,t,r,o===0?Cg:n,l,c,h,d)}function Zk(e,t,r,i){return An(e,t,r,Fn,Mi(zk()),ri(e,2,-2),0,i)}function yh(e,t,r,i,o){return An(e,t,r,xg,ri(e,0,i),ri(e,i+1,-1),i,o)}function Oa(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Kk(e,t,r,i){switch(e.type){case bg:if(e.children.length)break;case Dk:case Rk:case xg:return e.return=e.return||e.value;case Fn:return"";case Ea:return e.return=e.value+"{"+Oa(e.children,i)+"}";case Cg:if(!_e(e.value=e.props.join(",")))return""}return _e(r=Oa(e.children,i))?e.return=e.value+"{"+r+"}":""}function Qk(e){var t=Tg(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var wg="c4",Jk=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-C2tj98or.js");return{diagram:t}},__vite__mapDeps([7,8,0,1]));return{id:wg,diagram:e}},"loader"),e1={id:wg,detector:Jk,loader:t1},r1=e1,_g="flowchart",i1=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),o1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CMG-a-kh.js");return{diagram:t}},__vite__mapDeps([9,10,8,0,1,11,12,13]));return{id:_g,diagram:e}},"loader"),s1={id:_g,detector:i1,loader:o1},a1=s1,Bg="flowchart-v2",n1=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),l1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CMG-a-kh.js");return{diagram:t}},__vite__mapDeps([9,10,8,0,1,11,12,13]));return{id:Bg,diagram:e}},"loader"),h1={id:Bg,detector:n1,loader:l1},c1=h1,vg="er",d1=g(e=>/^\s*erDiagram/.test(e),"detector"),u1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-CVWhzHKv.js");return{diagram:t}},__vite__mapDeps([14,11,0,1,12,13]));return{id:vg,diagram:e}},"loader"),p1={id:vg,detector:d1,loader:u1},g1=p1,Lg="gitGraph",f1=g(e=>/^\s*gitGraph/.test(e),"detector"),m1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-DcCuYR-R.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,0,1]));return{id:Lg,diagram:e}},"loader"),y1={id:Lg,detector:f1,loader:m1},C1=y1,Fg="gantt",x1=g(e=>/^\s*gantt/.test(e),"detector"),b1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-DbVJ6VGB.js");return{diagram:t}},__vite__mapDeps([19,0,1,20,21,22]));return{id:Fg,diagram:e}},"loader"),k1={id:Fg,detector:x1,loader:b1},T1=k1,Ag="info",S1=g(e=>/^\s*info/.test(e),"detector"),w1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CaY7gJ4a.js");return{diagram:t}},__vite__mapDeps([23,18,0,1]));return{id:Ag,diagram:e}},"loader"),_1={id:Ag,detector:S1,loader:w1},Eg="pie",B1=g(e=>/^\s*pie/.test(e),"detector"),v1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-BO8LpJ1H.js");return{diagram:t}},__vite__mapDeps([24,16,18,0,1,25,26,21]));return{id:Eg,diagram:e}},"loader"),L1={id:Eg,detector:B1,loader:v1},Mg="quadrantChart",F1=g(e=>/^\s*quadrantChart/.test(e),"detector"),A1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-BBYmPM7O.js");return{diagram:t}},__vite__mapDeps([27,0,1,20,21,22]));return{id:Mg,diagram:e}},"loader"),E1={id:Mg,detector:F1,loader:A1},M1=E1,$g="xychart",$1=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),O1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-CGQCKCak.js");return{diagram:t}},__vite__mapDeps([28,0,1,21,26,20,22]));return{id:$g,diagram:e}},"loader"),I1={id:$g,detector:$1,loader:O1},D1=I1,Og="requirement",P1=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),R1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-CUU8gZny.js");return{diagram:t}},__vite__mapDeps([29,11,0,1,12]));return{id:Og,diagram:e}},"loader"),q1={id:Og,detector:P1,loader:R1},N1=q1,Ig="sequence",z1=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),W1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-CScOE6Nf.js");return{diagram:t}},__vite__mapDeps([30,8,0,1,17]));return{id:Ig,diagram:e}},"loader"),H1={id:Ig,detector:z1,loader:W1},Y1=H1,Dg="class",U1=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),j1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-BcOPwdcC.js");return{diagram:t}},__vite__mapDeps([31,32,10,8,0,1,11,12]));return{id:Dg,diagram:e}},"loader"),G1={id:Dg,detector:U1,loader:j1},X1=G1,Pg="classDiagram",V1=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Z1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-BcOPwdcC.js");return{diagram:t}},__vite__mapDeps([33,32,10,8,0,1,11,12]));return{id:Pg,diagram:e}},"loader"),K1={id:Pg,detector:V1,loader:Z1},Q1=K1,Rg="state",J1=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),t2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-BcvHRBZl.js");return{diagram:t}},__vite__mapDeps([34,35,11,0,1,12,3,4]));return{id:Rg,diagram:e}},"loader"),e2={id:Rg,detector:J1,loader:t2},r2=e2,qg="stateDiagram",i2=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),o2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-p321ujvX.js");return{diagram:t}},__vite__mapDeps([36,35,11,0,1,12]));return{id:qg,diagram:e}},"loader"),s2={id:qg,detector:i2,loader:o2},a2=s2,Ng="journey",n2=g(e=>/^\s*journey/.test(e),"detector"),l2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-BVeQNwa5.js");return{diagram:t}},__vite__mapDeps([37,10,8,0,1,25]));return{id:Ng,diagram:e}},"loader"),h2={id:Ng,detector:n2,loader:l2},c2=h2,d2=g((e,t,r)=>{q.debug(`rendering svg for syntax error
297
+ `);const i=jy(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Yh(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),zg={draw:d2},u2=zg,p2={db:{},renderer:zg,parser:{parse:g(()=>{},"parse")}},g2=p2,Wg="flowchart-elk",f2=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),m2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-CMG-a-kh.js");return{diagram:t}},__vite__mapDeps([9,10,8,0,1,11,12,13]));return{id:Wg,diagram:e}},"loader"),y2={id:Wg,detector:f2,loader:m2},C2=y2,Hg="timeline",x2=g(e=>/^\s*timeline/.test(e),"detector"),b2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-D7tGfjR6.js");return{diagram:t}},__vite__mapDeps([38,0,1,25]));return{id:Hg,diagram:e}},"loader"),k2={id:Hg,detector:x2,loader:b2},T2=k2,Yg="mindmap",S2=g(e=>/^\s*mindmap/.test(e),"detector"),w2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-1X-u7gPH.js");return{diagram:t}},__vite__mapDeps([39,11,0,1,12]));return{id:Yg,diagram:e}},"loader"),_2={id:Yg,detector:S2,loader:w2},B2=_2,Ug="kanban",v2=g(e=>/^\s*kanban/.test(e),"detector"),L2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-CtvPOV3r.js");return{diagram:t}},__vite__mapDeps([40,10,0,1]));return{id:Ug,diagram:e}},"loader"),F2={id:Ug,detector:v2,loader:L2},A2=F2,jg="sankey",E2=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),M2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-k6GjcALi.js");return{diagram:t}},__vite__mapDeps([41,0,1,26,21]));return{id:jg,diagram:e}},"loader"),$2={id:jg,detector:E2,loader:M2},O2=$2,Gg="packet",I2=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),D2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-5UC8M7Iq.js");return{diagram:t}},__vite__mapDeps([42,16,18,0,1]));return{id:Gg,diagram:e}},"loader"),P2={id:Gg,detector:I2,loader:D2},Xg="radar",R2=g(e=>/^\s*radar-beta/.test(e),"detector"),q2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-DnZ1SQGN.js");return{diagram:t}},__vite__mapDeps([43,16,18,0,1]));return{id:Xg,diagram:e}},"loader"),N2={id:Xg,detector:R2,loader:q2},Vg="block",z2=g(e=>/^\s*block(-beta)?/.test(e),"detector"),W2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-C2Tq3zqo.js");return{diagram:t}},__vite__mapDeps([44,10,0,1,3,13]));return{id:Vg,diagram:e}},"loader"),H2={id:Vg,detector:z2,loader:W2},Y2=H2,Zg="treeView",U2=g(e=>/^\s*treeView-beta/.test(e),"detector"),j2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-B0S37NyM.js");return{diagram:t}},__vite__mapDeps([45,16,17,18,0,1]));return{id:Zg,diagram:e}},"loader"),G2={id:Zg,detector:U2,loader:j2},X2=G2,Kg="architecture",V2=g(e=>/^\s*architecture/.test(e),"detector"),Z2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-CWoGp8TB.js");return{diagram:t}},__vite__mapDeps([46,16,18,0,1,6]));return{id:Kg,diagram:e}},"loader"),K2={id:Kg,detector:V2,loader:Z2},Q2=K2,Qg="eventmodeling",J2=g(e=>/^\s*eventmodeling/.test(e),"detector"),tT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-BxDwUDuY.js");return{diagram:t}},__vite__mapDeps([47,16,18,0,1]));return{id:Qg,diagram:e}},"loader"),eT={id:Qg,detector:J2,loader:tT},rT=eT,Jg="ishikawa",iT=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),oT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-l4_2NV1P.js");return{diagram:t}},__vite__mapDeps([48,0,1]));return{id:Jg,diagram:e}},"loader"),sT={id:Jg,detector:iT,loader:oT},tf="venn",aT=g(e=>/^\s*venn-beta/.test(e),"detector"),nT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-AU7MqjmN.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:tf,diagram:e}},"loader"),lT={id:tf,detector:aT,loader:nT},hT=lT,ef="treemap",cT=g(e=>/^\s*treemap/.test(e),"detector"),dT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-C-eMeMRG.js");return{diagram:t}},__vite__mapDeps([50,12,16,18,0,1,22,26,21]));return{id:ef,diagram:e}},"loader"),uT={id:ef,detector:cT,loader:dT},rf="wardley-beta",pT=g(e=>/^\s*wardley-beta/i.test(e),"detector"),gT=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-DVMv24j_.js");return{diagram:t}},__vite__mapDeps([51,16,18,0,1]));return{id:rf,diagram:e}},"loader"),fT={id:rf,detector:pT,loader:gT},mT=fT,Ch=!1,ls=g(()=>{Ch||(Ch=!0,Bo("error",g2,e=>e.toLowerCase().trim()==="error"),Bo("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),js(C2,B2,Q2),js(r1,A2,Q1,X1,g1,T1,_1,L1,N1,Y1,c1,a1,T2,C1,a2,r2,c2,M1,O2,P2,D1,Y2,rT,X2,N2,sT,uT,hT,mT))},"addDiagrams"),yT=g(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(pr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Ks(r)}catch{try{const{diagram:s,id:a}=await o();Bo(a,s,i)}catch(s){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete pr[r],s}}}))).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"),CT="graphics-document document";function of(e,t){e.attr("role",CT),t!==""&&e.attr("aria-roledescription",t)}g(of,"setA11yDiagramInfo");function sf(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}g(sf,"addSVGa11yTitleDescription");var ur,Ia=(ur=class{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static async fromText(t,r={}){const i=vt(),o=Ra(t,i);t=Z0(t)+`
298
+ `;try{Ks(o)}catch{const c=Bm(o);if(!c)throw new Fh(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();Bo(h,d)}const{db:s,parser:a,renderer:n,init:l}=Ks(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new ur(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(ur,"Diagram"),ur),xh=[],xT=g(()=>{xh.forEach(e=>{e()}),xh=[]},"attachFunctions"),bT=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function af(e){const t=e.match(Lh);if(!t)return{text:e,metadata:{}};let r=JC(t[1],{schema:QC})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}g(af,"extractFrontMatter");var kT=g(e=>e.replace(/\r\n?/g,`
299
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),TT=g(e=>{const{text:t,metadata:r}=af(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),ST=g(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:P0(e),directive:t}},"processDirectives");function En(e){const t=kT(e),r=TT(t),i=ST(r.text),o=pn(r.config,i.directive);return e=bT(i.text),{code:e,title:r.title,config:o}}g(En,"preprocessDiagram");function nf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(nf,"toBase64");var wT=5e4,_T="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",BT="sandbox",vT="loose",LT="http://www.w3.org/2000/svg",FT="http://www.w3.org/1999/xlink",AT="http://www.w3.org/1999/xhtml",ET="100%",MT="100%",$T="border:0;margin:0;",OT="margin:0",IT="allow-top-navigation-by-user-activation allow-popups",DT='The "iframe" tag is not supported by your browser.',PT=["foreignobject"],RT=["dominant-baseline"];function Mn(e){const t=En(e);return wo(),Jm(t.config??{}),t}g(Mn,"processAndSetConfigs");async function lf(e,t){ls();try{const{code:r,config:i}=Mn(e);return{diagramType:(await cf(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}g(lf,"parse");var bh=g((e,t,r=[])=>{const i=Oh(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),qT=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Ol(l.styles)||n.forEach(c=>{r.insertRule(bh(l.id,c,l.styles),r.cssRules.length)}),Ol(l.textStyles)||r.insertRule(bh(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Zs(o)+`
300
+ `}else i+=`${e.themeCSS}
301
+ `;return i+Zs(r)},"createCssStyles"),NT=g((e,t)=>Oa(Vk(`${e}{${t}}`),Qk([g(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Ea)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[Ik,Pk,bg,qk,"@container","@starting-style"],Ea].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Fn))},"addNamespace"),Kk])),"compileCSS"),zT=g((e,t,r,i)=>{const o=qT(e,r),s=Cy(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return NT(i,s)},"createUserStyles"),WT=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=mr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),HT=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":MT,i=nf(`<body style="${OT}">${e}</body>`);return`<iframe style="width:${ET};height:${r};${$T}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${IT}">
302
+ ${DT}
303
+ </iframe>`},"putIntoIFrame"),kh=g((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",LT);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function Da(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Da,"sandboxedIframe");var YT=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),UT=g(async function(e,t,r){ls();const i=Mn(t);t=i.code;const o=vt();q.debug(o),t.length>(o?.maxTextSize??wT)&&(t=_T);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=g(()=>{const z=lt(p?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let d=lt(document.body);const p=o.securityLevel===BT,u=o.securityLevel===vT,f=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const W=Da(lt(r),a);d=lt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=lt(r);kh(d,e,l,`font-family: ${f}`,FT)}else{if(YT(document,e,l,a),p){const W=Da(lt(document.body),a);d=lt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=lt("body");kh(d,e,l)}let m,y;try{m=await Ia.fromText(t,{title:i.title})}catch(W){if(o.suppressErrorRendering)throw h(),W;m=await Ia.fromText("error"),y=W}const C=d.select(c).node(),b=m.type,k=C.firstChild,S=k.firstChild,w=m.renderer.getClasses?.(t,m),_=zT(o,b,w,s),E=document.createElement("style");E.innerHTML=_,k.insertBefore(E,S);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(W){throw o.suppressErrorRendering?h():u2.draw(t,e,"11.15.0"),W}const v=d.select(`${c} svg`),N=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();df(b,v,N,I),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",AT);let R=d.select(c).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),R=WT(R,p,Re(o.arrowMarkerAbsolute)),p){const W=d.select(c+" svg").node();R=HT(R,W)}else u||(R=Qr.sanitize(R,{ADD_TAGS:PT,ADD_ATTR:RT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(xT(),y)throw y;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function hf(e={}){const t=Dt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Km(t),t?.theme&&t.theme in Oe?t.themeVariables=Oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Zm(t):Ih();Pa(r.logLevel),ls()}g(hf,"initialize");var cf=g((e,t={})=>{const{code:r}=En(e);return Ia.fromText(r,t)},"getDiagramFromText");function df(e,t,r,i){of(t,e),sf(t,r,i,t.attr("id"))}g(df,"addA11yInfo");var Cr=Object.freeze({render:UT,parse:lf,getDiagramFromText:cf,initialize:hf,getConfig:vt,setConfig:Dh,getSiteConfig:Ih,updateSiteConfig:Qm,reset:g(()=>{wo()},"reset"),globalReset:g(()=>{wo(Jr)},"globalReset"),defaultConfig:Jr});Pa(vt().logLevel);wo(vt());var jT=g((e,t,r)=>{q.warn(e),un(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"),uf=g(async function(e={querySelector:".mermaid"}){try{await GT(e)}catch(t){if(un(t)&&q.error(t.str),Pe.parseError&&Pe.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),GT=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Cr.getConfig();q.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");q.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(q.debug("Start On Load: "+i?.startOnLoad),Cr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=_u(ge.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ge.detectInit(a);h&&q.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await mf(c,a,l);l.innerHTML=d,e&&await e(c),p&&p(l)}catch(d){jT(d,n,Pe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),pf=g(function(e){Cr.initialize(e)},"initialize"),XT=g(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&pf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await uf(i)},"init"),VT=g(async(e,{lazyLoad:t=!0}={})=>{ls(),js(...e),t===!1&&await yT()},"registerExternalDiagrams"),gf=g(function(){if(Pe.startOnLoad){const{startOnLoad:e}=Cr.getConfig();e&&Pe.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",gf,!1);var ZT=g(function(e){Pe.parseError=e},"setParseErrorHandler"),jo=[],Hs=!1,ff=g(async()=>{if(!Hs){for(Hs=!0;jo.length>0;){const e=jo.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}Hs=!1}},"executeQueue"),KT=g(async(e,t)=>new Promise((r,i)=>{const o=g(()=>new Promise((s,a)=>{Cr.parse(e,t).then(n=>{s(n),r(n)},n=>{q.error("Error parsing",n),Pe.parseError?.(n),a(n),i(n)})}),"performCall");jo.push(o),ff().catch(i)}),"parse"),mf=g((e,t,r)=>new Promise((i,o)=>{const s=g(()=>new Promise((a,n)=>{Cr.render(e,t,r).then(l=>{a(l),i(l)},l=>{q.error("Error parsing",l),Pe.parseError?.(l),n(l),o(l)})}),"performCall");jo.push(s),ff().catch(o)}),"render"),QT=g(()=>Object.keys(pr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Pe={startOnLoad:!0,mermaidAPI:Cr,parse:KT,render:mf,init:XT,run:uf,registerExternalDiagrams:VT,registerLayoutLoaders:yg,initialize:pf,parseError:void 0,contentLoaded:gf,setParseErrorHandler:ZT,detectType:Ra,registerIconPacks:ib,getRegisteredDiagramsMetadata:QT},JT=Pe;const LS=Object.freeze(Object.defineProperty({__proto__:null,default:JT},Symbol.toStringTag,{value:"Module"}));export{$y as $,Ve as A,Rf as B,vt as C,vy as D,pn as E,$h as F,W0 as G,jy as H,Mm as I,QC as J,$i as K,rS as L,Jo as M,ny as N,Hh as O,Cl as P,Py as Q,ta as R,z0 as S,zi as T,Ce as U,M as V,$ as W,fy as X,Uh as Y,$0 as Z,g as _,ky as a,rk as a$,Ya as a0,nS as a1,cS as a2,vr as a3,Tl as a4,kl as a5,uS as a6,dS as a7,hS as a8,sS as a9,b0 as aA,x0 as aB,C0 as aC,T0 as aD,k0 as aE,n0 as aF,Jd as aG,p0 as aH,d0 as aI,c0 as aJ,tu as aK,t0 as aL,ee as aM,qe as aN,fi as aO,gn as aP,nu as aQ,mr as aR,du as aS,wh as aT,Mk as aU,SS as aV,_S as aW,kS as aX,K as aY,TS as aZ,nk as a_,aS as aa,lS as ab,gS as ac,pS as ad,Ab as ae,pg as af,wS as ag,at as ah,Be as ai,dn as aj,X as ak,sb as al,an as am,on as an,mo as ao,y0 as ap,m0 as aq,f0 as ar,g0 as as,a0 as at,Kd as au,h0 as av,s0 as aw,u0 as ax,Qd as ay,l0 as az,by as b,ek as b0,Oy as b1,eS as b2,ji as b3,ib as b4,rb as b5,Z as b6,uu as b7,Pf as b8,LS as b9,Ct as c,Yh as d,Dt as e,De as f,Sy as g,ye as h,i0 as i,Wi as j,hu as k,q as l,iS as m,vS as n,wy as o,_y as p,JC as q,BS as r,Ty as s,Zb as t,ge as u,fS as v,U0 as w,Qr as x,xy as y,oS as z};