import{e as a}from"./chunk-YFOJOJKZ.js";import{g as t,h as p}from"./chunk-7DHJDT2N.js";var i={},o={info:a(()=>t(null,null,function*(){let{createInfoServices:r}=yield import("./chunk-AZ3Q4VDY.js"),e=r().Info.parser.LangiumParser;i.info=e}),"info"),packet:a(()=>t(null,null,function*(){let{createPacketServices:r}=yield import("./chunk-TGQ4PHS5.js"),e=r().Packet.parser.LangiumParser;i.packet=e}),"packet"),pie:a(()=>t(null,null,function*(){let{createPieServices:r}=yield import("./chunk-ONHCV246.js"),e=r().Pie.parser.LangiumParser;i.pie=e}),"pie"),architecture:a(()=>t(null,null,function*(){let{createArchitectureServices:r}=yield import("./chunk-BZZW7YR3.js"),e=r().Architecture.parser.LangiumParser;i.architecture=e}),"architecture"),gitGraph:a(()=>t(null,null,function*(){let{createGitGraphServices:r}=yield import("./chunk-VCVCPQIH.js"),e=r().GitGraph.parser.LangiumParser;i.gitGraph=e}),"gitGraph"),radar:a(()=>t(null,null,function*(){let{createRadarServices:r}=yield import("./chunk-HM4F72EN.js"),e=r().Radar.parser.LangiumParser;i.radar=e}),"radar"),treemap:a(()=>t(null,null,function*(){let{createTreemapServices:r}=yield import("./chunk-YH64UIKN.js"),e=r().Treemap.parser.LangiumParser;i.treemap=e}),"treemap")};function n(r,e){return t(this,null,function*(){let c=o[r];if(!c)throw new Error(`Unknown diagram type: ${r}`);i[r]||(yield c());let s=i[r].parse(e);if(s.lexerErrors.length>0||s.parserErrors.length>0)throw new m(s);return s.value})}p(n,"parse");a(n,"parse");var m=class extends Error{static{p(this,"MermaidParseError")}constructor(r){let e=r.lexerErrors.map(s=>s.message).join(`
`),c=r.parserErrors.map(s=>s.message).join(`
`);super(`Parsing failed: ${e} ${c}`),this.result=r}static{a(this,"MermaidParseError")}};export{n as a};
