import { AbstractMermaidTokenBuilder as e, AbstractMermaidValueConverter as t, ArchitectureGrammarGeneratedModule as n, EmptyFileSystem as r, MermaidGeneratedSharedModule as i, __name as a, createDefaultCoreModule as o, createDefaultSharedCoreModule as s, inject as c } from "./chunk-NNHCCRGN.js";
//#region ../../node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.mjs
var l = class extends e {
	static {
		a(this, "ArchitectureTokenBuilder");
	}
	constructor() {
		super(["architecture"]);
	}
}, u = class extends t {
	static {
		a(this, "ArchitectureValueConverter");
	}
	runCustomConverter(e, t, n) {
		if (e.name === "ARCH_ICON") return t.replace(/[()]/g, "").trim();
		if (e.name === "ARCH_TEXT_ICON") return t.replace(/["()]/g, "");
		if (e.name === "ARCH_TITLE") {
			let e = t.replace(/^\[|]$/g, "").trim();
			return (e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'")) && (e = e.slice(1, -1), e = e.replace(/\\"/g, "\"").replace(/\\'/g, "'")), e.trim();
		}
	}
}, d = { parser: {
	TokenBuilder: /* @__PURE__ */ a(() => new l(), "TokenBuilder"),
	ValueConverter: /* @__PURE__ */ a(() => new u(), "ValueConverter")
} };
function f(e = r) {
	let t = c(s(e), i), a = c(o({ shared: t }), n, d);
	return t.ServiceRegistry.register(a), {
		shared: t,
		Architecture: a
	};
}
a(f, "createArchitectureServices");
//#endregion
export { d as ArchitectureModule, f as createArchitectureServices };

//# sourceMappingURL=chunk-4EGX6M5U.js.map