@az-zephyr/slate 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.en.md +107 -0
- package/README.md +106 -2
- package/bin/slate.mjs +226 -0
- package/dist/agent/chunk-BVWXAL54.js +3654 -0
- package/dist/agent/cli.js +6 -0
- package/dist/agent/multi.js +59 -0
- package/dist/api/001_initial.sql +127 -0
- package/dist/api/002_project_assistant.sql +24 -0
- package/dist/api/003_card_decisions.sql +20 -0
- package/dist/api/004_card_default_agent.sql +3 -0
- package/dist/api/005_card_attachments.sql +24 -0
- package/dist/api/006_comment_attachments.sql +7 -0
- package/dist/api/007_participant_last_outcome.sql +6 -0
- package/dist/api/008_output_attachments.sql +7 -0
- package/dist/api/009_card_agent_runs.sql +23 -0
- package/dist/api/server.js +4567 -0
- package/dist/api/server.js.map +1 -0
- package/dist/web/assets/abnfDiagram-XWFEHMT6-DmNFXSdi.js +1 -0
- package/dist/web/assets/architectureDiagram-CSQXQB3N-BTCN41JR.js +36 -0
- package/dist/web/assets/blockDiagram-BEDRHYPZ-BUJZDqr0.js +140 -0
- package/dist/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
- package/dist/web/assets/c4Diagram-M2UUVUY5-CoTmMGy5.js +38 -0
- package/dist/web/assets/chunk-2Q5K7J3B-DN1oTl6j.js +1 -0
- package/dist/web/assets/chunk-3BJB4PZV-f0-m4Ag2.js +1 -0
- package/dist/web/assets/chunk-3GCGMST5-79GFiiwz.js +1 -0
- package/dist/web/assets/chunk-5VM5RSS4-D8XyNr_K.js +15 -0
- package/dist/web/assets/chunk-7U7NFRK5-CwjNfj8w.js +88 -0
- package/dist/web/assets/chunk-CNRTWJTD-CrX82YZ2.js +1 -0
- package/dist/web/assets/chunk-D5HYT7QG-DLlJaHjh.js +1 -0
- package/dist/web/assets/chunk-EBZ3SEQC-DYMBSe-a.js +2 -0
- package/dist/web/assets/chunk-JWPE2WC7-D7hN7LFG.js +1 -0
- package/dist/web/assets/chunk-KTR4FSNJ-DNqOwqFL.js +1 -0
- package/dist/web/assets/chunk-XXDRQBXY-ZgzK0pt4.js +1 -0
- package/dist/web/assets/classDiagram-v2-IZLYA2OM-CA7bnKxc.js +217 -0
- package/dist/web/assets/cose-bilkent-JH36ORCC-DOKkzmxA.js +1 -0
- package/dist/web/assets/cynefin-EF2NZ3EQ-C-bSVtsc.js +141 -0
- package/dist/web/assets/cynefinDiagram-NJNITYFG-C37MEEtf.js +62 -0
- package/dist/web/assets/cytoscape.esm-Bw5aGq32.js +332 -0
- package/dist/web/assets/d3-scale-4DPf7zan.js +1 -0
- package/dist/web/assets/dagre-KIHZ2IZ3-9ncwFAl9.js +4 -0
- package/dist/web/assets/diagram-7YQZDPLS-B5nOmdUq.js +41 -0
- package/dist/web/assets/diagram-QBROCOUO-C2R6lDiO.js +200 -0
- package/dist/web/assets/diagram-RJJCUUZO-C6CCweHA.js +30 -0
- package/dist/web/assets/diagram-WERXNKYE-BMvmqzmc.js +24 -0
- package/dist/web/assets/diagram-YHHI257C-mq9rFYCr.js +3 -0
- package/dist/web/assets/diagram-YR4HJLHV-GnLZxfuk.js +24 -0
- package/dist/web/assets/ebnfDiagram-N527522P-BD49AZHw.js +1 -0
- package/dist/web/assets/elk-O5DQBFGD-BPi3gK_q.js +27 -0
- package/dist/web/assets/erDiagram-GT5GOJPG-v00zB8rw.js +99 -0
- package/dist/web/assets/flowDiagram-JAYNFW54-DIf4aoDB.js +213 -0
- package/dist/web/assets/ganttDiagram-3PRQTZWP-DRl_shHP.js +292 -0
- package/dist/web/assets/gitGraphDiagram-VXDFKS5L-2RrHppJt.js +106 -0
- package/dist/web/assets/graph-Bn3Yngep.js +1 -0
- package/dist/web/assets/grid-E2QIVN74-BuI-3sqA.js +1 -0
- package/dist/web/assets/index-5BTf4y0R.css +1 -0
- package/dist/web/assets/index-CtfDl2Kw.js +358 -0
- package/dist/web/assets/infoDiagram-ATMJ4U3S-afgUHtXU.js +2 -0
- package/dist/web/assets/ishikawaDiagram-S3EKX5GW-BsIUfApm.js +70 -0
- package/dist/web/assets/journeyDiagram-POQNLL5X-BM1Liuxy.js +139 -0
- package/dist/web/assets/kanban-definition-BH5XI6FM-Bz439vDv.js +89 -0
- package/dist/web/assets/katex-Be3d8Y4U.js +257 -0
- package/dist/web/assets/mermaid.core-CDkqDmQh.js +314 -0
- package/dist/web/assets/mindmap-definition-WVAN44T4-DcgvDd37.js +98 -0
- package/dist/web/assets/pegDiagram-D4NLKWP3-Bs1FcfRL.js +1 -0
- package/dist/web/assets/pieDiagram-36ENHN4W-CX3-kIFy.js +39 -0
- package/dist/web/assets/quadrantDiagram-ZQUDMS73-CrSg-66H.js +7 -0
- package/dist/web/assets/railroadDiagram-JIZHGYPL-DBm7mKc_.js +1 -0
- package/dist/web/assets/render-VIF2ZAQL-CjnzRbOQ.js +2 -0
- package/dist/web/assets/requirementDiagram-AXW2TVFA--vkT5OaJ.js +84 -0
- package/dist/web/assets/sankeyDiagram-FBCJTAIF-CXyuNpgP.js +40 -0
- package/dist/web/assets/sequenceDiagram-3LA2ROMG-Cfn5c7T5.js +169 -0
- package/dist/web/assets/sizeCapture-2Q2CQKSF-CQJexuw3.js +1 -0
- package/dist/web/assets/stateDiagram-v2-XZFR63ZJ-W23Y_4Yd.js +291 -0
- package/dist/web/assets/swimlanes-YQL5WMAO-B8ymV9uv.js +1 -0
- package/dist/web/assets/swimlanesDiagram-BA3ZWDFA-ClHf-9J2.js +8 -0
- package/dist/web/assets/timeline-definition-7Z437IG3-BElgSf_v.js +120 -0
- package/dist/web/assets/usecaseDiagram-RDK6N6HP-BfopeYcl.js +370 -0
- package/dist/web/assets/vennDiagram-SHRQU5PJ-034PLwGh.js +34 -0
- package/dist/web/assets/wardleyDiagram-F3OXNVQS-Cmiyei3a.js +78 -0
- package/dist/web/assets/xychartDiagram-GDYJKCDI-DxF4glgl.js +7 -0
- package/dist/web/index.html +13 -0
- package/package.json +42 -4
- package/scripts/git-worktree.mjs +63 -0
- package/scripts/slate-cli.mjs +851 -0
- package/skills/slate-card/SKILL.md +109 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/elk-O5DQBFGD-BPi3gK_q.js","assets/chunk-3GCGMST5-79GFiiwz.js","assets/chunk-EBZ3SEQC-DYMBSe-a.js","assets/index-CtfDl2Kw.js","assets/index-5BTf4y0R.css","assets/graph-Bn3Yngep.js","assets/dagre-KIHZ2IZ3-9ncwFAl9.js","assets/swimlanes-YQL5WMAO-B8ymV9uv.js","assets/grid-E2QIVN74-BuI-3sqA.js","assets/render-VIF2ZAQL-CjnzRbOQ.js","assets/cose-bilkent-JH36ORCC-DOKkzmxA.js","assets/cytoscape.esm-Bw5aGq32.js","assets/c4Diagram-M2UUVUY5-CoTmMGy5.js","assets/chunk-D5HYT7QG-DLlJaHjh.js","assets/flowDiagram-JAYNFW54-DIf4aoDB.js","assets/chunk-KTR4FSNJ-DNqOwqFL.js","assets/chunk-5VM5RSS4-D8XyNr_K.js","assets/chunk-3BJB4PZV-f0-m4Ag2.js","assets/chunk-XXDRQBXY-ZgzK0pt4.js","assets/chunk-CNRTWJTD-CrX82YZ2.js","assets/diagram-QBROCOUO-C2R6lDiO.js","assets/swimlanesDiagram-BA3ZWDFA-ClHf-9J2.js","assets/erDiagram-GT5GOJPG-v00zB8rw.js","assets/gitGraphDiagram-VXDFKS5L-2RrHppJt.js","assets/chunk-JWPE2WC7-D7hN7LFG.js","assets/chunk-2Q5K7J3B-DN1oTl6j.js","assets/cynefin-EF2NZ3EQ-C-bSVtsc.js","assets/ganttDiagram-3PRQTZWP-DRl_shHP.js","assets/d3-scale-4DPf7zan.js","assets/infoDiagram-ATMJ4U3S-afgUHtXU.js","assets/pieDiagram-36ENHN4W-CX3-kIFy.js","assets/quadrantDiagram-ZQUDMS73-CrSg-66H.js","assets/xychartDiagram-GDYJKCDI-DxF4glgl.js","assets/requirementDiagram-AXW2TVFA--vkT5OaJ.js","assets/sequenceDiagram-3LA2ROMG-Cfn5c7T5.js","assets/classDiagram-v2-IZLYA2OM-CA7bnKxc.js","assets/stateDiagram-v2-XZFR63ZJ-W23Y_4Yd.js","assets/journeyDiagram-POQNLL5X-BM1Liuxy.js","assets/timeline-definition-7Z437IG3-BElgSf_v.js","assets/mindmap-definition-WVAN44T4-DcgvDd37.js","assets/kanban-definition-BH5XI6FM-Bz439vDv.js","assets/sankeyDiagram-FBCJTAIF-CXyuNpgP.js","assets/diagram-WERXNKYE-BMvmqzmc.js","assets/diagram-7YQZDPLS-B5nOmdUq.js","assets/blockDiagram-BEDRHYPZ-BUJZDqr0.js","assets/diagram-RJJCUUZO-C6CCweHA.js","assets/architectureDiagram-CSQXQB3N-BTCN41JR.js","assets/diagram-YHHI257C-mq9rFYCr.js","assets/ishikawaDiagram-S3EKX5GW-BsIUfApm.js","assets/vennDiagram-SHRQU5PJ-034PLwGh.js","assets/diagram-YR4HJLHV-GnLZxfuk.js","assets/usecaseDiagram-RDK6N6HP-BfopeYcl.js","assets/wardleyDiagram-F3OXNVQS-Cmiyei3a.js","assets/cynefinDiagram-NJNITYFG-C37MEEtf.js","assets/railroadDiagram-JIZHGYPL-DBm7mKc_.js","assets/chunk-7U7NFRK5-CwjNfj8w.js","assets/ebnfDiagram-N527522P-BD49AZHw.js","assets/abnfDiagram-XWFEHMT6-DmNFXSdi.js","assets/pegDiagram-D4NLKWP3-Bs1FcfRL.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var N0=Object.defineProperty;var W0=(e,t,r)=>t in e?N0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>W0(e,typeof t!="symbol"?t+"":t,r);import{g as z0,_ as Wt}from"./index-CtfDl2Kw.js";var pd=Object.defineProperty,p=(e,t)=>pd(e,"name",{value:t,configurable:!0}),H0=(e,t)=>{for(var r in t)pd(e,r,{get:t[r],enumerable:!0})},Ca={exports:{}},Y0=Ca.exports,Hh;function U0(){return Hh||(Hh=1,(function(e,t){(function(r,i){e.exports=i()})(Y0,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",l="hour",h="day",c="week",u="month",d="quarter",f="year",g="date",y="Invalid Date",x=/^(\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(F){var $=["th","st","nd","rd"],v=F%100;return"["+F+($[(v-20)%10]||$[v]||$[0])+"]"}},k=function(F,$,v){var N=String(F);return!N||N.length>=$?F:""+Array($+1-N.length).join(v)+F},_={s:k,z:function(F){var $=-F.utcOffset(),v=Math.abs($),N=Math.floor(v/60),P=v%60;return($<=0?"+":"-")+k(N,2,"0")+":"+k(P,2,"0")},m:function F($,v){if($.date()<v.date())return-F(v,$);var N=12*(v.year()-$.year())+(v.month()-$.month()),P=$.clone().add(N,u),E=v-P<0,Y=$.clone().add(N+(E?-1:1),u);return+(-(N+(v-P)/(E?P-Y:Y-P))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:u,y:f,w:c,d:h,D:g,h:l,m:o,s:n,ms:a,Q:d}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},B="en",A={};A[B]=b;var M="$isDayjsObject",L=function(F){return F instanceof K||!(!F||!F[M])},q=function F($,v,N){var P;if(!$)return B;if(typeof $=="string"){var E=$.toLowerCase();A[E]&&(P=E),v&&(A[E]=v,P=E);var Y=$.split("-");if(!P&&Y.length>1)return F(Y[0])}else{var ot=$.name;A[ot]=$,P=ot}return!N&&P&&(B=P),P||!N&&B},D=function(F,$){if(L(F))return F.clone();var v=typeof $=="object"?$:{};return v.date=F,v.args=arguments,new K(v)},R=_;R.l=q,R.i=L,R.w=function(F,$){return D(F,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var K=(function(){function F(v){this.$L=q(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[M]=!0}var $=F.prototype;return $.parse=function(v){this.$d=(function(N){var P=N.date,E=N.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 Y=P.match(x);if(Y){var ot=Y[2]-1||0,tt=(Y[7]||"0").substring(0,3);return E?new Date(Date.UTC(Y[1],ot,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,tt)):new Date(Y[1],ot,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,tt)}}return new Date(P)})(v),this.init()},$.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},$.$utils=function(){return R},$.isValid=function(){return this.$d.toString()!==y},$.isSame=function(v,N){var P=D(v);return this.startOf(N)<=P&&P<=this.endOf(N)},$.isAfter=function(v,N){return D(v)<this.startOf(N)},$.isBefore=function(v,N){return this.endOf(N)<D(v)},$.$g=function(v,N,P){return R.u(v)?this[N]:this.set(P,v)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(v,N){var P=this,E=!!R.u(N)||N,Y=R.p(v),ot=function(Ct,st){var gt=R.w(P.$u?Date.UTC(P.$y,st,Ct):new Date(P.$y,st,Ct),P);return E?gt:gt.endOf(h)},tt=function(Ct,st){return R.w(P.toDate()[Ct].apply(P.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(st)),P)},et=this.$W,ct=this.$M,ut=this.$D,wt="set"+(this.$u?"UTC":"");switch(Y){case f:return E?ot(1,0):ot(31,11);case u:return E?ot(1,ct):ot(0,ct+1);case c:var Bt=this.$locale().weekStart||0,vt=(et<Bt?et+7:et)-Bt;return ot(E?ut-vt:ut+(6-vt),ct);case h:case g:return tt(wt+"Hours",0);case l:return tt(wt+"Minutes",1);case o:return tt(wt+"Seconds",2);case n:return tt(wt+"Milliseconds",3);default:return this.clone()}},$.endOf=function(v){return this.startOf(v,!1)},$.$set=function(v,N){var P,E=R.p(v),Y="set"+(this.$u?"UTC":""),ot=(P={},P[h]=Y+"Date",P[g]=Y+"Date",P[u]=Y+"Month",P[f]=Y+"FullYear",P[l]=Y+"Hours",P[o]=Y+"Minutes",P[n]=Y+"Seconds",P[a]=Y+"Milliseconds",P)[E],tt=E===h?this.$D+(N-this.$W):N;if(E===u||E===f){var et=this.clone().set(g,1);et.$d[ot](tt),et.init(),this.$d=et.set(g,Math.min(this.$D,et.daysInMonth())).$d}else ot&&this.$d[ot](tt);return this.init(),this},$.set=function(v,N){return this.clone().$set(v,N)},$.get=function(v){return this[R.p(v)]()},$.add=function(v,N){var P,E=this;v=Number(v);var Y=R.p(N),ot=function(ct){var ut=D(E);return R.w(ut.date(ut.date()+Math.round(ct*v)),E)};if(Y===u)return this.set(u,this.$M+v);if(Y===f)return this.set(f,this.$y+v);if(Y===h)return ot(1);if(Y===c)return ot(7);var tt=(P={},P[o]=i,P[l]=s,P[n]=r,P)[Y]||1,et=this.$d.getTime()+v*tt;return R.w(et,this)},$.subtract=function(v,N){return this.add(-1*v,N)},$.format=function(v){var N=this,P=this.$locale();if(!this.isValid())return P.invalidDate||y;var E=v||"YYYY-MM-DDTHH:mm:ssZ",Y=R.z(this),ot=this.$H,tt=this.$m,et=this.$M,ct=P.weekdays,ut=P.months,wt=P.meridiem,Bt=function(st,gt,Lt,zt){return st&&(st[gt]||st(N,E))||Lt[gt].slice(0,zt)},vt=function(st){return R.s(ot%12||12,st,"0")},Ct=wt||function(st,gt,Lt){var zt=st<12?"AM":"PM";return Lt?zt.toLowerCase():zt};return E.replace(C,(function(st,gt){return gt||(function(Lt){switch(Lt){case"YY":return String(N.$y).slice(-2);case"YYYY":return R.s(N.$y,4,"0");case"M":return et+1;case"MM":return R.s(et+1,2,"0");case"MMM":return Bt(P.monthsShort,et,ut,3);case"MMMM":return Bt(ut,et);case"D":return N.$D;case"DD":return R.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Bt(P.weekdaysMin,N.$W,ct,2);case"ddd":return Bt(P.weekdaysShort,N.$W,ct,3);case"dddd":return ct[N.$W];case"H":return String(ot);case"HH":return R.s(ot,2,"0");case"h":return vt(1);case"hh":return vt(2);case"a":return Ct(ot,tt,!0);case"A":return Ct(ot,tt,!1);case"m":return String(tt);case"mm":return R.s(tt,2,"0");case"s":return String(N.$s);case"ss":return R.s(N.$s,2,"0");case"SSS":return R.s(N.$ms,3,"0");case"Z":return Y}return null})(st)||Y.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(v,N,P){var E,Y=this,ot=R.p(N),tt=D(v),et=(tt.utcOffset()-this.utcOffset())*i,ct=this-tt,ut=function(){return R.m(Y,tt)};switch(ot){case f:E=ut()/12;break;case u:E=ut();break;case d:E=ut()/3;break;case c:E=(ct-et)/6048e5;break;case h:E=(ct-et)/864e5;break;case l:E=ct/s;break;case o:E=ct/i;break;case n:E=ct/r;break;default:E=ct}return P?E:R.a(E)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return A[this.$L]},$.locale=function(v,N){if(!v)return this.$L;var P=this.clone(),E=q(v,N,!0);return E&&(P.$L=E),P},$.clone=function(){return R.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},F})(),O=K.prototype;return D.prototype=O,[["$ms",a],["$s",n],["$m",o],["$H",l],["$W",h],["$M",u],["$y",f],["$D",g]].forEach((function(F){O[F[1]]=function($){return this.$g($,F[0],F[1])}})),D.extend=function(F,$){return F.$i||(F($,K,D),F.$i=!0),D},D.locale=q,D.isDayjs=L,D.unix=function(F){return D(1e3*F)},D.en=A[B],D.Ls=A,D.p={},D}))})(Ca)),Ca.exports}var j0=U0();const G0=z0(j0);var kr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},at={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ul=p(function(e="fatal"){let t=kr.fatal;typeof e=="string"?e.toLowerCase()in kr&&(t=kr[e]):typeof e=="number"&&(t=e),at.trace=()=>{},at.debug=()=>{},at.info=()=>{},at.warn=()=>{},at.error=()=>{},at.fatal=()=>{},t<=kr.fatal&&(at.fatal=console.error?console.error.bind(console,Ue("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ue("FATAL"))),t<=kr.error&&(at.error=console.error?console.error.bind(console,Ue("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ue("ERROR"))),t<=kr.warn&&(at.warn=console.warn?console.warn.bind(console,Ue("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ue("WARN"))),t<=kr.info&&(at.info=console.info?console.info.bind(console,Ue("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ue("INFO"))),t<=kr.debug&&(at.debug=console.debug?console.debug.bind(console,Ue("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ue("DEBUG"))),t<=kr.trace&&(at.trace=console.debug?console.debug.bind(console,Ue("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ue("TRACE")))},"setLogLevel"),Ue=p(e=>`%c${G0().format("ss.SSS")} : ${e} : `,"format");const xa={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return xa.hue2rgb(a,s,e+1/3)*255;case"g":return xa.hue2rgb(a,s,e)*255;case"b":return xa.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,l=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},X0={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},V0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Rt={channel:xa,lang:X0,unit:V0},Rr={};for(let e=0;e<=255;e++)Rr[e]=Rt.unit.dec2hex(e);const Be={ALL:0,RGB:1,HSL:2};let Z0=class{constructor(){this.type=Be.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=Be.ALL}is(t){return this.type===t}};class K0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Z0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Be.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Rt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Rt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Rt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Rt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Rt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Rt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Be.HSL)&&r!==void 0?r:(this._ensureHSL(),Rt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Be.HSL)&&r!==void 0?r:(this._ensureHSL(),Rt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Be.HSL)&&r!==void 0?r:(this._ensureHSL(),Rt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Be.RGB)&&r!==void 0?r:(this._ensureRGB(),Rt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Be.RGB)&&r!==void 0?r:(this._ensureRGB(),Rt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Be.RGB)&&r!==void 0?r:(this._ensureRGB(),Rt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Be.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Be.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Be.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Be.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Be.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Be.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ro=new K0({r:0,g:0,b:0,a:0},"transparent"),vi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(vi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,l=n?8:4,h=a?0:-1,c=n?255:15;return ro.set({r:(i>>l*(h+3)&c)*o,g:(i>>l*(h+2)&c)*o,b:(i>>l*(h+1)&c)*o,a:a?(i&c)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Rr[Math.round(t)]}${Rr[Math.round(r)]}${Rr[Math.round(i)]}${Rr[Math.round(s*255)]}`:`#${Rr[Math.round(t)]}${Rr[Math.round(r)]}${Rr[Math.round(i)]}`}},ei={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(ei.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Rt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Rt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Rt.channel.clamp.h(parseFloat(r)*360)}}return Rt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ei.re);if(!r)return;const[,i,s,a,n,o]=r;return ro.set({h:ei._hue2deg(i),s:Rt.channel.clamp.s(parseFloat(s)),l:Rt.channel.clamp.l(parseFloat(a)),a:n?Rt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Rt.lang.round(t)}, ${Rt.lang.round(r)}%, ${Rt.lang.round(i)}%, ${s})`:`hsl(${Rt.lang.round(t)}, ${Rt.lang.round(r)}%, ${Rt.lang.round(i)}%)`}},Bs={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=Bs.colors[e];if(t)return vi.parse(t)},stringify:e=>{const t=vi.stringify(e);for(const r in Bs.colors)if(Bs.colors[r]===t)return r}},Cs={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(Cs.re);if(!r)return;const[,i,s,a,n,o,l,h,c]=r;return ro.set({r:Rt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Rt.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:Rt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?Rt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Rt.lang.round(t)}, ${Rt.lang.round(r)}, ${Rt.lang.round(i)}, ${Rt.lang.round(s)})`:`rgb(${Rt.lang.round(t)}, ${Rt.lang.round(r)}, ${Rt.lang.round(i)})`}},er={format:{keyword:Bs,hex:vi,rgb:Cs,rgba:Cs,hsl:ei,hsla:ei},parse:e=>{if(typeof e!="string")return e;const t=vi.parse(e)||Cs.parse(e)||ei.parse(e)||Bs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Be.HSL)||e.data.r===void 0?ei.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Cs.stringify(e):vi.stringify(e)},gd=(e,t)=>{const r=er.parse(e);for(const i in t)r[i]=Rt.channel.clamp[i](t[i]);return er.stringify(r)},Wr=(e,t,r=0,i=1)=>{if(typeof e!="number")return gd(e,{a:t});const s=ro.set({r:Rt.channel.clamp.r(e),g:Rt.channel.clamp.g(t),b:Rt.channel.clamp.b(r),a:Rt.channel.clamp.a(i)});return er.stringify(s)},Q0=(e,t)=>Rt.lang.round(er.parse(e)[t]),J0=e=>{const{r:t,g:r,b:i}=er.parse(e),s=.2126*Rt.channel.toLinear(t)+.7152*Rt.channel.toLinear(r)+.0722*Rt.channel.toLinear(i);return Rt.lang.round(s)},tC=e=>J0(e)>=.5,$e=e=>!tC(e),md=(e,t,r)=>{const i=er.parse(e),s=i[t],a=Rt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),er.stringify(i)},G=(e,t)=>md(e,"l",t),X=(e,t)=>md(e,"l",-t),w=(e,t)=>{const r=er.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return gd(e,i)},eC=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=er.parse(e),{r:o,g:l,b:h,a:c}=er.parse(t),u=r/100,d=u*2-1,f=n-c,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,x=1-y,C=i*y+o*x,b=s*y+l*x,k=a*y+h*x,_=n*u+c*(1-u);return Wr(C,b,k,_)},W=(e,t=100)=>{const r=er.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,eC(r,e,t)};/*! @license DOMPurify 3.5.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.5.1/LICENSE */function Yh(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 rC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(Array.isArray(e)&&(r==null||r===(typeof Symbol<"u"&&[][Symbol.iterator])||r===[]["@@iterator"]))return e;if(r!=null){var i,s,a,n,o=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(n=r.return(),Object(n)!==n))return}finally{if(h)throw s}}return o}}function iC(){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.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function sC(e,t){return rC(e,t)||aC(e,t)||iC()}function aC(e,t){if(e){if(typeof e=="string")return Yh(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)?Yh(e,t):void 0}}const yd=Object.entries,oC=Object.keys,Uh=Object.setPrototypeOf,nC=Object.isFrozen,Cd=Object.getPrototypeOf,xd=Object.getOwnPropertyDescriptor;let ue=Object.freeze,re=Object.seal,qr=Object.create,bd=typeof Reflect<"u"&&Reflect,La=bd.apply,An=bd.construct;ue||(ue=function(t){return t});re||(re=function(t){return t});La||(La=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});An||(An=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Fe=Jt(Array.prototype.forEach),lC=Jt(Array.prototype.lastIndexOf),jh=Jt(Array.prototype.pop),os=Jt(Array.prototype.push),Gh=Jt(Array.prototype.slice),hC=Jt(Array.prototype.splice),Li=Array.isArray,Eo=dl(Set),Mo=Jt(Set.prototype.add),ns=Jt(Set.prototype.has),cC=Jt(Set.prototype.delete),uC=dl(Map),Xh=Jt(Map.prototype.get),Vh=Jt(Map.prototype.set),Sr=Jt(String.prototype.toLowerCase),Oo=Jt(String.prototype.toString),dC=Jt(String.prototype.match),ls=Jt(String.prototype.replace),$o=Jt(String.prototype.indexOf),fC=Jt(String.prototype.trim),pC=Jt(Number.prototype.toString),gC=Jt(Boolean.prototype.toString),Zh=typeof BigInt>"u"?null:Jt(BigInt.prototype.toString),Kh=typeof Symbol>"u"?null:Jt(Symbol.prototype.toString),Le=Jt(Object.prototype.hasOwnProperty),hs=Jt(Object.prototype.toString),mC=RegExp.prototype.test,oe=function(t,r){return t instanceof RegExp&&(t.lastIndex=0),La(mC,t,[r])},nr=dl(TypeError);function Jt(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return La(e,t,i)}}function dl(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return An(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Sr;if(Uh&&Uh(e,null),!Li(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(nC(t)||(t[i]=a),s=a)}e[s]=!0}return e}function yC(e){for(let t=0;t<e.length;t++)Le(e,t)||(e[t]=null);return e}function Aa(e){const t=qr(null);for(const i of yd(e)){var r=sC(i,2);const s=r[0],a=r[1];Le(e,s)&&(Li(a)?t[s]=yC(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Aa(a):t[s]=a)}return t}function xs(e){const t=qr(null),r=oC(e);let i=r.length;for(;i--;)t[r[i]]=e[r[i]];return t}function CC(e){switch(typeof e){case"string":return e;case"number":return pC(e);case"boolean":return gC(e);case"bigint":return Zh?Zh(e):"0";case"symbol":return Kh?Kh(e):"Symbol()";case"undefined":return hs(e);case"function":case"object":{if(e===null)return hs(e);const t=e,r=je(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:hs(i)}return hs(e)}default:return hs(e)}}function je(e,t){for(;e!==null;){const i=xd(e,t);if(i){if(i.get)return Jt(i.get);if(typeof i.value=="function")return Jt(i.value)}e=Cd(e)}function r(){return null}return r}function xC(e,t){for(;e!==null;){const r=xd(e,t);if(r)return r.get?Jt(r.get):null;e=Cd(e)}return null}function bC(e){if(!e)return!1;try{return oe(e,""),!0}catch{return!1}}const Qh=ue(["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"]),Do=ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Io=ue(["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"]),kC=ue(["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"]),Po=ue(["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"]),SC=ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jh=ue(["#text"]),tc=ue(["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"]),Ro=ue(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),ec=ue(["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"]),ia=ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wC=re(/{{[\w\W]*|^[\w\W]*}}/g),TC=re(/<%[\w\W]*|^[\w\W]*%>/g),_C=re(/\${[\w\W]*/g),rc=re(/{{|}}|\${|<%|%>/),BC=re(/[^\t\n\f\r ]/),ic=re(/\u0000/g),vC=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),LC=re(/^aria-[\-\w]+$/),sc=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),AC=re(/^(?:\w+script|data):/i),FC=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),EC=re(/^html$/i),MC=re(/^[a-z][.\w]*(-[.\w]+)+$/i),qo=re(/<[/\w!]/g),OC=re(/<[/\w]/g),$C=re(/<[/\w]|^-?>|--!?>|<!-$/g),DC=re(/<\/no(script|embed|frames)/i),ac=re(/\/>/i),IC=re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),PC=re(/^[\r\n\t ]+/),Qt={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},RC=ue(Yt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),qC=ue(Yt({},["textarea","title"])),NC=ue(Yt({},["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","meta","param","source","track","wbr"])),WC=function(){return typeof window>"u"?null:window},zC=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},oc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ir=function(t,r,i,s){return Le(t,r)&&Li(t[r])?Yt(s.base?xs(s.base):{},t[r],s.transform):i},No=function(t,r,i){const s=Le(t,r)?t[r]:void 0;return s&&typeof s=="object"?Aa(s):i};function kd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WC();const t=ft=>kd(ft);if(t.version="3.5.1",t.removed=[],!e||!e.document||e.document.nodeType!==Qt.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript,a=e.HTMLTemplateElement,n=e.Node,o=e.Element,l=e.NodeFilter,h=e.DOMParser,c=e.MutationObserver,u=e.trustedTypes,d=o.prototype,f=je(d,"remove"),g=je(d,"removeChild"),y=je(d,"removeAttributeNode"),x=je(d,"nextSibling"),C=je(d,"childNodes"),b=je(d,"parentNode"),k=je(d,"shadowRoot"),_=je(d,"attributes"),B=n&&n.prototype?je(n.prototype,"nodeType"):null,A=n&&n.prototype?je(n.prototype,"nodeName"):null,M=n&&n.prototype?je(n.prototype,"ownerDocument"):null,L=function(T){return B?B(T):T.nodeType},q=function(T){return A?A(T):T.nodeName},D=xC(d,"namespaceURI"),R=function(T){return D?D(T):T.namespaceURI},K=function(T){return L(T)===Qt.element?_(T):null};if(typeof a=="function"){const ft=r.createElement("template");ft.content&&ft.content.ownerDocument&&(r=ft.content.ownerDocument)}let O,F="",$,v=!1,N=0;const P=function(){if(N>0)throw nr('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.')},E=function(T){P(),N++;try{return O.createHTML(T)}finally{N--}},Y=function(T){return O&&J?E(T):T},ot=function(T){P(),N++;try{return O.createScriptURL(T)}finally{N--}},tt=function(){return v||($=zC(u,s),v=!0),$},et=r,ct=et.implementation,ut=et.createNodeIterator,wt=et.createDocumentFragment,Bt=et.getElementsByTagName,vt=i.importNode;let Ct=oc();t.isSupported=typeof yd=="function"&&typeof b=="function"&&ct&&ct.createHTMLDocument!==void 0;const st=wC,gt=TC,Lt=_C,zt=vC,jt=LC,U=AC,Ot=FC,He=MC;let De=sc,Gt=null;const ir=Yt({},[...Qh,...Do,...Io,...Po,...Jh]);let Xt=null;const Cr=Yt({},[...tc,...Ro,...ec,...ia]);let ye=null,be=null,Or=null;const ke=Object.seal(qr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $r=!0,xr=!0,m=!1,z=!0,Q=!1,it=!0,Z=!1,S=!1,H=null,V=null,nt=!1,lt=!1,ht=!1,J=!1,dt=!0,_t=!1;const Ft="user-content-";let Et=!0,Pt=!1,$t=null,Se=null,Ye=!1,Ie=null;const wh=Yt({},["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 Th=null;const _h=Yt({},["audio","video","img","source","image","track"]);let Bh=null;const vh=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vs="http://www.w3.org/1998/Math/MathML",Zs="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ci=Ke,xo=!1,Lh=null;const l0=Yt({},[Vs,Zs,Ke],Oo),h0=ue(Yt({},["mi","mo","mn","ms","mtext"]));let bo=null;const c0=ue(Yt({},["annotation-xml"]));let ko=null;const u0=ue(qr(null)),d0=Yt({},["title","style","font","a","script"]);let ui=null;const f0=["application/xhtml+xml","text/html"],p0="text/html";let ie=null,es=null,Ks=null;const g0=r.createElement("form"),Ah=function(T){return T instanceof RegExp||T instanceof Function},Qs=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(!T||typeof T!="object")&&(T={}),T=Aa(T),ui=f0.indexOf(T.PARSER_MEDIA_TYPE)===-1?p0:T.PARSER_MEDIA_TYPE,ie=ui==="application/xhtml+xml"?Oo:Sr,Gt=Ir(T,"ALLOWED_TAGS",ir,{transform:ie}),Xt=Ir(T,"ALLOWED_ATTR",Cr,{transform:ie}),Lh=Ir(T,"ALLOWED_NAMESPACES",l0,{transform:Oo}),Bh=Ir(T,"ADD_URI_SAFE_ATTR",vh,{transform:ie,base:vh}),Th=Ir(T,"ADD_DATA_URI_TAGS",_h,{transform:ie,base:_h}),Ie=Ir(T,"FORBID_CONTENTS",wh,{transform:ie}),be=Ir(T,"FORBID_TAGS",qr(null),{transform:ie}),Or=Ir(T,"FORBID_ATTR",qr(null),{transform:ie}),Ye=Le(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Aa(T.USE_PROFILES):T.USE_PROFILES:!1,$r=T.ALLOW_ARIA_ATTR!==!1,xr=T.ALLOW_DATA_ATTR!==!1,m=T.ALLOW_UNKNOWN_PROTOCOLS||!1,z=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=T.SAFE_FOR_TEMPLATES||!1,it=T.SAFE_FOR_XML!==!1,Z=T.WHOLE_DOCUMENT||!1,lt=T.RETURN_DOM||!1,ht=T.RETURN_DOM_FRAGMENT||!1,J=T.RETURN_TRUSTED_TYPE||!1,nt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,_t=T.SANITIZE_NAMED_PROPS||!1,Et=T.KEEP_CONTENT!==!1,Pt=T.IN_PLACE||!1,De=bC(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:sc,ci=typeof T.NAMESPACE=="string"?T.NAMESPACE:Ke,bo=No(T,"MATHML_TEXT_INTEGRATION_POINTS",h0),ko=No(T,"HTML_INTEGRATION_POINTS",c0);const I=No(T,"CUSTOM_ELEMENT_HANDLING",u0);if(ye=qr(null),Le(I,"tagNameCheck")&&Ah(I.tagNameCheck)&&(ye.tagNameCheck=I.tagNameCheck),Le(I,"attributeNameCheck")&&Ah(I.attributeNameCheck)&&(ye.attributeNameCheck=I.attributeNameCheck),Le(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(ye.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),re(ye),Q&&(xr=!1),ht&&(lt=!0),Ye&&((Le(T,"ALLOWED_TAGS")||Le(T,"ALLOWED_ATTR"))&&typeof console<"u"&&typeof console.warn=="function"&&console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together."),Gt=Yt({},Jh),Xt=qr(null),Ye.html===!0&&(Yt(Gt,Qh),Yt(Xt,tc)),Ye.svg===!0&&(Yt(Gt,Do),Yt(Xt,Ro),Yt(Xt,ia)),Ye.svgFilters===!0&&(Yt(Gt,Io),Yt(Xt,Ro),Yt(Xt,ia)),Ye.mathMl===!0&&(Yt(Gt,Po),Yt(Xt,ec),Yt(Xt,ia))),ke.tagCheck=null,ke.attributeCheck=null,Le(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ke.tagCheck=T.ADD_TAGS:Li(T.ADD_TAGS)&&(Gt===ir&&(Gt=xs(Gt)),Yt(Gt,T.ADD_TAGS,ie))),Le(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ke.attributeCheck=T.ADD_ATTR:Li(T.ADD_ATTR)&&(Xt===Cr&&(Xt=xs(Xt)),Yt(Xt,T.ADD_ATTR,ie))),Le(T,"ADD_FORBID_CONTENTS")&&Li(T.ADD_FORBID_CONTENTS)&&(Ie===wh&&(Ie=xs(Ie)),Yt(Ie,T.ADD_FORBID_CONTENTS,ie)),Et&&(Gt["#text"]=!0),Z&&Yt(Gt,["html","head","body"]),Gt.table&&(Gt.tbody=!0,delete be.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=O;O=T.TRUSTED_TYPES_POLICY;try{F=E("")}catch(rt){throw O=j,rt}}else T.TRUSTED_TYPES_POLICY===null?(O=void 0,F=""):(O===void 0&&(O=tt()),O&&typeof F=="string"&&(F=E("")));es=ue(T)},Fh=Yt({},[...Do,...Io,...kC]),Eh=Yt({},[...Po,...SC]),m0=function(T,I,j){return I===Ke?T==="svg":I===Vs?T==="svg"&&(j==="annotation-xml"||bo[j]):!!Fh[T]},y0=function(T,I,j){return I===Ke?T==="math":I===Zs?T==="math"&&ko[j]:!!Eh[T]},C0=function(T,I,j){return I===Zs&&!ko[j]||I===Vs&&!bo[j]?!1:!Eh[T]&&(d0[T]||!Fh[T])},x0=function(T){const I=R(T),j=Sr(q(T)),rt=b(T);let kt=ci,At="template";return rt&&L(rt)===Qt.element&&(kt=R(rt),At=Sr(q(rt))),Lh[I]?I===Zs?m0(j,kt,At):I===Vs?y0(j,kt,At):I===Ke?C0(j,kt,At):ui==="application/xhtml+xml":!1},Dr=function(T){os(t.removed,{element:T}),Dh(T);try{b(T).removeChild(T)}catch{if(f(T),!b(T))throw nr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Mh=function(T,I,j){try{y(T,I)}catch{try{T.removeAttribute(j)}catch{}}},b0=function(T){rs(T);const I=C(T);I&&Fe(Gh(I),j=>{try{g(T,j)}catch{}}),L(T)===Qt.element&&So(T,!1)},di=function(T,I,j){if(!j)try{j=I.getAttributeNode(T)}catch{j=null}if(os(t.removed,{attribute:j||null,from:I}),j)Mh(I,j,T);else try{I.removeAttribute(T)}catch{}if(T==="is")if(lt||ht)try{Dr(I)}catch{}else try{I.setAttribute(T,"")}catch{}},So=function(T,I){const j=_(T);if(j)for(let rt=j.length-1;rt>=0;--rt){const kt=j[rt],At=kt&&kt.name;typeof At=="string"&&!(I&&Xt[ie(At)])&&Mh(T,kt,At)}},wo=function(T,I){let j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const rt=[T];for(;rt.length>0;){const kt=rt.pop();if(I(kt)===!1)continue;if(j&&L(kt)===Qt.element){const Mt=k(kt);fi(Mt)&&rt.push(Mt)}const At=C(kt);if(At)for(let Mt=At.length-1;Mt>=0;--Mt)rt.push(At[Mt])}},rs=function(T){wo(T,I=>{L(I)===Qt.element&&So(I,!0)})},To=function(T){const I=[];return wo(T,j=>{I.push(j)},!0),I},k0=function(T){let I=null;return c&&Fe(T,j=>{L(j)===Qt.element&&ie(q(j))==="selectedcontent"&&(I=I||new c(()=>{}),I.observe(j,{childList:!0}))}),I},S0=function(T){Fe(T.takeRecords(),I=>{Fe(I.addedNodes,rs),Fe(I.removedNodes,rs)}),T.disconnect()},w0=function(T,I){const j=Eo();Fe(To(T),rt=>{L(rt)===Qt.element&&Mo(j,rt)}),Fe(I,rt=>{L(rt)===Qt.element&&!ns(j,rt)&&So(rt,!0)})},Oh=function(T,I){let j=!1;return Fe(t.removed,rt=>{rt.element&&(j=j||rt.element===T,rs(rt.element))}),w0(T,I),j},_o=function(T,I){b0(T),Oh(T,I)},$h=8,T0=function(T,I){const j=$t;let rt=null;const kt=()=>(rt||(rt=Eo(),Fe(I,At=>{Mo(rt,At)})),rt);for(let At=0;;At++){const Mt=To(T),Kt=[T];let br=!1;if(Fe(Mt,ar=>{L(ar)===Qt.documentFragment?os(Kt,ar):!br&&!ns(j,ar)&&(br=ns(kt(),ar))}),!br)return;if(At>=$h)throw nr("the tree kept changing during in-place sanitization; refusing to return it");Fe(Kt,(ar,or)=>{_0(ar,or>0,T,kt())})}},_0=function(T,I,j,rt){const kt=Js(T);let At;for(;At=kt.nextNode();)!ns(rt,At)||ns($t,At)||(I&&sr(Ct.uponSanitizeShadowNode,At,null),Lo(At,j))},B0=function(T){if(!$t)return;Mo($t,T);const I=Xh(Se,T);if(I!==void 0){if(I>=$h)throw nr("the tree kept changing during in-place sanitization; refusing to return it");Vh(Se,T,I+1)}},Dh=function(T){$t&&(cC($t,T),Xh(Se,T)===void 0&&Vh(Se,T,0))},Ih=function(T,I){return it?T==="patchsrc"?!0:T==="for"&&I!=="label"&&I!=="output":!1},v0=function(T){it&&wo(T,I=>{const j=L(I);if(j===Qt.processingInstruction||j===Qt.comment&&oe(OC,I.data)){try{f(I)}catch{}return!1}if(j===Qt.element){const rt=I,kt=ie(q(I));try{rt.hasAttribute&&rt.hasAttribute("patchsrc")&&rt.removeAttribute("patchsrc"),rt.hasAttribute&&rt.hasAttribute("for")&&Ih("for",kt)&&rt.removeAttribute("for")}catch{}}return!0})},Ph=function(T){let I=null,j=null;if(nt)T="<remove></remove>"+T;else{const At=dC(T,PC);j=At&&At[0]}ui==="application/xhtml+xml"&&ci===Ke&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const rt=O?E(T):T;if(ci===Ke)try{I=new h().parseFromString(rt,ui)}catch{}if(!I||!I.documentElement){I=ct.createDocument(ci,"template",null);try{I.documentElement.innerHTML=xo?F:rt}catch{}}const kt=I.body||I.documentElement;return T&&j&&kt.insertBefore(r.createTextNode(j),kt.childNodes[0]||null),ci===Ke?Bt.call(I,Z?"html":"body")[0]:Z?I.documentElement:kt},Js=function(T){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const j=M?M(T):T.ownerDocument;return ut.call(j||T,T,(I?0:l.SHOW_ELEMENT)|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ta=function(T){return T=ls(T,st," "),T=ls(T,gt," "),T=ls(T,Lt," "),T},Bo=function(T){var I;vo(T);const j=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,"template");j&&Fe(j,rt=>{fi(rt.content)&&Bo(rt.content)})},L0="table,tbody,thead,tfoot,tr,colgroup",A0=Yt({},["caption","colgroup","col","thead","tbody","tfoot","tr","td","th","style","script","template"]),F0=function(T){var I;if(ui==="application/xhtml+xml")return;const j=(I=T.querySelectorAll)===null||I===void 0?void 0:I.call(T,L0);!j||j.length===0||Fe(j,rt=>{Fe(Gh(C(rt)),kt=>{const At=L(kt);if(!(At===Qt.text?oe(BC,kt.data):At===Qt.element&&!A0[Sr(q(kt))]))return;let Mt=rt;for(;Mt&&Sr(q(Mt))!=="table";)Mt=Mt===T?null:b(Mt);const Kt=Mt&&Mt!==T?b(Mt):null;if(Kt)try{Kt.insertBefore(kt,Mt)}catch{}})})},vo=function(T){F0(T),T.normalize();const I=Js(T,!0);let j=null,rt=I.nextNode();for(;rt;){let kt=rt.data;if(oe(ic,kt)&&(kt=ls(kt,ic,""),rt.data=kt),oe(rc,kt)&&(kt=ta(kt),rt.data=kt),kt&&L(rt)===Qt.text){if(j){const At=j.data,Mt=At[At.length-1]+kt[0];oe(rc,Mt)&&(j.data=ta(At+kt[0]))}j=rt}rt=I.nextNode()}},ea=function(T){const I=A?A(T):null;return typeof I!="string"||ie(I)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==_(T)||typeof T.removeAttribute!="function"||typeof T.removeAttributeNode!="function"||typeof T.getAttributeNode!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==B(T)||T.childNodes!==C(T)},Rh=function(T){if(!B||typeof T!="object"||T===null)return null;try{const I=B(T);return typeof I=="number"?I:null}catch{return null}},fi=function(T){return Rh(T)===Qt.documentFragment},is=function(T){return Rh(T)!==null};function sr(ft,T,I){ft.length!==0&&Fe(ft,j=>{j.call(t,T,I,es)})}const E0=function(T,I){const j=!!NC[I],rt=!!RC[I];return!j&&!rt&&!qC[I]||R(T)!==Ke?!1:j?T.hasChildNodes():is(T.firstElementChild)?!0:rt&&typeof T.textContent=="string"&&oe(qo,T.textContent)},M0=function(T,I,j,rt){return!!(it&&j===Qt.element&&!(I==="body"&&b(T)===rt)&&T.hasChildNodes()&&!is(T.firstElementChild)&&oe(qo,T.textContent)&&oe(qo,T.innerHTML)||it&&j===Qt.element&&E0(T,I)||j===Qt.processingInstruction||it&&j===Qt.comment&&oe($C,T.data))},ra=function(T,I){if(T instanceof RegExp)return oe(T,I);if(T instanceof Function){for(var j=arguments.length,rt=new Array(j>2?j-2:0),kt=2;kt<j;kt++)rt[kt-2]=arguments[kt];return!!T(I,...rt)}return!1},O0=function(T,I,j){if(!be[I]&&Wh(I)&&ra(ye.tagNameCheck,I))return!1;if(Et&&!Ie[I]&&!Ie[Sr(I)]){const rt=b(T),kt=C(T);if(kt&&rt&&T!==j){const At=kt.length;for(let Mt=At-1;Mt>=0;--Mt)rt.insertBefore(kt[Mt],x(T))}}return Dr(T),!0},qh=function(T,I,j,rt){return T.length===0?I:I===j||I===rt?xs(I):I},ss=function(T,I){return T===I||b(T)!==null?!1:(Pt&&rs(T),Dh(T),!0)},$0=function(T,I){if(B0(T),sr(Ct.beforeSanitizeElements,T,null),ss(T,I))return!0;if(ea(T))return Dr(T),!0;const j=ie(q(T)),rt=L(T);if(Gt=qh(Ct.uponSanitizeElement,Gt,ir,H),sr(Ct.uponSanitizeElement,T,{tagName:j,allowedTags:Gt}),ss(T,I))return!0;if(M0(T,j,rt,I))return Dr(T),!0;if((be[j]||!(ke.tagCheck instanceof Function&&ke.tagCheck(j))&&!Gt[j])&&O0(T,j,I))return!0;if(rt===Qt.element&&!x0(T)||(j==="noscript"||j==="noembed"||j==="noframes")&&oe(DC,T.innerHTML))return Dr(T),!0;if(Q&&rt===Qt.text){const kt=T.textContent,At=ta(kt);kt!==At&&(os(t.removed,{element:T.cloneNode()}),T.textContent=At)}return sr(Ct.afterSanitizeElements,T,null),ss(T,I)},Nh=function(T,I,j){if(Or[I]||Ih(I,T)||dt&&(I==="id"||I==="name")&&(j in r||j in g0))return!1;const rt=Xt[I]||ke.attributeCheck instanceof Function&&ke.attributeCheck(I,T);if(xr&&oe(zt,I)||$r&&oe(jt,I))return!0;if(!rt)return Wh(T)&&ra(ye.tagNameCheck,T)&&ra(ye.attributeNameCheck,I,T)||I==="is"&&ye.allowCustomizedBuiltInElements&&ra(ye.tagNameCheck,j);if(Bh[I])return!0;const kt=ls(j,Ot,"");return oe(De,kt)||(I==="src"||I==="xlink:href"||I==="href")&&T!=="script"&&$o(j,"data:")===0&&Th[T]||m&&!oe(U,kt)?!0:!j},D0=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Wh=function(T){return!D0[Sr(T)]&&oe(He,T)},I0=function(T,I,j,rt){if(O&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!j)switch(u.getAttributeType(T,I)){case"TrustedHTML":return E(rt);case"TrustedScriptURL":return ot(rt)}return rt},P0=function(T,I,j,rt){try{return j?T.setAttributeNS(j,I,rt):T.setAttribute(I,rt),ea(T)?(Dr(T),!1):!0}catch{return di(I,T),!1}},zh=function(T,I){return it&&oe(IC,I)?!0:Sr(T)==="attributename"&&$o(I,"href")!==-1},R0=function(T,I){if(sr(Ct.beforeSanitizeAttributes,T,null),ss(T,I))return;const j=K(T);if(!j||ea(T))return;Xt=qh(Ct.uponSanitizeAttribute,Xt,Cr,V);const rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Xt,forceKeepAttr:void 0};let kt=j.length;const At=ie(q(T));for(;kt--;){const Mt=j[kt];if(!Mt)continue;const Kt=Mt.name,br=Mt.namespaceURI,ar=Mt.value,or=ie(Kt),Vr=ar;let ge=Kt==="value"?Vr:fC(Vr),we=!1;if(rt.attrName=or,rt.attrValue=ge,rt.keepAttr=!0,rt.forceKeepAttr=void 0,sr(Ct.uponSanitizeAttribute,T,rt),ge=rt.attrValue,_t&&(or==="id"||or==="name")&&$o(ge,Ft)!==0&&(di(Kt,T,Mt),ge=Ft+ge,we=!0),zh(Kt,ge)){di(Kt,T,Mt);continue}if(!rt.forceKeepAttr){if(!rt.keepAttr){di(Kt,T,Mt);continue}if(!z&&oe(ac,ge)){di(Kt,T,Mt);continue}if(Q&&(ge=ta(ge)),!Nh(At,or,ge)){di(Kt,T,Mt);continue}ge=I0(At,or,br,ge),ge!==Vr&&P0(T,Kt,br,ge)&&we&&jh(t.removed)}}sr(Ct.afterSanitizeAttributes,T,null),ss(T,I)},Lo=function(T,I){$0(T,I),R0(T,I),fi(T.content)&&Ao(T.content)},Ao=function(T){let I=null;const j=Js(T);for(sr(Ct.beforeSanitizeShadowDOM,T,null);I=j.nextNode();)if(sr(Ct.uponSanitizeShadowNode,I,null),Lo(I,T),L(I)===Qt.element){const rt=k(I);fi(rt)&&(Fo(rt),Ao(rt))}Q&&vo(T),sr(Ct.afterSanitizeShadowDOM,T,null)},Fo=function(T){const I=[{node:T,shadow:null}];for(;I.length>0;){const j=I.pop();if(j.shadow){Ao(j.shadow);continue}const rt=j.node,kt=L(rt)===Qt.element,At=C(rt);if(At)for(let Mt=At.length-1;Mt>=0;--Mt)I.push({node:At[Mt],shadow:null});if(kt){const Mt=A?A(rt):null;if(typeof Mt=="string"&&ie(Mt)==="template"){const Kt=rt.content;fi(Kt)&&I.push({node:Kt,shadow:null})}}if(kt){const Mt=k(rt);fi(Mt)&&I.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}},q0=function(T){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=null,rt=null,kt=null,At=null;if(xo=!T,xo&&(T="<!-->"),typeof T!="string"&&!is(T)&&(T=CC(T),typeof T!="string"))throw nr("dirty is not a string, aborting");if(!t.isSupported)return T;S?(Gt=H,Xt=V):Qs(I),Ks=es,t.removed=[];const Mt=Pt&&typeof T!="string"&&is(T);let Kt=[];const br=$t,ar=Se;if(Mt){v0(T),Kt=To(T);const we=q(T);if(typeof we=="string"){const as=ie(we);if(!Gt[as]||be[as])throw _o(T,Kt),nr("root node is forbidden and cannot be sanitized in-place")}if(ea(T))throw _o(T,Kt),nr("root node is clobbered and cannot be sanitized in-place");$t=Eo(),Se=uC()}else if(is(T)){j=Ph("<!---->");const we=j.ownerDocument;rt=we.importNode(T,!0);const as=rt.nodeType===Qt.element&&R(rt)===Ke;as&&we.body&&rt.nodeName==="BODY"?(we.documentElement.replaceChild(rt,we.body),j=rt):as&&rt.nodeName==="HTML"?(we.replaceChild(rt,we.documentElement),j=rt):j.appendChild(rt),Fo(j)}else{if(!lt&&!Q&&!Z&&T.indexOf("<")===-1)return Y(T);if(j=Ph(T),!j)return lt?null:J?F:""}j&&nt&&Dr(j.firstChild);const or=Mt?T:j;let Vr=null;try{Mt&&(Vr=k0(Kt),Fo(T));const we=Js(or);for(;kt=we.nextNode();)Lo(kt,or);Mt&&T0(T,Kt)}catch(we){throw Mt&&_o(T,Kt),we}finally{Vr&&S0(Vr),$t=br,Se=ar}if(Mt){if(Oh(T,Kt))throw nr("a node selected for removal could not be safely returned; refusing to sanitize in place");return Q&&Bo(T),T}if(lt){if(Q&&Bo(j),ht)for(At=wt.call(j.ownerDocument);j.firstChild;)At.appendChild(j.firstChild);else At=j;return(Xt.shadowroot||Xt.shadowrootmode)&&(At=vt.call(i,At,!0)),At}Q&&vo(j);let ge=Z?j.outerHTML:j.innerHTML;return Z&&Gt["!doctype"]&&j.ownerDocument&&j.ownerDocument.doctype&&j.ownerDocument.doctype.name&&oe(EC,j.ownerDocument.doctype.name)&&(ge="<!DOCTYPE "+j.ownerDocument.doctype.name+`>
|
|
4
|
+
`+ge),Y(ge)};return t.sanitize=function(ft){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const I=Ks,j=Gt,rt=Xt,kt=t.removed;Ks=null;try{return q0(ft,T)}finally{Ks=I,I&&(S||Qs(I),Gt=j,Xt=rt,t.removed=kt)}},t.setConfig=function(){let ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qs(ft),S=!0,H=Gt,V=Xt},t.clearConfig=function(){es=null,S=!1,H=null,V=null,O=$,F=""},t.isValidAttribute=function(ft,T,I){es||Qs({});const j=ie(ft),rt=ie(T);return typeof I=="string"&&(zh(T,I)||!z&&oe(ac,I))?!1:Nh(j,rt,I)},t.addHook=function(ft,T){typeof T=="function"&&Le(Ct,ft)&&os(Ct[ft],T)},t.removeHook=function(ft,T){if(Le(Ct,ft)){if(T!==void 0){const I=lC(Ct[ft],T);return I===-1?void 0:hC(Ct[ft],I,1)[0]}return jh(Ct[ft])}},t.removeHooks=function(ft){Le(Ct,ft)&&(Ct[ft]=[])},t.removeAllHooks=function(){Ct=oc()},t}var ji=kd(),vs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fa=/\s/,HC=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const a=e.indexOf(`
|
|
5
|
+
`,s);if(a===-1)break;let n=s;for(;n>r&&Fa.test(e[n-1]);)n--;t+=e.slice(r,n)+`
|
|
6
|
+
`,r=a+1,i=r}return t+e.slice(r)},"stripAnyComments"),ba=p(e=>e===`
|
|
7
|
+
`||e==="\r","isLineBreak"),YC=p((e,t)=>{let r=-1;for(let i=t;i<e.length&&Fa.test(e[i]);i++)ba(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),Sd=p(e=>{let t=0;for(;t<e.length&&Fa.test(e[t])&&!ba(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let c=t+3;c<e.length&&Fa.test(e[c]);c++)ba(e[c])&&i.push(c);if(i.length===0)return;const s=`${r}---`,a=p(c=>ba(e[c])&&e.startsWith(s,c+1)?YC(e,c+1+s.length):-1,"closingEnd"),n=i[0]+1;let o=-1;for(let c=n;c<e.length;c++)a(c)!==-1&&(o=c);if(o===-1)return;let l=i[0];for(const c of i)c<o&&(l=c);const h=l+1;for(let c=h;c<=o;c++){const u=a(c);if(u!==-1)return{indent:r,body:e.slice(h,c),length:u+1}}},"matchFrontMatter"),Fi,wd=(Fi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Fi,"UnknownDiagramError"),Fi),si={},io=p(function(e,t){const r=Sd(e);e=HC((r?e.slice(r.length):e).replace(vs,""));for(const[i,{detector:s}]of Object.entries(si))if(s(e,t))return i;throw new wd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Fn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Td(t,r,i)},"registerLazyLoadedDiagrams"),Td=p((e,t,r)=>{si[e]&&at.warn(`Detector with key ${e} already exists. Overwriting.`),si[e]={detector:t,loader:r},at.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),UC=p(e=>si[e].loader,"getDiagramLoader"),En=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>En(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,n])=>{if(typeof n=="object"){if(n===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(n)?[]:{}),typeof s[a]=="object"&&(s[a]=En(s[a],n,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=n:Object.defineProperty(e,a,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ce=En,pr="#ffffff",gr="#f2f2f2",It=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),nc=p(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),rr=p((e,t)=>nc(e)&&nc(t)?{...e,...t}:t,"applyOverride"),Ei,jC=(Ei=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,n,o,l,h,c,u,d,f,g,y,x,C,b,k,_,B,A,M,L,q,D,R,K,O,F,$,v,N,P,E,Y,ot,tt,et,ct,ut,wt,Bt,vt,Ct,st,gt,Lt,zt,jt,U;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?X(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||G(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||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10)):(this.rowOdd=this.rowOdd||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let Ot=0;Ot<this.THEME_COLOR_LIMIT;Ot++)this["cScale"+Ot]=X(this["cScale"+Ot],75);else for(let Ot=0;Ot<this.THEME_COLOR_LIMIT;Ot++)this["cScale"+Ot]=X(this["cScale"+Ot],25);for(let Ot=0;Ot<this.THEME_COLOR_LIMIT;Ot++)this["cScaleInv"+Ot]=this["cScaleInv"+Ot]||W(this["cScale"+Ot]);for(let Ot=0;Ot<this.THEME_COLOR_LIMIT;Ot++)this.darkMode?this["cScalePeer"+Ot]=this["cScalePeer"+Ot]||G(this["cScale"+Ot],10):this["cScalePeer"+Ot]=this["cScalePeer"+Ot]||X(this["cScale"+Ot],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Ot=0;Ot<this.THEME_COLOR_LIMIT;Ot++)this["cScaleLabel"+Ot]=this["cScaleLabel"+Ot]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Ot=0;Ot<5;Ot++)this["surface"+Ot]=this["surface"+Ot]||w(this.mainBkg,{h:180,s:-15,l:t*(5+Ot*3)}),this["surfacePeer"+Ot]=this["surfacePeer"+Ot]||w(this.mainBkg,{h:180,s:-15,l:t*(8+Ot*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:((A=this.radar)==null?void 0:A.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((M=this.radar)==null?void 0:M.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((q=this.radar)==null?void 0:q.legendBoxSize)||12,legendFontSize:((D=this.radar)==null?void 0:D.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((K=this.wardley)==null?void 0:K.axisColor)||this.lineColor,axisTextColor:((O=this.wardley)==null?void 0:O.axisTextColor)||this.primaryTextColor,gridColor:((F=this.wardley)==null?void 0:F.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((ot=this.wardley)==null?void 0:ot.annotationTextColor)||this.primaryTextColor,annotationFill:((tt=this.wardley)==null?void 0:tt.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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((ct=this.xyChart)==null?void 0:ct.titleColor)||this.primaryTextColor,dataLabelColor:((ut=this.xyChart)==null?void 0:ut.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((vt=this.xyChart)==null?void 0:vt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((st=this.xyChart)==null?void 0:st.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((gt=this.xyChart)==null?void 0:gt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((zt=this.xyChart)==null?void 0:zt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((jt=this.xyChart)==null?void 0:jt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((U=this.xyChart)==null?void 0:U.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?X(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr,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]=rr(this[i],t[i])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(Ei,"Theme"),Ei),GC=p(e=>{const t=new jC;return t.calculate(e),t},"getThemeVariables"),Mi,XC=(Mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=W(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(W("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Wr(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=X("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=X(this.sectionBkgColor,10),this.taskBorderColor=Wr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Wr(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||G(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,d,f,g,y,x,C,b,k,_,B,A,M,L,q,D,R,K,O,F,$,v,N,P,E,Y,ot,tt,et,ct,ut,wt,Bt,vt,Ct,st,gt,Lt,zt,jt;this.secondBkg=G(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=G(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=G(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=W(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleInv"+U]=this["cScaleInv"+U]||W(this["cScale"+U]);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScalePeer"+U]=this["cScalePeer"+U]||G(this["cScale"+U],10);for(let U=0;U<5;U++)this["surface"+U]=this["surface"+U]||w(this.mainBkg,{h:30,s:-30,l:-(-10+U*4)}),this["surfacePeer"+U]=this["surfacePeer"+U]||w(this.mainBkg,{h:30,s:-30,l:-(-7+U*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleLabel"+U]=this["cScaleLabel"+U]||this.scaleLabelColor;for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["pie"+U]=this["cScale"+U];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 U=0;U<8;U++)this["venn"+(U+1)]=this["venn"+(U+1)]??G(this["cScale"+U],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#F57F17",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#4A148C",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_=this.xyChart)==null?void 0:_.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((A=this.xyChart)==null?void 0:A.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((M=this.xyChart)==null?void 0:M.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((q=this.xyChart)==null?void 0:q.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((D=this.xyChart)==null?void 0:D.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((K=this.xyChart)==null?void 0:K.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:((O=this.radar)==null?void 0:O.axisColor)||this.lineColor,axisStrokeWidth:((F=this.radar)==null?void 0:F.axisStrokeWidth)||2,axisLabelFontSize:(($=this.radar)==null?void 0:$.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((N=this.radar)==null?void 0:N.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((Y=this.radar)==null?void 0:Y.graticuleOpacity)||.3,legendBoxSize:((ot=this.radar)==null?void 0:ot.legendBoxSize)||12,legendFontSize:((tt=this.radar)==null?void 0:tt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((ct=this.wardley)==null?void 0:ct.axisColor)||this.lineColor,axisTextColor:((ut=this.wardley)==null?void 0:ut.axisTextColor)||this.primaryTextColor,gridColor:((wt=this.wardley)==null?void 0:wt.gridColor)||this.gridColor,componentFill:((Bt=this.wardley)==null?void 0:Bt.componentFill)||this.mainBkg,componentStroke:((vt=this.wardley)==null?void 0:vt.componentStroke)||this.lineColor,componentLabelColor:((Ct=this.wardley)==null?void 0:Ct.componentLabelColor)||this.primaryTextColor,linkStroke:((st=this.wardley)==null?void 0:st.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Lt=this.wardley)==null?void 0:Lt.annotationStroke)||this.lineColor,annotationTextColor:((zt=this.wardley)==null?void 0:zt.annotationTextColor)||this.primaryTextColor,annotationFill:((jt=this.wardley)==null?void 0:jt.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?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=G(this.secondaryColor,20),this.git1=G(this.pie2||this.secondaryColor,20),this.git2=G(this.pie3||this.tertiaryColor,20),this.git3=G(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=G(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=G(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=G(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=G(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(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||G("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||G("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||G("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||G("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||G(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||G(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||G(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||G(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]=rr(this[i],t[i])})}},p(Mi,"Theme"),Mi),VC=p(e=>{const t=new XC;return t.calculate(e),t},"getThemeVariables"),Oi,ZC=(Oi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=It(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=Wr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,d,f,g,y,x,C,b,k,_,B,A,M,L,q,D,R,K,O,F,$,v,N,P,E,Y,ot,tt,et,ct,ut,wt,Bt,vt,Ct,st,gt,Lt,zt,jt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScale"+U]=X(this["cScale"+U],10),this["cScalePeer"+U]=this["cScalePeer"+U]||X(this["cScale"+U],25);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleInv"+U]=this["cScaleInv"+U]||w(this["cScale"+U],{h:180});for(let U=0;U<5;U++)this["surface"+U]=this["surface"+U]||w(this.mainBkg,{h:30,l:-(5+U*5)}),this["surfacePeer"+U]=this["surfacePeer"+U]||w(this.mainBkg,{h:30,l:-(7+U*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||W(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||W(this.labelTextColor);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleLabel"+U]=this["cScaleLabel"+U]||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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||G(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||G(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((M=this.radar)==null?void 0:M.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((D=this.wardley)==null?void 0:D.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((K=this.wardley)==null?void 0:K.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((F=this.wardley)==null?void 0:F.componentFill)||this.background,componentStroke:(($=this.wardley)==null?void 0:$.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((N=this.wardley)==null?void 0:N.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((E=this.wardley)==null?void 0:E.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((ot=this.wardley)==null?void 0:ot.annotationFill)||this.background},this.xyChart={backgroundColor:((tt=this.xyChart)==null?void 0:tt.backgroundColor)||this.background,titleColor:((et=this.xyChart)==null?void 0:et.titleColor)||this.primaryTextColor,dataLabelColor:((ct=this.xyChart)==null?void 0:ct.dataLabelColor)||this.primaryTextColor,legendTextColor:((ut=this.xyChart)==null?void 0:ut.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((vt=this.xyChart)==null?void 0:vt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((st=this.xyChart)==null?void 0:st.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((zt=this.xyChart)==null?void 0:zt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((jt=this.xyChart)==null?void 0:jt.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||X(W(this.git0),25),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Oi,"Theme"),Oi),KC=p(e=>{const t=new ZC;return t.calculate(e),t},"getThemeVariables"),$i,QC=($i=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=G("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.primaryColor),this.lineColor=W(this.background),this.textColor=W(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,d,f,g,y,x,C,b,k,_,B,A,M,L,q,D,R,K,O,F,$,v,N,P,E,Y,ot,tt,et,ct,ut,wt,Bt,vt,Ct,st,gt,Lt,zt,jt;this.actorBorder=X(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScale"+U]=X(this["cScale"+U],10),this["cScalePeer"+U]=this["cScalePeer"+U]||X(this["cScale"+U],25);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleInv"+U]=this["cScaleInv"+U]||w(this["cScale"+U],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleLabel"+U]=this["cScaleLabel"+U]||this.scaleLabelColor;for(let U=0;U<5;U++)this["surface"+U]=this["surface"+U]||w(this.mainBkg,{h:30,s:-30,l:-(5+U*5)}),this["surfacePeer"+U]=this["surfacePeer"+U]||w(this.mainBkg,{h:30,s:-30,l:-(8+U*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||G(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF9C4",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#D7CCC8",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((M=this.radar)==null?void 0:M.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((D=this.wardley)==null?void 0:D.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((K=this.wardley)==null?void 0:K.axisTextColor)||this.primaryTextColor,gridColor:((O=this.wardley)==null?void 0:O.gridColor)||this.gridColor,componentFill:((F=this.wardley)==null?void 0:F.componentFill)||this.background,componentStroke:(($=this.wardley)==null?void 0:$.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((N=this.wardley)==null?void 0:N.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((E=this.wardley)==null?void 0:E.annotationStroke)||this.lineColor,annotationTextColor:((Y=this.wardley)==null?void 0:Y.annotationTextColor)||this.primaryTextColor,annotationFill:((ot=this.wardley)==null?void 0:ot.annotationFill)||this.background},this.xyChart={backgroundColor:((tt=this.xyChart)==null?void 0:tt.backgroundColor)||this.background,titleColor:((et=this.xyChart)==null?void 0:et.titleColor)||this.primaryTextColor,dataLabelColor:((ct=this.xyChart)==null?void 0:ct.dataLabelColor)||this.primaryTextColor,legendTextColor:((ut=this.xyChart)==null?void 0:ut.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((vt=this.xyChart)==null?void 0:vt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((st=this.xyChart)==null?void 0:st.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((zt=this.xyChart)==null?void 0:zt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((jt=this.xyChart)==null?void 0:jt.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||W(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p($i,"Theme"),$i),JC=p(e=>{const t=new QC;return t.calculate(e),t},"getThemeVariables"),Di,tx=(Di=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=G(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.lineColor=W(this.background),this.textColor=W(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||G(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,n,o,l,h,c,u,d,f,g,y,x,C,b,k,_,B,A,M,L,q,D,R,K,O,F,$,v,N,P,E,Y,ot,tt,et,ct,ut,wt,Bt,vt,Ct,st,gt,Lt,zt,jt;this.secondBkg=G(this.contrast,55),this.border2=this.contrast,this.actorBorder=G(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleInv"+U]=this["cScaleInv"+U]||W(this["cScale"+U]);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this.darkMode?this["cScalePeer"+U]=this["cScalePeer"+U]||G(this["cScale"+U],10):this["cScalePeer"+U]=this["cScalePeer"+U]||X(this["cScale"+U],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleLabel"+U]=this["cScaleLabel"+U]||this.scaleLabelColor;for(let U=0;U<5;U++)this["surface"+U]=this["surface"+U]||w(this.mainBkg,{l:-(5+U*5)}),this["surfacePeer"+U]=this["surfacePeer"+U]||w(this.mainBkg,{l:-(8+U*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=G(this.contrast,30),this.sectionBkgColor2=G(this.contrast,30),this.taskBorderColor=X(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=G(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=X(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["pie"+U]=this["cScale"+U];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 U=0;U<8;U++)this["venn"+(U+1)]=this["venn"+(U+1)]??this["cScale"+U];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_=this.xyChart)==null?void 0:_.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((A=this.xyChart)==null?void 0:A.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((M=this.xyChart)==null?void 0:M.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((q=this.xyChart)==null?void 0:q.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((D=this.xyChart)==null?void 0:D.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((K=this.xyChart)==null?void 0:K.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((O=this.radar)==null?void 0:O.axisColor)||this.lineColor,axisStrokeWidth:((F=this.radar)==null?void 0:F.axisStrokeWidth)||2,axisLabelFontSize:(($=this.radar)==null?void 0:$.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((N=this.radar)==null?void 0:N.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((Y=this.radar)==null?void 0:Y.graticuleOpacity)||.3,legendBoxSize:((ot=this.radar)==null?void 0:ot.legendBoxSize)||12,legendFontSize:((tt=this.radar)==null?void 0:tt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((et=this.wardley)==null?void 0:et.backgroundColor)||this.background,axisColor:((ct=this.wardley)==null?void 0:ct.axisColor)||this.lineColor,axisTextColor:((ut=this.wardley)==null?void 0:ut.axisTextColor)||this.primaryTextColor,gridColor:((wt=this.wardley)==null?void 0:wt.gridColor)||this.gridColor,componentFill:((Bt=this.wardley)==null?void 0:Bt.componentFill)||this.background,componentStroke:((vt=this.wardley)==null?void 0:vt.componentStroke)||this.lineColor,componentLabelColor:((Ct=this.wardley)==null?void 0:Ct.componentLabelColor)||this.primaryTextColor,linkStroke:((st=this.wardley)==null?void 0:st.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Lt=this.wardley)==null?void 0:Lt.annotationStroke)||this.lineColor,annotationTextColor:((zt=this.wardley)==null?void 0:zt.annotationTextColor)||this.primaryTextColor,annotationFill:((jt=this.wardley)==null?void 0:jt.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=X(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Di,"Theme"),Di),ex=p(e=>{const t=new tx;return t.calculate(e),t},"getThemeVariables"),Ii,rx=(Ii=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=It(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,n,o,l,h,c,u,d,f,g,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||($e(this.background)?G(this.background,4):X(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||G(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||w(t,{h:30}),this.cScale4=this.cScale4||w(t,{h:60}),this.cScale5=this.cScale5||w(t,{h:90}),this.cScale6=this.cScale6||w(t,{h:120}),this.cScale7=this.cScale7||w(t,{h:150}),this.cScale8=this.cScale8||w(t,{h:210,l:150}),this.cScale9=this.cScale9||w(t,{h:270}),this.cScale10=this.cScale10||w(t,{h:300}),this.cScale11=this.cScale11||w(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||W(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||G(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?X(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Ii,"Theme"),Ii),ix=p(e=>{const t=new rx;return t.calculate(e),t},"getThemeVariables"),Pi,sx=(Pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=W(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(W("#323D47"),10),this.border1="#ccc",this.border2=Wr(255,255,255,.25),this.arrowheadColor=W(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,n,o,l,h,c,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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.secondBkg=this.secondBkg==="calculated"?G(this.mainBkg,16):this.secondBkg,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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=X(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=X(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||W(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||G(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||X(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||w(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||w(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(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=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Pi,"Theme"),Pi),ax=p(e=>{const t=new sx;return t.calculate(e),t},"getThemeVariables"),Ri,ox=(Ri=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=It("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,u,d,f,g,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||($e(this.background)?G(this.background,4):X(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||G(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||W(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||G(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?X(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Ri,"Theme"),Ri),nx=p(e=>{const t=new ox;return t.calculate(e),t},"getThemeVariables"),qi,lx=(qi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=W(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(W("#323D47"),10),this.border1="#ccc",this.border2=Wr(255,255,255,.25),this.arrowheadColor=W(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,l,h,c,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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.secondBkg=this.secondBkg==="calculated"?G(this.mainBkg,16):this.secondBkg,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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=X(this["cScale"+g],75);else for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScale"+g]=X(this["cScale"+g],25);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleInv"+g]=this["cScaleInv"+g]||W(this["cScale"+g]);for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this.darkMode?this["cScalePeer"+g]=this["cScalePeer"+g]||G(this["cScale"+g],10):this["cScalePeer"+g]=this["cScalePeer"+g]||X(this["cScale"+g],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let g=0;g<this.THEME_COLOR_LIMIT;g++)this["cScaleLabel"+g]=this["cScaleLabel"+g]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let g=0;g<5;g++)this["surface"+g]=this["surface"+g]||w(this.mainBkg,{h:180,s:-15,l:t*(5+g*3)}),this["surfacePeer"+g]=this["surfacePeer"+g]||w(this.mainBkg,{h:180,s:-15,l:t*(8+g*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(qi,"Theme"),qi),hx=p(e=>{const t=new lx;return t.calculate(e),t},"getThemeVariables"),Ni,cx=(Ni=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=It("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){var a,n,o,l,h,c,u,d,f,g,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||($e(this.background)?G(this.background,4):X(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});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||G(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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||W(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||G(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor;for(let C=0;C<8;C++)this["fillType"+C]=this["fillType"+C]||this.bkgColorArray[C];for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+(C+1)]=this["pie"+(C+1)]||this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let C=0;C<8;C++)this["venn"+(C+1)]=this["venn"+(C+1)]??this.borderColorArray[C%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((g=this.xyChart)==null?void 0:g.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?X(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Ni,"Theme"),Ni),ux=p(e=>{const t=new cx;return t.calculate(e),t},"getThemeVariables"),Wi,dx=(Wi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=G(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=W(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=W(this.primaryColor),this.secondaryTextColor=W(this.secondaryColor),this.tertiaryTextColor=W(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=G(W("#323D47"),10),this.border1="#ccc",this.border2=Wr(255,255,255,.25),this.arrowheadColor=W(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){var i,s,a,n,o,l,h,c,u,d,f,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||W(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||W(this.tertiaryColor),this.lineColor=this.lineColor||W(this.background),this.arrowheadColor=this.arrowheadColor||W(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.secondBkg=this.secondBkg==="calculated"?G(this.mainBkg,16):this.secondBkg,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?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||W(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||G(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||W(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||G(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||X(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=X(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((y,x)=>{this["fillType"+x]=this["fillType"+x]||y});for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["pie"+(y+1)]=this["pie"+(y+1)]||this["cScale"+y];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 y=0;y<8;y++)this["venn"+(y+1)]=this["venn"+(y+1)]??this.borderColorArray[y%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$e(this.quadrant1Fill)?G(this.quadrant1Fill):X(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,legendTextColor:((a=this.xyChart)==null?void 0:a.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=G(this.git0,25),this.git1=G(this.git1,25),this.git2=G(this.git2,25),this.git3=G(this.git3,25),this.git4=G(this.git4,25),this.git5=G(this.git5,25),this.git6=G(this.git6,25),this.git7=G(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||W(this.git0),this.gitInv1=this.gitInv1||W(this.git1),this.gitInv2=this.gitInv2||W(this.git2),this.gitInv3=this.gitInv3||W(this.git3),this.gitInv4=this.gitInv4||W(this.git4),this.gitInv5=this.gitInv5||W(this.git5),this.gitInv6=this.gitInv6||W(this.git6),this.gitInv7=this.gitInv7||W(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||pr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||gr}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]=rr(this[i],t[i])})}},p(Wi,"Theme"),Wi),fx=p(e=>{const t=new dx;return t.calculate(e),t},"getThemeVariables"),Ar={base:{getThemeVariables:GC},dark:{getThemeVariables:VC},default:{getThemeVariables:KC},forest:{getThemeVariables:JC},neutral:{getThemeVariables:ex},neo:{getThemeVariables:ix},"neo-dark":{getThemeVariables:ax},redux:{getThemeVariables:nx},"redux-dark":{getThemeVariables:hx},"redux-color":{getThemeVariables:ux},"redux-dark-color":{getThemeVariables:fx}},ae={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,stepDuration:1,stepNumbers:!1,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,colorBy:"branch",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,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:5e4,maxEdges:500,grid:{lineHops:"arc",placements:{},columns:0,rowGap:50,columnGap:50,cellGap:20,containerPadding:20,titleGap:8,horizontalAlign:"center",verticalAlign:"center",curve:"rounded",edgeCornerRadius:5},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},ud,dd,fd,_d={...ae,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},layered:{edgeRouting:"rounded",lineHops:!0},themeCSS:void 0,themeVariables:Ar.default.getThemeVariables(),sequence:{...ae.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:(ud=ae.class)==null?void 0:ud.theme,look:(dd=ae.class)==null?void 0:dd.look,layout:(fd=ae.class)==null?void 0:fd.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ae.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ae.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ae.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ae.pie,useWidth:984},xyChart:{...ae.xyChart,useWidth:void 0},requirement:{...ae.requirement,useWidth:void 0},packet:{...ae.packet},eventmodeling:{...ae.eventmodeling},treeView:{...ae.treeView,useWidth:void 0},radar:{...ae.radar},usecase:{...ae.usecase},railroad:{...ae.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ae.ishikawa},sankey:{...ae.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:{...ae.venn},cynefin:{...ae.cynefin}},Bd=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bd(e[i],"")]:[...r,t+i],[]),"keyify"),px=new Set(Bd(_d,"")),fl=_d,gx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},mx=p(e=>gx[e]??e,"getDiagramConfigKey"),yx=new Set(["__proto__","constructor","prototype"]),Cx=["left","center","right"],xx=["top","center","bottom"];function vd(e){return typeof e=="number"&&Number.isSafeInteger(e)}p(vd,"isValidGridCoordinate");function Ld(e){return typeof e=="string"&&Cx.includes(e)}p(Ld,"isGridHorizontalAlign");function Ad(e){return typeof e=="string"&&xx.includes(e)}p(Ad,"isGridVerticalAlign");function wi(e,t,r,i=e){if(r!==void 0&&!vd(r)){const s=i===e?"":` (node "${i}")`,a=r===null?"null":typeof r;let n;switch(typeof r){case"string":n=JSON.stringify(r);break;case"number":case"bigint":case"boolean":case"symbol":n=String(r);break;default:n=r===null?"null":Array.isArray(r)?"[array]":`[${typeof r}]`}const o=new Error(`GRID_INVALID_COORDINATE: Invalid ${t} for placement "${e}"${s}: expected a safe integer; received ${n} (${a}).`);throw o.code="GRID_INVALID_COORDINATE",o.details={nodeId:i,placementId:e,field:t,value:r},o}}p(wi,"validateGridCoordinate");function Fd(e,t){if(typeof e=="object"&&e!==null&&!Array.isArray(e))for(const[r,i]of Object.entries(e)){const s=Array.isArray(i)?i:[i];for(const[a,n]of s.entries()){if(typeof n!="object"||n===null||Array.isArray(n))continue;const o=n,l=Array.isArray(i)?`${r}[${a}]`:r;Object.hasOwn(o,"row")&&wi(l,"row",o.row),Object.hasOwn(o,"column")&&wi(l,"column",o.column)}}for(const r of t){if(typeof r.metadata!="object"||r.metadata===null||Array.isArray(r.metadata))continue;const i=r.metadata;Object.hasOwn(i,"row")&&wi(r.id,"row",i.row),Object.hasOwn(i,"column")&&wi(r.id,"column",i.column)}}p(Fd,"validateGridPlacementCoordinates");function Ed(e){if(Array.isArray(e)){at.debug("sanitize emptying grid placements array"),e.length=0;return}for(const t of Object.keys(e)){const r=e[t];if(yx.has(t)||typeof r!="object"||r===null){at.debug("sanitize deleting object dictionary entry:",t,r),delete e[t];continue}const i=Array.isArray(r)?r:[r];if(i.length===0||Object.keys(i).length!==i.length||i.some(s=>typeof s!="object"||s===null||Array.isArray(s))){at.debug("sanitize deleting invalid grid placement sequence:",t,r),delete e[t];continue}for(const[s,a]of i.entries()){const n=a,o=Array.isArray(r)?`${t}[${s}]`:t;for(const l of Object.keys(n)){if(l==="row"||l==="column"){wi(o,l,n[l]);continue}Md(l,n[l])||(at.debug("sanitize deleting grid placement property:",l),delete n[l])}}}}p(Ed,"sanitizeGridPlacements");function Md(e,t){switch(e){case"horizontalAlign":return Ld(t);case"verticalAlign":return Ad(t);default:return!1}}p(Md,"isValidGridPlacementProperty");var bx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},kx=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(at.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Mn=p((e,t)=>{if(at.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(r=>Mn(r,t));return}for(const r of Object.keys(e)){if(at.debug("Checking key",r),r.startsWith("__")||r.includes("proto")||r.includes("constr")||!px.has(r)||e[r]==null){at.debug("sanitize deleting key: ",r),delete e[r];continue}if(typeof e[r]=="object"){const s=bx[r];s?kx(e[r],s):t==="grid"&&r==="placements"?Ed(e[r]):(at.debug("sanitizing object",r),Mn(e[r],r));continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const s of i)r.includes(s)&&(at.debug("sanitizing css option",r),e[r]=$d(e[r]))}if(e.themeVariables)for(const r of Object.keys(e.themeVariables)){const i=e.themeVariables[r];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[r]="")}at.debug("After sanitization",e)}},"sanitizeDirectiveValue"),Od=p(e=>{Mn(e)},"sanitizeDirective"),$d=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),zr=Object.freeze(fl),Sx=["theme","look","layout"],wx=new Set(["classic","handDrawn","neo"]),Tx=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(Ar,t):e!=="look"||wx.has(t),"isUsableAppearance"),_x=p((e,t,r)=>{if(!e)return;const i=e[t];return[i==null?void 0:i[r],e[r]].find(s=>s!==void 0&&Tx(r,s))},"readAppearance"),mr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ee=ce({},zr),Ea,Ma={},Fr=[],Ls=ce({},zr),As,Bx=p((e,t)=>{if(!As)return;const r=[t,...[...Fr].reverse(),Ma,zr],i=e[As];for(const s of Sx)for(const a of r){const n=_x(a,As,s);if(n!==void 0){e[s]=n,(i==null?void 0:i[s])!==void 0&&(i[s]=n);break}}},"resolveAppearance"),Zi=p((e,t)=>{let r=ce({},e),i={};for(const a of t)Pd(a),i=ce(i,a);if(r=ce(r,i),Bx(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(Ar,r.theme)){const a=ce({},Ea),n=ce(a.themeVariables||{},i.themeVariables);r.themeVariables=Ar[r.theme].getThemeVariables(n)}return Ls=r,Mx(Ls),Ls},"updateCurrentConfig"),pl=p(e=>{As=e===void 0?void 0:mx(e),Zi(Ee,Fr)},"setDiagramConfigScope"),vx=p(e=>(Ee=ce({},zr),Ee=ce(Ee,e),Ma=ce({},e),e.theme&&Object.hasOwn(Ar,e.theme)&&(Ee.themeVariables=Ar[e.theme].getThemeVariables(e.themeVariables)),Zi(Ee,Fr),Ee),"setSiteConfig"),Lx=p(e=>{Ea=ce({},e)},"saveConfigFromInitialize"),Ax=p(e=>(Ee=ce(Ee,e),Ma=ce(Ma,e),Zi(Ee,Fr),Ee),"updateSiteConfig"),Dd=p(()=>ce({},Ee),"getSiteConfig"),Id=p(e=>(Zi(Ls,[e]),ee()),"setConfig"),ee=p(()=>ce({},Ls),"getConfig"),Pd=p(e=>{e&&(["secure",...Ee.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(at.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"&&Pd(e[t])}))},"sanitize"),Fx=p(e=>{var t;Od(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Fr.push(e),Zi(Ee,Fr)},"addDirective"),$s=p((e=Ee)=>{Fr=[],As=void 0,Zi(e,Fr)},"reset"),Ex={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."},lc={},Rd=p(e=>{lc[e]||(at.warn(Ex[e]),lc[e]=!0)},"issueWarning"),Mx=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Rd("LAZY_LOAD_DEPRECATED")},"checkConfig"),EA=p(()=>{let e={};Ea&&(e=ce(e,Ea));for(const t of Fr)e=ce(e,t);return e},"getUserDefinedConfig"),me=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Rd("FLOWCHART_HTML_LABELS_DEPRECATED"),mr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),qs=/<\/?br\s*\/?>/gi,Ox=new RegExp(qs.source,"i"),$x=p(e=>e?Wd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Dx=(()=>{let e=!1;return()=>{e||(qd(),e=!0)}})();function qd(){const e="data-temp-href-target";ji.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ji.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(qd,"setupDompurifyHooks");var Nd=p(e=>(Dx(),ji.sanitize(e)),"removeScript"),hc=p((e,t)=>{if(me(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Nd(e):r!=="loose"&&(e=Wd(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=qx(e))}return e},"sanitizeMore"),Ge=p((e,t)=>e&&(t.dompurifyConfig?e=ji.sanitize(hc(e,t),t.dompurifyConfig).toString():e=ji.sanitize(hc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Ix=p((e,t)=>typeof e=="string"?Ge(e,t):e.flat().map(r=>Ge(r,t)),"sanitizeTextOrArray"),Px=p(e=>Ox.test(e),"hasBreaks"),Rx=p(e=>e.split(qs),"splitBreaks"),qx=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Wd=p(e=>e.replace(qs,"#br#"),"breakToPlaceholder"),Nx=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Wx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),zx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),cc=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];Hx(a,n)&&(s=a+","+n,i++,r.pop())}r.push(Yx(s))}return r.join("")},"parseGenericTypes"),On=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hx=p((e,t)=>{const r=On(e,"~"),i=On(t,"~");return r===1&&i===1},"shouldCombineSets"),Yx=p(e=>{const t=On(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),uc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$n=/\$\$(.*?)\$\$/g,Ds=p(e=>{var t;return(((t=e.match($n))==null?void 0:t.length)??0)>0},"hasKatex"),MA=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await zd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Ux=p(async(e,t)=>{if(!Ds(e))return e;if(!(uc()||t.legacyMathML||t.forceLegacyMathML))return e.replace($n,"MathML is unsupported in this environment.");{const{default:r}=await Wt(async()=>{const{default:s}=await import("./katex-Be3d8Y4U.js");return{default:s}},[]),i=t.forceLegacyMathML||!uc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(qs).map(s=>Ds(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace($n,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),zd=p(async(e,t)=>Ge(await Ux(e,t),t),"renderKatexSanitized"),Ns={getRows:$x,sanitizeText:Ge,sanitizeTextOrArray:Ix,hasBreaks:Px,splitBreaks:Rx,lineBreakRegex:qs,removeScript:Nd,getUrl:Nx,evaluate:mr,getMax:Wx,getMin:zx},jx=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Gx=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Hd=p(function(e,t,r,i){const s=Gx(t,r,i);jx(e,s)},"configureSvgSize"),Xx=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;at.info(`SVG bounds: ${a}x${n}`,s);let o=0,l=0;at.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=n+r*2,at.info(`Calculated bounds: ${o}x${l}`),Hd(t,l,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ka={};function Dn(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
8
|
+
`)}p(Dn,"cssStyleSheetToString");var Vx=p((e,t,r,i)=>{let s="";return e in ka&&ka[e]?s=ka[e]({...r,svgId:i}):at.warn(`No theme found for ${e}`),`& {
|
|
9
|
+
font-family: ${r.fontFamily};
|
|
10
|
+
font-size: ${r.fontSize};
|
|
11
|
+
fill: ${r.textColor}
|
|
12
|
+
}
|
|
13
|
+
@keyframes edge-animation-frame {
|
|
14
|
+
from {
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@keyframes dash {
|
|
19
|
+
to {
|
|
20
|
+
stroke-dashoffset: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
& .edge-animation-slow {
|
|
24
|
+
stroke-dasharray: 9,5 !important;
|
|
25
|
+
stroke-dashoffset: 900;
|
|
26
|
+
animation: dash 50s linear infinite;
|
|
27
|
+
stroke-linecap: round;
|
|
28
|
+
}
|
|
29
|
+
& .edge-animation-fast {
|
|
30
|
+
stroke-dasharray: 9,5 !important;
|
|
31
|
+
stroke-dashoffset: 900;
|
|
32
|
+
animation: dash 20s linear infinite;
|
|
33
|
+
stroke-linecap: round;
|
|
34
|
+
}
|
|
35
|
+
/* Classes common for multiple diagrams */
|
|
36
|
+
|
|
37
|
+
& .error-icon {
|
|
38
|
+
fill: ${r.errorBkgColor};
|
|
39
|
+
}
|
|
40
|
+
& .error-text {
|
|
41
|
+
fill: ${r.errorTextColor};
|
|
42
|
+
stroke: ${r.errorTextColor};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .edge-thickness-normal {
|
|
46
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
47
|
+
}
|
|
48
|
+
& .edge-thickness-thick {
|
|
49
|
+
stroke-width: 3.5px
|
|
50
|
+
}
|
|
51
|
+
& .edge-pattern-solid {
|
|
52
|
+
stroke-dasharray: 0;
|
|
53
|
+
}
|
|
54
|
+
& .edge-thickness-invisible {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
& .edge-pattern-dashed{
|
|
59
|
+
stroke-dasharray: 3;
|
|
60
|
+
}
|
|
61
|
+
.edge-pattern-dotted {
|
|
62
|
+
stroke-dasharray: 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .marker {
|
|
66
|
+
fill: ${r.lineColor};
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
& .marker.cross {
|
|
70
|
+
stroke: ${r.lineColor};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& svg {
|
|
74
|
+
font-family: ${r.fontFamily};
|
|
75
|
+
font-size: ${r.fontSize};
|
|
76
|
+
}
|
|
77
|
+
& p {
|
|
78
|
+
margin: 0
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${s}
|
|
82
|
+
.node .neo-node {
|
|
83
|
+
stroke: ${r.nodeBorder};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
87
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
88
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
89
|
+
}
|
|
90
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
91
|
+
filter: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
[data-look="neo"].node path {
|
|
96
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
97
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-look="neo"].node .outer-path {
|
|
101
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-look="neo"].node .neo-line path {
|
|
105
|
+
stroke: ${r.nodeBorder};
|
|
106
|
+
filter: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-look="neo"].node circle{
|
|
110
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
111
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-look="neo"].node circle .state-start{
|
|
115
|
+
fill: #000000;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-look="neo"].icon-shape .icon {
|
|
119
|
+
fill: ${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
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
124
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
125
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
${t}
|
|
129
|
+
`},"getStyles"),Zx=p((e,t)=>{t!==void 0&&(ka[e]=t)},"addStylesForDiagram"),Kx=Vx,Yd={};H0(Yd,{clear:()=>Qx,getAccDescription:()=>rb,getAccTitle:()=>tb,getDiagramTitle:()=>sb,setAccDescription:()=>eb,setAccTitle:()=>Jx,setDiagramTitle:()=>ib});var gl="",ml="",yl="",Cl=p(e=>Ge(e,ee()),"sanitizeText"),Qx=p(()=>{gl="",yl="",ml=""},"clear"),Jx=p(e=>{gl=Cl(e).replace(/^\s+/g,"")},"setAccTitle"),tb=p(()=>gl,"getAccTitle"),eb=p(e=>{yl=Cl(e).replace(/\n\s+/g,`
|
|
130
|
+
`)},"setAccDescription"),rb=p(()=>yl,"getAccDescription"),ib=p(e=>{ml=Cl(e)},"setDiagramTitle"),sb=p(()=>ml,"getDiagramTitle"),dc=at,ab=ul,Nt=ee,OA=Id,$A=zr,xl=p(e=>Ge(e,Nt()),"sanitizeText"),ob=Xx,nb=p(()=>Yd,"getCommonDb"),Oa={},$a=p((e,t,r)=>{var i;Oa[e]&&dc.warn(`Diagram with id ${e} already registered. Overwriting.`),Oa[e]=t,r&&Td(e,r),Zx(e,t.styles),(i=t.injectUtils)==null||i.call(t,dc,ab,Nt,xl,ob,nb(),()=>{})},"registerDiagram"),In=p(e=>{if(e in Oa)return Oa[e];throw new lb(e)},"getDiagram"),zi,lb=(zi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(zi,"DiagramNotFoundError"),zi),Pn="http://www.w3.org/1999/xhtml",fc={svg:"http://www.w3.org/2000/svg",xhtml:Pn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ud(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),fc.hasOwnProperty(t)?{space:fc[t],local:e}:e}function hb(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Pn&&t.documentElement.namespaceURI===Pn?t.createElement(e):t.createElementNS(r,e)}}function cb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function jd(e){var t=Ud(e);return(t.local?cb:hb)(t)}function ub(){}function Gd(e){return e==null?ub:function(){return this.querySelector(e)}}function db(e){typeof e!="function"&&(e=Gd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),l,h,c=0;c<n;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),o[c]=h);return new Xe(i,this._parents)}function fb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pb(){return[]}function gb(e){return e==null?pb:function(){return this.querySelectorAll(e)}}function mb(e){return function(){return fb(e.apply(this,arguments))}}function yb(e){typeof e=="function"?e=mb(e):e=gb(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,l,h=0;h<o;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),s.push(l));return new Xe(i,s)}function Cb(e){return function(){return this.matches(e)}}function Xd(e){return function(t){return t.matches(e)}}var xb=Array.prototype.find;function bb(e){return function(){return xb.call(this.children,e)}}function kb(){return this.firstElementChild}function Sb(e){return this.select(e==null?kb:bb(typeof e=="function"?e:Xd(e)))}var wb=Array.prototype.filter;function Tb(){return Array.from(this.children)}function _b(e){return function(){return wb.call(this.children,e)}}function Bb(e){return this.selectAll(e==null?Tb:_b(typeof e=="function"?e:Xd(e)))}function vb(e){typeof e!="function"&&(e=Cb(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,h=0;h<n;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&o.push(l);return new Xe(i,this._parents)}function Vd(e){return new Array(e.length)}function Lb(){return new Xe(this._enter||this._groups.map(Vd),this._parents)}function Da(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Da.prototype={constructor:Da,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ab(e){return function(){return e}}function Fb(e,t,r,i,s,a){for(var n=0,o,l=t.length,h=a.length;n<h;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new Da(e,a[n]);for(;n<l;++n)(o=t[n])&&(s[n]=o)}function Eb(e,t,r,i,s,a,n){var o,l,h=new Map,c=t.length,u=a.length,d=new Array(c),f;for(o=0;o<c;++o)(l=t[o])&&(d[o]=f=n.call(l,l.__data__,o,t)+"",h.has(f)?s[o]=l:h.set(f,l));for(o=0;o<u;++o)f=n.call(e,a[o],o,a)+"",(l=h.get(f))?(i[o]=l,l.__data__=a[o],h.delete(f)):r[o]=new Da(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(d[o])===l&&(s[o]=l)}function Mb(e){return e.__data__}function Ob(e,t){if(!arguments.length)return Array.from(this,Mb);var r=t?Eb:Fb,i=this._parents,s=this._groups;typeof e!="function"&&(e=Ab(e));for(var a=s.length,n=new Array(a),o=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],u=s[h],d=u.length,f=$b(e.call(c,c&&c.__data__,h,i)),g=f.length,y=o[h]=new Array(g),x=n[h]=new Array(g),C=l[h]=new Array(d);r(c,u,y,x,C,f,t);for(var b=0,k=0,_,B;b<g;++b)if(_=y[b]){for(b>=k&&(k=b+1);!(B=x[k])&&++k<g;);_._next=B||null}}return n=new Xe(n,i),n._enter=o,n._exit=l,n}function $b(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Db(){return new Xe(this._exit||this._groups.map(Vd),this._parents)}function Ib(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function Pb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),l=0;l<n;++l)for(var h=r[l],c=i[l],u=h.length,d=o[l]=new Array(u),f,g=0;g<u;++g)(f=h[g]||c[g])&&(d[g]=f);for(;l<s;++l)o[l]=r[l];return new Xe(o,this._parents)}function Rb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function qb(e){e||(e=Nb);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var n=r[a],o=n.length,l=s[a]=new Array(o),h,c=0;c<o;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new Xe(s,this._parents).order()}function Nb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Wb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zb(){return Array.from(this)}function Hb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function Yb(){let e=0;for(const t of this)++e;return e}function Ub(){return!this.node()}function jb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function Gb(e){return function(){this.removeAttribute(e)}}function Xb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vb(e,t){return function(){this.setAttribute(e,t)}}function Zb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Qb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Jb(e,t){var r=Ud(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Xb:Gb:typeof t=="function"?r.local?Qb:Kb:r.local?Zb:Vb)(r,t))}function Zd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tk(e){return function(){this.style.removeProperty(e)}}function ek(e,t,r){return function(){this.style.setProperty(e,t,r)}}function rk(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function ik(e,t,r){return arguments.length>1?this.each((t==null?tk:typeof t=="function"?rk:ek)(e,t,r??"")):sk(this.node(),e)}function sk(e,t){return e.style.getPropertyValue(t)||Zd(e).getComputedStyle(e,null).getPropertyValue(t)}function ak(e){return function(){delete this[e]}}function ok(e,t){return function(){this[e]=t}}function nk(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function lk(e,t){return arguments.length>1?this.each((t==null?ak:typeof t=="function"?nk:ok)(e,t)):this.node()[e]}function Kd(e){return e.trim().split(/^|\s+/)}function bl(e){return e.classList||new Qd(e)}function Qd(e){this._node=e,this._names=Kd(e.getAttribute("class")||"")}Qd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Jd(e,t){for(var r=bl(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function tf(e,t){for(var r=bl(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function hk(e){return function(){Jd(this,e)}}function ck(e){return function(){tf(this,e)}}function uk(e,t){return function(){(t.apply(this,arguments)?Jd:tf)(this,e)}}function dk(e,t){var r=Kd(e+"");if(arguments.length<2){for(var i=bl(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?uk:t?hk:ck)(r,t))}function fk(){this.textContent=""}function pk(e){return function(){this.textContent=e}}function gk(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function mk(e){return arguments.length?this.each(e==null?fk:(typeof e=="function"?gk:pk)(e)):this.node().textContent}function yk(){this.innerHTML=""}function Ck(e){return function(){this.innerHTML=e}}function xk(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function bk(e){return arguments.length?this.each(e==null?yk:(typeof e=="function"?xk:Ck)(e)):this.node().innerHTML}function kk(){this.nextSibling&&this.parentNode.appendChild(this)}function Sk(){return this.each(kk)}function wk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tk(){return this.each(wk)}function _k(e){var t=typeof e=="function"?e:jd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bk(){return null}function vk(e,t){var r=typeof e=="function"?e:jd(e),i=t==null?Bk:typeof t=="function"?t:Gd(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Lk(){var e=this.parentNode;e&&e.removeChild(this)}function Ak(){return this.each(Lk)}function Fk(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ek(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mk(e){return this.select(e?Ek:Fk)}function Ok(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $k(e){return function(t){e.call(this,t,this.__data__)}}function Dk(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Ik(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function Pk(e,t,r){return function(){var i=this.__on,s,a=$k(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Rk(e,t,r){var i=Dk(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,c;l<h;++l)for(s=0,c=o[l];s<a;++s)if((n=i[s]).type===c.type&&n.name===c.name)return c.value}return}for(o=t?Pk:Ik,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function ef(e,t,r){var i=Zd(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function qk(e,t){return function(){return ef(this,e,t)}}function Nk(e,t){return function(){return ef(this,e,t.apply(this,arguments))}}function Wk(e,t){return this.each((typeof t=="function"?Nk:qk)(e,t))}function*zk(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var Hk=[null];function Xe(e,t){this._groups=e,this._parents=t}function Yk(){return this}Xe.prototype={constructor:Xe,select:db,selectAll:yb,selectChild:Sb,selectChildren:Bb,filter:vb,data:Ob,enter:Lb,exit:Db,join:Ib,merge:Pb,selection:Yk,order:Rb,sort:qb,call:Wb,nodes:zb,node:Hb,size:Yb,empty:Ub,each:jb,attr:Jb,style:ik,property:lk,classed:dk,text:mk,html:bk,raise:Sk,lower:Tk,append:_k,insert:vk,remove:Ak,clone:Mk,datum:Ok,on:Rk,dispatch:Wk,[Symbol.iterator]:zk};function qt(e){return typeof e=="string"?new Xe([[document.querySelector(e)]],[document.documentElement]):new Xe([[e]],Hk)}var Uk=0;function pc(){this._="@"+(++Uk).toString(36)}pc.prototype={constructor:pc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const bs=Math.PI,Rn=2*bs,Jr=1e-6,jk=Rn-Jr;function rf(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return rf;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}function sf(e,t,r,i){return e===r&&t===i}function Xk(e){const t=Math.floor(e);if(!(t<=15))return sf;const r=10**t,i=function(s){return Math.round(s*r)};return function(s,a,n,o){return i(s)===i(n)&&i(a)===i(o)}}class Vk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?rf:Gk(t),this._equal=t==null?sf:Xk(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,n){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+n}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let n=this._x1,o=this._y1,l=i-t,h=s-r,c=n-t,u=o-r,d=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Jr)if(!(Math.abs(u*l-h*c)>Jr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-n,g=s-o,y=l*l+h*h,x=f*f+g*g,C=Math.sqrt(y),b=Math.sqrt(d),k=a*Math.tan((bs-Math.acos((y+d-x)/(2*C*b)))/2),_=k/b,B=k/C;Math.abs(_-1)>Jr&&this._append`L${t+_*c},${r+_*u}`,this._append`A${a},${a},0,0,${+(u*f>c*g)},${this._x1=t+B*l},${this._y1=r+B*h}`}}arc(t,r,i,s,a,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(s),l=i*Math.sin(s),h=t+o,c=r+l,u=1^n,d=n?s-a:a-s;if(this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>Jr||Math.abs(this._y1-c)>Jr)&&this._append`L${h},${c}`,!!i){if(d<0&&(d=d%Rn+Rn),d>jk)this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`;else if(d>Jr){const f=t+i*Math.cos(a),g=r+i*Math.sin(a);if(d>=bs&&this._equal(h,c,f,g)){d/=2;let y=s+d;this._append`A${i},${i},0,${+(d>=bs)},${u},${t+i*Math.cos(y)},${r+i*Math.sin(y)}`}this._append`A${i},${i},0,${+(d>=bs)},${u},${this._x1=f},${this._y1=g}`}}}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function ne(e){return function(){return e}}const gc=Math.abs,Te=Math.atan2,Zr=Math.cos,Zk=Math.max,Wo=Math.min,lr=Math.sin,Ti=Math.sqrt,ve=1e-12,Is=Math.PI,Ia=Is/2,Sa=2*Is;function Kk(e){return e>1?0:e<-1?Is:Math.acos(e)}function mc(e){return e>=1?Ia:e<=-1?-Ia:Math.asin(e)}function af(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 Vk(t)}function Qk(e){return e.innerRadius}function Jk(e){return e.outerRadius}function t1(e){return e.startAngle}function e1(e){return e.endAngle}function r1(e){return e&&e.padAngle}function i1(e,t,r,i,s,a,n,o){var l=r-e,h=i-t,c=n-s,u=o-a,d=u*l-c*h;if(!(d*d<ve))return d=(c*(t-a)-u*(e-s))/d,[e+d*l,t+d*h]}function sa(e,t,r,i,s,a,n){var o=e-r,l=t-i,h=(n?a:-a)/Ti(o*o+l*l),c=h*l,u=-h*o,d=e+c,f=t+u,g=r+c,y=i+u,x=(d+g)/2,C=(f+y)/2,b=g-d,k=y-f,_=b*b+k*k,B=s-a,A=d*y-g*f,M=(k<0?-1:1)*Ti(Zk(0,B*B*_-A*A)),L=(A*k-b*M)/_,q=(-A*b-k*M)/_,D=(A*k+b*M)/_,R=(-A*b+k*M)/_,K=L-x,O=q-C,F=D-x,$=R-C;return K*K+O*O>F*F+$*$&&(L=D,q=R),{cx:L,cy:q,x01:-c,y01:-u,x11:L*(s/B-1),y11:q*(s/B-1)}}function DA(){var e=Qk,t=Jk,r=ne(0),i=null,s=t1,a=e1,n=r1,o=null,l=af(h);function h(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),g=s.apply(this,arguments)-Ia,y=a.apply(this,arguments)-Ia,x=gc(y-g),C=y>g;if(o||(o=c=l()),f<d&&(u=f,f=d,d=u),!(f>ve))o.moveTo(0,0);else if(x>Sa-ve)o.moveTo(f*Zr(g),f*lr(g)),o.arc(0,0,f,g,y,!C),d>ve&&(o.moveTo(d*Zr(y),d*lr(y)),o.arc(0,0,d,y,g,C));else{var b=g,k=y,_=g,B=y,A=x,M=x,L=n.apply(this,arguments)/2,q=L>ve&&(i?+i.apply(this,arguments):Ti(d*d+f*f)),D=Wo(gc(f-d)/2,+r.apply(this,arguments)),R=D,K=D,O,F;if(q>ve){var $=mc(q/d*lr(L)),v=mc(q/f*lr(L));(A-=$*2)>ve?($*=C?1:-1,_+=$,B-=$):(A=0,_=B=(g+y)/2),(M-=v*2)>ve?(v*=C?1:-1,b+=v,k-=v):(M=0,b=k=(g+y)/2)}var N=f*Zr(b),P=f*lr(b),E=d*Zr(B),Y=d*lr(B);if(D>ve){var ot=f*Zr(k),tt=f*lr(k),et=d*Zr(_),ct=d*lr(_),ut;if(x<Is)if(ut=i1(N,P,et,ct,ot,tt,E,Y)){var wt=N-ut[0],Bt=P-ut[1],vt=ot-ut[0],Ct=tt-ut[1],st=1/lr(Kk((wt*vt+Bt*Ct)/(Ti(wt*wt+Bt*Bt)*Ti(vt*vt+Ct*Ct)))/2),gt=Ti(ut[0]*ut[0]+ut[1]*ut[1]);R=Wo(D,(d-gt)/(st-1)),K=Wo(D,(f-gt)/(st+1))}else R=K=0}M>ve?K>ve?(O=sa(et,ct,N,P,f,K,C),F=sa(ot,tt,E,Y,f,K,C),o.moveTo(O.cx+O.x01,O.cy+O.y01),K<D?o.arc(O.cx,O.cy,K,Te(O.y01,O.x01),Te(F.y01,F.x01),!C):(o.arc(O.cx,O.cy,K,Te(O.y01,O.x01),Te(O.y11,O.x11),!C),o.arc(0,0,f,Te(O.cy+O.y11,O.cx+O.x11),Te(F.cy+F.y11,F.cx+F.x11),!C),o.arc(F.cx,F.cy,K,Te(F.y11,F.x11),Te(F.y01,F.x01),!C))):(o.moveTo(N,P),o.arc(0,0,f,b,k,!C)):o.moveTo(N,P),!(d>ve)||!(A>ve)?o.lineTo(E,Y):R>ve?(O=sa(E,Y,ot,tt,d,-R,C),F=sa(N,P,et,ct,d,-R,C),o.lineTo(O.cx+O.x01,O.cy+O.y01),R<D?o.arc(O.cx,O.cy,R,Te(O.y01,O.x01),Te(F.y01,F.x01),!C):(o.arc(O.cx,O.cy,R,Te(O.y01,O.x01),Te(O.y11,O.x11),!C),o.arc(0,0,d,Te(O.cy+O.y11,O.cx+O.x11),Te(F.cy+F.y11,F.cx+F.x11),C),o.arc(F.cx,F.cy,R,Te(F.y11,F.x11),Te(F.y01,F.x01),!C))):o.arc(0,0,d,B,_,C)}if(o.closePath(),c)return o=null,c+""||null}return h.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+s.apply(this,arguments)+ +a.apply(this,arguments))/2-Is/2;return[Zr(u)*c,lr(u)*c]},h.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ne(+c),h):e},h.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ne(+c),h):t},h.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:ne(+c),h):r},h.padRadius=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:ne(+c),h):i},h.startAngle=function(c){return arguments.length?(s=typeof c=="function"?c:ne(+c),h):s},h.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ne(+c),h):a},h.padAngle=function(c){return arguments.length?(n=typeof c=="function"?c:ne(+c),h):n},h.context=function(c){return arguments.length?(o=c??null,h):o},h}function of(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nf(e){this._context=e}nf.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 Fs(e){return new nf(e)}function s1(e){return e[0]}function a1(e){return e[1]}function o1(e,t){var r=ne(!0),i=null,s=Fs,a=null,n=af(o);e=typeof e=="function"?e:e===void 0?s1:ne(e),t=typeof t=="function"?t:t===void 0?a1:ne(t);function o(l){var h,c=(l=of(l)).length,u,d=!1,f;for(i==null&&(a=s(f=n())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,h,l),+t(u,h,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ne(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ne(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ne(!!l),o):r},o.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),o):s},o.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),o):i},o}function n1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function l1(e){return e}function IA(){var e=l1,t=n1,r=null,i=ne(0),s=ne(Sa),a=ne(0);function n(o){var l,h=(o=of(o)).length,c,u,d=0,f=new Array(h),g=new Array(h),y=+i.apply(this,arguments),x=Math.min(Sa,Math.max(-Sa,s.apply(this,arguments)-y)),C,b=Math.min(Math.abs(x)/h,a.apply(this,arguments)),k=b*(x<0?-1:1),_;for(l=0;l<h;++l)(_=g[f[l]=l]=+e(o[l],l,o))>0&&(d+=_);for(t!=null?f.sort(function(B,A){return t(g[B],g[A])}):r!=null&&f.sort(function(B,A){return r(o[B],o[A])}),l=0,u=d?(x-h*k)/d:0;l<h;++l,y=C)c=f[l],_=g[c],C=y+(_>0?_*u:0)+k,g[c]={data:o[c],index:l,value:_,startAngle:y,endAngle:C,padAngle:b};return g}return n.value=function(o){return arguments.length?(e=typeof o=="function"?o:ne(+o),n):e},n.sortValues=function(o){return arguments.length?(t=o,r=null,n):t},n.sort=function(o){return arguments.length?(r=o,t=null,n):r},n.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:ne(+o),n):i},n.endAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ne(+o),n):s},n.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:ne(+o),n):a},n}class lf{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 hf(e){return new lf(e,!0)}function cf(e){return new lf(e,!1)}function Hr(){}function Pa(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 so(e){this._context=e}so.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:Pa(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:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qn(e){return new so(e)}function uf(e){this._context=e}uf.prototype={areaStart:Hr,areaEnd:Hr,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:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function h1(e){return new uf(e)}function df(e){this._context=e}df.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:Pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function c1(e){return new df(e)}function ff(e,t){this._basis=new so(e),this._beta=t}ff.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(s+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var u1=(function e(t){function r(i){return t===1?new so(i):new ff(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ra(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 kl(e,t){this._context=e,this._k=(1-t)/6}kl.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:Ra(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:Ra(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}};var pf=(function e(t){function r(i){return new kl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Sl(e,t){this._context=e,this._k=(1-t)/6}Sl.prototype={areaStart:Hr,areaEnd:Hr,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:Ra(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}};var d1=(function e(t){function r(i){return new Sl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wl(e,t){this._context=e,this._k=(1-t)/6}wl.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:Ra(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}};var f1=(function e(t){function r(i){return new wl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Tl(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>ve){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ve){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function gf(e,t){this._context=e,this._alpha=t}gf.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:Tl(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}};var mf=(function e(t){function r(i){return t?new gf(i,t):new kl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function yf(e,t){this._context=e,this._alpha=t}yf.prototype={areaStart:Hr,areaEnd:Hr,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:Tl(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}};var p1=(function e(t){function r(i){return t?new yf(i,t):new Sl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cf(e,t){this._context=e,this._alpha=t}Cf.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:Tl(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}};var g1=(function e(t){function r(i){return t?new Cf(i,t):new wl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function xf(e){this._context=e}xf.prototype={areaStart:Hr,areaEnd:Hr,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 m1(e){return new xf(e)}function yc(e){return e<0?-1:1}function Cc(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),o=(a*s+n*i)/(i+s);return(yc(a)+yc(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(o))||0}function xc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,n=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,s+o*t,a-o,n-o*r,a,n)}function qa(e){this._context=e}qa.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:zo(this,this._t0,xc(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,zo(this,xc(this,r=Cc(this,e,t)),r);break;default:zo(this,this._t0,r=Cc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bf(e){this._context=new kf(e)}(bf.prototype=Object.create(qa.prototype)).point=function(e,t){qa.prototype.point.call(this,t,e)};function kf(e){this._context=e}kf.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,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Sf(e){return new qa(e)}function wf(e){return new bf(e)}function Tf(e){this._context=e}Tf.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=bc(e),s=bc(t),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function bc(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),n=new Array(r);for(s[0]=0,a[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function _f(e){return new Tf(e)}function ao(e,t){this._context=e,this._t=t}ao.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 Bf(e){return new ao(e,.5)}function vf(e){return new ao(e,0)}function Lf(e){return new ao(e,1)}var y1=p(e=>{var s;const{securityLevel:t}=Nt();let r=qt("body");if(t==="sandbox"){const n=((s=qt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=qt(n.body)}return r.select(`#${e}`)},"selectSvgElement");function Af(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(Af,"getDefaultExportFromCjs");var _e={},aa={},Pr={},kc;function Ki(){if(kc)return Pr;kc=1;function e(n){return typeof n>"u"||n===null}p(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}p(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}p(r,"toArray");function i(n,o){if(o){const l=Object.keys(o);for(let h=0,c=l.length;h<c;h+=1){const u=l[h];n[u]=o[u]}}return n}p(i,"extend");function s(n,o){let l="";for(let h=0;h<o;h+=1)l+=n;return l}p(s,"repeat");function a(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return p(a,"isNegativeZero"),Pr.isNothing=e,Pr.isObject=t,Pr.toArray=r,Pr.repeat=s,Pr.isNegativeZero=a,Pr.extend=i,Pr}p(Ki,"requireCommon");var Ho,Sc;function Qi(){if(Sc)return Ho;Sc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
131
|
+
|
|
132
|
+
`+r.mark.snippet),a+" "+s):a}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Ho=t,Ho}p(Qi,"requireException");var Yo,wc;function Ff(){if(wc)return Yo;wc=1;const e=Ki();function t(s,a,n,o,l){let h="",c="";const u=Math.floor(l/2)-1;return o-a>u&&(h=" ... ",a=o-u+h.length),n-o>u&&(c=" ...",n=o+u-c.length),{str:h+s.slice(a,n).replace(/\t/g,"→")+c,pos:o-a+h.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const n=/\r?\n|\r|\0/g,o=[0],l=[];let h,c=-1;for(;h=n.exec(s.buffer);)l.push(h.index),o.push(h.index+h[0].length),s.position<=h.index&&c<0&&(c=o.length-2);c<0&&(c=o.length-1);let u="";const d=Math.min(s.line+a.linesAfter,l.length).toString().length,f=a.maxLength-(a.indent+d+3);for(let y=1;y<=a.linesBefore&&!(c-y<0);y++){const x=t(s.buffer,o[c-y],l[c-y],s.position-(o[c]-o[c-y]),f);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),d)+" | "+x.str+`
|
|
133
|
+
`+u}const g=t(s.buffer,o[c],l[c],s.position,f);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),d)+" | "+g.str+`
|
|
134
|
+
`,u+=e.repeat("-",a.indent+d+3+g.pos)+`^
|
|
135
|
+
`;for(let y=1;y<=a.linesAfter&&!(c+y>=l.length);y++){const x=t(s.buffer,o[c+y],l[c+y],s.position-(o[c]-o[c+y]),f);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),d)+" | "+x.str+`
|
|
136
|
+
`}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),Yo=i,Yo}p(Ff,"requireSnippet");var Uo,Tc;function Ae(){if(Tc)return Uo;Tc=1;const e=Qi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const n={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(l){n[String(l)]=o})}),n}p(i,"compileStyleAliases");function s(a,n){if(n=n||{},Object.keys(n).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=n,this.tag=a,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),Uo=s,Uo}p(Ae,"requireType");var jo,_c;function _l(){if(_c)return jo;_c=1;const e=Qi(),t=Ae();function r(a,n){const o=[];return a[n].forEach(function(l){let h=o.length;o.forEach(function(c,u){c.tag===l.tag&&c.kind===l.kind&&c.multi===l.multi&&(h=u)}),o[h]=l}),o}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}p(n,"collectType");for(let o=0,l=arguments.length;o<l;o+=1)arguments[o].forEach(n);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(n){let o=[],l=[];if(n instanceof t)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(o=o.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(c){if(!(c instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(c){if(!(c instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const h=Object.create(s.prototype);return h.implicit=(this.implicit||[]).concat(o),h.explicit=(this.explicit||[]).concat(l),h.compiledImplicit=r(h,"implicit"),h.compiledExplicit=r(h,"explicit"),h.compiledTypeMap=i(h.compiledImplicit,h.compiledExplicit),h},"extend"),jo=s,jo}p(_l,"requireSchema");var Go,Bc;function Bl(){if(Bc)return Go;Bc=1;const e=Ae();return Go=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Go}p(Bl,"requireStr");var Xo,vc;function vl(){if(vc)return Xo;vc=1;const e=Ae();return Xo=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Xo}p(vl,"requireSeq");var Vo,Lc;function Ll(){if(Lc)return Vo;Lc=1;const e=Ae();return Vo=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Vo}p(Ll,"requireMap");var Zo,Ac;function Al(){if(Ac)return Zo;Ac=1;const e=_l();return Zo=new e({explicit:[Bl(),vl(),Ll()]}),Zo}p(Al,"requireFailsafe");var Ko,Fc;function Fl(){if(Fc)return Ko;Fc=1;const e=Ae();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),Ko=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),Ko}p(Fl,"require_null");var Qo,Ec;function El(){if(Ec)return Qo;Ec=1;const e=Ae();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),Qo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Qo}p(El,"requireBool");var Jo,Mc;function Ml(){if(Mc)return Jo;Mc=1;const e=Ki(),t=Ae();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}p(r,"isHexCode");function i(h){return h>=48&&h<=55}p(i,"isOctCode");function s(h){return h>=48&&h<=57}p(s,"isDecCode");function a(h){if(h===null)return!1;const c=h.length;let u=0,d=!1;if(!c)return!1;let f=h[u];if((f==="-"||f==="+")&&(f=h[++u]),f==="0"){if(u+1===c)return!0;if(f=h[++u],f==="b"){for(u++;u<c;u++){if(f=h[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(n(h))}if(f==="x"){for(u++;u<c;u++){if(!r(h.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(h))}if(f==="o"){for(u++;u<c;u++){if(!i(h.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(h))}}for(;u<c;u++){if(!s(h.charCodeAt(u)))return!1;d=!0}return d?isFinite(n(h)):!1}p(a,"resolveYamlInteger");function n(h){let c=h,u=1,d=c[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),c=c.slice(1),d=c[0]),c==="0")return 0;if(d==="0"){if(c[1]==="b")return u*parseInt(c.slice(2),2);if(c[1]==="x")return u*parseInt(c.slice(2),16);if(c[1]==="o")return u*parseInt(c.slice(2),8)}return u*parseInt(c,10)}p(n,"parseYamlInteger");function o(h){return n(h)}p(o,"constructYamlInteger");function l(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!e.isNegativeZero(h)}return p(l,"isInteger"),Jo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:o,predicate:l,represent:{binary:p(function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:p(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:p(function(h){return h.toString(10)},"decimal"),hexadecimal:p(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Jo}p(Ml,"requireInt");var tn,Oc;function Ol(){if(Oc)return tn;Oc=1;const e=Ki(),t=Ae(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:i.test(h)}p(s,"resolveYamlFloat");function a(h){let c=h.toLowerCase();const u=c[0]==="-"?-1:1;return"+-".indexOf(c[0])>=0&&(c=c.slice(1)),c===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:c===".nan"?NaN:u*parseFloat(c,10)}p(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function o(h,c){if(isNaN(h))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";const u=h.toString(10);return n.test(u)?u.replace("e",".e"):u}p(o,"representYamlFloat");function l(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return p(l,"isFloat"),tn=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:o,defaultStyle:"lowercase"}),tn}p(Ol,"requireFloat");var en,$c;function $l(){return $c||($c=1,en=Al().extend({implicit:[Fl(),El(),Ml(),Ol()]})),en}p($l,"requireJson");var rn,Dc;function Dl(){return Dc||(Dc=1,rn=$l()),rn}p(Dl,"requireCore");var sn,Ic;function Il(){if(Ic)return sn;Ic=1;const e=Ae(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 i(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}p(i,"resolveYamlTimestamp");function s(n){let o=0,l=null,h=t.exec(n);if(h===null&&(h=r.exec(n)),h===null)throw new Error("Date resolve error");const c=+h[1],u=+h[2]-1,d=+h[3];if(!h[4])return new Date(Date.UTC(c,u,d));const f=+h[4],g=+h[5],y=+h[6];if(h[7]){for(o=h[7].slice(0,3);o.length<3;)o+="0";o=+o}if(h[9]){const C=+h[10],b=+(h[11]||0);l=(C*60+b)*6e4,h[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(c,u,d,f,g,y,o));return l&&x.setTime(x.getTime()-l),x}p(s,"constructYamlTimestamp");function a(n){return n.toISOString()}return p(a,"representYamlTimestamp"),sn=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),sn}p(Il,"requireTimestamp");var an,Pc;function Pl(){if(Pc)return an;Pc=1;const e=Ae();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),an=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),an}p(Pl,"requireMerge");var on,Rc;function Rl(){if(Rc)return on;Rc=1;const e=Ae(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
137
|
+
\r`;function r(n){if(n===null)return!1;let o=0;const l=n.length,h=t;for(let c=0;c<l;c++){const u=h.indexOf(n.charAt(c));if(!(u>64)){if(u<0)return!1;o+=6}}return o%8===0}p(r,"resolveYamlBinary");function i(n){const o=n.replace(/[\r\n=]/g,""),l=o.length,h=t;let c=0;const u=[];for(let f=0;f<l;f++)f%4===0&&f&&(u.push(c>>16&255),u.push(c>>8&255),u.push(c&255)),c=c<<6|h.indexOf(o.charAt(f));const d=l%4*6;return d===0?(u.push(c>>16&255),u.push(c>>8&255),u.push(c&255)):d===18?(u.push(c>>10&255),u.push(c>>2&255)):d===12&&u.push(c>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function s(n){let o="",l=0;const h=n.length,c=t;for(let d=0;d<h;d++)d%3===0&&d&&(o+=c[l>>18&63],o+=c[l>>12&63],o+=c[l>>6&63],o+=c[l&63]),l=(l<<8)+n[d];const u=h%3;return u===0?(o+=c[l>>18&63],o+=c[l>>12&63],o+=c[l>>6&63],o+=c[l&63]):u===2?(o+=c[l>>10&63],o+=c[l>>4&63],o+=c[l<<2&63],o+=c[64]):u===1&&(o+=c[l>>2&63],o+=c[l<<4&63],o+=c[64],o+=c[64]),o}p(s,"representYamlBinary");function a(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return p(a,"isBinary"),on=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),on}p(Rl,"requireBinary");var nn,qc;function ql(){if(qc)return nn;qc=1;const e=Ae(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const n={},o=a;for(let l=0,h=o.length;l<h;l+=1){const c=o[l];let u=!1;if(r.call(c)!=="[object Object]")return!1;let d;for(d in c)if(t.call(c,d))if(!u)u=!0;else return!1;if(!u||t.call(n,d))return!1;Object.defineProperty(n,d,{value:!0})}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),nn=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),nn}p(ql,"requireOmap");var ln,Nc;function Nl(){if(Nc)return ln;Nc=1;const e=Ae(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,n=new Array(a.length);for(let o=0,l=a.length;o<l;o+=1){const h=a[o];if(t.call(h)!=="[object Object]")return!1;const c=Object.keys(h);if(c.length!==1)return!1;n[o]=[c[0],h[c[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,n=new Array(a.length);for(let o=0,l=a.length;o<l;o+=1){const h=a[o],c=Object.keys(h);n[o]=[c[0],h[c[0]]]}return n}return p(i,"constructYamlPairs"),ln=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),ln}p(Nl,"requirePairs");var hn,Wc;function Wl(){if(Wc)return hn;Wc=1;const e=Ae(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const n in a)if(t.call(a,n)&&a[n]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),hn=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),hn}p(Wl,"requireSet");var cn,zc;function oo(){return zc||(zc=1,cn=Dl().extend({implicit:[Il(),Pl()],explicit:[Rl(),ql(),Nl(),Wl()]})),cn}p(oo,"require_default");var Hc;function Ef(){if(Hc)return aa;Hc=1;const e=Ki(),t=Qi(),r=Ff(),i=oo(),s=Object.prototype.hasOwnProperty,a=1,n=2,o=3,l=4,h=1,c=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(m){return Object.prototype.toString.call(m)}p(C,"_class");function b(m){return m===10||m===13}p(b,"isEol");function k(m){return m===9||m===32}p(k,"isWhiteSpace");function _(m){return m===9||m===32||m===10||m===13}p(_,"isWsOrEol");function B(m){return m===44||m===91||m===93||m===123||m===125}p(B,"isFlowIndicator");function A(m){if(m>=48&&m<=57)return m-48;const z=m|32;return z>=97&&z<=102?z-97+10:-1}p(A,"fromHexCode");function M(m){return m===120?2:m===117?4:m===85?8:0}p(M,"escapedHexLen");function L(m){return m>=48&&m<=57?m-48:-1}p(L,"fromDecimalCode");function q(m){switch(m){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
138
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(q,"simpleEscapeSequence");function D(m){return m<=65535?String.fromCharCode(m):String.fromCharCode((m-65536>>10)+55296,(m-65536&1023)+56320)}p(D,"charFromCodepoint");function R(m,z,Q){z==="__proto__"?Object.defineProperty(m,z,{configurable:!0,enumerable:!0,writable:!0,value:Q}):m[z]=Q}p(R,"setProperty");const K=new Array(256),O=new Array(256);for(let m=0;m<256;m++)K[m]=q(m)?1:0,O[m]=q(m);function F(m,z){this.input=m,this.filename=z.filename||null,this.schema=z.schema||i,this.onWarning=z.onWarning||null,this.legacy=z.legacy||!1,this.json=z.json||!1,this.listener=z.listener||null,this.maxDepth=typeof z.maxDepth=="number"?z.maxDepth:100,this.maxTotalMergeKeys=typeof z.maxTotalMergeKeys=="number"?z.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=m.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(F,"State");function $(m,z){const Q={name:m.filename,buffer:m.input.slice(0,-1),position:m.position,line:m.line,column:m.position-m.lineStart};return Q.snippet=r(Q),new t(z,Q)}p($,"generateError");function v(m,z){throw $(m,z)}p(v,"throwError");function N(m,z){m.onWarning&&m.onWarning.call(null,$(m,z))}p(N,"throwWarning");function P(m,z,Q){const it=m.anchorMapTransactions;if(it.length!==0){const Z=it[it.length-1];s.call(Z,z)||(Z[z]={existed:s.call(m.anchorMap,z),value:m.anchorMap[z]})}m.anchorMap[z]=Q}p(P,"storeAnchor");function E(m){m.anchorMapTransactions.push(Object.create(null))}p(E,"beginAnchorTransaction");function Y(m){const z=m.anchorMapTransactions.pop(),Q=m.anchorMapTransactions;if(Q.length===0)return;const it=Q[Q.length-1],Z=Object.keys(z);for(let S=0,H=Z.length;S<H;S+=1){const V=Z[S];s.call(it,V)||(it[V]=z[V])}}p(Y,"commitAnchorTransaction");function ot(m){const z=m.anchorMapTransactions.pop(),Q=Object.keys(z);for(let it=Q.length-1;it>=0;it-=1){const Z=z[Q[it]];Z.existed?m.anchorMap[Q[it]]=Z.value:delete m.anchorMap[Q[it]]}}p(ot,"rollbackAnchorTransaction");function tt(m){return{position:m.position,line:m.line,lineStart:m.lineStart,lineIndent:m.lineIndent,firstTabInLine:m.firstTabInLine,tag:m.tag,anchor:m.anchor,kind:m.kind,result:m.result}}p(tt,"snapshotState");function et(m,z){m.position=z.position,m.line=z.line,m.lineStart=z.lineStart,m.lineIndent=z.lineIndent,m.firstTabInLine=z.firstTabInLine,m.tag=z.tag,m.anchor=z.anchor,m.kind=z.kind,m.result=z.result}p(et,"restoreState");const ct={YAML:p(function(z,Q,it){z.version!==null&&v(z,"duplication of %YAML directive"),it.length!==1&&v(z,"YAML directive accepts exactly one argument");const Z=/^([0-9]+)\.([0-9]+)$/.exec(it[0]);Z===null&&v(z,"ill-formed argument of the YAML directive");const S=parseInt(Z[1],10),H=parseInt(Z[2],10);S!==1&&v(z,"unacceptable YAML version of the document"),z.version=it[0],z.checkLineBreaks=H<2,H!==1&&H!==2&&N(z,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(z,Q,it){let Z;it.length!==2&&v(z,"TAG directive accepts exactly two arguments");const S=it[0];Z=it[1],y.test(S)||v(z,"ill-formed tag handle (first argument) of the TAG directive"),s.call(z.tagMap,S)&&v(z,'there is a previously declared suffix for "'+S+'" tag handle'),x.test(Z)||v(z,"ill-formed tag prefix (second argument) of the TAG directive");try{Z=decodeURIComponent(Z)}catch{v(z,"tag prefix is malformed: "+Z)}z.tagMap[S]=Z},"handleTagDirective")};function ut(m,z,Q,it){if(z<Q){const Z=m.input.slice(z,Q);if(it)for(let S=0,H=Z.length;S<H;S+=1){const V=Z.charCodeAt(S);V===9||V>=32&&V<=1114111||v(m,"expected valid JSON character")}else d.test(Z)&&v(m,"the stream contains non-printable characters");m.result+=Z}}p(ut,"captureSegment");function wt(m){m.totalMergeKeys++,m.maxTotalMergeKeys!==-1&&m.totalMergeKeys>m.maxTotalMergeKeys&&v(m,"merge keys exceeded maxTotalMergeKeys ("+m.maxTotalMergeKeys+")")}p(wt,"chargeMergeWork");function Bt(m,z,Q,it){e.isObject(Q)||v(m,"cannot merge mappings; the provided source object is unacceptable"),wt(m);const Z=Object.keys(Q);for(let S=0,H=Z.length;S<H;S+=1){const V=Z[S];wt(m),s.call(z,V)||(R(z,V,Q[V]),it[V]=!0)}}p(Bt,"mergeMappings");function vt(m,z,Q,it,Z,S,H,V,nt){if(Array.isArray(Z)){Z=Array.prototype.slice.call(Z);for(let lt=0,ht=Z.length;lt<ht;lt+=1)Array.isArray(Z[lt])&&v(m,"nested arrays are not supported inside keys"),typeof Z=="object"&&C(Z[lt])==="[object Object]"&&(Z[lt]="[object Object]")}if(typeof Z=="object"&&C(Z)==="[object Object]"&&(Z="[object Object]"),Z=String(Z),z===null&&(z={}),it==="tag:yaml.org,2002:merge")if(Array.isArray(S)){S.length>100&&v(m,"abnormal merge sequence size");for(let lt=0,ht=S.length;lt<ht;lt+=1)Bt(m,z,S[lt],Q)}else Bt(m,z,S,Q);else!m.json&&!s.call(Q,Z)&&s.call(z,Z)&&(m.line=H||m.line,m.lineStart=V||m.lineStart,m.position=nt||m.position,v(m,"duplicated mapping key")),R(z,Z,S),delete Q[Z];return z}p(vt,"storeMappingPair");function Ct(m){const z=m.input.charCodeAt(m.position);z===10?m.position++:z===13?(m.position++,m.input.charCodeAt(m.position)===10&&m.position++):v(m,"a line break is expected"),m.line+=1,m.lineStart=m.position,m.firstTabInLine=-1}p(Ct,"readLineBreak");function st(m,z,Q){let it=0,Z=m.input.charCodeAt(m.position);for(;Z!==0;){for(;k(Z);)Z===9&&m.firstTabInLine===-1&&(m.firstTabInLine=m.position),Z=m.input.charCodeAt(++m.position);if(z&&Z===35)do Z=m.input.charCodeAt(++m.position);while(Z!==10&&Z!==13&&Z!==0);if(b(Z))for(Ct(m),Z=m.input.charCodeAt(m.position),it++,m.lineIndent=0;Z===32;)m.lineIndent++,Z=m.input.charCodeAt(++m.position);else break}return Q!==-1&&it!==0&&m.lineIndent<Q&&N(m,"deficient indentation"),it}p(st,"skipSeparationSpace");function gt(m){let z=m.position,Q=m.input.charCodeAt(z);return!!((Q===45||Q===46)&&Q===m.input.charCodeAt(z+1)&&Q===m.input.charCodeAt(z+2)&&(z+=3,Q=m.input.charCodeAt(z),Q===0||_(Q)))}p(gt,"testDocumentSeparator");function Lt(m,z){z===1?m.result+=" ":z>1&&(m.result+=e.repeat(`
|
|
139
|
+
`,z-1))}p(Lt,"writeFoldedLines");function zt(m,z,Q){let it,Z,S,H,V,nt;const lt=m.kind,ht=m.result;let J=m.input.charCodeAt(m.position);if(_(J)||B(J)||J===35||J===38||J===42||J===33||J===124||J===62||J===39||J===34||J===37||J===64||J===96)return!1;if(J===63||J===45){const dt=m.input.charCodeAt(m.position+1);if(_(dt)||Q&&B(dt))return!1}for(m.kind="scalar",m.result="",it=Z=m.position,S=!1;J!==0;){if(J===58){const dt=m.input.charCodeAt(m.position+1);if(_(dt)||Q&&B(dt))break}else if(J===35){const dt=m.input.charCodeAt(m.position-1);if(_(dt))break}else{if(m.position===m.lineStart&>(m)||Q&&B(J))break;if(b(J))if(H=m.line,V=m.lineStart,nt=m.lineIndent,st(m,!1,-1),m.lineIndent>=z){S=!0,J=m.input.charCodeAt(m.position);continue}else{m.position=Z,m.line=H,m.lineStart=V,m.lineIndent=nt;break}}S&&(ut(m,it,Z,!1),Lt(m,m.line-H),it=Z=m.position,S=!1),k(J)||(Z=m.position+1),J=m.input.charCodeAt(++m.position)}return ut(m,it,Z,!1),m.result?!0:(m.kind=lt,m.result=ht,!1)}p(zt,"readPlainScalar");function jt(m,z){let Q,it,Z=m.input.charCodeAt(m.position);if(Z!==39)return!1;for(m.kind="scalar",m.result="",m.position++,Q=it=m.position;(Z=m.input.charCodeAt(m.position))!==0;)if(Z===39)if(ut(m,Q,m.position,!0),Z=m.input.charCodeAt(++m.position),Z===39)Q=m.position,m.position++,it=m.position;else return!0;else b(Z)?(ut(m,Q,it,!0),Lt(m,st(m,!1,z)),Q=it=m.position):m.position===m.lineStart&>(m)?v(m,"unexpected end of the document within a single quoted scalar"):(m.position++,k(Z)||(it=m.position));v(m,"unexpected end of the stream within a single quoted scalar")}p(jt,"readSingleQuotedScalar");function U(m,z){let Q,it,Z,S=m.input.charCodeAt(m.position);if(S!==34)return!1;for(m.kind="scalar",m.result="",m.position++,Q=it=m.position;(S=m.input.charCodeAt(m.position))!==0;){if(S===34)return ut(m,Q,m.position,!0),m.position++,!0;if(S===92){if(ut(m,Q,m.position,!0),S=m.input.charCodeAt(++m.position),b(S))st(m,!1,z);else if(S<256&&K[S])m.result+=O[S],m.position++;else if((Z=M(S))>0){let H=Z,V=0;for(;H>0;H--)S=m.input.charCodeAt(++m.position),(Z=A(S))>=0?V=(V<<4)+Z:v(m,"expected hexadecimal character");m.result+=D(V),m.position++}else v(m,"unknown escape sequence");Q=it=m.position}else b(S)?(ut(m,Q,it,!0),Lt(m,st(m,!1,z)),Q=it=m.position):m.position===m.lineStart&>(m)?v(m,"unexpected end of the document within a double quoted scalar"):(m.position++,k(S)||(it=m.position))}v(m,"unexpected end of the stream within a double quoted scalar")}p(U,"readDoubleQuotedScalar");function Ot(m,z){let Q=!0,it,Z,S;const H=m.tag;let V;const nt=m.anchor;let lt,ht,J,dt;const _t=Object.create(null);let Ft,Et,Pt,$t=m.input.charCodeAt(m.position);if($t===91)lt=93,dt=!1,V=[];else if($t===123)lt=125,dt=!0,V={};else return!1;for(m.anchor!==null&&P(m,m.anchor,V),$t=m.input.charCodeAt(++m.position);$t!==0;){if(st(m,!0,z),$t=m.input.charCodeAt(m.position),$t===lt)return m.position++,m.tag=H,m.anchor=nt,m.kind=dt?"mapping":"sequence",m.result=V,!0;if(Q?$t===44&&v(m,"expected the node content, but found ','"):v(m,"missed comma between flow collection entries"),Et=Ft=Pt=null,ht=J=!1,$t===63){const Se=m.input.charCodeAt(m.position+1);_(Se)&&(ht=J=!0,m.position++,st(m,!0,z))}it=m.line,Z=m.lineStart,S=m.position,be(m,z,a,!1,!0),Et=m.tag,Ft=m.result,st(m,!0,z),$t=m.input.charCodeAt(m.position),(J||m.line===it)&&$t===58&&(ht=!0,$t=m.input.charCodeAt(++m.position),st(m,!0,z),be(m,z,a,!1,!0),Pt=m.result),dt?vt(m,V,_t,Et,Ft,Pt,it,Z,S):ht?V.push(vt(m,null,_t,Et,Ft,Pt,it,Z,S)):V.push(Ft),st(m,!0,z),$t=m.input.charCodeAt(m.position),$t===44?(Q=!0,$t=m.input.charCodeAt(++m.position)):Q=!1}v(m,"unexpected end of the stream within a flow collection")}p(Ot,"readFlowCollection");function He(m,z){let Q,it=h,Z=!1,S=!1,H=z,V=0,nt=!1,lt,ht=m.input.charCodeAt(m.position);if(ht===124)Q=!1;else if(ht===62)Q=!0;else return!1;for(m.kind="scalar",m.result="";ht!==0;)if(ht=m.input.charCodeAt(++m.position),ht===43||ht===45)h===it?it=ht===43?u:c:v(m,"repeat of a chomping mode identifier");else if((lt=L(ht))>=0)lt===0?v(m,"bad explicit indentation width of a block scalar; it cannot be less than one"):S?v(m,"repeat of an indentation width identifier"):(H=z+lt-1,S=!0);else break;if(k(ht)){do ht=m.input.charCodeAt(++m.position);while(k(ht));if(ht===35)do ht=m.input.charCodeAt(++m.position);while(!b(ht)&&ht!==0)}for(;ht!==0;){for(Ct(m),m.lineIndent=0,ht=m.input.charCodeAt(m.position);(!S||m.lineIndent<H)&&ht===32;)m.lineIndent++,ht=m.input.charCodeAt(++m.position);if(!S&&m.lineIndent>H&&(H=m.lineIndent),b(ht)){V++;continue}if(!S&&H===0&&v(m,"missing indentation for block scalar"),m.lineIndent<H){it===u?m.result+=e.repeat(`
|
|
140
|
+
`,Z?1+V:V):it===h&&Z&&(m.result+=`
|
|
141
|
+
`);break}Q?k(ht)?(nt=!0,m.result+=e.repeat(`
|
|
142
|
+
`,Z?1+V:V)):nt?(nt=!1,m.result+=e.repeat(`
|
|
143
|
+
`,V+1)):V===0?Z&&(m.result+=" "):m.result+=e.repeat(`
|
|
144
|
+
`,V):m.result+=e.repeat(`
|
|
145
|
+
`,Z?1+V:V),Z=!0,S=!0,V=0;const J=m.position;for(;!b(ht)&&ht!==0;)ht=m.input.charCodeAt(++m.position);ut(m,J,m.position,!1)}return!0}p(He,"readBlockScalar");function De(m,z){const Q=m.tag,it=m.anchor,Z=[];let S=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&P(m,m.anchor,Z);let H=m.input.charCodeAt(m.position);for(;H!==0&&(m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,v(m,"tab characters must not be used in indentation")),H===45);){const V=m.input.charCodeAt(m.position+1);if(!_(V))break;if(S=!0,m.position++,st(m,!0,-1)&&m.lineIndent<=z){Z.push(null),H=m.input.charCodeAt(m.position);continue}const nt=m.line;if(be(m,z,o,!1,!0),Z.push(m.result),st(m,!0,-1),H=m.input.charCodeAt(m.position),(m.line===nt||m.lineIndent>z)&&H!==0)v(m,"bad indentation of a sequence entry");else if(m.lineIndent<z)break}return S?(m.tag=Q,m.anchor=it,m.kind="sequence",m.result=Z,!0):!1}p(De,"readBlockSequence");function Gt(m,z,Q){let it,Z,S,H;const V=m.tag,nt=m.anchor,lt={},ht=Object.create(null);let J=null,dt=null,_t=null,Ft=!1,Et=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&P(m,m.anchor,lt);let Pt=m.input.charCodeAt(m.position);for(;Pt!==0;){!Ft&&m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,v(m,"tab characters must not be used in indentation"));const $t=m.input.charCodeAt(m.position+1),Se=m.line;if((Pt===63||Pt===58)&&_($t))Pt===63?(Ft&&(vt(m,lt,ht,J,dt,null,Z,S,H),J=dt=_t=null),Et=!0,Ft=!0,it=!0):Ft?(Ft=!1,it=!0):v(m,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),m.position+=1,Pt=$t;else{if(Z=m.line,S=m.lineStart,H=m.position,!be(m,Q,n,!1,!0))break;if(m.line===Se){for(Pt=m.input.charCodeAt(m.position);k(Pt);)Pt=m.input.charCodeAt(++m.position);if(Pt===58)Pt=m.input.charCodeAt(++m.position),_(Pt)||v(m,"a whitespace character is expected after the key-value separator within a block mapping"),Ft&&(vt(m,lt,ht,J,dt,null,Z,S,H),J=dt=_t=null),Et=!0,Ft=!1,it=!1,J=m.tag,dt=m.result;else if(Et)v(m,"can not read an implicit mapping pair; a colon is missed");else return m.tag=V,m.anchor=nt,!0}else if(Et)v(m,"can not read a block mapping entry; a multiline key may not be an implicit key");else return m.tag=V,m.anchor=nt,!0}if((m.line===Se||m.lineIndent>z)&&(Ft&&(Z=m.line,S=m.lineStart,H=m.position),be(m,z,l,!0,it)&&(Ft?dt=m.result:_t=m.result),Ft||(vt(m,lt,ht,J,dt,_t,Z,S,H),J=dt=_t=null),st(m,!0,-1),Pt=m.input.charCodeAt(m.position)),(m.line===Se||m.lineIndent>z)&&Pt!==0)v(m,"bad indentation of a mapping entry");else if(m.lineIndent<z)break}return Ft&&vt(m,lt,ht,J,dt,null,Z,S,H),Et&&(m.tag=V,m.anchor=nt,m.kind="mapping",m.result=lt),Et}p(Gt,"readBlockMapping");function ir(m){let z=!1,Q=!1,it,Z,S=m.input.charCodeAt(m.position);if(S!==33)return!1;m.tag!==null&&v(m,"duplication of a tag property"),S=m.input.charCodeAt(++m.position),S===60?(z=!0,S=m.input.charCodeAt(++m.position)):S===33?(Q=!0,it="!!",S=m.input.charCodeAt(++m.position)):it="!";let H=m.position;if(z){do S=m.input.charCodeAt(++m.position);while(S!==0&&S!==62);m.position<m.length?(Z=m.input.slice(H,m.position),S=m.input.charCodeAt(++m.position)):v(m,"unexpected end of the stream within a verbatim tag")}else{for(;S!==0&&!_(S);)S===33&&(Q?v(m,"tag suffix cannot contain exclamation marks"):(it=m.input.slice(H-1,m.position+1),y.test(it)||v(m,"named tag handle cannot contain such characters"),Q=!0,H=m.position+1)),S=m.input.charCodeAt(++m.position);Z=m.input.slice(H,m.position),g.test(Z)&&v(m,"tag suffix cannot contain flow indicator characters")}Z&&!x.test(Z)&&v(m,"tag name cannot contain such characters: "+Z);try{Z=decodeURIComponent(Z)}catch{v(m,"tag name is malformed: "+Z)}return z?m.tag=Z:s.call(m.tagMap,it)?m.tag=m.tagMap[it]+Z:it==="!"?m.tag="!"+Z:it==="!!"?m.tag="tag:yaml.org,2002:"+Z:v(m,'undeclared tag handle "'+it+'"'),!0}p(ir,"readTagProperty");function Xt(m){let z=m.input.charCodeAt(m.position);if(z!==38)return!1;m.anchor!==null&&v(m,"duplication of an anchor property"),z=m.input.charCodeAt(++m.position);const Q=m.position;for(;z!==0&&!_(z)&&!B(z);)z=m.input.charCodeAt(++m.position);return m.position===Q&&v(m,"name of an anchor node must contain at least one character"),m.anchor=m.input.slice(Q,m.position),!0}p(Xt,"readAnchorProperty");function Cr(m){let z=m.input.charCodeAt(m.position);if(z!==42)return!1;z=m.input.charCodeAt(++m.position);const Q=m.position;for(;z!==0&&!_(z)&&!B(z);)z=m.input.charCodeAt(++m.position);m.position===Q&&v(m,"name of an alias node must contain at least one character");const it=m.input.slice(Q,m.position);return s.call(m.anchorMap,it)||v(m,'unidentified alias "'+it+'"'),m.result=m.anchorMap[it],st(m,!0,-1),!0}p(Cr,"readAlias");function ye(m,z,Q,it){const Z=tt(m);return E(m),et(m,z),m.tag=null,m.anchor=null,m.kind=null,m.result=null,Gt(m,Q,it)&&m.kind==="mapping"?(Y(m),!0):(ot(m),et(m,Z),!1)}p(ye,"tryReadBlockMappingFromProperty");function be(m,z,Q,it,Z){let S,H,V=1,nt=!1,lt=!1,ht=null,J,dt,_t;m.depth>=m.maxDepth&&v(m,"nesting exceeded maxDepth ("+m.maxDepth+")"),m.depth+=1,m.listener!==null&&m.listener("open",m),m.tag=null,m.anchor=null,m.kind=null,m.result=null;const Ft=S=H=l===Q||o===Q;if(it&&st(m,!0,-1)&&(nt=!0,m.lineIndent>z?V=1:m.lineIndent===z?V=0:m.lineIndent<z&&(V=-1)),V===1)for(;;){const Et=m.input.charCodeAt(m.position),Pt=tt(m);if(nt&&(Et===33&&m.tag!==null||Et===38&&m.anchor!==null)||!ir(m)&&!Xt(m))break;ht===null&&(ht=Pt),st(m,!0,-1)?(nt=!0,H=Ft,m.lineIndent>z?V=1:m.lineIndent===z?V=0:m.lineIndent<z&&(V=-1)):H=!1}if(H&&(H=nt||Z),V===1||l===Q)if(a===Q||n===Q?dt=z:dt=z+1,_t=m.position-m.lineStart,V===1)if(H&&(De(m,_t)||Gt(m,_t,dt))||Ot(m,dt))lt=!0;else{const Et=m.input.charCodeAt(m.position);ht!==null&&Ft&&!H&&Et!==124&&Et!==62&&ye(m,ht,ht.position-ht.lineStart,dt)||S&&He(m,dt)||jt(m,dt)||U(m,dt)?lt=!0:Cr(m)?(lt=!0,(m.tag!==null||m.anchor!==null)&&v(m,"alias node should not have any properties")):zt(m,dt,a===Q)&&(lt=!0,m.tag===null&&(m.tag="?")),m.anchor!==null&&P(m,m.anchor,m.result)}else V===0&&(lt=H&&De(m,_t));if(m.tag===null)m.anchor!==null&&P(m,m.anchor,m.result);else if(m.tag==="?"){m.result!==null&&m.kind!=="scalar"&&v(m,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+m.kind+'"');for(let Et=0,Pt=m.implicitTypes.length;Et<Pt;Et+=1)if(J=m.implicitTypes[Et],J.resolve(m.result)){m.result=J.construct(m.result),m.tag=J.tag,m.anchor!==null&&P(m,m.anchor,m.result);break}}else if(m.tag!=="!"){if(s.call(m.typeMap[m.kind||"fallback"],m.tag))J=m.typeMap[m.kind||"fallback"][m.tag];else{J=null;const Et=m.typeMap.multi[m.kind||"fallback"];for(let Pt=0,$t=Et.length;Pt<$t;Pt+=1)if(m.tag.slice(0,Et[Pt].tag.length)===Et[Pt].tag){J=Et[Pt];break}}J||v(m,"unknown tag !<"+m.tag+">"),m.result!==null&&J.kind!==m.kind&&v(m,"unacceptable node kind for !<"+m.tag+'> tag; it should be "'+J.kind+'", not "'+m.kind+'"'),J.resolve(m.result,m.tag)?(m.result=J.construct(m.result,m.tag),m.anchor!==null&&P(m,m.anchor,m.result)):v(m,"cannot resolve a node with !<"+m.tag+"> explicit tag")}return m.listener!==null&&m.listener("close",m),m.depth-=1,m.tag!==null||m.anchor!==null||lt}p(be,"composeNode");function Or(m){const z=m.position;let Q=!1,it;for(m.version=null,m.checkLineBreaks=m.legacy,m.tagMap=Object.create(null),m.anchorMap=Object.create(null);(it=m.input.charCodeAt(m.position))!==0&&(st(m,!0,-1),it=m.input.charCodeAt(m.position),!(m.lineIndent>0||it!==37));){Q=!0,it=m.input.charCodeAt(++m.position);let Z=m.position;for(;it!==0&&!_(it);)it=m.input.charCodeAt(++m.position);const S=m.input.slice(Z,m.position),H=[];for(S.length<1&&v(m,"directive name must not be less than one character in length");it!==0;){for(;k(it);)it=m.input.charCodeAt(++m.position);if(it===35){do it=m.input.charCodeAt(++m.position);while(it!==0&&!b(it));break}if(b(it))break;for(Z=m.position;it!==0&&!_(it);)it=m.input.charCodeAt(++m.position);H.push(m.input.slice(Z,m.position))}it!==0&&Ct(m),s.call(ct,S)?ct[S](m,S,H):N(m,'unknown document directive "'+S+'"')}if(st(m,!0,-1),m.lineIndent===0&&m.input.charCodeAt(m.position)===45&&m.input.charCodeAt(m.position+1)===45&&m.input.charCodeAt(m.position+2)===45?(m.position+=3,st(m,!0,-1)):Q&&v(m,"directives end mark is expected"),be(m,m.lineIndent-1,l,!1,!0),st(m,!0,-1),m.checkLineBreaks&&f.test(m.input.slice(z,m.position))&&N(m,"non-ASCII line breaks are interpreted as content"),m.documents.push(m.result),m.position===m.lineStart&>(m)){m.input.charCodeAt(m.position)===46&&(m.position+=3,st(m,!0,-1));return}m.position<m.length-1&&v(m,"end of the stream or a document separator is expected")}p(Or,"readDocument");function ke(m,z){m=String(m),z=z||{},m.length!==0&&(m.charCodeAt(m.length-1)!==10&&m.charCodeAt(m.length-1)!==13&&(m+=`
|
|
146
|
+
`),m.charCodeAt(0)===65279&&(m=m.slice(1)));const Q=new F(m,z),it=m.indexOf("\0");for(it!==-1&&(Q.position=it,v(Q,"null byte is not allowed in input")),Q.input+="\0";Q.input.charCodeAt(Q.position)===32;)Q.lineIndent+=1,Q.position+=1;for(;Q.position<Q.length-1;)Or(Q);return Q.documents}p(ke,"loadDocuments");function $r(m,z,Q){z!==null&&typeof z=="object"&&typeof Q>"u"&&(Q=z,z=null);const it=ke(m,Q);if(typeof z!="function")return it;for(let Z=0,S=it.length;Z<S;Z+=1)z(it[Z])}p($r,"loadAll2");function xr(m,z){const Q=ke(m,z);if(Q.length!==0){if(Q.length===1)return Q[0];throw new t("expected a single document in the stream, but found more")}}return p(xr,"load2"),aa.loadAll=$r,aa.load=xr,aa}p(Ef,"requireLoader");var un={},Yc;function Mf(){if(Yc)return un;Yc=1;const e=Ki(),t=Qi(),r=oo(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,n=9,o=10,l=13,h=32,c=33,u=34,d=35,f=37,g=38,y=39,x=42,C=44,b=45,k=58,_=61,B=62,A=63,M=64,L=91,q=93,D=96,R=123,K=124,O=125,F={};F[0]="\\0",F[7]="\\a",F[8]="\\b",F[9]="\\t",F[10]="\\n",F[11]="\\v",F[12]="\\f",F[13]="\\r",F[27]="\\e",F[34]='\\"',F[92]="\\\\",F[133]="\\N",F[160]="\\_",F[8232]="\\L",F[8233]="\\P";const $=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function N(S,H){if(H===null)return{};const V={},nt=Object.keys(H);for(let lt=0,ht=nt.length;lt<ht;lt+=1){let J=nt[lt],dt=String(H[J]);J.slice(0,2)==="!!"&&(J="tag:yaml.org,2002:"+J.slice(2));const _t=S.compiledTypeMap.fallback[J];_t&&s.call(_t.styleAliases,dt)&&(dt=_t.styleAliases[dt]),V[J]=dt}return V}p(N,"compileStyleMap");function P(S){let H,V;const nt=S.toString(16).toUpperCase();if(S<=255)H="x",V=2;else if(S<=65535)H="u",V=4;else if(S<=4294967295)H="U",V=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+H+e.repeat("0",V-nt.length)+nt}p(P,"encodeHex");const E=1,Y=2;function ot(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=N(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?Y:E,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(ot,"State");function tt(S,H){const V=e.repeat(" ",H);let nt=0,lt="";const ht=S.length;for(;nt<ht;){let J;const dt=S.indexOf(`
|
|
147
|
+
`,nt);dt===-1?(J=S.slice(nt),nt=ht):(J=S.slice(nt,dt+1),nt=dt+1),J.length&&J!==`
|
|
148
|
+
`&&(lt+=V),lt+=J}return lt}p(tt,"indentString");function et(S,H){return`
|
|
149
|
+
`+e.repeat(" ",S.indent*H)}p(et,"generateNextLine");function ct(S,H){for(let V=0,nt=S.implicitTypes.length;V<nt;V+=1)if(S.implicitTypes[V].resolve(H))return!0;return!1}p(ct,"testImplicitResolving");function ut(S){return S===h||S===n}p(ut,"isWhitespace");function wt(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}p(wt,"isPrintable");function Bt(S){return wt(S)&&S!==a&&S!==l&&S!==o}p(Bt,"isNsCharOrWhitespace");function vt(S,H,V){const nt=Bt(S),lt=nt&&!ut(S);return(V?nt:nt&&S!==C&&S!==L&&S!==q&&S!==R&&S!==O)&&S!==d&&!(H===k&&!lt)||Bt(H)&&!ut(H)&&S===d||H===k&<}p(vt,"isPlainSafe");function Ct(S){return wt(S)&&S!==a&&!ut(S)&&S!==b&&S!==A&&S!==k&&S!==C&&S!==L&&S!==q&&S!==R&&S!==O&&S!==d&&S!==g&&S!==x&&S!==c&&S!==K&&S!==_&&S!==B&&S!==y&&S!==u&&S!==f&&S!==M&&S!==D}p(Ct,"isPlainSafeFirst");function st(S){return!ut(S)&&S!==k}p(st,"isPlainSafeLast");function gt(S,H){const V=S.charCodeAt(H);let nt;return V>=55296&&V<=56319&&H+1<S.length&&(nt=S.charCodeAt(H+1),nt>=56320&&nt<=57343)?(V-55296)*1024+nt-56320+65536:V}p(gt,"codePointAt");function Lt(S){return/^\n* /.test(S)}p(Lt,"needIndentIndicator");const zt=1,jt=2,U=3,Ot=4,He=5;function De(S,H,V,nt,lt,ht,J,dt){let _t,Ft=0,Et=null,Pt=!1,$t=!1;const Se=nt!==-1;let Ye=-1,Ie=Ct(gt(S,0))&&st(gt(S,S.length-1));if(H||J)for(_t=0;_t<S.length;Ft>=65536?_t+=2:_t++){if(Ft=gt(S,_t),!wt(Ft))return He;Ie=Ie&&vt(Ft,Et,dt),Et=Ft}else{for(_t=0;_t<S.length;Ft>=65536?_t+=2:_t++){if(Ft=gt(S,_t),Ft===o)Pt=!0,Se&&($t=$t||_t-Ye-1>nt&&S[Ye+1]!==" ",Ye=_t);else if(!wt(Ft))return He;Ie=Ie&&vt(Ft,Et,dt),Et=Ft}$t=$t||Se&&_t-Ye-1>nt&&S[Ye+1]!==" "}return!Pt&&!$t?Ie&&!J&&!lt(S)?zt:ht===Y?He:jt:V>9&&Lt(S)?He:J?ht===Y?He:jt:$t?Ot:U}p(De,"chooseScalarStyle");function Gt(S,H,V,nt,lt){S.dump=(function(){if(H.length===0)return S.quotingType===Y?'""':"''";if(!S.noCompatMode&&($.indexOf(H)!==-1||v.test(H)))return S.quotingType===Y?'"'+H+'"':"'"+H+"'";const ht=S.indent*Math.max(1,V),J=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-ht),dt=nt||S.flowLevel>-1&&V>=S.flowLevel;function _t(Ft){return ct(S,Ft)}switch(p(_t,"testAmbiguity"),De(H,dt,S.indent,J,_t,S.quotingType,S.forceQuotes&&!nt,lt)){case zt:return H;case jt:return"'"+H.replace(/'/g,"''")+"'";case U:return"|"+ir(H,S.indent)+Xt(tt(H,ht));case Ot:return">"+ir(H,S.indent)+Xt(tt(Cr(H,J),ht));case He:return'"'+be(H)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(Gt,"writeScalar");function ir(S,H){const V=Lt(S)?String(H):"",nt=S[S.length-1]===`
|
|
150
|
+
`,ht=nt&&(S[S.length-2]===`
|
|
151
|
+
`||S===`
|
|
152
|
+
`)?"+":nt?"":"-";return V+ht+`
|
|
153
|
+
`}p(ir,"blockHeader");function Xt(S){return S[S.length-1]===`
|
|
154
|
+
`?S.slice(0,-1):S}p(Xt,"dropEndingNewline");function Cr(S,H){const V=/(\n+)([^\n]*)/g;let nt=(function(){let dt=S.indexOf(`
|
|
155
|
+
`);return dt=dt!==-1?dt:S.length,V.lastIndex=dt,ye(S.slice(0,dt),H)})(),lt=S[0]===`
|
|
156
|
+
`||S[0]===" ",ht,J;for(;J=V.exec(S);){const dt=J[1],_t=J[2];ht=_t[0]===" ",nt+=dt+(!lt&&!ht&&_t!==""?`
|
|
157
|
+
`:"")+ye(_t,H),lt=ht}return nt}p(Cr,"foldString");function ye(S,H){if(S===""||S[0]===" ")return S;const V=/ [^ ]/g;let nt,lt=0,ht,J=0,dt=0,_t="";for(;nt=V.exec(S);)dt=nt.index,dt-lt>H&&(ht=J>lt?J:dt,_t+=`
|
|
158
|
+
`+S.slice(lt,ht),lt=ht+1),J=dt;return _t+=`
|
|
159
|
+
`,S.length-lt>H&&J>lt?_t+=S.slice(lt,J)+`
|
|
160
|
+
`+S.slice(J+1):_t+=S.slice(lt),_t.slice(1)}p(ye,"foldLine");function be(S){let H="",V=0;for(let nt=0;nt<S.length;V>=65536?nt+=2:nt++){V=gt(S,nt);const lt=F[V];!lt&&wt(V)?(H+=S[nt],V>=65536&&(H+=S[nt+1])):H+=lt||P(V)}return H}p(be,"escapeString");function Or(S,H,V){let nt="";const lt=S.tag;for(let ht=0,J=V.length;ht<J;ht+=1){let dt=V[ht];S.replacer&&(dt=S.replacer.call(V,String(ht),dt)),(z(S,H,dt,!1,!1)||typeof dt>"u"&&z(S,H,null,!1,!1))&&(nt!==""&&(nt+=","+(S.condenseFlow?"":" ")),nt+=S.dump)}S.tag=lt,S.dump="["+nt+"]"}p(Or,"writeFlowSequence");function ke(S,H,V,nt){let lt="";const ht=S.tag;for(let J=0,dt=V.length;J<dt;J+=1){let _t=V[J];S.replacer&&(_t=S.replacer.call(V,String(J),_t)),(z(S,H+1,_t,!0,!0,!1,!0)||typeof _t>"u"&&z(S,H+1,null,!0,!0,!1,!0))&&((!nt||lt!=="")&&(lt+=et(S,H)),S.dump&&o===S.dump.charCodeAt(0)?lt+="-":lt+="- ",lt+=S.dump)}S.tag=ht,S.dump=lt||"[]"}p(ke,"writeBlockSequence");function $r(S,H,V){let nt="";const lt=S.tag,ht=Object.keys(V);for(let J=0,dt=ht.length;J<dt;J+=1){let _t="";nt!==""&&(_t+=", "),S.condenseFlow&&(_t+='"');const Ft=ht[J];let Et=V[Ft];S.replacer&&(Et=S.replacer.call(V,Ft,Et)),z(S,H,Ft,!1,!1)&&(S.dump.length>1024&&(_t+="? "),_t+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),z(S,H,Et,!1,!1)&&(_t+=S.dump,nt+=_t))}S.tag=lt,S.dump="{"+nt+"}"}p($r,"writeFlowMapping");function xr(S,H,V,nt){let lt="";const ht=S.tag,J=Object.keys(V);if(S.sortKeys===!0)J.sort();else if(typeof S.sortKeys=="function")J.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let dt=0,_t=J.length;dt<_t;dt+=1){let Ft="";(!nt||lt!=="")&&(Ft+=et(S,H));const Et=J[dt];let Pt=V[Et];if(S.replacer&&(Pt=S.replacer.call(V,Et,Pt)),!z(S,H+1,Et,!0,!0,!0))continue;const $t=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;$t&&(S.dump&&o===S.dump.charCodeAt(0)?Ft+="?":Ft+="? "),Ft+=S.dump,$t&&(Ft+=et(S,H)),z(S,H+1,Pt,!0,$t)&&(S.dump&&o===S.dump.charCodeAt(0)?Ft+=":":Ft+=": ",Ft+=S.dump,lt+=Ft)}S.tag=ht,S.dump=lt||"{}"}p(xr,"writeBlockMapping");function m(S,H,V){const nt=V?S.explicitTypes:S.implicitTypes;for(let lt=0,ht=nt.length;lt<ht;lt+=1){const J=nt[lt];if((J.instanceOf||J.predicate)&&(!J.instanceOf||typeof H=="object"&&H instanceof J.instanceOf)&&(!J.predicate||J.predicate(H))){if(V?J.multi&&J.representName?S.tag=J.representName(H):S.tag=J.tag:S.tag="?",J.represent){const dt=S.styleMap[J.tag]||J.defaultStyle;let _t;if(i.call(J.represent)==="[object Function]")_t=J.represent(H,dt);else if(s.call(J.represent,dt))_t=J.represent[dt](H,dt);else throw new t("!<"+J.tag+'> tag resolver accepts not "'+dt+'" style');S.dump=_t}return!0}}return!1}p(m,"detectType");function z(S,H,V,nt,lt,ht,J){S.tag=null,S.dump=V,m(S,V,!1)||m(S,V,!0);const dt=i.call(S.dump),_t=nt;nt&&(nt=S.flowLevel<0||S.flowLevel>H);const Ft=dt==="[object Object]"||dt==="[object Array]";let Et,Pt;if(Ft&&(Et=S.duplicates.indexOf(V),Pt=Et!==-1),(S.tag!==null&&S.tag!=="?"||Pt||S.indent!==2&&H>0)&&(lt=!1),Pt&&S.usedDuplicates[Et])S.dump="*ref_"+Et;else{if(Ft&&Pt&&!S.usedDuplicates[Et]&&(S.usedDuplicates[Et]=!0),dt==="[object Object]")nt&&Object.keys(S.dump).length!==0?(xr(S,H,S.dump,lt),Pt&&(S.dump="&ref_"+Et+S.dump)):($r(S,H,S.dump),Pt&&(S.dump="&ref_"+Et+" "+S.dump));else if(dt==="[object Array]")nt&&S.dump.length!==0?(S.noArrayIndent&&!J&&H>0?ke(S,H-1,S.dump,lt):ke(S,H,S.dump,lt),Pt&&(S.dump="&ref_"+Et+S.dump)):(Or(S,H,S.dump),Pt&&(S.dump="&ref_"+Et+" "+S.dump));else if(dt==="[object String]")S.tag!=="?"&&Gt(S,S.dump,H,ht,_t);else{if(dt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+dt)}if(S.tag!==null&&S.tag!=="?"){let $t=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?$t="!"+$t:$t.slice(0,18)==="tag:yaml.org,2002:"?$t="!!"+$t.slice(18):$t="!<"+$t+">",S.dump=$t+" "+S.dump}}return!0}p(z,"writeNode");function Q(S,H){const V=[],nt=[];it(S,V,nt);const lt=nt.length;for(let ht=0;ht<lt;ht+=1)H.duplicates.push(V[nt[ht]]);H.usedDuplicates=new Array(lt)}p(Q,"getDuplicateReferences");function it(S,H,V){if(S!==null&&typeof S=="object"){const nt=H.indexOf(S);if(nt!==-1)V.indexOf(nt)===-1&&V.push(nt);else if(H.push(S),Array.isArray(S))for(let lt=0,ht=S.length;lt<ht;lt+=1)it(S[lt],H,V);else{const lt=Object.keys(S);for(let ht=0,J=lt.length;ht<J;ht+=1)it(S[lt[ht]],H,V)}}}p(it,"inspectNode");function Z(S,H){H=H||{};const V=new ot(H);V.noRefs||Q(S,V);let nt=S;return V.replacer&&(nt=V.replacer.call({"":nt},"",nt)),z(V,0,nt,!0,!0)?V.dump+`
|
|
161
|
+
`:""}return p(Z,"dump2"),un.dump=Z,un}p(Mf,"requireDumper");var Uc;function Of(){if(Uc)return _e;Uc=1;const e=Ef(),t=Mf();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),_e.Type=Ae(),_e.Schema=_l(),_e.FAILSAFE_SCHEMA=Al(),_e.JSON_SCHEMA=$l(),_e.CORE_SCHEMA=Dl(),_e.DEFAULT_SCHEMA=oo(),_e.load=e.load,_e.loadAll=e.loadAll,_e.dump=t.dump,_e.YAMLException=Qi(),_e.types={binary:Rl(),float:Ol(),map:Ll(),null:Fl(),pairs:Nl(),set:Wl(),timestamp:Il(),bool:El(),int:Ml(),merge:Pl(),omap:ql(),seq:vl(),str:Bl()},_e.safeLoad=r("safeLoad","load"),_e.safeLoadAll=r("safeLoadAll","loadAll"),_e.safeDump=r("safeDump","dump"),_e}p(Of,"requireJsYaml");var C1=Of(),x1=Af(C1),{Type:PA,Schema:RA,FAILSAFE_SCHEMA:qA,JSON_SCHEMA:b1,CORE_SCHEMA:NA,DEFAULT_SCHEMA:WA,load:k1,loadAll:zA,dump:HA,YAMLException:YA,types:UA,safeLoad:jA,safeLoadAll:GA,safeDump:XA}=x1,S1=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:a,gradientStop:n}=i??{},o=e.attr("id"),l=r!=null&&r.includes("dark")?"#FFFFFF":"#000000",h=p((u,d,f)=>e.append("defs").append("filter").attr("id",u).attr("height",d).attr("width",d).append("feDropShadow").attr("dx",f).attr("dy",f).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",l),"dropShadow");if(h(`${o}-drop-shadow`,"130%","4"),h(`${o}-drop-shadow-small`,"150%","2"),!s)return;const c=e.append("linearGradient").attr("id",`${o}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),w1=p(e=>{const{handDrawnSeed:t}=Nt();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),T1=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Xr=p(e=>{const t=_1([...e.cssCompiledStyles||[],...e.cssStyles||[],...T1(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),_1=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),$f=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),yt=p(e=>{const{stylesArray:t}=Xr(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];$f(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),mt=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Nt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Xr(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||s,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:B1(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),B1=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),v1=new Set(["redux-color","redux-dark-color"]),L1=12,A1=64,zl=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),F1=p((e,t)=>e!=null&&v1.has(e)&&zl(t),"isColorTheme"),E1=/^[\w-]+$/,VA=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return E1.test(t)?t:"classic"},"safeLook"),Df=p(e=>zl(e)?e.length:0,"paletteSlotCount"),ZA=p((e,t)=>zl(t)?Df(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=A1?e:L1,"colorSlotCount"),Ze=p((e,t,r,i)=>{if(t===void 0||!F1(r,i))return;const s=t%Df(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");const M1=Object.freeze({left:0,top:0,width:16,height:16}),Na=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),If=Object.freeze({...M1,...Na}),O1=Object.freeze({...If,body:"",hidden:!1}),$1=Object.freeze({width:null,height:null}),D1=Object.freeze({...$1,...Na}),I1=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:o};return dn(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return dn(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return dn(o,r)?o:null}return null},dn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function P1(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 jc(e,t){const r=P1(e,t);for(const i in O1)i in Na?i in e&&!(i in r)&&(r[i]=Na[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function R1(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,l=o&&a(o);l&&(s[n]=[o].concat(l))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Gc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=jc(i[o]||s[o],a)}return n(t),r.forEach(n),jc(e,a)}function q1(e,t){if(e.icons[t])return Gc(e,t,[]);const r=R1(e,[t])[t];return r?Gc(e,t,r):null}const N1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,W1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Xc(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(N1);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=W1.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function z1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function H1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Y1(e,t,r){const i=z1(e);return H1(i.defs,t+i.content+r)}const U1=e=>e==="unset"||e==="undefined"||e==="none";function j1(e,t){const r={...If,...e},i={...D1,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):b&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=s.height/2+s.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")")}k%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),x.length&&(a=Y1(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=s.width,h=s.height;let c,u;n===null?(u=o===null?"1em":o==="auto"?h:o,c=Xc(u,l/h)):(c=n==="auto"?l:n,u=o===null?Xc(c,h/l):o==="auto"?h:o);const d={},f=(y,x)=>{U1(x)||(d[y]=x.toString())};f("width",c),f("height",u);const g=[s.left,s.top,l,h];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const G1=/\sid="(\S+)"/g,Vc=new Map;function X1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Vc.get(e)||0;return Vc.set(e,t+1),t?`${e}${t}`:e}function V1(e){const t=[];let r;for(;r=G1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=X1(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Z1(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>"}var K1={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},Wa=new Map,Hl=new Map,Pf=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(at.debug("Registering icon pack:",t.name),"loader"in t)Hl.set(t.name,t.loader);else if("icons"in t)Wa.set(t.name,t.icons);else throw at.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Q1=p(e=>Wa.has(e)||Hl.has(e),"isIconPackRegistered"),Rf=p(async(e,t)=>{const r=I1(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Wa.get(i);if(!s){const n=Hl.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},Wa.set(i,s)}catch(o){throw at.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=q1(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),qf=p(async e=>{try{return await Rf(e),!0}catch{return!1}},"isIconAvailable"),li=p(async(e,t,r)=>{let i;try{i=await Rf(e,t==null?void 0:t.fallbackPrefix)}catch(n){at.error(n),i=K1}const s=j1(i,t),a=Z1(V1(s.body),{...s.attributes,...r});return Ge(a,ee())},"getIconSVG"),oa={},fe={},Zc;function J1(){return Zc||(Zc=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.BLANK_URL=fe.relativeFirstCharacters=fe.whitespaceEscapeCharsRegex=fe.urlSchemeRegex=fe.ctrlCharactersRegex=fe.htmlCtrlEntityRegex=fe.htmlEntitiesRegex=fe.invalidProtocolRegex=void 0,fe.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,fe.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,fe.htmlCtrlEntityRegex=/&(newline|tab);/gi,fe.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,fe.urlSchemeRegex=/^.+(:|:)/gim,fe.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,fe.relativeFirstCharacters=[".","/"],fe.BLANK_URL="about:blank"),fe}var Kc;function t2(){if(Kc)return oa;Kc=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.sanitizeUrl=a;var e=J1();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,l=s(n.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),u=c.match(e.urlSchemeRegex);if(!u)return h;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=c.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return oa}var e2=t2();function fn(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){var t;const i=e[Symbol.toStringTag];return i==null||!(!((t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))===null||t===void 0)&&t.writable)?!1:e.toString()===`[object ${i}]`}let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function r2(e){return Number.isSafeInteger(e)&&e>=0}function Nf(e){return e!=null&&typeof e!="function"&&r2(e.length)}function i2(e){return e==="__proto__"}const s2=Object.prototype.hasOwnProperty;function Qc(e,t){return s2.call(e,t)}function Yl(e){return e==null||typeof e!="object"&&typeof e!="function"}function Wf(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const a2="[object RegExp]",zf="[object String]",Hf="[object Number]",Yf="[object Boolean]",Uf="[object Arguments]",o2="[object Symbol]",n2="[object Date]",l2="[object Map]",h2="[object Set]",c2="[object Array]",u2="[object ArrayBuffer]",d2="[object Object]",f2="[object DataView]",p2="[object Uint8Array]",g2="[object Uint8ClampedArray]",m2="[object Uint16Array]",y2="[object Uint32Array]",C2="[object Int8Array]",x2="[object Int16Array]",b2="[object Int32Array]",k2="[object Float32Array]",S2="[object Float64Array]",Jc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Ul(e){return typeof Jc.Buffer<"u"&&Jc.Buffer.isBuffer(e)}function w2(e){return Ul(e)}function jf(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Es(e){return jf(e)}function Gf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function T2(e,t){return _i(e,void 0,e,new Map)}function _i(e,t,r,i,s){if(Yl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const n=new Array(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=_i(e[o],o,r,i);return Qc(e,"index")&&(n.index=e.index),Qc(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;return i.set(e,n),e.forEach((o,l)=>{n.set(l,_i(o,l,r,i))}),n}if(e instanceof Set){const n=new Set;return i.set(e,n),e.forEach(o=>{n.add(_i(o,void 0,r,i))}),n}if(w2(e))return e.subarray();if(Es(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=_i(e[o],o,r,i);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,n),pi(n,e,r,i),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return i.set(e,n),pi(n,e,r,i),n}if(typeof Blob<"u"&&e instanceof Blob){const n=new Blob([e],{type:e.type});return i.set(e,n),pi(n,e,r,i),n}const a=Wf(e);if(a==="[object Error]")return e===r?{}:e;switch(a){case Hf:case zf:case Yf:{const n=new e.constructor(e.valueOf());return i.set(e,n),pi(n,e,r,i),n}case Uf:{const n={};return i.set(e,n),pi(n,e,r,i),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}}if(typeof e=="object"&&_2(a)){const n=a==="[object Object]"&&typeof e.constructor!="function"?{}:Object.create(Object.getPrototypeOf(e));return i.set(e,n),pi(n,e,r,i),n}return e}function pi(e,t,r,i,s){const a=[...Object.keys(t),...Gf(t)];for(let n=0;n<a.length;n++){const o=a[n],l=Object.getOwnPropertyDescriptor(e,o);(l==null||l.writable)&&(e[o]=_i(t[o],o,r,i))}}function _2(e){switch(e){case Uf:case c2:case u2:case f2:case Yf:case n2:case k2:case S2:case C2:case x2:case b2:case l2:case Hf:case d2:case a2:case h2:case zf:case o2:case p2:case g2:case m2:case y2:return!0;default:return!1}}function tu(e){return T2(e)}function Nn(e){return e!==null&&typeof e=="object"&&Wf(e)==="[object Arguments]"}function Wn(e){return typeof e=="object"&&e!==null}function B2(e){return Wn(e)&&Nf(e)}function v2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Ws(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(Ws.Cache||Map),r}Ws.Cache=Map;function L2(e){if(Yl(e))return e;if(Array.isArray(e)||jf(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 typeof AggregateError<"u"&&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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function A2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const n=r[a];s=wa(s,n,i,new Map)}return s}function wa(e,t,r,i){if(Yl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return L2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...Gf(t)];for(let a=0;a<s.length;a++){const n=s[a];if(i2(n))continue;let o=t[n],l=e[n];if(Nn(o)&&(o=Object.assign({},o)),Nn(l)&&(l=Object.assign({},l)),Ul(o)&&(o=tu(o)),Array.isArray(o))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let d=0;d<u.length;d++){const f=u[d];c[f]=l[f]}l=c}else if(B2(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Wn(l)&&Wn(o)&&(fn(l)||fn(o)||Es(l)||Es(o))?e[n]=wa(l,o,r,i):l==null&&fn(o)?e[n]=wa({},o,r,i):l==null&&Es(o)?e[n]=tu(o):(l===void 0||o!==void 0)&&(e[n]=o)}return e}function F2(){}function E2(e,...t){return A2(e,...t,F2)}function eu(e){if(e==null)return!0;if(Nf(e))return typeof e.splice!="function"&&typeof e!="string"&&!Ul(e)&&!Es(e)&&!Nn(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 v2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var M2="",O2={curveBasis:qn,curveBasisClosed:h1,curveBasisOpen:c1,curveBumpX:hf,curveBumpY:cf,curveBundle:u1,curveCardinalClosed:d1,curveCardinalOpen:f1,curveCardinal:pf,curveCatmullRomClosed:p1,curveCatmullRomOpen:g1,curveCatmullRom:mf,curveLinear:Fs,curveLinearClosed:m1,curveMonotoneX:Sf,curveMonotoneY:wf,curveNatural:_f,curveStep:Bf,curveStepAfter:Lf,curveStepBefore:vf},$2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,D2=p(function(e,t){const r=Xf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Od(n),i=ce(i,[...n])}else i=r.args;if(!i)return;let s=io(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Xf=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${$2.source})(?=[}][%]{2}).*
|
|
162
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),at.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=vs.exec(e))!==null;)if(a.index===vs.lastIndex&&vs.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return at.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),I2=p(function(e){return e.replace(vs,"")},"removeDirectives"),P2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function jl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return O2[r]??t}p(jl,"interpolateToCurve");function Vf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?e2.sanitizeUrl(r):r}p(Vf,"formatUrl");var R2=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){at.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function Gl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Gl,"distance");function Zf(e){let t,r=0;e.forEach(s=>{r+=Gl(s,t),t=s});const i=r/2;return Xl(e,i)}p(Zf,"traverseEdge");function Kf(e){return e.length===1?e[0]:Zf(e)}p(Kf,"calcLabelPosition");var ru=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Xl=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=Gl(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:ru((1-n)*r.x+n*s.x,5),y:ru((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),q2=p((e,t,r)=>{at.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Xl(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function Qf(e,t,r){const i=structuredClone(r);at.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Xl(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}p(Qf,"calcTerminalLabelPosition");function Jf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Jf,"getStylesFromArray");var iu=0,N2=p(()=>(iu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+iu),"generateId");function tp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(tp,"makeRandomHex");var W2=p(e=>tp(e.length),"random"),z2=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),H2=p(function(e,t){const r=t.text.replace(Ns.lineBreakRegex," "),[,i]=no(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),Y2=Ws((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ns.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const l=Er(`${n} `,r),h=Er(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=U2(n,t,"-",r);s.push(a,...d),a=f}else h+l>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),U2=Ws((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,l)=>{const h=`${n}${o}`;if(Er(h,i)>=t){const u=l+1,d=s.length===u,f=`${h}${r}`;a.push(d?h:f),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ep(e,t){return Vl(e,t).height}p(ep,"calculateTextHeight");function Er(e,t){return Vl(e,t).width}p(Er,"calculateTextWidth");var Vl=Ws((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=no(r),n=["sans-serif",i],o=e.split(Ns.lineBreakRegex),l=[],h=qt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of n){let f=0;const g={width:0,height:0,lineHeight:0};for(const y of o){const x=z2();x.text=y||M2;const C=H2(c,x).style("font-size",a).style("font-weight",s).style("font-family",d),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Hi,j2=(Hi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Hi,"InitIDGenerator"),Hi),na,G2=p(function(e){return na=na||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),na.innerHTML=e,unescape(na.textContent)},"entityDecode");function Zl(e){return"str"in e}p(Zl,"isDetailedError");function rp(e){return e instanceof Error?e.message:String(e)}p(rp,"getErrorMessage");var X2=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),no=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Kl(e,t){return E2({},e,t)}p(Kl,"cleanAndMerge");var qe={assignWithDepth:ce,wrapLabel:Y2,calculateTextHeight:ep,calculateTextWidth:Er,calculateTextDimensions:Vl,cleanAndMerge:Kl,detectInit:D2,detectDirective:Xf,isSubstringInArray:P2,interpolateToCurve:jl,calcLabelPosition:Kf,calcCardinalityPosition:q2,calcTerminalLabelPosition:Qf,formatUrl:Vf,getStylesFromArray:Jf,generateId:N2,random:W2,runFunc:R2,entityDecode:G2,insertTitle:X2,isLabelCoordinateInPath:ip,parseFontSize:no,InitIDGenerator:j2},V2=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Yr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),KA=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function de(e){return e??null}p(de,"handleUndefinedAttr");function ip(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(ip,"isLabelCoordinateInPath");function Ql(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hi=Ql();function sp(e){hi=e}var Ms={exec:()=>null};function Ut(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(Me.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var Z2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Me={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")},K2=/^(?:[ \t]*(?:\n|$))+/,Q2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,J2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tS=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jl=/(?:[*+-]|\d{1,9}[.)])/,ap=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,op=Ut(ap).replace(/bull/g,Jl).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(),eS=Ut(ap).replace(/bull/g,Jl).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(),th=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rS=/^[^\n]+/,eh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,iS=Ut(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",eh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sS=Ut(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jl).getRegex(),lo="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",rh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,aS=Ut("^ {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",rh).replace("tag",lo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),np=Ut(th).replace("hr",zs).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",lo).getRegex(),oS=Ut(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",np).getRegex(),ih={blockquote:oS,code:Q2,def:iS,fences:J2,heading:tS,hr:zs,html:aS,lheading:op,list:sS,newline:K2,paragraph:np,table:Ms,text:rS},su=Ut("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zs).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",lo).getRegex(),nS={...ih,lheading:eS,table:su,paragraph:Ut(th).replace("hr",zs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",su).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",lo).getRegex()},lS={...ih,html:Ut(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rh).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:Ms,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ut(th).replace("hr",zs).replace("heading",` *#{1,6} *[^
|
|
163
|
+
]`).replace("lheading",op).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,lp=/^( {2,}|\\)\n(?!\s*$)/,uS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ho=/[\p{P}\p{S}]/u,sh=/[\s\p{P}\p{S}]/u,hp=/[^\s\p{P}\p{S}]/u,dS=Ut(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sh).getRegex(),cp=/(?!~)[\p{P}\p{S}]/u,fS=/(?!~)[\s\p{P}\p{S}]/u,pS=/(?:[^\s\p{P}\p{S}]|~)/u,gS=Ut(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Z2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),up=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mS=Ut(up,"u").replace(/punct/g,ho).getRegex(),yS=Ut(up,"u").replace(/punct/g,cp).getRegex(),dp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",CS=Ut(dp,"gu").replace(/notPunctSpace/g,hp).replace(/punctSpace/g,sh).replace(/punct/g,ho).getRegex(),xS=Ut(dp,"gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,fS).replace(/punct/g,cp).getRegex(),bS=Ut("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hp).replace(/punctSpace/g,sh).replace(/punct/g,ho).getRegex(),kS=Ut(/\\(punct)/,"gu").replace(/punct/g,ho).getRegex(),SS=Ut(/^<(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(),wS=Ut(rh).replace("(?:-->|$)","-->").getRegex(),TS=Ut("^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",wS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),za=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,_S=Ut(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",za).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fp=Ut(/^!?\[(label)\]\[(ref)\]/).replace("label",za).replace("ref",eh).getRegex(),pp=Ut(/^!?\[(ref)\](?:\[\])?/).replace("ref",eh).getRegex(),BS=Ut("reflink|nolink(?!\\()","g").replace("reflink",fp).replace("nolink",pp).getRegex(),au=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ah={_backpedal:Ms,anyPunctuation:kS,autolink:SS,blockSkip:gS,br:lp,code:cS,del:Ms,emStrongLDelim:mS,emStrongRDelimAst:CS,emStrongRDelimUnd:bS,escape:hS,link:_S,nolink:pp,punctuation:dS,reflink:fp,reflinkSearch:BS,tag:TS,text:uS,url:Ms},vS={...ah,link:Ut(/^!?\[(label)\]\((.*?)\)/).replace("label",za).getRegex(),reflink:Ut(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",za).getRegex()},zn={...ah,emStrongRDelimAst:xS,emStrongLDelim:yS,url:Ut(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",au).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:Ut(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",au).getRegex()},LS={...zn,br:Ut(lp).replace("{2,}","*").getRegex(),text:Ut(zn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},la={normal:ih,gfm:nS,pedantic:lS},cs={normal:ah,gfm:zn,breaks:LS,pedantic:vS},AS={"&":"&","<":"<",">":">",'"':""","'":"'"},ou=e=>AS[e];function cr(e,t){if(t){if(Me.escapeTest.test(e))return e.replace(Me.escapeReplace,ou)}else if(Me.escapeTestNoEncode.test(e))return e.replace(Me.escapeReplaceNoEncode,ou);return e}function nu(e){try{e=encodeURI(e).replace(Me.percentDecode,"%")}catch{return null}return e}function lu(e,t){var a;let r=e.replace(Me.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Me.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Me.slashPipe,"|");return i}function us(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function FS(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 hu(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function ES(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
164
|
+
`).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
165
|
+
`)}var Ha=class{constructor(t){Zt(this,"options");Zt(this,"rules");Zt(this,"lexer");this.options=t||hi}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:us(i,`
|
|
166
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=ES(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=us(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:us(r[0],`
|
|
167
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=us(r[0],`
|
|
168
|
+
`).split(`
|
|
169
|
+
`),s="",a="",n=[];for(;i.length>0;){let o=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),o=!0;else if(!o)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
170
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
171
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
172
|
+
${c}`:c,a=a?`${a}
|
|
173
|
+
${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=d,i.length===0)break;let f=n.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let g=f,y=g.raw+`
|
|
174
|
+
`+i.join(`
|
|
175
|
+
`),x=this.blockquote(y);n[n.length-1]=x,s=s.substring(0,s.length-g.raw.length)+x.raw,a=a.substring(0,a.length-g.text.length)+x.text;break}else if((f==null?void 0:f.type)==="list"){let g=f,y=g.raw+`
|
|
176
|
+
`+i.join(`
|
|
177
|
+
`),x=this.list(y);n[n.length-1]=x,s=s.substring(0,s.length-f.raw.length)+x.raw,a=a.substring(0,a.length-g.raw.length)+x.raw,i=y.substring(n.at(-1).raw.length).split(`
|
|
178
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,c="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let d=r[2].split(`
|
|
179
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
180
|
+
`,1)[0],g=!d.trim(),y=0;if(this.options.pedantic?(y=2,u=d.trimStart()):g?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=d.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
181
|
+
`,t=t.substring(f.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),A=this.rules.other.htmlBeginRegex(y);for(;t;){let M=t.split(`
|
|
182
|
+
`,1)[0],L;if(f=M,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),L=f):L=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||B.test(f)||A.test(f)||b.test(f)||k.test(f))break;if(L.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
|
|
183
|
+
`+L.slice(y);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(d)||B.test(d)||k.test(d))break;u+=`
|
|
184
|
+
`+f}!g&&!f.trim()&&(g=!0),c+=M+`
|
|
185
|
+
`,t=t.substring(M.length+1),d=L.slice(y)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(C=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!x,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(d=>d.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=lu(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
186
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of a)n.rows.push(lu(l,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
187
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=us(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=FS(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),hu(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return hu(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){l+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);let u=[...s[0]][0].length,d=t.slice(0,a+s.index+u+o);if(Math.min(a,o)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Qe=class Hn{constructor(t){Zt(this,"tokens");Zt(this,"options");Zt(this,"state");Zt(this,"tokenizer");Zt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hi,this.options.tokenizer=this.options.tokenizer||new Ha,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:Me,block:la.normal,inline:cs.normal};this.options.pedantic?(r.block=la.pedantic,r.inline=cs.pedantic):this.options.gfm&&(r.block=la.gfm,this.options.breaks?r.inline=cs.breaks:r.inline=cs.gfm),this.tokenizer.rules=r}static get rules(){return{block:la,inline:cs}}static lex(t,r){return new Hn(r).lex(t)}static lexInline(t,r){return new Hn(r).inlineTokens(t)}lex(t){t=t.replace(Me.carriageReturn,`
|
|
188
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,n;for(this.options.pedantic&&(t=t.replace(Me.tabCharGlobal," ").replace(Me.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
189
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+o.raw,h.text+=`
|
|
192
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+o.raw,h.text+=`
|
|
195
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+o.raw,h.text+=`
|
|
198
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+o.raw,h.text+=`
|
|
201
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,d;let i=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let f;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(y=>(f=y.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let y=r.at(-1);f.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,i,o)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),r.push(f);continue}let g=t;if((d=this.options.extensions)!=null&&d.startInline){let y=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},x),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(g=t.substring(0,y+1))}if(f=this.tokenizer.inlineText(g)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),n=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=f.raw,y.text+=f.text):r.push(f);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},Ya=class{constructor(t){Zt(this,"options");Zt(this,"parser");this.options=t||hi}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(Me.notSpaceStart))==null?void 0:n[0],a=t.replace(Me.endingNewline,"")+`
|
|
202
|
+
`;return s?'<pre><code class="language-'+cr(s)+'">'+(i?a:cr(a,!0))+`</code></pre>
|
|
203
|
+
`:"<pre><code>"+(i?a:cr(a,!0))+`</code></pre>
|
|
204
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
205
|
+
${this.parser.parse(t)}</blockquote>
|
|
206
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
207
|
+
`}hr(t){return`<hr>
|
|
208
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let l=t.items[o];s+=this.listitem(l)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
|
|
209
|
+
`+s+"</"+a+`>
|
|
210
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+cr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
211
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
212
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
213
|
+
<thead>
|
|
214
|
+
`+r+`</thead>
|
|
215
|
+
`+s+`</table>
|
|
216
|
+
`}tablerow({text:t}){return`<tr>
|
|
217
|
+
${t}</tr>
|
|
218
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
219
|
+
`}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>${cr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=nu(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+cr(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=nu(t);if(a===null)return cr(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${cr(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:cr(t.text)}},oh=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""}},Je=class Yn{constructor(t){Zt(this,"options");Zt(this,"renderer");Zt(this,"textRenderer");this.options=t||hi,this.options.renderer=this.options.renderer||new Ya,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new oh}static parse(t,r){return new Yn(r).parse(t)}static parseInline(t,r){return new Yn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],c+=`
|
|
220
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},ya,ks=(ya=class{constructor(t){Zt(this,"options");Zt(this,"block");this.options=t||hi}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Qe.lex:Qe.lexInline}provideParser(){return this.block?Je.parse:Je.parseInline}},Zt(ya,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zt(ya,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ya),MS=class{constructor(...t){Zt(this,"defaults",Ql());Zt(this,"options",this.setOptions);Zt(this,"parse",this.parseMarkdown(!0));Zt(this,"parseInline",this.parseMarkdown(!1));Zt(this,"Parser",Je);Zt(this,"Renderer",Ya);Zt(this,"TextRenderer",oh);Zt(this,"Lexer",Qe);Zt(this,"Tokenizer",Ha);Zt(this,"Hooks",ks);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let h=o[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Ya(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],h=a[o];a[o]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ha(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],h=a[o];a[o]=(...c)=>{let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ks;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],h=a[o];ks.passThroughHooks.has(n)?a[o]=c=>{if(this.defaults.async&&ks.passThroughHooksRespectAsync.has(n))return(async()=>{let d=await l.call(a,c);return h.call(a,d)})();let u=l.call(a,c);return h.call(a,u)}:a[o]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,c);return d===!1&&(d=await h.apply(a,c)),d})();let u=l.apply(a,c);return u===!1&&(u=h.apply(a,c)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Qe.lex(t,r??this.defaults)}parser(t,r){return Je.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Qe.lex:Qe.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Je.parse:Je.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Qe.lex:Qe.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Je.parse:Je.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
221
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+cr(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ai=new MS;function Vt(e,t){return ai.parse(e,t)}Vt.options=Vt.setOptions=function(e){return ai.setOptions(e),Vt.defaults=ai.defaults,sp(Vt.defaults),Vt};Vt.getDefaults=Ql;Vt.defaults=hi;Vt.use=function(...e){return ai.use(...e),Vt.defaults=ai.defaults,sp(Vt.defaults),Vt};Vt.walkTokens=function(e,t){return ai.walkTokens(e,t)};Vt.parseInline=ai.parseInline;Vt.Parser=Je;Vt.parser=Je.parse;Vt.Renderer=Ya;Vt.TextRenderer=oh;Vt.Lexer=Qe;Vt.lexer=Qe.lex;Vt.Tokenizer=Ha;Vt.Hooks=ks;Vt.parse=Vt;Vt.options;Vt.setOptions;Vt.use;Vt.walkTokens;Vt.parseInline;Je.parse;Qe.lex;function gp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(c){var u,d;return(d=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):o},[]);if(s.length){var a=new RegExp(`
|
|
222
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
|
|
223
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,l){var h=n.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
224
|
+
`)&&(u=String(o).split(`
|
|
225
|
+
`).map(function(d,f){return f===0?d:"".concat(c).concat(d)}).join(`
|
|
226
|
+
`)),n+=u+i[l+1]}),n}var Un=typeof performance<"u"&&typeof performance.now=="function",gi=p(()=>Un?performance.now():0,"now"),pn="🧜 ",OS="Mermaid render",$S="Mermaid",DS={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Yi;Yi=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=gi();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(gi()-i)}}async tick(t,r){if(!this.enabled)return r();const i=gi();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(gi()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:gi(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Un&&typeof performance.mark=="function")try{performance.mark(`${pn}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=gi();if(t.duration=r-t.start,Un&&typeof performance.measure=="function")try{performance.measure(`${pn}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:OS,trackGroup:$S,color:DS[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],n=p((l,h)=>{const c=" ".repeat(h),u=l.duration.toFixed(1).padStart(8),d=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${d} ${c}${l.name}`);for(const f of l.children)n(f,h+1);if(l.children.length>0){const f=l.children.reduce((y,x)=>y+x.duration,0),g=l.duration-f;if(g>.5){const y=g.toFixed(1).padStart(8);a.push(`${y} ${c} (self)`)}}},"walk");n(t,0);const o=Object.keys(this.buckets);if(o.length>0){a.push("—— buckets (summed) ——");for(const l of o)a.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${pn}mermaid render profile · ${s}
|
|
227
|
+
${a.join(`
|
|
228
|
+
`)}`)}},p(Yi,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});function mp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
229
|
+
`).replace(/\n{2,}/g,`
|
|
230
|
+
`);return gp(i)}p(mp,"preprocessMarkdown");function yp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(yp,"nonMarkdownToLines");function Cp(e,t={}){const r=mp(e,t),i=Vt.lexer(r),s=[[]];let a=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
231
|
+
`).forEach((c,u)=>{u!==0&&(a++,s.push([])),c.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&s[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return p(n,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}p(Cp,"markdownToLines");function xp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(xp,"nonMarkdownToHTML");function bp(e,{markdownAutoWrap:t}={}){const r=Vt.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(at.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(bp,"markdownToHTML");var IS=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function i(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(h){for(var c;c=h.shift();)c()},"runTasks"),measure:p(function(h,c){var u=c?h.bind(c):h;return this.reads.push(u),s(this),u},"measure"),mutate:p(function(h,c){var u=c?h.bind(c):h;return this.writes.push(u),s(this),u},"mutate"),clear:p(function(h){return n(this.reads,h)||n(this.writes,h)},"clear"),extend:p(function(h){if(typeof h!="object")throw new Error("expected object");var c=Object.create(this);return o(c,h),c.fastdom=this,c.initialize&&c.initialize(),c},"extend"),catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}p(s,"scheduleFlush");function a(h){var c=h.writes,u=h.reads,d;try{t("flushing reads",u.length),h.runTasks(u),t("flushing writes",c.length),h.runTasks(c)}catch(f){d=f}if(h.scheduled=!1,(u.length||c.length)&&s(h),d)if(t("task errored",d.message),h.catch)h.catch(d);else throw d}p(a,"flush");function n(h,c){var u=h.indexOf(c);return!!~u&&!!h.splice(u,1)}p(n,"remove");function o(h,c){for(var u in c)c.hasOwnProperty(u)&&(h[u]=c[u])}p(o,"mixin");var l=e.fastdom=e.fastdom||new i;return l})(typeof window<"u"?window:globalThis),kp={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return jn(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return jn(this,"measure",e,t)},"measure"),clear:p(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function jn(e,t,r,i){var s=e._tasks,a=e.fastdom,n,o=new Promise(function(l,h){n=a[t](function(){s.delete(o);try{l(i?r.call(i):r())}catch(c){h(c)}},i)});return s.set(o,n),o}p(jn,"create");var{initialize:iF,mutate:sF,measure:aF,clear:oF}=kp,PS=kp,RS=IS.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(PS),oi=RS;function Sp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sp,"splitTextToChars");function wp(e,t){const r=Sp(t.content);return nh(e,[],r,t.type)}p(wp,"splitWordToFitWidth");function nh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?nh(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(nh,"splitWordToFitWidthRecursion");function Tp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ua(e,t)}p(Tp,"splitLineToFitWidth");function Ua(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return Ua(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=wp(t,a);r.push([o]),l.content&&e.unshift(l)}return Ua(e,t,r)}p(Ua,"splitLineToFitWidthRecursion");function Gn(e,t){t&&e.attr("style",t)}p(Gn,"applyStyle");var cu=16384;async function _p(e,t,r,i,s=!1,a=ee(),n=0){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,cu)}px`),o.attr("height",`${Math.min(10*r,cu)}px`);const l=o.append("xhtml:div"),h=Ds(t.label)?await zd(t.label.replace(Ns.lineBreakRegex,`
|
|
233
|
+
`),a):Ge(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(h),Gn(u,t.labelStyle),u.attr("class",`${c} ${i}`),Gn(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&l.attr("class","labelBkg");const d=await oi.measure(()=>l.node().getBoundingClientRect());return d.width===r?(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")):d.width<n&&(l.style("display","table"),l.style("width",n+"px"),l.style("text-align","center")),o.node()}p(_p,"addHtmlSpan");function co(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(co,"createTspan");function Bp(e,t,r){const i=e.append("text"),s=co(i,1,t);uo(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Bp,"computeWidthOfText");function qS(e,t,r){var n;const i=e.append("text"),s=co(i,1,t);uo(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}p(qS,"computeDimensionOfText");function vp(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=p(f=>Bp(n,1.1,f)<=e,"checkWidth"),d=u(c)?[c]:Tp(c,u);for(const f of d){const g=co(l,h,1.1,s);uo(g,f),h++}}if(i){const c=l.node().getBBox(),u=2;return o.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),n.node()}else return l.node()}p(vp,"createFormattedText");function Xn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(Xn,"decodeHTMLEntities");function uo(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(Xn(r.content)):s.text(" "+Xn(r.content))})}p(uo,"updateTextContentAndStyles");async function Lp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await qf(o)?await li(o,void 0,{class:"label-icon"}):`<i class='${Ge(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Lp,"replaceIconSubstring");var We=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:l=200,minWidth:h=0,addSvgBackground:c=!1}={},u)=>{if(at.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",c),a){const d=n?bp(t,u):xp(t),f=await Lp(Yr(d),u),g=t.replace(/\\\\/g,"\\"),y={isNode:o,label:Ds(t)?g:f,labelStyle:r.replace("fill:","color:")};return await _p(e,y,l,s,c,u,h)}else{const d=Yr(t.replace(/<br\s*\/?>/g,"<br/>")),f=n?Cp(d.replace("<br>","<br/>"),u):yp(d),g=vp(l,e,f,t?c:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qt(g).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");qt(g).select("rect").attr("style",y.replace(/background:/g,"fill:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qt(g).select("text").attr("style",x)}return i?qt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):qt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function gn(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-s)*o+i,l[1]=(h-i)*o+(c-s)*n+s}}}function NS(e,t){return e[0]===t[0]&&e[1]===t[1]}function WS(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)gn(h,o,s);const l=(function(h,c,u){const d=[];for(const b of h){const k=[...b];NS(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&d.push(k)}const f=[];c=Math.max(c,.1);const g=[];for(const b of d)for(let k=0;k<b.length-1;k++){const _=b[k],B=b[k+1];if(_[1]!==B[1]){const A=Math.min(_[1],B[1]);g.push({ymin:A,ymax:Math.max(_[1],B[1]),x:A===_[1]?_[0]:B[0],islope:(B[0]-_[0])/(B[1]-_[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return f;let y=[],x=g[0].ymin,C=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>x);k++)b=k;g.splice(0,b+1).forEach((k=>{y.push({s:x,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=x))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||C%c==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const _=y[b].edge,B=y[k].edge;f.push([[Math.round(_.x),x],[Math.round(B.x),x]])}x+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return f})(n,a,i);if(s){for(const h of n)gn(h,o,-s);(function(h,c,u){const d=[];h.forEach((f=>d.push(...f))),gn(d,c,u)})(l,o,-s)}return l}function Hs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),WS(e,s,i,a||1)}class lh{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Hs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function fo(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 zS extends lh{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Hs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)fo([h,c])&&n.push([[h[0]-o,h[1]+l],[...c]],[[h[0]+o,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class HS extends lh{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class YS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Hs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const l=fo(o),h=l/s,c=Math.ceil(h)-1,u=l-c*s,d=(o[0][0]+o[1][0])/2-s/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g<c;g++){const y=f+u+g*s,x=d-n+2*Math.random()*n,C=y-n+2*Math.random()*n,b=this.helper.ellipse(x,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class US{constructor(t){this.helper=t}fillPolygons(t,r){const i=Hs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=fo(n),l=Math.floor(o/(i+s)),h=(o+s-l*(i+s))/2;let c=n[0],u=n[1];c[0]>u[0]&&(c=n[1],u=n[0]);const d=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let f=0;f<l;f++){const g=f*(i+s),y=g+i,x=[c[0]+g*Math.cos(d)+h*Math.cos(d),c[1]+g*Math.sin(d)+h*Math.sin(d)],C=[c[0]+y*Math.cos(d)+h*Math.cos(d),c[1]+y*Math.sin(d)+h*Math.sin(d)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class jS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Hs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=fo(a),o=Math.round(n/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<o;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],x=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)],C=[y[0]+g*Math.cos(c+Math.PI/4),y[1]+g*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Oe={};class GS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const XS=0,mn=1,uu=2,ha={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 yn(e,t){return e.type===t}function hh(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:XS,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:mn,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:uu,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!yn(a,uu);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return hh("M0,0"+e);s++,n=ha[a.text],i=a.text}else yn(a,mn)?n=ha[i]:(s++,n=ha[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let l=s;l<s+n;l++){const h=r[l];if(!yn(h,mn))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof ha[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Ap(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Fp(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],o=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-o),d=s+(s-l)):(u=i,d=s),t.push({key:"C",data:[u,d,...c]}),o=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,d]=c;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=s+(s-l)):(f=i,g=s);const y=i+2*(f-i)/3,x=s+2*(g-s)/3,C=u+2*(f-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[y,x,C,b,u,d]}),o=f,l=g,i=u,s=d;break}case"Q":{const[u,d,f,g]=c,y=i+2*(u-i)/3,x=s+2*(d-s)/3,C=f+2*(u-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[y,x,C,b,f,g]}),o=u,l=d,i=f,s=g;break}case"A":{const u=Math.abs(c[0]),d=Math.abs(c[1]),f=c[2],g=c[3],y=c[4],x=c[5],C=c[6];u===0||d===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(Ep(i,s,x,C,u,d,f,g,y).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function ds(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Ep(e,t,r,i,s,a,n,o,l,h){const c=(u=n,Math.PI*u/180);var u;let d=[],f=0,g=0,y=0,x=0;if(h)[f,g,y,x]=h;else{[e,t]=ds(e,t,-c),[r,i]=ds(r,i,-c);const O=(e-r)/2,F=(t-i)/2;let $=O*O/(s*s)+F*F/(a*a);$>1&&($=Math.sqrt($),s*=$,a*=$);const v=s*s,N=a*a,P=v*N-v*F*F-N*O*O,E=v*F*F+N*O*O,Y=(o===l?-1:1)*Math.sqrt(Math.abs(P/E));y=Y*s*F/a+(e+r)/2,x=Y*-a*O/s+(t+i)/2,f=Math.asin(parseFloat(((t-x)/a).toFixed(9))),g=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let C=g-f;if(Math.abs(C)>120*Math.PI/180){const O=g,F=r,$=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Ep(r=y+s*Math.cos(g),i=x+a*Math.sin(g),F,$,s,a,n,0,l,[g,O,y,x])}C=g-f;const b=Math.cos(f),k=Math.sin(f),_=Math.cos(g),B=Math.sin(g),A=Math.tan(C/4),M=4/3*s*A,L=4/3*a*A,q=[e,t],D=[e+M*k,t-L*b],R=[r+M*B,i-L*_],K=[r,i];if(D[0]=2*q[0]-D[0],D[1]=2*q[1]-D[1],h)return[D,R,K].concat(d);{d=[D,R,K].concat(d);const O=[];for(let F=0;F<d.length;F+=3){const $=ds(d[F][0],d[F][1],c),v=ds(d[F+1][0],d[F+1][1],c),N=ds(d[F+2][0],d[F+2][1],c);O.push([$[0],$[1],v[0],v[1],N[0],N[1]])}return O}}const VS={randOffset:function(e,t){return Dt(e,t)},randOffsetWithRange:function(e,t,r){return ja(e,t,r)},ellipse:function(e,t,r,i,s){const a=Op(r,i,s);return Vn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Ur(e,t,r,i,s,!0)}};function Mp(e,t,r,i,s){return{type:"path",ops:Ur(e,t,r,i,s)}}function Ta(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Ur(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Ur(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Mp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function ZS(e,t,r,i,s){return(function(a,n){return Ta(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function du(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ca(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:ca(r[0],1.5*(1+.22*t.roughness),gu(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=ca(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ca(n,1.5*(1+.22*t.roughness),gu(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Op(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=Dt(n*l,r),o+=Dt(o*l,r),{increment:a,rx:n,ry:o}}function Vn(e,t,r,i){const[s,a]=mu(i.increment,e,t,i.rx,i.ry,1,i.increment*ja(.1,ja(.4,1,r),r),r);let n=Ga(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=mu(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ga(o,null,r);n=n.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function fu(e,t,r,i,s,a,n,o,l){const h=e,c=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Dt(.01*u,l),d+=Dt(.01*d,l);let f=s,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(g-f)/2),C=yu(x,h,c,u,d,f,g,1,l);if(!l.disableMultiStroke){const b=yu(x,h,c,u,d,f,g,1.5,l);C.push(...b)}return n&&(o?C.push(...Ur(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l),...Ur(h,c,h+u*Math.cos(g),c+d*Math.sin(g),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(f),c+d*Math.sin(f)]})),{type:"path",ops:C}}function pu(e,t){const r=Fp(Ap(hh(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...Ur(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,h,c,u,d,f]=o;i.push(...KS(l,h,c,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Ur(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Cn(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Dt(s,t),i[0][1]+Dt(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Dt(s,t),i[n][1]+Dt(s,t)]})}}return{type:"fillPath",ops:r}}function mi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Oe[s])switch(s){case"zigzag":Oe[s]||(Oe[s]=new zS(i));break;case"cross-hatch":Oe[s]||(Oe[s]=new HS(i));break;case"dots":Oe[s]||(Oe[s]=new YS(i));break;case"dashed":Oe[s]||(Oe[s]=new US(i));break;case"zigzag-line":Oe[s]||(Oe[s]=new jS(i));break;default:s="hachure",Oe[s]||(Oe[s]=new lh(i))}return Oe[s]})(t,VS).fillPolygons(e,t)}function gu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function $p(e){return e.randomizer||(e.randomizer=new GS(e.seed||0)),e.randomizer.next()}function ja(e,t,r,i=1){return r.roughness*i*($p(r)*(t-e)+e)}function Dt(e,t,r=1){return ja(-e,e,t,r)}function Ur(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=Zn(e,t,r,i,s,!0,!1);if(n)return o;const l=Zn(e,t,r,i,s,!0,!0);return o.concat(l)}function Zn(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>o&&(c=l/10);const u=c/2,d=.2+.2*$p(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,g=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=Dt(f,s,h),g=Dt(g,s,h);const y=[],x=()=>Dt(u,s,h),C=()=>Dt(c,s,h),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):y.push({op:"move",data:[e+(b?0:Dt(c,s,h)),t+(b?0:Dt(c,s,h))]}),n?y.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),g+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),g+t+2*(i-t)*d+C(),r+(b?0:C()),i+(b?0:C())]}),y}function ca(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Dt(t,r),e[0][1]+Dt(t,r)]),i.push([e[0][0]+Dt(t,r),e[0][1]+Dt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Dt(t,r),e[s][1]+Dt(t,r)]),s===e.length-1&&i.push([e[s][0]+Dt(t,r),e[s][1]+Dt(t,r)]);return Ga(i,null,r)}function Ga(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*e[o+1][0]-n*e[o-1][0])/6,l[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Zn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function mu(e,t,r,i,s,a,n,o){const l=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=Dt(.5,o)-Math.PI/2;h.push([Dt(a,o)+t+.9*i*Math.cos(c-e),Dt(a,o)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let d=c;d<u;d+=e){const f=[Dt(a,o)+t+i*Math.cos(d),Dt(a,o)+r+s*Math.sin(d)];l.push(f),h.push(f)}h.push([Dt(a,o)+t+i*Math.cos(c+2*Math.PI+.5*n),Dt(a,o)+r+s*Math.sin(c+2*Math.PI+.5*n)]),h.push([Dt(a,o)+t+.98*i*Math.cos(c+n),Dt(a,o)+r+.98*s*Math.sin(c+n)]),h.push([Dt(a,o)+t+.9*i*Math.cos(c+.5*n),Dt(a,o)+r+.9*s*Math.sin(c+.5*n)])}return[h,l]}function yu(e,t,r,i,s,a,n,o,l){const h=a+Dt(.1,l),c=[];c.push([Dt(o,l)+t+.9*i*Math.cos(h-e),Dt(o,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)c.push([Dt(o,l)+t+i*Math.cos(u),Dt(o,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),c.push([t+i*Math.cos(n),r+s*Math.sin(n)]),Ga(c,null,l)}function KS(e,t,r,i,s,a,n,o){const l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let c=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(d?0:Dt(h[0],o)),n[1]+(d?0:Dt(h[0],o))]}),c=d?[s,a]:[s+Dt(h[f],o),a+Dt(h[f],o)],l.push({op:"bcurveTo",data:[e+Dt(h[f],o),t+Dt(h[f],o),r+Dt(h[f],o),i+Dt(h[f],o),c[0],c[1]]});return l}function fs(e){return[...e]}function Cu(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(fs(e[0]),fs(e[1]),fs(e[2]),fs(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(fs(s[0]));for(let o=1;o+2<s.length;o++){const l=s[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*s[o+1][0]-n*s[o-1][0])/6,l[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function _a(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function QS(e,t,r){const i=_a(t,r);if(i===0)return _a(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),_a(e,ti(t,r,s))}function ti(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Kn(e,t,r,i){const s=i||[];if((function(o,l){const h=o[l+0],c=o[l+1],u=o[l+2],d=o[l+3];let f=3*c[0]-2*h[0]-d[0];f*=f;let g=3*c[1]-2*h[1]-d[1];g*=g;let y=3*u[0]-2*d[0]-h[0];y*=y;let x=3*u[1]-2*d[1]-h[1];return x*=x,f<y&&(f=y),g<x&&(g=x),f+g})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(_a(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],d=ti(l,h,.5),f=ti(h,c,.5),g=ti(c,u,.5),y=ti(d,f,.5),x=ti(f,g,.5),C=ti(y,x,.5);Kn([l,d,y,C],0,r,s),Kn([C,x,g,u],0,r,s)}var a,n;return s}function JS(e,t){return Xa(e,0,e.length,t)}function Xa(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=QS(e[c],n,o);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(Xa(e,t,h+1,i,a),Xa(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function xn(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Kn(e,3*a,t,i);return r&&r>0?Xa(i,0,i.length,r):i}const Pe="none";class Va{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const n=this._o(a);return this._d("line",[Mp(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],l=ZS(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(Cn([h],n)):o.push(mi([h],n))}return n.stroke!==Pe&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],l=Op(i,s,n),h=Vn(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Vn(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(mi([h.estimatedPoints],n));return n.stroke!==Pe&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ta(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,l){const h=this._o(l),c=[],u=fu(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const d=Object.assign({},h);d.disableMultiStroke=!0;const f=fu(t,r,i,s,a,n,!0,!1,d);f.type="fillPath",c.push(f)}else c.push((function(d,f,g,y,x,C,b){const k=d,_=f;let B=Math.abs(g/2),A=Math.abs(y/2);B+=Dt(.01*B,b),A+=Dt(.01*A,b);let M=x,L=C;for(;M<0;)M+=2*Math.PI,L+=2*Math.PI;L-M>2*Math.PI&&(M=0,L=2*Math.PI);const q=(L-M)/b.curveStepCount,D=[];for(let R=M;R<=L;R+=q)D.push([k+B*Math.cos(R),_+A*Math.sin(R)]);return D.push([k+B*Math.cos(L),_+A*Math.sin(L)]),D.push([k,_]),mi([D],b)})(t,r,i,s,a,n,h));return h.stroke!==Pe&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=du(t,i);if(i.fill&&i.fill!==Pe)if(i.fillStyle==="solid"){const n=du(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const h of l)h.length<3?n.push(...h):h.length===3?n.push(...xn(Cu([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...xn(Cu(h),10,(1+i.roughness)/2))}n.length&&s.push(mi([n],i))}return i.stroke!==Pe&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ta(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Cn([t],i)):s.push(mi([t],i))),i.stroke!==Pe&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Pe,n=i.stroke!==Pe,o=!!(i.simplification&&i.simplification<1),l=(function(c,u,d){const f=Fp(Ap(hh(c))),g=[];let y=[],x=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...xn(C,u)),C=[]},k=()=>{b(),y.length&&(g.push(y),y=[])};for(const{key:B,data:A}of f)switch(B){case"M":k(),x=[A[0],A[1]],y.push(x);break;case"L":b(),y.push([A[0],A[1]]);break;case"C":if(!C.length){const M=y.length?y[y.length-1]:x;C.push([M[0],M[1]])}C.push([A[0],A[1]]),C.push([A[2],A[3]]),C.push([A[4],A[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(k(),!d)return g;const _=[];for(const B of g){const A=JS(B,d);A.length&&_.push(A)}return _})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=pu(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=pu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(Cn(l,i));else s.push(mi(l,i));return n&&(o?l.forEach((c=>{s.push(Ta(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Pe};break;case"fillPath":n={d:this.opsToPath(a),stroke:Pe,strokeWidth:0,fill:i.fill||Pe};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Pe,strokeWidth:i,fill:Pe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class tw{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ua="http://www.w3.org/2000/svg";class ew{constructor(t,r){this.svg=t,this.gen=new Va(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(ua,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=s.createElementNS(ua,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ua,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(ua,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,n,o=!1,l){const h=this.gen.arc(t,r,i,s,a,n,o,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var xt={canvas:(e,t)=>new tw(e,t),svg:(e,t)=>new ew(e,t),generator:e=>new Va(e),newSeed:()=>Va.newSeed()},rw=1,iw=3;async function ch(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!uh(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=Nt().fontSize?Nt().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[l=fl.fontSize]=no(n),h=l*o+"px";i.style.minWidth=h,i.style.maxWidth=h}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(ch,"configureLabelImages");function uh(e){var r;return e.nodeType===iw?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==rw||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(uh)}p(uh,"hasTextBesidesImages");var xu=3,sw=32,aw=p(async(e,t,r)=>{var C,b,k;const i=Nt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",de(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(_=>({text:_,cssClass:"c4-descr"}))].filter(_=>_.text),l=t.width?Math.max(t.width-2*(t.padding??0),sw):((b=Nt().flowchart)==null?void 0:b.wrappingWidth)??200,c=((k=i.c4)==null?void 0:k.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(o.map(async _=>{const B=a.append("g").attr("class",_.cssClass),A=await We(B,Ge(Yr(_.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},i);return qt(A).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),qt(A).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:B,box:B.node().getBBox()}})),d=Math.max(...u.map(({box:_})=>_.width),0);let f=0;for(const{el:_,box:B}of u)_.attr("transform",`translate(${d/2-B.x-B.width/2}, ${f-B.y})`),f+=B.height+xu;const g=u.length>0?f-xu:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-d/2}, ${-g/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),bu=p((e,t)=>{const{x:r,y:i,width:s,height:a}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:a,top:i,left:r,bottom:i+a,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:a}},"withMinWidth"),Tt=p(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{var y,x;if(t.stereotype!==void 0)return aw(e,t,r);let s;const a=t.useHtmlLabels||mr((y=Nt())==null?void 0:y.htmlLabels);r?s=r:s="node default";const n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",de(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const h=!!t.icon||!!t.img,c=t.labelType==="markdown",u=l&&!t.width&&!i?t.minWidth??0:0,d=await We(o,Ge(Yr(l),Nt()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||((x=Nt().flowchart)==null?void 0:x.wrappingWidth),minWidth:u,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:c},Nt()),f=((t==null?void 0:t.padding)??0)/2;let g;if(a){const C=d.children[0],b=qt(d);await ch(C),g=await oi.measure(()=>C.getBoundingClientRect()),g=bu(g,u),b.attr("width",g.width),b.attr("height",g.height)}else g=await oi.measure(()=>d.getBBox()),g=bu(g,u);return a?o.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):o.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:g,halfPadding:f,label:o}},"labelHelper"),ri=p(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??me(Nt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await We(s,Ge(Yr(t),Nt()),{useHtmlLabels:i,width:r.width||((h=(l=Nt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let o;if(me(Nt())){const c=a.children[0],u=qt(a);o=await oi.measure(()=>c.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await oi.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),bt=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),St=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Ht,"createPathFromPoints");function jr(e,t,r,i,s,a){const n=[],l=r-e,h=i-t,c=l/a,u=2*Math.PI/c,d=t+h/2;for(let f=0;f<=50;f++){const g=f/50,y=e+g*l,x=d+s*Math.sin(u*(y-e));n.push({x:y,y:x})}return n}p(jr,"generateFullSineWavePoints");function fr(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*c,f=e+r*Math.cos(d),g=t+r*Math.sin(d);n.push({x:-f,y:-g})}return n}p(fr,"generateCirclePoints");function Qn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),n=p((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}p(Qn,"mergePaths");var Dp=Symbol("lineIntersectionOrigin"),ow=p((e,t)=>({...e,[Dp]:t}),"withLineIntersectionOrigin"),dh=p((e,t)=>(e==null?void 0:e[Dp])??t,"getLineIntersectionOrigin");function Ip(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,l=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&l!==0&&Jn(o,l))return;const c=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=c*e.x+u*e.y+d,g=c*t.x+u*t.y+d;if(Math.abs(f)<h&&Math.abs(g)<h&&Jn(f,g))return;const y=s*u-c*a;if(y===0)return;const x=(a*d-u*n)/y,C=(c*n-s*d)/y;return{x,y:C}}}p(Ip,"intersectLine");function Jn(e,t){return e*t>0}p(Jn,"sameSign");var nw=Ip;function Pp(e,t,r){let i=e.x,s=e.y;const a=dh(r,e);let n=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){o=Math.min(o,u.x),l=Math.min(l,u.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let h=i-e.width/2-o,c=s-e.height/2-l;for(let u=0;u<t.length;u++){let d=t[u],f=t[u<t.length-1?u+1:0],g=nw(a,r,{x:h+d.x,y:c+d.y},{x:h+f.x,y:c+f.y});g&&n.push(g)}return n.length?(n.length>1&&n.sort(function(u,d){let f=u.x-r.x,g=u.y-r.y,y=Math.sqrt(f*f+g*g),x=d.x-r.x,C=d.y-r.y,b=Math.sqrt(x*x+C*C);return y<b?-1:y===b?0:1}),n[0]):e}p(Pp,"intersectPolygon");var Rp=Pp,lw=p((e,t)=>{if(dh(t,e)!==e)return Rp(e,[{x:0,y:0},{x:e.width,y:0},{x:e.width,y:e.height},{x:0,y:e.height}],t);var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,l,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),l=a===0?0:o*s/a,h=o):(s<0&&(n=-n),l=n,h=s===0?0:n*a/s),{x:r+l,y:i+h}},"intersectRect"),Mr=lw;function qp(e,t){return e.intersect(t)}p(qp,"intersectNode");var hw=qp;function Np(e,t,r,i){var s=e.x,a=e.y;const n=dh(i,e);if(n!==e){const d=n.x-s,f=n.y-a,g=i.x-n.x,y=i.y-n.y,x=t*t,C=r*r,b=g*g/x+y*y/C,k=2*d*g/x+2*f*y/C,_=d*d/x+f*f/C-1,B=k*k-4*b*_;if(b>0&&B>=0){const A=Math.sqrt(B),M=[(-k-A)/(2*b),(-k+A)/(2*b)].filter(L=>L>=0&&L<=1).sort((L,q)=>q-L);if(M.length){const L=M[0];return{x:n.x+L*g,y:n.y+L*y}}}}var o=s-i.x,l=a-i.y,h=Math.sqrt(t*t*l*l+r*r*o*o),c=Math.abs(t*r*o/h);i.x<s&&(c=-c);var u=Math.abs(t*r*l/h);return i.y<a&&(u=-u),{x:s+c,y:a+u}}p(Np,"intersectEllipse");var Wp=Np;function zp(e,t,r){return Wp(e,t,t,r)}p(zp,"intersectCircle");var cw=zp,pt={node:hw,circle:cw,ellipse:Wp,polygon:Rp,rect:Mr},ze=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),uw=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=Nt(),o=me(n);return await We(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),Br=uw;function Hp(e,t){const{labelStyles:r}=yt(t);t.labelStyle=r;const i=St(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=xt.svg(a),h=mt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),u=a.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",de(o)),bt(t,u),t.intersect=function(d){return at.info("Circle intersect",t,n,d),pt.circle(t,n,d)},a}p(Hp,"anchor");function tl(e,t,r,i,s,a,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,g=d/a,y=Math.sqrt(f**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*a*Math.sin(c)*(n?-1:1),b=h-x*s*Math.cos(c)*(n?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let B=Math.atan2((i-b)/a,(r-C)/s)-k;n&&B<0&&(B+=2*Math.PI),!n&&B>0&&(B-=2*Math.PI);const A=[];for(let M=0;M<20;M++){const L=M/19,q=k+L*B,D=C+s*Math.cos(q),R=b+a*Math.sin(q);A.push({x:D,y:R})}return A}p(tl,"generateArcPoints");function Yp(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Yp,"calculateArcSagitta");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=p(q=>q+n,"calcTotalHeight"),l=p(q=>{const D=q/2;return[D/(2.5+q/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await Tt(e,t,St(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[d,f]=l(u),g=Yp(u,d,f),x=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+g-g,C=u,{cssStyles:b}=t,k=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...tl(-x/2,-C/2,-x/2,C/2,d,f,!1),{x:x/2,y:C/2},...tl(x/2,C/2,x/2,-C/2,d,f,!0)],_=xt.svg(h),B=mt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const A=Ht(k),M=_.path(A,B),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d/2}, 0)`),bt(t,L),t.intersect=function(q){return pt.polygon(t,k,q)},h}p(Up,"bowTieRect");async function jp(e,t,{config:{themeVariables:r}}){var M;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,c=Math.max(n.width+h*2,t.width??0,80),u=Math.max(Math.min(c*.08,12),5),d=Math.max(n.height+h*2+u,t.height??0),f=-d/2+u,g=d/2,y=c*.72,x=[`M${-c/2},${f}`,`L${-y/2},${g}`,`A${y/2},${u} 0 0 0 ${y/2},${g}`,`L${c/2},${f}`,`A${c/2},${u} 0 0 0 ${-c/2},${f}`,"Z"].join(" "),{cssStyles:C}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const q=xt.svg(a).path(x,mt(t,{}));(M=b.node())==null||M.appendChild(q),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",c/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),bt(t,b);const k=f+(g-f)/2;o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${k-n.height/2-(n.y-(n.top??0))})`);const _=12,B=p((L,q,D)=>Array.from({length:_+1},(R,K)=>{const O=Math.PI-K*Math.PI/_;return{x:L*Math.cos(O),y:q+D*u*Math.sin(O)}}),"arc"),A=[...B(c/2,f,-1),...B(y/2,g,1).reverse()];return t.intersect=function(L){return pt.polygon(t,A,L)},a}p(jp,"bucket");var ku=20,Su=8,dw=80,fw=8;function Gp(e){const{themeVariables:t}=Nt(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:fw,fill:r,stroke:i,cssClass:"collapsed-group"}}}p(Gp,"getCollapsedStyle");async function Xp(e,t){var M;const r=Gp((M=t.metadata)==null?void 0:M.containerType),{fill:i,stroke:s}=r,{nodeStyles:a}=yt(t),{shapeSvg:n,bbox:o}=await Tt(e,t,St(t)),{theme:l,themeVariables:h}=Nt();Ze(n,t.colorIndex,l,h.borderColorArray);const c=t.padding??8,u=o.height,d=Math.max(o.width+c*2,dw,(t==null?void 0:t.width)??0),f=Math.max(u+Su+ku+c*2,(t==null?void 0:t.height)??0),g=-d/2,y=-f/2,x=-28/2,C=n.select(".label");C&&(t.useHtmlLabels??me(Nt())?C.attr("transform",`translate(${-o.width/2}, ${-o.height/2+x})`):C.attr("transform",`translate(0, ${-o.height/2+x})`));let b;if(t.look==="handDrawn"){const L=xt.svg(n),q=mt(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),D=L.path(ze(g,y,d,f,r.rx),q);b=n.insert(()=>D,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",de(t.cssStyles))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",g).attr("y",y).attr("width",d).attr("height",f).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+c+u+Su;n.append("line").attr("class","collapsed-separator").attr("x1",g+8).attr("y1",k).attr("x2",g+d-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const _=k+ku/2,B=2.5,A=10;for(let L=-1;L<=1;L++)n.append("circle").attr("class","collapsed-indicator").attr("cx",L*A).attr("cy",_).attr("r",B).attr("fill",s);return bt(t,b),t.calcIntersect=function(L,q){return pt.rect(L,q)},t.intersect=function(L){return pt.rect(t,L)},n}p(Xp,"collapsedGroup");function yr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(yr,"insertPolygonShape");var pw=["right","left","up","down"],fh="point",gw=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),mw=p(e=>pw.filter(t=>e.has(t)).join("|")||fh,"getDirectionKey"),wu={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[fh]:()=>[{x:0,y:0}]},yw=p((e,t,r,i)=>{const s=gw(e),a=(r.padding??0)/2,n=t.height+4*a,o=n/2,l=i??t.width+2*o+2*a,h=mw(s);return(wu[h]??wu[fh])({height:n,midpoint:o,padding:a,width:l})},"getArrowPoints");async function Vp(e,t){const r=t,{shapeSvg:i,bbox:s}=await Tt(e,r,St(r)),a=r.padding??0,n=s.height+2*a,o=n/2,l=s.width+2*o+a,h=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&h>l?h:l,d=yw(r.directions??[],s,r,u),f=yr(i,u,n,d);return f.attr("style",r.style??null),bt(r,f),r.intersect=function(g){return pt.polygon(r,d,g)},i}p(Vp,"block_arrow");async function Zp(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,c=18,u=12,d=Math.max(n.width+h*2,t.width??0,90),f=Math.max(n.height+h*2+c,t.height??0),g=-f/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const _=xt.svg(a).path(ze(-d/2,g,d,f,u),mt(t,{}));(b=x.node())==null||b.appendChild(_),y&&x.attr("style",y)}else x.append("rect").attr("x",-d/2).attr("y",g).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-d/2).attr("y1",g+c).attr("x2",d/2).attr("y2",g+c).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)x.append("circle").attr("cx",-d/2+12+k*9).attr("cy",g+c/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",g+4).attr("width",Math.max(d-56,10)).attr("height",c-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),bt(t,x);const C=g+c+(f-c)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return pt.rect(t,k)},a}p(Zp,"browser");var da=12;async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+da),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,d=h,f=-c,g=0,y=[{x:u+da,y:f},{x:d,y:f},{x:d,y:g},{x:u,y:g},{x:u,y:f+da},{x:u+da,y:f}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=xt.svg(o),k=mt(t,{}),_=Ht(y),B=b.path(_,k);x=o.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&x.attr("style",C)}else x=yr(o,h,c,y);return i&&x.attr("style",i),bt(t,x),t.intersect=function(b){return pt.polygon(t,y,b)},o}p(Kp,"card");function Qp(e,t){const{nodeStyles:r}=yt(t);t.label="";const i=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=xt.svg(i),l=mt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=Ht(n),c=o.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return pt.polygon(t,n,d)},i}p(Qp,"choice");async function ph(e,t,r){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await Tt(e,t,St(t),{ignoreMinWidth:!0}),l=16,h=(r==null?void 0:r.padding)??o,c=Math.sqrt(n.width**2+n.height**2)/2,u=t.look==="neo"?c+l:c+h;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(a),y=mt(t,{}),x=g.circle(0,0,u*2,y);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",de(f))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0);return bt(t,d),t.calcIntersect=function(g,y){const x=g.width/2;return pt.circle(g,x,y)},t.intersect=function(g){return at.info("Circle intersect",t,u,g),pt.circle(t,u,g)},a}p(ph,"circle");async function Jp(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:n}=await Tt(e,r,i),o=s.insert("rect",":first-child"),l=r.padding??0,h=r.positioned?r.width??0:a.width+l,c=r.positioned?r.height??0:a.height+l,u=r.positioned?-h/2:-a.width/2-n,d=r.positioned?-c/2:-a.height/2-n;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",h).attr("height",c),bt(r,o),r.intersect=function(f){return pt.rect(r,f)},s}p(Jp,"composite");async function tg(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,c=20,u=12,d=Math.max(n.width+h*2,t.width??0,90),f=Math.max(n.height+h*2+c,t.height??0),g=-f/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const _=xt.svg(a).path(ze(-d/2,g,d,f,u),mt(t,{}));(b=x.node())==null||b.appendChild(_),y&&x.attr("style",y)}else x.append("rect").attr("x",-d/2).attr("y",g).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-d/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),bt(t,x);const C=g+c+(f-c)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return pt.rect(t,k)},a}p(tg,"consoleWindow");function eg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
234
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}p(eg,"createLine");function rg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=xt.svg(s),l=mt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,a*2,l),c=eg(a),u=o.path(c,l),d=s.insert(()=>h,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),bt(t,d),t.intersect=function(f){return at.info("crossedCircle intersect",t,{radius:a,point:f}),pt.circle(t,a,f)},s}p(rg,"crossedCircle");function wr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*c,f=e+r*Math.cos(d),g=t+r*Math.sin(d);n.push({x:-f,y:-g})}return n}p(wr,"generateCirclePoints");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+o,c=a.height+l,u=Math.max(5,c*.1),{cssStyles:d}=t,f=[...wr(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...wr(h/2+u*2,-u,u,20,-180,-270),...wr(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...wr(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...wr(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...wr(h/2+h*.1,-u,u,20,-180,-270),...wr(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...wr(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],y=xt.svg(s),x=mt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Ht(f).replace("Z",""),k=y.path(b,x),_=Ht(g),B=y.path(_,{...x}),A=s.insert("g",":first-child");return A.insert(()=>B,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.attr("class","text"),d&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-a.height/2-(a.y-(a.top??0))})`),bt(t,A),t.intersect=function(M){return pt.polygon(t,g,M)},s}p(ig,"curlyBraceLeft");function Tr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*c,f=e+r*Math.cos(d),g=t+r*Math.sin(d);n.push({x:f,y:g})}return n}p(Tr,"generateCirclePoints");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:d}=t,f=[...Tr(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Tr(h/2+u*2,-u,u,20,-180,-270),...Tr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Tr(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...Tr(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...Tr(h/2+u*2,-u,u,20,-180,-270),...Tr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...Tr(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],y=xt.svg(s),x=mt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Ht(f).replace("Z",""),k=y.path(b,x),_=Ht(g),B=y.path(_,{...x}),A=s.insert("g",":first-child");return A.insert(()=>B,":first-child").attr("stroke-opacity",0),A.insert(()=>k,":first-child"),A.attr("class","text"),d&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${-a.height/2-(a.y-(a.top??0))})`),bt(t,A),t.intersect=function(M){return pt.polygon(t,g,M)},s}p(sg,"curlyBraceRight");function Ce(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,c=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*c,f=e+r*Math.cos(d),g=t+r*Math.sin(d);n.push({x:-f,y:-g})}return n}p(Ce,"generateCirclePoints");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),c=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:d}=t,f=[...Ce(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Ce(h/2+u*2,-u,u,20,-180,-270),...Ce(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Ce(h/2,c/2,u,20,0,90)],g=[...Ce(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Ce(-h/2-u/2,-u,u,20,0,90),...Ce(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Ce(-h/2+u+u/2,c/2,u,30,-180,-270)],y=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Ce(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Ce(h/2+u*2,-u,u,20,-180,-270),...Ce(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Ce(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Ce(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Ce(-h/2-u/2,-u,u,20,0,90),...Ce(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Ce(-h/2+u+u/2,c/2,u,30,-180,-270)],x=xt.svg(s),C=mt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Ht(f).replace("Z",""),_=x.path(k,C),A=Ht(g).replace("Z",""),M=x.path(A,C),L=Ht(y),q=x.path(L,{...C}),D=s.insert("g",":first-child");return D.insert(()=>q,":first-child").attr("stroke-opacity",0),D.insert(()=>_,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${-a.height/2-(a.y-(a.top??0))})`),bt(t,D),t.intersect=function(R){return pt.polygon(t,y,R)},s}p(ag,"curlyBraces");async function og(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,l=5,{shapeSvg:h,bbox:c}=await Tt(e,t,St(t)),u=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),d=u/2,f=d-Math.sqrt(Math.max(0,d**2-(c.height/2)**2)),g=Math.max(u/4,f),y=Math.max(o,c.width+a*2+g*2,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),{cssStyles:x}=t,C=xt.svg(h),b=mt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,_=u,B=k-d,A=_/4,M=[{x:B,y:0},{x:A,y:0},{x:0,y:_/2},{x:A,y:_},{x:B,y:_},...fr(-B,-_/2,d,50,270,90)],L=Ht(M),q=C.path(L,b),D=h.insert(()=>q,":first-child");return D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",i),D.attr("transform",`translate(${-y/2}, ${-u/2})`),bt(t,D),t.intersect=function(R){return pt.polygon(t,M,R)},h}p(og,"curvedTrapezoid");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??20,l=Math.max(a.width+o*2,t.width??0,100),h=Math.min(Math.max(l*.23,16),56),c=h*.27,u=Math.max(a.height+o*2,t.height?t.height-(2*h-c):0),d=Math.min(l*.177,u*.45),f=u+2*h-c,g=-f/2,y=g+2*h-c,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const L=xt.svg(s),q=mt(t,{}),D=L.path(ze(-l/2,y,l,u,d),q),R=L.circle(0,g+h,h*2,q);x.insert(()=>R,":first-child"),x.insert(()=>D,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),x.append("circle").attr("cx",0).attr("cy",g+h).attr("r",h).attr("style",i);bt(t,x);const b=y+u/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const k=g+h,_=Math.asin(Math.min(1,(y-k)/h))*180/Math.PI,M=[...fr(0,-k,h,24,180+_,-_),...fr(-(-l/2+d),-(y+d),d,12,90,0),...fr(-(-l/2+d),-(f/2-d),d,12,360,270),...fr(-(l/2-d),-(f/2-d),d,12,270,180),...fr(-(l/2-d),-(y+d),d,12,180,90)];return t.intersect=function(L){return pt.polygon(t,M,L)},s}p(ng,"person");var Cw=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),xw=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),bw=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tu=8,_u=8;async function lg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s,o=t.width??0;if(t.width&&(t.width=t.width-n,t.width<_u&&(t.width=_u)),t.height){const b=o/2/(2.5+o/50);t.height=t.height-a-b*3,t.height<Tu&&(t.height=Tu)}const{shapeSvg:l,bbox:h,label:c}=await Tt(e,t,St(t)),u=Math.max(t.width??0,h.width)+n,d=u/2,f=d/(2.5+u/50),g=Math.max(t.height??0,h.height)+a+f;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=xt.svg(l),b=xw(0,0,u,g,d,f),k=bw(0,f,u,g,d,f),_=mt(t,{}),B=C.path(b,_),A=C.path(k,mt(t,{fill:"none"}));y=l.insert(()=>A,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Cw(0,0,u,g,d,f);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",de(x)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(g/2+f)})`),bt(t,y),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(C){const b=pt.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-f)){let _=f*f*(1-k*k/(d*d));_>0&&(_=Math.sqrt(_)),_=f-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},l}p(lg,"cylinder");async function Ji(e,t,r){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await Tt(e,t,St(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,c=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=xt.svg(a),x=mt(t,{}),C=d||f?y.path(ze(h,c,o,l,d||0),x):y.rectangle(h,c,o,l,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",de(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",de(d)).attr("ry",de(f)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return bt(t,u,t.look==="handDrawn"?void 0:{width:o,height:l}),t.calcIntersect=function(y,x){return pt.rect(y,x)},t.intersect=function(y){return pt.rect(t,y)},a}p(Ji,"drawRect");async function hg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Ji(e,t,l);if(t.look==="handDrawn"){const f=xt.svg(h),g=mt(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return h;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return h;return h.insert(()=>f.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),h.insert(()=>f.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),y.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||n)??0,d=(Number(c.attr("height"))||o)??0;return u>0&&d>0&&c.attr("stroke-dasharray",`${u} ${d}`),h}p(hg,"datastore");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=o.width+s,c=o.height+a,u=c*.2,d=-h/2,f=-c/2-u/2,{cssStyles:g}=t,y=xt.svg(n),x=mt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],b=y.polygon(C.map(_=>[_.x,_.y]),x),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${f+u+(t.padding??0)/2-(o.y-(o.top??0))})`),bt(t,k),t.intersect=function(_){return pt.rect(t,_)},n}p(cg,"dividedRectangle");async function ug(e,t){var g,y;const{labelStyles:r,nodeStyles:i}=yt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t),{ignoreMinWidth:!0}),h=Math.sqrt(l.width**2+l.height**2)/2,c=(t!=null&&t.width?(t==null?void 0:t.width)/2:h)+(n??0),u=c+s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const x=xt.svg(o),C=mt(t,{roughness:.2,strokeWidth:2.5}),b=mt(t,{roughness:.2,strokeWidth:1.5}),k=x.circle(0,0,u*2,C),_=x.circle(0,0,c*2,b);d=o.insert("g",":first-child"),d.attr("class",de(t.cssClasses)).attr("style",de(f)),(g=d.node())==null||g.appendChild(k),(y=d.node())==null||y.appendChild(_)}else{d=o.insert("g",":first-child");const x=d.insert("circle",":first-child"),C=d.insert("circle");d.attr("class","basic label-container").attr("style",i),x.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return bt(t,d),t.intersect=function(x){return at.info("DoubleCircle intersect",t,u,x),pt.circle(t,u,x)},o}p(ug,"doublecircle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n}=await Tt(e,t,St(t)),{theme:o,themeVariables:l}=Nt();Ze(s,t.colorIndex,o,l.borderColorArray);const h=n??10,c=a.width/2+h*2,u=a.height/2+h*2;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(s),y=mt(t,{}),x=g.ellipse(0,0,c*2,u*2,y);d=s.insert(()=>x,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else d=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",c).attr("ry",u).attr("cx",0).attr("cy",0);return t.width=c*2,t.height=u*2,bt(t,d),t.calcIntersect=function(g,y){const x=g.width/2,C=g.height/2;return pt.ellipse(g,x,C,y)},t.intersect=function(g){return pt.ellipse(t,c,u,g)},s}p(dg,"usecaseEllipse");function fg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=yt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=xt.svg(a),{nodeBorder:h}=r,c=mt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,n*2,c),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),bt(t,d),t.intersect=function(f){return at.info("filledCircle intersect",t,{radius:n,point:f}),pt.circle(t,n,f)},a}p(fg,"filledCircle");var Bu=10,vu=10;async function pg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Bu&&(t.height=Bu),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<vu&&(t.width=vu));const{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+o.height,u=c,d=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:f}=t,g=xt.svg(n),y=mt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Ht(d),C=g.path(x,y),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,bt(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return at.info("Triangle intersect",t,d,k),pt.polygon(t,d,k)},n}p(pg,"flippedTriangle");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??12,l=Math.max(a.width+o*2,t.width??0,90),h=a.height+o*2,c=Math.max(Math.min(h*.16,14),8),u=Math.max(h+c,t.height??0),d=u-c,f=Math.max(l*.38,28),g=-u/2,y=[{x:-l/2,y:g},{x:-l/2+f,y:g},{x:-l/2+f,y:g+c},{x:l/2,y:g+c},{x:l/2,y:u/2},{x:-l/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(_=>`L${_.x},${_.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const B=xt.svg(s).path(x,mt(t,{}));b=s.insert(()=>B,":first-child").attr("class","basic label-container"),C&&b.attr("style",C)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?bt(t,b):bt(t,b,{width:l,height:u});const k=g+c+d/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(_){return pt.polygon(t,y,_)},s}p(gg,"folder");function mg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=yt(t);t.label="";const n=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);(r==="LR"||r==="RL")&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,d=xt.svg(n),f=mt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(c,u,l,h,f),y=n.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),bt(t,y);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return pt.rect(t,C)},n}p(mg,"forkJoin");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await Tt(e,t,St(t)),c=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,u=c/2,d=u-Math.sqrt(Math.max(0,u**2-(h.height/2)**2)),f=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width)+d*2)+n*2,{cssStyles:g}=t,y=xt.svg(l),x=mt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-f/2,y:-c/2},{x:f/2-u,y:-c/2},...fr(-f/2+u,0,u,50,90,270),{x:f/2-u,y:c/2},{x:-f/2,y:c/2}],b=Ht(C),k=y.path(b,x),_=l.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),bt(t,_),t.intersect=function(B){return at.info("Pill intersect",t,{radius:u,point:B}),pt.polygon(t,C,B)},l}p(yg,"halfRoundedRectangle");var kw=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,l=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await Tt(e,t,St(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,f=d/s,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+h,y=[{x:f,y:0},{x:g-f,y:0},{x:g,y:-d/2},{x:g-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=xt.svg(c),k=mt(t,{}),_=kw(0,0,g,d,f),B=b.path(_,k);x=c.insert(()=>B,":first-child").attr("transform",`translate(${-g/2}, ${d/2})`),C&&x.attr("style",C)}else x=yr(c,g,d,y);return i&&x.attr("style",i),t.width=g,t.height=d,bt(t,x),t.intersect=function(b){return pt.polygon(t,y,b)},c}p(Cg,"hexagon");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Tt(e,t,St(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=xt.svg(s),h=mt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],u=Ht(c),d=l.path(u,h),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-n/2})`),bt(t,f),t.intersect=function(g){return at.info("Pill intersect",t,{points:c}),pt.polygon(t,c,g)},s}p(xg,"hourglass");async function bg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await Tt(e,t,"icon-shape default"),d=t.pos==="t",f=o,g=o,{nodeBorder:y}=r,{stylesMap:x}=Xr(t),C=-g/2,b=-f/2,k=t.label?8:0,_=xt.svg(h),B=mt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const A=_.rectangle(C,b,g,f,B),M=Math.max(g,c.width),L=f+c.height+k,q=_.rectangle(-M/2,-L/2,M,L,{...B,fill:"transparent",stroke:"none"}),D=h.insert(()=>A,":first-child"),R=h.insert(()=>q);if(t.icon){const K=h.append("g");K.html(`<g>${await li(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const O=K.node().getBBox(),F=O.width,$=O.height,v=O.x,N=O.y;K.attr("transform",`translate(${-F/2-v},${d?c.height/2+k/2-$/2-N:-c.height/2-k/2-$/2-N})`),K.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-L/2:L/2-c.height})`),D.attr("transform",`translate(0,${d?c.height/2+k/2:-c.height/2-k/2})`),bt(t,R),t.intersect=function(K){if(at.info("iconSquare intersect",t,K),!t.label)return pt.rect(t,K);const O=t.x??0,F=t.y??0,$=t.height??0;let v=[];return d?v=[{x:O-c.width/2,y:F-$/2},{x:O+c.width/2,y:F-$/2},{x:O+c.width/2,y:F-$/2+c.height+k},{x:O+g/2,y:F-$/2+c.height+k},{x:O+g/2,y:F+$/2},{x:O-g/2,y:F+$/2},{x:O-g/2,y:F-$/2+c.height+k},{x:O-c.width/2,y:F-$/2+c.height+k}]:v=[{x:O-g/2,y:F-$/2},{x:O+g/2,y:F-$/2},{x:O+g/2,y:F-$/2+f},{x:O+c.width/2,y:F-$/2+f},{x:O+c.width/2/2,y:F+$/2},{x:O-c.width/2,y:F+$/2},{x:O-c.width/2,y:F-$/2+f},{x:O-g/2,y:F-$/2+f}],pt.polygon(t,v,K)},h}p(bg,"icon");async function kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await Tt(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Xr(t),b=xt.svg(h),k=mt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=C.get("fill");k.stroke=_??x;const B=h.append("g");t.icon&&B.html(`<g>${await li(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const A=B.node().getBBox(),M=A.width,L=A.height,q=A.x,D=A.y,R=Math.max(M,L)*Math.SQRT2+d*2,K=b.circle(0,0,R,k),O=Math.max(R,c.width),F=R+c.height+f,$=b.rectangle(-O/2,-F/2,O,F,{...k,fill:"transparent",stroke:"none"}),v=h.insert(()=>K,":first-child"),N=h.insert(()=>$);return B.attr("transform",`translate(${-M/2-q},${g?c.height/2+f/2-L/2-D:-c.height/2-f/2-L/2-D})`),B.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-F/2:F/2-c.height})`),v.attr("transform",`translate(0,${g?c.height/2+f/2:-c.height/2-f/2})`),bt(t,N),t.intersect=function(P){return at.info("iconSquare intersect",t,P),pt.rect(t,P)},h}p(kg,"iconCircle");async function Sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:d}=await Tt(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,y=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Xr(t),k=-y/2,_=-g/2,B=t.label?8:0,A=xt.svg(h),M=mt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const q=A.path(ze(k,_,y,g,5),M),D=Math.max(y,c.width),R=g+c.height+B,K=A.rectangle(-D/2,-R/2,D,R,{...M,fill:"transparent",stroke:"none"}),O=h.insert(()=>q,":first-child").attr("class","icon-shape2"),F=h.insert(()=>K);if(t.icon){const $=h.append("g");$.html(`<g>${await li(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=$.node().getBBox(),N=v.width,P=v.height,E=v.x,Y=v.y;$.attr("transform",`translate(${-N/2-E},${f?c.height/2+B/2-P/2-Y:-c.height/2-B/2-P/2-Y})`),$.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-R/2:R/2-c.height})`),O.attr("transform",`translate(0,${f?c.height/2+B/2:-c.height/2-B/2})`),bt(t,F),t.intersect=function($){if(at.info("iconSquare intersect",t,$),!t.label)return pt.rect(t,$);const v=t.x??0,N=t.y??0,P=t.height??0;let E=[];return f?E=[{x:v-c.width/2,y:N-P/2},{x:v+c.width/2,y:N-P/2},{x:v+c.width/2,y:N-P/2+c.height+B},{x:v+y/2,y:N-P/2+c.height+B},{x:v+y/2,y:N+P/2},{x:v-y/2,y:N+P/2},{x:v-y/2,y:N-P/2+c.height+B},{x:v-c.width/2,y:N-P/2+c.height+B}]:E=[{x:v-y/2,y:N-P/2},{x:v+y/2,y:N-P/2},{x:v+y/2,y:N-P/2+g},{x:v+c.width/2,y:N-P/2+g},{x:v+c.width/2/2,y:N+P/2},{x:v-c.width/2,y:N+P/2},{x:v-c.width/2,y:N-P/2+g},{x:v-y/2,y:N-P/2+g}],pt.polygon(t,E,$)},h}p(Sg,"iconRounded");async function wg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:d}=await Tt(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,y=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Xr(t),k=-y/2,_=-g/2,B=t.label?8:0,A=xt.svg(h),M=mt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const q=A.path(ze(k,_,y,g,.1),M),D=Math.max(y,c.width),R=g+c.height+B,K=A.rectangle(-D/2,-R/2,D,R,{...M,fill:"transparent",stroke:"none"}),O=h.insert(()=>q,":first-child"),F=h.insert(()=>K);if(t.icon){const $=h.append("g");$.html(`<g>${await li(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=$.node().getBBox(),N=v.width,P=v.height,E=v.x,Y=v.y;$.attr("transform",`translate(${-N/2-E},${f?c.height/2+B/2-P/2-Y:-c.height/2-B/2-P/2-Y})`),$.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-R/2:R/2-c.height})`),O.attr("transform",`translate(0,${f?c.height/2+B/2:-c.height/2-B/2})`),bt(t,F),t.intersect=function($){if(at.info("iconSquare intersect",t,$),!t.label)return pt.rect(t,$);const v=t.x??0,N=t.y??0,P=t.height??0;let E=[];return f?E=[{x:v-c.width/2,y:N-P/2},{x:v+c.width/2,y:N-P/2},{x:v+c.width/2,y:N-P/2+c.height+B},{x:v+y/2,y:N-P/2+c.height+B},{x:v+y/2,y:N+P/2},{x:v-y/2,y:N+P/2},{x:v-y/2,y:N-P/2+c.height+B},{x:v-c.width/2,y:N-P/2+c.height+B}]:E=[{x:v-y/2,y:N-P/2},{x:v+y/2,y:N-P/2},{x:v+y/2,y:N-P/2+g},{x:v+c.width/2,y:N-P/2+g},{x:v+c.width/2/2,y:N+P/2},{x:v-c.width/2,y:N+P/2},{x:v-c.width/2,y:N-P/2+g},{x:v-y/2,y:N-P/2+g}],pt.polygon(t,E,$)},h}p(wg,"iconSquare");async function Tg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=yt(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:d,label:f}=await Tt(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,x=-c/2,C=t.label?8:0,b=xt.svg(u),k=mt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(y,x,h,c,k),B=Math.max(h,d.width),A=c+d.height+C,M=b.rectangle(-B/2,-A/2,B,A,{...k,fill:"none",stroke:"none"}),L=u.insert(()=>_,":first-child"),q=u.insert(()=>M);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${g?A/2-c:-A/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-c/2-d.height/2-C/2:c/2-d.height/2+C/2})`),L.attr("transform",`translate(0,${g?d.height/2+C/2:-d.height/2-C/2})`),bt(t,q),t.intersect=function(D){if(at.info("iconSquare intersect",t,D),!t.label)return pt.rect(t,D);const R=t.x??0,K=t.y??0,O=t.height??0;let F=[];return g?F=[{x:R-d.width/2,y:K-O/2},{x:R+d.width/2,y:K-O/2},{x:R+d.width/2,y:K-O/2+d.height+C},{x:R+h/2,y:K-O/2+d.height+C},{x:R+h/2,y:K+O/2},{x:R-h/2,y:K+O/2},{x:R-h/2,y:K-O/2+d.height+C},{x:R-d.width/2,y:K-O/2+d.height+C}]:F=[{x:R-h/2,y:K-O/2},{x:R+h/2,y:K-O/2},{x:R+h/2,y:K-O/2+c},{x:R+d.width/2,y:K-O/2+c},{x:R+d.width/2/2,y:K+O/2},{x:R-d.width/2,y:K+O/2},{x:R-d.width/2,y:K-O/2+c},{x:R-h/2,y:K-O/2+c}],pt.polygon(t,F,D)},u}p(Tg,"imageSquare");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=Math.max(l.height+a*2,t.height??0),c=Math.max(l.width+n*2,(t.width??0)-h),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(o),y=mt(t,{}),x=Ht(u),C=g.path(x,y);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&d.attr("style",f)}else d=yr(o,c,h,u);return i&&d.attr("style",i),t.width=c,t.height=h,bt(t,d),t.intersect=function(g){return pt.polygon(t,u,g)},o}p(_g,"inv_trapezoid");async function Bg(e,t){const{shapeSvg:r,bbox:i,label:s}=await Tt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),bt(t,a),t.intersect=function(l){return pt.rect(t,l)},r}p(Bg,"labelRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=Math.max(l.height+a,t.height??0),c=Math.max(l.width+n,(t.width??0)-h),u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(o),y=mt(t,{}),x=Ht(u),C=g.path(x,y);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&d.attr("style",f)}else d=yr(o,c,h,u);return i&&d.attr("style",i),t.width=c,t.height=h,bt(t,d),t.intersect=function(g){return pt.polygon(t,u,g)},o}p(vg,"lean_left");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=Math.max(l.height+a,t.height??0),c=Math.max(l.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(o),y=mt(t,{}),x=Ht(u),C=g.path(x,y);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&d.attr("style",f)}else d=yr(o,c,h,u);return i&&d.attr("style",i),t.width=c,t.height=h,bt(t,d),t.intersect=function(g){return pt.polygon(t,u,g)},o}p(Lg,"lean_right");function Ag(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:n,y:0},{x:0,y:o+l/2},{x:n-2*l,y:o+l/2},{x:0,y:2*o},{x:n,y:o-l/2},{x:2*l,y:o-l/2}],c=xt.svg(s),u=mt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Ht(h),f=c.path(d,u),g=s.insert(()=>f,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${n/2},${-o})`),bt(t,g),t.intersect=function(y){return at.info("lightningBolt intersect",t,y),pt.polygon(t,h,y)},s}p(Ag,"lightningBolt");var Sw=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ww=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Tw=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Lu=10,Au=10;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Au&&(t.width=Au);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<Lu&&(t.height=Lu)}const{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=c/2,d=u/(2.5+c/50),f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+d+n*2,g=f*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=xt.svg(o),b=ww(0,0,c,f,u,d,g),k=Tw(0,d,c,f,u,d),_=mt(t,{}),B=C.path(b,_),A=C.path(k,_);o.insert(()=>A,":first-child").attr("class","line"),y=o.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Sw(0,0,c,f,u,d,g);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",de(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-c/2}, ${-(f/2+d)})`),bt(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(C){const b=pt.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let _=d*d*(1-k*k/(u*u));_>0&&(_=Math.sqrt(_)),_=d-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},o}p(Fg,"linedCylinder");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:g}=t,y=xt.svg(o),x=mt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-f/2},{x:-c/2-c/2*.1,y:f/2},...jr(-c/2-c/2*.1,f/2,c/2+c/2*.1,f/2,d,.8),{x:c/2+c/2*.1,y:-f/2},{x:-c/2-c/2*.1,y:-f/2},{x:-c/2,y:-f/2},{x:-c/2,y:f/2*1.1},{x:-c/2,y:-f/2}],b=y.polygon(C.map(_=>[_.x,_.y]),x),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-d-(l.y-(l.top??0))})`),bt(t,k),t.intersect=function(_){return pt.polygon(t,C,_)},o}p(Eg,"linedWaveEdgedRect");var _w=56,bn=72,Fu=8,Eu=2,Bw=8,vw={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Mu=Math.PI/3,Ou=.6,kn=p((e,t)=>{const r=t*Ou,i=t*Math.sqrt(1-Ou**2),s=Math.cos(Mu),a=-Math.sin(Mu),n=r*-a,o=e+r*s,l=i*s,h=i*a;return`M ${n-l} ${o-h} L ${n+l} ${o+h}`},"businessMarkerPathForCircle"),Lw={normal:kn(-24,12),hollow:kn(-23,9),awesome:kn(-21,13),icon:"M 12 -8 L 26 -26"},$u=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),gh=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const o=xt.svg(e).path(r,mt(t,s?{fill:"none"}:{}));return e.insert(()=>o,":first-child").attr("class",i)}const a=e.append("path").attr("class",i).attr("d",r);return s&&a.attr("fill","none"),a},"appendActorPath"),Aw=p((e,t,r,i,s,a,n=!1)=>{if(t.look==="handDrawn"){const h=xt.svg(e).circle(r,i,s*2,mt(t,n?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",a)}const o=e.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",s);return n&&o.attr("fill","none"),o},"appendActorCircle"),Fw=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",Lw[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Ys(e,t,r,i){const{labelStyles:s,nodeStyles:a}=yt(t);t.labelStyle=s;const n=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:o,bbox:l,label:h}=await Tt(e,n,St(t,`usecase-actor-variant usecase-actor-${r}`)),c=t.accessibleName??t.label;c&&o.attr("role","img").attr("aria-label",c),h.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:d}=Nt();Ze(o,t.colorIndex,u,d.borderColorArray);let f,g;if(t.stereotype){const L=await ri(o,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=L.label.attr("class","label usecase-stereotype"),g=L.bbox}const y=o.append("g").attr("class",`usecase-actor-glyph ${vw[r]}`).attr("style",a||null);await i(y,t),Fw(y,t,r);const x=t.padding??Bw,C=(g==null?void 0:g.height)??0,b=bn+Fu+l.height+(g?C+Eu:0),k=Math.max(_w,l.width,(g==null?void 0:g.width)??0)+x*2,_=b+x*2,B=-b/2;y.attr("transform",`translate(0,${B+bn/2})`);let A=B+bn+Fu;f&&g&&(A+=C/2,$u(f,g,A),A+=C/2+Eu),$u(h,l,A+l.height/2);const M=o.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-_/2).attr("width",k).attr("height",_).attr("opacity",0).attr("aria-hidden","true");return bt(t,M),t.intersect=L=>pt.rect(t,L),o}p(Ys,"renderUsecaseActor");var Ew=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Mg(e,t){return Ys(e,t,"normal",(r,i)=>{gh(r,i,Ew,"usecase-actor-stick")})}p(Mg,"usecaseActor");var Mw=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Og(e,t){return Ys(e,t,"awesome",(r,i)=>{gh(r,i,Mw,"usecase-actor-awesome-silhouette")})}p(Og,"usecaseActorAwesome");var Ow=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function $g(e,t){return Ys(e,t,"hollow",(r,i)=>{Aw(r,i,0,-23,9,"usecase-actor-hollow-head",!0),gh(r,i,Ow,"usecase-actor-hollow-body",!0)})}p($g,"usecaseActorHollow");var yi=52,Du=42,Iu=-2,$w=p(async(e,t)=>{var h;const r=-yi/2,i=Iu-yi/2;if(t.look==="handDrawn"){const u=xt.svg(e).rectangle(r,i,yi,yi,mt(t,{}));e.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",yi).attr("height",yi).attr("rx",4).attr("ry",4);const s=t.icon??"",a=await qf(s.includes(":")?s:`fa:${s}`),n=await li(s,{height:Du,width:Du,fallbackPrefix:"fa"}),o=e.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),l=(h=o.node())==null?void 0:h.getBBox();l&&o.attr("transform",`translate(${-l.width/2-l.x},${Iu-l.height/2-l.y})`)},"drawIconActor");async function Dg(e,t){return Ys(e,t,"icon",$w)}p(Dg,"usecaseActorIcon");var Pu=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function Ig(e,t){const r=t,{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const a=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:n,bbox:o,halfPadding:l,label:h}=await Tt(e,a,St(t,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:c,themeVariables:u}=Nt();Ze(n,t.colorIndex,c,u.borderColorArray);let d,f;if(r.stereotype){const O=await ri(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});d=O.label.attr("class","label usecase-stereotype"),f=O.bbox}const g=f?2:0,y=o.height+((f==null?void 0:f.height)??0)+g,x=Math.max(o.width,(f==null?void 0:f.width)??0),C=l??10,b=x/2+C*2,k=y/2+C*2,_=Math.min(Math.max(C/5,1),C/2),B=x/2+_,A=b-_,M=B/b,L=A/b,q=k*Math.sqrt(Math.max(0,1-M*M)),D=-k*Math.sqrt(Math.max(0,1-L*L));d&&f&&Pu(d,f,-y/2+f.height/2),Pu(h,o,y/2-o.height/2);let R;if(t.look==="handDrawn"){const F=xt.svg(n).ellipse(0,0,b*2,k*2,mt(t,{}));R=n.insert(()=>F,":first-child").attr("class","basic label-container usecase-business-ellipse")}else R=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${B} ${q} L ${A} ${D}`).attr("fill","none").attr("style",s||null);const K=r.accessibleName??r.label;return K&&n.attr("role","img").attr("aria-label",K),bt(t,R),t.calcIntersect=(O,F)=>pt.ellipse(O,O.width/2,O.height/2,F),t.intersect=O=>pt.ellipse(t,b,k,O),n}p(Ig,"usecaseBusiness");var Sn=8,Ru=4,Dw=1,wn=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-a})`)},"positionLabel"),Iw=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:Dw},"numericStrokeWidth");async function Pg(e,t){var O;const r=t,{labelStyles:i,nodeStyles:s}=yt(t),{stylesMap:a}=Xr(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t,"usecase-json-table"));n.attr("role","img"),r.accessibleName&&n.attr("aria-label",r.accessibleName),l.attr("class","label usecase-json-title");const h=n.append("g").attr("class","usecase-json-table-grid"),c=[];for(const F of r.jsonRows??[]){const $=await ri(h,F.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),v=await ri(h,F.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:$.label.attr("class","label usecase-json-key"),bbox:$.bbox},value:{label:v.label.attr("class","label usecase-json-value"),bbox:v.bbox}})}const u=Math.max(0,...c.map(({key:F})=>F.bbox.width))+Sn*2,d=Math.max(0,...c.map(({value:F})=>F.bbox.width))+Sn*2,f=o.width+Sn*2,g=Math.max(f,u+d),y=d+Math.max(0,g-u-d),x=o.height+Ru*2,C=c.map(({key:F,value:$})=>Math.max(F.bbox.height,$.bbox.height)+Ru*2),b=x+C.reduce((F,$)=>F+$,0),k=Iw(a.get("stroke-width")),_=g+k*2,B=b+k*2,A=-g/2,M=-b/2,L=t.look==="handDrawn"?xt.svg(n):void 0,q=L?mt(t,{}):void 0,D=p((F,$,v,N,P,E)=>{if(L&&q){const Y=L.rectangle(v,N,P,E,q);return F.insert(()=>Y,":first-child").attr("class",$)}return F.insert("rect",":first-child").attr("class",$).attr("x",v).attr("y",N).attr("width",P).attr("height",E).attr("style",s)},"insertCell"),R=D(n,"label-container usecase-json-border",-_/2,-B/2,_,B);D(h,"usecase-json-cell usecase-json-title-cell",A,M,g,x),(O=h.node())==null||O.append(l.node()),wn(l,o,0,M+x/2);let K=M+x;return c.forEach(({key:F,value:$},v)=>{var E;const N=C[v],P=h.append("g").attr("class","usecase-json-row").attr("data-row-index",v).attr("transform",`translate(0,${K})`);D(P,"usecase-json-cell usecase-json-key-cell",A,0,u,N),D(P,"usecase-json-cell usecase-json-value-cell",A+u,0,y,N),(E=P.node())==null||E.append(F.label.node(),$.label.node()),wn(F.label,F.bbox,A+u/2,N/2),wn($.label,$.bbox,A+u+y/2,N/2),K+=N}),bt(t,R),t.intersect=F=>pt.rect(t,F),n}p(Pg,"usecaseJsonTable");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:l,bbox:h,label:c}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,f=u-2*o,g=d-2*o,y=-f/2,x=-g/2,{cssStyles:C}=t,b=xt.svg(l),k=mt(t,{}),_=[{x:y-o,y:x+o},{x:y-o,y:x+g+o},{x:y+f-o,y:x+g+o},{x:y+f-o,y:x+g},{x:y+f,y:x+g},{x:y+f,y:x+g-o},{x:y+f+o,y:x+g-o},{x:y+f+o,y:x-o},{x:y+o,y:x-o},{x:y+o,y:x},{x:y,y:x},{x:y,y:x+o}],B=[{x:y,y:x+o},{x:y+f-o,y:x+o},{x:y+f-o,y:x+g},{x:y+f,y:x+g},{x:y+f,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=Ht(_);let M=b.path(A,k);const L=Ht(B);let q=b.path(L,k);t.look!=="handDrawn"&&(M=Qn(M),q=Qn(q));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>q),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),bt(t,D),t.intersect=function(R){return pt.polygon(t,_,R)},l}p(Rg,"multiRect");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??0,l=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,d=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,f=t.look==="neo"?d/4:d/8,g=d+(c?f/2:-f/2),y=-u/2,x=-g/2,C=10,{cssStyles:b}=t,k=jr(y-C,x+g+C,y+u-C,x+g+C,f,.8),_=k==null?void 0:k[k.length-1],B=[{x:y-C,y:x+C},{x:y-C,y:x+g+C},...k,{x:y+u-C,y:_.y-C},{x:y+u,y:_.y-C},{x:y+u,y:_.y-2*C},{x:y+u+C,y:_.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],A=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:_.y-C},{x:y+u,y:_.y-C},{x:y+u,y:x},{x:y,y:x}],M=xt.svg(s),L=mt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const q=Ht(B),D=M.path(q,L),R=Ht(A),K=M.path(R,L),O=s.insert(()=>D,":first-child");return O.insert(()=>K),O.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-f/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-f-(a.y-(a.top??0))})`),bt(t,O),t.intersect=function(F){return pt.polygon(t,B,F)},s}p(qg,"multiWaveEdgedRectangle");async function Ng(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i,t.useHtmlLabels||me(ee())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,d=-c/2,{cssStyles:f}=t,g=xt.svg(n),y=mt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=g.rectangle(u,d,h,c,y),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),bt(t,C),t.intersect=function(b){return pt.rect(t,b)},n}p(Ng,"note");var Pw=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),l=n+o,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=xt.svg(s),g=mt(t,{}),y=Pw(0,0,l),x=f.path(y,g);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),d&&u.attr("style",d)}else u=yr(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),bt(t,u),t.calcIntersect=function(f,g){const y=f.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return pt.polygon(f,x,g)},t.intersect=function(f){return this.calcIntersect(t,f)},s}p(Wg,"question");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?n*2:n),t.height??0),d=u/4,g=-Math.max(c,(t.width??0)-d)/2,y=-u/2,x=y/2,C=[{x:g+x,y},{x:g,y:0},{x:g+x,y:-y},{x:-g,y:-y},{x:-g,y}],{cssStyles:b}=t,k=xt.svg(o),_=mt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=Ht(C),A=k.path(B,_),M=o.insert(()=>A,":first-child");return M.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${-x/2},0)`),h.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),bt(t,M),t.intersect=function(L){return pt.polygon(t,C,L)},o}p(zg,"rect_left_inv_arrow");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Br(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(me(Nt())){const L=c.children[0],q=qt(c);u=L.getBoundingClientRect(),q.attr("width",u.width),q.attr("height",u.height)}at.info("Text 2",l);const d=l||[],f=c.getBBox(),g=await Br(o,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=g.children[0],x=qt(g);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;qt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+C+5)+")"),qt(c).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-C,B=-u.height/2-C;let A,M;if(t.look==="handDrawn"){const L=xt.svg(a),q=mt(t,{}),D=L.path(ze(_,B,b,k,t.rx||0),q),R=L.line(-u.width/2-C,-u.height/2-C+f.height+C,u.width/2+C,-u.height/2-C+f.height+C,q);M=a.insert(()=>(at.debug("Rough node insert CXC",D),R),":first-child"),A=a.insert(()=>(at.debug("Rough node insert CXC",D),D),":first-child")}else A=n.insert("rect",":first-child"),M=n.insert("line"),A.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),M.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+f.height+C).attr("y2",-u.height/2-C+f.height+C);return bt(t,A),t.intersect=function(L){return pt.rect(t,L)},a}p(Hg,"rectWithTitle");async function Yg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ji(e,t,s)}p(Yg,"roundedRect");var Kr=8;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?Kr:Kr*2),c=((t==null?void 0:t.height)??o.height)+a*2,u=h-Kr,d=c,f=Kr-h/2,g=-c/2,{cssStyles:y}=t,x=xt.svg(n),C=mt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:f,y:g},{x:f+u,y:g},{x:f+u,y:g+d},{x:f-Kr,y:g+d},{x:f-Kr,y:g},{x:f,y:g},{x:f,y:g+d}],k=x.polygon(b.map(B=>[B.x,B.y]),C),_=n.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",de(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${Kr/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),bt(t,_),t.intersect=function(B){return pt.rect(t,B)},n}p(Ug,"shadedProcess");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,d=c,f=u/1.5,g=-d/2,y=-f/2,{cssStyles:x}=t,C=xt.svg(o),b=mt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y},{x:g,y:y+f},{x:g+d,y:y+f},{x:g+d,y:y-f/2}],_=Ht(k),B=C.path(_,b),A=o.insert(()=>B,":first-child");return A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${f/4})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),bt(t,A),t.intersect=function(M){return pt.polygon(t,k,M)},o}p(jg,"slopedRect");async function Gg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},n=await Ji(e,t,a);if(t.colorIndex!==void 0){const{theme:o,themeVariables:l}=Nt();Ze(n,t.colorIndex,o,l.borderColorArray)}return n}p(Gg,"squareRect");var el=50,Rw=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(el-1))),a=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-a),h:i}},"stadiumDimensions");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?40:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),{w:h,h:c}=Rw(l,a,n),u=c/2,{cssStyles:d}=t,f=xt.svg(o),g=mt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...fr(-h/2+u,0,u,el,90,270),{x:h/2-u,y:c/2},...fr(h/2-u,0,u,el,270,450)],x=Ht(y),C=f.path(x,g),b=o.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),bt(t,b),t.intersect=function(k){return pt.polygon(t,y,k)},o}p(Xg,"stadium");async function Vg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ji(e,t,r)}p(Vg,"state");function Zg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=xt.svg(c),d=mt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:n,strokeWidth:2}),g=o??l,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>f,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const _=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",B=_?`${_}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${B})`)}return bt(t,C),t.intersect=function(_){return pt.circle(t,(t.width??0)/2,_)},c}p(Zg,"stateEnd");function Kg(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=xt.svg(a).circle(0,0,t.width,w1(i));n=a.insert(()=>c),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${c})`)}return bt(t,n),t.intersect=function(h){return pt.circle(t,(t.width??7)/2,h)},a}p(Kg,"stateStart");var Ci=8;async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=Math.max(l.width+2*Ci+a,t.width??0),c=Math.max(l.height+n,t.height??0),u=h-2*Ci,d=c,f=-h/2,g=-c/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const x=xt.svg(o),C=mt(t,{}),b=x.rectangle(f,g,u+16,d,C),k=x.line(f+Ci,g,f+Ci,g+d,C),_=x.line(f+Ci+u,g,f+Ci+u,g+d,C);o.insert(()=>k,":first-child"),o.insert(()=>_,":first-child");const B=o.insert(()=>b,":first-child"),{cssStyles:A}=t;B.attr("class","basic label-container").attr("style",de(A)),bt(t,B)}else{const x=yr(o,u,d,y);i&&x.attr("style",i),bt(t,x)}return t.intersect=function(x){return pt.polygon(t,y,x)},o}p(Qg,"subroutine");var Tn=.2;async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Tn*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=Tn*h,u=Tn*h,f=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,g=h,y=-f/2,x=-g/2,{cssStyles:C}=t,b=xt.svg(o),k=mt(t,{}),_=[{x:y-c/2,y:x},{x:y+f+c/2,y:x},{x:y+f+c/2,y:x+g},{x:y-c/2,y:x+g}],B=[{x:y+f-c/2,y:x+g},{x:y+f+c/2,y:x+g},{x:y+f+c/2,y:x+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=Ht(_),M=b.path(A,k),L=Ht(B),q=b.path(L,{...k,fillStyle:"solid"}),D=o.insert(()=>q,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),bt(t,D),t.intersect=function(R){return pt.polygon(t,_,R)},o}p(Jg,"taggedRect");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*o,u=.2*l,d=l+h,{cssStyles:f}=t,g=xt.svg(s),y=mt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:d/2},...jr(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,h,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],C=-o/2+o/2*.1,b=-d/2-u*.4,k=[{x:C+o-c,y:(b+l)*1.3},{x:C+o,y:b+l-u},{x:C+o,y:(b+l)*.9},...jr(C+o,(b+l)*1.25,C+o-c,(b+l)*1.3,-l*.02,.5)],_=Ht(x),B=g.path(_,y),A=Ht(k),M=g.path(A,{...y,fillStyle:"solid"}),L=s.insert(()=>M,":first-child");return L.insert(()=>B,":first-child"),L.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),bt(t,L),t.intersect=function(q){return pt.polygon(t,x,q)},s}p(tm,"taggedWaveEdgedRectangle");async function em(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-o/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",o),bt(t,c),t.intersect=function(u){return pt.rect(t,u)},s}p(em,"text");var qw=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
235
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
236
|
+
l${r},0
|
|
237
|
+
a${s},${a} 0,0,1 0,${i}
|
|
238
|
+
M${r},${-i}
|
|
239
|
+
a${s},${a} 0,0,0 0,${i}
|
|
240
|
+
l${-r},0`,"createCylinderPathD"),Nw=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Ww=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),qu=5,Nu=10;async function rm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-a,t.height<qu&&(t.height=qu)),t.width){const C=n/2/(2.5+n/50);t.width=t.width-a-C*3,t.width<Nu&&(t.width=Nu)}const{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=Math.max(t.height??0,l.height)+a,u=c/2,d=u/(2.5+c/50),f=Math.max(t.width??0,l.width)+d+a,{cssStyles:g}=t;let y;if(t.look==="handDrawn"){const x=xt.svg(o),C=Nw(0,0,f,c,d,u),b=Ww(0,0,f,c,d,u),k=x.path(C,mt(t,{})),_=x.path(b,mt(t,{fill:"none"}));y=o.insert(()=>_,":first-child"),y=o.insert(()=>k,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const x=qw(0,0,f,c,d,u);y=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",de(g)).attr("style",i),y.attr("class","basic label-container outer-path"),g&&y.selectAll("path").attr("style",g),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-f/2}, ${c/2} )`),h.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),bt(t,y),t.intersect=function(x){const C=pt.rect(t,x),b=C.y-(t.y??0);if(u!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-d)){let k=d*d*(1-b*b/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=d-k,x.x-(t.x??0)>0&&(k=-k),C.x+=k}return C},o}p(rm,"tiltedCylinder");async function im(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=Math.max(l.height+a,t.height??0),c=Math.max(l.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=xt.svg(o),y=mt(t,{}),x=Ht(u),C=g.path(x,y);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&d.attr("style",f)}else d=yr(o,c,h,u);return i&&d.attr("style",i),t.width=c,t.height=h,bt(t,d),t.intersect=function(g){return pt.polygon(t,u,g)},o}p(im,"trapezoid");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:f}=t,g=xt.svg(h),y=mt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],C=Ht(x),b=g.path(C,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),bt(t,k),t.intersect=function(_){return pt.polygon(t,x,_)},h}p(sm,"trapezoidalPentagon");var Wu=10,zu=10;async function am(e,t){var _;const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<zu&&(t.width=zu),t.height=(t==null?void 0:t.height)??0,t.height<Wu&&(t.height=Wu));const{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=mr((_=Nt().flowchart)==null?void 0:_.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:c+o.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:g}=t,y=xt.svg(n),x=mt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Ht(f),b=y.path(C,x),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,bt(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(B){return at.info("Triangle intersect",t,f,B),pt.polygon(t,f,B)},n}p(am,"triangle");async function om(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,f=t.look==="neo"?d/4:d/8,g=d+(o?f:-f),{cssStyles:y}=t,C=14-u,b=C>0?C/2:0,k=xt.svg(l),_=mt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=[{x:-u/2-b,y:g/2},...jr(-u/2-b,g/2,u/2+b,g/2,f,.8),{x:u/2+b,y:-g/2},{x:-u/2-b,y:-g/2}],A=Ht(B),M=k.path(A,_),L=l.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-d/2+(t.padding??0)-f-(h.y-(h.top??0))})`),bt(t,L),t.intersect=function(q){return pt.polygon(t,B,q)},l}p(om,"waveEdgedRectangle");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-_*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:l}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n,u=c/8,d=c+u*2,{cssStyles:f}=t,g=xt.svg(o),y=mt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:d/2},...jr(-h/2,d/2,h/2,d/2,u,1),{x:h/2,y:-d/2},...jr(h/2,-d/2,-h/2,-d/2,u,-1)],C=Ht(x),b=g.path(C,y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),bt(t,k),t.intersect=function(_){return pt.polygon(t,x,_)},o}p(nm,"waveRectangle");var se=10;async function lm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-se,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-se,10));const{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+se,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+se,u=h-se,d=c-se,f=-u/2,g=-d/2,{cssStyles:y}=t,x=xt.svg(n),C=mt(t,{}),b=[{x:f-se,y:g-se},{x:f-se,y:g+d},{x:f+u,y:g+d},{x:f+u,y:g-se}],k=`M${f-se},${g-se} L${f+u},${g-se} L${f+u},${g+d} L${f-se},${g+d} L${f-se},${g-se}
|
|
241
|
+
M${f-se},${g} L${f+u},${g}
|
|
242
|
+
M${f},${g-se} L${f},${g+d}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=x.path(k,C),B=n.insert(()=>_,":first-child");return B.attr("transform",`translate(${se/2}, ${se/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+se/2-(o.x-(o.left??0))}, ${-(o.height/2)+se/2-(o.y-(o.top??0))})`),bt(t,B),t.intersect=function(A){return pt.polygon(t,b,A)},n}p(lm,"windowPane");var Hu=new Set(["redux-color","redux-dark-color"]),zw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function mh(e,t){var wt,Bt,vt,Ct;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=ee(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:st}=ee(),{background:gt}=st,Lt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${gt}`]};await mh(e,Lt)}const h=ee();t.useHtmlLabels=h.htmlLabels;let c=((wt=h.er)==null?void 0:wt.diagramPadding)??10,u=((Bt=h.er)==null?void 0:Bt.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:g}=yt(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Er(t.label,h)+st.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const gt=await Ji(e,t,st);if(i!=null&&Hu.has(i)){const Lt=r.colorIndex??0;gt.attr("data-color-id",`color-${Lt%l.length}`)}if(!mr(h.htmlLabels)){const Lt=gt.select("text"),zt=(vt=Lt.node())==null?void 0:vt.getBBox();Lt.attr("transform",`translate(${-zt.width/2}, 0)`)}return gt}h.htmlLabels||(c*=1.25,u*=1.25);let y=St(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await ki(x,t.label??"",h,0,0,["name"],f);C.height+=u;let b=0;const k=[],_=[];let B=0,A=0,M=0,L=0,q=!0,D=!0;for(const st of r.attributes){const gt=await ki(x,st.type,h,0,b,["attribute-type"],f);B=Math.max(B,gt.width+c);const Lt=await ki(x,st.name,h,0,b,["attribute-name"],f);A=Math.max(A,Lt.width+c);const zt=await ki(x,st.keys.join(),h,0,b,["attribute-keys"],f);M=Math.max(M,zt.width+c);const jt=await ki(x,st.comment,h,0,b,["attribute-comment"],f);L=Math.max(L,jt.width+c);const U=Math.max(gt.height,Lt.height,zt.height,jt.height)+u;_.push({yOffset:b,rowHeight:U}),b+=U}let R=4;M<=c&&(q=!1,M=0,R--),L<=c&&(D=!1,L=0,R--);const K=x.node().getBBox();if(C.width+c*2-(B+A+M+L)>0){const st=C.width+c*2-(B+A+M+L);B+=st/R,A+=st/R,M>0&&(M+=st/R),L>0&&(L+=st/R)}const O=B+A+M+L,F=xt.svg(x),$=mt(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let v=0;_.length>0&&(v=_.reduce((st,gt)=>st+((gt==null?void 0:gt.rowHeight)??0),0));const N=Math.max(K.width+c*2,(t==null?void 0:t.width)||0,O),P=Math.max((v??0)+C.height,(t==null?void 0:t.height)||0),E=-N/2,Y=-P/2;if(x.selectAll("g:not(:first-child)").each((st,gt,Lt)=>{const zt=qt(Lt[gt]),jt=zt.attr("transform");let U=0,Ot=0;if(jt){const De=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(jt);De&&(U=parseFloat(De[1]),Ot=parseFloat(De[2]),zt.attr("class").includes("attribute-name")?U+=B:zt.attr("class").includes("attribute-keys")?U+=B+A:zt.attr("class").includes("attribute-comment")&&(U+=B+A+M))}zt.attr("transform",`translate(${E+c/2+U}, ${Ot+Y+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(Y+u/2)+")"),i!=null&&Hu.has(i)){const st=r.colorIndex??0;x.attr("data-color-id",`color-${st%l.length}`)}const ot=F.rectangle(E,Y,N,P,$),tt=x.insert(()=>ot,":first-child").attr("class","outer-path").attr("style",d.join(""));k.push(0);for(const[st,gt]of _.entries()){const zt=(st+1)%2===0&>.yOffset!==0,jt=F.rectangle(E,C.height+Y+(gt==null?void 0:gt.yOffset),N,gt==null?void 0:gt.rowHeight,{...$,fill:zt?a:n,stroke:o});x.insert(()=>jt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${zt?"even":"odd"}`)}const et=1e-4;let ct=Si(E,C.height+Y,N+E,C.height+Y,et),ut=F.polygon(ct.map(st=>[st.x,st.y]),$);if(x.insert(()=>ut).attr("class","divider"),ct=Si(B+E,C.height+Y,B+E,P+Y,et),ut=F.polygon(ct.map(st=>[st.x,st.y]),$),x.insert(()=>ut).attr("class","divider"),q){const st=B+A+E;ct=Si(st,C.height+Y,st,P+Y,et),ut=F.polygon(ct.map(gt=>[gt.x,gt.y]),$),x.insert(()=>ut).attr("class","divider")}if(D){const st=B+A+M+E;ct=Si(st,C.height+Y,st,P+Y,et),ut=F.polygon(ct.map(gt=>[gt.x,gt.y]),$),x.insert(()=>ut).attr("class","divider")}for(const st of k){const gt=C.height+Y+st;ct=Si(E,gt,N+E,gt,et),ut=F.polygon(ct.map(Lt=>[Lt.x,Lt.y]),$),x.insert(()=>ut).attr("class","divider")}if(bt(t,tt),g&&t.look!=="handDrawn")if(i!=null&&zw.has(i))x.selectAll("path").attr("style",g);else{const st=g.split(";"),gt=(Ct=st==null?void 0:st.filter(Lt=>Lt.includes("stroke")))==null?void 0:Ct.map(Lt=>`${Lt}`).join("; ");x.selectAll("path").attr("style",gt??""),x.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(st){return pt.rect(t,st)},x}p(mh,"erBox");async function ki(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==cc(t)&&(t=cc(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await We(o,t,{width:Er(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(mr(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=qt(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}p(ki,"addText");function Si(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(Si,"lineToPolygon");async function hm(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",St(t)).attr("id",t.domId||t.id);let o=null,l=null,h=null,c=null,u=0,d=0,f=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ss(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Ss(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,h=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Ss(h,b,y,[b.parseClassifier()]);y+=k+a}f=h.node().getBBox().height,f<=0&&(f=s/2),c=n.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const k=await Ss(c,b,x,[b.parseClassifier()]);x+=k+a}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+d+s*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}p(hm,"textHelper");async function Ss(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=ee();let n="useHtmlLabels"in t?t.useHtmlLabels:mr(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),Ds(o)&&(n=!0);const l=await We(s,xl(Yr(o)),{width:Er(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,c=1;if(n){const u=l.children[0],d=qt(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1),await ch(u),h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}else{i.includes("font-weight: bolder")&&qt(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(Ss,"addText");async function cm(e,t){var v,N;const r=Nt(),{theme:i,themeVariables:s}=r,{useGradient:a,borderColorArray:n}=s,o=r.class.padding??12,l=o,h=t.useHtmlLabels??mr(r.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];const{shapeSvg:u,bbox:d}=await hm(e,t,r,h,l);Ze(u,t.colorIndex,i,n);const{labelStyles:f,nodeStyles:g}=yt(t);t.labelStyle=f,t.cssStyles=c.styles||"";const y=((v=c.styles)==null?void 0:v.join(";"))||g||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const x=c.members.length===0&&c.methods.length===0&&!((N=r.class)!=null&&N.hideEmptyMembersBox),C=xt.svg(u),b=mt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,d.width);let _=Math.max(t.height??0,d.height);const B=(t.height??0)>d.height;c.members.length===0&&c.methods.length===0?_+=l:c.members.length>0&&c.methods.length===0&&(_+=l*2);const A=-k/2,M=-_/2;let L=x?o*2:c.members.length===0&&c.methods.length===0?-o:0;B&&(L=o*2);const q=C.rectangle(A-o,M-o-(x?o:c.members.length===0&&c.methods.length===0?-o/2:0),k+2*o,_+2*o+L,b),D=u.insert(()=>q,":first-child");D.attr("class","basic label-container outer-path");const R=D.node().getBBox(),K=u.select(".annotation-group").node().getBBox().height-(x?o/2:0)||0,O=u.select(".label-group").node().getBBox().height-(x?o/2:0)||0,F=u.select(".members-group").node().getBBox().height-(x?o/2:0)||0,$=(K+O+M+o-(M-o-(x?o:c.members.length===0&&c.methods.length===0?-o/2:0)))/2;if(u.selectAll(".text").each((P,E,Y)=>{var wt,Bt;const ot=qt(Y[E]),tt=ot.attr("transform");let et=0;if(tt){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(tt);Ct&&(et=parseFloat(Ct[2]))}let ct=et+M+o-(x?o:c.members.length===0&&c.methods.length===0?-o/2:0);if(ot.attr("class").includes("methods-group")){const vt=Math.max(F,l/2);B?ct=Math.max($,K+O+vt+M+l*2+o)+l*2:ct=K+O+vt+M+l*4+o}c.members.length===0&&c.methods.length===0&&((wt=r.class)!=null&&wt.hideEmptyMembersBox)&&(c.annotations.length>0?ct=et-l:ct=et),h||(ct-=4);let ut=A;(ot.attr("class").includes("label-group")||ot.attr("class").includes("annotation-group"))&&(ut=-((Bt=ot.node())==null?void 0:Bt.getBBox().width)/2||0,u.selectAll("text").each(function(vt,Ct,st){window.getComputedStyle(st[Ct]).textAnchor==="middle"&&(ut=0)})),ot.attr("transform",`translate(${ut}, ${ct})`)}),c.members.length>0||c.methods.length>0||x){const P=K+O+M+o,E=C.line(R.x,P,R.x+R.width,P+.001,b);u.insert(()=>E).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(x||c.members.length>0||c.methods.length>0){const P=K+O+F+M+l*2+o,E=C.line(R.x,B?Math.max($,P):P,R.x+R.width,(B?Math.max($,P):P)+.001,b);u.insert(()=>E).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(c.look!=="handDrawn"&&u.selectAll("path").attr("style",y),D.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",y),!h){const P=RegExp(/color\s*:\s*([^;]*)/),E=P.exec(y);if(E){const Y=E[0].replace("color","fill");u.selectAll("tspan").attr("style",Y)}else if(f){const Y=P.exec(f);if(Y){const ot=Y[0].replace("color","fill");u.selectAll("tspan").attr("style",ot)}}}return bt(t,D),t.intersect=function(P){return pt.rect(t,P)},u}p(cm,"classBox");async function um(e,t){var R,K;const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,l="verifyMethod"in t,h=St(t),c=Nt(),{themeVariables:u}=c,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,g=c.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let x;l?x=await ur(y,`<<${s.type}>>`,0,t.labelStyle):x=await ur(y,"<<Element>>",0,t.labelStyle);let C=x;const b=await ur(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+o,l){const O=await ur(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,g);C+=O;const F=await ur(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,g);C+=F;const $=await ur(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,g);C+=$,await ur(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,g)}else{const O=await ur(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,g);C+=O,await ur(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,g)}const k=(((R=y.node())==null?void 0:R.getBBox().width)??200)+n,_=(((K=y.node())==null?void 0:K.getBBox().height)??200)+n,B=-k/2,A=-_/2,M=xt.svg(y),L=mt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const q=M.rectangle(B,A,k,_,L),D=y.insert(()=>q,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const O=t.colorIndex??0;y.attr("data-color-id",`color-${O%d.length}`)}if(y.selectAll(".label").each((O,F,$)=>{const v=qt($[F]),N=v.attr("transform");let P=0,E=0;if(N){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);et&&(P=parseFloat(et[1]),E=parseFloat(et[2]))}const Y=E-_/2;let ot=B+n/2;(F===0||F===1)&&(ot=P),v.attr("transform",`translate(${ot}, ${Y+n})`)}),C>x+b+o){const O=A+x+b+o;let F;if(t.look==="neo"){const N=[[B,O],[B+k,O],[B+k,O+.001],[B,O+.001]];F=M.polygon(N,L)}else F=M.line(B,O,B+k,O,L);y.insert(()=>F).attr("class","divider")}return bt(t,D),t.intersect=function(O){return pt.rect(t,O)},i&&t.look!=="handDrawn"&&(f||d!=null&&d.length)&&y.selectAll("path").attr("style",i),y}p(um,"requirementBox");async function ur(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=Nt(),o=n.htmlLabels??!0,l=await We(a,xl(Yr(t)),{width:Er(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let h;if(o){const c=l.children[0],u=qt(l);s==="start"&&qt(c).style("text-align","left"),h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}else{const c=l.children[0];for(const u of c.children)i&&u.setAttribute("style",i);if(s==="start"){c.setAttribute("text-anchor","start");for(const u of c.children)u.setAttribute("text-anchor","start")}h=l.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}p(ur,"addText");var Hw=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function dm(e,t,{config:r}){var K,O;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await Tt(e,t,St(t)),c=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((K=r==null?void 0:r.kanban)!=null&&K.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,y;d?{label:g,bbox:y}=await ri(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:y}=await ri(o,"ticket"in t&&t.ticket||"",f);const{label:x,bbox:C}=await ri(o,"assigned"in t&&t.assigned||"",f);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,_=Math.max(y.height,C.height)/2,B=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+_,A=-k/2,M=-B/2;h.attr("transform","translate("+(c-k/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(c-k/2)+", "+(-_+l.height/2)+")"),x.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-_+l.height/2)+")");let L;const{rx:q,ry:D}=t,{cssStyles:R}=t;if(t.look==="handDrawn"){const F=xt.svg(o),$=mt(t,{}),v=q||D?F.path(ze(A,M,k,B,q||0),$):F.rectangle(A,M,k,B,$);L=o.insert(()=>v,":first-child"),L.attr("class","basic label-container").attr("style",R||null)}else{L=o.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",q??5).attr("ry",D??5).attr("x",A).attr("y",M).attr("width",k).attr("height",B);const F="priority"in t&&t.priority;if(F){const $=o.append("line"),v=A+2,N=M+Math.floor((q??0)/2),P=M+B-Math.floor((q??0)/2);$.attr("x1",v).attr("y1",N).attr("x2",v).attr("y2",P).attr("stroke-width","4").attr("stroke",Hw(F))}}return bt(t,L),t.height=B,t.intersect=function(F){return pt.rect(t,F)},o}p(dm,"kanbanItem");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),l=a.width+10*n,h=a.height+8*n,c=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),y=Math.max(h,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
|
|
243
|
+
a${c},${c} 1 0,0 ${g*.25},${-1*y*.1}
|
|
244
|
+
a${c},${c} 1 0,0 ${g*.25},0
|
|
245
|
+
a${c},${c} 1 0,0 ${g*.25},0
|
|
246
|
+
a${c},${c} 1 0,0 ${g*.25},${y*.1}
|
|
247
|
+
|
|
248
|
+
a${c},${c} 1 0,0 ${g*.15},${y*.33}
|
|
249
|
+
a${c*.8},${c*.8} 1 0,0 0,${y*.34}
|
|
250
|
+
a${c},${c} 1 0,0 ${-1*g*.15},${y*.33}
|
|
251
|
+
|
|
252
|
+
a${c},${c} 1 0,0 ${-1*g*.25},${y*.15}
|
|
253
|
+
a${c},${c} 1 0,0 ${-1*g*.25},0
|
|
254
|
+
a${c},${c} 1 0,0 ${-1*g*.25},0
|
|
255
|
+
a${c},${c} 1 0,0 ${-1*g*.25},${-1*y*.15}
|
|
256
|
+
|
|
257
|
+
a${c},${c} 1 0,0 ${-1*g*.1},${-1*y*.33}
|
|
258
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*y*.34}
|
|
259
|
+
a${c},${c} 1 0,0 ${g*.1},${-1*y*.33}
|
|
260
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=xt.svg(s),k=mt(t,{}),_=b.path(C,k);x=s.insert(()=>_,":first-child"),x.attr("class","basic label-container").attr("style",de(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-g/2}, ${-y/2})`),bt(t,x),t.calcIntersect=function(b,k){return pt.rect(b,k)},t.intersect=function(b){return at.info("Bang intersect",t,b),pt.rect(t,b)},s}p(fm,"bang");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),l=a.width+2*n,h=a.height+2*n,c=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let y;const x=`M0 0
|
|
261
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
262
|
+
a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
|
|
263
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
264
|
+
|
|
265
|
+
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
266
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${h*.65}
|
|
267
|
+
|
|
268
|
+
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
269
|
+
a${d},${d} 1 0,1 ${-1*l*.5},0
|
|
270
|
+
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
271
|
+
|
|
272
|
+
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
273
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*h*.65}
|
|
274
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=xt.svg(s),b=mt(t,{}),k=C.path(x,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",de(g))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-h/2})`),bt(t,y),t.calcIntersect=function(C,b){return pt.rect(C,b)},t.intersect=function(C){return at.info("Cloud intersect",t,C),pt.rect(t,C)},s}p(pm,"cloud");async function gm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),l=a.width+8*n,h=a.height+2*n,c=5,u=t.look==="neo"?`
|
|
275
|
+
M${-l/2} ${h/2-c}
|
|
276
|
+
v${-h+2*c}
|
|
277
|
+
q0,-${c} ${c},-${c}
|
|
278
|
+
h${l-2*c}
|
|
279
|
+
q${c},0 ${c},${c}
|
|
280
|
+
v${h-c}
|
|
281
|
+
H${-l/2}
|
|
282
|
+
Z
|
|
283
|
+
`:`
|
|
284
|
+
M${-l/2} ${h/2-c}
|
|
285
|
+
v${-h+2*c}
|
|
286
|
+
q0,-${c} ${c},-${c}
|
|
287
|
+
h${l-2*c}
|
|
288
|
+
q${c},0 ${c},${c}
|
|
289
|
+
v${h-2*c}
|
|
290
|
+
q0,${c} ${-c},${c}
|
|
291
|
+
h${-(l-2*c)}
|
|
292
|
+
q${-c},0 ${-c},${-c}
|
|
293
|
+
Z
|
|
294
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),bt(t,d),t.calcIntersect=function(f,g){return pt.rect(f,g)},t.intersect=function(f){return pt.rect(t,f)},s}p(gm,"defaultMindmapNode");async function mm(e,t){const r={padding:t.padding??0};return ph(e,t,r)}p(mm,"mindmapCircle");var xi=36,Qr=50,Yw=100,Uw=80,Gr=6,Bi=16,jw="bpmn",Gw={start:{rings:1,strokeWidth:1.6},intermediate:{rings:2,strokeWidth:1.4},boundary:{rings:2,strokeWidth:1.4},end:{rings:1,strokeWidth:3.4}},Yu;async function ym(){return Yu??(Yu=Wt(async()=>{const{bpmnIcons:e}=await import("./bpmnIcons-APHXDYXF-ByGoYv9M.js");return{bpmnIcons:e}},[]).then(({bpmnIcons:e})=>{Q1(e.prefix)||Pf([{name:e.prefix,icons:e}])})),Yu}p(ym,"ensureBpmnIcons");function Cm(e){var r;const t=(r=e.metadata)==null?void 0:r.dataDirection;return t==="input"||t==="output"?t:void 0}p(Cm,"dataDirectionOf");function xm(e){var t;return((t=e.metadata)==null?void 0:t.isCollection)===!0}p(xm,"isCollectionData");async function Za(e,t){return await ym(),li(e,{height:t,width:t,fallbackPrefix:jw})}p(Za,"glyphSvg");var Us=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabelBelow"),bm=p(async(e,t,r)=>{if(!t)return;const i=e.append("g").attr("class","bpmn-glyph");i.html(`<g>${await Za(t,r)}</g>`),i.attr("transform",`translate(${-r/2}, ${-r/2})`)},"appendGlyph"),js=p((e,t,r,i,s)=>{s&&(t.metadata={...t.metadata??{},drawnExtent:s});const a=e.insert("rect",":first-child").attr("class","bpmn-bounds").attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i).attr("opacity",0).attr("aria-hidden","true");return bt(t,a),a},"reserveBounds"),Xw=8,Ka=p((e,t,r)=>Math.min(Math.max(e,t),r),"clamp"),po=p((e,t,r,i,s)=>{const a=e.x??0,n=e.y??0,o=t/2,l=r/2,h=i.x-a,c=i.y-n,u=s??(Math.abs(h)*l>Math.abs(c)*o?h>=0?"right":"left":c>=0?"bottom":"top"),d=p(f=>Math.max(0,f-Math.min(Xw,f/2)),"reach");return u==="left"||u==="right"?{x:a+(u==="right"?o:-o),y:Ka(i.y,n-d(l),n+d(l))}:{x:Ka(i.x,a-d(o),a+d(o)),y:n+(u==="bottom"?l:-l)}},"faceProjectIntersect"),Vw=p((e,t,r)=>{const i=e.x??0,s=e.y??0,a=t/2,n=r.x-i,o=r.y-s,l=a*.85;if(Math.abs(o)>=Math.abs(n)){const c=Ka(n,-l,l);return{x:i+c,y:s+Math.sign(o||1)*Math.sqrt(a*a-c*c)}}const h=Ka(o,-l,l);return{x:i+Math.sign(n||1)*Math.sqrt(a*a-h*h),y:s+h}},"ringIntersect"),Zw=p((e,t,r,i)=>{const s=e.x??0,a=e.y??0,n=t/2,o=r/2,l=i.x-s,h=i.y-a;return Math.abs(l)*o>Math.abs(h)*n?{x:s+Math.sign(l)*n,y:a}:{x:s,y:a+Math.sign(h||1)*o}},"faceCentreIntersect");async function Gs(e,t,r){const i=t,{labelStyles:s,nodeStyles:a}=yt(t);t.labelStyle=s;const{rings:n,strokeWidth:o}=Gw[r],l=xi/2,{shapeSvg:h,bbox:c,label:u}=await Tt(e,t,St(t,`bpmn-event bpmn-event-${r}`)),d=h.insert("g",":first-child").attr("class","bpmn-event-body");d.attr("style",a);for(let C=0;C<n;C++)d.append("circle").attr("class",C===0?"bpmn-event-ring":"bpmn-event-ring bpmn-event-ring-inner").attr("r",l-C*3).style("stroke-width",`${o}px`);await bm(d,i.icon,Bi);const f=c.height>0&&!!t.label,g=f?Gr+c.height:0,y=xi+2*g,x=Math.max(xi,f?c.width:0);return f&&Us(u,c,l+Gr+c.height/2),js(h,t,x,y,{width:xi,height:xi}),t.intersect=function(C){return Vw(t,xi,C)},h}p(Gs,"renderBpmnEvent");async function km(e,t){return Gs(e,t,"start")}p(km,"bpmnStart");async function Sm(e,t){return Gs(e,t,"intermediate")}p(Sm,"bpmnIntermediate");async function wm(e,t){return Gs(e,t,"boundary")}p(wm,"bpmnBoundary");async function Tm(e,t){return Gs(e,t,"end")}p(Tm,"bpmnEnd");async function _m(e,t){const r=t,{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const a=Qr/2,{shapeSvg:n,bbox:o,label:l}=await Tt(e,t,St(t,"bpmn-gateway")),h=n.insert("g",":first-child").attr("class","bpmn-gateway-body");h.append("polygon").attr("class","bpmn-gateway-diamond").attr("points",`0,${-a} ${a},0 0,${a} ${-a},0`).attr("style",s),await bm(h,r.icon,Bi+2);const c=o.height>0&&!!t.label,u=c?Gr+o.height:0,d=Qr+2*u,f=Math.max(Qr,c?o.width:0);return c&&Us(l,o,a+Gr+o.height/2),js(n,t,f,d,{width:Qr,height:Qr}),t.intersect=function(g){return Zw(t,Qr,Qr,g)},n}p(_m,"bpmnGateway");async function Bm(e,t){const r=t,{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t,"bpmn-activity")),l=r.markers??[],h=r.icon,c=h?Bi+6:10,u=l.length>0?Bi+4:10,d=Math.max(Yw,n.width+16),f=Math.max(Uw,n.height+c+u),g=a.insert("g",":first-child").attr("class","bpmn-activity-body");if(g.append("rect").attr("class","bpmn-activity-rect").attr("x",-d/2).attr("y",-f/2).attr("width",d).attr("height",f).attr("rx",10).attr("ry",10).attr("style",s),h){const y=g.append("g").attr("class","bpmn-activity-icon");y.html(`<g>${await Za(h,Bi)}</g>`),y.attr("transform",`translate(${-d/2+6}, ${-f/2+6})`)}if(l.length>0){const y=g.append("g").attr("class","bpmn-activity-markers"),x=Bi-2,C=l.length*x;for(const[b,k]of l.entries()){const _=y.append("g");_.html(`<g>${await Za(k,x)}</g>`),_.attr("transform",`translate(${-C/2+b*x}, 0)`)}y.attr("transform",`translate(0, ${f/2-x-3})`)}if(n.height>0){const y=-f/2+c,x=f/2-u;Us(o,n,(y+x)/2)}return bt(t,g),t.intersect=function(y){return po(t,d,f,y)},a}p(Bm,"bpmnActivity");var ps=36,bi=50,fa=10;async function vm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t,"bpmn-data-object")),o=s.insert("g",":first-child").attr("class","bpmn-data-body"),l=-ps/2,h=-bi/2,c=ps/2,u=bi/2;o.append("path").attr("class","bpmn-data-page").attr("d",`M${l},${h} H${c-fa} L${c},${h+fa} V${u} H${l} Z`).attr("style",i),o.append("path").attr("class","bpmn-data-fold").attr("d",`M${c-fa},${h} V${h+fa} H${c}`);const d=Cm(t);d&&o.append("path").attr("class",`bpmn-data-arrow bpmn-data-arrow-${d}`).attr("d",`M${l+4},${h+9} h7 v-3 l5,4.5 -5,4.5 v-3 h-7 Z`),xm(t)&&o.append("path").attr("class","bpmn-data-collection").attr("d",`M-4,${u-11} v9 M0,${u-11} v9 M4,${u-11} v9`);const f=a.height>0&&!!t.label,g=f?Gr+a.height:0,y=bi+2*g,x=Math.max(ps,f?a.width:0);return f&&Us(n,a,bi/2+Gr+a.height/2),js(s,t,x,y,{width:ps,height:bi}),t.intersect=function(C){return po(t,ps,bi,C)},s}p(vm,"bpmnDataObject");var hr=50;async function Lm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t,"bpmn-data-store")),o=s.insert("g",":first-child").attr("class","bpmn-data-body"),l=hr/2,h=6;o.append("path").attr("class","bpmn-store-body").attr("d",`M${-l},${-l+h} a${l},${h} 0 0 1 ${hr},0 V${l-h} a${l},${h} 0 0 1 ${-hr},0 Z`).attr("style",i);for(const g of[0,5,10])o.append("path").attr("class","bpmn-store-rings").attr("d",`M${-l},${-l+h+g} a${l},${h} 0 0 0 ${hr},0`);const c=a.height>0&&!!t.label,u=c?Gr+a.height:0,d=hr+2*u,f=Math.max(hr,c?a.width:0);return c&&Us(n,a,l+Gr+a.height/2),js(s,t,f,d,{width:hr,height:hr}),t.intersect=function(g){return po(t,hr,hr,g)},s}p(Lm,"bpmnDataStore");async function Am(e,t){var d;const{labelStyles:r}=yt(t);t.labelStyle=r,t.wrappingWidth=160;const{shapeSvg:i,bbox:s,label:a}=await Tt(e,t,St(t,"bpmn-annotation")),n=8,o=Math.max(28,s.height+n*2),l=s.width+n*2+6,h=((d=t.metadata)==null?void 0:d.attachFace)==="right"?"right":"left";i.insert("g",":first-child").attr("class","bpmn-annotation-body").append("path").attr("class","bpmn-annotation-bracket").attr("d",h==="right"?`M${l/2-6},${-o/2} h6 V${o/2} h-6`:`M${-l/2+6},${-o/2} h-6 V${o/2} h6`);const u=h==="right"?-l/2+n:-l/2+n+6;return a.attr("transform",`translate(${u-(s.x??0)+(s.left??0)},${-s.height/2-((s.y??0)-(s.top??0))})`),js(i,t,l,o),t.intersect=function(f){return po(t,l,o,f,h)},i}p(Am,"bpmnAnnotation");var Kw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Gg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Yg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Xg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:hg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:gg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:jp},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:tg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Zp},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ng},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:ph},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:fm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:pm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Wg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Cg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Lg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:vg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:im},{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:_g},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ug},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:em},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Kp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ug},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Kg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:mg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:xg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ig},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:sg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ag},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ag},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:om},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:yg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:rm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Fg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:og},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:cg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:am},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:lm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:fg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:pg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:qg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Rg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Up},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:rg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:nm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:zg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Eg}],Qw=p(()=>{const t=[...Object.entries({state:Vg,choice:Qp,note:Ng,composite:Jp,rectWithTitle:Hg,labelRect:Bg,block_arrow:Vp,collapsedGroup:Xp,iconSquare:wg,iconCircle:kg,icon:bg,iconRounded:Sg,imageSquare:Tg,anchor:Hp,kanbanItem:dm,mindmapCircle:mm,defaultMindmapNode:gm,classBox:cm,erBox:mh,requirementBox:um,usecaseActor:Mg,usecaseActorHollow:$g,usecaseActorAwesome:Og,usecaseActorIcon:Dg,usecaseBusiness:Ig,usecaseEllipse:dg,usecaseJsonTable:Pg,"bpmn-start":km,"bpmn-intermediate":Sm,"bpmn-boundary":wm,"bpmn-end":Tm,"bpmn-gateway":_m,"bpmn-activity":Bm,"bpmn-data":vm,"bpmn-data-store":Lm,"bpmn-annotation":Am}),...Kw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Fm=Qw();function Jw(e){return e in Fm}p(Jw,"isValidShape");var Xs=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),go=new Map;async function Em(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Fm[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",de(t.look)),t.tooltip&&s.attr("title",t.tooltip),go.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Em,"insertNode");var nF=p((e,t)=>{go.set(t.id,e)},"setNodeElem"),lF=p(()=>{go.clear()},"clear"),hF=p(e=>{const t=go.get(e.id);at.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"),Mm=p(async(e,t,{variant:r="swimlane"}={})=>{const i=r==="pool",s=i?"pool swimlane":"swimlane",a=i?"pool-label swimlane-label":"swimlane-label",n=i?"pool-title swimlane-title":"swimlane-title",o=i?"pool-body swimlane-body":"swimlane-body",l=Nt(),{theme:h,themeVariables:c,handDrawnSeed:u}=l,{clusterBkg:d,clusterBorder:f,borderColorArray:g}=c,y=f,{labelStyles:x,nodeStyles:C,borderStyles:b,backgroundStyles:k}=yt(t),_=e.insert("g").attr("class","cluster "+s+" "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);Ze(_,t.colorIndex,h,g);const B=mr(l.flowchart.htmlLabels),A=t.direction==="LR",M=_.insert("g").attr("class","cluster-label "+a),L=await We(M,t.label,{style:t.labelStyle,useHtmlLabels:B,isNode:!0,width:t.width});let q=L.getBBox();if(B){const ot=L.children[0],tt=qt(L);q=ot.getBoundingClientRect(),tt.attr("width",q.width),tt.attr("height",q.height)}const D=t.padding??0,R=t.width<=q.width+D?q.width+D:t.width;t.width<=q.width+D?t.diff=(R-t.width)/2-D:t.diff=-D;const K=t.height,O=t.y-K/2,F=t.y+K/2,$=t.x-R/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:O+K/3,N=A?4:0,P=q.height+2*N;let E,Y;if(A){const ot=Math.max(P,q.height+2*N),tt=$+ot,et=Math.max(0,R-ot);if(t.look==="handDrawn"){const wt=xt.svg(_),Bt=mt(t,{roughness:.7,fill:d,stroke:y,seed:u}),vt=mt(t,{roughness:.7,fill:"none",stroke:y,seed:u}),Ct=wt.rectangle($,O,ot,K,Bt);E=_.insert(()=>Ct,":first-child").attr("class",n);const st=wt.rectangle(tt,O,et,K,vt);Y=_.insert(()=>st,":first-child").attr("class",o),E.select("path:nth-child(2)").attr("style",b.join(";")),E.select("path").attr("style",k.join(";").replace("fill","stroke"))}else E=_.insert("rect",":first-child"),Y=_.insert("rect",":first-child"),E.attr("class",n).attr("style",C).attr("x",$).attr("y",O).attr("width",ot).attr("height",K).attr("fill",d).attr("stroke",y),Y.attr("class",o).attr("style",C).attr("x",tt).attr("y",O).attr("width",et).attr("height",K).attr("fill","none").attr("stroke",y);const ct=$+ot/2,ut=t.y;M.attr("transform",`translate(${ct}, ${ut}) rotate(-90) translate(${-q.width/2}, ${-q.height/2})`)}else{const ot=Math.max(0,v-O),tt=Math.min(P,ot),et=O+tt,ct=Math.max(0,F-et),ut=t.x-R/2;if(t.look==="handDrawn"){const vt=xt.svg(_),Ct=mt(t,{roughness:.7,fill:d,stroke:y,fillWeight:3,seed:u}),st=mt(t,{roughness:.7,fill:"none",stroke:y,seed:u}),gt=vt.rectangle(ut,O,R,tt,Ct);E=_.insert(()=>gt,":first-child").attr("class",n);const Lt=vt.rectangle(ut,et,R,ct,st);Y=_.insert(()=>Lt,":first-child").attr("class",o),E.select("path:nth-child(2)").attr("style",b.join(";")),E.select("path").attr("style",k.join(";").replace("fill","stroke"))}else E=_.insert("rect",":first-child"),Y=_.insert("rect",":first-child"),E.attr("class",n).attr("style",C).attr("x",ut).attr("y",O).attr("width",R).attr("height",tt).attr("fill",d).attr("stroke",y),Y.attr("class",o).attr("style",C).attr("x",ut).attr("y",et).attr("width",R).attr("height",ct).attr("fill","none").attr("stroke",y);const wt=t.x-q.width/2,Bt=O+(tt-q.height)/2;M.attr("transform",`translate(${wt}, ${Bt})`)}if(at.trace("Swimlane data ",t,JSON.stringify(t)),x){const ot=M.select("span");ot&&ot.attr("style",x)}return t.offsetX=0,t.width=R,t.height=K,t.offsetY=q.height-D/2,t.intersect=function(ot){return Mr(t,ot)},{cluster:_,labelBBox:q}},"swimlane"),Om=p(async(e,t)=>{at.info("Creating subgraph rect for ",t.id,t);const r=Nt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:l}=s,{labelStyles:h,nodeStyles:c,borderStyles:u,backgroundStyles:d}=yt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ze(f,t.colorIndex,i,l);const g=me(r),y=f.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await We(y,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):x=await Br(y,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(me(r)){const q=x.children[0],D=qt(x);C=q.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height)}const b=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,_=t.x-b/2,B=t.y-k/2;at.trace("Data ",t,JSON.stringify(t));let A;if(t.look==="handDrawn"){const q=xt.svg(f),D=mt(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),R=q.path(ze(_,B,b,k,0),D);A=f.insert(()=>(at.debug("Rough node insert CXC",R),R),":first-child"),A.select("path:nth-child(2)").attr("style",u.join(";")),A.select("path").attr("style",d.join(";").replace("fill","stroke"))}else A=f.insert("rect",":first-child"),A.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",B).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:M}=Xs(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+M})`),h){const q=y.select("span");q&&q.attr("style",h)}const L=A.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=C.height-t.padding/2,t.intersect=function(q){return Mr(t,q)},{cluster:f,labelBBox:C}},"rect"),tT=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return Mr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),eT=p(async(e,t)=>{const r=Nt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,borderColorArray:o,compositeBackground:l,compositeTitleBackground:h,nodeBorder:c}=s,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);Ze(u,t.colorIndex,i,o);const d=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label");let g=u.append("rect");const y=await Br(f,t.label,t.labelStyle,void 0,!0);let x=y.getBBox();if(me(r)){const R=y.children[0],K=qt(y);x=R.getBoundingClientRect(),K.attr("width",x.width),K.attr("height",x.height)}const C=0*t.padding,b=C/2,k=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+C,B=t.height+C-x.height-6,A=t.x-k/2,M=t.y-_/2;t.width=k;const L=t.y-t.height/2-b+x.height+2;let q;if(t.look==="handDrawn"){const R=t.cssClasses.includes("statediagram-cluster-alt"),K=xt.svg(u),O=t.rx||t.ry?K.path(ze(A,M,k,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:c,seed:a}):K.rectangle(A,M,k,_,{seed:a});q=u.insert(()=>O,":first-child");const F=K.rectangle(A,L,k,B,{fill:R?n:l,fillStyle:R?"hachure":"solid",stroke:c,seed:a});q=u.insert(()=>O,":first-child"),g=u.insert(()=>F),q.attr("class","outer"),g.attr("class","inner")}else q=d.insert("rect",":first-child"),q.attr("class","outer").attr("x",A).attr("y",M).attr("width",k).attr("height",_).attr("data-look",t.look),g.attr("class","inner").attr("x",A).attr("y",L).attr("width",k).attr("height",B);f.attr("transform",`translate(${t.x-x.width/2}, ${M+1-(me(r)?0:3)})`);const D=q.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(R){return Mr(t,R)},{cluster:u,labelBBox:x}},"roundedWithTitle"),rT=p(async(e,t)=>{at.info("Creating subgraph rect for ",t.id,t);const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=yt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=me(r),f=u.insert("g").attr("class","cluster-label "),g=await We(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=g.getBBox();if(me(r)){const M=g.children[0],L=qt(g);y=M.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,k=t.y-C/2;at.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const M=xt.svg(u),L=mt(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),q=M.path(ze(b,k,x,C,t.rx),L);_=u.insert(()=>(at.debug("Rough node insert CXC",q),q),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=Xs(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),o){const M=f.select("span");M&&M.attr("style",o)}const A=_.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=y.height-t.padding/2,t.intersect=function(M){return Mr(t,M)},{cluster:u,labelBBox:y}},"kanbanSection"),iT=p((e,t)=>{const r=Nt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,nodeBorder:o,borderColorArray:l}=s,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ze(h,t.colorIndex,i,l);const c=h.insert("g",":first-child"),u=0*t.padding,d=t.width+u;t.diff=-t.padding;const f=t.height+u,g=t.x-d/2,y=t.y-f/2;t.width=d;let x;if(t.look==="handDrawn"){const k=xt.svg(h).rectangle(g,y,d,f,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});x=h.insert(()=>k,":first-child").attr("class","divider")}else{x=c.insert("rect",":first-child");let b="outer";t.look,b="divider",x.attr("class",b).attr("x",g).attr("y",y).attr("width",d).attr("height",f).attr("data-look",t.look)}const C=x.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return Mr(t,b)},{cluster:h,labelBBox:{}}},"divider"),sT=p(async(e,t,r)=>{var B;at.info(`Creating ${r.cssClass} for `,t.id,t);const i=Nt(),{theme:s,themeVariables:a,handDrawnSeed:n}=i,{borderColorArray:o}=a,{labelStyles:l,borderStyles:h}=yt(t),c=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);Ze(c,t.colorIndex,s,o);const u=me(i),d=c.insert("g").attr("class","cluster-label");let f={width:0,height:0};const g=(B=t.label)==null?void 0:B.trim();if(g){let A;if(t.labelType==="markdown"?A=await We(d,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):A=await Br(d,t.label,t.labelStyle||"",!1,!0),f=A.getBBox(),u){const M=A.children[0],L=qt(A);f=M.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,b=t.y-x/2;let k;if(t.look==="handDrawn"){const A=xt.svg(c),M=mt(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),L=A.path(ze(C,b,y,x,r.rx),M);k=c.insert(()=>L,":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";"))}else k=c.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",C).attr("y",b).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(g){const{subGraphTitleTopMargin:A}=Xs(i);if(d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+A})`),l){const M=d.select("span");M&&M.attr("style",l)}}const _=k.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=f.height-t.padding/2,t.intersect=function(A){return Mr(t,A)},{cluster:c,labelBBox:f}},"createContainerGroup"),aT=p(async(e,t)=>{const{themeVariables:r}=Nt(),i=r.flowContainerStroke||r.secondaryBorderColor;return sT(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),oT=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,a=Math.max(e.width,t.width+i),n=r==="package"?Math.max(e.height,s+e.padding*2):e.height,o=e.x-a/2,l=e.y-n/2;return{boundaryType:r,width:a,height:n,x:o,y:l,bodyY:l+s,bodyHeight:n-s,tabHeight:s,tabWidth:r==="package"?Math.min(a,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),nT=p(async(e,t)=>{var O;at.info("Creating usecase system boundary for ",t.id,t);const r=Nt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:l}=s,{labelStyles:h,nodeStyles:c}=yt(t),{stylesMap:u}=Xr(t),d=t.boundaryType||"rect",f=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${d} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",d).attr("data-look",t.look);Ze(f,t.colorIndex,i,l);const g=me(r),y=f.insert("g").attr("class","cluster-label system-boundary-title"),x=await We(y,t.label,{style:h,useHtmlLabels:g,isNode:!0});let C=x.getBBox();if(g){const F=x.children[0],$=qt(x);C=F.getBoundingClientRect(),$.attr("width",C.width),$.attr("height",C.height)}const b=oT(t,C),{width:k,height:_,x:B,y:A,bodyY:M,bodyHeight:L,tabHeight:q,tabWidth:D}=b;t.diff=t.width<=C.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const R=mt(t,{fill:u.get("fill")||n,stroke:u.get("stroke")||o,strokeWidth:((O=u.get("stroke-width"))==null?void 0:O.replace("px",""))||1,seed:a});if(t.look==="handDrawn"){const F=xt.svg(f),$=F.rectangle(B,M,k,L,R);if(f.insert(()=>$,":first-child").attr("class","boundary-body label-container"),d==="package"){const v=F.rectangle(B,A,D,q,R);f.insert(()=>v,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else f.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",c).attr("x",B).attr("y",M).attr("width",k).attr("height",L),d==="package"&&f.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",c).attr("x",B).attr("y",A).attr("width",D).attr("height",q);const{subGraphTitleTopMargin:K}=Xs(r);return d==="package"?y.attr("transform",`translate(${B+(D-C.width)/2}, ${A+(q-C.height)/2})`):y.attr("transform",`translate(${t.x-C.width/2}, ${A+K})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=k,t.height=_,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(F){return Mr(t,F)},{cluster:f,labelBBox:C}},"usecaseSystemBoundary"),lT=Om,hT=p((e,t)=>Mm(e,t,{variant:"pool"}),"pool"),cT={rect:Om,squareRect:lT,roundedWithTitle:eT,noteGroup:tT,divider:iT,kanbanSection:rT,flowGroup:aT,usecaseSystemBoundary:nT,swimlane:Mm,pool:hT},uT=new Set(["noteGroup","divider"]),cF=p(e=>!uT.has(e??"rect"),"clusterPaintsTitle"),$m=new Map,dT=p(async(e,t)=>{const r=t.shape||"rect",i=await cT[r](e,t);return $m.set(t.id,i),i},"insertCluster"),uF=p(()=>{$m=new Map},"clear"),gs=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),pe={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},Uu={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5,arrow_open_head:4,arrow_hollow_circle:8};function ws(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=te(e),t=te(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}p(ws,"calculateDeltaAndAngle");var te=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),fT=p(e=>({x:p(function(t,r,i){let s=0;const a=te(i[0]).x<te(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(pe,e.arrowTypeStart)){const{angle:f,deltaX:g}=ws(i[0],i[1]);s=pe[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pe,e.arrowTypeEnd)){const{angle:f,deltaX:g}=ws(i[i.length-1],i[i.length-2]);s=pe[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const n=Math.abs(te(t).x-te(i[i.length-1]).x),o=Math.abs(te(t).y-te(i[i.length-1]).y),l=Math.abs(te(t).x-te(i[0]).x),h=Math.abs(te(t).y-te(i[0]).y),c=pe[e.arrowTypeStart],u=pe[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let f=u+d-n;f*=a==="right"?-1:1,s-=f}if(l<c&&l>0&&h<c){let f=c+d-l;f*=a==="right"?-1:1,s+=f}return te(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=te(i[0]).y<te(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(pe,e.arrowTypeStart)){const{angle:f,deltaY:g}=ws(i[0],i[1]);s=pe[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pe,e.arrowTypeEnd)){const{angle:f,deltaY:g}=ws(i[i.length-1],i[i.length-2]);s=pe[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const n=Math.abs(te(t).y-te(i[i.length-1]).y),o=Math.abs(te(t).x-te(i[i.length-1]).x),l=Math.abs(te(t).y-te(i[0]).y),h=Math.abs(te(t).x-te(i[0]).x),c=pe[e.arrowTypeStart],u=pe[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let f=u+d-n;f*=a==="up"?-1:1,s-=f}if(l<c&&l>0&&h<c){let f=c+d-l;f*=a==="up"?-1:1,s+=f}return te(t).y+s},"y")}),"getLineFunctionsWithOffset"),Dm=1,pT=p(e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:Dm,"getStepDuration"),yh=p(e=>typeof e.step=="number"&&Number.isInteger(e.step)&&e.step>0,"isStepEdge"),ju=[.25,.35,.15,.65,.75,.5,.85,.1,.9],rl=9,gT=11,mT=2,yT="#333333",Gu=12,Xu=6,Vu=14,Zu=.01,CT=4.5,Im=/translate\(\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i,xT=4,bT=.6,kT=4,ST=p((e,t,r=Dm)=>{const i=Math.max(t,e);return{begin:(e-1)*r,dur:r,gap:(i-1)*r}},"getEdgeStepTiming"),wT=p(e=>`step_${Array.from(e,t=>/[\dA-Za-z]/.test(t)?t:`_${(t.codePointAt(0)??0).toString(16)}_`).join("")}`,"toAnimationId"),TT=p(e=>{const t=/^m\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i.exec(e.trim());return t?`translate(${t[1]},${t[2]}) `:""},"pathStartTranslate"),_T=p(e=>Array.from(e,(t,r)=>{const i=t.codePointAt(0)??0;if(i===0)return"�";const s=i<=31||i===127,a=/\d/.test(t)&&(r===0||r===1&&e.startsWith("-"));return s||a?`\\${i.toString(16)} `:e==="-"?"\\-":i>=128||/[\w-]/.test(t)?t:`\\${t}`}).join(""),"escapeCssIdentifierFallback"),Pm=p(e=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):_T(e),"escapeCssIdentifier"),BT=p((e,t)=>{var o;const r=e.node(),i=(r==null?void 0:r.ownerSVGElement)??((o=r==null?void 0:r.closest)==null?void 0:o.call(r,"svg"))??r,s=t||(i==null?void 0:i.getAttribute("id"));if(!i||!s||i.querySelector("style.edge-step-style"))return;const a=`#${Pm(s)} `,n=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","style");n.setAttribute("class","edge-step-style"),n.textContent=`@media (prefers-reduced-motion: reduce) { ${a}.edge-step-dot, ${a}.edge-step-highlight { display: none; } }`,i.appendChild(n)},"ensureReducedMotionStyle"),vT=p((e,t)=>{const r=e.filter(a=>Number.isFinite(a.x)&&Number.isFinite(a.y));if(r.length===0)return;const i=r.slice(1).map((a,n)=>Math.hypot(a.x-r[n].x,a.y-r[n].y));let s=i.reduce((a,n)=>a+n,0)*t;for(const[a,n]of i.entries()){if(s<=n&&n>0){const o=s/n,l=r[a],h=r[a+1];return{x:l.x+(h.x-l.x)*o,y:l.y+(h.y-l.y)*o}}s-=n}return r[r.length-1]},"pointAlongPolyline"),LT=p((e,t)=>{var s;const r=typeof(t==null?void 0:t.getTotalLength)=="function"?t.getTotalLength():0,i=(s=t==null?void 0:t.getPointAtLength)==null?void 0:s.bind(t);return r>0&&i?a=>{const{x:n,y:o}=i(r*a);return{x:n,y:o}}:a=>vT(e,a)},"createPathSampler"),AT=p((e,t)=>Math.min(Number.POSITIVE_INFINITY,...t.map(r=>{const i=Math.max(Math.abs(e.x-r.x)-r.halfWidth,0),s=Math.max(Math.abs(e.y-r.y)-r.halfHeight,0);return Math.hypot(i,s)-rl})),"roomAround"),FT=p((e,t)=>{const r=e(t),i=e(Math.max(t-Zu,0)),s=e(Math.min(t+Zu,1));if(!r||!i||!s)return[];const a=Math.hypot(s.x-i.x,s.y-i.y);if(a===0)return[];const n={x:-(s.y-i.y)/a,y:(s.x-i.x)/a};return[1,-1].map(o=>({x:r.x+n.x*Vu*o,y:r.y+n.y*Vu*o}))},"besideThePath"),ET=p((e,t)=>{const r=[...ju.map(e),...ju.flatMap(a=>FT(e,a))];let i,s=Number.NEGATIVE_INFINITY;for(const a of r){if(!a||!Number.isFinite(a.x)||!Number.isFinite(a.y))continue;const n=AT(a,t);if(n>=mT)return a;n>s&&(i=a,s=n)}return i},"chooseBadgePosition"),Rm=p((e,t)=>({...e,halfWidth:t,halfHeight:t}),"square"),MT=p(e=>{const t=Im.exec(e.getAttribute("transform")??"");return t?{x:Number(t[1]),y:Number(t[2])}:{x:0,y:0}},"translationOf"),Ch=p(e=>{const t={x:0,y:0};for(let r=e;r&&r.localName!=="svg";r=r.parentElement){const{x:i,y:s}=MT(r);t.x+=i,t.y+=s}return t},"offsetInSvg"),OT=p((e,t)=>{var n;if(!Im.test(e.getAttribute("transform")??""))return;const r=Ch(e),i=r.x-t.x,s=r.y-t.y,a=(n=e.getBBox)==null?void 0:n.call(e);if(a)return{x:i+a.x+a.width/2,y:s+a.y+a.height/2,halfWidth:a.width/2,halfHeight:a.height/2}},"boxedObstacle"),$T=p(e=>{try{const t=JSON.parse(atob(e.getAttribute("data-points")??""));return Array.isArray(t)?t:[]}catch{return[]}},"readPoints"),Ku=p((e,t)=>{const r=Math.hypot(e.x-t.x,e.y-t.y);if(r===0)return Rm(e,Gu);const i={x:(e.x-t.x)/r,y:(e.y-t.y)/r},s=Gu/2;return{x:e.x-i.x*s,y:e.y-i.y*s,halfWidth:Math.abs(i.x)*s+Math.abs(i.y)*Xu,halfHeight:Math.abs(i.y)*s+Math.abs(i.x)*Xu}},"arrowheadObstacle"),Qu=p((e,t)=>{const r=e.getAttribute(t);return!!r&&r!=="none"},"hasMarker"),DT=p((e,t)=>{const r=$T(e).filter(o=>Number.isFinite(o==null?void 0:o.x)&&Number.isFinite(o==null?void 0:o.y));if(r.length===0)return[];const i=Ch(e),s=p(o=>({x:o.x+i.x-t.x,y:o.y+i.y-t.y}),"toSvg"),a=r.length-1,n=[];return Qu(e,"marker-start")&&n.push(Ku(s(r[0]),s(r[Math.min(1,a)]))),Qu(e,"marker-end")&&n.push(Ku(s(r[a]),s(r[Math.max(a-1,0)]))),n},"arrowheadObstacles"),qm=p(e=>{const t={x:0,y:0},r=[...(e==null?void 0:e.querySelectorAll(".edgeLabel, .node"))??[]].map(s=>OT(s,t)).filter(s=>s!==void 0),i=[...(e==null?void 0:e.querySelectorAll('path[data-edge="true"]'))??[]].flatMap(s=>DT(s,t));return[...r,...i]},"collectBadgeObstacles"),IT=p((e,t)=>{if(!e.label||t.length===0)return[];const{x:r,y:i}=qe.calcLabelPosition(t);return[{x:r,y:i,halfWidth:(e.width??0)/2,halfHeight:(e.height??0)/2}]},"edgeLabelObstacles"),PT=p(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},"linearChannel"),Ju=p(e=>{try{const[t,r,i]=["r","g","b"].map(s=>PT(Q0(e,s)));return .2126*t+.7152*r+.0722*i}catch{return}},"relativeLuminance"),RT=p((e,t)=>{const r=Ju(e),i=Ju(t);return r===void 0||i===void 0?0:(Math.max(r,i)+.05)/(Math.min(r,i)+.05)},"contrastRatio"),qT=p((e,t)=>{const i=[...t.filter(a=>!!a),"#ffffff","#000000"].map(a=>({color:a,ratio:RT(e,a)}));return(i.find(({ratio:a})=>a>=CT)??i.reduce((a,n)=>n.ratio>a.ratio?n:a)).color},"pickBadgeTextColor"),NT=p(e=>{const t=e==null?void 0:e.replace(/^stroke:\s*/,"").trim();return t===""?void 0:t},"bareColor"),WT=p((e,t,r,i=qm((s=>(s=e.node())==null?void 0:s.closest("svg"))()))=>{if(!yh(t)||!t.showStepNumber)return;const a=Ch(e.node()),n=i.map(c=>({...c,x:c.x-a.x,y:c.y-a.y})),o=ET(LT(r.points,r.pathNode),[...n,...IT(t,r.points)]);if(!o)return;const l=NT(r.color)??yT,h=e.append("g").attr("class","edge-step-badge").attr("transform",`translate(${o.x},${o.y})`).attr("pointer-events","none").attr("data-step",t.step);return h.append("circle").attr("r",rl).attr("fill",l),h.append("text").attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",gT).attr("fill",qT(l,r.textColors??[])).text(String(t.step)),Rm({x:o.x+a.x,y:o.y+a.y},rl)},"insertEdgeStepBadge"),td=p((e,t,r)=>{e.append("animateTransform").attr("attributeName","transform").attr("type","scale").attr("values","1;1").attr("dur",`${r}s`).attr("begin",`${t}.begin`).attr("fill","remove")},"showWhileStepPlays"),zT=p((e,t,r,i,s)=>{if(!yh(t)||!r)return;const{begin:a,dur:n,gap:o}=ST(t.step,t.stepCount??t.step,pT(t.stepDuration)),l=wT(`${i}-${t.id}-step`),h=`${TT(r)}scale(0)`,c=s==null?void 0:s.replace(/^stroke:\s*/,""),u=e.append("path").attr("class","edge-step-highlight").attr("aria-hidden","true").attr("d",r).attr("fill","none").attr("stroke",c??"currentColor").attr("stroke-width",xT).attr("stroke-linecap","round").attr("stroke-opacity",bT).attr("pointer-events","none").attr("transform",h).attr("data-step",t.step);td(u,l,n);const d=e.append("circle").attr("class","edge-step-dot").attr("r",kT).attr("aria-hidden","true").attr("transform",h).attr("data-step",t.step);c&&d.attr("fill",c).attr("stroke","none"),d.append("animateMotion").attr("id",l).attr("path",r).attr("dur",`${n}s`).attr("begin",`${a}s;${l}.end+${o}s`).attr("fill","remove"),td(d,l,n),BT(e,i)},"insertEdgeStepDot"),Qa=new WeakMap,HT=p(e=>{const t=e.querySelector(":scope > g.edge-step-badges");if(t)return t;const r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","g");return r.setAttribute("class","edge-step-badges"),e.appendChild(r)},"badgeLayer"),YT=p(e=>{var i;const t=e?Qa.get(e):void 0;if(!e||!t)return;Qa.delete(e);const r=qm(e);for(const{elem:s,edge:a,options:n}of t){const o=(i=s.node())==null?void 0:i.parentElement;if(!o)continue;const l=qt(HT(o)),h=WT(l,a,n,r);h&&r.push(h)}},"placeQueuedStepBadges"),UT=p((e,t,r,i,s)=>{zT(e,t,r,i,s.color);const a=e.node(),n=(a==null?void 0:a.ownerSVGElement)??a;!n||!yh(t)||!t.showStepNumber||Qa.set(n,[...Qa.get(n)??[],{elem:e,edge:t,options:s}])},"insertEdgeStepMarks"),jT=5;function Nm(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:jT}p(Nm,"resolveEdgeCornerRadius");var Wm=p(({cssCompiledStyles:e})=>Object.entries(e??{}).filter(([t])=>!$f(t)).map(([,t])=>t),"edgeClassStyles"),zm=p(e=>e.animate===!0||!!e.animation||Wm(e).join(";").includes("animation"),"isAnimatedEdge"),GT=p(e=>e.look==="neo"&&!zm(e),"drawsMarginMarkers"),XT=p((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&ed(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&ed(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),VT={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},arrow_open_head:{type:"openArrow",fill:!1},arrow_hollow_circle:{type:"hollowCircle",fill:!1},arrow_hierarchy:{type:"hierarchy",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}},ZT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ed=p((e,t,r,i,s,a,n=!1,o)=>{var g;if(!r||r==="none")return;const l=VT[r],h=l&&ZT.includes(l.type);if(!l){at.warn(`Unknown arrow type: ${r}`);return}const c=l.type,f=`${s}_${a}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),x=`${f}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(f);if(C){const b=C.cloneNode(!0);b.id=x,b.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",o),l.fill&&_.setAttribute("fill",o)}),(g=C.parentNode)==null||g.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),_r=1e-6,KT=p(e=>e&&Number.isFinite(e.x)&&Number.isFinite(e.y),"isFinitePoint"),Hm=p((e,t)=>Math.abs(e.x-t.x)<=_r&&Math.abs(e.y-t.y)<=_r,"samePoint"),Re=p((e,t)=>{(!e.length||!Hm(e.at(-1),t))&&e.push(t)},"appendDistinctPoint"),rd=p((e,t,r)=>{if(!(e!=null&&e.intersect))return;const i=Math.abs(t.x-r.x)<=_r,s=Math.abs(t.y-r.y)<=_r;if(!i&&!s)return;const a=Math.sign(i?t.y-r.y:t.x-r.x);if(!a)return;const n=i?e.height:e.width,o=Math.abs(i?t.y-r.y:t.x-r.x),l=Number.isFinite(e.width)&&e.width>0&&Number.isFinite(e.height)&&e.height>0&&Number.isFinite(n)&&Number.isFinite(o),h=i?{x:t.x,y:t.y+a*(n+o+1)}:{x:t.x+a*(n+o+1),y:t.y},c=e.intersect(l?ow(r,h):r);if(!(!KT(c)||Number.isFinite(e.x)&&Number.isFinite(e.y)&&Hm(c,{x:e.x,y:e.y})||i&&Math.abs(c.x-t.x)>_r||s&&Math.abs(c.y-t.y)>_r||(i?(c.y-t.y)*a:(c.x-t.x)*a)<=_r))return{outline:c,elbow:i?{x:c.x,y:r.y}:{x:r.x,y:c.y}}},"outlineEndpoint"),QT=p((e,t,r)=>{if(!Array.isArray(e)||e.length<2)return e;const i=e[0],s=e[1],a=e[e.length-2],n=e[e.length-1],o=rd(t,i,s),l=rd(r,n,a);if(!o&&!l)return e;const h=[];if(e.length===2){const c=(o==null?void 0:o.outline)??i,u=(l==null?void 0:l.outline)??n,d=Math.abs(i.x-n.x)<=_r,f=Math.abs(i.y-n.y)<=_r;if(!d&&!f)return e;if(Re(h,c),d){const g=(c.y+u.y)/2;Re(h,{x:c.x,y:g}),Re(h,{x:u.x,y:g})}else{const g=(c.x+u.x)/2;Re(h,{x:g,y:c.y}),Re(h,{x:g,y:u.y})}return Re(h,u),h}o?(Re(h,o.outline),Re(h,o.elbow)):Re(h,i);for(const c of e.slice(1,-1))Re(h,c);return l?(Re(h,l.elbow),Re(h,l.outline)):Re(h,n),h},"clipOrthogonalEndpointsToNodeOutlines");function Ym(e){return Array.isArray(e)&&e.length>=2&&e.every(t=>t!==null&&typeof t=="object"&&(t.axis==="v"||t.axis==="h"))}p(Ym,"isAxisTaggedRoute");function Um(e,t){return Math.max(.25,Math.min(.5,4*Math.abs(t)/(Math.abs(e)||1)))}p(Um,"ease");var JT=6,t_=12,e_=5,pa=.62;function jm(e){return e==="linear"||e==="step"||e==="stepBefore"||e==="stepAfter"||e==="rounded"?e:"curved"}p(jm,"curveKind");function il(e){return e?pe[e]??0:0}p(il,"markerTrim");function le(e){if(!Number.isFinite(e))throw new RangeError(`Cannot write the number ${e} into SVG`);const t=Math.round(e*100)/100;return t===0?"0":String(t)}p(le,"num");var Ui,r_=(Ui=class{constructor(){this.d=""}moveTo(t,r){return this.d+="M"+le(t)+","+le(r),this}lineTo(t,r){return this.d+="L"+le(t)+","+le(r),this}curveTo(t,r,i,s,a,n){return this.d+="C"+le(t)+","+le(r)+" "+le(i)+","+le(s)+" "+le(a)+","+le(n),this}quadTo(t,r,i,s){return this.d+="Q"+le(t)+","+le(r)+" "+le(i)+","+le(s),this}arcTo(t,r,i,s,a,n,o){return this.d+="A"+le(t)+","+le(r)+" "+le(i)+" "+(s?"1":"0")+","+(a?"1":"0")+" "+le(n)+","+le(o),this}done(){return this.d}},p(Ui,"PathBuilder"),Ui);function sl(e,t,r){return e==="stepBefore"?t:e==="stepAfter"?r:(t+r)/2}p(sl,"stepCorner");function Gm(e,t,r,i){const s=t==="linear",a=t==="step"||t==="stepBefore"||t==="stepAfter",n=a||t==="rounded",o=[],l=[],h=[],c=p((E,Y,ot,tt)=>Math.abs(E-ot)<.01&&Math.abs(Y-tt)<.01,"near");for(const E of e){const Y=E.axis==="h"?1:0,ot=o.length-1;if(a&&ot>=0&&Math.abs(E.x-o[ot])>=.01&&Math.abs(E.y-l[ot])>=.01){const tt=o[ot],et=l[ot],ct=sl(t,et,E.y),ut=sl(t,tt,E.x),wt=Y===0?[tt,ct,E.x,ct]:[ut,et,ut,E.y];for(let Bt=0;Bt<4;Bt+=2)c(wt[Bt],wt[Bt+1],tt,et)||c(wt[Bt],wt[Bt+1],E.x,E.y)||(o.push(wt[Bt]),l.push(wt[Bt+1]),h.push(Y))}o.push(E.x),l.push(E.y),h.push(Y)}let u=o.length-1;const d=p(E=>o[E],"X"),f=p(E=>l[E],"Y"),g=p(E=>Math.abs(d(E)-d(E-1))<.01||Math.abs(f(E)-f(E-1))<.01,"aligned"),y=p(E=>s||t==="rounded"||g(E),"straight"),x=p((E,Y,ot)=>{if(!y(Math.max(E,Y)))return ot===0?[0,Math.sign(f(Y)-f(E))||1]:[Math.sign(d(Y)-d(E))||1,0];const tt=d(Y)-d(E),et=f(Y)-f(E),ct=Math.hypot(tt,et)||1;return[tt/ct,et/ct]},"unit"),[C,b]=x(0,1,h[1]??0),[k,_]=x(u-1,u,h[u]??0),B=d(0),A=f(0),M=d(u),L=f(u);o[0]=B+C*r,l[0]=A+b*r,o[u]=M-k*i,l[u]=L-_*i;const q=p(E=>Math.abs(d(E)-d(E-1))+Math.abs(f(E)-f(E-1)),"length"),D=p(E=>!s&&E>0&&E<u&&g(E)&&g(E+1)&&q(E)>=.01&&q(E+1)>=.01&&Math.abs(d(E)-d(E-1))<.01!=Math.abs(d(E+1)-d(E))<.01,"turns"),R=p((E,Y,ot)=>Math.abs(d(E)-d(E-1))*Math.abs(Y)+Math.abs(f(E)-f(E-1))*Math.abs(ot),"along"),K=p(E=>Math.min(JT,E/4),"lead"),O=i>0&&(!y(u)||D(u-1))?K(R(u,k,_)):0,F=r>0&&(!y(1)||D(1))?K(R(1,C,b)):0;O>=1&&(o.splice(u,0,d(u)-k*O),l.splice(u,0,f(u)-_*O),h.splice(u,0,h[u]),u++),F>=1&&(o.splice(1,0,d(0)+C*F),l.splice(1,0,f(0)+b*F),h.splice(1,0,h[1]),u++);const $=new r_().moveTo(d(0),f(0));let v=d(0),N=f(0);const P=p((E,Y)=>{c(E,Y,v,N)||($.lineTo(E,Y),v=E,N=Y)},"lineTo");for(let E=1;E<=u;E++){const Y=d(E),ot=f(E);if(!y(E)){const vt=h[E]===0,Ct=vt?ot-N:Y-v,st=Math.abs(Ct)*Um(vt?Y-v:ot-N,Ct),gt=vt?0:Math.sign(Ct)*st,Lt=vt?Math.sign(Ct)*st:0;$.curveTo(v+gt,N+Lt,Y-gt,ot-Lt,Y,ot),v=Y,N=ot;continue}if(!D(E)){if(E<u&&g(E)&&g(E+1)&&(Y-d(E-1))*(d(E+1)-Y)+(ot-f(E-1))*(f(E+1)-ot)>0)continue;P(Y,ot);continue}let tt=D(E-1)?q(E)/2:q(E),et=D(E+1)?q(E+1)/2:q(E+1);n&&(tt=et=Math.min(t==="rounded"?e_:t_,tt,et));const[ct,ut]=x(E-1,E,h[E]),[wt,Bt]=x(E,E+1,h[E+1]);P(Y-ct*tt,ot-ut*tt),v=Y+wt*et,N=ot+Bt*et,t==="rounded"?$.arcTo(tt,tt,0,!1,ct*Bt-ut*wt>0,v,N):n?$.quadTo(Y,ot,v,N):$.curveTo(Y-ct*tt*(1-pa),ot-ut*tt*(1-pa),Y+wt*et*(1-pa),ot+Bt*et*(1-pa),v,N)}return{d:$.done(),sx:B,sy:A,sdx:-C,sdy:-b,ex:M,ey:L,edx:k,edy:_}}p(Gm,"routePath");var i_=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Nt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ja=new Map,xe=new Map,dF=p(()=>{Ja.clear(),xe.clear()},"clear"),fF=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),ms=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),s_=p(async(e,t)=>{const r=Nt();let i=me(r);const{labelStyles:s}=yt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await We(e,t.label,{style:ms(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),at.info("abc82",t,t.labelType);let c,u;if(i){const f=h.children[0],g=qt(h);c=await oi.measure(()=>f.getBoundingClientRect()),u=c,g.attr("width",c.width),g.attr("height",c.height)}else{const f=qt(h).select("text").node();await oi.measure(()=>{c=h.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=c})}n.attr("transform",gs(u,i)),Ja.set(t.id,a),t.width=c.width,t.height=c.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),y=await Br(g,t.startLabelLeft,ms(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=qt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}g.attr("transform",gs(x,i)),xe.get(t.id)||xe.set(t.id,{}),xe.get(t.id).startLeft=f,_s(d,t.startLabelLeft,x),Ts(t,"startLeft",x)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),y=await Br(g,t.startLabelRight,ms(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=qt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}g.attr("transform",gs(x,i)),xe.get(t.id)||xe.set(t.id,{}),xe.get(t.id).startRight=f,_s(d,t.startLabelRight,x),Ts(t,"startRight",x)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),y=await Br(g,t.endLabelLeft,ms(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=qt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}g.attr("transform",gs(x,i)),xe.get(t.id)||xe.set(t.id,{}),xe.get(t.id).endLeft=f,_s(d,t.endLabelLeft,x),Ts(t,"endLeft",x)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),y=await Br(g,t.endLabelRight,ms(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=qt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}g.attr("transform",gs(x,i)),xe.get(t.id)||xe.set(t.id,{}),xe.get(t.id).endRight=f,_s(d,t.endLabelRight,x),Ts(t,"endRight",x)}return h},"insertEdgeLabel");function Ts(e,t,r){e.terminalLabelSizes??(e.terminalLabelSizes={}),e.terminalLabelSizes[t]={width:r.width,height:r.height}}p(Ts,"recordTerminalLabelSize");function _s(e,t,r){me(Nt())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}p(_s,"setTerminalWidth");var a_=p((e,t)=>{let r=e.x,i=e.y;if(t!=null&&t.updatedPath){const s=qe.calcLabelPosition(t.updatedPath);if(t.originalPath){const a=qe.calcLabelPosition(t.originalPath);r=e.x+(s.x-a.x),i=e.y+(s.y-a.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),o_=p((e,t)=>{at.debug("Moving label abc88 ",e.id,e.label,Ja.get(e.id),t);const r=Nt(),{subGraphTitleTotalMargin:i}=Xs(r);if(e.label){const a=Ja.get(e.id),{x:n,y:o}=a_(e,t);at.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",n,",",o,") abc88"),a.attr("transform",`translate(${n}, ${o+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const a=xe.get(e.id).startLeft;let n=e.x,o=e.y;if(s){const l=qe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=xe.get(e.id).startRight;let n=e.x,o=e.y;if(s){const l=qe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=xe.get(e.id).endLeft;let n=e.x,o=e.y;if(s){const l=qe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=xe.get(e.id).endRight;let n=e.x,o=e.y;if(s){const l=qe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),Gi=.5,vr=p((e,t)=>Math.abs(e.x-t.x)<Gi,"sharesColumn"),Lr=p((e,t)=>Math.abs(e.y-t.y)<Gi,"sharesRow"),Xm=p((e,t)=>vr(e,t)&&Lr(e,t),"coincides");function Vm(e,t,r){return vr(e,t)&&!Lr(e,t)?vr(r,t):Lr(e,t)&&!vr(e,t)?Lr(r,t):vr(r,t)||Lr(r,t)}p(Vm,"keepsArrivalAxis");function Zm(e,t,r){return Xm(e,t)?{heading:t,from:r}:{heading:e,from:t}}p(Zm,"arrivalSegment");function Km({heading:e,from:t},r,i){return(e.x-t.x)*(i.x-r.x)+(e.y-t.y)*(i.y-r.y)<0}p(Km,"runsAgainstHeading");function Qm({heading:e,from:t},r,i){return Lr(e,t)&&!vr(e,t)?{x:i.x,y:r.y}:vr(e,t)&&!Lr(e,t)?{x:r.x,y:i.y}:i}p(Qm,"snapToArrivalAxis");function Jm(e,t,r,i){if((vr(e,t)||Lr(e,t))&&!Vm(e,t,i))return e;const a=Zm(e,t,r);return Km(a,t,i)?t:Qm(a,t,i)}p(Jm,"dockFinalPoint");function ty(e){const t=Object.hasOwn(pe,e)?pe[e]:0;return Number.isFinite(t)?t:0}p(ty,"markerPullBack");function ey({originalLast:e,lastInner:t,newLast:r,minLength:i}){const s=!Xm(e,t),a=Math.hypot(r.x-t.x,r.y-t.y);return a>=Math.max(Gi,i)?r:s&&a>=Gi?e:void 0}p(ey,"finalDockPoint");var n_=p((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),l_=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),h_=p((e,t,r)=>{at.debug(`intersection calc abc89:
|
|
295
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
296
|
+
insidePoint : ${JSON.stringify(r)}
|
|
297
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;o=c*u/h;const d={x:r.x<t.x?r.x+o:r.x-c+o,y:r.y<t.y?r.y+h-u:r.y-h+u};return o===0&&(d.x=t.x,d.y=t.y),c===0&&(d.x=t.x),h===0&&(d.y=t.y),at.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${o}`,d),d}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=h*o/c,d=r.x<t.x?r.x+c-o:r.x-c+o,f=r.y<t.y?r.y+u:r.y-u;return at.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),c===0&&(d=t.x),h===0&&(f=t.y),{x:d,y:f}}},"intersection"),id=p((e,t)=>{at.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(at.info("abc88 checking point",a,t),!l_(t,a)&&!s){const n=h_(t,i,a);at.debug("abc88 inside",a,i,n),at.debug("abc88 intersection",n,t);let o=!1;r.forEach(l=>{o=o||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?at.warn("abc88 no intersect",n,r):r.push(n),s=!0}else at.warn("abc88 outside",a,i),i=a,s||r.push(a)}),at.debug("returning points",r),r},"cutPathAtIntersect");function ry(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(ry,"extractCornerPoints");var sd=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),c_=p(function(e){const{cornerPointPositions:t}=ry(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=sd(s,n,5),l=sd(a,n,5),h=l.x-o.x,c=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){at.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const f=5;n.x===o.x?d={x:h<0?o.x-f+u:o.x+f-u,y:c<0?o.y-u:o.y+u}:d={x:h<0?o.x-u:o.x+u,y:c<0?o.y-f+u:o.y+f-u}}else at.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),u_=p((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),l=Number.isFinite(o)?Math.max(0,o):0,h=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),d_=p(function(e,t,r,i,s,a,n,o=!1,l=void 0){var ot;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h,layout:c}=Nt(),u=l??c;let d=t.points,f=!1;const g=s;var y=a;const x=Wm(t),C=Ym(d);if(!C&&t.portClipping==="outline-orthogonal"&&!o)d=QT(d,g,y);else if(!C&&u==="swimlane"){if(!o&&y.intersect&&g.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2){const[tt,et]=d;d=vr(tt,et)||Lr(tt,et)?[g.intersect(tt),y.intersect(et)]:[g.intersect(et),y.intersect(tt)]}else{const tt=d.slice(1,-1),et=tt[0],ct=tt[tt.length-1],ut=g.intersect(et),wt=d[d.length-1],Bt=y.intersect(ct),vt=tt.at(-2)??d[0],Ct=Jm(wt,ct,vt,Bt),st=ey({originalLast:wt,lastInner:ct,newLast:Ct,minLength:ty(t.arrowTypeEnd)}),Lt=Math.abs(ut.x-et.x)<Gi&&Math.abs(ut.y-et.y)<Gi?[]:[ut],zt=st?[st]:[];d=[...Lt,...tt,...zt]}d=n_(t,d)}else!C&&y.intersect&&g.intersect&&!o&&(d=d.slice(1,t.points.length-1),d.unshift(g.intersect(d[0])),d.push(y.intersect(d[d.length-1])));const b=btoa(JSON.stringify(d));t.toCluster&&!C&&(at.info("to cluster abc88",r.get(t.toCluster)),d=id(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&!C&&(at.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=id(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let k=d.filter(tt=>!Number.isNaN(tt.y));const _=i_(t.curve);_!=="rounded"&&!C&&!t.skipCornerFix&&(k=c_(k));let B=Fs;switch(_){case"linear":B=Fs;break;case"basis":B=qn;break;case"cardinal":B=pf;break;case"bumpX":B=hf;break;case"bumpY":B=cf;break;case"catmullRom":B=mf;break;case"monotoneX":B=Sf;break;case"monotoneY":B=wf;break;case"natural":B=_f;break;case"step":B=Bf;break;case"stepAfter":B=Lf;break;case"stepBefore":B=vf;break;case"rounded":B=Fs;break;default:B=qn}const{x:A,y:M}=fT(t),L=o1().x(A).y(M).curve(B);let q;switch(t.thickness){case"normal":q="edge-thickness-normal";break;case"thick":q="edge-thickness-thick";break;case"invisible":q="edge-thickness-invisible";break;default:q="edge-thickness-normal"}switch(t.pattern){case"solid":q+=" edge-pattern-solid";break;case"dotted":q+=" edge-pattern-dotted";break;case"dashed":q+=" edge-pattern-dashed";break;default:q+=" edge-pattern-solid"}let D,R=C?Gm(k,jm(_),il(t.arrowTypeStart),il(t.arrowTypeEnd)).d:_==="rounded"?iy(sy(k,t),Nm(t.cornerRadius)):L(k);const K=Array.isArray(t.style)?t.style:[t.style];let O=K.find(tt=>tt==null?void 0:tt.startsWith("stroke:")),F="";t.animate&&(F="edge-animation-fast"),t.animation&&(F="edge-animation-"+t.animation);let $=!1;if(t.look==="handDrawn"){const tt=xt.svg(e);Object.assign([],k);const et=tt.path(R,{roughness:.3,seed:h});q+=" transition",D=qt(et).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+q+(t.classes?" "+t.classes:"")+(F?" "+F:"")).attr("style",K?K.reduce((ut,wt)=>ut+";"+wt,""):"");let ct=D.attr("d");D.attr("d",ct),e.node().appendChild(D.node())}else{const tt=x.join(";"),et=K?K.reduce((Ct,st)=>Ct+st+";",""):"",ct=(tt?tt+";"+et+";":et)+";"+(K?K.reduce((Ct,st)=>Ct+";"+st,""):"");D=e.append("path").attr("d",R).attr("id",`${n}-${t.id}`).attr("class"," "+q+(t.classes?" "+t.classes:"")+(F?" "+F:"")).attr("style",ct),O=(ot=ct.match(/stroke:([^;]+)/))==null?void 0:ot[1],$=zm(t);const ut=D.node(),wt=typeof ut.getTotalLength=="function"?ut.getTotalLength():0,Bt=Uu[t.arrowTypeStart]||0,vt=Uu[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const st=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?u_(wt,Bt,vt):`0 ${Bt} ${wt-Bt-vt} ${vt}`}; stroke-dashoffset: 0;`;D.attr("style",st+D.attr("style"))}}if(D.attr("data-edge",!0),D.attr("data-et","edge"),D.attr("data-id",t.id),D.attr("data-points",b),D.attr("data-look",de(t.look)),t.step!==void 0){const{themeVariables:tt}=Nt(),et=O??(tt==null?void 0:tt.lineColor);UT(e,t,R,n,{points:k,pathNode:D.node(),color:et,textColors:[tt==null?void 0:tt.background,tt==null?void 0:tt.primaryTextColor]})}t.showPoints&&k.forEach(tt=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",tt.x).attr("cy",tt.y)});let v="";(Nt().flowchart.arrowMarkerAbsolute||Nt().state.arrowMarkerAbsolute)&&(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,v=v.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),at.info("arrowTypeStart",t.arrowTypeStart),at.info("arrowTypeEnd",t.arrowTypeEnd);const N=GT(t);XT(D,t,v,n,i,N,O);const P=Math.floor(d.length/2),E=d[P];qe.isLabelCoordinateInPath(E,D.attr("d"))||(f=!0);let Y={};return f&&(Y.updatedPath=d),Y.originalPath=t.points,Y},"insertEdge");function iy(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,c=n.y-o.y,u=l.x-n.x,d=l.y-n.y,f=Math.hypot(h,c),g=Math.hypot(u,d);if(f<s||g<s){r+=`L${n.x},${n.y}`;continue}const y=h/f,x=c/f,C=u/g,b=d/g,k=y*C+x*b,_=Math.max(-1,Math.min(1,k)),B=Math.acos(_);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${n.x},${n.y}`;continue}const A=Math.min(t/Math.sin(B/2),f/2,g/2),M=n.x-y*A,L=n.y-x*A,q=n.x+C*A,D=n.y+b*A;r+=`L${M},${L}`,r+=`Q${n.x},${n.y} ${q},${D}`}}return r}p(iy,"generateRoundedPath");function al(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(al,"calculateDeltaAndAngle");function sy(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&pe[t.arrowTypeStart]){const s=pe[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=al(a,n),l=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&pe[t.arrowTypeEnd]){const s=pe[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=al(n,a),l=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}p(sy,"applyMarkerOffsetsToPoints");var f_=p((e,t,r,i)=>{t.forEach(s=>{q_[s](e,r,i)})},"insertMarkers"),p_=p((e,t,r)=>{at.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").attr("markerUnits","userSpaceOnUse").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"),g_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),m_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),y_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),C_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),x_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),b_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),k_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),S_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),w_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),T_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),__=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),B_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),v_=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),L_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),A_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),F_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),E_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),M_=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
298
|
+
L20,10
|
|
299
|
+
M20,10
|
|
300
|
+
L0,20`)},"requirement_arrow"),O_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
301
|
+
L20,10
|
|
302
|
+
M20,10
|
|
303
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),$_=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),D_=p((e,t,r)=>{const i=ee(),{themeVariables:s}=i,{strokeWidth:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),I_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),P_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-openArrowEnd").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",11).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1 1 L 11 6 L 1 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-openArrowStart").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",1).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 11 1 L 1 6 L 11 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none")},"openArrow"),R_=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hollowCircleStart").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hollowCircleEnd").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none")},"hollowCircle"),q_={extension:p_,composition:g_,aggregation:m_,dependency:y_,lollipop:C_,point:x_,circle:b_,cross:k_,barb:S_,barbNeo:w_,hierarchy:I_,only_one:T_,zero_or_one:__,one_or_more:B_,zero_or_more:v_,only_one_neo:L_,zero_or_one_neo:A_,one_or_more_neo:F_,zero_or_more_neo:E_,requirement_arrow:M_,requirement_contains:$_,requirement_arrow_neo:O_,requirement_contains_neo:D_,openArrow:P_,hollowCircle:R_},N_=f_,W_={common:Ns,getConfig:ee,insertCluster:dT,insertEdge:d_,insertEdgeLabel:s_,insertMarkers:N_,insertNode:Em,interpolateToCurve:jl,labelHelper:Tt,log:at,positionEdgeLabel:o_},z_=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Ps=Object.create(null),ay=p(e=>{for(const t of e)Ps[t.name]=t},"registerLayoutLoaders"),H_=p(()=>{const e=p(async()=>await Wt(()=>import("./elk-O5DQBFGD-BPi3gK_q.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...z_.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),Y_=p(()=>{ay([{name:"dagre",loader:p(async()=>await Wt(()=>import("./dagre-KIHZ2IZ3-9ncwFAl9.js"),__vite__mapDeps([6,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await Wt(()=>import("./swimlanes-YQL5WMAO-B8ymV9uv.js"),__vite__mapDeps([7,1,2,3,4,5])),"loader")},{name:"grid",loader:p(async()=>await Wt(()=>import("./grid-E2QIVN74-BuI-3sqA.js"),__vite__mapDeps([8,1,2,3,4,5])),"loader")},{name:"layered",loader:p(async()=>await Wt(()=>import("./render-VIF2ZAQL-CjnzRbOQ.js"),__vite__mapDeps([9,3,4,1,2,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await Wt(()=>import("./cose-bilkent-JH36ORCC-DOKkzmxA.js"),__vite__mapDeps([10,11,3,4])),"loader")},...H_()])},"registerDefaultLayoutLoaders");Y_();var pF=p(async(e,t)=>{if(!Object.hasOwn(Ps,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const a of e.nodes){const n=a.domId||a.id;a.domId=`${e.diagramId}-${n}`}const r=Ps[e.layoutAlgorithm],i=await r.loader();S1(t,e.config);const s=await i.render(e,t,W_,{algorithm:r.algorithm});return YT(t.node()),s},"render"),_n="dagre",gF=p((e="",{fallback:t=_n}={})=>{if(Object.hasOwn(Ps,e))return e;for(const r of[t,_n])if(Object.hasOwn(Ps,r))return at.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${_n} is registered.`)},"getRegisteredLayoutAlgorithm"),xh="comm",oy="rule",ny="decl",U_="@media",j_="@import",G_="@supports",X_="@namespace",ol="@keyframes",ly="@layer",V_="@scope",Z_=Math.abs,Os=String.fromCharCode;function hy(e){return e.trim()}function nl(e,t,r){return e.replace(t,r)}function Ai(e,t){return e.charCodeAt(t)|0}function Xi(e,t,r){return e.slice(t,r)}function dr(e){return e.length}function cy(e){return e.length}function ga(e,t){return t.push(e),e}var mo=1,Vi=1,uy=0,Ve=0,he=0,ts="";function bh(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:mo,column:Vi,length:n,return:"",siblings:o}}function K_(){return he}function Q_(){return he=Ve>0?Ai(ts,--Ve):0,Vi--,he===10&&(Vi=1,mo--),he}function tr(){return he=Ve<uy?Ai(ts,Ve++):0,Vi++,he===10&&(Vi=1,mo++),he}function Nr(){return Ai(ts,Ve)}function Ba(){return Ve}function yo(e,t){return Xi(ts,e,t)}function Rs(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 J_(e){return mo=Vi=1,uy=dr(ts=e),Ve=0,[]}function tB(e){return ts="",e}function Bn(e){return hy(yo(Ve-1,ll(e===91?e+2:e===40?e+1:e)))}function eB(e){for(;(he=Nr())&&he<33;)tr();return Rs(e)>2||Rs(he)>3?"":" "}function rB(e,t){for(;--t&&tr()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return yo(e,Ba()+(t<6&&Nr()==32&&tr()==32))}function ll(e){for(;tr();)switch(he){case e:return Ve;case 34:case 39:e!==34&&e!==39&&ll(he);break;case 40:e===41&&ll(e);break;case 92:tr();break}return Ve}function iB(e,t){for(;tr()&&e+he!==57;)if(e+he===84&&Nr()===47)break;return"/*"+yo(t,Ve-1)+"*"+Os(e===47?e:tr())}function sB(e){for(;!Rs(Nr());)tr();return yo(e,Ve)}function aB(e){return tB(va("",null,null,null,[""],e=J_(e),0,[0],e))}function va(e,t,r,i,s,a,n,o,l){for(var h=0,c=0,u=n,d=0,f=0,g=0,y=1,x=1,C=1,b=0,k=0,_="",B=s,A=a,M=i,L=_;x;)switch(g=k,k=tr()){case 40:g!=108&&Ai(L,u-1)==58?(b++,L+="("):L+=Bn(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=Bn(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=Os(k);break}L+=eB(g);break;case 92:L+=rB(Ba()-1,7);continue;case 47:switch(Nr()){case 42:case 47:ga(oB(iB(tr(),Ba()),t,r,l),l),(Rs(g||1)==5||Rs(Nr()||1)==5)&&dr(L)&&Xi(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*y:o[h++]=dr(L)*C;case 125*y:case 59:case 0:if(b>0&&k){L+=Os(k);break}switch(k){case 0:case 125:x=0;case 59+c:C==-1&&(L=nl(L,/\f/g,"")),f>0&&(dr(L)-u||y===0)&&ga(f>32?od(L+";",i,r,u-1,l):od(nl(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(ga(M=ad(L,t,r,h,c,s,o,_,B=[],A=[],u,a),a),k===123)if(c===0)va(L,t,M,M,B,a,u,o,A);else{switch(d){case 99:if(Ai(L,3)===110)break;case 108:if(Ai(L,2)===97)break;default:c=0;case 100:case 109:case 115:}c?va(e,M,M,i&&ga(ad(e,M,M,0,0,s,o,_,s,B=[],u,A),A),s,A,u,o,i?B:A):va(L,M,M,M,[""],A,0,o,A)}}h=c=f=0,y=C=1,_=L="",u=n;break;case 58:u=1+dr(L),f=g;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&Q_()==125)continue}switch(L+=Os(k),k*y){case 38:C=c>0?1:(L+="\f",-1);break;case 44:if(b>0)break;o[h++]=(dr(L)-1)*C,C=1;break;case 64:Nr()===45&&(L+=Bn(tr())),d=Nr(),c=u=dr(_=L+=sB(Ba())),k++;break;case 45:g===45&&dr(L)==2&&(y=0)}}return a}function ad(e,t,r,i,s,a,n,o,l,h,c,u){for(var d=s-1,f=s===0?a:[""],g=cy(f),y=0,x=0,C=0;y<i;++y)for(var b=0,k=Xi(e,d+1,d=Z_(x=n[y])),_=e;b<g;++b)(_=hy(x>0?f[b]+" "+k:nl(k,/&\f/g,f[b])))&&(l[C++]=_);return bh(e,t,r,s===0?oy:o,l,h,c,u)}function oB(e,t,r,i){return bh(e,t,r,xh,Os(K_()),Xi(e,2,-2),0,i)}function od(e,t,r,i,s){return bh(e,t,r,ny,Xi(e,0,i),Xi(e,i+1,-1),i,s)}function hl(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function nB(e,t,r,i){switch(e.type){case ly:if(e.children.length)break;case j_:case X_:case ny:return e.return=e.return||e.value;case xh:return"";case ol:return e.return=e.value+"{"+hl(e.children,i)+"}";case oy:if(!dr(e.value=e.props.join(",")))return""}return dr(r=hl(e.children,i))?e.return=e.value+"{"+r+"}":""}function lB(e){var t=cy(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var dy="c4",hB=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./c4Diagram-M2UUVUY5-CoTmMGy5.js");return{diagram:t}},__vite__mapDeps([12,13,3,4]));return{id:dy,diagram:e}},"loader"),uB={id:dy,detector:hB,loader:cB},dB=uB,fy="flowchart-v2",fB=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./flowDiagram-JAYNFW54-DIf4aoDB.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([14,15,16,17,18,19,13]));return{id:fy,diagram:e}},"loader"),gB={id:fy,detector:fB,loader:pB},mB=gB,py="agentflow",yB=p(e=>/^\s*agentflow(?:-beta)?(?=\s|;|$)/.test(e),"detector"),CB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-QBROCOUO-C2R6lDiO.js");return{diagram:t}},__vite__mapDeps([20,15,16,18,19,13,3,4]));return{id:py,diagram:e}},"loader"),xB={id:py,detector:yB,loader:CB},bB=xB,gy="swimlane",kB=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-BA3ZWDFA-ClHf-9J2.js");return{diagram:t}},__vite__mapDeps([21,14,15,16,17,18,19,13,3,4]));return{id:gy,diagram:e}},"loader"),wB={id:gy,detector:kB,loader:SB},TB=wB,my="er",_B=p(e=>/^\s*erDiagram/.test(e),"detector"),BB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./erDiagram-GT5GOJPG-v00zB8rw.js");return{diagram:t}},__vite__mapDeps([22,17,18,19,3,4]));return{id:my,diagram:e}},"loader"),vB={id:my,detector:_B,loader:BB},LB=vB,yy="gitGraph",AB=p(e=>/^\s*gitGraph/.test(e),"detector"),FB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-VXDFKS5L-2RrHppJt.js");return{diagram:t}},__vite__mapDeps([23,24,25,26,3,4]));return{id:yy,diagram:e}},"loader"),EB={id:yy,detector:AB,loader:FB},MB=EB,Cy="gantt",OB=p(e=>/^\s*gantt/.test(e),"detector"),$B=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ganttDiagram-3PRQTZWP-DRl_shHP.js");return{diagram:t}},__vite__mapDeps([27,3,4,28]));return{id:Cy,diagram:e}},"loader"),DB={id:Cy,detector:OB,loader:$B},IB=DB,xy="info",PB=p(e=>/^\s*info/.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./infoDiagram-ATMJ4U3S-afgUHtXU.js");return{diagram:t}},__vite__mapDeps([29,26,3,4]));return{id:xy,diagram:e}},"loader"),qB={id:xy,detector:PB,loader:RB},by="pie",NB=p(e=>/^\s*pie/.test(e),"detector"),WB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./pieDiagram-36ENHN4W-CX3-kIFy.js");return{diagram:t}},__vite__mapDeps([30,24,26,3,4,28]));return{id:by,diagram:e}},"loader"),zB={id:by,detector:NB,loader:WB},ky="quadrantChart",HB=p(e=>/^\s*quadrantChart/.test(e),"detector"),YB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ZQUDMS73-CrSg-66H.js");return{diagram:t}},__vite__mapDeps([31,28,3,4]));return{id:ky,diagram:e}},"loader"),UB={id:ky,detector:HB,loader:YB},jB=UB,Sy="xychart",GB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),XB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./xychartDiagram-GDYJKCDI-DxF4glgl.js");return{diagram:t}},__vite__mapDeps([32,28,3,4]));return{id:Sy,diagram:e}},"loader"),VB={id:Sy,detector:GB,loader:XB},ZB=VB,wy="requirement",KB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),QB=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./requirementDiagram-AXW2TVFA--vkT5OaJ.js");return{diagram:t}},__vite__mapDeps([33,18,19,3,4]));return{id:wy,diagram:e}},"loader"),JB={id:wy,detector:KB,loader:QB},tv=JB,Ty="sequence",ev=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),rv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3LA2ROMG-Cfn5c7T5.js");return{diagram:t}},__vite__mapDeps([34,25,13,3,4]));return{id:Ty,diagram:e}},"loader"),iv={id:Ty,detector:ev,loader:rv},sv=iv,_y="classDiagram",av=p(e=>/^\s*classDiagram/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./classDiagram-v2-IZLYA2OM-CA7bnKxc.js");return{diagram:t}},__vite__mapDeps([35,16,18,19,13,3,4]));return{id:_y,diagram:e}},"loader"),nv={id:_y,detector:av,loader:ov},lv=nv,By="stateDiagram",hv=p(e=>/^\s*stateDiagram/.test(e),"detector"),cv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-XZFR63ZJ-W23Y_4Yd.js");return{diagram:t}},__vite__mapDeps([36,17,18,19,13,3,4]));return{id:By,diagram:e}},"loader"),uv={id:By,detector:hv,loader:cv},dv=uv,vy="journey",fv=p(e=>/^\s*journey/.test(e),"detector"),pv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./journeyDiagram-POQNLL5X-BM1Liuxy.js");return{diagram:t}},__vite__mapDeps([37,16,13,3,4]));return{id:vy,diagram:e}},"loader"),gv={id:vy,detector:fv,loader:pv},mv=gv,ma=4,ys=75,yv=p(e=>{const t=[];for(const s of e.split(/\s+/)){let a=[...s];for(;a.length>ys;)t.push(a.slice(0,ys).join("")),a=a.slice(ys);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const s of t){const a=i?`${i} ${s}`:s;[...a].length>ys?(r.push(i),i=s):i=a}if(i&&r.push(i),r.length>ma){r.length=ma;const s=r[ma-1]??"";r[ma-1]=`${[...s].slice(0,ys-3).join("")}...`}return r},"wrapErrorMessage"),Cv=p((e,t,r,i)=>{var l,h;at.debug(`rendering svg for syntax error
|
|
304
|
+
`);const s=y1(t),a=s.append("g"),n=yv(((h=i==null?void 0:(l=i.db).getErrorMessage)==null?void 0:h.call(l))??""),o=n.length>0?500+n.length*56:512;s.attr("viewBox",`0 0 2412 ${o}`),Hd(s,100,o,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),n.forEach((c,u)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+u*56).attr("font-size","42px").style("text-anchor","middle").text(c)})},"draw"),Ly={draw:Cv},xv=Ly,vn,bv={clear(){vn=void 0},setErrorMessage(e){vn=e},getErrorMessage(){return vn}},kv={db:bv,renderer:Ly,parser:{parse:p(()=>{},"parse")}},Sv=kv,Ay="flowchart-elk",wv=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),Tv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./flowDiagram-JAYNFW54-DIf4aoDB.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([14,15,16,17,18,19,13]));return{id:Ay,diagram:e}},"loader"),_v={id:Ay,detector:wv,loader:Tv},Bv=_v,Fy="timeline",vv=p(e=>/^\s*timeline/.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./timeline-definition-7Z437IG3-BElgSf_v.js");return{diagram:t}},__vite__mapDeps([38,3,4]));return{id:Fy,diagram:e}},"loader"),Av={id:Fy,detector:vv,loader:Lv},Fv=Av,Ey="mindmap",Ev=p(e=>/^\s*mindmap/.test(e),"detector"),Mv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./mindmap-definition-WVAN44T4-DcgvDd37.js");return{diagram:t}},__vite__mapDeps([39,18,19,3,4]));return{id:Ey,diagram:e}},"loader"),Ov={id:Ey,detector:Ev,loader:Mv},$v=Ov,My="kanban",Dv=p(e=>/^\s*kanban/.test(e),"detector"),Iv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./kanban-definition-BH5XI6FM-Bz439vDv.js");return{diagram:t}},__vite__mapDeps([40,16,3,4]));return{id:My,diagram:e}},"loader"),Pv={id:My,detector:Dv,loader:Iv},Rv=Pv,Oy="sankey",qv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Nv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./sankeyDiagram-FBCJTAIF-CXyuNpgP.js");return{diagram:t}},__vite__mapDeps([41,28,3,4]));return{id:Oy,diagram:e}},"loader"),Wv={id:Oy,detector:qv,loader:Nv},zv=Wv,$y="packet",Hv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),Yv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-WERXNKYE-BMvmqzmc.js");return{diagram:t}},__vite__mapDeps([42,24,26,3,4]));return{id:$y,diagram:e}},"loader"),Uv={id:$y,detector:Hv,loader:Yv},Dy="radar",jv=p(e=>/^\s*radar-beta/.test(e),"detector"),Gv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-7YQZDPLS-B5nOmdUq.js");return{diagram:t}},__vite__mapDeps([43,24,26,3,4]));return{id:Dy,diagram:e}},"loader"),Xv={id:Dy,detector:jv,loader:Gv},Iy="block",Vv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Zv=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./blockDiagram-BEDRHYPZ-BUJZDqr0.js");return{diagram:t}},__vite__mapDeps([44,16,5,3,4]));return{id:Iy,diagram:e}},"loader"),Kv={id:Iy,detector:Vv,loader:Zv},Qv=Kv,Py="treeView",Jv=p(e=>/^\s*treeView-beta/.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-RJJCUUZO-C6CCweHA.js");return{diagram:t}},__vite__mapDeps([45,24,25,26,3,4]));return{id:Py,diagram:e}},"loader"),eL={id:Py,detector:Jv,loader:tL},rL=eL,Ry="architecture",iL=p(e=>/^\s*architecture/.test(e),"detector"),sL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./architectureDiagram-CSQXQB3N-BTCN41JR.js");return{diagram:t}},__vite__mapDeps([46,24,26,3,4,11]));return{id:Ry,diagram:e}},"loader"),aL={id:Ry,detector:iL,loader:sL},oL=aL,qy="eventmodeling",nL=p(e=>/^\s*eventmodeling/.test(e),"detector"),lL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-YHHI257C-mq9rFYCr.js");return{diagram:t}},__vite__mapDeps([47,24,26,3,4]));return{id:qy,diagram:e}},"loader"),hL={id:qy,detector:nL,loader:lL},cL=hL,Ny="ishikawa",uL=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-S3EKX5GW-BsIUfApm.js");return{diagram:t}},__vite__mapDeps([48,3,4]));return{id:Ny,diagram:e}},"loader"),fL={id:Ny,detector:uL,loader:dL},Wy="venn",pL=p(e=>/^\s*venn-beta/.test(e),"detector"),gL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./vennDiagram-SHRQU5PJ-034PLwGh.js");return{diagram:t}},__vite__mapDeps([49,3,4]));return{id:Wy,diagram:e}},"loader"),mL={id:Wy,detector:pL,loader:gL},yL=mL,zy="treemap",CL=p(e=>/^\s*treemap/.test(e),"detector"),xL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./diagram-YR4HJLHV-GnLZxfuk.js");return{diagram:t}},__vite__mapDeps([50,19,24,26,3,4,28]));return{id:zy,diagram:e}},"loader"),bL={id:zy,detector:CL,loader:xL},Hy="usecase",kL=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),SL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./usecaseDiagram-RDK6N6HP-BfopeYcl.js");return{diagram:t}},__vite__mapDeps([51,18,19,3,4]));return{id:Hy,diagram:e}},"loader"),wL={id:Hy,detector:kL,loader:SL},Yy="wardley",TL=p(e=>/^\s*wardley-beta/i.test(e),"detector"),_L=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./wardleyDiagram-F3OXNVQS-Cmiyei3a.js");return{diagram:t}},__vite__mapDeps([52,24,26,3,4]));return{id:Yy,diagram:e}},"loader"),BL={id:Yy,detector:TL,loader:_L},vL=BL,Uy="cynefin",LL=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),AL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./cynefinDiagram-NJNITYFG-C37MEEtf.js");return{diagram:t}},__vite__mapDeps([53,24,26,3,4]));return{id:Uy,diagram:e}},"loader"),FL={id:Uy,detector:LL,loader:AL},jy="railroad",EL=p(e=>/^\s*railroad-beta/i.test(e),"detector"),ML=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./railroadDiagram-JIZHGYPL-DBm7mKc_.js");return{diagram:t}},__vite__mapDeps([54,55,24,26,3,4]));return{id:jy,diagram:e}},"loader"),OL={id:jy,detector:EL,loader:ML},Gy="railroadEbnf",$L=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),DL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./ebnfDiagram-N527522P-BD49AZHw.js");return{diagram:t}},__vite__mapDeps([56,55,24,26,3,4]));return{id:Gy,diagram:e}},"loader"),IL={id:Gy,detector:$L,loader:DL},Xy="railroadAbnf",PL=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),RL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./abnfDiagram-XWFEHMT6-DmNFXSdi.js");return{diagram:t}},__vite__mapDeps([57,55,24,26,3,4]));return{id:Xy,diagram:e}},"loader"),qL={id:Xy,detector:PL,loader:RL},Vy="railroadPeg",NL=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),WL=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./pegDiagram-D4NLKWP3-Bs1FcfRL.js");return{diagram:t}},__vite__mapDeps([58,55,24,26,3,4]));return{id:Vy,diagram:e}},"loader"),zL={id:Vy,detector:NL,loader:WL},nd=!1,Co=p(()=>{nd||(nd=!0,$a("error",Sv,e=>e.toLowerCase().trim()==="error"),$a("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Fn(Bv,$v,oL),Fn(bB,dB,Rv,lv,LB,IB,qB,zB,tv,sv,TB,mB,Fv,MB,dv,mv,jB,zv,Uv,ZB,Qv,cL,rL,Xv,fL,bL,OL,IL,qL,zL,yL,vL,FL,wL))},"addDiagrams"),HL=p(async()=>{at.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(si).map(async([r,{detector:i,loader:s}])=>{if(s)try{In(r)}catch{try{const{diagram:a,id:n}=await s();$a(n,a,i)}catch(a){throw at.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete si[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){at.error(`Failed to load ${t.length} external diagrams`);for(const r of t)at.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),YL="graphics-document document";function Zy(e,t){e.attr("role",YL),t!==""&&e.attr("aria-roledescription",t)}p(Zy,"setA11yDiagramInfo");function Ky(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(Ky,"addSVGa11yTitleDescription");var ii,to=(ii=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var d,f,g,y,x;const i=typeof t=="string"?{cleaned:t}:t,s=ee(),a=io(i.cleaned,s);try{In(a)}catch{const C=UC(a);if(!C)throw new wd(`Diagram ${a} not found.`);const{id:b,diagram:k}=await C();$a(b,k)}const{db:n,parser:o,renderer:l,init:h}=In(a);o.parser&&(o.parser.yy=n),(d=n.clear)==null||d.call(n),h==null||h(s),r.title&&((f=n.setDiagramTitle)==null||f.call(n,r.title));let c=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const C=s.maxTextSize??fl.maxTextSize;i.withComments.length>C?at.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${C}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):c=i.withComments}const u=V2(c)+`
|
|
305
|
+
`;return i.frontmatterLineOffset&&((g=n.setFrontmatterLineOffset)==null||g.call(n,i.frontmatterLineOffset)),await o.parse(u),s.layout==="grid"&&Fd((y=s.grid)==null?void 0:y.placements,[]),(x=n.validate)==null||x.call(n),new ii(a,u,n,o,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ii,"Diagram"),ii),ld=[],UL=p(()=>{ld.forEach(e=>{e()}),ld=[]},"attachFunctions"),jL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Qy(e){const t=Sd(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
|
|
306
|
+
`).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
|
|
307
|
+
`):t.body;let s=k1(i,{schema:b1})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t.length),metadata:a}}p(Qy,"extractFrontMatter");var GL=p(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),XL=p(e=>{const{text:t,metadata:r}=Qy(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),VL=p(e=>{const t=qe.detectInit(e)??{},r=qe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:I2(e),directive:t}},"processDirectives");function kh(e){const t=e,r=GL(e),i=XL(r),s=VL(i.text),a=Kl(i.config,s.directive),n=s.text,o=jL(n),l=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:o,withComments:n,frontmatterLineOffset:l},title:i.title,config:a}}p(kh,"preprocessDiagram");function Jy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Jy,"toBase64");var ZL=5e4,KL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",QL="sandbox",JL="loose",tA="http://www.w3.org/2000/svg",eA="http://www.w3.org/1999/xlink",rA="http://www.w3.org/1999/xhtml",iA="100%",sA="100%",aA="border:0;margin:0;",oA="margin:0",nA="allow-top-navigation-by-user-activation allow-popups",lA='The "iframe" tag is not supported by your browser.',hA=["foreignobject"],cA=["dominant-baseline"];function Sh(e){const t=kh(e);$s();let r;try{r=io(t.code.cleaned,ee())}catch{r=void 0}return pl(r),Fx(t.config??{}),t}p(Sh,"processAndSetConfigs");async function t0(e,t){Co();try{const{code:r,config:i}=Sh(e);return{diagramType:(await to.fromText(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}finally{pl(void 0)}}p(t0,"parse");var hd=p((e,t,r=[])=>{const i=$d(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),uA=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=me(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{eu(l.styles)||o.forEach(h=>{r.insertRule(hd(l.id,h,l.styles),r.cssRules.length)}),eu(l.textStyles)||r.insertRule(hd(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Dn(s)+`
|
|
309
|
+
`}else i+=`${e.themeCSS}
|
|
310
|
+
`;return i+Dn(r)},"createCssStyles"),dA=p((e,t)=>hl(aB(`${e}{${t}}`),lB([p(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===ol)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[U_,G_,ly,V_,"@container","@starting-style"],ol].includes(i.type)||(at.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=xh))},"addNamespace"),nB])),"compileCSS"),fA=p((e,t,r,i)=>{const s=uA(e,r),a=Kx(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return dA(i,a)},"createUserStyles"),pA=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Yr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),gA=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":sA,i=Jy(`<body style="${oA}">${e}</body>`);return`<iframe style="width:${iA};height:${r};${aA}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${nA}">
|
|
311
|
+
${lA}
|
|
312
|
+
</iframe>`},"putIntoIFrame"),cd=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",tA);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function cl(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(cl,"sandboxedIframe");var mA=p((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),yA=p(async function(e,t,r){var $,v,N,P,E,Y,ot,tt;Co();let i,s;try{i=Sh(t)}catch(et){s=et,$s()}let a=i==null?void 0:i.code;t=(a==null?void 0:a.cleaned)??t;const n=ee();at.debug(n),t.length>((n==null?void 0:n.maxTextSize)??ZL)&&(t=KL,a={raw:t,cleaned:t});const o=`#${Pm(e)}`,l="i"+e,h="#"+l,c="d"+e,u="#"+c,d=p(()=>{const ct=qt(g?h:u).node();ct&&"remove"in ct&&ct.remove()},"removeTempElements");let f=qt(document.body);const g=n.securityLevel===QL,y=n.securityLevel===JL,x=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const et=cl(qt(r),l);f=qt(et.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=qt(r);cd(f,e,c,`font-family: ${x}`,eA)}else{if(mA(document,e,c,l),g){const et=cl(qt(document.body),l);f=qt(et.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=qt("body");cd(f,e,c)}let C,b;try{if(!i||!a)throw s;C=await to.fromText(a,{title:i.title})}catch(et){if(n.suppressErrorRendering)throw d(),et;C=await to.fromText("error"),b=et,(v=($=C.db).setErrorMessage)==null||v.call($,rp(et))}const k=f.select(u).node(),_=C.type,B=k.firstChild,A=B.firstChild,M=(P=(N=C.renderer).getClasses)==null?void 0:P.call(N,t,C),L=fA(n,_,M,o),q=document.createElement("style");q.innerHTML=L,B.insertBefore(q,A);try{await C.renderer.draw(t,e,"12.4.1",C)}catch(et){throw n.suppressErrorRendering?d():xv.draw(t,e,"12.4.1"),et}const D=f.select(`${u} svg`),R=(Y=(E=C.db).getAccTitle)==null?void 0:Y.call(E),K=(tt=(ot=C.db).getAccDescription)==null?void 0:tt.call(ot);r0(_,D,R,K);const F=p(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",rA);let et=f.select(u).node().innerHTML;if(at.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),et=pA(et,g,mr(n.arrowMarkerAbsolute)),g){const ct=f.select(u+" svg").node();et=gA(et,ct)}else y||(et=ji.sanitize(et,{ADD_TAGS:hA,ADD_ATTR:cA,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return UL(),et},"serializeSvg")();if(b)throw b;return d(),{diagramType:_,svg:F,bindFunctions:C.db.bindFunctions}},"renderDiagram"),CA=p(async function(e,t,r){try{return await yA(e,t,r)}finally{pl(void 0)}},"render");function e0(e={}){var s;const t=ce({},e);t!=null&&t.fontFamily&&!((s=t.themeVariables)!=null&&s.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Lx(t);const r=zr.theme;t!=null&&t.theme&&Object.hasOwn(Ar,t.theme)?t.themeVariables=Ar[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=Ar[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?vx(t):Dd();ul(i.logLevel),Co()}p(e0,"initialize");var xA=p((e,t={})=>{const{code:r}=kh(e);return to.fromText(r,t)},"getDiagramFromText");function r0(e,t,r,i){Zy(t,e),Ky(t,r,i,t.attr("id"))}p(r0,"addA11yInfo");var ni=Object.freeze({render:CA,parse:t0,getDiagramFromText:xA,initialize:e0,getConfig:ee,setConfig:Id,getSiteConfig:Dd,updateSiteConfig:Ax,reset:p(()=>{$s()},"reset"),globalReset:p(()=>{$s(zr)},"globalReset"),defaultConfig:zr});ul(ee().logLevel);$s(ee());var bA=p((e,t,r)=>{at.warn(e),Zl(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"),i0=p(async function(e={querySelector:".mermaid"}){try{await kA(e)}catch(t){if(Zl(t)&&at.error(t.str),Ne.parseError&&Ne.parseError(t),!e.suppressErrors)throw at.error("Use the suppressErrors option to suppress these errors"),t}},"run"),kA=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ni.getConfig();at.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");at.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(at.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),ni.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new qe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(s)){if(at.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=l.innerHTML,n=gp(qe.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=qe.detectInit(n);c&&at.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:d}=await n0(h,n,l);l.innerHTML=u,e&&await e(h),d&&d(l)}catch(u){bA(u,o,Ne.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),s0=p(function(e){ni.initialize(e)},"initialize"),SA=p(async function(e,t,r){at.warn("mermaid.init is deprecated. Please use run instead."),e&&s0(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await i0(i)},"init"),wA=p(async(e,{lazyLoad:t=!0}={})=>{Co(),Fn(...e),t===!1&&await HL()},"registerExternalDiagrams"),a0=p(function(){if(Ne.startOnLoad){const{startOnLoad:e}=ni.getConfig();e&&Ne.run().catch(t=>at.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",a0,!1);var TA=p(function(e){Ne.parseError=e},"setParseErrorHandler"),eo=[],Ln=!1,o0=p(async()=>{if(!Ln){for(Ln=!0;eo.length>0;){const e=eo.shift();if(e)try{await e()}catch(t){at.error("Error executing queue",t)}}Ln=!1}},"executeQueue"),_A=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,n)=>{ni.parse(e,t).then(o=>{a(o),r(o)},o=>{var l;at.error("Error parsing",o),(l=Ne.parseError)==null||l.call(Ne,o),n(o),i(o)})}),"performCall");eo.push(s),o0().catch(i)}),"parse"),n0=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((n,o)=>{ni.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;at.error("Error parsing",l),(h=Ne.parseError)==null||h.call(Ne,l),o(l),s(l)})}),"performCall");eo.push(a),o0().catch(s)}),"render"),BA=p(()=>Object.keys(si).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ne={startOnLoad:!0,mermaidAPI:ni,parse:_A,render:n0,init:SA,run:i0,registerExternalDiagrams:wA,registerLayoutLoaders:ay,initialize:s0,parseError:void 0,contentLoaded:a0,setParseErrorHandler:TA,detectType:io,registerIconPacks:Pf,getRegisteredDiagramsMetadata:BA},vA=Ne;/*! Check if previously processed *//*!
|
|
313
|
+
* Wait for document loaded before starting the execution
|
|
314
|
+
*/const mF=Object.freeze(Object.defineProperty({__proto__:null,default:vA},Symbol.toStringTag,{value:"Module"}));export{Ds as $,Qx as A,Fd as B,$A as C,F1 as D,VA as E,zl as F,ZA as G,Wr as H,Q0 as I,b1 as J,v1 as K,Df as L,H0 as M,ee as N,ob as O,Kl as P,fl as Q,W2 as R,y1 as S,no as T,DA as U,IA as V,KC as W,qS as X,o1 as Y,e2 as Z,p as _,tb as a,Yf as a$,MA as a0,M2 as a1,Nx as a2,zd as a3,cc as a4,N2 as a5,qs as a6,$e as a7,G as a8,X as a9,wi as aA,Ym as aB,ow as aC,Um as aD,yt as aE,$f as aF,Yl as aG,Wf as aH,Qc as aI,Es as aJ,y2 as aK,m2 as aL,g2 as aM,p2 as aN,o2 as aO,zf as aP,h2 as aQ,a2 as aR,d2 as aS,Hf as aT,l2 as aU,b2 as aV,x2 as aW,C2 as aX,S2 as aY,k2 as aZ,n2 as a_,Xx as aa,Yd as ab,EA as ac,dT as ad,Em as ae,hF as af,li as ag,Pf as ah,Vl as ai,xt as aj,Nm as ak,pe as al,N_ as am,lF as an,dF as ao,uF as ap,d_ as aq,fF as ar,Ja as as,s_ as at,Xs as au,a_ as av,xe as aw,Tt as ax,Ad as ay,Ld as az,Jx as b,f2 as b0,u2 as b1,c2 as b2,Uf as b3,S1 as b4,o_ as b5,Jf as b6,Ze as b7,md as b8,Fs as b9,cF as ba,Uu as bb,GT as bc,We as bd,K1 as be,G0 as bf,Cp as bg,bt as bh,nF as bi,yh as bj,pT as bk,mF as bl,Nt as c,Hd as d,ce as e,Er as f,rb as g,Fm as h,pt as i,Ge as j,qt as k,at as l,Ns as m,ep as n,OA as o,gF as p,ib as q,pF as r,eb as s,sb as t,qe as u,k1 as v,Y2 as w,Jw as x,KA as y,ji as z};
|