import{f as t}from"./chunk-XVEYI5JQ.mjs";import{a as o}from"./chunk-GTKDMUJJ.mjs";var a={},n={info:t(async()=>{let{createInfoServices:e}=await import("./info-46DW6VJ7-CQJS2HF5.mjs"),r=e().Info.parser.LangiumParser;a.info=r},"info"),packet:t(async()=>{let{createPacketServices:e}=await import("./packet-W2GHVCYJ-EO6UC2GD.mjs"),r=e().Packet.parser.LangiumParser;a.packet=r},"packet"),pie:t(async()=>{let{createPieServices:e}=await import("./pie-BEWT4RHE-B6EMOCE6.mjs"),r=e().Pie.parser.LangiumParser;a.pie=r},"pie"),architecture:t(async()=>{let{createArchitectureServices:e}=await import("./architecture-I3QFYML2-BNJ4OOAP.mjs"),r=e().Architecture.parser.LangiumParser;a.architecture=r},"architecture"),gitGraph:t(async()=>{let{createGitGraphServices:e}=await import("./gitGraph-YCYPL57B-MEVJTYR7.mjs"),r=e().GitGraph.parser.LangiumParser;a.gitGraph=r},"gitGraph")};async function p(e,r){let i=n[e];if(!i)throw new Error(`Unknown diagram type: ${e}`);a[e]||await i();let s=a[e].parse(r);if(s.lexerErrors.length>0||s.parserErrors.length>0)throw new m(s);return s.value}o(p,"parse");t(p,"parse");var m=class extends Error{static{o(this,"MermaidParseError")}constructor(e){let r=e.lexerErrors.map(c=>c.message).join(`
`),i=e.parserErrors.map(c=>c.message).join(`
`);super(`Parsing failed: ${r} ${i}`),this.result=e}static{t(this,"MermaidParseError")}};export{p as a};
