import { f as e } from "./chunk-XZSTWKYB-BZB_wvbZ.js";
import "./chunk-R5LLSJPH-C90VQC8y.js";
import "./chunk-7E7YKBS2-Bewg8t99.js";
import "./chunk-EGIJ26TM-1-wU_wPi.js";
import "./chunk-C72U2L5F-BqOejReq.js";
import "./chunk-XIRO2GV7-D1_jT4ch.js";
import "./chunk-L3YUKLVL-U6LYvPh7.js";
import "./chunk-OZEHJAEY-D6S6KbwY.js";
//#region node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs
var t = {}, n = {
	info: /* @__PURE__ */ e(async () => {
		let { createInfoServices: e } = await import("./info-3K5VOQVL-CmVeZuiG.js");
		t.info = e().Info.parser.LangiumParser;
	}, "info"),
	packet: /* @__PURE__ */ e(async () => {
		let { createPacketServices: e } = await import("./packet-RMMSAZCW-jFj7IW8A.js");
		t.packet = e().Packet.parser.LangiumParser;
	}, "packet"),
	pie: /* @__PURE__ */ e(async () => {
		let { createPieServices: e } = await import("./pie-UPGHQEXC-osqmeuax.js");
		t.pie = e().Pie.parser.LangiumParser;
	}, "pie"),
	architecture: /* @__PURE__ */ e(async () => {
		let { createArchitectureServices: e } = await import("./architecture-PBZL5I3N-gCfUhEfQ.js");
		t.architecture = e().Architecture.parser.LangiumParser;
	}, "architecture"),
	gitGraph: /* @__PURE__ */ e(async () => {
		let { createGitGraphServices: e } = await import("./gitGraph-HDMCJU4V--53HTu2M.js");
		t.gitGraph = e().GitGraph.parser.LangiumParser;
	}, "gitGraph"),
	radar: /* @__PURE__ */ e(async () => {
		let { createRadarServices: e } = await import("./radar-KQ55EAFF-Dj2g5Z-W.js");
		t.radar = e().Radar.parser.LangiumParser;
	}, "radar"),
	treemap: /* @__PURE__ */ e(async () => {
		let { createTreemapServices: e } = await import("./treemap-KZPCXAKY-DQ1GEudW.js");
		t.treemap = e().Treemap.parser.LangiumParser;
	}, "treemap")
};
async function r(e, r) {
	let a = n[e];
	if (!a) throw Error(`Unknown diagram type: ${e}`);
	t[e] || await a();
	let o = t[e].parse(r);
	if (o.lexerErrors.length > 0 || o.parserErrors.length > 0) throw new i(o);
	return o.value;
}
e(r, "parse");
var i = class extends Error {
	constructor(e) {
		let t = e.lexerErrors.map((e) => `Lexer error on line ${e.line !== void 0 && !isNaN(e.line) ? e.line : "?"}, column ${e.column !== void 0 && !isNaN(e.column) ? e.column : "?"}: ${e.message}`).join("\n"), n = e.parserErrors.map((e) => `Parse error on line ${e.token.startLine !== void 0 && !isNaN(e.token.startLine) ? e.token.startLine : "?"}, column ${e.token.startColumn !== void 0 && !isNaN(e.token.startColumn) ? e.token.startColumn : "?"}: ${e.message}`).join("\n");
		super(`Parsing failed: ${t} ${n}`), this.result = e;
	}
	static {
		e(this, "MermaidParseError");
	}
};
//#endregion
export { r as t };

//# sourceMappingURL=mermaid-parser.core-Bd7Ghv5c.js.map