archy/demo/aiui/assets/mermaid.core-Bp72wBaC.js

250 lines
458 KiB
JavaScript
Raw Normal View History

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-6UL2VRFP-D3-DYqn2.js","assets/graph-BI4iNatD.js","assets/_baseUniq-Blm_akxr.js","assets/layout-Dn20ATE3.js","assets/_basePickBy-BruevaAz.js","assets/clone-BbeogWA3.js","assets/index-BzKy-nNf.js","assets/index-CHQ7uqBj.css","assets/cose-bilkent-S5V4N54A-B3h2gisu.js","assets/cytoscape.esm-5J0xJHOV.js","assets/c4Diagram-YG6GDRKO-xM4z28t2.js","assets/chunk-TZMSLE5B-BzDureVr.js","assets/flowDiagram-NV44I4VS-BZiwTlxg.js","assets/chunk-FMBD7UC4-B-XoLeQw.js","assets/chunk-55IACEB6-dQzh7akv.js","assets/chunk-QN33PNHL-aWjw7low.js","assets/channel-uO_MEpg2.js","assets/erDiagram-Q2GNP2WA-LFDWLdbe.js","assets/gitGraphDiagram-V2S2FVAM-Z60Qif5y.js","assets/chunk-4BX2VUAB-82LsI6ZO.js","assets/chunk-QZHKN3VN-Bi1rVrMI.js","assets/treemap-GDKQZRPO-AdnGbe1r.js","assets/ganttDiagram-JELNMOA3-D9WdDFmh.js","assets/linear-G5w56VQ9.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-HS3SLOUP-BUtAMk68.js","assets/pieDiagram-ADFJNKIX-dv9eWyZx.js","assets/arc-BfzAnNAP.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AYHSOK5B-CYUMAZxF.js","assets/xychartDiagram-PRI3JC2R-DCRwYb86.js","assets/requirementDiagram-UZGBJVZJ-YSWU7wM2.js","assets/sequenceDiagram-WL72ISMW-D6JvJDMe.js","assets/classDiagram-2ON5EDUG-DYkXo-yO.js","assets/chunk-B4BG7PRW-BD6WP8Dt.js","assets/classDiagram-v2-WZHVMYZB-DYkXo-yO.js","assets/stateDiagram-FKZM4ZOC-CsEu5A1-.js","assets/chunk-DI55MBZ5-Dor0sVJI.js","assets/stateDiagram-v2-4FDKWEC3-BBfEPULu.js","assets/journeyDiagram-XKPGCS4Q-DrVt-4mP.js","assets/timeline-definition-IT6M3QCI-DAvrjQlO.js","assets/mindmap-definition-VGOIOE7T-Cv8kGwbk.js","assets/kanban-definition-3W4ZIXB7-C9WSxADn.js","assets/sankeyDiagram-TZEHDZUN-T-T7pPL5.js","assets/diagram-S2PKOQOG-CYt74Kga.js","assets/diagram-QEK2KX5R-DVAGvEAB.js","assets/blockDiagram-VD42YOAC-DFZc3bbp.js","assets/architectureDiagram-VXUJARFQ-D3hZ4FnX.js","assets/diagram-PSM6KHXK-BRTfOYmW.js"])))=>i.map(i=>d[i]);
import{as as dr,_ as lt}from"./index-BzKy-nNf.js";var go={name:"mermaid",version:"11.12.3",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.1.1","@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.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@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.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}};function ng(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function FT(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule")
`);for(const[r,{detector:i}]of Object.entries(Ne))if(i(e,t))return r;throw new Vl(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ma=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ul(t,r,i)},"registerLazyLoadedDiagrams"),Ul=p((e,t,r)=>{Ne[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),Ne[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),xg=p(e=>Ne[e].loader,"getDiagramLoader"),ya=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>ya(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),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(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=ya(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),gt=ya,$n="#ffffff",Mn="#f2f2f2",Lt=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),sr,bg=(sr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||I(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||I(this.tertiaryColor),this.lineColor=this.lineColor||I(this.background),this.arrowheadColor=this.arrowheadColor||I(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?U(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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||I(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.exclu
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: 1px;
}
& .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
}
${i}
${t}
`},"getStyles"),Jg=p((e,t)=>{t!==void 0&&(Ei[e]=t)},"addStylesForDiagram"),t0=Qg,sc={};cg(sc,{clear:()=>e0,getAccDescription:()=>a0,getAccTitle:()=>i0,getDiagramTitle:()=>o0,setAccDescription:()=>n0,setAccTitle:()=>r0,setDiagramTitle:()=>s0});var gs="",ms="",ys="",xs=p(e=>Nt(e,vt()),"sanitizeText"),e0=p(()=>{gs="",ys="",ms=""},"clear"),r0=p(e=>{gs=xs(e).replace(/^\s+/g,"")},"setAccTitle"),i0=p(()=>gs,"getAccTitle"),n0=p(e=>{ys=xs(e).replace(/\n\s+/g,`
`)},"setAccDescription"),a0=p(()=>ys,"getAccDescription"),s0=p(e=>{ms=xs(e)},"setDiagramTitle"),o0=p(()=>ms,"getDiagramTitle"),Co=A,l0=fs,st=vt,OT=Jl,PT=pr,bs=p(e=>Nt(e,st()),"sanitizeText"),c0=Kg,h0=p(()=>sc,"getCommonDb"),Ui={},Xi=p((e,t,r)=>{Ui[e]&&Co.warn(`Diagram with id ${e} already registered. Overwriting.`),Ui[e]=t,r&&Ul(e,r),Jg(e,t.styles),t.injectUtils?.(Co,l0,st,bs,c0,h0(),()=>{})},"registerDiagram"),_a=p(e=>{if(e in Ui)return Ui[e];throw new u0(e)},"getDiagram"),ur,u0=(ur=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(ur,"DiagramNotFoundError"),ur),f0={value:()=>{}};function oc(){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 Di(r)}function Di(e){this._=e}function d0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Di.prototype=oc.prototype={constructor:Di,on:function(e,t){var r=this._,i=d0(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=p0(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=wo(r[n],e.name,t);else if(t==null)for(n in r)r[n]=wo(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Di(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[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],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function p0(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function wo(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=f0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ca="http://www.w3.org/1999/xhtml";const ko={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),ko.hasOwnProperty(t)?{space:ko[t],local:e}:e}function g0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(e):t.createElementNS(r,e)}}function m0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lc(e){var t=Fn(e);return(t.local?m0:g0)(t)}function y0(){}function _s(e){return e==null?y0:function(){return this.querySelector(e)}}function x0(e){typeof e!="function"&&(e=_s(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new Rt(i,this._parents)}function b0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function _0(){return[]}function cc(e){return e==null?_0:function(){return this.querySelectorAll(e)}}function C0(e){return function(){return b0(e.apply(this,arguments))}}function w0(e){typeof e=="function"?e=C0(e):e=cc(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new Rt(i,n)}function hc(e){return function(){return this.matches(e)}}function uc(e){return function(t){return t.matches(e)}}var k0=Array.prototype.find;function v0(e){return function(){return k0.call(this.children,e)}}function S0(){return this.firstElementChild}function T0(e){return this.select(e==null?S0:v0(typeof e=="function"?e:uc(e)))}var B0=Array.prototype.filter;function L0(){return Array.from(this.children)}function $0(e){return function(){return B0.call(this
`+e.mark.snippet),i+" "+r):i}p(Es,"formatError");function xr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Es(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(xr,"YAMLException$1");xr.prototype=Object.create(Error.prototype);xr.prototype.constructor=xr;xr.prototype.toString=p(function(t){return this.name+": "+Es(this,t)},"toString");var Dt=xr;function Ii(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(Ii,"getLine");function Ni(e,t){return mt.repeat(" ",t-e.length)+e}p(Ni,"padStart");function oh(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],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=Ii(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=mt.repeat(" ",t.indent)+Ni((e.line-l+1).toString(),h)+" | "+c.str+`
`+o;for(c=Ii(e.buffer,i[s],n[s],e.position,u),o+=mt.repeat(" ",t.indent)+Ni((e.line+1).toString(),h)+" | "+c.str+`
`,o+=mt.repeat("-",t.indent+h+3+c.pos)+`^
`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=Ii(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=mt.repeat(" ",t.indent)+Ni((e.line+l+1).toString(),h)+" | "+c.str+`
`;return o.replace(/\n$/,"")}p(oh,"makeSnippet");var Xx=oh,Zx=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Kx=["scalar","sequence","mapping"];function lh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(lh,"compileStyleAliases");function ch(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Zx.indexOf(r)===-1)throw new Dt('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=lh(t.styleAliases||null),Kx.indexOf(this.kind)===-1)throw new Dt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(ch,"Type$1");var St=ch;function Ma(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(Ma,"compileList");function hh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(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(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(hh,"compileMap");function on(e){return this.extend(e)}p(on,"Schema$1");on.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof St)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 Dt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof St))throw new Dt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Dt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Dt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof St))throw new Dt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(on.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ma(n,"implicit"),n.compiledExplicit=Ma(n,"explicit"),n.compiledTypeMap=hh(n.compiledImplicit,n.compiledExplicit),n},"extend");var Qx=on,Jx=new St("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),tb=new St("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),eb=new St("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),rb=new Qx({explicit:[Jx,tb,eb]});function uh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(uh,"resolveYamlNull");function fh(){return null}p(fh,"constructYamlNull");function dh(e){return e===null}p(dh,"isNull");var ib=new St("tag:yaml.org,2002:null",{kind:"scalar",resolve:uh,construct:fh,predicate:dh,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 ph(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(ph,"resolveYamlBoolean");function gh(e){return e==="true"||e==="True"||e==="TRU
\r`;function Dh(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Ds;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Dh,"resolveYamlBinary");function Oh(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Ds,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(Oh,"constructYamlBinary");function Ph(e){var t="",r=0,i,n,a=e.length,s=Ds;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(Ph,"representYamlBinary");function Rh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Rh,"isBinary");var fb=new St("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Dh,construct:Oh,predicate:Rh,represent:Ph}),db=Object.prototype.hasOwnProperty,pb=Object.prototype.toString;function Ih(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,pb.call(n)!=="[object Object]")return!1;for(a in n)if(db.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Ih,"resolveYamlOmap");function Nh(e){return e!==null?e:[]}p(Nh,"constructYamlOmap");var gb=new St("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ih,construct:Nh}),mb=Object.prototype.toString;function zh(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],mb.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(zh,"resolveYamlPairs");function qh(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(qh,"constructYamlPairs");var yb=new St("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zh,construct:qh}),xb=Object.prototype.hasOwnProperty;function Wh(e){if(e===null)return!0;var t,r=e;for(t in r)if(xb.call(r,t)&&r[t]!==null)return!1;return!0}p(Wh,"resolveYamlSet");function Hh(e){return e!==null?e:{}}p(Hh,"constructYamlSet");var bb=new St("tag:yaml.org,2002:set",{kind:"mapping",resolve:Wh,construct:Hh}),jh=cb.extend({implicit:[hb,ub],explicit:[fb,gb,yb,bb]}),Ce=Object.prototype.hasOwnProperty,ln=1,Yh=2,Gh=3,cn=4,na=1,_b=2,jo=3,Cb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,wb=/[\x85\u2028\u2029]/,kb=/[,\[\]\{\}]/,Vh=/^(?:!|!!|![a-z\-]+!)$/i,Uh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Aa(e){return Object.prototype.toString.call(e)}p(Aa,"_class");function Yt(e){return e===10||e===13}p(Yt,"is_EOL");function be(e){return e===9||e===32}p(be,"is_WHITE_SPACE");function $t(e){return e===9||e===32||e===10||e===13}p($t,"is_WS_OR_EOL");function De(e){return e===44||e===91||e===93||e===123||e===125}p(De,"is_FLOW_INDICATOR");function Xh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Xh,"fromHexCode");function Zh(e){return e===120?2:e===117?4:e===85?8:0}p(Zh,"escapedHexLen");function Kh(e){return 48<=e&&e<=57?e-48:-1}p(Kh,"fromDecimalCode");function Fa(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(Fa,"simpleEscapeSequence");function Qh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Qh,"charFromCodepoint");var Jh=new Array(256),tu=new Array(256);for(Le=0;Le<256;Le++)Jh[Le]=Fa(Le)?1:0,tu[Le]=Fa(Le);var Le;function eu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jh,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(eu,"State$1");function Os(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=Xx(r),new Dt(t,r)}p(Os,"generateError");function V(e,t){throw Os(e,t)}p(V,"throwError");function ti(e,t){e.onWarning&&e.onWarning.call(null,Os(e,t))}p(ti,"throwWarning");var Yo={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&V(t,"duplication of %YAML directive"),i.length!==1&&V(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&V(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&V(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&ti(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&V(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Vh.test(n)||V(t,"ill-formed tag handle (first argument) of the TAG directive"),Ce.call(t.tagMap,n)&&V(t,'there is a previously declared suffix for "'+n+'" tag handle'),Uh.test(a)||V(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{V(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function le(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||V(e,"expected valid JSON character");else Cb.test(o)&&V(e,"the stream contains non-printable characters");e.result+=o}}p(le,"captureSegment");function Ea(e,t,r,i){var n,a,s,o;for(mt.isObject(r)||V(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],Ce.call(t,a)||(t[a]=r[a],i[a]=!0)}p(Ea,"mergeMappings");function Oe(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&V(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Aa(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Aa(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Ea(e,t,a[c],r);else Ea(e,t,a,r);else!e.json&&!Ce.call(r,n)&&Ce.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,V(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(Oe,"storeMappingPair");function Rn(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++):V(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Rn,"readLineBreak");function ft(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;be(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Yt(n))for(Rn(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ti(e,"defic
`,t-1))}p(In,"writeFoldedLines");function ru(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),$t(d)||De(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)||r&&De(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),$t(n)||r&&De(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),$t(i))break}else{if(e.position===e.lineStart&&di(e)||r&&De(d))break;if(Yt(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,ft(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(le(e,a,s,!1),In(e,e.line-l),a=s=e.position,o=!1),be(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return le(e,a,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(ru,"readPlainScalar");function iu(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(le(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Yt(r)?(le(e,i,n,!0),In(e,ft(e,!1,t)),i=n=e.position):e.position===e.lineStart&&di(e)?V(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);V(e,"unexpected end of the stream within a single quoted scalar")}p(iu,"readSingleQuotedScalar");function nu(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return le(e,r,e.position,!0),e.position++,!0;if(o===92){if(le(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Yt(o))ft(e,!1,t);else if(o<256&&Jh[o])e.result+=tu[o],e.position++;else if((s=Zh(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=Xh(o))>=0?a=(a<<4)+s:V(e,"expected hexadecimal character");e.result+=Qh(a),e.position++}else V(e,"unknown escape sequence");r=i=e.position}else Yt(o)?(le(e,r,i,!0),In(e,ft(e,!1,t)),r=i=e.position):e.position===e.lineStart&&di(e)?V(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}V(e,"unexpected end of the stream within a double quoted scalar")}p(nu,"readDoubleQuotedScalar");function au(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,o=[];else if(b===123)h=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(ft(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&V(e,"expected the node content, but found ','"):V(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),$t(c)&&(u=f=!0,e.position++,ft(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,We(e,t,ln,!1,!0),y=e.tag,m=e.result,ft(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),ft(e,!0,t),We(e,t,ln,!1,!0),x=e.result),d?Oe(e,o,g,y,m,x,i,n,a):u?o.push(Oe(e,null,g,y,m,x,i,n,a)):o.push(m),ft(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}V(e,"unexpected end of the stream within a flow collection")}p(au,"readFlowCollection");function su(e,t){var r,i,n=na,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)na===n?n=u===43?jo:_b:V(e,"repeat of a chomping mode identifier");else if((h=Kh(u))>=0)h===0?V(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?V(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(be(u)){do u=e.input.charCodeAt(++e.position);while(be(u));if(u===35)do u=
`,a?1+l:l):n===na&&a&&(e.result+=`
`);break}for(i?be(u)?(c=!0,e.result+=mt.repeat(`
`,a?1+l:l)):c?(c=!1,e.result+=mt.repeat(`
`,l+1)):l===0?a&&(e.result+=" "):e.result+=mt.repeat(`
`,l):e.result+=mt.repeat(`
`,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!Yt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);le(e,r,e.position,!1)}return!0}p(su,"readBlockScalar");function Da(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!$t(s))));){if(o=!0,e.position++,ft(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,We(e,t,Gh,!1,!0),a.push(e.result),ft(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)V(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(Da,"readBlockSequence");function ou(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,V(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&$t(i))b===63?(y&&(Oe(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):V(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(s=e.line,o=e.lineStart,l=e.position,!We(e,r,Yh,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);be(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),$t(b)||V(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Oe(e,u,f,d,g,null,s,o,l),d=g=m=null),x=!0,y=!1,n=!1,d=e.tag,g=e.result;else if(x)V(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)V(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===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),We(e,t,cn,!0,n)&&(y?g=e.result:m=e.result),y||(Oe(e,u,f,d,g,m,s,o,l),d=g=m=null),ft(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)V(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Oe(e,u,f,d,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(ou,"readBlockMapping");function lu(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&V(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):V(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!$t(s);)s===33&&(i?V(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Vh.test(n)||V(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),kb.test(a)&&V(e,"tag suffix cannot contain flow indicator characters")}a&&!Uh.test(a)&&V(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{V(e,"tag name is malformed: "+a)}return r?e.tag=a:Ce.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:V(e,'undeclared tag handle "'+n+'"'),!0}p(lu,"readTagProperty");function cu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&V(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!$t(r)&&!De(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&V(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(cu,"r
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new eu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,V(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;)uu(r);return r.documents}p(Ps,"loadDocuments");function vb(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Ps(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(vb,"loadAll$1");function fu(e,t){var r=Ps(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Dt("expected a single document in the stream, but found more")}}p(fu,"load$1");var Sb=fu,Tb={load:Sb},du=Object.prototype.toString,pu=Object.prototype.hasOwnProperty,Rs=65279,Bb=9,ei=10,Lb=13,$b=32,Mb=33,Ab=34,Oa=35,Fb=37,Eb=38,Db=39,Ob=42,gu=44,Pb=45,hn=58,Rb=61,Ib=62,Nb=63,zb=64,mu=91,yu=93,qb=96,xu=123,Wb=124,bu=125,Bt={};Bt[0]="\\0";Bt[7]="\\a";Bt[8]="\\b";Bt[9]="\\t";Bt[10]="\\n";Bt[11]="\\v";Bt[12]="\\f";Bt[13]="\\r";Bt[27]="\\e";Bt[34]='\\"';Bt[92]="\\\\";Bt[133]="\\N";Bt[160]="\\_";Bt[8232]="\\L";Bt[8233]="\\P";var Hb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],jb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _u(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&pu.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(_u,"compileStyleMap");function Cu(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 Dt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+mt.repeat("0",i-t.length)+t}p(Cu,"encodeHex");var Yb=1,ri=2;function wu(e){this.schema=e.schema||jh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=mt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=_u(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==='"'?ri:Yb,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(wu,"State");function Pa(e,t){for(var r=mt.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
`,i),n===-1?(s=e.slice(i),i=o):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
`&&(a+=r),a+=s;return a}p(Pa,"indentString");function un(e,t){return`
`+mt.repeat(" ",e.indent*t)}p(un,"generateNextLine");function ku(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(ku,"testImplicitResolving");function ii(e){return e===$b||e===Bb}p(ii,"isWhitespace");function br(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Rs||65536<=e&&e<=1114111}p(br,"isPrintable");function Ra(e){return br(e)&&e!==Rs&&e!==Lb&&e!==ei}p(Ra,"isNsCharOrWhitespace");function Ia(e,t,r){var i=Ra(e),n=i&&!ii(e);return(r?i:i&&e!==gu&&e!==mu&&e!==yu&&e!==xu&&e!==bu)&&e!==Oa&&!(t===hn&&!n)||Ra(t)&&!ii(t)&&e===Oa||t===hn&&n}p(Ia,"isPlainSafe");function vu(e){return br(e)&&e!==Rs&&!ii(e)&&e!==Pb&&e!==Nb&&e!==hn&&e!==gu&&e!==mu&&e!==yu&&e!==xu&&e!==bu&&e!==Oa&&e!==Eb&&e!==Ob&&e!==Mb&&e!==Wb&&e!==Rb&&e!==Ib&&e!==Db&&e!==Ab&&e!==Fb&&e!==zb&&e!==qb}p(vu,"isPlainSafeFirst");function Su(e){return!ii(e)&&e!==hn}p(Su,"isPlainSafeLast");function er(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(er,"codePointAt");function Is(e){var t=/^\n* /;return t.test(e)}p(Is,"needIndentIndicator");var Tu=1,Na=2,Bu=3,Lu=4,Je=5;function $u(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=vu(er(e,0))&&Su(er(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=er(e,l),!br(c))return Je;m=m&&Ia(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=er(e,l),c===ei)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!br(c))return Je;m=m&&Ia(c,h,o),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!s&&!n(e)?Tu:a===ri?Je:Na:r>9&&Is(e)?Je:s?a===ri?Je:Na:f?Lu:Bu}p($u,"chooseScalarStyle");function Mu(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===ri?'""':"''";if(!e.noCompatMode&&(Hb.indexOf(t)!==-1||jb.test(t)))return e.quotingType===ri?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ku(e,c)}switch(p(l,"testAmbiguity"),$u(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case Tu:return t;case Na:return"'"+t.replace(/'/g,"''")+"'";case Bu:return"|"+za(t,e.indent)+qa(Pa(t,a));case Lu:return">"+za(t,e.indent)+qa(Pa(Au(t,s),a));case Je:return'"'+Fu(t)+'"';default:throw new Dt("impossible error: invalid scalar style")}})()}p(Mu,"writeScalar");function za(e,t){var r=Is(e)?String(t):"",i=e[e.length-1]===`
`,n=i&&(e[e.length-2]===`
`||e===`
`),a=n?"+":i?"":"-";return r+a+`
`}p(za,"blockHeader");function qa(e){return e[e.length-1]===`
`?e.slice(0,-1):e}p(qa,"dropEndingNewline");function Au(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
`);return c=c!==-1?c:e.length,r.lastIndex=c,Wa(e.slice(0,c),t)})(),n=e[0]===`
`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?`
`:"")+Wa(l,t),n=a}return i}p(Au,"foldString");function Wa(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
`+e.slice(n,a),n=a+1),s=o;return l+=`
`,e.length-n>t&&s>n?l+=e.slice(n,s)+`
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}p(Wa,"foldLine");function Fu(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=er(e,n),i=Bt[r],!i&&br(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Cu(r);return t}p(Fu,"escapeString");function Eu(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(te(e,t,o,!1,!1)||typeof o>"u"&&te(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(Eu,"writeFlowSequence");function Ha(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(te(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&te(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=un(e,t)),e.dump&&ei===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ha,"writeBlockSequence");function Du(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),te(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),te(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(Du,"writeFlowMapping");function Ou(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Dt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)f="",(!i||n!=="")&&(f+=un(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),te(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&ei===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=un(e,t)),te(e,t+1,h,!0,u)&&(e.dump&&ei===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(Ou,"writeBlockMapping");function ja(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,du.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(pu.call(o.represent,l))i=o.represent[l](t,l);else throw new Dt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(ja,"detectType");function te(e,t,r,i,n,a,s){e.tag=null,e.dump=r,ja(e,r,!1)||ja(e,r,!0);var o=du.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Ou(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Du(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Ha(e,t-1,e.dump,n):Ha(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(Eu(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Mu(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Dt("unacceptable kind of an object to dump "+o)}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(te,"writeNode");function Pu(e,t){var r=[],i=[],n,a;for(fn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(Pu,"getDuplicateReferences");function fn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)fn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)fn(e[i[n]],t,r)}p(fn,"inspectNode");function Gb(e,t){t=t||{};var r=new wu(
`:""}p(Gb,"dump$1");function Vb(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(Vb,"renamed");var Ub=Bh,Xb=Tb.load;var kt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Go={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function Nr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ut(e),t=ut(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(Nr,"calculateDeltaAndAngle");var ut=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Zb=p(e=>({x:p(function(t,r,i){let n=0;const a=ut(i[0]).x<ut(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(kt,e.arrowTypeStart)){const{angle:d,deltaX:g}=Nr(i[0],i[1]);n=kt[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(kt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Nr(i[i.length-1],i[i.length-2]);n=kt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const s=Math.abs(ut(t).x-ut(i[i.length-1]).x),o=Math.abs(ut(t).y-ut(i[i.length-1]).y),l=Math.abs(ut(t).x-ut(i[0]).x),c=Math.abs(ut(t).y-ut(i[0]).y),h=kt[e.arrowTypeStart],u=kt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="right"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="right"?-1:1,n+=d}return ut(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=ut(i[0]).y<ut(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(kt,e.arrowTypeStart)){const{angle:d,deltaY:g}=Nr(i[0],i[1]);n=kt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(kt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Nr(i[i.length-1],i[i.length-2]);n=kt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const s=Math.abs(ut(t).y-ut(i[i.length-1]).y),o=Math.abs(ut(t).x-ut(i[i.length-1]).x),l=Math.abs(ut(t).y-ut(i[0]).y),c=Math.abs(ut(t).x-ut(i[0]).x),h=kt[e.arrowTypeStart],u=kt[e.arrowTypeEnd],f=1;if(s<u&&s>0&&o<u){let d=u+f-s;d*=a==="up"?-1:1,n-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=a==="up"?-1:1,n+=d}return ut(t).y+n},"y")}),"getLineFunctionsWithOffset"),Ns=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Kb=p(e=>{const{handDrawnSeed:t}=st();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),kr=p(e=>{const t=Qb([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Qb=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Ru=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),j=p(e=>{const{stylesArray:t}=kr(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];Ru(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),H=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=st(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=kr(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Jb(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),Jb=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),ki={},pt={},Vo;fun
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Gr.exec(e))!==null;)if(i.index===Gr.lastIndex&&Gr.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),O_=p(function(e){return e.replace(Gr,"")},"removeDirectives"),P_=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function js(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return F_[r]??t}p(js,"interpolateToCurve");function Ju(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?r1.sanitizeUrl(r):r}p(Ju,"formatUrl");var R_=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){A.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Ys(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Ys,"distance");function tf(e){let t,r=0;e.forEach(n=>{r+=Ys(n,t),t=n});const i=r/2;return Gs(e,i)}p(tf,"traverseEdge");function ef(e){return e.length===1?e[0]:tf(e)}p(ef,"calcLabelPosition");var ll=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Gs=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Ys(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:ll((1-s)*r.x+s*n.x,5),y:ll((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),I_=p((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Gs(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function rf(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Gs(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(rf,"calcTerminalLabelPosition");function nf(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(nf,"getStylesFromArray");var cl=0,N_=p(()=>(cl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cl),"generateId");function af(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(af,"makeRandomHex");var z_=p(e=>af(e.length),"random"),q_=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"),W_=p(function(e,t){const r=t.text.replace(wr.lineBreakRegex," "),[,i]=jn(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),H_=pi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),wr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=he(`${s} `,r),c=he(a,r);if(l>t){const{hyphenatedStrings:f,remainingW
]`).replace("lheading",uf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},BC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,LC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,df=/^( {2,}|\\)\n(?!\s*$)/,$C=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gn=/[\p{P}\p{S}]/u,ro=/[\s\p{P}\p{S}]/u,pf=/[^\s\p{P}\p{S}]/u,MC=nt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ro).getRegex(),gf=/(?!~)[\p{P}\p{S}]/u,AC=/(?!~)[\s\p{P}\p{S}]/u,FC=/(?:[^\s\p{P}\p{S}]|~)/u,EC=nt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",pC?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,DC=nt(mf,"u").replace(/punct/g,Gn).getRegex(),OC=nt(mf,"u").replace(/punct/g,gf).getRegex(),yf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",PC=nt(yf,"gu").replace(/notPunctSpace/g,pf).replace(/punctSpace/g,ro).replace(/punct/g,Gn).getRegex(),RC=nt(yf,"gu").replace(/notPunctSpace/g,FC).replace(/punctSpace/g,AC).replace(/punct/g,gf).getRegex(),IC=nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pf).replace(/punctSpace/g,ro).replace(/punct/g,Gn).getRegex(),NC=nt(/\\(punct)/,"gu").replace(/punct/g,Gn).getRegex(),zC=nt(/^<(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(),qC=nt(to).replace("(?:-->|$)","-->").getRegex(),WC=nt("^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",qC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,HC=nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",xn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xf=nt(/^!?\[(label)\]\[(ref)\]/).replace("label",xn).replace("ref",Js).getRegex(),bf=nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Js).getRegex(),jC=nt("reflink|nolink(?!\\()","g").replace("reflink",xf).replace("nolink",bf).getRegex(),gl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,io={_backpedal:Xr,anyPunctuation:NC,autolink:zC,blockSkip:EC,br:df,code:LC,del:Xr,emStrongLDelim:DC,emStrongRDelimAst:PC,emStrongRDelimUnd:IC,escape:BC,link:HC,nolink:bf,punctuation:MC,reflink:xf,reflinkSearch:jC,tag:WC,text:$C,url:Xr},YC={...io,link:nt(/^!?\[(label)\]\((.*?)\)/).replace("label",xn).getRegex(),reflink:nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xn).getRegex()},Va={...io,emStrongRDelimAst:RC,emStrongLDelim:OC,url:nt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gl).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:nt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("p
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
`)}var bn=class{options;rules;lexer;constructor(t){this.options=t||Ze}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:Fr(i,`
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=XC(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:n}}}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 n=Fr(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.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:Fr(r[0],`
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Fr(r[0],`
`).split(`
`),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${h}`:h,a=a?`${a}
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,i.length===0)break;let d=s.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let g=d,m=g.raw+`
`+i.join(`
`),y=this.blockquote(m);s[s.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if(d?.type==="list"){let g=d,m=g.raw+`
`+i.join(`
`),y=this.list(m);s[s.length-1]=y,n=n.substring(0,n.length-d.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(s.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.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)),d=t.split(`
`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
`,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),k=this.rules.other.fencesBeginRegex(m),C=this.rules.other.headingBeginRegex(m),B=this.rules.other.htmlBeginRegex(m);for(;t;){let v=t.split(`
`,1)[0],E;if(d=v,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),E=d):E=d.replace(this.rules.other.tabCharGlobal," "),k.test(d)||C.test(d)||B.test(d)||b.test(d)||_.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
`+E.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(f)||C.test(f)||_.test(f))break;u+=`
`+d}!g&&!d.trim()&&(g=!0),h+=v+`
`,t=t.substring(v.length+1),f=E.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}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," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=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:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=xl(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(xl(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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 s=Fr(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=UC(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),bl(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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 n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return bl(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(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,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,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}}}},qt=class Ua{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(Mt.tabCharGlobal," ").replace(Mt.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+n.raw,s.text+=`
`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+n.raw,s.text+=`
`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+n.raw,s.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
`)?"":`
`)+n.raw,s.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!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,o)){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,u=t.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},u),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)!=="_"&&(o=l.raw.slice(-1)),s=!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}},_n=class{options;parser;constructor(t){this.options=t||Ze}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(Mt.notSpaceStart)?.[0],a=t.replace(Mt.endingNewline,"")+`
`;return n?'<pre><code class="language-'+Xt(n)+'">'+(i?a:Xt(a,!0))+`</code></pre>
`:"<pre><code>"+(i?a:Xt(a,!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,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let a=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+a+s+`>
`+n+"</"+a+`>
`}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+" "+Xt(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 a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+r+`</thead>
`+n+`</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>${Xt(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 n=this.parser.parseInline(i),a=yl(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+Xt(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=yl(t);if(a===null)return Xt(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${Xt(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Xt(t.text)}},no=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""}},Wt=class Xa{options;renderer;textRenderer;constructor(t){this.options=t||Ze,this.options.renderer=this.options.renderer||new _n,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new no}static parse(t,r){return new Xa(r).parse(t)}static parseInline(t,r){return new Xa(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
`+this.renderer.text(o);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 o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},zr=class{options;block;constructor(t){this.options=t||Ze}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?qt.lex:qt.lexInline}provideParser(){return this.block?Wt.parse:Wt.parseInline}},ZC=class{defaults=Zs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Wt;Renderer=_n;TextRenderer=no;Lexer=qt;Tokenizer=bn;Hooks=zr;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new _n(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new bn(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new zr;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];zr.passThroughHooks.has(s)?a[o]=h=>{if(this.
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Xt(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},je=new ZC;function ot(e,t){return je.parse(e,t)}ot.options=ot.setOptions=function(e){return je.setOptions(e),ot.defaults=je.defaults,cf(ot.defaults),ot};ot.getDefaults=Zs;ot.defaults=Ze;ot.use=function(...e){return je.use(...e),ot.defaults=je.defaults,cf(ot.defaults),ot};ot.walkTokens=function(e,t){return je.walkTokens(e,t)};ot.parseInline=je.parseInline;ot.Parser=Wt;ot.parser=Wt.parse;ot.Renderer=_n;ot.TextRenderer=no;ot.Lexer=qt;ot.lexer=qt.lex;ot.Tokenizer=bn;ot.Hooks=zr;ot.parse=ot;ot.options;ot.setOptions;ot.use;ot.walkTokens;ot.parseInline;Wt.parse;qt.lex;function _f(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 n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):o},[]);if(n.length){var a=new RegExp(`
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(a,`
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
`)&&(u=String(o).split(`
`).map(function(f,d){return d===0?f:""+h+f}).join(`
`)),s+=u+i[l+1]}),s}var KC={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},Za=new Map,Cf=new Map,QC=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(A.debug("Registering icon pack:",t.name),"loader"in t)Cf.set(t.name,t.loader);else if("icons"in t)Za.set(t.name,t.icons);else throw A.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),wf=p(async(e,t)=>{const r=J_(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 n=Za.get(i);if(!n){const s=Cf.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Za.set(i,n)}catch(o){throw A.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=rC(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),JC=p(async e=>{try{return await wf(e),!0}catch{return!1}},"isIconAvailable"),yi=p(async(e,t,r)=>{let i;try{i=await wf(e,t?.fallbackPrefix)}catch(s){A.error(s),i=KC}const n=cC(i,t),a=dC(fC(n.body),{...n.attributes,...r});return Nt(a,vt())},"getIconSVG");function kf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`),n=_f(i);return t===!1?n.replace(/ /g,"&nbsp;"):n}p(kf,"preprocessMarkdown");function vf(e,t={}){const r=kf(e,t),i=ot.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(vf,"markdownToLines");function Sf(e,{markdownAutoWrap:t}={}){const r=ot.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(A.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(Sf,"markdownToHTML");function Tf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Tf,"splitTextToChars");function Bf(e,t){const r=Tf(t.content);return ao(e,[],r,t.type)}p(Bf,"splitWordToFitWidth");function ao(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?ao(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ao,"splitWordToFitWidthRecursion");function Lf(e,t){if(e.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Cn(e,t)}p(Lf,"splitLineToFitWidth");function Cn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return Cn(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=Bf(t,a);r.push([o]),l.content&&e.unshift(l)}return Cn(e,t,r)}p(Cn,"splitLineToFitWidthRecursion");function Ka(e,t){t&&e.attr("style",t)}p(Ka,"applyStyle");async function $f(e,t,r,i,n=!1,a=vt()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=gr(t.label)?await ps(t.label.replace(wr.lineBreakRegex,`
`),a):Nt(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Ka(h,t.labelStyle),h.attr("class",`${c} ${i}`),Ka(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p($f,"addHtmlSpan");function Vn(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Vn,"createTspan");function Mf(e,t,r){const i=e.append("text"),n=Vn(i,1,t);Un(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Mf,"computeWidthOfText");function tw(e,t,r){const i=e.append("text"),n=Vn(i,1,t);Un(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(tw,"computeDimensionOfText");function Af(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>Mf(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Lf(c,h);for(const f of u){const d=Vn(o,l,1.1);Un(d,f),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(Af,"createFormattedText");function Un(e,t){e.text(""),t.forEach((r,i)=>{const n=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?n.text(r.content):n.text(" "+r.content)})}p(Un,"updateTextContentAndStyles");async function Ff(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await JC(o)?await yi(o,void 0,{class:"label-icon"}):`<i class='${Nt(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ff,"replaceIconSubstring");var Se=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(A.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=Sf(t,c),u=await Ff(Xe(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:s,label:gr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await $f(e,d,o,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=vf(h.replace("<br>","<br/>"),c),f=Af(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");it(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(f).select("text").attr("style",g)}return f}},"createText");function la(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function ew(e,t){return e[0]===t[0]&&e[1]===t[1]}function rw(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)la(c,o,n);const l=(function(c,h,u){const f=[];for(const b of c){const _=[...b];ew(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const k=b[_],C=b[_+1];if(k[1]!==C[1]){const B=Math.min(k[1],C[1]);g.push({ymin:B,ymax:Math.max(k[1],C[1]),x:B===k[1]?k[0]:C[0],islope:(C[0]-k[0])/(C[1]-k[1])})}}if(g.sort(((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.
`),i));const s='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Nt(s,i)),Nf(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(zf,"addHtmlLabel");var xw=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),yt(st().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),A.info("vertexText"+n);const a={isNode:i,label:Xe(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await zf(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Pe=xw,Te=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),qf=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=st(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=yt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Se(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(yt(r.flowchart.htmlLabels)){const v=g.children[0],E=it(g);m=v.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const v=q.svg(u),E=H(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),P=v.path(Te(b,_,y,x,0),E);k=u.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:C}=Ns(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+C})`),o){const v=d.select("span");v&&v.attr("style",o)}const B=k.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=m.height-t.padding/2,t.intersect=function(v){return Tr(t,v)},{cluster:u,labelBBox:m}},"rect"),bw=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Tr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_w=p(async(e,t)=>{const r=st(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await Pe(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(yt(r.flowchart.htmlLabels)){const P=d.children[0],D=it(d);g=P.getBoundingClientRect(),D.attr("width",g.width),D.attr
M ${n.x},${n.y} L ${s.x},${s.y}`}p(Jf,"createLine");function td(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=q.svg(n),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Jf(a),u=o.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Y(t,f),t.intersect=function(d){return A.info("crossedCircle intersect",t,{radius:a,point:d}),N.circle(t,a,d)},n}p(td,"crossedCircle");function ae(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(ae,"generateCirclePoints");async function ed(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,X(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ae(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...ae(o/2+c*2,-c,c,20,-180,-270),...ae(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...ae(o/2,l/2,c,20,0,90)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...ae(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...ae(o/2+o*.1,-c,c,20,-180,-270),...ae(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...ae(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],d=q.svg(n),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=rt(u).replace("Z",""),x=d.path(y,g),b=rt(f),_=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,k),t.intersect=function(C){return N.polygon(t,f,C)},n}p(ed,"curlyBraceLeft");function se(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:d,y:g})}return s}p(se,"generateCirclePoints");async function rd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,X(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...se(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...se(o/2+c*2,-c,c,20,-180,-270),...se(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...se(o/2,l/2,c,20,0,90)],f=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...se(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...se(o/2+c*2,-c,c,20,-180,-270),...se(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...se(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],d=q.svg(n),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=rt(u).replace("Z",""),x=d.path(y,g),b=rt(f),_=d.path(b,{...g}),k=n.insert("g",":first-child");return k.insert(()=>_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,k),t.intersect=function(C){return N.polygon(t,f,C)},n}p(rd,"curlyBraceRight");function bt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);s.push({x:-d,y:-g})}return s}p(bt,"generateCirclePoints");async function id(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,X(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...bt(o/2,-l/2,c,30,-90
a${n},${a} 0,0,1 0,${-i}
l${r},0
a${n},${a} 0,0,1 0,${i}
M${r},${-i}
a${n},${a} 0,0,0 0,${i}
l${-r},0`,"createCylinderPathD"),Iw=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Nw=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await K(e,t,X(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=q.svg(n),y=Iw(0,0,f,c,u,h),x=Nw(0,0,f,c,u,h),b=m.path(y,H(t,{})),_=m.path(x,H(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=Rw(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Tt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Y(t,g),t.intersect=function(m){const y=N.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(jd,"tiltedCylinder");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,X(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(n),f=H(t,{}),d=rt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Be(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,Y(t,c),t.intersect=function(u){return N.polygon(t,l,u)},n}p(Yd,"trapezoid");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await K(e,t,X(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=q.svg(n),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=rt(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Y(t,y),t.intersect=function(x){return N.polygon(t,d,x)},n}p(Gd,"trapezoidalPentagon");async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,X(t)),o=yt(st().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=q.svg(n),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=rt(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Y(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return A.info("Triangle intersect",t,u,b),N.polygon(t,u,b)},n}p(Vd,"triangle");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await K(e,t,X(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-o,g=d>0?d/2:0,m=q.svg(n),y=H(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-
M${h-c},${u} L${h+o},${u}
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Y(t,b),t.intersect=function(_){return N.polygon(t,m,_)},n}p(Zd,"windowPane");async function co(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Z}=vt(),{background:tt}=Z,at={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${tt}`]};await co(e,at)}const i=vt();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=j(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};he(t.label,i)+Z.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const tt=await Zn(e,t,Z);if(!yt(i.htmlLabels)){const at=tt.select("text"),ct=at.node()?.getBBox();at.attr("transform",`translate(${-ct.width/2}, 0)`)}return tt}i.htmlLabels||(n*=1.25,a*=1.25);let c=X(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await tr(h,t.label??"",i,0,0,["name"],o);u.height+=a;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,_=!0,k=!0;for(const Z of r.attributes){const tt=await tr(h,Z.type,i,0,f,["attribute-type"],o);m=Math.max(m,tt.width+n);const at=await tr(h,Z.name,i,0,f,["attribute-name"],o);y=Math.max(y,at.width+n);const ct=await tr(h,Z.keys.join(),i,0,f,["attribute-keys"],o);x=Math.max(x,ct.width+n);const At=await tr(h,Z.comment,i,0,f,["attribute-comment"],o);b=Math.max(b,At.width+n);const Ct=Math.max(tt.height,at.height,ct.height,At.height)+a;g.push({yOffset:f,rowHeight:Ct}),f+=Ct}let C=4;x<=n&&(_=!1,x=0,C--),b<=n&&(k=!1,b=0,C--);const B=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const Z=u.width+n*2-(m+y+x+b);m+=Z/C,y+=Z/C,x>0&&(x+=Z/C),b>0&&(b+=Z/C)}const v=m+y+x+b,E=q.svg(h),P=H(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=0;g.length>0&&(D=g.reduce((Z,tt)=>Z+(tt?.rowHeight??0),0));const F=Math.max(B.width+n*2,t?.width||0,v),R=Math.max((D??0)+u.height,t?.height||0),O=-F/2,T=-R/2;h.selectAll("g:not(:first-child)").each((Z,tt,at)=>{const ct=it(at[tt]),At=ct.attr("transform");let Ct=0,de=0;if(At){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(At);xt&&(Ct=parseFloat(xt[1]),de=parseFloat(xt[2]),ct.attr("class").includes("attribute-name")?Ct+=m:ct.attr("class").includes("attribute-keys")?Ct+=m+y:ct.attr("class").includes("attribute-comment")&&(Ct+=m+y+x))}ct.attr("transform",`translate(${O+n/2+Ct}, ${de+T+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(T+a/2)+")");const L=E.rectangle(O,T,F,R,P),S=h.insert(()=>L,":first-child").attr("style",s.join("")),{themeVariables:M}=vt(),{rowEven:$,rowOdd:W,nodeBorder:G}=M;d.push(0);for(const[Z,tt]of g.entries()){const ct=(Z+1)%2===0&&tt.yOffset!==0,At=E.rectangle(O,u.height+T+tt?.yOffset,F,tt?.rowHeight,{...P,fill:ct?$:W,stroke:G});h.insert(()=>At,"g.label").attr("style",s.join("")).attr("class",`row-rect-${ct?"even":"odd"}`)}let et=E.line(O,u.height+T,F+O,u.height+T,P);h.insert(()=>et).attr("class","divider"),et=E.line(m+O,u.height+T,m+O,R+T,P),h.insert(()=>et).attr("class","divider"),_&&(et=E.line(m+y+O,u.height+T,m+y+O,R+T,P),h.insert(()=>et).attr("class","divider")),k&&(et=E.line(m+y+x+O,u.height+T,m+y+x+O,R+T,P),h.insert(()=>et).attr("class","divider"));for(const Z of d)et=E.line(O,u.height+T+Z,F+O,u.height+T+Z,P),h.insert(()=>et).attr("class","divider");if(Y(t,S),l&&t.look!=="handDrawn"){const tt=l.split(";")?.filter(at=>at.includes("stroke"))?.map(at=>`${at}`).join("; ");h.selectAll("path").attr("style",tt??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(Z){return N.rect(t,Z)},h}p(co,"erBox");async function tr
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=q.svg(n),_=H(t,{}),k=b.path(x,_);y=n.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",Tt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Y(t,y),t.calcIntersect=function(b,_){return N.rect(b,_)},t.intersect=function(b){return A.info("Bang intersect",t,b),N.rect(t,b)},n}p(ep,"bang");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await K(e,t,X(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,f=.35*l,d=.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${u},${u} 1 0,1 ${l*.35},${l*.2}
a${h},${h} 1 0,1 ${l*.15},${c*.35}
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
a${u},${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${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
H0 V0 Z`;if(t.look==="handDrawn"){const x=q.svg(n),b=H(t,{}),_=x.path(y,b);m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Tt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,m),t.calcIntersect=function(x,b){return N.rect(x,b)},t.intersect=function(x){return A.info("Cloud intersect",t,x),N.rect(t,x)},n}p(rp,"cloud");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await K(e,t,X(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
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
`,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),Y(t,f),t.calcIntersect=function(d,g){return N.rect(d,g)},t.intersect=function(d){return N.rect(t,d)},n}p(ip,"defaultMindmapNode");async function np(e,t){const r={padding:t.padding??0};return lo(e,t,r)}p(np,"mindmapCircle");var qw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Od},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Fd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Pd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ad},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:lo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ep},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:rp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$d},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Cd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Yd},{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:bd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:od},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Hd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Kf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ed},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Nd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Id},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:dd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],ha
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,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const f={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),A.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,f),f}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,f=r.x<t.x?r.x+h-o:r.x-h+o,d=r.y<t.y?r.y+u:r.y-u;return A.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),$l=p((e,t)=>{A.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(A.info("abc88 checking point",a,t),!Uw(t,a)&&!n){const s=Xw(t,i,a);A.debug("abc88 inside",a,i,s),A.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?A.warn("abc88 no intersect",s,r):r.push(s),n=!0}else A.warn("abc88 outside",a,i),i=a,n||r.push(a)}),A.debug("returning points",r),r},"cutPathAtIntersect");function op(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(op,"extractCornerPoints");var Ml=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),Zw=p(function(e){const{cornerPointPositions:t}=op(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=Ml(n,s,5),l=Ml(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let f={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){A.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;s.x===o.x?f={x:c<0?o.x-d+u:o.x+d-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-d+u:o.y+d-u}}else A.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),Kw=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Qw=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=st();let c=t.points,h=!1;const u=n;var f=a;const d=[];for(const T in t.cssCompiledStyles)Ru(T)||d.push(t.cssCompiledStyles[T]);A.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),A.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&&(A.info("to cluster abc88",r.get(t.toCluster)),c=$l(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(A.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=$l(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(T=>!Number.isNaN(T.y));m=Zw(m);let y=Ri;switch(y=rn,t.curve){case"linear":y=rn;break;case"basis":y=Ri;break;case"cardinal":y=qc;break;case"bumpX":y=Pc;break;case"bumpY":y=Rc;break;case"catmullRom":y=Hc;break;case"monotoneX":y=Xc;break;case"monotoneY":y=Zc;break;case"natural":y=Qc;break;case"step":y=Jc;break;case"stepAfter":y=eh;break;case"stepBefore":y=th;break;default:y=Ri}const{x,y:b}=Zb(t),_=Ex().x(x).y(b).curve(y);let k;switch(t.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible";break;default:k="edge-thickness-normal"}switch(t.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break;default:k+=" edge-pattern-solid"}let C,B=t.curve==="rounded"?lp(cp(m,t),5):_(m);const v=Array.isArray(t.style)?t.style:[t.style];let E=v.find(T=>T?.startsWith("stroke:")),P=!1;if(t.look==="handDrawn"){const
L20,10
M20,10
L0,20`)},"requirement_arrow"),pk=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"),gk={extension:tk,composition:ek,aggregation:rk,dependency:ik,lollipop:nk,point:ak,circle:sk,cross:ok,barb:lk,only_one:ck,zero_or_one:hk,one_or_more:uk,zero_or_more:fk,requirement_arrow:dk,requirement_contains:pk},mk=Jw,yk={common:wr,getConfig:vt,insertCluster:Sw,insertEdge:Qw,insertEdgeLabel:Gw,insertMarkers:mk,insertNode:sp,interpolateToCurve:js,labelHelper:K,log:A,positionEdgeLabel:Vw},oi={},hp=p(e=>{for(const t of e)oi[t.name]=t},"registerLayoutLoaders"),xk=p(()=>{hp([{name:"dagre",loader:p(async()=>await lt(()=>import("./dagre-6UL2VRFP-D3-DYqn2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await lt(()=>import("./cose-bilkent-S5V4N54A-B3h2gisu.js"),__vite__mapDeps([8,9,6,7])),"loader")}])},"registerDefaultLayoutLoaders");xk();var aB=p(async(e,t)=>{if(!(e.layoutAlgorithm in oi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=oi[e.layoutAlgorithm];return(await r.loader()).render(e,t,yk,{algorithm:r.algorithm})},"render"),sB=p((e="",{fallback:t="dagre"}={})=>{if(e in oi)return e;if(t in oi)return A.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"),up="comm",fp="rule",dp="decl",bk="@import",_k="@namespace",Ck="@keyframes",wk="@layer",pp=Math.abs,ho=String.fromCharCode;function gp(e){return e.trim()}function Wi(e,t,r){return e.replace(t,r)}function kk(e,t,r){return e.indexOf(t,r)}function nr(e,t){return e.charCodeAt(t)|0}function _r(e,t,r){return e.slice(t,r)}function Kt(e){return e.length}function vk(e){return e.length}function Mi(e,t){return t.push(e),e}var Qn=1,Cr=1,mp=0,zt=0,dt=0,Br="";function uo(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Qn,column:Cr,length:s,return:"",siblings:o}}function Sk(){return dt}function Tk(){return dt=zt>0?nr(Br,--zt):0,Cr--,dt===10&&(Cr=1,Qn--),dt}function Gt(){return dt=zt<mp?nr(Br,zt++):0,Cr++,dt===10&&(Cr=1,Qn++),dt}function xe(){return nr(Br,zt)}function Hi(){return zt}function Jn(e,t){return _r(Br,e,t)}function li(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bk(e){return Qn=Cr=1,mp=Kt(Br=e),zt=0,[]}function Lk(e){return Br="",e}function pa(e){return gp(Jn(zt-1,ns(e===91?e+2:e===40?e+1:e)))}function $k(e){for(;(dt=xe())&&dt<33;)Gt();return li(e)>2||li(dt)>3?"":" "}function Mk(e,t){for(;--t&&Gt()&&!(dt<48||dt>102||dt>57&&dt<65||dt>70&&dt<97););return Jn(e,Hi()+(t<6&&xe()==32&&Gt()==32))}function ns(e){for(;Gt();)switch(dt){case e:return zt;case 34:case 39:e!==34&&e!==39&&ns(dt);break;case 40:e===41&&ns(e);break;case 92:Gt();break}return zt}function Ak(e,t){for(;Gt()&&e+dt!==57;)if(e+dt===84&&xe()===47)break;return"/*"+Jn(t,zt-1)+"*"+ho(e===47?e:Gt())}function Fk(e){for(;!li(xe());)Gt();return Jn(e,zt)}function Ek(e){return Lk(ji("",null,null,null,[""],e=Bk(e),0,[0],e))}function ji(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",k=n,C=a,B=i,v=_;y;)switch(g=b,b=Gt()){case 40:if(g!=108&&nr(v,u-1)==58){kk(v+=Wi(pa(b),"&","&\f"),"&\f",pp(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:v+=pa(b);break;case 9:case 10:case 13:case 32:v+=$k(g);break;case 92:v+=Mk(Hi()-1,7);continue;case 47:switch(xe()){case 42:case 47:Mi(Dk(Ak(Gt(),Hi()),t,r,l),l),(li(g||1)==5||li(xe()||1)==5)&&Kt(v)&&_r(v,-1,void 0)!==" "&&(v+=" ");break;default:v+=
`);const i=Wx(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),ac(i,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 ${r}`)},"draw"),Dp={draw:lS},cS=Dp,hS={db:{},renderer:Dp,parser:{parse:p(()=>{},"parse")}},uS=hS,Op="flowchart-elk",fS=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),dS=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS-BZiwTlxg.js");return{diagram:t}},__vite__mapDeps([12,13,14,15,16,6,7]));return{id:Op,diagram:e}},"loader"),pS={id:Op,detector:fS,loader:dS},gS=pS,Pp="timeline",mS=p(e=>/^\s*timeline/.test(e),"detector"),yS=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI-DAvrjQlO.js");return{diagram:t}},__vite__mapDeps([41,28,6,7]));return{id:Pp,diagram:e}},"loader"),xS={id:Pp,detector:mS,loader:yS},bS=xS,Rp="mindmap",_S=p(e=>/^\s*mindmap/.test(e),"detector"),CS=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T-Cv8kGwbk.js");return{diagram:t}},__vite__mapDeps([42,14,15,6,7]));return{id:Rp,diagram:e}},"loader"),wS={id:Rp,detector:_S,loader:CS},kS=wS,Ip="kanban",vS=p(e=>/^\s*kanban/.test(e),"detector"),SS=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7-C9WSxADn.js");return{diagram:t}},__vite__mapDeps([43,13,6,7]));return{id:Ip,diagram:e}},"loader"),TS={id:Ip,detector:vS,loader:SS},BS=TS,Np="sankey",LS=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),$S=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN-T-T7pPL5.js");return{diagram:t}},__vite__mapDeps([44,29,24,6,7]));return{id:Np,diagram:e}},"loader"),MS={id:Np,detector:LS,loader:$S},AS=MS,zp="packet",FS=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),ES=p(async()=>{const{diagram:e}=await lt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-CYt74Kga.js");return{diagram:t}},__vite__mapDeps([45,19,21,6,7,2,4,5]));return{id:zp,diagr
`;try{_a(n)}catch{const c=xg(n);if(!c)throw new Vl(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Xi(h,u)}const{db:a,parser:s,renderer:o,init:l}=_a(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new Ie(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Ie,"Diagram"),Ie),zl=[],KS=p(()=>{zl.forEach(e=>{e()}),zl=[]},"attachFunctions"),QS=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Vp(e){const t=e.match(Gl);if(!t)return{text:e,metadata:{}};let r=Xb(t[1],{schema:Ub})??{};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(Vp,"extractFrontMatter");var JS=p(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),tT=p(e=>{const{text:t,metadata:r}=Vp(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),eT=p(e=>{const t=jt.detectInit(e)??{},r=jt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:O_(e),directive:t}},"processDirectives");function fo(e){const t=JS(e),r=tT(t),i=eT(r.text),n=Xs(r.config,i.directive);return e=QS(i.text),{code:e,title:r.title,config:n}}p(fo,"preprocessDiagram");function Up(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Up,"toBase64");var rT=5e4,iT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",nT="sandbox",aT="loose",sT="http://www.w3.org/2000/svg",oT="http://www.w3.org/1999/xlink",lT="http://www.w3.org/1999/xhtml",cT="100%",hT="100%",uT="border:0;margin:0;",fT="margin:0",dT="allow-top-navigation-by-user-activation allow-popups",pT='The "iframe" tag is not supported by your browser.',gT=["foreignobject"],mT=["dominant-baseline"];function po(e){const t=fo(e);return Vi(),Dg(t.config??{}),t}p(po,"processAndSetConfigs");async function Xp(e,t){ta();try{const{code:r,config:i}=po(e);return{diagramType:(await Kp(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Xp,"parse");var ql=p((e,t,r=[])=>`
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),yT=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Il(o.styles)||s.forEach(l=>{r+=ql(o.id,l,o.styles)}),Il(o.textStyles)||(r+=ql(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),xT=p((e,t,r,i)=>{const n=yT(e,r),a=t0(t,n,e.themeVariables);return as(Ek(`${i}{${a}}`),Ok)},"createUserStyles"),bT=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=Xe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),_T=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":hT,i=Up(`<body style="${fT}">${e}</body>`);return`<iframe style="width:${cT};height:${r};${uT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${dT}">
${pT}
</iframe>`},"putIntoIFrame"),Wl=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",sT);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function us(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(us,"sandboxedIframe");var CT=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),wT=p(async function(e,t,r){ta();const i=po(t);t=i.code;const n=vt();A.debug(n),t.length>(n?.maxTextSize??rT)&&(t=iT);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const O=it(f?o:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let u=it("body");const f=n.securityLevel===nT,d=n.securityLevel===aT,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const R=us(it(r),s);u=it(R.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it(r);Wl(u,e,l,`font-family: ${g}`,oT)}else{if(CT(document,e,l,s),f){const R=us(it("body"),s);u=it(R.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=it("body");Wl(u,e,l)}let m,y;try{m=await hs.fromText(t,{title:i.title})}catch(R){if(n.suppressErrorRendering)throw h(),R;m=await hs.fromText("error"),y=R}const x=u.select(c).node(),b=m.type,_=x.firstChild,k=_.firstChild,C=m.renderer.getClasses?.(t,m),B=xT(n,b,C,a),v=document.createElement("style");v.innerHTML=B,_.insertBefore(v,k);try{await m.renderer.draw(t,e,go.version,m)}catch(R){throw n.suppressErrorRendering?h():cS.draw(t,e,go.version),R}const E=u.select(`${c} svg`),P=m.db.getAccTitle?.(),D=m.db.getAccDescription?.();Qp(b,E,P,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",lT);let F=u.select(c).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),F=bT(F,f,yt(n.arrowMarkerAbsolute)),f){const R=u.select(c+" svg").node();F=_T(F,R)}else d||(F=dr.sanitize(F,{ADD_TAGS:gT,ADD_ATTR:mT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(KS(),y)throw y;return h(),{diagramType:b,svg:F,bindFunctions:m.db.bindFunctions}},"render");function Zp(e={}){const t=gt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Fg(t),t?.theme&&t.theme in oe?t.themeVariables=oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Ag(t):Ql();fs(r.logLevel),ta()}p(Zp,"initialize");var Kp=p((e,t={})=>{const{code:r}=fo(e);return hs.fromText(r,t)},"getDiagramFromText");function Qp(e,t,r,i){Yp(t,e),Gp(t,r,i,t.attr("id"))}p(Qp,"addA11yInfo");var Ye=Object.freeze({render:wT,parse:Xp,getDiagramFromText:Kp,initialize:Zp,getConfig:vt,setConfig:Jl,getSiteConfig:Ql,updateSiteConfig:Eg,reset:p(()=>{Vi()},"reset"),globalReset:p(()=>{Vi(pr)},"globalReset"),defaultConfig:pr});fs(vt().logLevel);Vi(vt());var kT=p((e,t,r)=>{A.warn(e),Us(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"),Jp=p(async function(e={querySelector:".mermaid"}){try{await vT(e)}catch(t){if(Us(t)&&A.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),t}},"run"),vT=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ye.getConfig();A.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(A.debug("Start On Load: "+i?.startOnLoad),Ye.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new jt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(A.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`me