Files
static-php-cli/assets/chunks/mermaid.core.WsuUSYUF.js

310 lines
596 KiB
JavaScript
Raw Normal View History

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-BM42HDAG.B83yA5O9.js","assets/chunks/graph.CPCuV3C_.js","assets/chunks/layout.Dsmt3fdL.js","assets/chunks/framework.C2AwuPrQ.js","assets/chunks/cose-bilkent-S5V4N54A.BqfhbORh.js","assets/chunks/cytoscape.esm.OyMbaexL.js","assets/chunks/c4Diagram-AAUBKEIU.D4AnV20l.js","assets/chunks/chunk-ND2GUHAM.C8Xp7Al5.js","assets/chunks/flowDiagram-I6XJVG4X.DYsBQqpR.js","assets/chunks/chunk-FMBD7UC4.BGC-9qj3.js","assets/chunks/chunk-55IACEB6.DRbZtpoG.js","assets/chunks/chunk-2J33WTMH.hjBnoQT6.js","assets/chunks/channel.RwIL821K.js","assets/chunks/erDiagram-TEJ5UH35.CeXOvPgd.js","assets/chunks/gitGraphDiagram-PVQCEYII.C-2vj4rf.js","assets/chunks/chunk-4BX2VUAB.tbDSeIh4.js","assets/chunks/chunk-QZHKN3VN.BUKTzDbl.js","assets/chunks/wardley-L42UT6IY.C8rjnVeB.js","assets/chunks/ganttDiagram-6RSMTGT7.Bo0KAC8O.js","assets/chunks/linear.qhi8dC5N.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/defaultLocale.DX6XiGOO.js","assets/chunks/infoDiagram-5YYISTIA.De6vsbXe.js","assets/chunks/pieDiagram-4H26LBE5.DJT1HQ59.js","assets/chunks/arc.BWgyNIn7.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-W4KKPZXB.ByObxFZH.js","assets/chunks/xychartDiagram-2RQKCTM6.qSSMnKjY.js","assets/chunks/requirementDiagram-4Y6WPE33.DqwDKbJY.js","assets/chunks/sequenceDiagram-3UESZ5HK.CRuWzKcO.js","assets/chunks/classDiagram-4FO5ZUOK.CAzZX981.js","assets/chunks/chunk-727SXJPM.DDamJJmS.js","assets/chunks/classDiagram-v2-Q7XG4LA2.CAzZX981.js","assets/chunks/stateDiagram-AJRCARHV.D2RszB4y.js","assets/chunks/chunk-AQP2D5EJ.B4iX4Bo1.js","assets/chunks/stateDiagram-v2-BHNVJYJU.B-M6dpDW.js","assets/chunks/journeyDiagram-JHISSGLW.D7j2bnH6.js","assets/chunks/timeline-definition-PNZ67QCA.D4eXOQYD.js","assets/chunks/mindmap-definition-RKZ34NQL.BxUXKt3r.js","assets/chunks/kanban-definition-UN3LZRKU.JCkrRHBG.js","assets/chunks/sankeyDiagram-5OEKKPKP.DFpSRNoF.js","assets/chunks/diagram-LMA3HP47.BLa2PrcE.js","assets/chunks/diagram-2AECGRRQ.CeQ8I16q.js","assets/chunks/blockDiagram-GPEHLZMM.zdLlZkas.js","assets/chunks/diagram-5GNKFQAL.B_3UR2j_.js","assets/chunks/architectureDiagram-3BPJPVTR.DwS7QWfC.js","assets/chunks/diagram-KO2AKTUF.BAGr8S_w.js","assets/chunks/ishikawaDiagram-YF4QCWOH.CMwRBZTQ.js","assets/chunks/vennDiagram-CIIHVFJN.BJSDj79Z.js","assets/chunks/diagram-OG6HWLK6.lW12HWfs.js","assets/chunks/wardleyDiagram-YWT4CUSO.DB-ntAXC.js"])))=>i.map(i=>d[i]);
import{W as pt}from"./framework.C2AwuPrQ.js";function wy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var No={exports:{}},Sy=No.exports,ih;function _y(){return ih||(ih=1,(function(e,t){(function(r,i){e.exports=i()})(Sy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var A=["th","st","nd","rd"],L=D%100;return"["+D+(A[(L-20)%10]||A[L]||A[0])+"]"}},k=function(D,A,L){var O=String(D);return!O||O.length>=A?D:""+Array(A+1-O.length).join(L)+D},w={s:k,z:function(D){var A=-D.utcOffset(),L=Math.abs(A),O=Math.floor(L/60),P=L%60;return(A<=0?"+":"-")+k(O,2,"0")+":"+k(P,2,"0")},m:function D(A,L){if(A.date()<L.date())return-D(L,A);var O=12*(L.year()-A.year())+(L.month()-A.month()),P=A.clone().add(O,d),H=L-P<0,G=A.clone().add(O+(H?-1:1),d);return+(-(O+(L-P)/(H?P-G:G-P))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},S="en",_={};_[S]=b;var E="$isDayjsObject",B=function(D){return D instanceof W||!(!D||!D[E])},q=function D(A,L,O){var P;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(P=H),L&&(_[H]=L,P=H);var G=A.split("-");if(!P&&G.length>1)return D(G[0])}else{var J=A.name;_[J]=A,P=J}return!O&&P&&(S=P),P||!O&&S},I=function(D,A){if(B(D))return D.clone();var L=typeof A=="object"?A:{};return L.date=D,L.args=arguments,new W(L)},R=w;R.l=q,R.i=B,R.w=function(D,A){return I(D,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var W=(function(){function D(L){this.$L=q(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[E]=!0}var A=D.prototype;return A.parse=function(L){this.$d=(function(O){var P=O.date,H=O.utc;if(P===null)return new Date(NaN);if(R.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var G=P.match(y);if(G){var J=G[2]-1||0,gt=(G[7]||"0").substring(0,3);return H?new Date(Date.UTC(G[1],J,G[3]||1,G[4]||0,G[5]||0,G[6]||0,gt)):new Date(G[1],J,G[3]||1,G[4]||0,G[5]||0,G[6]||0,gt)}}return new Date(P)})(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(L,O){var P=I(L);return this.startOf(O)<=P&&P<=this.endOf(O)},A.isAfter=function(L,O){return I(L)<this.startOf(O)},A.isBefore=function(L,O){return this.endOf(O)<I(L)},A.$g=function(L,O,P){return R.u(L)?this[O]:this.set(P,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,O){var P=this,H=!!R.u(O)||O,G=R.p(L),J=function(vt,St){var nt=R.w(P.$u?Date.UTC(P.$y,St,vt):new Date(P.$y,St,vt),P);return H?nt:nt.endOf(c)},gt=function(vt,St){return R.w(P.toDate()[vt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),P)},dt=this.$W,ut=this.$M,bt=this.$D,st="set"+(this.$u?"UTC":"");switch(G){case u:return H?J(1,0):J(31,11);case d:return H?J(1,ut):J(0,ut+1);case h:var ct=this.$locale().weekStart||0,Tt=(dt<ct?dt+7:dt)-ct;return J(H?bt-Tt:bt+(6-Tt),ut);case c:case g:return gt(st+"Hours",0);case l:return gt(st+"Minutes",1);case n:return gt(st+"Seconds",2);case a:return gt(st+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,O){var P,H=R.p(L),G="set"+(this.$u?"UTC":""),J=(P={},P[c]=G+"Date",P[g]=G+"Date",P[d]=G+"Month",P
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ny(e,t){return Dy(e)||Py(e,t)||qy(e,t)||Ry()}function qy(e,t){if(e){if(typeof e=="string")return oh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oh(e,t):void 0}}const Hc=Object.entries,sh=Object.setPrototypeOf,zy=Object.isFrozen,Wy=Object.getPrototypeOf,Hy=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Wr=Object.create,Yc=typeof Reflect<"u"&&Reflect,Ma=Yc.apply,$a=Yc.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});Ma||(Ma=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});$a||($a=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const Bi=Ot(Array.prototype.forEach),Yy=Ot(Array.prototype.lastIndexOf),ah=Ot(Array.prototype.pop),Rr=Ot(Array.prototype.push),Uy=Ot(Array.prototype.splice),er=Array.isArray,Ri=Ot(String.prototype.toLowerCase),ua=Ot(String.prototype.toString),nh=Ot(String.prototype.match),Li=Ot(String.prototype.replace),lh=Ot(String.prototype.indexOf),Gy=Ot(String.prototype.trim),jy=Ot(Number.prototype.toString),Xy=Ot(Boolean.prototype.toString),hh=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),ch=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Nt=Ot(Object.prototype.hasOwnProperty),Fi=Ot(Object.prototype.toString),zt=Ot(RegExp.prototype.test),fr=Vy(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Ma(e,t,i)}}function Vy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return $a(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ri;if(sh&&sh(e,null),!er(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(zy(t)||(t[i]=s),o=s)}e[o]=!0}return e}function Zy(e){for(let t=0;t<e.length;t++)Nt(e,t)||(e[t]=null);return e}function Qt(e){const t=Wr(null);for(const i of Hc(e)){var r=Ny(i,2);const o=r[0],s=r[1];Nt(e,o)&&(er(s)?t[o]=Zy(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Qt(s):t[o]=s)}return t}function Ky(e){switch(typeof e){case"string":return e;case"number":return jy(e);case"boolean":return Xy(e);case"bigint":return hh?hh(e):"0";case"symbol":return ch?ch(e):"Symbol()";case"undefined":return Fi(e);case"function":case"object":{if(e===null)return Fi(e);const t=e,r=ve(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Fi(i)}return Fi(e)}default:return Fi(e)}}function ve(e,t){for(;e!==null;){const i=Hy(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Wy(e)}function r(){return null}return r}function Qy(e){try{return zt(e,""),!0}catch{return!1}}const dh=Yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fa=Yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","ent
`+Mt),Ze&&(Mt=So(Mt)),_&&ko?W(Mt):Mt},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};la(U),Zs=!0,Ks=nt,Qs=wt},t.clearConfig=function(){Dr=null,Zs=!1,Ks=null,Qs=null,_=B,E=""},t.isValidAttribute=function(U,T,F){Dr||la({});const Y=Ft(U),Q=Ft(T);return th(Y,Q,F)},t.addHook=function(U,T){typeof T=="function"&&Nt(J,U)&&Rr(J[U],T)},t.removeHook=function(U,T){if(Nt(J,U)){if(T!==void 0){const F=Yy(J[U],T);return F===-1?void 0:Uy(J[U],F,1)[0]}return ah(J[U])}},t.removeHooks=function(U){Nt(J,U)&&(J[U]=[])},t.removeAllHooks=function(){J=yh()},t}var di=Uc(),Gc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ji=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,g0=/\s*%%.*\n/gm,Kr,jc=(Kr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Kr,"UnknownDiagramError"),Kr),Sr={},On=p(function(e,t){e=e.replace(Gc,"").replace(ji,"").replace(g0,`
`);for(const[r,{detector:i}]of Object.entries(Sr))if(i(e,t))return r;throw new jc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Oa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xc(t,r,i)},"registerLazyLoadedDiagrams"),Xc=p((e,t,r)=>{Sr[e]&&N.warn(`Detector with key ${e} already exists. Overwriting.`),Sr[e]={detector:t,loader:r},N.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),m0=p(e=>Sr[e].loader,"getDiagramLoader"),Ia=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ia(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ia(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=Ia,$e="#ffffff",Oe="#f2f2f2",ot=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Qr,y0=(Qr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?$(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.s
`)}p(Ra,"cssStyleSheetToString");var aC=p((e,t,r,i)=>{let o="";return e in zo&&zo[e]?o=zo[e]({...r,svgId:i}):N.warn(`No theme found for ${e}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
@keyframes edge-animation-frame {
from {
stroke-dashoffset: 0;
}
}
@keyframes dash {
to {
stroke-dashoffset: 0;
}
}
& .edge-animation-slow {
stroke-dasharray: 9,5 !important;
stroke-dashoffset: 900;
animation: dash 50s linear infinite;
stroke-linecap: round;
}
& .edge-animation-fast {
stroke-dasharray: 9,5 !important;
stroke-dashoffset: 900;
animation: dash 20s linear infinite;
stroke-linecap: round;
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: ${r.strokeWidth??1}px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-thickness-invisible {
stroke-width: 0;
fill: none;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
& p {
margin: 0
}
${o}
.node .neo-node {
stroke: ${r.nodeBorder};
}
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node path {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
stroke-width: ${r.strokeWidth??1}px;
}
[data-look="neo"].node .outer-path {
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node .neo-line path {
stroke: ${r.nodeBorder};
filter: none;
}
[data-look="neo"].node circle{
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].node circle .state-start{
fill: #000000;
}
[data-look="neo"].icon-shape .icon {
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
[data-look="neo"].icon-shape .icon-neo path {
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
}
${t}
`},"getStyles"),nC=p((e,t)=>{t!==void 0&&(zo[e]=t)},"addStylesForDiagram"),lC=aC,hd={};Ly(hd,{clear:()=>hC,getAccDescription:()=>fC,getAccTitle:()=>dC,getDiagramTitle:()=>gC,setAccDescription:()=>uC,setAccTitle:()=>cC,setDiagramTitle:()=>pC});var In="",Dn="",Pn="",Rn=p(e=>be(e,Bt()),"sanitizeText"),hC=p(()=>{In="",Pn="",Dn=""},"clear"),cC=p(e=>{In=Rn(e).replace(/^\s+/g,"")},"setAccTitle"),dC=p(()=>In,"getAccTitle"),uC=p(e=>{Pn=Rn(e).replace(/\n\s+/g,`
`)},"setAccDescription"),fC=p(()=>Pn,"getAccDescription"),pC=p(e=>{Dn=Rn(e)},"setDiagramTitle"),gC=p(()=>Dn,"getDiagramTitle"),Th=N,mC=$n,Ct=Bt,nL=td,lL=ui,Nn=p(e=>be(e,Ct()),"sanitizeText"),yC=sC,CC=p(()=>hd,"getCommonDb"),rs={},is=p((e,t,r)=>{rs[e]&&Th.warn(`Diagram with id ${e} already registered. Overwriting.`),rs[e]=t,r&&Xc(e,r),nC(e,t.styles),t.injectUtils?.(Th,mC,Ct,Nn,yC,CC(),()=>{})},"registerDiagram"),Na=p(e=>{if(e in rs)return rs[e];throw new xC(e)},"getDiagram"),hi,xC=(hi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(hi,"DiagramNotFoundError"),hi),bC={value:()=>{}};function cd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Wo(r)}function Wo(e){this._=e}function kC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Wo.prototype=cd.prototype={constructor:Wo,on:function(e,t){var r=this._,i=kC(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=TC(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(o=(e=i[s]).type)r[o]=wh(r[o],e.name,t);else if(t==null)for(o in r)r[o]=wh(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Wo(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,r)}};function TC(e,t){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===t)return o.value}function wh(e,t,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=bC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var qa="http://www.w3.org/1999/xhtml";const Sh={svg:"http://www.w3.org/2000/svg",xhtml:qa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ms(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Sh.hasOwnProperty(t)?{space:Sh[t],local:e}:e}function wC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qa&&t.documentElement.namespaceURI===qa?t.createElement(e):t.createElementNS(r,e)}}function SC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function dd(e){var t=Ms(e);return(t.local?SC:wC)(t)}function _C(){}function qn(e){return e==null?_C:function(){return this.querySelector(e)}}function vC(e){typeof e!="function"&&(e=qn(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new ne(i,this._parents)}function BC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function LC(){return[]}function ud(e){return e==null?LC:function(){return this.querySelectorAll(e)}}function FC(e){return function(){return BC(e.apply(this,arguments))}}function AC(e){typeof e=="function"?e=FC(e):e=ud(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),o.push(l));return new ne(i,o)}function fd(e){return function(){return this.matches(e)}}function pd(e){return function(t){return t.matches(e)}}var EC=Array.prototype.find;function MC(e){return function(){return EC.call(this.children,e)}}function $C(){return this.firstElementChild}function OC(e){return this.select(e==null?$C:MC(typeof e=="function"?e:pd(e)))}var IC=Array.prototype.filter;function DC(){return Array.from(this.children)}function PC(e){return function(){return IC.call(this
`+e.mark.snippet),i+" "+r):i}p(Jn,"formatError");function gi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Jn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(gi,"YAMLException$1");gi.prototype=Object.create(Error.prototype);gi.prototype.constructor=gi;gi.prototype.toString=p(function(t){return this.name+": "+Jn(this,t)},"toString");var oe=gi;function Uo(e,t,r,i,o){var s="",a="",n=Math.floor(o/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}p(Uo,"getLine");function Go(e,t){return Pt.repeat(" ",t-e.length)+e}p(Go,"padStart");function cu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Uo(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),d),n=Pt.repeat(" ",t.indent)+Go((e.line-l+1).toString(),h)+" | "+c.str+`
`+n;for(c=Uo(e.buffer,i[a],o[a],e.position,d),n+=Pt.repeat(" ",t.indent)+Go((e.line+1).toString(),h)+" | "+c.str+`
`,n+=Pt.repeat("-",t.indent+h+3+c.pos)+`^
`,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)c=Uo(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),d),n+=Pt.repeat(" ",t.indent)+Go((e.line+l+1).toString(),h)+" | "+c.str+`
`;return n.replace(/\n$/,"")}p(cu,"makeSnippet");var i1=cu,o1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],s1=["scalar","sequence","mapping"];function du(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(du,"compileStyleAliases");function uu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(o1.indexOf(r)===-1)throw new oe('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=du(t.styleAliases||null),s1.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(uu,"Type$1");var Xt=uu;function Za(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}p(Za,"compileList");function fu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(fu,"compileMap");function fs(e){return this.extend(e)}p(fs,"Schema$1");fs.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new oe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Xt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new oe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Xt))throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(fs.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=Za(o,"implicit"),o.compiledExplicit=Za(o,"explicit"),o.compiledTypeMap=fu(o.compiledImplicit,o.compiledExplicit),o},"extend");var a1=fs,n1=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),l1=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),h1=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),c1=new a1({explicit:[n1,l1,h1]});function pu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(pu,"resolveYamlNull");function gu(){return null}p(gu,"constructYamlNull");function mu(e){return e===null}p(mu,"isNull");var d1=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:pu,construct:gu,predicate:mu,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function yu(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(yu,"resolveYamlBoolean");function Cu(e){return e==="true"||e==="True"||e==="TRU
\r`;function Pu(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=tl;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Pu,"resolveYamlBinary");function Ru(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=tl,a=0,n=[];for(t=0;t<o;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}p(Ru,"constructYamlBinary");function Nu(e){var t="",r=0,i,o,s=e.length,a=tl;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}p(Nu,"representYamlBinary");function qu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(qu,"isBinary");var b1=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pu,construct:Ru,predicate:qu,represent:Nu}),k1=Object.prototype.hasOwnProperty,T1=Object.prototype.toString;function zu(e){if(e===null)return!0;var t=[],r,i,o,s,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(o=n[r],a=!1,T1.call(o)!=="[object Object]")return!1;for(s in o)if(k1.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(zu,"resolveYamlOmap");function Wu(e){return e!==null?e:[]}p(Wu,"constructYamlOmap");var w1=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:zu,construct:Wu}),S1=Object.prototype.toString;function Hu(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],S1.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}p(Hu,"resolveYamlPairs");function Yu(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}p(Yu,"constructYamlPairs");var _1=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hu,construct:Yu}),v1=Object.prototype.hasOwnProperty;function Uu(e){if(e===null)return!0;var t,r=e;for(t in r)if(v1.call(r,t)&&r[t]!==null)return!1;return!0}p(Uu,"resolveYamlSet");function Gu(e){return e!==null?e:{}}p(Gu,"constructYamlSet");var B1=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Uu,construct:Gu}),ju=y1.extend({implicit:[C1,x1],explicit:[b1,w1,_1,B1]}),nr=Object.prototype.hasOwnProperty,ps=1,Xu=2,Vu=3,gs=4,ba=1,L1=2,Uh=3,F1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,A1=/[\x85\u2028\u2029]/,E1=/[,\[\]\{\}]/,Zu=/^(?:!|!!|![a-z\-]+!)$/i,Ku=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ka(e){return Object.prototype.toString.call(e)}p(Ka,"_class");function Ce(e){return e===10||e===13}p(Ce,"is_EOL");function sr(e){return e===9||e===32}p(sr,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}p(Jt,"is_WS_OR_EOL");function br(e){return e===44||e===91||e===93||e===123||e===125}p(br,"is_FLOW_INDICATOR");function Qu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Qu,"fromHexCode");function Ju(e){return e===120?2:e===117?4:e===85?8:0}p(Ju,"escapedHexLen");function tf(e){return 48<=e&&e<=57?e-48:-1}p(tf,"fromDecimalCode");function Qa(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?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Qa,"simpleEscapeSequence");function ef(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ef,"charFromCodepoint");function el(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(el,"setProperty");var rf=new Array(256),of=new Array(256);for(pr=0;pr<256;pr++)rf[pr]=Qa(pr)?1:0,of[pr]=Qa(pr);var pr;function sf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ju,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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=[]}p(sf,"State$1");function rl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=i1(r),new oe(t,r)}p(rl,"generateError");function tt(e,t){throw rl(e,t)}p(tt,"throwError");function io(e,t){e.onWarning&&e.onWarning.call(null,rl(e,t))}p(io,"throwWarning");var Gh={YAML:p(function(t,r,i){var o,s,a;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&tt(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&io(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var o,s;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),o=i[0],s=i[1],Zu.test(o)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(t.tagMap,o)&&tt(t,'there is a previously declared suffix for "'+o+'" tag handle'),Ku.test(s)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{tt(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s},"handleTagDirective")};function We(e,t,r,i){var o,s,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(o=0,s=n.length;o<s;o+=1)a=n.charCodeAt(o),a===9||32<=a&&a<=1114111||tt(e,"expected valid JSON character");else F1.test(n)&&tt(e,"the stream contains non-printable characters");e.result+=n}}p(We,"captureSegment");function Ja(e,t,r,i){var o,s,a,n;for(Pt.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,n=o.length;a<n;a+=1)s=o[a],nr.call(t,s)||(el(t,s,r[s]),i[s]=!0)}p(Ja,"mergeMappings");function kr(e,t,r,i,o,s,a,n,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])&&tt(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Ka(o[c])==="[object Object]"&&(o[c]="[object Object]");if(typeof o=="object"&&Ka(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Ja(e,t,s[c],r);else Ja(e,t,s,r);else!e.json&&!nr.call(r,o)&&nr.call(t,o)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),el(t,o,s),delete r[o];return t}p(kr,"storeMappingPair");function Ps(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ps,"readLineBreak");function Et(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;sr(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Ce(o))for(Ps(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.p
`,t-1))}p(Rs,"writeFoldedLines");function af(e,t,r){var i,o,s,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||br(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&br(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,n=!1;u!==0;){if(u===58){if(o=e.input.charCodeAt(e.position+1),Jt(o)||r&&br(o))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&go(e)||r&&br(u))break;if(Ce(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,Et(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(We(e,s,a,!1),Rs(e,e.line-l),s=a=e.position,n=!1),sr(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return We(e,s,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}p(af,"readPlainScalar");function nf(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(We(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else Ce(r)?(We(e,i,o,!0),Rs(e,Et(e,!1,t)),i=o=e.position):e.position===e.lineStart&&go(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(nf,"readSingleQuotedScalar");function lf(e,t){var r,i,o,s,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return We(e,r,e.position,!0),e.position++,!0;if(n===92){if(We(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))Et(e,!1,t);else if(n<256&&rf[n])e.result+=of[n],e.position++;else if((a=Ju(n))>0){for(o=a,s=0;o>0;o--)n=e.input.charCodeAt(++e.position),(a=Qu(n))>=0?s=(s<<4)+a:tt(e,"expected hexadecimal character");e.result+=ef(s),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(We(e,r,i,!0),Rs(e,Et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&go(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(lf,"readDoubleQuotedScalar");function hf(e,t){var r=!0,i,o,s,a=e.tag,n,l=e.anchor,c,h,d,f,u,g=Object.create(null),m,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Et(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=C=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Jt(c)&&(d=f=!0,e.position++,Et(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,Br(e,t,ps,!1,!0),y=e.tag,m=e.result,Et(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Et(e,!0,t),Br(e,t,ps,!1,!0),C=e.result),u?kr(e,n,g,y,m,C,i,o,s):d?n.push(kr(e,null,g,y,m,C,i,o,s)):n.push(m),Et(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(hf,"readFlowCollection");function cf(e,t){var r,i,o=ba,s=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)ba===o?o=d===43?Uh:L1:tt(e,"repeat of a chomping mode identifier");else if((h=tf(d))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?tt(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(sr(d)){do d=e.input.charCodeAt(++e.position);while(sr(d));if(
`,s?1+l:l):o===ba&&s&&(e.result+=`
`);break}for(i?sr(d)?(c=!0,e.result+=Pt.repeat(`
`,s?1+l:l)):c?(c=!1,e.result+=Pt.repeat(`
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Pt.repeat(`
`,l):e.result+=Pt.repeat(`
`,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);We(e,r,e.position,!1)}return!0}p(cf,"readBlockScalar");function tn(e,t){var r,i=e.tag,o=e.anchor,s=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Jt(a))));){if(n=!0,e.position++,Et(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Br(e,t,Vu,!1,!0),s.push(e.result),Et(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}p(tn,"readBlockSequence");function df(e,t,r){var i,o,s,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,g=null,m=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Jt(i))b===63?(y&&(kr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!0,o=!0):y?(y=!1,o=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!Br(e,r,Xu,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);sr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(kr(e,d,f,u,g,null,a,n,l),u=g=m=null),C=!0,y=!1,o=!1,u=e.tag,g=e.result;else if(C)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(C)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),Br(e,t,gs,!0,o)&&(y?g=e.result:m=e.result),y||(kr(e,d,f,u,g,m,a,n,l),u=g=m=null),Et(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&kr(e,d,f,u,g,null,a,n,l),C&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),C}p(df,"readBlockMapping");function uf(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Jt(a);)a===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Zu.test(o)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),E1.test(s)&&tt(e,"tag suffix cannot contain flow indicator characters")}s&&!Ku.test(s)&&tt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{tt(e,"tag name is malformed: "+s)}return r?e.tag=s:nr.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:tt(e,'undeclared tag handle "'+o+'"'),!0}p(uf,"readTagProperty");function ff(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!br(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.po
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new sf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(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;)gf(r);return r.documents}p(il,"loadDocuments");function M1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=il(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}p(M1,"loadAll$1");function mf(e,t){var r=il(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new oe("expected a single document in the stream, but found more")}}p(mf,"load$1");var $1=mf,O1={load:$1},yf=Object.prototype.toString,Cf=Object.prototype.hasOwnProperty,ol=65279,I1=9,oo=10,D1=13,P1=32,R1=33,N1=34,en=35,q1=37,z1=38,W1=39,H1=42,xf=44,Y1=45,ms=58,U1=61,G1=62,j1=63,X1=64,bf=91,kf=93,V1=96,Tf=123,Z1=124,wf=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var K1=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Q1=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Sf(e,t){var r,i,o,s,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Cf.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}p(Sf,"compileStyleMap");function _f(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new oe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pt.repeat("0",i-t.length)+t}p(_f,"encodeHex");var J1=1,so=2;function vf(e){this.schema=e.schema||ju,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Sf(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?so:J1,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(vf,"State");function rn(e,t){for(var r=Pt.repeat(" ",t),i=0,o=-1,s="",a,n=e.length;i<n;)o=e.indexOf(`
`,i),o===-1?(a=e.slice(i),i=n):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
`&&(s+=r),s+=a;return s}p(rn,"indentString");function ys(e,t){return`
`+Pt.repeat(" ",e.indent*t)}p(ys,"generateNextLine");function Bf(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}p(Bf,"testImplicitResolving");function ao(e){return e===P1||e===I1}p(ao,"isWhitespace");function mi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ol||65536<=e&&e<=1114111}p(mi,"isPrintable");function on(e){return mi(e)&&e!==ol&&e!==D1&&e!==oo}p(on,"isNsCharOrWhitespace");function sn(e,t,r){var i=on(e),o=i&&!ao(e);return(r?i:i&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf)&&e!==en&&!(t===ms&&!o)||on(t)&&!ao(t)&&e===en||t===ms&&o}p(sn,"isPlainSafe");function Lf(e){return mi(e)&&e!==ol&&!ao(e)&&e!==Y1&&e!==j1&&e!==ms&&e!==xf&&e!==bf&&e!==kf&&e!==Tf&&e!==wf&&e!==en&&e!==z1&&e!==H1&&e!==R1&&e!==Z1&&e!==U1&&e!==G1&&e!==W1&&e!==N1&&e!==q1&&e!==X1&&e!==V1}p(Lf,"isPlainSafeFirst");function Ff(e){return!ao(e)&&e!==ms}p(Ff,"isPlainSafeLast");function Gr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Gr,"codePointAt");function sl(e){var t=/^\n* /;return t.test(e)}p(sl,"needIndentIndicator");var Af=1,an=2,Ef=3,Mf=4,Hr=5;function $f(e,t,r,i,o,s,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,g=-1,m=Lf(Gr(e,0))&&Ff(Gr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),!mi(c))return Hr;m=m&&sn(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Gr(e,l),c===oo)d=!0,u&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!mi(c))return Hr;m=m&&sn(c,h,n),h=c}f=f||u&&l-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!o(e)?Af:s===so?Hr:an:r>9&&sl(e)?Hr:a?s===so?Hr:an:f?Mf:Ef}p($f,"chooseScalarStyle");function Of(e,t,r,i,o){e.dump=(function(){if(t.length===0)return e.quotingType===so?'""':"''";if(!e.noCompatMode&&(K1.indexOf(t)!==-1||Q1.test(t)))return e.quotingType===so?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Bf(e,c)}switch(p(l,"testAmbiguity"),$f(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case Af:return t;case an:return"'"+t.replace(/'/g,"''")+"'";case Ef:return"|"+nn(t,e.indent)+ln(rn(t,s));case Mf:return">"+nn(t,e.indent)+ln(rn(If(t,a),s));case Hr:return'"'+Df(t)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}p(Of,"writeScalar");function nn(e,t){var r=sl(e)?String(t):"",i=e[e.length-1]===`
`,o=i&&(e[e.length-2]===`
`||e===`
`),s=o?"+":i?"":"-";return r+s+`
`}p(nn,"blockHeader");function ln(e){return e[e.length-1]===`
`?e.slice(0,-1):e}p(ln,"dropEndingNewline");function If(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
`);return c=c!==-1?c:e.length,r.lastIndex=c,hn(e.slice(0,c),t)})(),o=e[0]===`
`||e[0]===" ",s,a;a=r.exec(e);){var n=a[1],l=a[2];s=l[0]===" ",i+=n+(!o&&!s&&l!==""?`
`:"")+hn(l,t),o=s}return i}p(If,"foldString");function hn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-o>t&&(s=a>o?a:n,l+=`
`+e.slice(o,s),o=s+1),a=n;return l+=`
`,e.length-o>t&&a>o?l+=e.slice(o,a)+`
`+e.slice(a+1):l+=e.slice(o),l.slice(1)}p(hn,"foldLine");function Df(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Gr(e,o),i=Vt[r],!i&&mi(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||_f(r);return t}p(Df,"escapeString");function Pf(e,t,r){var i="",o=e.tag,s,a,n;for(s=0,a=r.length;s<a;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Me(e,t,n,!1,!1)||typeof n>"u"&&Me(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}p(Pf,"writeFlowSequence");function cn(e,t,r,i){var o="",s=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Me(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Me(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=ys(e,t)),e.dump&&oo===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}p(cn,"writeBlockSequence");function Rf(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,n,l,c,h;for(a=0,n=s.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Me(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Me(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=o,e.dump="{"+i+"}"}p(Rf,"writeFlowMapping");function Nf(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||o!=="")&&(f+=ys(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Me(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&oo===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ys(e,t)),Me(e,t+1,h,!0,d)&&(e.dump&&oo===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,o+=f));e.tag=s,e.dump=o||"{}"}p(Nf,"writeBlockMapping");function dn(e,t,r){var i,o,s,a,n,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(n=o[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,yf.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Cf.call(n.represent,l))i=n.represent[l](t,l);else throw new oe("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(dn,"detectType");function Me(e,t,r,i,o,s,a){e.tag=null,e.dump=r,dn(e,r,!1)||dn(e,r,!0);var n=yf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Nf(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Rf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?cn(e,t-1,e.dump,o):cn(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(Pf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Of(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(Me,"writeNode");function qf(e,t){var r=[],i=[],o,s;for(Cs(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}p(qf,"getDuplicateReferences");function Cs(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Cs(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Cs(e[i[o]],t,r)}p(Cs,"inspectNode");function t2(e,t){t=t||{};var r=new vf(
`:""}p(t2,"dump$1");function e2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(e2,"renamed");var r2=Au,i2=O1.load;/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
*/var Ei=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),jt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},jh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Wi,"calculateDeltaAndAngle");var _t=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),o2=p(e=>({x:p(function(t,r,i){let o=0;const s=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:u,deltaX:g}=Wi(i[0],i[1]);o=jt[e.arrowTypeStart]*Math.cos(u)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:u,deltaX:g}=Wi(i[i.length-1],i[i.length-2]);o=jt[e.arrowTypeEnd]*Math.cos(u)*(g>=0?1:-1)}const a=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="right"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="right"?-1:1,o+=u}return _t(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(jt,e.arrowTypeStart)){const{angle:u,deltaY:g}=Wi(i[0],i[1]);o=jt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(jt,e.arrowTypeEnd)){const{angle:u,deltaY:g}=Wi(i[i.length-1],i[i.length-2]);o=jt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(g>=0?1:-1)}const a=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=jt[e.arrowTypeStart],d=jt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=s==="up"?-1:1,o-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=s==="up"?-1:1,o+=u}return _t(t).y+o},"y")}),"getLineFunctionsWithOffset"),Eo={},It={},Xh;function s2(){return Xh||(Xh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.BLANK_URL=It.relativeFirstCharacters=It.whitespaceEscapeCharsRegex=It.urlSchemeRegex=It.ctrlCharactersRegex=It.htmlCtrlEntityRegex=It.htmlEntitiesRegex=It.invalidProtocolRegex=void 0,It.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,It.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,It.htmlCtrlEntityRegex=/&(newline|tab);/gi,It.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,It.urlSchemeRegex=/^.+(:|&colon;)/gim,It.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,It.relativeFirstCharacters=[".","/"],It.BLANK_URL="about:blank"),It}var Vh;function a2(){if(Vh)return Eo;Vh=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.sanitizeUrl=s;var e=s2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var g=new URL(u);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return u}return Eo}var n2=a2();function ka(e){if(typeof e!="object"||e==null)return!1;if(Object.ge
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),N.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=ji.exec(e))!==null;)if(i.index===ji.lastIndex&&ji.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return N.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),z2=p(function(e){return e.replace(ji,"")},"removeDirectives"),W2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function cl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return R2[r]??t}p(cl,"interpolateToCurve");function Xf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?n2.sanitizeUrl(r):r}p(Xf,"formatUrl");var H2=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){N.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function dl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(dl,"distance");function Vf(e){let t,r=0;e.forEach(o=>{r+=dl(o,t),t=o});const i=r/2;return ul(e,i)}p(Vf,"traverseEdge");function Zf(e){return e.length===1?e[0]:Vf(e)}p(Zf,"calcLabelPosition");var Jh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ul=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=dl(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Jh((1-a)*r.x+a*o.x,5),y:Jh((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Y2=p((e,t,r)=>{N.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=ul(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function Kf(e,t,r){const i=structuredClone(r);N.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=ul(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(Kf,"calcTerminalLabelPosition");function Qf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Qf,"getStylesFromArray");var tc=0,U2=p(()=>(tc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tc),"generateId");function Jf(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Jf,"makeRandomHex");var G2=p(e=>Jf(e.length),"random"),j2=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),X2=p(function(e,t){const r=t.text.replace(uo.lineBreakRegex," "),[,i]=Ns(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),V2=mo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),uo.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=Ye(`${a} `,r),c=Ye(s,r);if(l>t){const{hyphenatedStrings:f,remainingW
]`).replace("lheading",np).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},DT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,PT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hp=/^( {2,}|\\)\n(?!\s*$)/,RT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,zs=/[\p{P}\p{S}]/u,wl=/[\s\p{P}\p{S}]/u,cp=/[^\s\p{P}\p{S}]/u,NT=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wl).getRegex(),dp=/(?!~)[\p{P}\p{S}]/u,qT=/(?!~)[\s\p{P}\p{S}]/u,zT=/(?:[^\s\p{P}\p{S}]|~)/u,WT=xt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),up=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,HT=xt(up,"u").replace(/punct/g,zs).getRegex(),YT=xt(up,"u").replace(/punct/g,dp).getRegex(),fp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",UT=xt(fp,"gu").replace(/notPunctSpace/g,cp).replace(/punctSpace/g,wl).replace(/punct/g,zs).getRegex(),GT=xt(fp,"gu").replace(/notPunctSpace/g,zT).replace(/punctSpace/g,qT).replace(/punct/g,dp).getRegex(),jT=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cp).replace(/punctSpace/g,wl).replace(/punct/g,zs).getRegex(),XT=xt(/\\(punct)/,"gu").replace(/punct/g,zs).getRegex(),VT=xt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ZT=xt(kl).replace("(?:-->|$)","-->").getRegex(),KT=xt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ZT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,QT=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pp=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",bs).replace("ref",bl).getRegex(),gp=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",bl).getRegex(),JT=xt("reflink|nolink(?!\\()","g").replace("reflink",pp).replace("nolink",gp).getRegex(),ac=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Sl={_backpedal:Zi,anyPunctuation:XT,autolink:VT,blockSkip:WT,br:hp,code:PT,del:Zi,emStrongLDelim:HT,emStrongRDelimAst:UT,emStrongRDelimUnd:jT,escape:DT,link:QT,nolink:gp,punctuation:NT,reflink:pp,reflinkSearch:JT,tag:KT,text:RT,url:Zi},tw={...Sl,link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",bs).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bs).getRegex()},pn={...Sl,emStrongRDelimAst:GT,emStrongLDelim:YT,url:xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ac).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:xt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("p
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
`)}var ks=class{options;rules;lexer;constructor(t){this.options=t||Er}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:$i(i,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=ow(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=$i(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:$i(r[0],`
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=$i(r[0],`
`).split(`
`),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
${h}`:h,s=s?`${s}
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let g=u,m=g.raw+`
`+i.join(`
`),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if(u?.type==="list"){let g=u,m=g.raw+`
`+i.join(`
`),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-u.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(u)&&(h+=u+`
`,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(`
`,1)[0],B;if(u=E,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),B=u):B=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||S.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
`+B.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||k.test(f))break;d+=`
`+u}!g&&!u.trim()&&(g=!0),h+=E+`
`,t=t.substring(E.length+1),f=B.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:C,loose:!1,text:d,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=hc(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(hc(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=$i(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=iw(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),cc(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return cc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...o[0]][0].length,f=t.slice(0,s+o.index+d+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},pe=class gn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.toke
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(te.tabCharGlobal," ").replace(te.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+o.raw,a.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Ts=class{options;parser;constructor(t){this.options=t||Er}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(te.notSpaceStart)?.[0],s=t.replace(te.endingNewline,"")+`
`;return o?'<pre><code class="language-'+Be(o)+'">'+(i?s:Be(s,!0))+`</code></pre>
`:"<pre><code>"+(i?s:Be(s,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
`}hr(t){return`<hr>
`}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
`+o+"</"+s+`>
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Be(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
<thead>
`+r+`</thead>
`+o+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Be(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=lc(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Be(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=lc(t);if(s===null)return Be(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Be(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Be(t.text)}},_l=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ge=class mn{options;renderer;textRenderer;constructor(t){this.options=t||Er,this.options.renderer=this.options.renderer||new Ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _l}static parse(t,r){return new mn(r).parse(t)}static parseInline(t,r){return new mn(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Hi=class{options;block;constructor(t){this.options=t||Er}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?pe.lex:pe.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},sw=class{defaults=yl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=Ts;TextRenderer=_l;Lexer=pe;Tokenizer=ks;Hooks=Hi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new Ts(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ks(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let d=l.apply(s,h);return d===!1&&(d=c.apply(s,h)),d}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Hi;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];Hi.passThroughHooks.has(a)?s[n]=h=>{if(this.
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Be(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},Fr=new sw;function kt(e,t){return Fr.parse(e,t)}kt.options=kt.setOptions=function(e){return Fr.setOptions(e),kt.defaults=Fr.defaults,sp(kt.defaults),kt};kt.getDefaults=yl;kt.defaults=Er;kt.use=function(...e){return Fr.use(...e),kt.defaults=Fr.defaults,sp(kt.defaults),kt};kt.walkTokens=function(e,t){return Fr.walkTokens(e,t)};kt.parseInline=Fr.parseInline;kt.Parser=ge;kt.parser=ge.parse;kt.Renderer=Ts;kt.TextRenderer=_l;kt.Lexer=pe;kt.lexer=pe.lex;kt.Tokenizer=ks;kt.Hooks=Hi;kt.parse=kt;kt.options;kt.setOptions;kt.use;kt.walkTokens;kt.parseInline;ge.parse;pe.lex;function mp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(o.length){var s=new RegExp(`
[ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
`)&&(d=String(n).split(`
`).map(function(f,u){return u===0?f:"".concat(h).concat(f)}).join(`
`)),a+=d+i[l+1]}),a}var aw={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},yn=new Map,yp=new Map,nw=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(N.debug("Registering icon pack:",t.name),"loader"in t)yp.set(t.name,t.loader);else if("icons"in t)yn.set(t.name,t.icons);else throw N.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Cp=p(async(e,t)=>{const r=lT(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let o=yn.get(i);if(!o){const a=yp.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},yn.set(i,o)}catch(n){throw N.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=dT(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),lw=p(async e=>{try{return await Cp(e),!0}catch{return!1}},"isIconAvailable"),Co=p(async(e,t,r)=>{let i;try{i=await Cp(e,t?.fallbackPrefix)}catch(a){N.error(a),i=aw}const o=CT(i,t),s=TT(kT(o.body),{...o.attributes,...r});return be(s,Bt())},"getIconSVG");function xp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`);return mp(i)}p(xp,"preprocessMarkdown");function bp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(bp,"nonMarkdownToLines");function kp(e,t={}){const r=xp(e,t),i=kt.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
`).forEach((h,d)=>{d!==0&&(s++,o.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&o[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(kp,"markdownToLines");function Tp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Tp,"nonMarkdownToHTML");function wp(e,{markdownAutoWrap:t}={}){const r=kt.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(N.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(wp,"markdownToHTML");function Sp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Sp,"splitTextToChars");function _p(e,t){const r=Sp(t.content);return vl(e,[],r,t.type)}p(_p,"splitWordToFitWidth");function vl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?vl(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(vl,"splitWordToFitWidthRecursion");function vp(e,t){if(e.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ws(e,t)}p(vp,"splitLineToFitWidth");function ws(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return ws(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=_p(t,s);r.push([n]),l.content&&e.unshift(l)}return ws(e,t,r)}p(ws,"splitLineToFitWidthRecursion");function Cn(e,t){t&&e.attr("style",t)}p(Cn,"applyStyle");var dc=16384;async function Bp(e,t,r,i,o=!1,s=Bt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,dc)}px`),a.attr("height",`${Math.min(10*r,dc)}px`);const n=a.append("xhtml:div"),l=Qi(t.label)?await nd(t.label.replace(uo.lineBreakRegex,`
`),s):be(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Cn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Cn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}p(Bp,"addHtmlSpan");function Ws(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(Ws,"createTspan");function Lp(e,t,r){const i=e.append("text"),o=Ws(i,1,t);Hs(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(Lp,"computeWidthOfText");function hw(e,t,r){const i=e.append("text"),o=Ws(i,1,t);Hs(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(hw,"computeDimensionOfText");function Fp(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=p(u=>Lp(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:vp(h,d);for(const u of f){const g=Ws(l,c,1.1,o);Hs(g,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}p(Fp,"createFormattedText");function xn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(xn,"decodeHTMLEntities");function Hs(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(xn(r.content)):o.text(" "+xn(r.content))})}p(Hs,"updateTextContentAndStyles");async function Ap(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await lw(n)?await Co(n,void 0,{class:"label-icon"}):`<i class='${be(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ap,"replaceIconSubstring");var je=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(N.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const d=a?wp(t,h):Tp(t),f=await Ap(Lr(d),h),u=t.replace(/\\\\/g,"\\"),g={isNode:n,label:Qi(t)?u:f,labelStyle:r.replace("fill:","color:")};return await Bp(e,g,l,o,c,h)}else{const d=Lr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?kp(d.replace("<br>","<br/>"),h):bp(d),u=Fp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(u).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(u).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(u).select("text").attr("style",m)}return i?lt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):lt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function wa(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function cw(e,t){return e[0]===t[0]&&e[1]===t[1]}function dw(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0
M ${o.x},${o.y} L ${a.x},${a.y}`}p(Zp,"createLine");function Kp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",et(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=X.svg(o),l=V(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=Zp(s),d=n.path(h,l),f=o.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),K(t,f),t.intersect=function(u){return N.info("crossedCircle intersect",t,{radius:s,point:u}),j.circle(t,s,u)},o}p(Kp,"crossedCircle");function Ne(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(Ne,"generateCirclePoints");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Ne(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ne(c/2+d*2,-d,d,20,-180,-270),...Ne(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ne(c/2,h/2,d,20,0,90)],g=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ne(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ne(c/2+c*.1,-d,d,20,-180,-270),...Ne(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ne(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),w=ft(g),S=m.path(w,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return j.polygon(t,g,E)},o}p(Qp,"curlyBraceLeft");function qe(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:u,y:g})}return a}p(qe,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await rt(e,t,et(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...qe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...qe(c/2+d*2,-d,d,20,-180,-270),...qe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...qe(c/2,h/2,d,20,0,90)],g=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...qe(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...qe(c/2+d*2,-d,d,20,-180,-270),...qe(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...qe(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=X.svg(o),y=V(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),w=ft(g),S=m.path(w,{...y}),_=o.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,_),t.intersect=function(E){return j.polygon(t,g,E)},o}p(Jp,"curlyBraceRight");function Wt(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),g=t+r*Math.sin(f);a.push({x:-u,y:-g})}return a}p(Wt,"generateCirclePoints");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{s
a${o},${s} 0,0,1 0,${-i}
l${r},0
a${o},${s} 0,0,1 0,${i}
M${r},${-i}
a${o},${s} 0,0,0 0,${i}
l${-r},0`,"createCylinderPathD"),Xw=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Vw=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),vc=5,Bc=10;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-s,t.height<vc&&(t.height=vc);const C=m/2/(2.5+m/50);t.width=(t.width??0)-s-C*3,t.width<Bc&&(t.width=Bc)}const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=(t.height?t.height:n.height)+s,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+s,{cssStyles:u}=t;let g;if(t.look==="handDrawn"){const m=X.svg(a),y=Xw(0,0,f,c,d,h),C=Vw(0,0,f,c,d,h),b=m.path(y,V(t,{})),k=m.path(C,V(t,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),u&&g.attr("style",u)}else{const m=jw(0,0,f,c,d,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qt(u)).attr("style",i),g.attr("class","basic label-container outer-path"),u&&g.selectAll("path").attr("style",u),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(t,g),t.intersect=function(m){const y=j.rect(t,m),C=y.y-(t.y??0);if(h!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Wg,"tiltedCylinder");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await rt(e,t,et(t)),c=(t?.height??l.height)+s,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=V(t,{}),y=ft(d),C=g.path(y,m);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Xe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,K(t,f),t.intersect=function(g){return j.polygon(t,d,g)},n}p(Hg,"trapezoid");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await rt(e,t,et(t)),d=(t?.width?t?.width:h.width)+s*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,g=X.svg(c),m=V(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],C=ft(y),b=g.path(C,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(w){return j.polygon(t,y,w)},c}p(Yg,"trapezoidalPentagon");var Lc=10,Fc=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<Fc&&(t.width=Fc),t.height=t?.height??0,t.height<Lc&&(t.height=Lc));const{shapeSvg:a,bbox:n,label:l}=await rt(e,t,et(t)),c=Ge(Ct().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:g}=t,m=X.svg(a),y=V(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=ft(u),b=m.path(C,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("pa
M${u-At},${g} L${u+d},${g}
M${u},${g-At} L${u},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(k,C),S=a.insert(()=>w,":first-child");return S.attr("transform",`translate(${At/2}, ${At/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+At/2-(n.x-(n.left??0))}, ${-(n.height/2)+At/2-(n.y-(n.top??0))})`),K(t,S),t.intersect=function(_){return j.polygon(t,b,_)},a}p(Xg,"windowPane");var Ac=new Set(["redux-color","redux-dark-color"]),Zw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Al(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=Bt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:st}=Bt(),{background:ct}=st,Tt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Al(e,Tt)}const c=Bt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:g}=Z(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ye(t.label,c)+st.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ct=await ki(e,t,st);if(i!=null&&Ac.has(i)){const Tt=r.colorIndex??0;ct.attr("data-color-id",`color-${Tt%l.length}`)}if(!Ge(c.htmlLabels)){const Tt=ct.select("text"),vt=Tt.node()?.getBBox();Tt.attr("transform",`translate(${-vt.width/2}, 0)`)}return ct}c.htmlLabels||(h*=1.25,d*=1.25);let m=et(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Yr(y,t.label??"",c,0,0,["name"],u);C.height+=d;let b=0;const k=[],w=[];let S=0,_=0,E=0,B=0,q=!0,I=!0;for(const st of r.attributes){const ct=await Yr(y,st.type,c,0,b,["attribute-type"],u);S=Math.max(S,ct.width+h);const Tt=await Yr(y,st.name,c,0,b,["attribute-name"],u);_=Math.max(_,Tt.width+h);const vt=await Yr(y,st.keys.join(),c,0,b,["attribute-keys"],u);E=Math.max(E,vt.width+h);const St=await Yr(y,st.comment,c,0,b,["attribute-comment"],u);B=Math.max(B,St.width+h);const nt=Math.max(ct.height,Tt.height,vt.height,St.height)+d;w.push({yOffset:b,rowHeight:nt}),b+=nt}let R=4;E<=h&&(q=!1,E=0,R--),B<=h&&(I=!1,B=0,R--);const W=y.node().getBBox();if(C.width+h*2-(S+_+E+B)>0){const st=C.width+h*2-(S+_+E+B);S+=st/R,_+=st/R,E>0&&(E+=st/R),B>0&&(B+=st/R)}const z=S+_+E+B,D=X.svg(y),A=V(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((st,ct)=>st+(ct?.rowHeight??0),0));const O=Math.max(W.width+h*2,t?.width||0,z),P=Math.max((L??0)+C.height,t?.height||0),H=-O/2,G=-P/2;if(y.selectAll("g:not(:first-child)").each((st,ct,Tt)=>{const vt=lt(Tt[ct]),St=vt.attr("transform");let nt=0,de=0;if(St){const Mr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(St);Mr&&(nt=parseFloat(Mr[1]),de=parseFloat(Mr[2]),vt.attr("class").includes("attribute-name")?nt+=S:vt.attr("class").includes("attribute-keys")?nt+=S+_:vt.attr("class").includes("attribute-comment")&&(nt+=S+_+E))}vt.attr("transform",`translate(${H+h/2+nt}, ${de+G+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(G+d/2)+")"),i!=null&&Ac.has(i)){const st=r.colorIndex??0;y.attr("data-color-id",`color-${st%l.length}`)}const J=D.rectangle(H,G,O,P,A),gt=y.insert(()=>J,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[st,ct]of w.entries()){const vt=(st+1)%2===0&&ct.yOffset!==0,St=D.rectangle(H,C.height+G+ct?.yOffset,O,ct?.rowHeight,{...A,fill:vt?s:a,stroke:n});y.insert(()=>St,"g.label").attr("style",f.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const dt=1e-4;let ut=Ur(H,C.height+G,O+H,C.height+G,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A);if(y.insert(()=>bt).attr("class","divider"),ut=Ur(S+H,C.height+G,S+H,P+G,dt),bt=D.polygon(ut.map(st=>[st.x,st.y]),A),y.insert(()=>bt).attr("class","divider"),q){const st=S+_+H;ut=Ur(st,C.height+G,st,P
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
a${h},${h} 1 0,0 ${g*.25},0
a${h},${h} 1 0,0 ${g*.25},0
a${h},${h} 1 0,0 ${g*.25},${m*.1}
a${h},${h} 1 0,0 ${g*.15},${m*.33}
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
a${h},${h} 1 0,0 ${-1*g*.25},0
a${h},${h} 1 0,0 ${-1*g*.25},0
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(o),k=V(t,{}),w=b.path(C,k);y=o.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",qt(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),K(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return N.info("Bang intersect",t,b),j.rect(t,b)},o}p(Jg,"bang");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
a${d},${d} 1 0,1 ${l*.35},${l*.2}
a${h},${h} 1 0,1 ${l*.15},${c*.35}
a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
a${f},${f} 1 0,1 ${-1*l*.5},0
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
H0 V0 Z`;if(t.look==="handDrawn"){const C=X.svg(o),b=V(t,{}),k=C.path(y,b);m=o.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",qt(g))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),K(t,m),t.calcIntersect=function(C,b){return j.rect(C,b)},t.intersect=function(C){return N.info("Cloud intersect",t,C),j.rect(t,C)},o}p(tm,"cloud");async function em(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await rt(e,t,et(t)),l=s.width+8*a,c=s.height+2*a,h=5,d=t.look==="neo"?`
M${-l/2} ${c/2-h}
v${-c+2*h}
q0,-${h} ${h},-${h}
h${l-2*h}
q${h},0 ${h},${h}
v${c-h}
H${-l/2}
Z
`:`
M${-l/2} ${c/2-h}
v${-c+2*h}
q0,-${h} ${h},-${h}
h${l-2*h}
q${h},0 ${h},${h}
v${c-2*h}
q0,${h} ${-h},${h}
h${-(l-2*h)}
q${-h},0 ${-h},${-h}
Z
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId was render.ts domId prefixing skipped?`);const f=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),K(t,f),t.calcIntersect=function(u,g){return j.rect(u,g)},t.intersect=function(u){return j.rect(t,u)},o}p(em,"defaultMindmapNode");async function rm(e,t){const r={padding:t.padding??0};return Fl(e,t,r)}p(rm,"mindmapCircle");var Qw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:$g},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ag},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Og},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Rg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ig},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Fl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Jg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:tm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:xg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Hg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:yg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:zg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Xp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Eg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Pg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Dg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lg},
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(r)}
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-o:o-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),N.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return N.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Mc=p((e,t)=>{N.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(N.info("abc88 checking point",s,t),!nS(t,s)&&!o){const a=lS(t,i,s);N.debug("abc88 inside",s,i,a),N.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?N.warn("abc88 no intersect",a,r):r.push(a),o=!0}else N.warn("abc88 outside",s,i),i=s,o||r.push(s)}),N.debug("returning points",r),r},"cutPathAtIntersect");function sm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(sm,"extractCornerPoints");var $c=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),hS=p(function(e){const{cornerPointPositions:t}=sm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=$c(o,a,5),l=$c(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){N.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else N.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),cS=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Array(n).fill(`${o} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),dS=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=Ct();let c=t.points,h=!1;const d=o;var f=s;const u=[];for(const O in t.cssCompiledStyles)ip(O)||u.push(t.cssCompiledStyles[O]);N.debug("UIO intersect check",t.points,f.x,d.x),f.intersect&&d.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(d.intersect(c[0])),N.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(N.info("to cluster abc88",r.get(t.toCluster)),c=Mc(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(N.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Mc(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(O=>!Number.isNaN(O.y));const y=oS(t.curve);y!=="rounded"&&(m=hS(m));let C=Vi;switch(y){case"linear":C=Vi;break;case"basis":C=Va;break;case"cardinal":C=Yd;break;case"bumpX":C=Nd;break;case"bumpY":C=qd;break;case"catmullRom":C=Gd;break;case"monotoneX":C=Qd;break;case"monotoneY":C=Jd;break;case"natural":C=eu;break;case"step":C=ru;break;case"stepAfter":C=ou;break;case"stepBefore":C=iu;break;case"rounded":C=Vi;break;default:C=Va}const{x:b,y:k}=o2(t),w=zk().x(b).y(k).curve(C);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-s
L20,10
M20,10
L0,20`)},"requirement_arrow"),MS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),$S=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),OS=p((e,t,r)=>{const i=Bt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),IS={extension:fS,composition:pS,aggregation:gS,dependency:mS,lollipop:yS,point:CS,circle:xS,cross:bS,barb:kS,barbNeo:TS,only_one:wS,zero_or_one:SS,one_or_more:_S,zero_or_more:vS,only_one_neo:BS,zero_or_one_neo:LS,one_or_more_neo:FS,zero_or_more_neo:AS,requirement_arrow:ES,requirement_contains:$S,requirement_arrow_neo:MS,requirement_contains_neo:OS},DS=uS,PS={common:uo,getConfig:Bt,insertCluster:Ow,insertEdge:dS,insertEdgeLabel:sS,insertMarkers:DS,insertNode:om,interpolateToCurve:cl,labelHelper:rt,log:N,positionEdgeLabel:aS},lo={},lm=p(e=>{for(const t of e)lo[t.name]=t},"registerLayoutLoaders"),RS=p(()=>{lm([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-BM42HDAG.B83yA5O9.js"),__vite__mapDeps([0,1,2,3])),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A.BqfhbORh.js"),__vite__mapDeps([4,5,3])),"loader")}])},"registerDefaultLayoutLoaders");RS();var EL=p(async(e,t)=>{if(!(e.layoutAlgorithm in lo))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=lo[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,PS,{algorithm:r.algorithm})},"render"),ML=p((e="",{fallback:t="dagre"}={})=>{if(e in lo)return e;if(t in lo)return N.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),El="comm",hm="rule",cm="decl",NS="@media",qS="@import",zS="@supports",WS="@namespace",Bn="@keyframes",dm="@layer",HS="@scope",YS=Math.abs,Ki=String.fromCharCode;function um(e){return e.trim()}function Ln(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function yi(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function fm(e){return e.length}function Ro(e,t){return t.push(e),e}var Gs=1,Ci=1,pm=0,ce=0,$t=0,Ti="";funct
`);const i=Zk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),ld(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}`)},"draw"),Mm={draw:gv},mv=Mm,yv={db:{},renderer:Mm,parser:{parse:p(()=>{},"parse")}},Cv=yv,$m="flowchart-elk",xv=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),bv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X.DYsBQqpR.js");return{diagram:t}},__vite__mapDeps([8,9,7,10,11,12,3]));return{id:$m,diagram:e}},"loader"),kv={id:$m,detector:xv,loader:bv},Tv=kv,Om="timeline",wv=p(e=>/^\s*timeline/.test(e),"detector"),Sv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA.D4eXOQYD.js");return{diagram:t}},__vite__mapDeps([37,24,3]));return{id:Om,diagram:e}},"loader"),_v={id:Om,detector:wv,loader:Sv},vv=_v,Im="mindmap",Bv=p(e=>/^\s*mindmap/.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL.BxUXKt3r.js");return{diagram:t}},__vite__mapDeps([38,10,11,3]));return{id:Im,diagram:e}},"loader"),Fv={id:Im,detector:Bv,loader:Lv},Av=Fv,Dm="kanban",Ev=p(e=>/^\s*kanban/.test(e),"detector"),Mv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU.JCkrRHBG.js");return{diagram:t}},__vite__mapDeps([39,9,3]));return{id:Dm,diagram:e}},"loader"),$v={id:Dm,detector:Ev,loader:Mv},Ov=$v,Pm="sankey",Iv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Dv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP.DFpSRNoF.js");return{diagram:t}},__vite__mapDeps([40,25,20,3]));return{id:Pm,diagram:e}},"loader"),Pv={id:Pm,detector:Iv,loader:Dv},Rv=Pv,Rm="packet",Nv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),qv=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47.BLa2PrcE.js");return{diagram:t}},__vite__mapDeps([41,15,17,3]));return{id:Rm,diagram:e}},"loader"),zv
`;try{Na(o)}catch{const c=m0(o);if(!c)throw new jc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();is(h,d)}const{db:s,parser:a,renderer:n,init:l}=Na(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new wr(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(wr,"Diagram"),wr),Pc=[],wB=p(()=>{Pc.forEach(e=>{e()}),Pc=[]},"attachFunctions"),SB=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Zm(e){const t=e.match(Gc);if(!t)return{text:e,metadata:{}};let r=i2(t[1],{schema:r2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Zm,"extractFrontMatter");var _B=p(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),vB=p(e=>{const{text:t,metadata:r}=Zm(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),BB=p(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:z2(e),directive:t}},"processDirectives");function $l(e){const t=_B(e),r=vB(t),i=BB(r.text),o=gl(r.config,i.directive);return e=SB(i.text),{code:e,title:r.title,config:o}}p($l,"preprocessDiagram");function Km(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Km,"toBase64");var LB=5e4,FB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",AB="sandbox",EB="loose",MB="http://www.w3.org/2000/svg",$B="http://www.w3.org/1999/xlink",OB="http://www.w3.org/1999/xhtml",IB="100%",DB="100%",PB="border:0;margin:0;",RB="margin:0",NB="allow-top-navigation-by-user-activation allow-popups",qB='The "iframe" tag is not supported by your browser.',zB=["foreignobject"],WB=["dominant-baseline"];function Ol(e){const t=$l(e);return es(),H0(t.config??{}),t}p(Ol,"processAndSetConfigs");async function Qm(e,t){Xs();try{const{code:r,config:i}=Ol(e);return{diagramType:(await ty(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Qm,"parse");var Rc=p((e,t,r=[])=>{const i=Qc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),HB=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ee(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Qh(l.styles)||n.forEach(c=>{r.insertRule(Rc(l.id,c,l.styles),r.cssRules.length)}),Qh(l.textStyles)||r.insertRule(Rc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=Ra(o)+`
`}else i+=`${e.themeCSS}
`;return i+Ra(r)},"createCssStyles"),YB=p((e,t)=>An(JS(`${e}{${t}}`),r_([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Bn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[NS,zS,dm,HS,"@container","@starting-style"],Bn].includes(i.type)||(N.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=El))},"addNamespace"),e_])),"compileCSS"),UB=p((e,t,r,i)=>{const o=HB(e,r),s=lC(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return YB(i,s)},"createUserStyles"),GB=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Lr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),jB=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":DB,i=Km(`<body style="${RB}">${e}</body>`);return`<iframe style="width:${IB};height:${r};${PB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${NB}">
${qB}
</iframe>`},"putIntoIFrame"),Nc=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",MB);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function Mn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Mn,"sandboxedIframe");var XB=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),VB=p(async function(e,t,r){Xs();const i=Ol(t);t=i.code;const o=Bt();N.debug(o),t.length>(o?.maxTextSize??LB)&&(t=FB);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const z=lt(f?n:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let d=lt(document.body);const f=o.securityLevel===AB,u=o.securityLevel===EB,g=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const W=Mn(lt(r),a);d=lt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=lt(r);Nc(d,e,l,`font-family: ${g}`,$B)}else{if(XB(document,e,l,a),f){const W=Mn(lt(document.body),a);d=lt(W.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=lt("body");Nc(d,e,l)}let m,y;try{m=await En.fromText(t,{title:i.title})}catch(W){if(o.suppressErrorRendering)throw h(),W;m=await En.fromText("error"),y=W}const C=d.select(c).node(),b=m.type,k=C.firstChild,w=k.firstChild,S=m.renderer.getClasses?.(t,m),_=UB(o,b,S,s),E=document.createElement("style");E.innerHTML=_,k.insertBefore(E,w);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(W){throw o.suppressErrorRendering?h():mv.draw(t,e,"11.15.0"),W}const B=d.select(`${c} svg`),q=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();ey(b,B,q,I),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OB);let R=d.select(c).node().innerHTML;if(N.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),R=GB(R,f,Ge(o.arrowMarkerAbsolute)),f){const W=d.select(c+" svg").node();R=jB(R,W)}else u||(R=di.sanitize(R,{ADD_TAGS:zB,ADD_ATTR:WB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(wB(),y)throw y;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function Jm(e={}){const t=Dt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),z0(t),t?.theme&&t.theme in ze?t.themeVariables=ze[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ze.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?q0(t):Jc();$n(r.logLevel),Xs()}p(Jm,"initialize");var ty=p((e,t={})=>{const{code:r}=$l(e);return En.fromText(r,t)},"getDiagramFromText");function ey(e,t,r,i){Xm(t,e),Vm(t,r,i,t.attr("id"))}p(ey,"addA11yInfo");var Ar=Object.freeze({render:VB,parse:Qm,getDiagramFromText:ty,initialize:Jm,getConfig:Bt,setConfig:td,getSiteConfig:Jc,updateSiteConfig:W0,reset:p(()=>{es()},"reset"),globalReset:p(()=>{es(ui)},"globalReset"),defaultConfig:ui});$n(Bt().logLevel);es(Bt());var ZB=p((e,t,r)=>{N.warn(e),pl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ry=p(async function(e={querySelector:".mermaid"}){try{await KB(e)}catch(t){if(pl(t)&&N.error(t.str),Ue.parseError&&Ue.parseError(t),!e.suppressErrors)throw N.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KB=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ar.getConfig();N.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");N.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(N.debug("Start On Load: "+i?.startOnLoad),Ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(N.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","
* Wait for document loaded before starting the execution
*/const $L=Object.freeze(Object.defineProperty({__proto__:null,default:iL},Symbol.toStringTag,{value:"Module"}));export{fL as $,hC as A,lL as B,or as C,Ee as D,Ly as E,Bt as F,yC as G,gl as H,Kc as I,r2 as J,G2 as K,Zk as L,Pk as M,jn as N,uL as O,gL as P,Nr as Q,qh as R,Nh as S,yL as T,at as U,mL as V,pL as W,cL as X,dL as Y,xL as Z,p as _,dC as a,dS as a$,CL as a0,T0 as a1,Qi as a2,aL as a3,Ns as a4,P2 as a5,K0 as a6,nd as a7,bh as a8,zk as a9,u2 as aA,S2 as aB,w2 as aC,T2 as aD,v2 as aE,_2 as aF,d2 as aG,Yf as aH,y2 as aI,g2 as aJ,p2 as aK,Uf as aL,o2 as aM,ee as aN,je as aO,Ei as aP,ml as aQ,Qf as aR,Lr as aS,rp as aT,Wc as aU,DS as aV,LL as aW,AL as aX,vL as aY,K as aZ,BL as a_,Va as aa,U2 as ab,ke as ac,M as ad,$ as ae,sC as af,hd as ag,Ow as ah,om as ai,FL as aj,fl as ak,X as al,hw as am,ll as an,al as ao,jo as ap,k2 as aq,b2 as ar,x2 as as,C2 as at,c2 as au,Wf as av,f2 as aw,h2 as ax,m2 as ay,Hf as az,cC as b,aS as b0,sS as b1,Rk as b2,sL as b3,wy as b4,Co as b5,nw as b6,aw as b7,Hn as b8,tr as b9,$h as ba,yb as bb,eo as bc,Z as bd,ip as be,se as bf,cb as bg,Wn as bh,wd as bi,po as bj,vd as bk,hL as bl,By as bm,$L as bn,Ct as c,lt as d,ld as e,Dt as f,fC as g,Ye as h,be as i,n2 as j,uo as k,N as l,tp as m,co as n,nL as o,ML as p,pC as q,EL as r,uC as s,gC as t,ye as u,i2 as v,V2 as w,tS as x,bL as y,di as z};