UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

1 lines 3.57 MB
"use strict";var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var SGe=Object.create;var Ix=Object.defineProperty;var wGe=Object.getOwnPropertyDescriptor;var kGe=Object.getOwnPropertyNames;var EGe=Object.getPrototypeOf,AGe=Object.prototype.hasOwnProperty;var s=(e,t)=>Ix(e,"name",{value:t,configurable:!0});var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var As=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sr=(e,t)=>{for(var r in t)Ix(e,r,{get:t[r],enumerable:!0})},OX=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kGe(t))!AGe.call(e,i)&&i!==r&&Ix(e,i,{get:()=>t[i],enumerable:!(n=wGe(t,i))||n.enumerable});return e};var Rs=(e,t,r)=>(r=e!=null?SGe(EGe(e)):{},OX(t||!e||!e.__esModule?Ix(r,"default",{value:e,enumerable:!0}):r,e)),RGe=e=>OX(Ix({},"__esModule",{value:!0}),e);var _Ge,B0,uD,BX,fw=F(()=>{"use strict";_Ge=Object.freeze({left:0,top:0,width:16,height:16}),B0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),uD=Object.freeze({..._Ge,...B0}),BX=Object.freeze({...uD,body:"",hidden:!1})});var LGe,$X,FX=F(()=>{"use strict";fw();LGe=Object.freeze({width:null,height:null}),$X=Object.freeze({...LGe,...B0})});var hD,pw,GX=F(()=>{"use strict";hD=s((e,t,r,n="")=>{let i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return t&&!pw(h)?null:h}let a=i[0],o=a.split("-");if(o.length>1){let l={provider:n,prefix:o.shift(),name:o.join("-")};return t&&!pw(l)?null:l}if(r&&n===""){let l={provider:n,prefix:"",name:a};return t&&!pw(l,r)?null:l}return null},"stringToIcon"),pw=s((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName")});function zX(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}var VX=F(()=>{"use strict";s(zX,"mergeIconTransformations")});function dD(e,t){let r=zX(e,t);for(let n in BX)n in B0?n in e&&!(n in r)&&(r[n]=B0[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}var WX=F(()=>{"use strict";fw();VX();s(dD,"mergeIconData")});function qX(e,t){let r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function a(o){if(r[o])return i[o]=[];if(!(o in i)){i[o]=null;let l=n[o]&&n[o].parent,u=l&&a(l);u&&(i[o]=[l].concat(u))}return i[o]}return s(a,"resolve"),(t||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var HX=F(()=>{"use strict";s(qX,"getIconsTree")});function UX(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function o(l){a=dD(n[l]||i[l],a)}return s(o,"parse"),o(t),r.forEach(o),dD(e,a)}function fD(e,t){if(e.icons[t])return UX(e,t,[]);let r=qX(e,[t])[t];return r?UX(e,t,r):null}var YX=F(()=>{"use strict";WX();HX();s(UX,"internalGetIconData");s(fD,"getIconData")});function pD(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;let n=e.split(DGe);if(n===null||!n.length)return e;let i=[],a=n.shift(),o=IGe.test(a);for(;;){if(o){let l=parseFloat(a);isNaN(l)?i.push(a):i.push(Math.ceil(l*t*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");o=!o}}var DGe,IGe,jX=F(()=>{"use strict";DGe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,IGe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;s(pD,"calculateSize")});function MGe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;n>=0;){let i=e.indexOf(">",n),a=e.indexOf("</"+t);if(i===-1||a===-1)break;let o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(o+1)}return{defs:r,content:e}}function NGe(e,t){return e?"<defs>"+e+"</defs>"+t:t}function XX(e,t,r){let n=MGe(e);return NGe(n.defs,t+n.content+r)}var KX=F(()=>{"use strict";s(MGe,"splitSVGDefs");s(NGe,"mergeDefsAndContent");s(XX,"wrapSVGContent")});function mD(e,t){let r={...uD,...e},n={...$X,...t},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(y=>{let v=[],x=y.hFlip,b=y.vFlip,T=y.rotate;x?b?T+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let w;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:w=i.height/2+i.top,v.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,v.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}T%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),v.length&&(a=XX(a,'<g transform="'+v.join(" ")+'">',"</g>"))});let o=n.width,l=n.height,u=i.width,h=i.height,d,f;o===null?(f=l===null?"1em":l==="auto"?h:l,d=pD(f,u/h)):(d=o==="auto"?u:o,f=l===null?pD(d,h/u):l==="auto"?h:l);let p={},m=s((y,v)=>{PGe(v)||(p[y]=v.toString())},"setAttr");m("width",d),m("height",f);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}var PGe,ZX=F(()=>{"use strict";fw();FX();jX();KX();PGe=s(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");s(mD,"iconToSVG")});function gD(e,t=BGe){let r=[],n;for(;n=OGe.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let o=typeof t=="function"?t(a):t+($Ge++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}var OGe,BGe,$Ge,QX=F(()=>{"use strict";OGe=/\sid="(\S+)"/g,BGe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),$Ge=0;s(gD,"replaceIDs")});function yD(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var JX=F(()=>{"use strict";s(yD,"iconToHTML")});var eK=F(()=>{"use strict";GX();YX();ZX();QX();JX()});var vD,ii,$0=F(()=>{"use strict";vD=s((e,t,{depth:r=2}={})=>{let n={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(i=>vD(e,i,n)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(i=>{e.includes(i)||e.push(i)}),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"){let i=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),i[a]===void 0&&(i[a]=Array.isArray(o)?[]:{}),typeof i[a]=="object"&&(i[a]=vD(i[a],o,{depth:r-1}))}else typeof i[a]!="object"&&(Object.hasOwn(e,a)?i[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ii=vD});var mw=As((xD,bD)=>{"use strict";(function(e,t){typeof xD=="object"&&typeof bD<"u"?bD.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(xD,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",l="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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:s(function(_){var A=["th","st","nd","rd"],I=_%100;return"["+_+(A[(I-20)%10]||A[I]||A[0])+"]"},"ordinal")},x=s(function(_,A,I){var D=String(_);return!D||D.length>=A?_:""+Array(A+1-D.length).join(I)+_},"m"),b={s:x,z:s(function(_){var A=-_.utcOffset(),I=Math.abs(A),D=Math.floor(I/60),L=I%60;return(A<=0?"+":"-")+x(D,2,"0")+":"+x(L,2,"0")},"z"),m:s(function _(A,I){if(A.date()<I.date())return-_(I,A);var D=12*(I.year()-A.year())+(I.month()-A.month()),L=A.clone().add(D,h),B=I-L<0,O=A.clone().add(D+(B?-1:1),h);return+(-(D+(I-L)/(B?L-O:O-L))||0)},"t"),a:s(function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},"a"),p:s(function(_){return{M:h,y:f,w:u,d:l,D:p,h:o,m:a,s:i,ms:n,Q:d}[_]||String(_||"").toLowerCase().replace(/s$/,"")},"p"),u:s(function(_){return _===void 0},"u")},T="en",w={};w[T]=v;var C="$isDayjsObject",S=s(function(_){return _ instanceof P||!(!_||!_[C])},"S"),k=s(function _(A,I,D){var L;if(!A)return T;if(typeof A=="string"){var B=A.toLowerCase();w[B]&&(L=B),I&&(w[B]=I,L=B);var O=A.split("-");if(!L&&O.length>1)return _(O[0])}else{var $=A.name;w[$]=A,L=$}return!D&&L&&(T=L),L||!D&&T},"t"),R=s(function(_,A){if(S(_))return _.clone();var I=typeof A=="object"?A:{};return I.date=_,I.args=arguments,new P(I)},"O"),M=b;M.l=k,M.i=S,M.w=function(_,A){return R(_,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var P=(function(){function _(I){this.$L=k(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[C]=!0}s(_,"M");var A=_.prototype;return A.parse=function(I){this.$d=(function(D){var L=D.date,B=D.utc;if(L===null)return new Date(NaN);if(M.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var O=L.match(g);if(O){var $=O[2]-1||0,W=(O[7]||"0").substring(0,3);return B?new Date(Date.UTC(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)):new Date(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)}}return new Date(L)})(I),this.init()},A.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},A.$utils=function(){return M},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(I,D){var L=R(I);return this.startOf(D)<=L&&L<=this.endOf(D)},A.isAfter=function(I,D){return R(I)<this.startOf(D)},A.isBefore=function(I,D){return this.endOf(D)<R(I)},A.$g=function(I,D,L){return M.u(I)?this[D]:this.set(L,I)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(I,D){var L=this,B=!!M.u(D)||D,O=M.p(I),$=s(function(Z,pe){var te=M.w(L.$u?Date.UTC(L.$y,pe,Z):new Date(L.$y,pe,Z),L);return B?te:te.endOf(l)},"l"),W=s(function(Z,pe){return M.w(L.toDate()[Z].apply(L.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(pe)),L)},"$"),V=this.$W,z=this.$M,H=this.$D,K="set"+(this.$u?"UTC":"");switch(O){case f:return B?$(1,0):$(31,11);case h:return B?$(1,z):$(0,z+1);case u:var J=this.$locale().weekStart||0,ne=(V<J?V+7:V)-J;return $(B?H-ne:H+(6-ne),z);case l:case p:return W(K+"Hours",0);case o:return W(K+"Minutes",1);case a:return W(K+"Seconds",2);case i:return W(K+"Milliseconds",3);default:return this.clone()}},A.endOf=function(I){return this.startOf(I,!1)},A.$set=function(I,D){var L,B=M.p(I),O="set"+(this.$u?"UTC":""),$=(L={},L[l]=O+"Date",L[p]=O+"Date",L[h]=O+"Month",L[f]=O+"FullYear",L[o]=O+"Hours",L[a]=O+"Minutes",L[i]=O+"Seconds",L[n]=O+"Milliseconds",L)[B],W=B===l?this.$D+(D-this.$W):D;if(B===h||B===f){var V=this.clone().set(p,1);V.$d[$](W),V.init(),this.$d=V.set(p,Math.min(this.$D,V.daysInMonth())).$d}else $&&this.$d[$](W);return this.init(),this},A.set=function(I,D){return this.clone().$set(I,D)},A.get=function(I){return this[M.p(I)]()},A.add=function(I,D){var L,B=this;I=Number(I);var O=M.p(D),$=s(function(z){var H=R(B);return M.w(H.date(H.date()+Math.round(z*I)),B)},"y");if(O===h)return this.set(h,this.$M+I);if(O===f)return this.set(f,this.$y+I);if(O===l)return $(1);if(O===u)return $(7);var W=(L={},L[a]=t,L[o]=r,L[i]=e,L)[O]||1,V=this.$d.getTime()+I*W;return M.w(V,this)},A.subtract=function(I,D){return this.add(-1*I,D)},A.format=function(I){var D=this,L=this.$locale();if(!this.isValid())return L.invalidDate||m;var B=I||"YYYY-MM-DDTHH:mm:ssZ",O=M.z(this),$=this.$H,W=this.$m,V=this.$M,z=L.weekdays,H=L.months,K=L.meridiem,J=s(function(pe,te,fe,ce){return pe&&(pe[te]||pe(D,B))||fe[te].slice(0,ce)},"h"),ne=s(function(pe){return M.s($%12||12,pe,"0")},"d"),Z=K||function(pe,te,fe){var ce=pe<12?"AM":"PM";return fe?ce.toLowerCase():ce};return B.replace(y,(function(pe,te){return te||(function(fe){switch(fe){case"YY":return String(D.$y).slice(-2);case"YYYY":return M.s(D.$y,4,"0");case"M":return V+1;case"MM":return M.s(V+1,2,"0");case"MMM":return J(L.monthsShort,V,H,3);case"MMMM":return J(H,V);case"D":return D.$D;case"DD":return M.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return J(L.weekdaysMin,D.$W,z,2);case"ddd":return J(L.weekdaysShort,D.$W,z,3);case"dddd":return z[D.$W];case"H":return String($);case"HH":return M.s($,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return Z($,W,!0);case"A":return Z($,W,!1);case"m":return String(W);case"mm":return M.s(W,2,"0");case"s":return String(D.$s);case"ss":return M.s(D.$s,2,"0");case"SSS":return M.s(D.$ms,3,"0");case"Z":return O}return null})(pe)||O.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(I,D,L){var B,O=this,$=M.p(D),W=R(I),V=(W.utcOffset()-this.utcOffset())*t,z=this-W,H=s(function(){return M.m(O,W)},"D");switch($){case f:B=H()/12;break;case h:B=H();break;case d:B=H()/3;break;case u:B=(z-V)/6048e5;break;case l:B=(z-V)/864e5;break;case o:B=z/r;break;case a:B=z/t;break;case i:B=z/e;break;default:B=z}return L?B:M.a(B)},A.daysInMonth=function(){return this.endOf(h).$D},A.$locale=function(){return w[this.$L]},A.locale=function(I,D){if(!I)return this.$L;var L=this.clone(),B=k(I,D,!0);return B&&(L.$L=B),L},A.clone=function(){return M.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},_})(),N=P.prototype;return R.prototype=N,[["$ms",n],["$s",i],["$m",a],["$H",o],["$W",l],["$M",h],["$y",f],["$D",p]].forEach((function(_){N[_[1]]=function(A){return this.$g(A,_[0],_[1])}})),R.extend=function(_,A){return _.$i||(_(A,P,R),_.$i=!0),R},R.locale=k,R.isDayjs=S,R.unix=function(_){return R(1e3*_)},R.en=w[T],R.Ls=w,R.p={},R}))});var tK,Ju,se,Mx,ul,St=F(()=>{"use strict";tK=Rs(mw(),1),Ju={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},se={trace:s((...e)=>{},"trace"),debug:s((...e)=>{},"debug"),info:s((...e)=>{},"info"),warn:s((...e)=>{},"warn"),error:s((...e)=>{},"error"),fatal:s((...e)=>{},"fatal")},Mx=s(function(e="fatal"){let t=Ju.fatal;typeof e=="string"?e.toLowerCase()in Ju&&(t=Ju[e]):typeof e=="number"&&(t=e),se.trace=()=>{},se.debug=()=>{},se.info=()=>{},se.warn=()=>{},se.error=()=>{},se.fatal=()=>{},t<=Ju.fatal&&(se.fatal=console.error?console.error.bind(console,ul("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ul("FATAL"))),t<=Ju.error&&(se.error=console.error?console.error.bind(console,ul("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ul("ERROR"))),t<=Ju.warn&&(se.warn=console.warn?console.warn.bind(console,ul("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ul("WARN"))),t<=Ju.info&&(se.info=console.info?console.info.bind(console,ul("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ul("INFO"))),t<=Ju.debug&&(se.debug=console.debug?console.debug.bind(console,ul("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ul("DEBUG"))),t<=Ju.trace&&(se.trace=console.debug?console.debug.bind(console,ul("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ul("TRACE")))},"setLogLevel"),ul=s(e=>`%c${(0,tK.default)().format("ss.SSS")} : ${e} : `,"format")});var gw,rK,nK=F(()=>{"use strict";gw={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:s(e=>e>=255?255:e<0?0:e,"r"),g:s(e=>e>=255?255:e<0?0:e,"g"),b:s(e=>e>=255?255:e<0?0:e,"b"),h:s(e=>e%360,"h"),s:s(e=>e>=100?100:e<0?0:e,"s"),l:s(e=>e>=100?100:e<0?0:e,"l"),a:s(e=>e>=1?1:e<0?0:e,"a")},toLinear:s(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:s((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:s(({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let i=r<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return gw.hue2rgb(a,i,e+.3333333333333333)*255;case"g":return gw.hue2rgb(a,i,e)*255;case"b":return gw.hue2rgb(a,i,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;let i=Math.max(e,t,r),a=Math.min(e,t,r),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;let l=i-a,u=o>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case e:return((t-r)/l+(t<r?6:0))*60;case t:return((r-e)/l+2)*60;case r:return((e-t)/l+4)*60;default:return-1}},"rgb2hsl")},rK=gw});var FGe,iK,aK=F(()=>{"use strict";FGe={clamp:s((e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:s(e=>Math.round(e*1e10)/1e10,"round")},iK=FGe});var GGe,sK,oK=F(()=>{"use strict";GGe={dec2hex:s(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},sK=GGe});var zGe,pr,Ic=F(()=>{"use strict";nK();aK();oK();zGe={channel:rK,lang:iK,unit:sK},pr=zGe});var eh,ua,Nx=F(()=>{"use strict";Ic();eh={};for(let e=0;e<=255;e++)eh[e]=pr.unit.dec2hex(e);ua={ALL:0,RGB:1,HSL:2}});var TD,lK,cK=F(()=>{"use strict";Nx();TD=class{static{s(this,"Type")}constructor(){this.type=ua.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=ua.ALL}is(t){return this.type===t}},lK=TD});var CD,uK,hK=F(()=>{"use strict";Ic();cK();Nx();CD=class{static{s(this,"Channels")}constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new lK}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ua.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=pr.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=pr.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=pr.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=pr.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=pr.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=pr.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(ua.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(ua.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ua.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ua.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ua.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ua.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ua.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ua.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},uK=CD});var VGe,Sd,Px=F(()=>{"use strict";hK();VGe=new uK({r:0,g:0,b:0,a:0},"transparent"),Sd=VGe});var dK,Fp,SD=F(()=>{"use strict";Px();Nx();dK={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(dK.re);if(!t)return;let r=t[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=a?0:-1,d=o?255:15;return Sd.set({r:(n>>u*(h+3)&d)*l,g:(n>>u*(h+2)&d)*l,b:(n>>u*(h+1)&d)*l,a:a?(n&d)*l/255:1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`#${eh[Math.round(t)]}${eh[Math.round(r)]}${eh[Math.round(n)]}${eh[Math.round(i*255)]}`:`#${eh[Math.round(t)]}${eh[Math.round(r)]}${eh[Math.round(n)]}`},"stringify")},Fp=dK});var yw,Ox,fK=F(()=>{"use strict";Ic();Px();yw={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:s(e=>{let t=e.match(yw.hueRe);if(t){let[,r,n]=t;switch(n){case"grad":return pr.channel.clamp.h(parseFloat(r)*.9);case"rad":return pr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pr.channel.clamp.h(parseFloat(r)*360)}}return pr.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:s(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(yw.re);if(!r)return;let[,n,i,a,o,l]=r;return Sd.set({h:yw._hue2deg(n),s:pr.channel.clamp.s(parseFloat(i)),l:pr.channel.clamp.l(parseFloat(a)),a:o?pr.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},"parse"),stringify:s(e=>{let{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${pr.lang.round(t)}, ${pr.lang.round(r)}%, ${pr.lang.round(n)}%, ${i})`:`hsl(${pr.lang.round(t)}, ${pr.lang.round(r)}%, ${pr.lang.round(n)}%)`},"stringify")},Ox=yw});var vw,wD,pK=F(()=>{"use strict";SD();vw={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:s(e=>{e=e.toLowerCase();let t=vw.colors[e];if(t)return Fp.parse(t)},"parse"),stringify:s(e=>{let t=Fp.stringify(e);for(let r in vw.colors)if(vw.colors[r]===t)return r},"stringify")},wD=vw});var mK,Bx,gK=F(()=>{"use strict";Ic();Px();mK={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:s(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(mK.re);if(!r)return;let[,n,i,a,o,l,u,h,d]=r;return Sd.set({r:pr.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:pr.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:pr.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?pr.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${pr.lang.round(t)}, ${pr.lang.round(r)}, ${pr.lang.round(n)}, ${pr.lang.round(i)})`:`rgb(${pr.lang.round(t)}, ${pr.lang.round(r)}, ${pr.lang.round(n)})`},"stringify")},Bx=mK});var WGe,ha,th=F(()=>{"use strict";SD();fK();pK();gK();Nx();WGe={format:{keyword:wD,hex:Fp,rgb:Bx,rgba:Bx,hsl:Ox,hsla:Ox},parse:s(e=>{if(typeof e!="string")return e;let t=Fp.parse(e)||Bx.parse(e)||Ox.parse(e)||wD.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:s(e=>!e.changed&&e.color?e.color:e.type.is(ua.HSL)||e.data.r===void 0?Ox.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Bx.stringify(e):Fp.stringify(e),"stringify")},ha=WGe});var qGe,xw,kD=F(()=>{"use strict";Ic();th();qGe=s((e,t)=>{let r=ha.parse(e);for(let n in t)r[n]=pr.channel.clamp[n](t[n]);return ha.stringify(r)},"change"),xw=qGe});var HGe,Wi,ED=F(()=>{"use strict";Ic();Px();th();kD();HGe=s((e,t,r=0,n=1)=>{if(typeof e!="number")return xw(e,{a:t});let i=Sd.set({r:pr.channel.clamp.r(e),g:pr.channel.clamp.g(t),b:pr.channel.clamp.b(r),a:pr.channel.clamp.a(n)});return ha.stringify(i)},"rgba"),Wi=HGe});var UGe,Gp,yK=F(()=>{"use strict";Ic();th();UGe=s((e,t)=>pr.lang.round(ha.parse(e)[t]),"channel"),Gp=UGe});var YGe,vK,xK=F(()=>{"use strict";Ic();th();YGe=s(e=>{let{r:t,g:r,b:n}=ha.parse(e),i=.2126*pr.channel.toLinear(t)+.7152*pr.channel.toLinear(r)+.0722*pr.channel.toLinear(n);return pr.lang.round(i)},"luminance"),vK=YGe});var jGe,bK,TK=F(()=>{"use strict";xK();jGe=s(e=>vK(e)>=.5,"isLight"),bK=jGe});var XGe,En,CK=F(()=>{"use strict";TK();XGe=s(e=>!bK(e),"isDark"),En=XGe});var KGe,F0,bw=F(()=>{"use strict";Ic();th();KGe=s((e,t,r)=>{let n=ha.parse(e),i=n[t],a=pr.channel.clamp[t](i+r);return i!==a&&(n[t]=a),ha.stringify(n)},"adjustChannel"),F0=KGe});var ZGe,Qe,SK=F(()=>{"use strict";bw();ZGe=s((e,t)=>F0(e,"l",t),"lighten"),Qe=ZGe});var QGe,Je,wK=F(()=>{"use strict";bw();QGe=s((e,t)=>F0(e,"l",-t),"darken"),Je=QGe});var JGe,Tw,kK=F(()=>{"use strict";bw();JGe=s((e,t)=>F0(e,"a",-t),"transparentize"),Tw=JGe});var eze,ge,EK=F(()=>{"use strict";th();kD();eze=s((e,t)=>{let r=ha.parse(e),n={};for(let i in t)t[i]&&(n[i]=r[i]+t[i]);return xw(e,n)},"adjust"),ge=eze});var tze,AK,RK=F(()=>{"use strict";th();ED();tze=s((e,t,r=50)=>{let{r:n,g:i,b:a,a:o}=ha.parse(e),{r:l,g:u,b:h,a:d}=ha.parse(t),f=r/100,p=f*2-1,m=o-d,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,T=a*y+h*v,w=o*f+d*(1-f);return Wi(x,b,T,w)},"mix"),AK=tze});var rze,je,_K=F(()=>{"use strict";th();RK();rze=s((e,t=100)=>{let r=ha.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,AK(r,e,t)},"invert"),je=rze});var LK=F(()=>{"use strict";ED();yK();CK();SK();wK();kK();EK();_K()});var Xi=F(()=>{"use strict";LK()});var Ki,Zi,Wl=F(()=>{"use strict";Ki="#ffffff",Zi="#f2f2f2"});var ur,hl=F(()=>{"use strict";Xi();ur=s((e,t)=>t?ge(e,{s:-40,l:10}):ge(e,{s:-40,l:-10}),"mkBorder")});var RD,DK,IK=F(()=>{"use strict";Xi();Wl();hl();RD=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ur(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ur(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ur(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ur(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||je(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||je(this.tertiaryColor),this.lineColor=this.lineColor||je(this.background),this.arrowheadColor=this.arrowheadColor||je(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?Je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||je(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||Qe(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||Je(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Je(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Qe(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Qe(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Je(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Je(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||je(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||Qe(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Je(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||ge(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||ge(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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??ge(this.primaryColor,{l:-30}),this.venn2=this.venn2??ge(this.secondaryColor,{l:-30}),this.venn3=this.venn3??ge(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??ge(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??ge(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??ge(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??ge(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??ge(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||En(this.quadrant1Fill)?Qe(this.quadrant1Fill):Je(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Je(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=Qe(this.git0,25),this.git1=Qe(this.git1,25),this.git2=Qe(this.git2,25),this.git3=Qe(this.git3,25),this.git4=Qe(this.git4,25),this.git5=Qe(this.git5,25),this.git6=Qe(this.git6,25),this.git7=Qe(this.git7,25)):(this.git0=Je(this.git0,25),this.git1=Je(this.git1,25),this.git2=Je(this.git2,25),this.git3=Je(this.git3,25),this.git4=Je(this.git4,25),this.git5=Je(this.git5,25),this.git6=Je(this.git6,25),this.git7=Je(this.git7,25)),this.gitInv0=this.gitInv0||je(this.git0),this.gitInv1=this.gitInv1||je(this.git1),this.gitInv2=this.gitInv2||je(this.git2),this.gitInv3=this.gitInv3||je(this.git3),this.gitInv4=this.gitInv4||je(this.git4),this.gitInv5=this.gitInv5||je(this.git5),this.gitInv6=this.gitInv6||je(this.git6),this.gitInv7=this.gitInv7||je(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||Ki,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zi,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}let r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},DK=s(e=>{let t=new RD;return t.calculate(e),t},"getThemeVariables")});var _D,MK,NK=F(()=>{"use strict";Xi();hl();_D=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Qe(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=je(this.background),this.secondaryBorderColor=ur(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ur(this.tertiaryColor,this.darkMode),this.primaryTextColor=je(this.primaryColor),this.secondaryTextColor=je(this.secondaryColor),this.tertiaryTextColor=je(this.tertiaryColor),this.lineColor=je(this.background),this.textColor=je(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Qe(je("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Wi(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=Je("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Je(this.sectionBkgColor,10),this.taskBorderColor=Wi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Wi(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||Qe(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Je(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=Qe(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=Qe(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBk