package.dist.mermaid.esm.min.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
import{b as pr}from"./chunks/mermaid.esm.min/chunk-PM4C624V.mjs";import{a as ze}from"./chunks/mermaid.esm.min/chunk-GETRTAEQ.mjs";import{a as Or}from"./chunks/mermaid.esm.min/chunk-GSFY7FJO.mjs";import{a as Fr}from"./chunks/mermaid.esm.min/chunk-4H3WO55B.mjs";import"./chunks/mermaid.esm.min/chunk-FY225CTW.mjs";import"./chunks/mermaid.esm.min/chunk-U6LOUQAF.mjs";import{a as mr}from"./chunks/mermaid.esm.min/chunk-FVUI2UHO.mjs";import{b as Sr,j as Ve,l as Lr,m as X,n as _r,o as Tr}from"./chunks/mermaid.esm.min/chunk-INOGIEW4.mjs";import"./chunks/mermaid.esm.min/chunk-TI4EEUUG.mjs";import{$ as W,A as K,B as Er,C as fe,D as at,G as wr,M as br,O as Cr,aa as ue,b as A,c as Be,d as dr,f as gr,fa as H,g as Ue,h as ve,i as Ae,j as hr,k as xr,r as Ee,u as Ge,v as yr,w as Dr,x as vr,y as $e,z as Ar}from"./chunks/mermaid.esm.min/chunk-DMXVZUOD.mjs";import{d as qe}from"./chunks/mermaid.esm.min/chunk-YPUTD6PB.mjs";import"./chunks/mermaid.esm.min/chunk-6BY5RJGC.mjs";import{a as o,e as ot}from"./chunks/mermaid.esm.min/chunk-GTKDMUJJ.mjs";var kr="c4",lt=o(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),ct=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/c4Diagram-PKRGQ4J3.mjs");return{id:kr,diagram:e}},"loader"),st={id:kr,detector:lt,loader:ct},Ir=st;var Mr="flowchart",ft=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-wrapper"||r?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-KV54LQYE.mjs");return{id:Mr,diagram:e}},"loader"),pt={id:Mr,detector:ft,loader:ut},Rr=pt;var Nr="flowchart-v2",mt=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-d3"?!1:(r?.flowchart?.defaultRenderer==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&r?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),dt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-KV54LQYE.mjs");return{id:Nr,diagram:e}},"loader"),gt={id:Nr,detector:mt,loader:dt},Pr=gt;var jr="er",ht=o(e=>/^\s*erDiagram/.test(e),"detector"),xt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/erDiagram-CXR4D6DV.mjs");return{id:jr,diagram:e}},"loader"),yt={id:jr,detector:ht,loader:xt},Hr=yt;var Yr="gitGraph",Dt=o(e=>/^\s*gitGraph/.test(e),"detector"),vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-PQENWCQG.mjs");return{id:Yr,diagram:e}},"loader"),At={id:Yr,detector:Dt,loader:vt},Br=At;var Ur="gantt",Et=o(e=>/^\s*gantt/.test(e),"detector"),wt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/ganttDiagram-ND5H62MH.mjs");return{id:Ur,diagram:e}},"loader"),bt={id:Ur,detector:Et,loader:wt},Gr=bt;var $r="info",Ct=o(e=>/^\s*info/.test(e),"detector"),St=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/infoDiagram-AOHHAZMO.mjs");return{id:$r,diagram:e}},"loader"),Vr={id:$r,detector:Ct,loader:St};var qr="pie",Lt=o(e=>/^\s*pie/.test(e),"detector"),_t=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/pieDiagram-623AM5EG.mjs");return{id:qr,diagram:e}},"loader"),zr={id:qr,detector:Lt,loader:_t};var Kr="quadrantChart",Tt=o(e=>/^\s*quadrantChart/.test(e),"detector"),Ft=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/quadrantDiagram-WGSIUGW7.mjs");return{id:Kr,diagram:e}},"loader"),Ot={id:Kr,detector:Tt,loader:Ft},Wr=Ot;var Xr="xychart",kt=o(e=>/^\s*xychart-beta/.test(e),"detector"),It=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/xychartDiagram-EPIBF42O.mjs");return{id:Xr,diagram:e}},"loader"),Mt={id:Xr,detector:kt,loader:It},Qr=Mt;var Zr="requirement",Rt=o(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Nt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/requirementDiagram-W5N2FZW3.mjs");return{id:Zr,diagram:e}},"loader"),Pt={id:Zr,detector:Rt,loader:Nt},Jr=Pt;var ei="sequence",jt=o(e=>/^\s*sequenceDiagram/.test(e),"detector"),Ht=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sequenceDiagram-5H6XI6YX.mjs");return{id:ei,diagram:e}},"loader"),Yt={id:ei,detector:jt,loader:Ht},ri=Yt;var ii="class",Bt=o((e,r)=>r?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-AMI2HWAO.mjs");return{id:ii,diagram:e}},"loader"),Gt={id:ii,detector:Bt,loader:Ut},ni=Gt;var ti="classDiagram",$t=o((e,r)=>/^\s*classDiagram/.test(e)&&r?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-v2-OI7SMP4C.mjs");return{id:ti,diagram:e}},"loader"),qt={id:ti,detector:$t,loader:Vt},oi=qt;var ai="state",zt=o((e,r)=>r?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Kt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-IT2DVN4T.mjs");return{id:ai,diagram:e}},"loader"),Wt={id:ai,detector:zt,loader:Kt},li=Wt;var ci="stateDiagram",Xt=o((e,r)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&r?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Qt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-UIV5SQJ2.mjs");return{id:ci,diagram:e}},"loader"),Zt={id:ci,detector:Xt,loader:Qt},si=Zt;var fi="journey",Jt=o(e=>/^\s*journey/.test(e),"detector"),eo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/journeyDiagram-U3TH2EJ6.mjs");return{id:fi,diagram:e}},"loader"),ro={id:fi,detector:Jt,loader:eo},ui=ro;var io=o((e,r,i)=>{A.debug(`rendering svg for syntax error
`);let t=Or(r),n=t.append("g");t.attr("viewBox","0 0 2412 512"),br(t,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),Ke={draw:io},pi=Ke;var no={db:{},renderer:Ke,parser:{parse:o(()=>{},"parse")}},mi=no;var di="flowchart-elk",to=o((e,r={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&r?.flowchart?.defaultRenderer==="elk"?(r.layout="elk",!0):!1,"detector"),oo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-KV54LQYE.mjs");return{id:di,diagram:e}},"loader"),ao={id:di,detector:to,loader:oo},gi=ao;var hi="timeline",lo=o(e=>/^\s*timeline/.test(e),"detector"),co=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/timeline-definition-T3RG5MMB.mjs");return{id:hi,diagram:e}},"loader"),so={id:hi,detector:lo,loader:co},xi=so;var yi="mindmap",fo=o(e=>/^\s*mindmap/.test(e),"detector"),uo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/mindmap-definition-TMNZEONX.mjs");return{id:yi,diagram:e}},"loader"),po={id:yi,detector:fo,loader:uo},Di=po;var vi="sankey",mo=o(e=>/^\s*sankey-beta/.test(e),"detector"),go=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sankeyDiagram-4BAG2S2Q.mjs");return{id:vi,diagram:e}},"loader"),ho={id:vi,detector:mo,loader:go},Ai=ho;var Ei="packet",xo=o(e=>/^\s*packet-beta/.test(e),"detector"),yo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/diagram-GRJ7KGWB.mjs");return{id:Ei,diagram:e}},"loader"),wi={id:Ei,detector:xo,loader:yo};var bi="block",Do=o(e=>/^\s*block-beta/.test(e),"detector"),vo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/blockDiagram-OKGRBQJJ.mjs");return{id:bi,diagram:e}},"loader"),Ao={id:bi,detector:Do,loader:vo},Ci=Ao;var Si="architecture",Eo=o(e=>/^\s*architecture/.test(e),"detector"),wo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/architectureDiagram-O7I6HS7E.mjs");return{id:Si,diagram:e}},"loader"),bo={id:Si,detector:Eo,loader:wo},Li=bo;var _i=!1,ee=o(()=>{_i||(_i=!0,W("error",mi,e=>e.toLowerCase().trim()==="error"),W("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:o(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ae(Ir,oi,ni,Hr,Gr,Vr,zr,Jr,ri,gi,Pr,Rr,Di,xi,Br,si,li,ui,Wr,Ai,wi,Qr,Ci,Li))},"addDiagrams");var Ti=o(async()=>{A.debug("Loading registered diagrams");let r=(await Promise.allSettled(Object.entries(Ue).map(async([i,{detector:t,loader:n}])=>{if(n)try{ue(i)}catch{try{let{diagram:l,id:a}=await n();W(a,l,t)}catch(l){throw A.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Ue[i],l}}}))).filter(i=>i.status==="rejected");if(r.length>0){A.error(`Failed to load ${r.length} external diagrams`);for(let i of r)A.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams");var we="comm",be="rule",Ce="decl";var Fi="@import";var Oi="@keyframes";var ki="@layer";var We=Math.abs,pe=String.fromCharCode;function Se(e){return e.trim()}o(Se,"trim");function me(e,r,i){return e.replace(r,i)}o(me,"replace");function Ii(e,r,i){return e.indexOf(r,i)}o(Ii,"indexof");function Q(e,r){return e.charCodeAt(r)|0}o(Q,"charat");function G(e,r,i){return e.slice(r,i)}o(G,"substr");function F(e){return e.length}o(F,"strlen");function Mi(e){return e.length}o(Mi,"sizeof");function re(e,r){return r.push(e),e}o(re,"append");var Le=1,ie=1,Ri=0,k=0,w=0,te="";function _e(e,r,i,t,n,l,a,c){return{value:e,root:r,parent:i,type:t,props:n,children:l,line:Le,column:ie,length:a,return:"",siblings:c}}o(_e,"node");function Ni(){return w}o(Ni,"char");function Pi(){return w=k>0?Q(te,--k):0,ie--,w===10&&(ie=1,Le--),w}o(Pi,"prev");function I(){return w=k2||ne(w)>3?"":" "}o(Yi,"whitespace");function Bi(e,r){for(;--r&&I()&&!(w<48||w>102||w>57&&w<65||w>70&&w<97););return Te(e,de()+(r<6&&Y()==32&&I()==32))}o(Bi,"escaping");function Xe(e){for(;I();)switch(w){case e:return k;case 34:case 39:e!==34&&e!==39&&Xe(w);break;case 40:e===41&&Xe(e);break;case 92:I();break}return k}o(Xe,"delimiter");function Ui(e,r){for(;I()&&e+w!==57;)if(e+w===84&&Y()===47)break;return"/*"+Te(r,k-1)+"*"+pe(e===47?e:I())}o(Ui,"commenter");function Gi(e){for(;!ne(Y());)I();return Te(e,k)}o(Gi,"identifier");function qi(e){return Hi(Oe("",null,null,null,[""],e=ji(e),0,[0],e))}o(qi,"compile");function Oe(e,r,i,t,n,l,a,c,s){for(var u=0,p=0,f=a,m=0,d=0,y=0,h=1,D=1,E=1,x=0,M="",j=n,N=l,O=t,v=M;D;)switch(y=x,x=I()){case 40:if(y!=108&&Q(v,f-1)==58){Ii(v+=me(Fe(x),"&","&\f"),"&\f",We(u?c[u-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:v+=Fe(x);break;case 9:case 10:case 13:case 32:v+=Yi(y);break;case 92:v+=Bi(de()-1,7);continue;case 47:switch(Y()){case 42:case 47:re(Co(Ui(I(),de()),r,i,s),s),(ne(y||1)==5||ne(Y()||1)==5)&&F(v)&&G(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*h:c[u++]=F(v)*E;case 125*h:case 59:case 0:switch(x){case 0:case 125:D=0;case 59+p:E==-1&&(v=me(v,/\f/g,"")),d>0&&(F(v)-f||h===0&&y===47)&&re(d>32?Vi(v+";",t,i,f-1,s):Vi(me(v," ","")+";",t,i,f-2,s),s);break;case 59:v+=";";default:if(re(O=$i(v,r,i,u,p,n,c,M,j=[],N=[],f,l),l),x===123)if(p===0)Oe(v,r,O,O,j,l,f,c,N);else switch(m===99&&Q(v,3)===110?100:m){case 100:case 108:case 109:case 115:Oe(e,O,O,t&&re($i(e,O,O,0,0,n,c,M,n,j=[],f,N),N),n,N,f,c,t?j:N);break;default:Oe(v,O,O,O,[""],N,0,c,N)}}u=p=d=0,h=E=1,M=v="",f=a;break;case 58:f=1+F(v),d=y;default:if(h<1){if(x==123)--h;else if(x==125&&h++==0&&Pi()==125)continue}switch(v+=pe(x),x*h){case 38:E=p>0?1:(v+="\f",-1);break;case 44:c[u++]=(F(v)-1)*E,E=1;break;case 64:Y()===45&&(v+=Fe(I())),m=Y(),p=f=F(M=v+=Gi(de())),x++;break;case 45:y===45&&F(v)==2&&(h=0)}}return l}o(Oe,"parse");function $i(e,r,i,t,n,l,a,c,s,u,p,f){for(var m=n-1,d=n===0?l:[""],y=Mi(d),h=0,D=0,E=0;h0?d[x]+" "+M:me(M,/&\f/g,d[x])))&&(s[E++]=j);return _e(e,r,i,n===0?be:c,s,u,p,f)}o($i,"ruleset");function Co(e,r,i,t){return _e(e,r,i,we,pe(Ni()),G(e,2,-2),0,t)}o(Co,"comment");function Vi(e,r,i,t,n){return _e(e,r,i,Ce,G(e,0,t),G(e,t+1,-1),t,n)}o(Vi,"declaration");function ke(e,r){for(var i="",t=0;t{Xi.forEach(e=>{e()}),Xi=[]},"attachFunctions");var Zi=o(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function gn(e){return typeof e>"u"||e===null}o(gn,"isNothing");function _o(e){return typeof e=="object"&&e!==null}o(_o,"isObject");function To(e){return Array.isArray(e)?e:gn(e)?[]:[e]}o(To,"toArray");function Fo(e,r){var i,t,n,l;if(r)for(l=Object.keys(r),i=0,t=l.length;ic&&(l=" ... ",r=t-c+l.length),i-t>c&&(a=" ...",i=t+c-a.length),{str:l+e.slice(r,i).replace(/\t/g,"\u2192")+a,pos:t-r+l.length}}o(Qe,"getLine");function Ze(e,r){return C.repeat(" ",r-e.length)+e}o(Ze,"padStart");function Ho(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,t=[0],n=[],l,a=-1;l=i.exec(e.buffer);)n.push(l.index),t.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=t.length-2);a<0&&(a=t.length-1);var c="",s,u,p=Math.min(e.line+r.linesAfter,n.length).toString().length,f=r.maxLength-(r.indent+p+3);for(s=1;s<=r.linesBefore&&!(a-s<0);s++)u=Qe(e.buffer,t[a-s],n[a-s],e.position-(t[a]-t[a-s]),f),c=C.repeat(" ",r.indent)+Ze((e.line-s+1).toString(),p)+" | "+u.str+`
`+c;for(u=Qe(e.buffer,t[a],n[a],e.position,f),c+=C.repeat(" ",r.indent)+Ze((e.line+1).toString(),p)+" | "+u.str+`
`,c+=C.repeat("-",r.indent+p+3+u.pos)+`^
`,s=1;s<=r.linesAfter&&!(a+s>=n.length);s++)u=Qe(e.buffer,t[a+s],n[a+s],e.position-(t[a]-t[a+s]),f),c+=C.repeat(" ",r.indent)+Ze((e.line+s+1).toString(),p)+" | "+u.str+`
`;return c.replace(/\n$/,"")}o(Ho,"makeSnippet");var Yo=Ho,Bo=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Uo=["scalar","sequence","mapping"];function Go(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(t){r[String(t)]=i})}),r}o(Go,"compileStyleAliases");function $o(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(Bo.indexOf(i)===-1)throw new _('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Go(r.styleAliases||null),Uo.indexOf(this.kind)===-1)throw new _('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}o($o,"Type$1");var S=$o;function Ji(e,r){var i=[];return e[r].forEach(function(t){var n=i.length;i.forEach(function(l,a){l.tag===t.tag&&l.kind===t.kind&&l.multi===t.multi&&(n=a)}),i[n]=t}),i}o(Ji,"compileList");function Vo(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function t(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(o(t,"collectType"),r=0,i=arguments.length;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:o(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:o(function(e){return e.toString(10)},"decimal"),hexadecimal:o(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pa=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ma(e){return!(e===null||!pa.test(e)||e[e.length-1]==="_")}o(ma,"resolveYamlFloat");function da(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}o(da,"constructYamlFloat");var ga=/^[-+]?[0-9]+e/;function ha(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),ga.test(i)?i.replace("e",".e"):i}o(ha,"representYamlFloat");function xa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}o(xa,"isFloat");var ya=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:ma,construct:da,predicate:xa,represent:ha,defaultStyle:"lowercase"}),xn=Xo.extend({implicit:[ea,ta,ua,ya]}),Da=xn,yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function va(e){return e===null?!1:yn.exec(e)!==null||Dn.exec(e)!==null}o(va,"resolveYamlTimestamp");function Aa(e){var r,i,t,n,l,a,c,s=0,u=null,p,f,m;if(r=yn.exec(e),r===null&&(r=Dn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],t=+r[2]-1,n=+r[3],!r[4])return new Date(Date.UTC(i,t,n));if(l=+r[4],a=+r[5],c=+r[6],r[7]){for(s=r[7].slice(0,3);s.length<3;)s+="0";s=+s}return r[9]&&(p=+r[10],f=+(r[11]||0),u=(p*60+f)*6e4,r[9]==="-"&&(u=-u)),m=new Date(Date.UTC(i,t,n,l,a,c,s)),u&&m.setTime(m.getTime()-u),m}o(Aa,"constructYamlTimestamp");function Ea(e){return e.toISOString()}o(Ea,"representYamlTimestamp");var wa=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:va,construct:Aa,instanceOf:Date,represent:Ea});function ba(e){return e==="<<"||e===null}o(ba,"resolveYamlMerge");var Ca=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ba}),or=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Sa(e){if(e===null)return!1;var r,i,t=0,n=e.length,l=or;for(i=0;i64)){if(r<0)return!1;t+=6}return t%8===0}o(Sa,"resolveYamlBinary");function La(e){var r,i,t=e.replace(/[\r\n=]/g,""),n=t.length,l=or,a=0,c=[];for(r=0;r>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|l.indexOf(t.charAt(r));return i=n%4*6,i===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):i===18?(c.push(a>>10&255),c.push(a>>2&255)):i===12&&c.push(a>>4&255),new Uint8Array(c)}o(La,"constructYamlBinary");function _a(e){var r="",i=0,t,n,l=e.length,a=or;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]),i=(i<<8)+e[t];return n=l%3,n===0?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]):n===2?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):n===1&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}o(_a,"representYamlBinary");function Ta(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}o(Ta,"isBinary");var Fa=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Sa,construct:La,predicate:Ta,represent:_a}),Oa=Object.prototype.hasOwnProperty,ka=Object.prototype.toString;function Ia(e){if(e===null)return!0;var r=[],i,t,n,l,a,c=e;for(i=0,t=c.length;i>10)+55296,(e-65536&1023)+56320)}o(Qa,"charFromCodepoint");var Cn=new Array(256),Sn=new Array(256);for(Z=0;Z<256;Z++)Cn[Z]=nn(Z)?1:0,Sn[Z]=nn(Z);var Z;function Za(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||vn,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.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=[]}o(Za,"State$1");function Ln(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Yo(i),new _(r,i)}o(Ln,"generateError");function g(e,r){throw Ln(e,r)}o(g,"throwError");function Re(e,r){e.onWarning&&e.onWarning.call(null,Ln(e,r))}o(Re,"throwWarning");var tn={YAML:o(function(r,i,t){var n,l,a;r.version!==null&&g(r,"duplication of %YAML directive"),t.length!==1&&g(r,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(t[0]),n===null&&g(r,"ill-formed argument of the YAML directive"),l=parseInt(n[1],10),a=parseInt(n[2],10),l!==1&&g(r,"unacceptable YAML version of the document"),r.version=t[0],r.checkLineBreaks=a<2,a!==1&&a!==2&&Re(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(r,i,t){var n,l;t.length!==2&&g(r,"TAG directive accepts exactly two arguments"),n=t[0],l=t[1],wn.test(n)||g(r,"ill-formed tag handle (first argument) of the TAG directive"),V.call(r.tagMap,n)&&g(r,'there is a previously declared suffix for "'+n+'" tag handle'),bn.test(l)||g(r,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{g(r,"tag prefix is malformed: "+l)}r.tagMap[n]=l},"handleTagDirective")};function $(e,r,i,t){var n,l,a,c;if(r1&&(e.result+=C.repeat(`
`,r-1))}o(lr,"writeFoldedLines");function Ja(e,r,i){var t,n,l,a,c,s,u,p,f=e.kind,m=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||le(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),T(n)||i&&le(n)))return!1;for(e.kind="scalar",e.result="",l=a=e.position,c=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),T(n)||i&&le(n))break}else if(d===35){if(t=e.input.charCodeAt(e.position-1),T(t))break}else{if(e.position===e.lineStart&&je(e)||i&&le(d))break;if(P(d))if(s=e.line,u=e.lineStart,p=e.lineIndent,b(e,!1,-1),e.lineIndent>=r){c=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=s,e.lineStart=u,e.lineIndent=p;break}}c&&($(e,l,a,!1),lr(e,e.line-s),l=a=e.position,c=!1),J(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return $(e,l,a,!1),e.result?!0:(e.kind=f,e.result=m,!1)}o(Ja,"readPlainScalar");function el(e,r){var i,t,n;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=n=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if($(e,t,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)t=e.position,e.position++,n=e.position;else return!0;else P(i)?($(e,t,n,!0),lr(e,b(e,!1,r)),t=n=e.position):e.position===e.lineStart&&je(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}o(el,"readSingleQuotedScalar");function rl(e,r){var i,t,n,l,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=t=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return $(e,i,e.position,!0),e.position++,!0;if(c===92){if($(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),P(c))b(e,!1,r);else if(c<256&&Cn[c])e.result+=Sn[c],e.position++;else if((a=Wa(c))>0){for(n=a,l=0;n>0;n--)c=e.input.charCodeAt(++e.position),(a=Ka(c))>=0?l=(l<<4)+a:g(e,"expected hexadecimal character");e.result+=Qa(l),e.position++}else g(e,"unknown escape sequence");i=t=e.position}else P(c)?($(e,i,t,!0),lr(e,b(e,!1,r)),i=t=e.position):e.position===e.lineStart&&je(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,t=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}o(rl,"readDoubleQuotedScalar");function il(e,r){var i=!0,t,n,l,a=e.tag,c,s=e.anchor,u,p,f,m,d,y=Object.create(null),h,D,E,x;if(x=e.input.charCodeAt(e.position),x===91)p=93,d=!1,c=[];else if(x===123)p=125,d=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),x=e.input.charCodeAt(++e.position);x!==0;){if(b(e,!0,r),x=e.input.charCodeAt(e.position),x===p)return e.position++,e.tag=a,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=c,!0;i?x===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),D=h=E=null,f=m=!1,x===63&&(u=e.input.charCodeAt(e.position+1),T(u)&&(f=m=!0,e.position++,b(e,!0,r))),t=e.line,n=e.lineStart,l=e.position,se(e,r,Ie,!1,!0),D=e.tag,h=e.result,b(e,!0,r),x=e.input.charCodeAt(e.position),(m||e.line===t)&&x===58&&(f=!0,x=e.input.charCodeAt(++e.position),b(e,!0,r),se(e,r,Ie,!1,!0),E=e.result),d?ce(e,c,y,D,h,E,t,n,l):f?c.push(ce(e,null,y,D,h,E,t,n,l)):c.push(h),b(e,!0,r),x=e.input.charCodeAt(e.position),x===44?(i=!0,x=e.input.charCodeAt(++e.position)):i=!1}g(e,"unexpected end of the stream within a flow collection")}o(il,"readFlowCollection");function nl(e,r){var i,t,n=Je,l=!1,a=!1,c=r,s=0,u=!1,p,f;if(f=e.input.charCodeAt(e.position),f===124)t=!1;else if(f===62)t=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Je===n?n=f===43?en:$a:g(e,"repeat of a chomping mode identifier");else if((p=Xa(f))>=0)p===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?g(e,"repeat of an indentation width identifier"):(c=r+p-1,a=!0);else break;if(J(f)){do f=e.input.charCodeAt(++e.position);while(J(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!P(f)&&f!==0)}for(;f!==0;){for(ar(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!a||e.lineIndentc&&(c=e.lineIndent),P(f)){s++;continue}if(e.lineIndentr)&&s!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndentr)&&(D&&(a=e.line,c=e.lineStart,s=e.position),se(e,r,Me,!0,n)&&(D?y=e.result:h=e.result),D||(ce(e,f,m,d,y,h,a,c,s),d=y=h=null),b(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>r)&&x!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndentr?s=1:e.lineIndent===r?s=0:e.lineIndentr?s=1:e.lineIndent===r?s=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,m=e.implicitTypes.length;f"),e.result!==null&&y.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}o(se,"composeNode");function cl(e){var r=e.position,i,t,n,l=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(l=!0,a=e.input.charCodeAt(++e.position),i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);for(t=e.input.slice(i,e.position),n=[],t.length<1&&g(e,"directive name must not be less than one character in length");a!==0;){for(;J(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!P(a));break}if(P(a))break;for(i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(i,e.position))}a!==0&&ar(e),V.call(tn,t)?tn[t](e,t,n):Re(e,'unknown document directive "'+t+'"')}if(b(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,b(e,!0,-1)):l&&g(e,"directives end mark is expected"),se(e,e.lineIndent-1,Me,!1,!0),b(e,!0,-1),e.checkLineBreaks&&qa.test(e.input.slice(r,e.position))&&Re(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&je(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,b(e,!0,-1));return}if(e.position"u"&&(i=r,r=null);var t=_n(e,i);if(typeof r!="function")return t;for(var n=0,l=t.length;n=55296&&i<=56319&&r+1=56320&&t<=57343)?(i-55296)*1024+t-56320+65536:i}o(ge,"codePointAt");function Pn(e){var r=/^\n* /;return r.test(e)}o(Pn,"needIndentIndicator");var jn=1,nr=2,Hn=3,Yn=4,ae=5;function jl(e,r,i,t,n,l,a,c){var s,u=0,p=null,f=!1,m=!1,d=t!==-1,y=-1,h=Nl(ge(e,0))&&Pl(ge(e,e.length-1));if(r||a)for(s=0;s=65536?s+=2:s++){if(u=ge(e,s),!De(u))return ae;h=h&&sn(u,p,c),p=u}else{for(s=0;s=65536?s+=2:s++){if(u=ge(e,s),u===xe)f=!0,d&&(m=m||s-y-1>t&&e[y+1]!==" ",y=s);else if(!De(u))return ae;h=h&&sn(u,p,c),p=u}m=m||d&&s-y-1>t&&e[y+1]!==" "}return!f&&!m?h&&!a&&!n(e)?jn:l===ye?ae:nr:i>9&&Pn(e)?ae:a?l===ye?ae:nr:m?Yn:Hn}o(jl,"chooseScalarStyle");function Hl(e,r,i,t,n){e.dump=function(){if(r.length===0)return e.quotingType===ye?'""':"''";if(!e.noCompatMode&&(Tl.indexOf(r)!==-1||Fl.test(r)))return e.quotingType===ye?'"'+r+'"':"'"+r+"'";var l=e.indent*Math.max(1,i),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),c=t||e.flowLevel>-1&&i>=e.flowLevel;function s(u){return Rl(e,u)}switch(o(s,"testAmbiguity"),jl(r,c,e.indent,a,s,e.quotingType,e.forceQuotes&&!t,n)){case jn:return r;case nr:return"'"+r.replace(/'/g,"''")+"'";case Hn:return"|"+fn(r,e.indent)+un(ln(r,l));case Yn:return">"+fn(r,e.indent)+un(ln(Yl(r,a),l));case ae:return'"'+Bl(r)+'"';default:throw new _("impossible error: invalid scalar style")}}()}o(Hl,"writeScalar");function fn(e,r){var i=Pn(e)?String(r):"",t=e[e.length-1]===`
`,n=t&&(e[e.length-2]===`
`||e===`
`),l=n?"+":t?"":"-";return i+l+`
`}o(fn,"blockHeader");function un(e){return e[e.length-1]===`
`?e.slice(0,-1):e}o(un,"dropEndingNewline");function Yl(e,r){for(var i=/(\n+)([^\n]*)/g,t=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,i.lastIndex=u,pn(e.slice(0,u),r)}(),n=e[0]===`
`||e[0]===" ",l,a;a=i.exec(e);){var c=a[1],s=a[2];l=s[0]===" ",t+=c+(!n&&!l&&s!==""?`
`:"")+pn(s,r),n=l}return t}o(Yl,"foldString");function pn(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,t,n=0,l,a=0,c=0,s="";t=i.exec(e);)c=t.index,c-n>r&&(l=a>n?a:c,s+=`
`+e.slice(n,l),n=l+1),a=c;return s+=`
`,e.length-n>r&&a>n?s+=e.slice(n,a)+`
`+e.slice(a+1):s+=e.slice(n),s.slice(1)}o(pn,"foldLine");function Bl(e){for(var r="",i=0,t,n=0;n=65536?n+=2:n++)i=ge(e,n),t=L[i],!t&&De(i)?(r+=e[n],i>=65536&&(r+=e[n+1])):r+=t||kl(i);return r}o(Bl,"escapeString");function Ul(e,r,i){var t="",n=e.tag,l,a,c;for(l=0,a=i.length;l"u"&&B(e,r,null,!1,!1))&&(t!==""&&(t+=","+(e.condenseFlow?"":" ")),t+=e.dump);e.tag=n,e.dump="["+t+"]"}o(Ul,"writeFlowSequence");function mn(e,r,i,t){var n="",l=e.tag,a,c,s;for(a=0,c=i.length;a"u"&&B(e,r+1,null,!0,!0,!1,!0))&&((!t||n!=="")&&(n+=ir(e,r)),e.dump&&xe===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=l,e.dump=n||"[]"}o(mn,"writeBlockSequence");function Gl(e,r,i){var t="",n=e.tag,l=Object.keys(i),a,c,s,u,p;for(a=0,c=l.length;a1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),B(e,r,u,!1,!1)&&(p+=e.dump,t+=p));e.tag=n,e.dump="{"+t+"}"}o(Gl,"writeFlowMapping");function $l(e,r,i,t){var n="",l=e.tag,a=Object.keys(i),c,s,u,p,f,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new _("sortKeys must be a boolean or a function");for(c=0,s=a.length;c1024,f&&(e.dump&&xe===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,f&&(m+=ir(e,r)),B(e,r+1,p,!0,f)&&(e.dump&&xe===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=l,e.dump=n||"{}"}o($l,"writeBlockMapping");function dn(e,r,i){var t,n,l,a,c,s;for(n=i?e.explicitTypes:e.implicitTypes,l=0,a=n.length;l tag resolver accepts not "'+s+'" style');e.dump=t}return!0}return!1}o(dn,"detectType");function B(e,r,i,t,n,l,a){e.tag=null,e.dump=i,dn(e,i,!1)||dn(e,i,!0);var c=Fn.call(e.dump),s=t,u;t&&(t=e.flowLevel<0||e.flowLevel>r);var p=c==="[object Object]"||c==="[object Array]",f,m;if(p&&(f=e.duplicates.indexOf(i),m=f!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&r>0)&&(n=!1),m&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(p&&m&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),c==="[object Object]")t&&Object.keys(e.dump).length!==0?($l(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Gl(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object Array]")t&&e.dump.length!==0?(e.noArrayIndent&&!a&&r>0?mn(e,r-1,e.dump,n):mn(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Ul(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&Hl(e,e.dump,r,l,s);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new _("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}o(B,"writeNode");function Vl(e,r){var i=[],t=[],n,l;for(tr(e,i,t),n=0,l=t.length;ne.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(r,i,t)=>"<"+i+t.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Ql=o(e=>{let{text:r,metadata:i}=Gn(e),{displayMode:t,title:n,config:l={}}=i;return t&&(l.gantt||(l.gantt={}),l.gantt.displayMode=t),{title:n,config:l,text:r}},"processFrontmatter"),Zl=o(e=>{let r=X.detectInit(e)??{},i=X.detectDirective(e,"wrap");return Array.isArray(i)?r.wrap=i.some(({type:t})=>t==="wrap"):i?.type==="wrap"&&(r.wrap=!0),{text:Sr(e),directive:r}},"processDirectives");function fr(e){let r=Xl(e),i=Ql(r),t=Zl(i.text),n=Lr(i.config,t.directive);return e=Zi(t.text),{code:e,title:i.title,config:n}}o(fr,"preprocessDiagram");function $n(e){let r=new TextEncoder().encode(e),i=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(i)}o($n,"toBase64");var Jl=5e4,ec="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",rc="sandbox",ic="loose",nc="http://www.w3.org/2000/svg",tc="http://www.w3.org/1999/xlink",oc="http://www.w3.org/1999/xhtml",ac="100%",lc="100%",cc="border:0;margin:0;",sc="margin:0",fc="allow-top-navigation-by-user-activation allow-popups",uc='The "iframe" tag is not supported by your browser.',pc=["foreignobject"],mc=["dominant-baseline"];function Wn(e){let r=fr(e);return fe(),Er(r.config??{}),r}o(Wn,"processAndSetConfigs");async function dc(e,r){ee();try{let{code:i}=Wn(e);return{diagramType:(await Xn(i)).type}}catch(i){if(r?.suppressErrors)return!1;throw i}}o(dc,"parse");var Vn=o((e,r,i=[])=>`
.${e} ${r} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),gc=o((e,r=new Map)=>{let i="";if(e.themeCSS!==void 0&&(i+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(i+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(i+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let a=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(c=>{qe(c.styles)||a.forEach(s=>{i+=Vn(c.id,s,c.styles)}),qe(c.textStyles)||(i+=Vn(c.id,"tspan",(c?.textStyles||[]).map(s=>s.replace("color","fill"))))})}return i},"createCssStyles"),hc=o((e,r,i,t)=>{let n=gc(e,i),l=Cr(r,n,e.themeVariables);return ke(qi(`${t}{${l}}`),zi)},"createUserStyles"),xc=o((e="",r,i)=>{let t=e;return!i&&!r&&(t=t.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),t=Tr(t),t=t.replace(/
/g,"
"),t},"cleanUpSvgCode"),yc=o((e="",r)=>{let i=r?.viewBox?.baseVal?.height?r.viewBox.baseVal.height+"px":lc,t=$n(`${e}`);return``},"putIntoIFrame"),qn=o((e,r,i,t,n)=>{let l=e.append("div");l.attr("id",i),t&&l.attr("style",t);let a=l.append("svg").attr("id",r).attr("width","100%").attr("xmlns",nc);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function zn(e,r){return e.append("iframe").attr("id",r).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o(zn,"sandboxedIframe");var Dc=o((e,r,i,t)=>{e.getElementById(r)?.remove(),e.getElementById(i)?.remove(),e.getElementById(t)?.remove()},"removeExistingElements"),vc=o(async function(e,r,i){ee();let t=Wn(r);r=t.code;let n=K();A.debug(n),r.length>(n?.maxTextSize??Jl)&&(r=ec);let l="#"+e,a="i"+e,c="#"+a,s="d"+e,u="#"+s,p=o(()=>{let Ye=H(m?c:u).node();Ye&&"remove"in Ye&&Ye.remove()},"removeTempElements"),f=H("body"),m=n.securityLevel===rc,d=n.securityLevel===ic,y=n.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),m){let R=zn(H(i),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H(i);qn(f,e,s,`font-family: ${y}`,tc)}else{if(Dc(document,e,s,a),m){let R=zn(H("body"),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H("body");qn(f,e,s)}let h,D;try{h=await oe.fromText(r,{title:t.title})}catch(R){if(n.suppressErrorRendering)throw p(),R;h=await oe.fromText("error"),D=R}let E=f.select(u).node(),x=h.type,M=E.firstChild,j=M.firstChild,N=h.renderer.getClasses?.(r,h),O=hc(n,x,N,l),v=document.createElement("style");v.innerHTML=O,M.insertBefore(v,j);try{await h.renderer.draw(r,e,ze,h)}catch(R){throw n.suppressErrorRendering?p():pi.draw(r,e,ze),R}let it=f.select(`${u} svg`),nt=h.db.getAccTitle?.(),tt=h.db.getAccDescription?.();Ec(x,it,nt,tt),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",oc);let z=f.select(u).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),z=xc(z,m,wr(n.arrowMarkerAbsolute)),m){let R=f.select(u+" svg").node();z=yc(z,R)}else d||(z=Kn.default.sanitize(z,{ADD_TAGS:pc,ADD_ATTR:mc}));if(Qi(),D)throw D;return p(),{diagramType:x,svg:z,bindFunctions:h.db.bindFunctions}},"render");function Ac(e={}){let r=xr({},e);r?.fontFamily&&!r.themeVariables?.fontFamily&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Dr(r),r?.theme&&r.theme in Ee?r.themeVariables=Ee[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Ee.default.getThemeVariables(r.themeVariables));let i=typeof r=="object"?yr(r):$e();Be(i.logLevel),ee()}o(Ac,"initialize");var Xn=o((e,r={})=>{let{code:i}=fr(e);return oe.fromText(i,r)},"getDiagramFromText");function Ec(e,r,i,t){Ki(r,e),Wi(r,i,t,r.attr("id"))}o(Ec,"addA11yInfo");var q=Object.freeze({render:vc,parse:dc,getDiagramFromText:Xn,initialize:Ac,getConfig:K,setConfig:Ar,getSiteConfig:$e,updateSiteConfig:vr,reset:o(()=>{fe()},"reset"),globalReset:o(()=>{fe(Ge)},"globalReset"),defaultConfig:Ge});Be(K().logLevel);fe(K());var wc=o((e,r,i)=>{A.warn(e),Ve(e)?(i&&i(e.str,e.hash),r.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&r.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Qn=o(async function(e={querySelector:".mermaid"}){try{await bc(e)}catch(r){if(Ve(r)&&A.error(r.str),U.parseError&&U.parseError(r),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),r}},"run"),bc=o(async function({postRenderCallback:e,querySelector:r,nodes:i}={querySelector:".mermaid"}){let t=q.getConfig();A.debug(`${e?"":"No "}Callback function found`);let n;if(i)n=i;else if(r)n=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),t?.startOnLoad!==void 0&&(A.debug("Start On Load: "+t?.startOnLoad),q.updateSiteConfig({startOnLoad:t?.startOnLoad}));let l=new X.InitIDGenerator(t.deterministicIds,t.deterministicIDSeed),a,c=[];for(let s of Array.from(n)){A.info("Rendering diagram: "+s.id);if(s.getAttribute("data-processed"))continue;s.setAttribute("data-processed","true");let u=`mermaid-${l.next()}`;a=s.innerHTML,a=mr(X.entityDecode(a)).trim().replace(/
/gi,"
");let p=X.detectInit(a);p&&A.debug("Detected early reinit: ",p);try{let{svg:f,bindFunctions:m}=await rt(u,a,s);s.innerHTML=f,e&&await e(u),m&&m(s)}catch(f){wc(f,c,U.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Zn=o(function(e){q.initialize(e)},"initialize"),Cc=o(async function(e,r,i){A.warn("mermaid.init is deprecated. Please use run instead."),e&&Zn(e);let t={postRenderCallback:i,querySelector:".mermaid"};typeof r=="string"?t.querySelector=r:r&&(r instanceof HTMLElement?t.nodes=[r]:t.nodes=r),await Qn(t)},"init"),Sc=o(async(e,{lazyLoad:r=!0}={})=>{ee(),Ae(...e),r===!1&&await Ti()},"registerExternalDiagrams"),Jn=o(function(){if(U.startOnLoad){let{startOnLoad:e}=q.getConfig();e&&U.run().catch(r=>A.error("Mermaid failed to initialize",r))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Jn,!1)}var Lc=o(function(e){U.parseError=e},"setParseErrorHandler"),He=[],ur=!1,et=o(async()=>{if(!ur){for(ur=!0;He.length>0;){let e=He.shift();if(e)try{await e()}catch(r){A.error("Error executing queue",r)}}ur=!1}},"executeQueue"),_c=o(async(e,r)=>new Promise((i,t)=>{let n=o(()=>new Promise((l,a)=>{q.parse(e,r).then(c=>{l(c),i(c)},c=>{A.error("Error parsing",c),U.parseError?.(c),a(c),t(c)})}),"performCall");He.push(n),et().catch(t)}),"parse"),rt=o((e,r,i)=>new Promise((t,n)=>{let l=o(()=>new Promise((a,c)=>{q.render(e,r,i).then(s=>{a(s),t(s)},s=>{A.error("Error parsing",s),U.parseError?.(s),c(s),n(s)})}),"performCall");He.push(l),et().catch(n)}),"render"),U={startOnLoad:!0,mermaidAPI:q,parse:_c,render:rt,init:Cc,run:Qn,registerExternalDiagrams:Sc,registerLayoutLoaders:Fr,initialize:Zn,parseError:void 0,contentLoaded:Jn,setParseErrorHandler:Lc,detectType:ve,registerIconPacks:pr},Fu=U;export{Fu as default};
/*! Check if previously processed */
/*!
* Wait for document loaded before starting the execution
*/
/*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/