livebook/static/assets/chunk-FDQUD7EL.js

101 lines
291 KiB
JavaScript
Raw Normal View History

2024-10-03 01:00:09 +08:00
import{a as oe,b as ne,f as Ya,h as ja}from"./chunk-6JCPJA27.js";var Ec=Ya((Ga,Va)=>{(function(t,e){typeof Ga=="object"&&typeof Va!="undefined"?Va.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=e()})(Ga,function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",n="minute",a="hour",s="day",l="week",c="month",h="quarter",f="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|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(B){var x=["th","st","nd","rd"],y=B%100;return"["+B+(x[(y-20)%10]||x[y]||x[0])+"]"}},A=function(B,x,y){var I=String(B);return!I||I.length>=x?B:""+Array(x+1-I.length).join(y)+B},C={s:A,z:function(B){var x=-B.utcOffset(),y=Math.abs(x),I=Math.floor(y/60),k=y%60;return(x<=0?"+":"-")+A(I,2,"0")+":"+A(k,2,"0")},m:function B(x,y){if(x.date()<y.date())return-B(y,x);var I=12*(y.year()-x.year())+(y.month()-x.month()),k=x.clone().add(I,c),$=y-k<0,R=x.clone().add(I+($?-1:1),c);return+(-(I+(y-k)/($?k-R:R-k))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:c,y:f,w:l,d:s,D:u,h:a,m:n,s:o,ms:i,Q:h}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},M="en",S={};S[M]=b;var D="$isDayjsObject",T=function(B){return B instanceof Q||!(!B||!B[D])},O=function B(x,y,I){var k;if(!x)return M;if(typeof x=="string"){var $=x.toLowerCase();S[$]&&(k=$),y&&(S[$]=y,k=$);var R=x.split("-");if(!k&&R.length>1)return B(R[0])}else{var V=x.name;S[V]=x,k=V}return!I&&k&&(M=k),k||!I&&M},F=function(B,x){if(T(B))return B.clone();var y=typeof x=="object"?x:{};return y.date=B,y.args=arguments,new Q(y)},G=C;G.l=O,G.i=T,G.w=function(B,x){return F(B,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var Q=function(){function B(y){this.$L=O(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[D]=!0}var x=B.prototype;return x.parse=function(y){this.$d=function(I){var k=I.date,$=I.utc;if(k===null)return new Date(NaN);if(G.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var R=k.match(g);if(R){var V=R[2]-1||0,Z=(R[7]||"0").substring(0,3);return $?new Date(Date.UTC(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)):new Date(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,Z)}}return new Date(k)}(y),this.init()},x.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},x.$utils=function(){return G},x.isValid=function(){return this.$d.toString()!==p},x.isSame=function(y,I){var k=F(y);return this.startOf(I)<=k&&k<=this.endOf(I)},x.isAfter=function(y,I){return F(y)<this.startOf(I)},x.isBefore=function(y,I){return this.endOf(I)<F(y)},x.$g=function(y,I,k){return G.u(y)?this[I]:this.set(k,y)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(y,I){var k=this,$=!!G.u(I)||I,R=G.p(y),V=function(Nt,ht){var E=G.w(k.$u?Date.UTC(k.$y,ht,Nt):new Date(k.$y,ht,Nt),k);return $?E:E.endOf(s)},Z=function(Nt,ht){return G.w(k.toDate()[Nt].apply(k.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(ht)),k)},ot=this.$W,nt=this.$M,dt=this.$D,Ht="set"+(this.$u?"UTC":"");switch(R){case f:return $?V(1,0):V(31,11);case c:return $?V(1,nt):V(0,nt+1);case l:var ft=this.$locale().weekStart||0,Zt=(ot<ft?ot+7:ot)-ft;return V($?dt-Zt:dt+(6-Zt),nt);case s:case u:return Z(Ht+"Hours",0);case a:return Z(Ht+"Minutes",1);case n:return Z(Ht+"Seconds",2);case o:return Z(Ht+"Milliseconds",3);default:return this.clone()}},x.endOf=function(y){return this.startOf(y,!1)},x.$set=function(y,I){var k,$=G.p(y),R="set"+(this.$u?"UTC":""),V=(k={},k[s]=R+"Date",k[u]=R+"Date",k[c]=R
`+Yt),qr&&h([Ea,Oa,Ia],de=>{Yt=b(Yt,de," ")}),$t&&No?$t.createHTML(Yt):Yt},W.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ha(U),Pa=!0},W.clearConfig=function(){jr=null,Pa=!1},W.isValidAttribute=function(U,d,w){jr||Ha({});let P=vt(U),st=vt(d);return wc(P,st,w)},W.addHook=function(U,d){typeof d=="function"&&(fe[U]=fe[U]||[],u(fe[U],d))},W.removeHook=function(U){if(fe[U])return f(fe[U])},W.removeHooks=function(U){fe[U]&&(fe[U]=[])},W.removeAllHooks=function(){fe={}},W}var Eo=he();return Eo})});function Mc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var f,u;return(u=(f=h.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&u!==void 0?u:0})):s},[]);if(o.length){var n=new RegExp(`
[ ]{`+Math.min.apply(Math,o)+"}","g");i=i.map(function(s){return s.replace(n,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(s,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",f=s;typeof s=="string"&&s.includes(`
`)&&(f=String(s).split(`
`).map(function(u,p){return p===0?u:""+h+u}).join(`
`)),a+=f+i[l+1]}),a}function Dc(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function Nc(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function hr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xa(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fr(t){let e,r,i;t.length!==2?(e=hr,r=(s,l)=>hr(t(s),l),i=(s,l)=>t(s)-l):(e=t===hr||t===Xa?t:g0,r=t,i=t);function o(s,l,c=0,h=s.length){if(c<h){if(e(l,l)!==0)return h;do{let f=c+h>>>1;r(s[f],l)<0?c=f+1:h=f}while(c<h)}return c}function n(s,l,c=0,h=s.length){if(c<h){if(e(l,l)!==0)return h;do{let f=c+h>>>1;r(s[f],l)<=0?c=f+1:h=f}while(c<h)}return c}function a(s,l,c=0,h=s.length){let f=o(s,l,c,h-1);return f>c&&i(s[f-1],l)>-i(s[f],l)?f-1:f}return{left:o,center:a,right:n}}function g0(){return 0}function Ka(t){return t===null?NaN:+t}var Rc=fr(hr),Pc=Rc.right,x0=Rc.left,y0=fr(Ka).center,Za=Pc;var Gr=class extends Map{constructor(e,r=b0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,o]of e)this.set(i,o)}get(e){return super.get($c(this,e))}has(e){return super.has($c(this,e))}set(e,r){return super.set(_0(this,e),r)}delete(e){return super.delete(C0(this,e))}};function $c({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function _0({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function C0({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function b0(t){return t!==null&&typeof t=="object"?t.valueOf():t}var T0=Math.sqrt(50),v0=Math.sqrt(10),k0=Math.sqrt(2);function zo(t,e,r){let i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),n=i/Math.pow(10,o),a=n>=T0?10:n>=v0?5:n>=k0?2:1,s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=r&&r<2?zo(t,e,r*2):[s,l,c]}function qo(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let i=e<t,[o,n,a]=i?zo(e,t,r):zo(t,e,r);if(!(n>=o))return[];let s=n-o+1,l=new Array(s);if(i)if(a<0)for(let c=0;c<s;++c)l[c]=(n-c)/-a;else for(let c=0;c<s;++c)l[c]=(n-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function zi(t,e,r){return e=+e,t=+t,r=+r,zo(t,e,r)[2]}function Vr(t,e,r){e=+e,t=+t,r=+r;let i=e<t,o=i?zi(e,t,r):zi(t,e,r);return(i?-1:1)*(o<0?1/-o:o)}function Wo(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=Math.max(0,Math.ceil((e-t)/r))|0,n=new Array(o);++i<o;)n[i]=t+i*r;return n}function zc(t){return t}var Ho=1,Qa=2,Ja=3,Uo=4,qc=1e-6;function S0(t){return"translate("+t+",0)"}function w0(t){return"translate(0,"+t+")"}function A0(t){return e=>+t(e)}function B0(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function F0(){return!this.__axis}function Wc(t,e){var r=[],i=null,o=null,n=6,a=6,s=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,c=t===Ho||t===Uo?-1:1,h=t===Uo||t===Qa?"x":"y",f=t===Ho||t===Ja?S0:w0;function u(p){var g=i==null?e.ticks?e.ticks.apply(e,r):e.domain():i,_=o==null?e.tickFormat?e.tickFormat.apply(e,r):zc:o,b=Math.max(n,0)+s,A=e.range(),C=+A[0]+l,M=+A[A.length-1]+l,S=(e.bandwidth?B0:A0)(e.copy(),l),D=p.selection?p.selection():p,T=D.selectAll(".domain").data([null]),O=D.selectAll(".tick").data(g,e).order(),F=O.exit(),G=O.enter().append("g").attr("class","tick"),Q=O.select("line"),N=O.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(G),Q=Q.merge(G.append("line").attr("stroke","currentColor").attr(h+"2",c*n)),N=N.merge(G.append("text").attr("fill","currentColor").attr(h,c*b).attr("dy",t===Ho?"0em":t===Ja?"0.71em":"0.32em")),p!==D&&(T=T.transition(p),O=O.transition(p),Q=Q.transition(p),N=N.transition(p),F=F.transitio
<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">
${i}
</div>
`:`<div>${i}</div>`).join("").replace(Il,(i,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:fm()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},ql={getRows:wv,sanitizeText:Fo,sanitizeTextOrArray:Fv,hasBreaks:Lv,splitBreaks:Mv,lineBreakRegex:Mo,removeScript:Em,getUrl:Ov,evaluate:Im,getMax:Iv,getMin:Dv},Ut=(t,e)=>e?m(t,{s:-40,l:10}):m(t,{s:-40,l:-10}),Sa="#ffffff",wa="#f2f2f2",$v=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var e,r,i,o,n,a,s,l,c,h,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||m(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||m(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?Y(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||"grey",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||Y(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this
`);for(let[r,{detector:i}]of Object.entries(Fi))if(i(t,e))return r;throw new ma(`No diagram type detected matching given configuration for text: ${t}`)},Pm=(...t)=>{for(let{id:e,detector:r,loader:i}of t)$m(e,r,i)},$m=(t,e,r)=>{Fi[t]?j.error(`Detector with key ${t} already exists`):Fi[t]={detector:e,loader:r},j.debug(`Detector with key ${t} added${r?" with loader":""}`)},Qv=t=>Fi[t].loader,Nl=(t,e,{depth:r=2,clobber:i=!1}={})=>{let o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>Nl(t,n,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Nl(t[n],e[n],{depth:r-1,clobber:i})):(i||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},It=Nl,Jv="\u200B",tk={curveBasis:Hs,curveBasisClosed:Gs,curveBasisOpen:Vs,curveBumpX:Ys,curveBumpY:js,curveBundle:Xs,curveCardinalClosed:Zs,curveCardinalOpen:Qs,curveCardinal:Ks,curveCatmullRomClosed:tl,curveCatmullRomOpen:el,curveCatmullRom:Js,curveLinear:oo,curveLinearClosed:rl,curveMonotoneX:ol,curveMonotoneY:nl,curveNatural:al,curveStep:sl,curveStepAfter:cl,curveStepBefore:ll},ek=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rk=function(t,e){let r=zm(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let a=r.map(s=>s.args);da(a),i=It(i,[...a])}else i=r.args;if(!i)return;let o=Aa(t,e),n="config";return i[n]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[n],delete i[n]),i},zm=function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${ek.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),j.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,o=[];for(;(i=wo.exec(t))!==null;)if(i.index===wo.lastIndex&&wo.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){let n=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:n,args:a})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(r){return j.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},ik=function(t){return t.replace(wo,"")},ok=function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1};function nk(t,e){var i;if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return(i=tk[r])!=null?i:e}function ak(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,Mm.sanitizeUrl)(r):r}var sk=(t,...e)=>{let r=t.split("."),i=r.length-1,o=r[i],n=window;for(let a=0;a<i;a++)if(n=n[r[a]],!n){j.error(`Function name: ${t} not found in window`);return}n[o](...e)};function qm(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function lk(t){let e,r=0;t.forEach(o=>{r+=qm(o,e),e=o});let i=r/2;return Wl(t,i)}function ck(t){return t.length===1?t[0]:lk(t)}var dm=(t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},Wl=(t,e)=>{let r,i=e;for(let o of t){if(r){let n=qm(o,r);if(n<i)i-=n;else{let a=i/n;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:dm((1-a)*r.x+a*o.x,5),y:dm((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},uk=(t,e,r)=>{j.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let o=Wl(e,25),n=t?10:5,a=Math.atan2(e[0].y-o.y,e[0].x-o.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(e[0].x+o.x)/2,s.y=-Math.cos(a)*n+(e[0].y+o.y)/2,s};function hk(t,e,r){let i=structuredClone(r);j.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();let o=25+t,n=Wl(i,o),a=10+t*.5,s=Math.atan2(i[0].y-n.y,i[0].x-n.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+n.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+n.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*a+(i[0].x+n.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+n.x)/2,l.y=-Math.cos(s)*a+(i[0].y+n.y)/2),l}function fk(t){let e="",r="";for(let i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}var mm=0,pk=()=>(mm++,"id-"+Math.random().toString(36).substr(2,12)+"-"+mm);function dk(t){let e="",r="0123456789abcdef",i=r.length;for(let o=0;o<t;o++)e+=r.charAt(Math.floor(Math.random()*i));return e}var mk=t=>dk(t.length),gk=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:""}},xk=function(t,e){let r=e.text.replace(ql.lineBreakRegex," "),[,i]=Hl(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0&&o.attr("class",e.class);let n=o.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),o},yk=Hn((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ql.lineBreakRegex.test(t)))return t;let i=t.split(" "),o=[],n="";return i.forEach((a,s)=>{let l=ga(`${a} `,r),c=ga(n,r);if(l>e){let{hyphenatedStrings:u,remainingWord:p}=_k(a,e,"-",r);o.push(n,...u),n=p}else c+l>=e?(o.push(n),n=a):n=[n,a].filter(Boolean).join(" ");s+1===i.length&&o.push(n)}),o.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),_k=Hn((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let o=[...t],n=[],a="";return o.forEach((s,l)=>{let c=`${a}${s}`;if(ga(c,i)>=e){let f=l+1,u=o.length===f,p=`${c}${r}`;n
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 2px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${i}
${e}
`},GS=(t,e)=>{e!==void 0&&(pa[t]=e)},VS=jS,Yl="",jl="",Gl="",Vl=t=>Fo(t,Te()),XS=()=>{Yl="",Gl="",jl=""},KS=t=>{Yl=Vl(t).replace(/^\s+/g,"")},ZS=()=>Yl,QS=t=>{Gl=Vl(t).replace(/\n\s+/g,`
`)},JS=()=>Gl,tw=t=>{jl=Vl(t)},ew=()=>jl,rw=Object.freeze(Object.defineProperty({__proto__:null,clear:XS,getAccDescription:JS,getAccTitle:ZS,getDiagramTitle:ew,setAccDescription:QS,setAccTitle:KS,setDiagramTitle:tw},Symbol.toStringTag,{value:"Module"})),iw=j,ow=zl,Xl=Te,kq=jm,Sq=Li,nw=t=>Fo(t,Xl()),aw=YS,sw=()=>rw,ya={},_a=(t,e,r)=>{var i;if(ya[t])throw new Error(`Diagram ${t} already registered.`);ya[t]=e,r&&$m(t,r),GS(t,e.styles),(i=e.injectUtils)==null||i.call(e,iw,ow,Xl,nw,aw,sw(),()=>{})},Kl=t=>{if(t in ya)return ya[t];throw new Pl(t)},Pl=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},lw=t=>{var n;var e;let{securityLevel:r}=Xl(),i=jt("body");if(r==="sandbox"){let s=(n=(e=jt(`#i${t}`).node())==null?void 0:e.contentDocument)!=null?n:document;i=jt(s.body)}return i.select(`#${t}`)},cw=(t,e,r)=>{j.debug(`rendering svg for syntax error
`);let i=lw(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),fg(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},pg={draw:cw},uw=pg,hw={db:{},renderer:pg,parser:{parser:{yy:{}},parse:()=>{}}},fw=hw,dg="flowchart-elk",pw=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},dw=async()=>{let{diagram:t}=await import("./flowchart-elk-definition-930acc39-3DIHT7HV.js");return{id:dg,diagram:t}},mw={id:dg,detector:pw,loader:dw},gw=mw,mg="timeline",xw=t=>/^\s*timeline/.test(t),yw=async()=>{let{diagram:t}=await import("./timeline-definition-6eaa3543-J2LR2J43.js");return{id:mg,diagram:t}},_w={id:mg,detector:xw,loader:yw},Cw=_w,gg="mindmap",bw=t=>/^\s*mindmap/.test(t),Tw=async()=>{let{diagram:t}=await import("./mindmap-definition-b08d3ac4-SL7A5WBA.js");return{id:gg,diagram:t}},vw={id:gg,detector:bw,loader:Tw},kw=vw,xg="sankey",Sw=t=>/^\s*sankey-beta/.test(t),ww=async()=>{let{diagram:t}=await import("./sankeyDiagram-c599f8ec-FQ2PM7D7.js");return{id:xg,diagram:t}},Aw={id:xg,detector:Sw,loader:ww},Bw=Aw,yg="block",Fw=t=>/^\s*block-beta/.test(t),Lw=async()=>{let{diagram:t}=await import("./blockDiagram-a8a0820c-7RR4EQ6Y.js");return{id:yg,diagram:t}},Mw={id:yg,detector:Fw,loader:Lw},Ew=Mw,ym=!1,Zl=()=>{ym||(ym=!0,_a("error",fw,t=>t.toLowerCase().trim()==="error"),_a("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{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")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Pm(Ik,LS,wS,jk,tS,iS,aS,yS,TS,gw,Wk,Pk,kw,Cw,Kk,PS,IS,WS,uS,Bw,dS,Ew))},Ca=class{constructor(e,r={}){this.text=e,this.metadata=r,this.type="graph",this.text=vk(e),this.text+=`
`;let i=Te();try{this.type=Aa(e,i)}catch(n){this.type="error",this.detectError=n}let o=Kl(this.type);j.debug("Type "+this.type),this.db=o.db,this.renderer=o.renderer,this.parser=o.parser,this.parser.parser.yy=this.db,this.init=o.init,this.parse()}parse(){var e,r,i,o,n;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e);let a=Te();(i=this.init)==null||i.call(this,a),this.metadata.title&&((n=(o=this.db).setDiagramTitle)==null||n.call(o,this.metadata.title)),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},Ow=async(t,e={})=>{let r=Aa(t,Te());try{Kl(r)}catch(i){let o=Qv(r);if(!o)throw new ma(`Diagram ${r} not found.`);let{id:n,diagram:a}=await o();_a(n,a)}return new Ca(t,e)},_m=[],Iw=()=>{_m.forEach(t=>{t()}),_m=[]},Dw="graphics-document document";function Nw(t,e){t.attr("role",Dw),e!==""&&t.attr("aria-roledescription",e)}function Rw(t,e,r,i){if(t.insert!==void 0){if(r){let o=`chart-desc-${i}`;t.attr("aria-describedby",o),t.insert("desc",":first-child").attr("id",o).text(r)}if(e){let o=`chart-title-${i}`;t.attr("aria-labelledby",o),t.insert("title",":first-child").attr("id",o).text(e)}}}var Pw=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();function _g(t){return typeof t=="undefined"||t===null}function $w(t){return typeof t=="object"&&t!==null}function zw(t){return Array.isArray(t)?t:_g(t)?[]:[t]}function qw(t,e){var r,i,o,n;if(e)for(n=Object.keys(e),r=0,i=n.length;r<i;r+=1)o=n[r],t[o]=e[o];return t}function Ww(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function Uw(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Hw=_g,Yw=$w,jw=zw,Gw=Ww,Vw=Uw,Xw=qw,Wt={isNothing:Hw,isObject:Yw,toArray:jw,repeat:Gw,isNegativeZero:Vw,extend:Xw};function Cg(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),i+" "+r):i}function Lo(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Cg(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Lo.prototype=Object.create(Error.prototype);Lo.prototype.constructor=Lo;Lo.prototype.toString=function(e){return this.name+": "+Cg(this,e)};var qe=Lo;function Fl(t,e,r,i,o){var n="",a="",s=Math.floor(o/2)-1;return i-e>s&&(n=" ... ",e=i-s+n.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:n+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+n.length}}function Ll(t,e){return Wt.repeat(" ",e-t.length)+t}function Kw(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],n,a=-1;n=r.exec(t.buffer);)o.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s="",l,c,h=Math.min(t.line+e.linesAfter,o.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)c=Fl(t.buffer,i[a-l],o[a-l],t.position-(i[a]-i[a-l]),f),s=Wt.repeat(" ",e.indent)+Ll((t.line-l+1).toString(),h)+" | "+c.str+`
`+s;for(c=Fl(t.buffer,i[a],o[a],t.position,f),s+=Wt.repeat(" ",e.indent)+Ll((t.line+1).toString(),h)+" | "+c.str+`
`,s+=Wt.repeat("-",e.indent+h+3+c.pos)+`^
`,l=1;l<=e.linesAfter&&!(a+l>=o.length);l++)c=Fl(t.buffer,i[a+l],o[a+l],t.position-(i[a]-i[a+l]),f),s+=Wt.repeat(" ",e.indent)+Ll((t.line+l+1).toString(),h)+" | "+c.str+`
`;return s.replace(/\n$/,"")}var Zw=Kw,Qw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Jw=["scalar","sequence","mapping"];function tA(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function eA(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(Qw.indexOf(r)===-1)throw new qe('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=tA(e.styleAliases||null),Jw.indexOf(this.kind)===-1)throw new qe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Dt=eA;function Cm(t,e){var r=[];return t[e].forEach(function(i){var o=r.length;r.forEach(function(n,a){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(o=a)}),r[o]=i}),r}function rA(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(o){o.multi?(t.multi[o.kind].push(o),t.multi.fallback.push(o)):t[o.kind][o.tag]=t.fallback[o.tag]=o}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function $l(t){return this.extend(t)}$l.prototype.extend=function(e){var r=[],i=[];if(e instanceof Dt)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new qe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof Dt))throw new qe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new qe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new qe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(n){if(!(n instanceof Dt))throw new qe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create($l.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=Cm(o,"implicit"),o.compiledExplicit=Cm(o,"explicit"),o.compiledTypeMap=rA(o.compiledImplicit,o.compiledExplicit),o};var iA=$l,oA=new Dt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),nA=new Dt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),aA=new Dt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),sA=new iA({explicit:[oA,nA,aA]});function lA(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function cA(){return null}function uA(t){return t===null}var hA=new Dt("tag:yaml.org,2002:null",{kind:"scalar",resolve:lA,construct:cA,predicate:uA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function fA(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function pA(t){return t==="true"||t==="True"||t==="TRUE"}function dA(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var mA=new Dt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:fA,construct:pA,predicate:dA,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});functio
\r`;function RA(t){if(t===null)return!1;var e,r,i=0,o=t.length,n=Ql;for(r=0;r<o;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function PA(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,n=Ql,a=0,s=[];for(e=0;e<o;e++)e%4===0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|n.indexOf(i.charAt(e));return r=o%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function $A(t){var e="",r=0,i,o,n=t.length,a=Ql;for(i=0;i<n;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return o=n%3,o===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):o===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):o===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function zA(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var qA=new Dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:RA,construct:PA,predicate:zA,represent:$A}),WA=Object.prototype.hasOwnProperty,UA=Object.prototype.toString;function HA(t){if(t===null)return!0;var e=[],r,i,o,n,a,s=t;for(r=0,i=s.length;r<i;r+=1){if(o=s[r],a=!1,UA.call(o)!=="[object Object]")return!1;for(n in o)if(WA.call(o,n))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function YA(t){return t!==null?t:[]}var jA=new Dt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:HA,construct:YA}),GA=Object.prototype.toString;function VA(t){if(t===null)return!0;var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],GA.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;n[e]=[o[0],i[o[0]]]}return!0}function XA(t){if(t===null)return[];var e,r,i,o,n,a=t;for(n=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],o=Object.keys(i),n[e]=[o[0],i[o[0]]];return n}var KA=new Dt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:VA,construct:XA}),ZA=Object.prototype.hasOwnProperty;function QA(t){if(t===null)return!0;var e,r=t;for(e in r)if(ZA.call(r,e)&&r[e]!==null)return!1;return!0}function JA(t){return t!==null?t:{}}var tB=new Dt("tag:yaml.org,2002:set",{kind:"mapping",resolve:QA,construct:JA}),eB=LA.extend({implicit:[IA,NA],explicit:[qA,jA,KA,tB]}),cr=Object.prototype.hasOwnProperty,ba=1,kg=2,Sg=3,Ta=4,Ml=1,rB=2,bm=3,iB=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oB=/[\x85\u2028\u2029]/,nB=/[,\[\]\{\}]/,wg=/^(?:!|!!|![a-z\-]+!)$/i,Ag=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Tm(t){return Object.prototype.toString.call(t)}function be(t){return t===10||t===13}function Rr(t){return t===9||t===32}function Kt(t){return t===9||t===32||t===10||t===13}function Ai(t){return t===44||t===91||t===93||t===123||t===125}function aB(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function sB(t){return t===120?2:t===117?4:t===85?8:0}function lB(t){return 48<=t&&t<=57?t-48:-1}function vm(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function cB(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Bg=new Array(256),Fg=new Array(256);for(Nr=0;Nr<256;Nr++)Bg[Nr]=vm(Nr)?1:0,Fg[Nr]=vm(Nr);var Nr;function uB(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||eB,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Lg(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Zw(r),new qe(e,r)}function H(t,e){throw Lg(t,e)}function va(t,e){t.onWarning&&t.onWarning.call(null,Lg(t,e))}var km={YAML:function(e,r,i){var o,n,a;e.version!==null&&H(e,"duplication of %YAML directive"),i.length!==1&&H(e,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&H(e,"ill-formed argument of the YAML directive"),n=parseInt(o[1],10),a=parseInt(o[2],10),n!==1&&H(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&va(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var o,n;i.length!==2&&H(e,"TAG directive accepts exactly two arguments"),o=i[0],n=i[1],wg.test(o)||H(e,"ill-formed tag handle (first argument) of the TAG directive"),cr.call(e.tagMap,o)&&H(e,'there is a previously declared suffix for "'+o+'" tag handle'),Ag.test(n)||H(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(a){H(e,"tag prefix is malformed: "+n)}e.tagMap[o]=n}};function lr(t,e,r,i){var o,n,a,s;if(e<r){if(s=t.input.slice(e,r),i)for(o=0,n=s.length;o<n;o+=1)a=s.charCodeAt(o),a===9||32<=a&&a<=1114111||H(t,"expected valid JSON character");else iB.test(s)&&H(t,"the stream contains non-printable characters");t.result+=s}}function Sm(t,e,r,i){var o,n,a,s;for(Wt.isObject(r)||H(t,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,s=o.length;a<s;a+=1)n=o[a],cr.call(e,n)||(e[n]=r[n],i[n]=!0)}function Bi(t,e,r,i,o,n,a,s,l){var c,h;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),c=0,h=o.length;c<h;c+=1)Array.isArray(o[c])&&H(t,"nested arrays are not supported inside keys"),typeof o=="object"&&Tm(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&Tm(o)==="[object Object]"&&(o="[object Object]"),o=String(o),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(c=0,h=n.length;c<h;c+=1)Sm(t,e,n[c],r);else Sm(t,e,n,r);else!t.json&&!cr.call(r,o)&&cr.call(e,o)&&(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,H(t,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(e,o,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[o]=n,delete r[o];return e}function Jl(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):H(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function xt(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);o!==0;){for(;Rr(o);)o===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&o===35)do o=t.input.charCodeAt(++t.position);while(o!==10&&o!==13&&o!==0);if(be(o))for(Jl(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;o===32;)t.lineIndent++,o=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&va(t,"deficient indentation"),i}function Fa(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Kt(r)))}function tc(t,e){e===1?t.result+=" ":e>1&&(t.result+=Wt.
`,e-1))}function hB(t,e,r){var i,o,n,a,s,l,c,h,f=t.kind,u=t.result,p;if(p=t.input.charCodeAt(t.position),Kt(p)||Ai(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(o=t.input.charCodeAt(t.position+1),Kt(o)||r&&Ai(o)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,s=!1;p!==0;){if(p===58){if(o=t.input.charCodeAt(t.position+1),Kt(o)||r&&Ai(o))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),Kt(i))break}else{if(t.position===t.lineStart&&Fa(t)||r&&Ai(p))break;if(be(p))if(l=t.line,c=t.lineStart,h=t.lineIndent,xt(t,!1,-1),t.lineIndent>=e){s=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=c,t.lineIndent=h;break}}s&&(lr(t,n,a,!1),tc(t,t.line-l),n=a=t.position,s=!1),Rr(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return lr(t,n,a,!1),t.result?!0:(t.kind=f,t.result=u,!1)}function fB(t,e){var r,i,o;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(lr(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,o=t.position;else return!0;else be(r)?(lr(t,i,o,!0),tc(t,xt(t,!1,e)),i=o=t.position):t.position===t.lineStart&&Fa(t)?H(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);H(t,"unexpected end of the stream within a single quoted scalar")}function pB(t,e){var r,i,o,n,a,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return lr(t,r,t.position,!0),t.position++,!0;if(s===92){if(lr(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),be(s))xt(t,!1,e);else if(s<256&&Bg[s])t.result+=Fg[s],t.position++;else if((a=sB(s))>0){for(o=a,n=0;o>0;o--)s=t.input.charCodeAt(++t.position),(a=aB(s))>=0?n=(n<<4)+a:H(t,"expected hexadecimal character");t.result+=cB(n),t.position++}else H(t,"unknown escape sequence");r=i=t.position}else be(s)?(lr(t,r,i,!0),tc(t,xt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Fa(t)?H(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}H(t,"unexpected end of the stream within a double quoted scalar")}function dB(t,e){var r=!0,i,o,n,a=t.tag,s,l=t.anchor,c,h,f,u,p,g=Object.create(null),_,b,A,C;if(C=t.input.charCodeAt(t.position),C===91)h=93,p=!1,s=[];else if(C===123)h=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),C=t.input.charCodeAt(++t.position);C!==0;){if(xt(t,!0,e),C=t.input.charCodeAt(t.position),C===h)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?C===44&&H(t,"expected the node content, but found ','"):H(t,"missed comma between flow collection entries"),b=_=A=null,f=u=!1,C===63&&(c=t.input.charCodeAt(t.position+1),Kt(c)&&(f=u=!0,t.position++,xt(t,!0,e))),i=t.line,o=t.lineStart,n=t.position,Ei(t,e,ba,!1,!0),b=t.tag,_=t.result,xt(t,!0,e),C=t.input.charCodeAt(t.position),(u||t.line===i)&&C===58&&(f=!0,C=t.input.charCodeAt(++t.position),xt(t,!0,e),Ei(t,e,ba,!1,!0),A=t.result),p?Bi(t,s,g,b,_,A,i,o,n):f?s.push(Bi(t,null,g,b,_,A,i,o,n)):s.push(_),xt(t,!0,e),C=t.input.charCodeAt(t.position),C===44?(r=!0,C=t.input.charCodeAt(++t.position)):r=!1}H(t,"unexpected end of the stream within a flow collection")}function mB(t,e){var r,i,o=Ml,n=!1,a=!1,s=e,l=0,c=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)Ml===o?o=f===43?bm:rB:H(t,"repeat of a chomping mode identifier");else if((h=lB(f))>=0)h===0?H(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?H(t,"repeat of an indentation width identifier"):(s=e+h-1,a=!0);else break;if(Rr(f)){do f=t.input.charCodeAt(++t.position);while(Rr(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!be(f)&&f!==0)}for(;f!==0;){for(Jl(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIn
`,n?1+l:l):o===Ml&&n&&(t.result+=`
`);break}for(i?Rr(f)?(c=!0,t.result+=Wt.repeat(`
`,n?1+l:l)):c?(c=!1,t.result+=Wt.repeat(`
`,l+1)):l===0?n&&(t.result+=" "):t.result+=Wt.repeat(`
`,l):t.result+=Wt.repeat(`
`,n?1+l:l),n=!0,a=!0,l=0,r=t.position;!be(f)&&f!==0;)f=t.input.charCodeAt(++t.position);lr(t,r,t.position,!1)}return!0}function wm(t,e){var r,i=t.tag,o=t.anchor,n=[],a,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,H(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!Kt(a))));){if(s=!0,t.position++,xt(t,!0,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ei(t,e,Sg,!1,!0),n.push(t.result),xt(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)H(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=o,t.kind="sequence",t.result=n,!0):!1}function gB(t,e,r){var i,o,n,a,s,l,c=t.tag,h=t.anchor,f={},u=Object.create(null),p=null,g=null,_=null,b=!1,A=!1,C;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),C=t.input.charCodeAt(t.position);C!==0;){if(!b&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,H(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,(C===63||C===58)&&Kt(i))C===63?(b&&(Bi(t,f,u,p,g,null,a,s,l),p=g=_=null),A=!0,b=!0,o=!0):b?(b=!1,o=!0):H(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,C=i;else{if(a=t.line,s=t.lineStart,l=t.position,!Ei(t,r,kg,!1,!0))break;if(t.line===n){for(C=t.input.charCodeAt(t.position);Rr(C);)C=t.input.charCodeAt(++t.position);if(C===58)C=t.input.charCodeAt(++t.position),Kt(C)||H(t,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(Bi(t,f,u,p,g,null,a,s,l),p=g=_=null),A=!0,b=!1,o=!1,p=t.tag,g=t.result;else if(A)H(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=h,!0}else if(A)H(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=h,!0}if((t.line===n||t.lineIndent>e)&&(b&&(a=t.line,s=t.lineStart,l=t.position),Ei(t,e,Ta,!0,o)&&(b?g=t.result:_=t.result),b||(Bi(t,f,u,p,g,_,a,s,l),p=g=_=null),xt(t,!0,-1),C=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&C!==0)H(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return b&&Bi(t,f,u,p,g,null,a,s,l),A&&(t.tag=c,t.anchor=h,t.kind="mapping",t.result=f),A}function xB(t){var e,r=!1,i=!1,o,n,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&H(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,o="!!",a=t.input.charCodeAt(++t.position)):o="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(n=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):H(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Kt(a);)a===33&&(i?H(t,"tag suffix cannot contain exclamation marks"):(o=t.input.slice(e-1,t.position+1),wg.test(o)||H(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),nB.test(n)&&H(t,"tag suffix cannot contain flow indicator characters")}n&&!Ag.test(n)&&H(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){H(t,"tag name is malformed: "+n)}return r?t.tag=n:cr.call(t.tagMap,o)?t.tag=t.tagMap[o]+n:o==="!"?t.tag="!"+n:o==="!!"?t.tag="tag:yaml.org,2002:"+n:H(t,'undeclared tag handle "'+o+'"'),!0}function yB(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&H(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Kt(r)&&!Ai(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&H(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function _B(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new uB(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,H(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)CB(r);return r.documents}function bB(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=Mg(t,r);if(typeof e!="function")return i;for(var o=0,n=i.length;o<n;o+=1)e(i[o])}function TB(t,e){var r=Mg(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new qe("expected a single document in the stream, but found more")}}var vB=bB,kB=TB,SB={loadAll:vB,load:kB},wB=bg,AB=SB.load;function BB(t){var o;let e=t.match(Rm);if(!e)return{text:t,metadata:{}};let r=(o=AB(e[1],{schema:wB}))!=null?o:{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}var FB=t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),LB=t=>{let{text:e,metadata:r}=BB(t),{displayMode:i,title:o,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},MB=t=>{var i;let e=(i=Ao.detectInit(t))!=null?i:{},r=Ao.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:o})=>{}):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:ik(t),directive:e}};function Eg(t){let e=FB(t),r=LB(e),i=MB(r.text),o=Um(r.config,i.directive);return t=Pw(i.text),{code:t,title:r.title,config:o}}var EB=5e4,OB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",IB="sandbox",DB="loose",NB="http://www.w3.org/2000/svg",RB="http://www.w3.org/1999/xlink",PB="http://www.w3.org/1999/xhtml",$B="100%",zB="100%",qB="border:0;margin:0;",WB="margin:0",UB="allow-top-navigation-by-user-activation allow-popups",HB='The "iframe" tag is not supported by your browser.',YB=["foreignobject"],jB=["dominant-baseline"];function Og(t){var r;let e=Eg(t);return xa(),Bk((r=e.config)!=null?r:{}),e}async function GB(t,e){Zl(),t=Og(t).code;try{await ec(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}var Am=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,VB=(t,e={})=>{var r;let i="";if(t.themeCSS!==void 0&&(i+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(i+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!ea(e)){let s=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(let l in e){let c=e[l];ea(c.styles)||s.forEach(h=>{i+=Am(c.id,h,c.styles)}),ea(c.textStyles)||(i+=Am(c.id,"tspan",c.textStyles))}}return i},XB=(t,e,r,i)=>{let o=VB(t,r),n=VS(e,o,t.themeVariables);return ha(cm(`${i}{${n}}`),um)},KB=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=kk(i),i=i.replace(/<br>/g,"<br/>"),i},ZB=(t="",e)=>{var r,i;let o=(i=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":zB,n=btoa('<body style="'+WB+'">'+t+"</body>");return`<iframe style="width:${$B};height:${o};${qB}" src="data:text/html;base64,${n}" sandbox="${UB}">
${HB}
</iframe>`},Bm=(t,e,r,i,o)=>{let n=t.append("div");n.attr("id",r),i&&n.attr("style",i);let a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",NB);return o&&a.attr("xmlns:xlink",o),a.append("g"),t};function Fm(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}var QB=(t,e,r,i)=>{var o,n,a;(o=t.getElementById(e))==null||o.remove(),(n=t.getElementById(r))==null||n.remove(),(a=t.getElementById(i))==null||a.remove()},JB=async function(t,e,r){var V;var i,o,n,a,s,l;Zl();let c=Og(e);e=c.code;let h=Te();j.debug(h),e.length>((V=h==null?void 0:h.maxTextSize)!=null?V:EB)&&(e=OB);let f="#"+t,u="i"+t,p="#"+u,g="d"+t,_="#"+g,b=jt("body"),A=h.securityLevel===IB,C=h.securityLevel===DB,M=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),A){let Z=Fm(jt(r),u);b=jt(Z.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=jt(r);Bm(b,t,g,`font-family: ${M}`,RB)}else{if(QB(document,t,g,u),A){let Z=Fm(jt("body"),u);b=jt(Z.nodes()[0].contentDocument.body),b.node().style.margin=0}else b=jt("body");Bm(b,t,g)}let S,D;try{S=await ec(e,{title:c.title})}catch(Z){S=new Ca("error"),D=Z}let T=b.select(_).node(),O=S.type,F=T.firstChild,G=F.firstChild,Q=(o=(i=S.renderer).getClasses)==null?void 0:o.call(i,e,S),N=XB(h,O,Q,f),B=document.createElement("style");B.innerHTML=N,F.insertBefore(B,G);try{await S.renderer.draw(e,t,gm,S)}catch(Z){throw uw.draw(e,t,gm),Z}let x=b.select(`${_} svg`),y=(a=(n=S.db).getAccTitle)==null?void 0:a.call(n),I=(l=(s=S.db).getAccDescription)==null?void 0:l.call(s);eF(O,x,y,I),b.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",PB);let k=b.select(_).node().innerHTML;if(j.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),k=KB(k,A,Im(h.arrowMarkerAbsolute)),A){let Z=b.select(_+" svg").node();k=ZB(k,Z)}else C||(k=Pr.default.sanitize(k,{ADD_TAGS:YB,ADD_ATTR:jB}));if(Iw(),D)throw D;let R=jt(A?p:_).node();return R&&"remove"in R&&R.remove(),{svg:k,bindFunctions:S.db.bindFunctions}};function tF(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),wk(t),t!=null&&t.theme&&t.theme in We?t.themeVariables=We[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=We.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?Sk(t):Ym();zl(r.logLevel),Zl()}var ec=(t,e={})=>{let{code:r}=Eg(t);return Ow(r,e)};function eF(t,e,r,i){Nw(e,t),Rw(e,r,i,e.attr("id"))}var $r=Object.freeze({render:JB,parse:GB,getDiagramFromText:ec,initialize:tF,getConfig:Te,setConfig:jm,getSiteConfig:Ym,updateSiteConfig:Ak,reset:()=>{xa()},globalReset:()=>{xa(Li)},defaultConfig:Li});zl(Te().logLevel);xa(Te());var rF=async()=>{j.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Fi).map(async([r,{detector:i,loader:o}])=>{if(o)try{Kl(r)}catch(n){try{let{diagram:a,id:s}=await o();_a(s,a,i)}catch(a){throw j.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Fi[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){j.error(`Failed to load ${e.length} external diagrams`);for(let r of e)j.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},iF=(t,e,r)=>{j.warn(t),Wm(t)?(r&&r(t.str,t.hash),e.push(ne(oe({},t),{message:t.str,error:t}))):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Ig=async function(t={querySelector:".mermaid"}){try{await oF(t)}catch(e){if(Wm(e)&&j.error(e.str),ve.parseError&&ve.parseError(e),!t.suppressErrors)throw j.error("Use the suppressErrors option to suppress these errors"),e}},oF=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=$r.getConfig();j.debug(`${t?"":"No "}Callback function found`);let o;if(r)o=r;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");j.debug(`Found ${o.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(j.debug("Start On Load: "+(i==null?void 0:i.startOnLoad))
/*! Bundled license information:
dompurify/dist/purify.js:
(*! @license DOMPurify 3.1.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.1.6/LICENSE *)
mermaid/dist/mermaid-2490e8f2.js:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
(*! Check if previously processed *)
(*!
* Wait for document loaded before starting the execution
*)
*/