86 lines
124 KiB
JavaScript
86 lines
124 KiB
JavaScript
|
|
import{b as T,c as yi}from"./chunk-63GW7ZVL.mjs";import{a as r,c as Or}from"./chunk-GTKDMUJJ.mjs";var bi=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ti=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ki=/\s*%%.*\n/gm;var $t=class extends Error{static{r(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}};var jt={},os=r(function(e,t){e=e.replace(bi,"").replace(Ti,"").replace(ki,`
|
||
|
|
`);for(let[i,{detector:s}]of Object.entries(jt))if(s(e,t))return i;throw new $t(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ss=r((...e)=>{for(let{id:t,detector:i,loader:s}of e)Se(t,i,s)},"registerLazyLoadedDiagrams"),Se=r((e,t,i)=>{jt[e]&&T.warn(`Detector with key ${e} already exists. Overwriting.`),jt[e]={detector:t,loader:i},T.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),as=r(e=>jt[e].loader,"getDiagramLoader");var Fe=r((e,t,{depth:i=2,clobber:s=!1}={})=>{let l={depth:i,clobber:s};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(d=>Fe(e,d,l)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(d=>{e.includes(d)||e.push(d)}),e):e===void 0||i<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(d=>{typeof t[d]=="object"&&(e[d]===void 0||typeof e[d]=="object")?(e[d]===void 0&&(e[d]=Array.isArray(t[d])?[]:{}),e[d]=Fe(e[d],t[d],{depth:i-1,clobber:s})):(s||typeof e[d]!="object"&&typeof t[d]!="object")&&(e[d]=t[d])}),e)},"assignWithDepth"),v=Fe;var Vt={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:r(e=>e>=255?255:e<0?0:e,"r"),g:r(e=>e>=255?255:e<0?0:e,"g"),b:r(e=>e>=255?255:e<0?0:e,"b"),h:r(e=>e%360,"h"),s:r(e=>e>=100?100:e<0?0:e,"s"),l:r(e=>e>=100?100:e<0?0:e,"l"),a:r(e=>e>=1?1:e<0?0:e,"a")},toLinear:r(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:r((e,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<.16666666666666666?e+(t-e)*6*i:i<.5?t:i<.6666666666666666?e+(t-e)*(.6666666666666666-i)*6:e),"hue2rgb"),hsl2rgb:r(({h:e,s:t,l:i},s)=>{if(!t)return i*2.55;e/=360,t/=100,i/=100;let l=i<.5?i*(1+t):i+t-i*t,d=2*i-l;switch(s){case"r":return Vt.hue2rgb(d,l,e+.3333333333333333)*255;case"g":return Vt.hue2rgb(d,l,e)*255;case"b":return Vt.hue2rgb(d,l,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:r(({r:e,g:t,b:i},s)=>{e/=255,t/=255,i/=255;let l=Math.max(e,t,i),d=Math.min(e,t,i),f=(l+d)/2;if(s==="l")return f*100;if(l===d)return 0;let x=l-d,E=f>.5?x/(2-l-d):x/(l+d);if(s==="s")return E*100;switch(l){case e:return((t-i)/x+(t<i?6:0))*60;case t:return((i-e)/x+2)*60;case i:return((e-t)/x+4)*60;default:return-1}},"rgb2hsl")},Bi=Vt;var vr={clamp:r((e,t,i)=>t>i?Math.min(t,Math.max(i,e)):Math.min(i,Math.max(t,e)),"clamp"),round:r(e=>Math.round(e*1e10)/1e10,"round")},Si=vr;var wr={dec2hex:r(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},Fi=wr;var Dr={channel:Bi,lang:Si,unit:Fi},m=Dr;var K={};for(let e=0;e<=255;e++)K[e]=m.unit.dec2hex(e);var S={ALL:0,RGB:1,HSL:2};var Le=class{static{r(this,"Type")}constructor(){this.type=S.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=S.ALL}is(t){return this.type===t}},Li=Le;var _e=class{static{r(this,"Channels")}constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new Li}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=S.ALL,this}_ensureHSL(){let t=this.data,{h:i,s,l}=t;i===void 0&&(t.h=m.channel.rgb2hsl(t,"h")),s===void 0&&(t.s=m.channel.rgb2hsl(t,"s")),l===void 0&&(t.l=m.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r:i,g:s,b:l}=t;i===void 0&&(t.r=m.channel.hsl2rgb(t,"r")),s===void 0&&(t.g=m.channel.hsl2rgb(t,"g")),l===void 0&&(t.b=m.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,i=t.r;return!this.type.is(S.HSL)&&i!==void 0?i:(this._ensureHSL(),m.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,i=t.g;return!this.type.is(S.HSL)&&i!==void 0?i:(this._ensureHSL(),m.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,i=t.b;return!this.type.is(S.HSL)&&i!==void 0?i:(this._ensureHSL(),m.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,i=t.h;return!this.type.is(S.RGB)&&i!==void 0?i:(this._ensureRGB(),m.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,i=t.s;return!this.type.is(S.RGB)&&i!==void 0?i:(this._ensureRGB(),m.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,i=t.l;return!this.type.is(S.RGB)&&i!==
|
||
|
|
`+W),gt&&ee([ce,de,ge],X=>{W=wt(W,X," ")}),M&&Pt?M.createHTML(W):W},t.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Te(C),Ce=!0},t.clearConfig=function(){ft=null,Ce=!1},t.isValidAttribute=function(C,o,n){ft||Te({});let u=_(C),y=_(o);return mi(u,y,n)},t.addHook=function(C,o){typeof o=="function"&&vt(I[C],o)},t.removeHook=function(C,o){if(o!==void 0){let n=ro(I[C],o);return n===-1?void 0:oo(I[C],n,1)[0]}return Vi(I[C])},t.removeHooks=function(C){I[C]=[]},t.removeAllHooks=function(){I=tr()},t}r(sr,"createDOMPurify");var yt=sr();var zt=/<br\s*\/?>/gi,ko=r(e=>e?cr(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Bo=(()=>{let e=!1;return()=>{e||(So(),e=!0)}})();function So(){let e="data-temp-href-target";yt.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),yt.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"))})}r(So,"setupDompurifyHooks");var hr=r(e=>(Bo(),yt.sanitize(e)),"removeScript"),ar=r((e,t)=>{if(t.flowchart?.htmlLabels!==!1){let i=t.securityLevel;i==="antiscript"||i==="strict"?e=hr(e):i!=="loose"&&(e=cr(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Eo(e))}return e},"sanitizeMore"),ot=r((e,t)=>e&&(t.dompurifyConfig?e=yt.sanitize(ar(e,t),t.dompurifyConfig).toString():e=yt.sanitize(ar(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Fo=r((e,t)=>typeof e=="string"?ot(e,t):e.flat().map(i=>ot(i,t)),"sanitizeTextOrArray"),Lo=r(e=>zt.test(e),"hasBreaks"),_o=r(e=>e.split(zt),"splitBreaks"),Eo=r(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),cr=r(e=>e.replace(zt,"#br#"),"breakToPlaceholder"),Ao=r(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Mo=r(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Oo=r(function(...e){let t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),vo=r(function(...e){let t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),ln=r(function(e){let t=e.split(/(,)/),i=[];for(let s=0;s<t.length;s++){let l=t[s];if(l===","&&s>0&&s+1<t.length){let d=t[s-1],f=t[s+1];wo(d,f)&&(l=d+","+f,s++,i.pop())}i.push(Do(l))}return i.join("")},"parseGenericTypes"),Ne=r((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),wo=r((e,t)=>{let i=Ne(e,"~"),s=Ne(t,"~");return i===1&&s===1},"shouldCombineSets"),Do=r(e=>{let t=Ne(e,"~"),i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);let s=[...e],l=s.indexOf("~"),d=s.lastIndexOf("~");for(;l!==-1&&d!==-1&&l!==d;)s[l]="<",s[d]=">",l=s.indexOf("~"),d=s.lastIndexOf("~");return i&&s.unshift("~"),s.join("")},"processSet"),lr=r(()=>window.MathMLElement!==void 0,"isMathMLSupported"),oe=/\$\$(.*)\$\$/g,nr=r(e=>(e.match(oe)?.length??0)>0,"hasKatex"),nn=r(async(e,t)=>{let i=document.createElement("div");i.innerHTML=await qo(e,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let l={width:i.clientWidth,height:i.clientHeight};return i.remove(),l},"calculateMathMLDimensions"),Io=r(async(e,t)=>{if(!nr(e))return e;if(!(lr()||t.legacyMathML||t.forceLegacyMathML))return e.replace(oe,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-RV2QPRKB.mjs"),s=t.forceLegacyMathML||!lr()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(zt).map(l=>nr(l)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${l}</div>`:`<div>${l}</div>`).join("").replace(oe,(l,d)=>i.renderToString(d,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return e.replace(oe,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitiz
|
||
|
|
font-family: ${i.fontFamily};
|
||
|
|
font-size: ${i.fontSize};
|
||
|
|
fill: ${i.textColor}
|
||
|
|
}
|
||
|
|
@keyframes edge-animation-frame {
|
||
|
|
from {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
@keyframes dash {
|
||
|
|
to {
|
||
|
|
stroke-dashoffset: 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
& .edge-animation-slow {
|
||
|
|
stroke-dasharray: 9,5 !important;
|
||
|
|
stroke-dashoffset: 900;
|
||
|
|
animation: dash 50s linear infinite;
|
||
|
|
stroke-linecap: round;
|
||
|
|
}
|
||
|
|
& .edge-animation-fast {
|
||
|
|
stroke-dasharray: 9,5 !important;
|
||
|
|
stroke-dashoffset: 900;
|
||
|
|
animation: dash 20s linear infinite;
|
||
|
|
stroke-linecap: round;
|
||
|
|
}
|
||
|
|
/* Classes common for multiple diagrams */
|
||
|
|
|
||
|
|
& .error-icon {
|
||
|
|
fill: ${i.errorBkgColor};
|
||
|
|
}
|
||
|
|
& .error-text {
|
||
|
|
fill: ${i.errorTextColor};
|
||
|
|
stroke: ${i.errorTextColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
& .edge-thickness-normal {
|
||
|
|
stroke-width: 1px;
|
||
|
|
}
|
||
|
|
& .edge-thickness-thick {
|
||
|
|
stroke-width: 3.5px
|
||
|
|
}
|
||
|
|
& .edge-pattern-solid {
|
||
|
|
stroke-dasharray: 0;
|
||
|
|
}
|
||
|
|
& .edge-thickness-invisible {
|
||
|
|
stroke-width: 0;
|
||
|
|
fill: none;
|
||
|
|
}
|
||
|
|
& .edge-pattern-dashed{
|
||
|
|
stroke-dasharray: 3;
|
||
|
|
}
|
||
|
|
.edge-pattern-dotted {
|
||
|
|
stroke-dasharray: 2;
|
||
|
|
}
|
||
|
|
|
||
|
|
& .marker {
|
||
|
|
fill: ${i.lineColor};
|
||
|
|
stroke: ${i.lineColor};
|
||
|
|
}
|
||
|
|
& .marker.cross {
|
||
|
|
stroke: ${i.lineColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
& svg {
|
||
|
|
font-family: ${i.fontFamily};
|
||
|
|
font-size: ${i.fontSize};
|
||
|
|
}
|
||
|
|
& p {
|
||
|
|
margin: 0
|
||
|
|
}
|
||
|
|
|
||
|
|
${s}
|
||
|
|
|
||
|
|
${t}
|
||
|
|
`},"getStyles"),gr=r((e,t)=>{t!==void 0&&(se[e]=t)},"addStylesForDiagram"),pn=Po;var je={};Or(je,{clear:()=>No,getAccDescription:()=>$o,getAccTitle:()=>Uo,getDiagramTitle:()=>Vo,setAccDescription:()=>Go,setAccTitle:()=>Ho,setDiagramTitle:()=>jo});var He="",Ue="",Ge="",$e=r(e=>ot(e,Ot()),"sanitizeText"),No=r(()=>{He="",Ge="",Ue=""},"clear"),Ho=r(e=>{He=$e(e).replace(/^\s+/g,"")},"setAccTitle"),Uo=r(()=>He,"getAccTitle"),Go=r(e=>{Ge=$e(e).replace(/\n\s+/g,`
|
||
|
|
`)},"setAccDescription"),$o=r(()=>Ge,"getAccDescription"),jo=r(e=>{Ue=$e(e)},"setDiagramTitle"),Vo=r(()=>Ue,"getDiagramTitle");var ur=T,Yo=yi,mr=Ot,En=Ui,An=Mt;var Xo=r(e=>ot(e,mr()),"sanitizeText"),Ko=dr,Zo=r(()=>je,"getCommonDb"),ae={},Mn=r((e,t,i)=>{ae[e]&&ur.warn(`Diagram with id ${e} already registered. Overwriting.`),ae[e]=t,i&&Se(e,i),gr(e,t.styles),t.injectUtils?.(ur,Yo,mr,Xo,Ko,Zo(),()=>{})},"registerDiagram"),On=r(e=>{if(e in ae)return ae[e];throw new Ve(e)},"getDiagram"),Ve=class extends Error{static{r(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};export{v as a,Z as b,Pr as c,U as d,c as e,g as f,Ii as g,rt as h,Ni as i,Jt as j,Mt as k,Zr as l,Xl as m,Kl as n,Zl as o,Ui as p,Ot as q,Jl as r,Ql as s,tn as t,yt as u,zt as v,ot as w,Ao as x,Mo as y,ln as z,nr as A,nn as B,qo as C,hn as D,bi as E,Ti as F,$t as G,jt as H,os as I,ss as J,as as K,Wo as L,dr as M,pn as N,No as O,Ho as P,Uo as Q,Go as R,$o as S,jo as T,Vo as U,je as V,mr as W,En as X,An as Y,Xo as Z,Ko as _,Mn as $,On as aa};
|
||
|
|
/*! Bundled license information:
|
||
|
|
|
||
|
|
dompurify/dist/purify.es.mjs:
|
||
|
|
(*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE *)
|
||
|
|
*/
|