const fst="modulepreload",bst=function(t,e){return new URL(t,e).href},VAe={},ye=function(e,n,a){let r=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");r=Promise.allSettled(n.map(u=>{if(u=bst(u,a),u in VAe)return;VAe[u]=!0;const d=u.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!a)for(let g=o.length-1;g>=0;g--){const h=o[g];if(h.href===u&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":fst,d||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((g,h)=>{m.addEventListener("load",g),m.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return r.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})},yst=`
Privacy Notice: Only use the save locally feature on private computers. Your API credentials will be stored in your browser's local storage.
Using SocratiQ AI: You're currently using our default AI providers (GROQ, Gemini, etc.) with automatic fallback and optimization.
For learners who are new to machine learning systems and are building foundational knowledge of concepts, tools, and basic implementations.
For learners who have a working understanding of machine learning principles and are ready to design and optimize systems for real-world applications.
For learners with significant experience in machine learning systems, focused on tackling complex problems, scaling solutions, and innovating in the field.
Bloom's Taxonomy: Bloom's Taxonomy is an educational framework classifying cognitive skills from basic recall to complex evaluation. Read More
Connect with Readers via WebRTC to collaborate, chat, and learn together in real-time.
Clicking the "Collaborate" button toggles the widget's visibility. Inside the widget, you can set your username and join a room to start collaborating with others on the same page.
The widget can be shown or hidden using the "Collaborate" button. Note that hiding the widget temporarily keeps your connection active, while fully disconnecting will end your session.
'+(a?i:Kg(i,!0))+`
`:""+(a?i:Kg(i,!0))+`
`}blockquote({tokens:e}){return`${this.parser.parse(e)}`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:n}){return`
${this.parser.parseInline(e)}
`}table(e){let n="",a="";for(let i=0;i${Kg(e,!0)}`}br(e){return"An error occurred:
"+Kg(a.message+"",!0)+"";return n?Promise.resolve(r):r}if(n)return Promise.reject(a);throw a}}},_1=new nct;function $i(t,e){return _1.parse(t,e)}$i.options=$i.setOptions=function(t){return _1.setOptions(t),$i.defaults=_1.defaults,a$e($i.defaults),$i};$i.getDefaults=Gre;$i.defaults=wx;$i.use=function(...t){return _1.use(...t),$i.defaults=_1.defaults,a$e($i.defaults),$i};$i.walkTokens=function(t,e){return _1.walkTokens(t,e)};$i.parseInline=_1.parseInline;$i.Parser=bb;$i.parser=bb.parse;$i.Renderer=z9;$i.TextRenderer=Jre;$i.Lexer=fb;$i.lexer=fb.lex;$i.Tokenizer=M9;$i.Hooks=G6;$i.parse=$i;$i.options;$i.setOptions;$i.use;$i.walkTokens;$i.parseInline;bb.parse;fb.lex;var eZ={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ky(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function m$e(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}),n}var g$e={exports:{}};(function(t,e){(function(n,a){t.exports=a()})(la,function(){var n=1e3,a=6e4,r=36e5,i="millisecond",o="second",s="minute",l="hour",u="day",d="week",p="month",A="quarter",m="year",g="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(O){var T=["th","st","nd","rd"],D=O%100;return"["+O+(T[(D-20)%10]||T[D]||T[0])+"]"}},w=function(O,T,D){var $=String(O);return!$||$.length>=T?O:""+Array(T+1-$.length).join(D)+O},v={s:w,z:function(O){var T=-O.utcOffset(),D=Math.abs(T),$=Math.floor(D/60),F=D%60;return(T<=0?"+":"-")+w($,2,"0")+":"+w(F,2,"0")},m:function O(T,D){if(T.date()
0&&s
0&&u 0&&s 0&&u ${this.parser.parseInline(t)} An error occurred:
"},n),kn.lineBreakRegex.test(t)))return t;const a=t.split(" ").filter(Boolean),r=[];let i="";return a.forEach((o,s)=>{const l=Ku(`${o} `,n),u=Ku(i,n);if(l>e){const{hyphenatedStrings:A,remainingWord:m}=k0t(o,e,"-",n);r.push(i,...A),i=m}else u+l>=e?(r.push(i),i=o):i=[i,o].filter(Boolean).join(" ");s+1===a.length&&r.push(i)}),r.filter(o=>o!=="").join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),k0t=nE((t,e,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const r=[...t],i=[];let o="";return r.forEach((s,l)=>{const u=`${o}${s}`;if(Ku(u,a)>=e){const p=l+1,A=r.length===p,m=`${u}${n}`;i.push(A?u:m),o=""}else o=u}),{hyphenatedStrings:i,remainingWord:o}},(t,e,n="-",a)=>`${t}${e}${n}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function wR(t,e){return Gie(t,e).height}Q(wR,"calculateTextHeight");function Ku(t,e){return Gie(t,e).width}Q(Ku,"calculateTextWidth");var Gie=nE((t,e)=>{const{fontSize:n=12,fontFamily:a="Arial",fontWeight:r=400}=e;if(!t)return{width:0,height:0};const[,i]=Bx(n),o=["sans-serif",a],s=t.split(kn.lineBreakRegex),l=[],u=en("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const A of o){let m=0;const g={width:0,height:0,lineHeight:0};for(const h of s){const f=w0t();f.text=h||c8e;const b=v0t(d,f).style("font-size",i).style("font-weight",r).style("font-family",A),y=(b._groups||b)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),m=Math.round(y.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}l.push(g)}d.remove();const p=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[p]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),x0t=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{Q(this,"InitIDGenerator")}},aT,O0t=Q(function(t){return aT=aT||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),aT.innerHTML=t,unescape(aT.textContent)},"entityDecode");function Hie(t){return"str"in t}Q(Hie,"isDetailedError");var C0t=Q((t,e,n,a)=>{if(!a)return;const r=t.node()?.getBBox();r&&t.append("text").text(a).attr("text-anchor","middle").attr("x",r.x+r.width/2).attr("y",-n).attr("class",e)},"insertTitle"),Bx=Q(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function id(t,e){return yR({},t,e)}Q(id,"cleanAndMerge");var Wa={assignWithDepth:Os,wrapLabel:f8e,calculateTextHeight:wR,calculateTextWidth:Ku,calculateTextDimensions:Gie,cleanAndMerge:id,detectInit:g0t,detectDirective:l8e,isSubstringInArray:f0t,interpolateToCurve:zie,calcLabelPosition:p8e,calcCardinalityPosition:y0t,calcTerminalLabelPosition:A8e,formatUrl:u8e,getStylesFromArray:Uie,generateId:m8e,random:h8e,runFunc:b0t,entityDecode:O0t,insertTitle:C0t,isLabelCoordinateInPath:b8e,parseFontSize:Bx,InitIDGenerator:x0t},_0t=Q(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/#\w+;/g,function(n){const a=n.substring(1,n.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),e},"encodeEntities"),Lh=Q(function(t){return t.replace(/fl°°/g,"").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),CI=Q((t,e,{counter:n=0,prefix:a,suffix:r},i)=>i||`${a?`${a}_`:""}${t}_${e}_${n}${r?`_${r}`:""}`,"getEdgeId");function hu(t){return t??null}Q(hu,"handleUndefinedAttr");function b8e(t,e){const n=Math.round(t.x),a=Math.round(t.y),r=e.replace(/(\d+\.\d+)/g,i=>Math.round(parseFloat(i)).toString());return r.includes(n.toString())||r.includes(a.toString())}Q(b8e,"isLabelCoordinateInPath");const B0t=Object.freeze({left:0,top:0,width:16,height:16}),vR=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),y8e=Object.freeze({...B0t,...vR}),E0t=Object.freeze({...y8e,body:"",hidden:!1}),Q0t=Object.freeze({width:null,height:null}),S0t=Object.freeze({...Q0t,...vR}),I0t=(t,e,n,a="")=>{const r=t.split(":");if(t.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;a=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const s=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:a,prefix:l,name:s};return hU(u)?u:null}const i=r[0],o=i.split("-");if(o.length>1){const s={provider:a,prefix:o.shift(),name:o.join("-")};return hU(s)?s:null}if(n&&a===""){const s={provider:a,prefix:"",name:i};return hU(s,n)?s:null}return null},hU=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function D0t(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const a=((t.rotate||0)+(e.rotate||0))%4;return a&&(n.rotate=a),n}function Qge(t,e){const n=D0t(t,e);for(const a in E0t)a in vR?a in t&&!(a in n)&&(n[a]=vR[a]):a in e?n[a]=e[a]:a in t&&(n[a]=t[a]);return n}function $0t(t,e){const n=t.icons,a=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const s=a[o]&&a[o].parent,l=s&&i(s);l&&(r[o]=[s].concat(l))}return r[o]}return e.forEach(i),r}function Sge(t,e,n){const a=t.icons,r=t.aliases||Object.create(null);let i={};function o(s){i=Qge(a[s]||r[s],i)}return o(e),n.forEach(o),Qge(t,i)}function T0t(t,e){if(t.icons[e])return Sge(t,e,[]);const n=$0t(t,[e])[e];return n?Sge(t,e,n):null}const P0t=/(-?[0-9.]*[0-9]+[0-9.]*)/g,F0t=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ige(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const a=t.split(P0t);if(a===null||!a.length)return t;const r=[];let i=a.shift(),o=F0t.test(i);for(;;){if(o){const s=parseFloat(i);isNaN(s)?r.push(i):r.push(Math.ceil(s*e*n)/n)}else r.push(i);if(i=a.shift(),i===void 0)return r.join("");o=!o}}function R0t(t,e="defs"){let n="";const a=t.indexOf("<"+e);for(;a>=0;){const r=t.indexOf(">",a),i=t.indexOf(""+e);if(r===-1||i===-1)break;const o=t.indexOf(">",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,a).trim()+t.slice(o+1)}return{defs:n,content:t}}function L0t(t,e){return t?"
`:"'+(n?r:Jg(r,!0))+`
`}blockquote({tokens:t}){return`"+(n?r:Jg(r,!0))+`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`
`}list(t){const e=t.ordered,n=t.start;let a="";for(let o=0;o
`+e+`
`+a+`
`}tablerow({text:t}){return`
${t}
`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`${n}>
`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Jg(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:n}){const a=this.parser.parseInline(n),r=Tge(t);if(r===null)return a;t=r;let i='"+a+"",i}image({href:t,title:e,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));const r=Tge(t);if(r===null)return Jg(n);t=r;let i=`",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Jg(t.text)}},toe=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""}},Ob=class GZ{options;renderer;textRenderer;constructor(e){this.options=e||Ex,this.options.renderer=this.options.renderer||new OR,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new toe}static parse(e,n){return new GZ(n).parse(e)}static parseInline(e,n){return new GZ(n).parseInline(e)}parse(e,n=!0){let a="";for(let r=0;r
"+Jg(n.message+"",!0)+"
";return e?Promise.resolve(a):a}if(e)return Promise.reject(n);throw n}}},F1=new Ewt;function Ai(t,e){return F1.parse(t,e)}Ai.options=Ai.setOptions=function(t){return F1.setOptions(t),Ai.defaults=F1.defaults,w8e(Ai.defaults),Ai};Ai.getDefaults=Wie;Ai.defaults=Ex;Ai.use=function(...t){return F1.use(...t),Ai.defaults=F1.defaults,w8e(Ai.defaults),Ai};Ai.walkTokens=function(t,e){return F1.walkTokens(t,e)};Ai.parseInline=F1.parseInline;Ai.Parser=Ob;Ai.parser=Ob.parse;Ai.Renderer=OR;Ai.TextRenderer=toe;Ai.Lexer=xb;Ai.lexer=xb.lex;Ai.Tokenizer=xR;Ai.Hooks=rF;Ai.parse=Ai;Ai.options;Ai.setOptions;Ai.use;Ai.walkTokens;Ai.parseInline;Ob.parse;xb.lex;function I8e(t){for(var e=[],n=1;n
${r.tokens?.map(a).join("")}
`:r.type==="space"?"":r.type==="html"?`${r.text}`:r.type==="escape"?r.text:(_e.warn(`Unsupported markdown: ${r.type}`),r.raw)}return Q(a,"output"),n.map(a).join("")}Q(L8e,"markdownToHTML");function N8e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}Q(N8e,"splitTextToChars");function M8e(t,e){const n=N8e(e.content);return noe(t,[],n,e.type)}Q(M8e,"splitWordToFitWidth");function noe(t,e,n,a){if(n.length===0)return[{content:e.join(""),type:a},{content:"",type:a}];const[r,...i]=n,o=[...e,r];return t([{content:o.join(""),type:a}])?noe(t,o,i,a):(e.length===0&&r&&(e.push(r),n.shift()),[{content:e.join(""),type:a},{content:n.join(""),type:a}])}Q(noe,"splitWordToFitWidthRecursion");function z8e(t,e){if(t.some(({content:n})=>n.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return CR(t,e)}Q(z8e,"splitLineToFitWidth");function CR(t,e,n=[],a=[]){if(t.length===0)return a.length>0&&n.push(a),n.length>0?n:[];let r="";t[0].content===" "&&(r=" ",t.shift());const i=t.shift()??{content:" ",type:"normal"},o=[...a];if(r!==""&&o.push({content:r,type:"normal"}),o.push(i),e(o))return CR(t,e,n,o);if(a.length>0)n.push(a),t.unshift(i);else if(i.content){const[s,l]=M8e(e,i);n.push([s]),l.content&&t.unshift(l)}return CR(t,e,n)}Q(CR,"splitLineToFitWidthRecursion");function WZ(t,e){e&&t.attr("style",e)}Q(WZ,"applyStyle");async function q8e(t,e,n,a,r=!1,i=Pr()){const o=t.append("foreignObject");o.attr("width",`${10*n}px`),o.attr("height",`${10*n}px`);const s=o.append("xhtml:div"),l=is(e.label)?await k$(e.label.replace(kn.lineBreakRegex,` `),i):Qr(e.label,i),u=e.isNode?"nodeLabel":"edgeLabel",d=s.append("span");d.html(l),WZ(d,e.labelStyle),d.attr("class",`${u} ${a}`),WZ(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",n+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r&&s.attr("class","labelBkg");let p=s.node().getBoundingClientRect();return p.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),p=s.node().getBoundingClientRect()),o.node()}Q(q8e,"addHtmlSpan");function iM(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}Q(iM,"createTspan");function j8e(t,e,n){const a=t.append("text"),r=iM(a,1,e);oM(r,n);const i=r.node().getComputedTextLength();return a.remove(),i}Q(j8e,"computeWidthOfText");function U8e(t,e,n){const a=t.append("text"),r=iM(a,1,e);oM(r,[{content:n,type:"normal"}]);const i=r.node()?.getBoundingClientRect();return i&&a.remove(),i}Q(U8e,"computeDimensionOfText");function G8e(t,e,n,a=!1){const i=e.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const u of n){const d=Q(A=>j8e(i,1.1,A)<=t,"checkWidth"),p=d(u)?[u]:z8e(u,d);for(const A of p){const m=iM(s,l,1.1);oM(m,A),l++}}if(a){const u=s.node().getBBox(),d=2;return o.attr("x",u.x-d).attr("y",u.y-d).attr("width",u.width+2*d).attr("height",u.height+2*d),i.node()}else return s.node()}Q(G8e,"createFormattedText");function oM(t,e){t.text(""),e.forEach((n,a)=>{const r=t.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");a===0?r.text(n.content):r.text(" "+n.content)})}Q(oM,"updateTextContentAndStyles");async function aoe(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(r,i,o)=>(n.push((async()=>{const s=`${i}:${o}`;return await Qwt(s)?await bw(s,void 0,{class:"label-icon"}):``})()),r));const a=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}Q(aoe,"replaceIconSubstring");var Gp=Q(async(t,e="",{style:n="",isTitle:a=!1,classes:r="",useHtmlLabels:i=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},u)=>{if(_e.debug("XYZ createText",e,n,a,r,i,o,"addSvgBackground: ",l),i){const d=L8e(e,u),p=await aoe(Lh(d),u),A=e.replace(/\\\\/g,"\\"),m={isNode:o,label:is(e)?A:p,labelStyle:n.replace("fill:","color:")};return await q8e(t,m,s,r,l,u)}else{const d=e.replace(/"+Ow(t[e].content)+`
`};Jh.fence=function(t,e,n,a,r){const i=t[e],o=i.info?sB(i.info).trim():"";let s="",l="";if(o){const d=o.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,s,l)||Ow(i.content):u=Ow(i.content),u.indexOf("${u}
`}return`${u}
`};Jh.image=function(t,e,n,a,r){const i=t[e];return i.attrs[i.attrIndex("alt")][1]=r.renderInlineAsText(i.children,n,a),r.renderToken(t,e,n)};Jh.hardbreak=function(t,e,n){return n.xhtmlOut?`=4){a++,r=a;continue}break}t.line=r;const i=t.push("code_block","code",0);return i.content=t.getLines(e,r,4+t.blkIndent,!1)+`
`,i.map=[e,t.line],!0}function yQt(t,e,n,a){let r=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||r+3>i)return!1;const o=t.src.charCodeAt(r);if(o!==126&&o!==96)return!1;let s=r;r=t.skipChars(r,o);let l=r-s;if(l<3)return!1;const u=t.src.slice(s,r),d=t.src.slice(r,i);if(o===96&&d.indexOf(String.fromCharCode(o))>=0)return!1;if(a)return!0;let p=e,A=!1;for(;p++,!(p>=n||(r=s=t.bMarks[p]+t.tShift[p],i=t.eMarks[p],r=4)&&(r=t.skipChars(r,o),!(r-s