89 lines
320 KiB
JavaScript
Raw Normal View History

(self.webpackChunk=self.webpackChunk||[]).push([["mermaid"],{"./node_modules/@braintree/sanitize-url/dist/index.js":function(mt,D){"use strict";var f;f={value:!0},D.Jf=D.dz=void 0;var B=/^([^\w]*)(javascript|data|vbscript)/im,E=/&#(\w+)(^\w|;)?/g,P=/&(newline|tab);/gi,A=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,M=/^.+(:|&colon;)/gim,$=[".","/"];D.dz="about:blank";function W(k){return $.indexOf(k[0])>-1}function q(k){var I=k.replace(A,"");return I.replace(E,function(et,J){return String.fromCharCode(J)})}function m(k){if(!k)return D.dz;var I=q(k).replace(P,"").replace(A,"").trim();if(!I)return D.dz;if(W(I))return I;var et=I.match(M);if(!et)return I;var J=et[0];return B.test(J)?D.dz:I}D.Jf=m},"./node_modules/dompurify/dist/purify.js":function(mt){(function(D,f){mt.exports=f()})(this,function(){"use strict";const{entries:D,setPrototypeOf:f,isFrozen:B,getPrototypeOf:E,getOwnPropertyDescriptor:P}=Object;let{freeze:A,seal:M,create:$}=Object,{apply:W,construct:q}=typeof Reflect<"u"&&Reflect;A||(A=function(Tt){return Tt}),M||(M=function(Tt){return Tt}),W||(W=function(Tt,Wt,zt){return Tt.apply(Wt,zt)}),q||(q=function(Tt,Wt){return new Tt(...Wt)});const m=St(Array.prototype.forEach),k=St(Array.prototype.pop),I=St(Array.prototype.push),et=St(String.prototype.toLowerCase),J=St(String.prototype.toString),b=St(String.prototype.match),j=St(String.prototype.replace),R=St(String.prototype.indexOf),at=St(String.prototype.trim),dt=St(Object.prototype.hasOwnProperty),gt=St(RegExp.prototype.test),Ct=me(TypeError);function St(Yt){return function(Tt){for(var Wt=arguments.length,zt=new Array(Wt>1?Wt-1:0),_e=1;_e<Wt;_e++)zt[_e-1]=arguments[_e];return W(Yt,Tt,zt)}}function me(Yt){return function(){for(var Tt=arguments.length,Wt=new Array(Tt),zt=0;zt<Tt;zt++)Wt[zt]=arguments[zt];return q(Yt,Wt)}}function ct(Yt,Tt){let Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:et;f&&f(Yt,null);let zt=Tt.length;for(;zt--;){let _e=Tt[zt];if(typeof _e=="string"){const We=Wt(_e);We!==_e&&(B(Tt)||(Tt[zt]=We),_e=We)}Yt[_e]=!0}return Yt}function Kt(Yt){for(let Tt=0;Tt<Yt.length;Tt++)dt(Yt,Tt)||(Yt[Tt]=null);return Yt}function ge(Yt){const Tt=$(null);for(const[Wt,zt]of D(Yt))dt(Yt,Wt)&&(Array.isArray(zt)?Tt[Wt]=Kt(zt):zt&&typeof zt=="object"&&zt.constructor===Object?Tt[Wt]=ge(zt):Tt[Wt]=zt);return Tt}function Ve(Yt,Tt){for(;Yt!==null;){const zt=P(Yt,Tt);if(zt){if(zt.get)return St(zt.get);if(typeof zt.value=="function")return St(zt.value)}Yt=E(Yt)}function Wt(){return null}return Wt}const Ke=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$t=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ue=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLi
`+Be),ar&&m([$i,Zr,Br],xi=>{Be=j(Be,xi," ")}),be&&rn?be.createHTML(Be):Be},Tt.setConfig=function(){let bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bi(bt),An=!0},Tt.clearConfig=function(){Fr=null,An=!1},Tt.isValidAttribute=function(bt,v,X){Fr||bi({});const pt=xe(bt),te=xe(v);return ln(pt,te,X)},Tt.addHook=function(bt,v){typeof v=="function"&&(ti[bt]=ti[bt]||[],I(ti[bt],v))},Tt.removeHook=function(bt){if(ti[bt])return k(ti[bt])},Tt.removeHooks=function(bt){ti[bt]&&(ti[bt]=[])},Tt.removeAllHooks=function(){ti={}},Tt}var Yr=Kn();return Yr})},"./node_modules/ts-dedent/esm/index.js":function(mt,D,f){"use strict";f.d(D,{T:function(){return B}});function B(P){for(var A=[],M=1;M<arguments.length;M++)A[M-1]=arguments[M];var $=Array.from(typeof P=="string"?[P]:P);$[$.length-1]=$[$.length-1].replace(/\r?\n([\t ]*)$/,"");var W=$.reduce(function(k,I){var et=I.match(/\n([\t ]+|(?!\s).)/g);return et?k.concat(et.map(function(J){var b,j;return(j=(b=J.match(/[\t ]/g))===null||b===void 0?void 0:b.length)!==null&&j!==void 0?j:0})):k},[]);if(W.length){var q=new RegExp(`
[ ]{`+Math.min.apply(Math,W)+"}","g");$=$.map(function(k){return k.replace(q,`
`)})}$[0]=$[0].replace(/^\r?\n/,"");var m=$[0];return A.forEach(function(k,I){var et=m.match(/(?:^|\n)( *)$/),J=et?et[1]:"",b=k;typeof k=="string"&&k.includes(`
`)&&(b=String(k).split(`
`).map(function(j,R){return R===0?j:""+J+j}).join(`
`)),m+=b+$[I+1]}),m}var E=null},"./node_modules/d3/src/index.js":function(mt,D,f){"use strict";f.d(D,{JLW:function(){return Td},l78:function(){return at},tlR:function(){return j},qrM:function(){return Ld},Yu4:function(){return Md},IA3:function(){return Fd},Wi0:function(){return Dd},PGM:function(){return Id},OEq:function(){return Pd},y8u:function(){return jd},olC:function(){return Nd},IrU:function(){return Rd},oDi:function(){return $d},Q7f:function(){return zd},cVp:function(){return Ud},lUB:function(){return Ru},Lx9:function(){return Wd},nVG:function(){return Hd},uxU:function(){return Yd},Xf2:function(){return qd},GZz:function(){return Gd},UPb:function(){return Kd},dyv:function(){return Vd},bEH:function(){return sc},n8j:function(){return Sd},T9B:function(){return B},jkA:function(){return E},rLf:function(){return Ed},WH:function(){return as},m4Y:function(){return Ha},UMr:function(){return ss},w7C:function(){return ad},zt:function(){return cd},Ltv:function(){return hd},Ubm:function(){return ud},JWy:function(){return cu},UAC:function(){return jr},DCK:function(){return Ms},TUC:function(){return $r},Agd:function(){return wo},t6C:function(){return xr},wXd:function(){return pn},ABi:function(){return _n},Ui6:function(){return Bo},rGn:function(){return Ga},ucG:function(){return vr},YPH:function(){return zn},Mol:function(){return Tr},PGu:function(){return qa},GuW:function(){return vs}});function B(t,i){let r;if(i===void 0)for(const o of t)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of t)(a=i(a,++o,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function E(t,i){let r;if(i===void 0)for(const o of t)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of t)(a=i(a,++o,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function P(t){return t}var A=1,M=2,$=3,W=4,q=1e-6;function m(t){return"translate("+t+",0)"}function k(t){return"translate(0,"+t+")"}function I(t){return i=>+t(i)}function et(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function J(){return!this.__axis}function b(t,i){var r=[],o=null,a=null,c=6,h=6,d=3,g=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===A||t===W?-1:1,C=t===W||t===M?"x":"y",L=t===A||t===$?m:k;function x(O){var nt=o??(i.ticks?i.ticks.apply(i,r):i.domain()),xt=a??(i.tickFormat?i.tickFormat.apply(i,r):P),U=Math.max(c,0)+d,N=i.range(),it=+N[0]+g,G=+N[N.length-1]+g,ot=(i.bandwidth?et:I)(i.copy(),g),lt=O.selection?O.selection():O,Z=lt.selectAll(".domain").data([null]),Mt=lt.selectAll(".tick").data(nt,i).order(),Nt=Mt.exit(),ee=Mt.enter().append("g").attr("class","tick"),jt=Mt.select("line"),ht=Mt.select("text");Z=Z.merge(Z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Mt=Mt.merge(ee),jt=jt.merge(ee.append("line").attr("stroke","currentColor").attr(C+"2",p*c)),ht=ht.merge(ee.append("text").attr("fill","currentColor").attr(C,p*U).attr("dy",t===A?"0em":t===$?"0.71em":"0.32em")),O!==lt&&(Z=Z.transition(O),Mt=Mt.transition(O),jt=jt.transition(O),ht=ht.transition(O),Nt=Nt.transition(O).attr("opacity",q).attr("transform",function(Rt){return isFinite(Rt=ot(Rt))?L(Rt+g):this.getAttribute("transform")}),ee.attr("opacity",q).attr("transform",function(Rt){var rt=this.parentNode.__axis;return L((rt&&isFinite(rt=rt(Rt))?rt:ot(Rt))+g)})),Nt.remove(),Z.attr("d",t===W||t===M?h?"M"+p*h+","+it+"H"+g+"V"+G+"H"+p*h:"M"+g+","+it+"V"+G:h?"M"+it+","+p*h+"V"+g+"H"+G+"V"+p*h:"M"+it+","+g+"H"+G),Mt.attr("opacity",1).attr("transform",function(Rt){return L(ot(Rt)+g)}),jt.attr(C+"2",p*c),ht.attr(C,p*U).text(xt),lt.filter(J).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===M?"start":t===W?"end":"middle"),lt.each(function(){this.__axis=ot})}return x.scale=function(O){return arguments.length?(i=O,x):i},x.ticks=function(){return r=Array.from(arguments),x},x.tickArguments=function(O){return arguments.length?(r=O==null?[]:Array.from(O),x):r.slice()},x.tickValues=function(O){return arguments.length?(o=O==null?null:Array.from(O),x):o&&o.slice()},x.tickFormat=function(O){return argument
<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">
${l}
</div>
`:`<div>${l}</div>`).join("").replace(Fi,(l,u)=>s.renderToString(u,{throwOnError:!0,displayMode:!0,output:Ui()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},hr={getRows:Er,sanitizeText:zi,sanitizeTextOrArray:ar,hasBreaks:eo,splitBreaks:Mi,lineBreakRegex:re,removeScript:tn,getUrl:lr,evaluate:cr,getMax:rn,getMin:io},Oe=(e,n)=>n?m(e,{s:-40,l:10}):m(e,{s:-40,l:-10}),Wi="#ffffff",Hi="#f2f2f2";let ei=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 n,s,l,u,_,y,w,F,V,Q,Y;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||Oe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Oe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Oe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Oe(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||b(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||b(this.tertiaryColor),this.lineColor=this.lineColor||b(this.background),this.arrowheadColor=this.arrowheadColor||b(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,j.A)(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||(0,j.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||b(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,R.A)(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.t
`);for(const[s,{detector:l}]of Object.entries(Di))if(l(e,n))return s;throw new qi(`No diagram type detected matching given configuration for text: ${e}`)},En=(...e)=>{for(const{id:n,detector:s,loader:l}of e)Ye(n,s,l)},Ye=(e,n,s)=>{Di[e]?At.error(`Detector with key ${e} already exists`):Di[e]={detector:n,loader:s},At.debug(`Detector with key ${e} added${s?" with loader":""}`)},Ln=e=>Di[e].loader,ln=(e,n,{depth:s=2,clobber:l=!1}={})=>{const u={depth:s,clobber:l};return Array.isArray(n)&&!Array.isArray(e)?(n.forEach(_=>ln(e,_,u)),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach(_=>{e.includes(_)||e.push(_)}),e):e===void 0||s<=0?e!=null&&typeof e=="object"&&typeof n=="object"?Object.assign(e,n):n:(n!==void 0&&typeof e=="object"&&typeof n=="object"&&Object.keys(n).forEach(_=>{typeof n[_]=="object"&&(e[_]===void 0||typeof e[_]=="object")?(e[_]===void 0&&(e[_]=Array.isArray(n[_])?[]:{}),e[_]=ln(e[_],n[_],{depth:s-1,clobber:l})):(l||typeof e[_]!="object"&&typeof n[_]!="object")&&(e[_]=n[_])}),e)},Ce=ln,Mn="\u200B",Po={curveBasis:A.qrM,curveBasisClosed:A.Yu4,curveBasisOpen:A.IA3,curveBumpX:A.Wi0,curveBumpY:A.PGM,curveBundle:A.OEq,curveCardinalClosed:A.olC,curveCardinalOpen:A.IrU,curveCardinal:A.y8u,curveCatmullRomClosed:A.Q7f,curveCatmullRomOpen:A.cVp,curveCatmullRom:A.oDi,curveLinear:A.lUB,curveLinearClosed:A.Lx9,curveMonotoneX:A.nVG,curveMonotoneY:A.uxU,curveNatural:A.Xf2,curveStep:A.GZz,curveStepAfter:A.UPb,curveStepBefore:A.dyv},bt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,v=function(e,n){const s=X(e,/(?:init\b)|(?:initialize\b)/);let l={};if(Array.isArray(s)){const y=s.map(w=>w.args);Oi(y),l=Ce(l,[...y])}else l=s.args;if(!l)return;let u=gr(e,n);const _="config";return l[_]!==void 0&&(u==="flowchart-v2"&&(u="flowchart"),l[u]=l[_],delete l[_]),l},X=function(e,n=null){try{const s=new RegExp(`[%]{2}(?![{]${bt.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),At.debug(`Detecting diagram directive${n!==null?" type:"+n:""} based on the text:${e}`);let l;const u=[];for(;(l=ye.exec(e))!==null;)if(l.index===ye.lastIndex&&ye.lastIndex++,l&&!n||n&&l[1]&&l[1].match(n)||n&&l[2]&&l[2].match(n)){const _=l[1]?l[1]:l[2],y=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;u.push({type:_,args:y})}return u.length===0?{type:e,args:null}:u.length===1?u[0]:u}catch(s){return At.error(`ERROR: ${s.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},pt=function(e){return e.replace(ye,"")},te=function(e,n){for(const[s,l]of n.entries())if(l.match(e))return s;return-1};function ve(e,n){if(!e)return n;const s=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Po[s]??n}function Te(e,n){const s=e.trim();if(s)return n.securityLevel!=="loose"?(0,P.Jf)(s):s}const Be=(e,...n)=>{const s=e.split("."),l=s.length-1,u=s[l];let _=window;for(let y=0;y<l;y++)if(_=_[s[y]],!_){At.error(`Function name: ${e} not found in window`);return}_[u](...n)};function xi(e,n){return!e||!n?0:Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function Gi(e){let n,s=0;e.forEach(u=>{s+=xi(u,n),n=u});const l=s/2;return _r(e,l)}function Ee(e){return e.length===1?e[0]:Gi(e)}const pr=(e,n=2)=>{const s=Math.pow(10,n);return Math.round(e*s)/s},_r=(e,n)=>{let s,l=n;for(const u of e){if(s){const _=xi(u,s);if(_<l)l-=_;else{const y=l/_;if(y<=0)return s;if(y>=1)return{x:u.x,y:u.y};if(y>0&&y<1)return{x:pr((1-y)*s.x+y*u.x,5),y:pr((1-y)*s.y+y*u.y,5)}}}s=u}throw new Error("Could not find a suitable point for the given distance")},Ii=(e,n,s)=>{At.info(`our points ${JSON.stringify(n)}`),n[0]!==s&&(n=n.reverse());const u=_r(n,25),_=e?10:5,y=Math.atan2(n[0].y-u.y,n[0].x-u.x),w={x:0,y:0};return w.x=Math.sin(y)*_+(n[0].x+u.x)/2,w.y=-Math.cos(y)*_+(n[0].y+u.y)/2,w};function vi(e,n,s){const l=structuredClone(s);At.info("our points",l),n!=="start_left"&&n!=="start_right"&&l.reverse();const u=25+e,_=_r(l,u),y=10+e*.5,w=Math.atan2(l[0].y-_.y,l[0].x-_.x),F={x:0,y:0};return n==="start_left"?(F.x=Math.sin(w+Math.PI)*y+(l[0].x+_.x)/2,F.y=-Math.cos(w+Math.PI)*y+(l[0].y+_.y)/2):n==="end_right"?(F.x=Math.sin(w-Math.PI)*y+(l[0].x+_.x)/2-5,F.y=-Math.cos(w-Math.PI)*y+(l[0].y+_.y)/2-5):n==="end_left"?(F.x=Math.sin(w)*y+(l[0].x+_.x)/2-5,F.y=-Math.cos(w)*y+(l[0].y+_.y)/2-5):(F.x=Math.sin(w)*y+(l[0].x+_.x)/2,F.y=-Math.cos(w)*y+(l[0].y+_.y)/2),F}function js(e){let n="",s="";for(const l of e)l!==void 0&&(l.startsWith("color:")||l.startsWith("text-align:")?s=s+l+";":n=n+l+";");return{style:n,labelStyle:s}}let Ns=0;const Rs=()=>(Ns++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ns);function Ti(e){let n="";const s="0123456789abcdef",l=s.length;for(let u=0;u<e;u++)n+=s.charAt(Math.floor(Math.random()*l));return n}const jo=e=>Ti(e.length),No=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:""}},$s=function(e,n){const s=n.text.replace(hr.lineBreakRegex," "),[,l]=yr(n.fontSize),u=e.append("text");u.attr("x",n.x),u.attr("y",n.y),u.style("text-anchor",n.anchor),u.style("font-family",n.fontFamily),u.style("font-size",l),u.style("font-weight",n.fontWeight),u.attr("fill",n.fill),n.class!==void 0&&u.attr("class",n.class);const _=u.append("tspan");return _.attr("x",n.x+n.textMargin*2),_.attr("fill",n.fill),_.text(s),u},Fn=(0,dt.A)((e,n,s)=>{if(!e||(s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},s),hr.lineBreakRegex.test(e)))return e;const l=e.split(" "),u=[];let _="";return l.forEach((y,w)=>{const F=cn(`${y} `,s),V=cn(_,s);if(F>n){const{hyphenatedStrings:S,remainingWord:H}=xl(y,n,"-",s);u.push(_,...S),_=H}else V+F>=n?(u.push(_),_=y):_=[_,y].filter(Boolean).join(" ");w+1===l.length&&u.push(_)}),u.filter(y=>y!=="").join(s.joinWith)},(e,n,s)=>`${e}${n}${s.fontSize}${s.fontWeight}${s.fontFamily}${s.joinWith}`),xl=(0,dt.A)((e,n,s="-",l)=>{l=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},l);const u=[...e],_=[];let y="";return u.forEach((w,F)=>{cons
font-family: ${s.fontFamily};
font-size: ${s.fontSize};
fill: ${s.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${s.errorBkgColor};
}
& .error-text {
fill: ${s.errorTextColor};
stroke: ${s.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: ${s.lineColor};
stroke: ${s.lineColor};
}
& .marker.cross {
stroke: ${s.lineColor};
}
& svg {
font-family: ${s.fontFamily};
font-size: ${s.fontSize};
}
${l}
${n}
`},iu=(e,n)=>{n!==void 0&&(hi[e]=n)},Xl=eu;let Vo="",Ko="",Xo="";const co=e=>zi(e,Ai()),ho=()=>{Vo="",Xo="",Ko=""},Ir=e=>{Vo=co(e).replace(/^\s+/g,"")},Pr=()=>Vo,Zo=e=>{Xo=co(e).replace(/\n\s+/g,`
`)},$e=()=>Xo,ze=e=>{Ko=co(e)},Jo=()=>Ko,uo=Object.freeze(Object.defineProperty({__proto__:null,clear:ho,getAccDescription:$e,getAccTitle:Pr,getDiagramTitle:Jo,setAccDescription:Zo,setAccTitle:Ir,setDiagramTitle:ze},Symbol.toStringTag,{value:"Module"})),fo=At,mo=ue,go=Ai,Ki=Uo,fa=Pi,ma=e=>zi(e,go()),ga=Go,Zl=()=>uo,br={},po=(e,n,s)=>{var l;if(br[e])throw new Error(`Diagram ${e} already registered.`);br[e]=n,s&&Ye(e,s),iu(e,n.styles),(l=n.injectUtils)==null||l.call(n,fo,mo,go,ma,ga,Zl(),()=>{})},Qo=e=>{if(e in br)return br[e];throw new Jl(e)};class Jl extends Error{constructor(n){super(`Diagram ${n} not found.`)}}const _o=e=>{var n;const{securityLevel:s}=go();let l=(0,A.Ltv)("body");if(s==="sandbox"){const y=((n=(0,A.Ltv)(`#i${e}`).node())==null?void 0:n.contentDocument)??document;l=(0,A.Ltv)(y.body)}return l.select(`#${e}`)},Ql={draw:(e,n,s)=>{At.debug(`rendering svg for syntax error
`);const l=_o(n),u=l.append("g");l.attr("viewBox","0 0 2412 512"),qo(l,100,512,!0),u.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"),u.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"),u.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"),u.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"),u.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"),u.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"),u.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"),u.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${s}`)}},nu=Ql,ou={db:{},renderer:Ql,parser:{parser:{yy:{}},parse:()=>{}}},yo="flowchart-elk",lu={id:yo,detector:(e,n)=>{var s;return!!(/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((s=n?.flowchart)==null?void 0:s.defaultRenderer)==="elk")},loader:async()=>{const{diagram:e}=await Promise.all([f.e("-------"),f.e("vendors-node_modules_mermaid_dist_flowchart-elk-definition-5fe447d6_js")]).then(f.bind(f,"./node_modules/mermaid/dist/flowchart-elk-definition-5fe447d6.js"));return{id:yo,diagram:e}}},tc="timeline",Co={id:tc,detector:e=>/^\s*timeline/.test(e),loader:async()=>{const{diagram:e}=await f.e("vendors-node_modules_mermaid_dist_timeline-definition-fea2a41d_js").then(f.bind(f,"./node_modules/mermaid/dist/timeline-definition-fea2a41d.js"));return{id:tc,diagram:e}}},ts="mindmap",fn={id:ts,detector:e=>/^\s*mindmap/.test(e),loader:async()=>{const{diagram:e}=await Promise.all([f.e("-------"),f.e("vendors-node_modules_mermaid_dist_mindmap-definition-f354de21_js")]).then(f.bind(f,"./node_modules/mermaid/dist/mindmap-definition-f354de21.js"));return{id:ts,diagram:e}}},es="sankey",oc={id:es,detector:e=>/^\s*sankey-beta/.test(e),loader:async()=>{const{diagram:e}=await f.e("vendors-node_modules_mermaid_dist_sankeyDiagram-97764748_js").then(f.bind(f,"./node_modules/mermaid/dist/sankeyDiagram-97764748.js"));return{id:es,diagram:e}}},ui="block",is={id:ui,detector:e=>/^\s*block-beta/.test(e),loader:async()=>{const{diagram:e}=await Promise.all([f.e("-------"),f.e("vendors-node_modules_mermaid_dist_blockDiagram-91b80b7a_js")]).then(f.bind(f,"./node_modules/mermaid/dist/blockDiagram-91b80b7a.js"));return{id:ui,diagram:e}}};let rs=!1;const ba=()=>{rs||(rs=!0,po("error",ou,e=>e.toLowerCase().trim()==="error"),po("---",{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
`;const l=Ai();try{this.type=gr(n,l)}catch(_){this.type="error",this.detectError=_}const u=Qo(this.type);At.debug("Type "+this.type),this.db=u.db,this.renderer=u.renderer,this.parser=u.parser,this.parser.parser.yy=this.db,this.init=u.init,this.parse()}parse(){var n,s,l,u,_;if(this.detectError)throw this.detectError;(s=(n=this.db).clear)==null||s.call(n);const y=Ai();(l=this.init)==null||l.call(this,y),this.metadata.title&&((_=(u=this.db).setDiagramTitle)==null||_.call(u,this.metadata.title)),this.parser.parse(this.text)}async render(n,s){await this.renderer.draw(this.text,n,s,this)}getParser(){return this.parser}getType(){return this.type}}const Ni=async(e,n={})=>{const s=gr(e,Ai());try{Qo(s)}catch{const u=Ln(s);if(!u)throw new qi(`Diagram ${s} not found.`);const{id:_,diagram:y}=await u();po(_,y)}return new bo(e,n)};let ns=[];const xa=()=>{ns.forEach(e=>{e()}),ns=[]},sc="graphics-document document";function fu(e,n){e.attr("role",sc),n!==""&&e.attr("aria-roledescription",n)}function ac(e,n,s,l){if(e.insert!==void 0){if(s){const u=`chart-desc-${l}`;e.attr("aria-describedby",u),e.insert("desc",":first-child").attr("id",u).text(s)}if(n){const u=`chart-title-${l}`;e.attr("aria-labelledby",u),e.insert("title",":first-child").attr("id",u).text(n)}}}const xo=e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();function lc(e){return typeof e>"u"||e===null}function va(e){return typeof e=="object"&&e!==null}function mu(e){return Array.isArray(e)?e:lc(e)?[]:[e]}function os(e,n){var s,l,u,_;if(n)for(_=Object.keys(n),s=0,l=_.length;s<l;s+=1)u=_[s],e[u]=n[u];return e}function Ta(e,n){var s="",l;for(l=0;l<n;l+=1)s+=e;return s}function Aa(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var ka=lc,Sa=va,ss=mu,as=Ta,wa=Aa,gu=os,qe={isNothing:ka,isObject:Sa,toArray:ss,repeat:as,isNegativeZero:wa,extend:gu};function Ba(e,n){var s="",l=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(s+='in "'+e.mark.name+'" '),s+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(s+=`
`+e.mark.snippet),l+" "+s):l}function Rn(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Ba(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Rn.prototype=Object.create(Error.prototype),Rn.prototype.constructor=Rn,Rn.prototype.toString=function(n){return this.name+": "+Ba(this,n)};var di=Rn;function ls(e,n,s,l,u){var _="",y="",w=Math.floor(u/2)-1;return l-n>w&&(_=" ... ",n=l-w+_.length),s-l>w&&(y=" ...",s=l+w-y.length),{str:_+e.slice(n,s).replace(/\t/g,"\u2192")+y,pos:l-n+_.length}}function $n(e,n){return qe.repeat(" ",n-e.length)+e}function cs(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var s=/\r?\n|\r|\0/g,l=[0],u=[],_,y=-1;_=s.exec(e.buffer);)u.push(_.index),l.push(_.index+_[0].length),e.position<=_.index&&y<0&&(y=l.length-2);y<0&&(y=l.length-1);var w="",F,V,Q=Math.min(e.line+n.linesAfter,u.length).toString().length,Y=n.maxLength-(n.indent+Q+3);for(F=1;F<=n.linesBefore&&!(y-F<0);F++)V=ls(e.buffer,l[y-F],u[y-F],e.position-(l[y]-l[y-F]),Y),w=qe.repeat(" ",n.indent)+$n((e.line-F+1).toString(),Q)+" | "+V.str+`
`+w;for(V=ls(e.buffer,l[y],u[y],e.position,Y),w+=qe.repeat(" ",n.indent)+$n((e.line+1).toString(),Q)+" | "+V.str+`
`,w+=qe.repeat("-",n.indent+Q+3+V.pos)+`^
`,F=1;F<=n.linesAfter&&!(y+F>=u.length);F++)V=ls(e.buffer,l[y+F],u[y+F],e.position-(l[y]-l[y+F]),Y),w+=qe.repeat(" ",n.indent)+$n((e.line+F+1).toString(),Q)+" | "+V.str+`
`;return w.replace(/\n$/,"")}var vo=cs,cc=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],hs=["scalar","sequence","mapping"];function hc(e){var n={};return e!==null&&Object.keys(e).forEach(function(s){e[s].forEach(function(l){n[String(l)]=s})}),n}function uc(e,n){if(n=n||{},Object.keys(n).forEach(function(s){if(cc.indexOf(s)===-1)throw new di('Unknown option "'+s+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(s){return s},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=hc(n.styleAliases||null),hs.indexOf(this.kind)===-1)throw new di('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ge=uc;function us(e,n){var s=[];return e[n].forEach(function(l){var u=s.length;s.forEach(function(_,y){_.tag===l.tag&&_.kind===l.kind&&_.multi===l.multi&&(u=y)}),s[u]=l}),s}function dc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,s;function l(u){u.multi?(e.multi[u.kind].push(u),e.multi.fallback.push(u)):e[u.kind][u.tag]=e.fallback[u.tag]=u}for(n=0,s=arguments.length;n<s;n+=1)arguments[n].forEach(l);return e}function Ea(e){return this.extend(e)}Ea.prototype.extend=function(n){var s=[],l=[];if(n instanceof Ge)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(s=s.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new di("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");s.forEach(function(_){if(!(_ instanceof Ge))throw new di("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(_.loadKind&&_.loadKind!=="scalar")throw new di("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(_.multi)throw new di("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(_){if(!(_ instanceof Ge))throw new di("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var u=Object.create(Ea.prototype);return u.implicit=(this.implicit||[]).concat(s),u.explicit=(this.explicit||[]).concat(l),u.compiledImplicit=us(u,"implicit"),u.compiledExplicit=us(u,"explicit"),u.compiledTypeMap=dc(u.compiledImplicit,u.compiledExplicit),u};var pu=Ea,fc=new Ge("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),_u=new Ge("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),La=new Ge("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),mc=new pu({explicit:[fc,_u,La]});function gc(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function pc(){return null}function _c(e){return e===null}var ds=new Ge("tag:yaml.org,2002:null",{kind:"scalar",resolve:gc,construct:pc,predicate:_c,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function yc(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function Cc(e){return e==="true"||e==="True"||e==="TRUE"}function bc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Ma=new Ge("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yc,construct:Cc,predicate:bc,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});functio
\r`;function Ec(e){if(e===null)return!1;var n,s,l=0,u=e.length,_=ko;for(s=0;s<u;s++)if(n=_.indexOf(e.charAt(s)),!(n>64)){if(n<0)return!1;l+=6}return l%8===0}function So(e){var n,s,l=e.replace(/[\r\n=]/g,""),u=l.length,_=ko,y=0,w=[];for(n=0;n<u;n++)n%4===0&&n&&(w.push(y>>16&255),w.push(y>>8&255),w.push(y&255)),y=y<<6|_.indexOf(l.charAt(n));return s=u%4*6,s===0?(w.push(y>>16&255),w.push(y>>8&255),w.push(y&255)):s===18?(w.push(y>>10&255),w.push(y>>2&255)):s===12&&w.push(y>>4&255),new Uint8Array(w)}function Ua(e){var n="",s=0,l,u,_=e.length,y=ko;for(l=0;l<_;l++)l%3===0&&l&&(n+=y[s>>18&63],n+=y[s>>12&63],n+=y[s>>6&63],n+=y[s&63]),s=(s<<8)+e[l];return u=_%3,u===0?(n+=y[s>>18&63],n+=y[s>>12&63],n+=y[s>>6&63],n+=y[s&63]):u===2?(n+=y[s>>10&63],n+=y[s>>4&63],n+=y[s<<2&63],n+=y[64]):u===1&&(n+=y[s>>2&63],n+=y[s<<4&63],n+=y[64],n+=y[64]),n}function Wa(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Lc=new Ge("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ec,construct:So,predicate:Wa,represent:Ua}),Mc=Object.prototype.hasOwnProperty,Fc=Object.prototype.toString;function Oc(e){if(e===null)return!0;var n=[],s,l,u,_,y,w=e;for(s=0,l=w.length;s<l;s+=1){if(u=w[s],y=!1,Fc.call(u)!=="[object Object]")return!1;for(_ in u)if(Mc.call(u,_))if(!y)y=!0;else return!1;if(!y)return!1;if(n.indexOf(_)===-1)n.push(_);else return!1}return!0}function Dc(e){return e!==null?e:[]}var Ha=new Ge("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Oc,construct:Dc}),Xi=Object.prototype.toString;function fi(e){if(e===null)return!0;var n,s,l,u,_,y=e;for(_=new Array(y.length),n=0,s=y.length;n<s;n+=1){if(l=y[n],Xi.call(l)!=="[object Object]"||(u=Object.keys(l),u.length!==1))return!1;_[n]=[u[0],l[u[0]]]}return!0}function Zi(e){if(e===null)return[];var n,s,l,u,_,y=e;for(_=new Array(y.length),n=0,s=y.length;n<s;n+=1)l=y[n],u=Object.keys(l),_[n]=[u[0],l[u[0]]];return _}var Ji=new Ge("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:fi,construct:Zi}),gs=Object.prototype.hasOwnProperty;function Ya(e){if(e===null)return!0;var n,s=e;for(n in s)if(gs.call(s,n)&&s[n]!==null)return!1;return!0}function ps(e){return e!==null?e:{}}var _s=new Ge("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ya,construct:ps}),ys=wc.extend({implicit:[Ra,za],explicit:[Lc,Ha,Ji,_s]}),ae=Object.prototype.hasOwnProperty,xr=1,Ic=2,vr=3,Cs=4,pn=1,yu=2,bs=3,Cu=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,wo=/[\x85\u2028\u2029]/,bu=/[,\[\]\{\}]/,xs=/^(?:!|!!|![a-z\-]+!)$/i,Pc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jr(e){return Object.prototype.toString.call(e)}function Qi(e){return e===10||e===13}function tr(e){return e===9||e===32}function ii(e){return e===9||e===32||e===10||e===13}function Nr(e){return e===44||e===91||e===93||e===123||e===125}function xu(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Rr(e){return e===120?2:e===117?4:e===85?8:0}function zn(e){return 48<=e&&e<=57?e-48:-1}function _n(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function qa(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var vs=new Array(256),Tr=new Array(256),$r=0;$r<256;$r++)vs[$r]=_n($r)?1:0,Tr[$r]=_n($r);function Ga(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||ys,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function jc(e,n){var s={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return s.snippet=vo(s),new di(n,s)}function wt(e,n){throw jc(e,n)}function Ts(e,n){e.onWarning&&e.onWarning.call(null,jc(e,n))}var Nc={YAML:function(n,s,l){var u,_,y;n.version!==null&&wt(n,"duplication of %YAML directive"),l.length!==1&&wt(n,"YAML directive accepts exactly one argument"),u=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),u===null&&wt(n,"ill-formed argument of the YAML directive"),_=parseInt(u[1],10),y=parseInt(u[2],10),_!==1&&wt(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=y<2,y!==1&&y!==2&&Ts(n,"unsupported YAML version of the document")},TAG:function(n,s,l){var u,_;l.length!==2&&wt(n,"TAG directive accepts exactly two arguments"),u=l[0],_=l[1],xs.test(u)||wt(n,"ill-formed tag handle (first argument) of the TAG directive"),ae.call(n.tagMap,u)&&wt(n,'there is a previously declared suffix for "'+u+'" tag handle'),Pc.test(_)||wt(n,"ill-formed tag prefix (second argument) of the TAG directive");try{_=decodeURIComponent(_)}catch{wt(n,"tag prefix is malformed: "+_)}n.tagMap[u]=_}};function zr(e,n,s,l){var u,_,y,w;if(n<s){if(w=e.input.slice(n,s),l)for(u=0,_=w.length;u<_;u+=1)y=w.charCodeAt(u),y===9||32<=y&&y<=1114111||wt(e,"expected valid JSON character");else Cu.test(w)&&wt(e,"the stream contains non-printable characters");e.result+=w}}function Rc(e,n,s,l){var u,_,y,w;for(qe.isObject(s)||wt(e,"cannot merge mappings; the provided source object is unacceptable"),u=Object.keys(s),y=0,w=u.length;y<w;y+=1)_=u[y],ae.call(n,_)||(n[_]=s[_],l[_]=!0)}function Un(e,n,s,l,u,_,y,w,F){var V,Q;if(Array.isArray(u))for(u=Array.prototype.slice.call(u),V=0,Q=u.length;V<Q;V+=1)Array.isArray(u[V])&&wt(e,"nested arrays are not supported inside keys"),typeof u=="object"&&jr(u[V])==="[object Object]"&&(u[V]="[object Object]");if(typeof u=="object"&&jr(u)==="[object Object]"&&(u="[object Object]"),u=String(u),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(_))for(V=0,Q=_.length;V<Q;V+=1)Rc(e,n,_[V],s);else Rc(e,n,_,s);else!e.json&&!ae.call(s,u)&&ae.call(n,u)&&(e.line=y||e.line,e.lineStart=w||e.lineStart,e.position=F||e.position,wt(e,"duplicated mapping key")),u==="__proto__"?Object.defineProperty(n,u,{configurable:!0,enumerable:!0,writable:!0,value:_}):n[u]=_,delete s[u];return n}function er(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):wt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function fe(e,n,s){for(var l=0,u=e.input.charCodeAt(e.position);u!==0;){for(;tr(u);)u===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),u=e.input.charCodeAt(++e.position);if(n&&u===35)do u=e.input.charCodeAt(++e.position);while(u!==10&&u!==13&&u!==0);if(Qi(u))for(er(e),u=e.input.charCodeAt(e.position),l++,e.lineIndent=0;u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);else break}return s!==-1&&l!==0&&e.lineIndent<s&&Ts(e,"deficient indentation"),l}function Ur(e){var n=e.position,s;return s=e.input.charCodeAt(n),!!((s===45||s===46)&&s===e.input.charCodeAt(n+1)&&s===e.input.charCodeAt(n+2)&&(n+=3,s=e.input.charCodeAt(n),s===0||ii(s)))}function As(e,n){n===1?e.result+=" ":n>1&&(e.resul
`,n-1))}function $c(e,n,s){var l,u,_,y,w,F,V,Q,Y=e.kind,S=e.result,H;if(H=e.input.charCodeAt(e.position),ii(H)||Nr(H)||H===35||H===38||H===42||H===33||H===124||H===62||H===39||H===34||H===37||H===64||H===96||(H===63||H===45)&&(u=e.input.charCodeAt(e.position+1),ii(u)||s&&Nr(u)))return!1;for(e.kind="scalar",e.result="",_=y=e.position,w=!1;H!==0;){if(H===58){if(u=e.input.charCodeAt(e.position+1),ii(u)||s&&Nr(u))break}else if(H===35){if(l=e.input.charCodeAt(e.position-1),ii(l))break}else{if(e.position===e.lineStart&&Ur(e)||s&&Nr(H))break;if(Qi(H))if(F=e.line,V=e.lineStart,Q=e.lineIndent,fe(e,!1,-1),e.lineIndent>=n){w=!0,H=e.input.charCodeAt(e.position);continue}else{e.position=y,e.line=F,e.lineStart=V,e.lineIndent=Q;break}}w&&(zr(e,_,y,!1),As(e,e.line-F),_=y=e.position,w=!1),tr(H)||(y=e.position+1),H=e.input.charCodeAt(++e.position)}return zr(e,_,y,!1),e.result?!0:(e.kind=Y,e.result=S,!1)}function yn(e,n){var s,l,u;if(s=e.input.charCodeAt(e.position),s!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=u=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===39)if(zr(e,l,e.position,!0),s=e.input.charCodeAt(++e.position),s===39)l=e.position,e.position++,u=e.position;else return!0;else Qi(s)?(zr(e,l,u,!0),As(e,fe(e,!1,n)),l=u=e.position):e.position===e.lineStart&&Ur(e)?wt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,u=e.position);wt(e,"unexpected end of the stream within a single quoted scalar")}function zc(e,n){var s,l,u,_,y,w;if(w=e.input.charCodeAt(e.position),w!==34)return!1;for(e.kind="scalar",e.result="",e.position++,s=l=e.position;(w=e.input.charCodeAt(e.position))!==0;){if(w===34)return zr(e,s,e.position,!0),e.position++,!0;if(w===92){if(zr(e,s,e.position,!0),w=e.input.charCodeAt(++e.position),Qi(w))fe(e,!1,n);else if(w<256&&vs[w])e.result+=Tr[w],e.position++;else if((y=Rr(w))>0){for(u=y,_=0;u>0;u--)w=e.input.charCodeAt(++e.position),(y=xu(w))>=0?_=(_<<4)+y:wt(e,"expected hexadecimal character");e.result+=qa(_),e.position++}else wt(e,"unknown escape sequence");s=l=e.position}else Qi(w)?(zr(e,s,l,!0),As(e,fe(e,!1,n)),s=l=e.position):e.position===e.lineStart&&Ur(e)?wt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}wt(e,"unexpected end of the stream within a double quoted scalar")}function Uc(e,n){var s=!0,l,u,_,y=e.tag,w,F=e.anchor,V,Q,Y,S,H,Ot=Object.create(null),Dt,Lt,Vt,kt;if(kt=e.input.charCodeAt(e.position),kt===91)Q=93,H=!1,w=[];else if(kt===123)Q=125,H=!0,w={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=w),kt=e.input.charCodeAt(++e.position);kt!==0;){if(fe(e,!0,n),kt=e.input.charCodeAt(e.position),kt===Q)return e.position++,e.tag=y,e.anchor=F,e.kind=H?"mapping":"sequence",e.result=w,!0;s?kt===44&&wt(e,"expected the node content, but found ','"):wt(e,"missed comma between flow collection entries"),Lt=Dt=Vt=null,Y=S=!1,kt===63&&(V=e.input.charCodeAt(e.position+1),ii(V)&&(Y=S=!0,e.position++,fe(e,!0,n))),l=e.line,u=e.lineStart,_=e.position,Wn(e,n,xr,!1,!0),Lt=e.tag,Dt=e.result,fe(e,!0,n),kt=e.input.charCodeAt(e.position),(S||e.line===l)&&kt===58&&(Y=!0,kt=e.input.charCodeAt(++e.position),fe(e,!0,n),Wn(e,n,xr,!1,!0),Vt=e.result),H?Un(e,w,Ot,Lt,Dt,Vt,l,u,_):Y?w.push(Un(e,null,Ot,Lt,Dt,Vt,l,u,_)):w.push(Dt),fe(e,!0,n),kt=e.input.charCodeAt(e.position),kt===44?(s=!0,kt=e.input.charCodeAt(++e.position)):s=!1}wt(e,"unexpected end of the stream within a flow collection")}function vu(e,n){var s,l,u=pn,_=!1,y=!1,w=n,F=0,V=!1,Q,Y;if(Y=e.input.charCodeAt(e.position),Y===124)l=!1;else if(Y===62)l=!0;else return!1;for(e.kind="scalar",e.result="";Y!==0;)if(Y=e.input.charCodeAt(++e.position),Y===43||Y===45)pn===u?u=Y===43?bs:yu:wt(e,"repeat of a chomping mode identifier");else if((Q=zn(Y))>=0)Q===0?wt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):y?wt(e,"repeat of an indentation width identifier"):(w=n+Q-1,y=!0);else break;if(tr(Y)){do Y=e.input.charCodeAt(++e.position);while(tr(Y));if(Y===35)do Y=e.input.charCodeAt(++e.position);while(!Qi(Y)&&Y!==0)}for(;Y!==0;){for(er(e),e.lineIndent=0
`,_?1+F:F):u===pn&&_&&(e.result+=`
`);break}for(l?tr(Y)?(V=!0,e.result+=qe.repeat(`
`,_?1+F:F)):V?(V=!1,e.result+=qe.repeat(`
`,F+1)):F===0?_&&(e.result+=" "):e.result+=qe.repeat(`
`,F):e.result+=qe.repeat(`
`,_?1+F:F),_=!0,y=!0,F=0,s=e.position;!Qi(Y)&&Y!==0;)Y=e.input.charCodeAt(++e.position);zr(e,s,e.position,!1)}return!0}function Wc(e,n){var s,l=e.tag,u=e.anchor,_=[],y,w=!1,F;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=_),F=e.input.charCodeAt(e.position);F!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,wt(e,"tab characters must not be used in indentation")),!(F!==45||(y=e.input.charCodeAt(e.position+1),!ii(y))));){if(w=!0,e.position++,fe(e,!0,-1)&&e.lineIndent<=n){_.push(null),F=e.input.charCodeAt(e.position);continue}if(s=e.line,Wn(e,n,vr,!1,!0),_.push(e.result),fe(e,!0,-1),F=e.input.charCodeAt(e.position),(e.line===s||e.lineIndent>n)&&F!==0)wt(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return w?(e.tag=l,e.anchor=u,e.kind="sequence",e.result=_,!0):!1}function Tu(e,n,s){var l,u,_,y,w,F,V=e.tag,Q=e.anchor,Y={},S=Object.create(null),H=null,Ot=null,Dt=null,Lt=!1,Vt=!1,kt;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=Y),kt=e.input.charCodeAt(e.position);kt!==0;){if(!Lt&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,wt(e,"tab characters must not be used in indentation")),l=e.input.charCodeAt(e.position+1),_=e.line,(kt===63||kt===58)&&ii(l))kt===63?(Lt&&(Un(e,Y,S,H,Ot,null,y,w,F),H=Ot=Dt=null),Vt=!0,Lt=!0,u=!0):Lt?(Lt=!1,u=!0):wt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,kt=l;else{if(y=e.line,w=e.lineStart,F=e.position,!Wn(e,s,Ic,!1,!0))break;if(e.line===_){for(kt=e.input.charCodeAt(e.position);tr(kt);)kt=e.input.charCodeAt(++e.position);if(kt===58)kt=e.input.charCodeAt(++e.position),ii(kt)||wt(e,"a whitespace character is expected after the key-value separator within a block mapping"),Lt&&(Un(e,Y,S,H,Ot,null,y,w,F),H=Ot=Dt=null),Vt=!0,Lt=!1,u=!1,H=e.tag,Ot=e.result;else if(Vt)wt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=V,e.anchor=Q,!0}else if(Vt)wt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=V,e.anchor=Q,!0}if((e.line===_||e.lineIndent>n)&&(Lt&&(y=e.line,w=e.lineStart,F=e.position),Wn(e,n,Cs,!0,u)&&(Lt?Ot=e.result:Dt=e.result),Lt||(Un(e,Y,S,H,Ot,Dt,y,w,F),H=Ot=Dt=null),fe(e,!0,-1),kt=e.input.charCodeAt(e.position)),(e.line===_||e.lineIndent>n)&&kt!==0)wt(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return Lt&&Un(e,Y,S,H,Ot,null,y,w,F),Vt&&(e.tag=V,e.anchor=Q,e.kind="mapping",e.result=Y),Vt}function Au(e){var n,s=!1,l=!1,u,_,y;if(y=e.input.charCodeAt(e.position),y!==33)return!1;if(e.tag!==null&&wt(e,"duplication of a tag property"),y=e.input.charCodeAt(++e.position),y===60?(s=!0,y=e.input.charCodeAt(++e.position)):y===33?(l=!0,u="!!",y=e.input.charCodeAt(++e.position)):u="!",n=e.position,s){do y=e.input.charCodeAt(++e.position);while(y!==0&&y!==62);e.position<e.length?(_=e.input.slice(n,e.position),y=e.input.charCodeAt(++e.position)):wt(e,"unexpected end of the stream within a verbatim tag")}else{for(;y!==0&&!ii(y);)y===33&&(l?wt(e,"tag suffix cannot contain exclamation marks"):(u=e.input.slice(n-1,e.position+1),xs.test(u)||wt(e,"named tag handle cannot contain such characters"),l=!0,n=e.position+1)),y=e.input.charCodeAt(++e.position);_=e.input.slice(n,e.position),bu.test(_)&&wt(e,"tag suffix cannot contain flow indicator characters")}_&&!Pc.test(_)&&wt(e,"tag name cannot contain such characters: "+_);try{_=decodeURIComponent(_)}catch{wt(e,"tag name is malformed: "+_)}return s?e.tag=_:ae.call(e.tagMap,u)?e.tag=e.tagMap[u]+_:u==="!"?e.tag="!"+_:u==="!!"?e.tag="tag:yaml.org,2002:"+_:wt(e,'undeclared tag handle "'+u+'"'),!0}function ku(e){var n,s;if(s=e.input.charCodeAt(e.position),s!==38)return!1;for(e.anchor!==null&&wt(e,"duplication of an anchor property"),s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!ii(s)&&!Nr(s);)s=e.input.charCodeAt(++e.position);return e.position===n&&wt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function Su(e){var n,s,l;if(l=e.input.
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var s=new Ga(e,n),l=e.indexOf("\0");for(l!==-1&&(s.position=l,wt(s,"null byte is not allowed in input")),s.input+="\0";s.input.charCodeAt(s.position)===32;)s.lineIndent+=1,s.position+=1;for(;s.position<s.length-1;)Bo(s);return s.documents}function Va(e,n,s){n!==null&&typeof n=="object"&&typeof s>"u"&&(s=n,n=null);var l=Hc(e,s);if(typeof n!="function")return l;for(var u=0,_=l.length;u<_;u+=1)n(l[u])}function wu(e,n){var s=Hc(e,n);if(s.length!==0){if(s.length===1)return s[0];throw new di("expected a single document in the stream, but found more")}}var ir=Va,Bu=wu,Ar={loadAll:ir,load:Bu},Eu=Da,Ka=Ar.load;function Lu(e){const n=e.match(Or);if(!n)return{text:e,metadata:{}};let s=Ka(n[1],{schema:Eu})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const l={};return s.displayMode&&(l.displayMode=s.displayMode.toString()),s.title&&(l.title=s.title.toString()),s.config&&(l.config=s.config),{text:e.slice(n[0].length),metadata:l}}const Mu=e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(n,s,l)=>"<"+s+l.replace(/="([^"]*)"/g,"='$1'")+">"),Yc=e=>{const{text:n,metadata:s}=Lu(e),{displayMode:l,title:u,config:_={}}=s;return l&&(_.gantt||(_.gantt={}),_.gantt.displayMode=l),{title:u,config:_,text:n}},qc=e=>{const n=li.detectInit(e)??{},s=li.detectDirective(e,"wrap");return Array.isArray(s)?n.wrap=s.some(({type:l})=>{}):s?.type==="wrap"&&(n.wrap=!0),{text:pt(e),directive:n}};function Eo(e){const n=Mu(e),s=Yc(n),l=qc(s.text),u=hn(s.config,l.directive);return e=xo(l.text),{code:e,title:s.title,config:u}}const ks=5e4,Hn="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Gc="sandbox",Xa="loose",De="http://www.w3.org/2000/svg",Vc="http://www.w3.org/1999/xlink",Kc="http://www.w3.org/1999/xhtml",Xt="100%",Xc="100%",Yn="border:0;margin:0;",qn="margin:0",Zc="allow-top-navigation-by-user-activation allow-popups",Jc='The "iframe" tag is not supported by your browser.',Qc=["foreignobject"],th=["dominant-baseline"];function Za(e){const n=Eo(e);return ji(),Ys(n.config??{}),n}async function Ja(e,n){ba(),e=Za(e).code;try{await Bs(e)}catch(s){if(n?.suppressErrors)return!1;throw s}return!0}const Ss=(e,n,s=[])=>`
.${e} ${n} { ${s.join(" !important; ")} !important; }`,eh=(e,n={})=>{var s;let l="";if(e.themeCSS!==void 0&&(l+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(l+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(l+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),!(0,Qr.A)(n)){const w=e.htmlLabels||((s=e.flowchart)==null?void 0:s.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const F in n){const V=n[F];(0,Qr.A)(V.styles)||w.forEach(Q=>{l+=Ss(V.id,Q,V.styles)}),(0,Qr.A)(V.textStyles)||(l+=Ss(V.id,"tspan",V.textStyles))}}return l},ih=(e,n,s,l)=>{const u=eh(e,s),_=Xl(n,u,e.themeVariables);return Wt(Xn(`${l}{${_}}`),zt)},rh=(e="",n,s)=>{let l=e;return!s&&!n&&(l=l.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),l=Dn(l),l=l.replace(/<br>/g,"<br/>"),l},Qa=(e="",n)=>{var s,l;const u=(l=(s=n?.viewBox)==null?void 0:s.baseVal)!=null&&l.height?n.viewBox.baseVal.height+"px":Xc,_=btoa('<body style="'+qn+'">'+e+"</body>");return`<iframe style="width:${Xt};height:${u};${Yn}" src="data:text/html;base64,${_}" sandbox="${Zc}">
${Jc}
</iframe>`},tl=(e,n,s,l,u)=>{const _=e.append("div");_.attr("id",s),l&&_.attr("style",l);const y=_.append("svg").attr("id",n).attr("width","100%").attr("xmlns",De);return u&&y.attr("xmlns:xlink",u),y.append("g"),e};function ws(e,n){return e.append("iframe").attr("id",n).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const nh=(e,n,s,l)=>{var u,_,y;(u=e.getElementById(n))==null||u.remove(),(_=e.getElementById(s))==null||_.remove(),(y=e.getElementById(l))==null||y.remove()},oh=async function(e,n,s){var l,u,_,y,w,F;ba();const V=Za(n);n=V.code;const Q=Ai();At.debug(Q),n.length>(Q?.maxTextSize??ks)&&(n=Hn);const Y="#"+e,S="i"+e,H="#"+S,Ot="d"+e,Dt="#"+Ot;let Lt=(0,A.Ltv)("body");const Vt=Q.securityLevel===Gc,kt=Q.securityLevel===Xa,mi=Q.fontFamily;if(s!==void 0){if(s&&(s.innerHTML=""),Vt){const rr=ws((0,A.Ltv)(s),S);Lt=(0,A.Ltv)(rr.nodes()[0].contentDocument.body),Lt.node().style.margin=0}else Lt=(0,A.Ltv)(s);tl(Lt,e,Ot,`font-family: ${mi}`,Vc)}else{if(nh(document,e,Ot,S),Vt){const rr=ws((0,A.Ltv)("body"),S);Lt=(0,A.Ltv)(rr.nodes()[0].contentDocument.body),Lt.node().style.margin=0}else Lt=(0,A.Ltv)("body");tl(Lt,e,Ot)}let Ae,gi;try{Ae=await Bs(n,{title:V.title})}catch(rr){Ae=new bo("error"),gi=rr}const pi=Lt.select(Dt).node(),ne=Ae.type,cl=pi.firstChild,dh=cl.firstChild,hl=(u=(l=Ae.renderer).getClasses)==null?void 0:u.call(l,n,Ae),ul=ih(Q,ne,hl,Y),Ls=document.createElement("style");Ls.innerHTML=ul,cl.insertBefore(Ls,dh);try{await Ae.renderer.draw(n,e,Dr,Ae)}catch(rr){throw nu.draw(n,e,Dr),rr}const Cn=Lt.select(`${Dt} svg`),Ms=(y=(_=Ae.db).getAccTitle)==null?void 0:y.call(_),fh=(F=(w=Ae.db).getAccDescription)==null?void 0:F.call(w);ah(ne,Cn,Ms,fh),Lt.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Kc);let Hr=Lt.select(Dt).node().innerHTML;if(At.debug("config.arrowMarkerAbsolute",Q.arrowMarkerAbsolute),Hr=rh(Hr,Vt,cr(Q.arrowMarkerAbsolute)),Vt){const rr=Lt.select(Dt+" svg").node();Hr=Qa(Hr,rr)}else kt||(Hr=M.sanitize(Hr,{ADD_TAGS:Qc,ADD_ATTR:th}));if(xa(),gi)throw gi;const mh=Vt?H:Dt,Fs=(0,A.Ltv)(mh).node();return Fs&&"remove"in Fs&&Fs.remove(),{svg:Hr,bindFunctions:Ae.db.bindFunctions}};function sh(e={}){var n;e?.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),kl(e),e?.theme&&e.theme in si?e.themeVariables=si[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=si.default.getThemeVariables(e.themeVariables));const s=typeof e=="object"?Al(e):zo();ue(s.logLevel),ba()}const Bs=(e,n={})=>{const{code:s}=Eo(e);return Ni(s,n)};function ah(e,n,s,l){fu(n,e),ac(n,s,l,n.attr("id"))}const Wr=Object.freeze({render:oh,parse:Ja,getDiagramFromText:Bs,initialize:sh,getConfig:Ai,setConfig:Uo,getSiteConfig:zo,updateSiteConfig:Sl,reset:()=>{ji()},globalReset:()=>{ji(Pi)},defaultConfig:Pi});ue(Ai().logLevel),ji(Ai());const lh=async()=>{At.debug("Loading registered diagrams");const n=(await Promise.allSettled(Object.entries(Di).map(async([s,{detector:l,loader:u}])=>{if(u)try{Qo(s)}catch{try{const{diagram:y,id:w}=await u();po(w,y,l)}catch(y){throw At.error(`Failed to load external diagram with key ${s}. Removing from detectors.`),delete Di[s],y}}}))).filter(s=>s.status==="rejected");if(n.length>0){At.error(`Failed to load ${n.length} external diagrams`);for(const s of n)At.error(s);throw new Error(`Failed to load ${n.length} external diagrams`)}},el=(e,n,s)=>{At.warn(e),Us(e)?(s&&s(e.str,e.hash),n.push({...e,message:e.str,error:e})):(s&&s(e),e instanceof Error&&n.push({str:e.message,message:e.message,hash:e.name,error:e}))},il=async function(e={querySelector:".mermaid"}){try{await ch(e)}catch(n){if(Us(n)&&At.error(n.str),ki.parseError&&ki.parseError(n),!e.suppressErrors)throw At.error("Use the suppressErrors option to suppress these errors"),n}},ch=async function({postRenderCallback:e,querySelector:n,nodes:s}={querySelector:".mermaid"}){const l=Wr.getConfig();At.debug(`${e?"":"No "}Callback function found`);let u;if(s)u=s;else if(n)u=document.querySelectorAll(n);else throw new Error("Nodes and querySelector are bo