import { s as __toESM } from "./chunk-BNovOVIE.js";
import { _ as Logger } from "./button-Dj4BTre0.js";
import { t as require_react } from "./react-DA-nE2FX.js";
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
import "./react-dom-BWRJ_g_k.js";
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
import "./zod-BWkcDORu.js";
import { n as ErrorBanner } from "./error-banner-CVkfBUT3.js";
import { t as isEmpty_default } from "./isEmpty-Dd8mx_WL.js";
import { n as useTheme } from "./useTheme-DykuNHR2.js";
import { t as purify } from "./purify.es-DT70lfR0.js";
import { t as useAsyncData } from "./useAsyncData-C56Khv_R.js";
import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-mQeCz5CE.js";
import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-Bf2iLOlr.js";
import { t as package_default } from "./chunk-DR5Q36YT-BflwErH1.js";
import { J as themes_default, M as registerLazyLoadedDiagrams, P as reset, R as saveConfigFromInitialize, S as getDiagramLoader, V as setConfig, W as setSiteConfig, Y as updateSiteConfig, c as configureSvgSize, f as detectType, g as frontMatterRegex, h as evaluate, j as registerDiagram, l as defaultConfig, n as addDirective, p as detectors, q as styles_default, r as assignWithDepth_default, t as UnknownDiagramError, w as getSiteConfig, x as getDiagram, y as getConfig, __tla as __tla_0 } from "./chunk-ABZYJK2D-D0cLy8Bb.js";
import { t as selectSvgElement } from "./chunk-EXTU4WIE-BKNXdLmD.js";
import { n as load, t as JSON_SCHEMA } from "./chunk-MI3HLSF2-CUYEasXO.js";
import "./chunk-HN2XXSSU-E3n-Ys7Z.js";
import "./chunk-CVBHYZKI-B_c5YBcW.js";
import "./chunk-ATLVNIR6-BXsEjlHF.js";
import "./dist-BGdYVvOu.js";
import { i as registerIconPacks, s as dedent } from "./chunk-JA3XYJ7Z-D6c6cOBG.js";
import "./chunk-JZLCHNYA-BvsPHJmL.js";
import "./chunk-QXUST7PY-DV8yRwBd.js";
import { n as registerLayoutLoaders, __tla as __tla_1 } from "./chunk-N4CR4FBY-8ycT-O9a.js";
let mermaid_default;
let __tla = Promise.all([
  (() => {
    try {
      return __tla_0;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_1;
    } catch {
    }
  })()
]).then(async () => {
  var _a;
  var COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", NAMESPACE = "@namespace", KEYFRAMES = "@keyframes", LAYER = "@layer", abs = Math.abs, from = String.fromCharCode;
  function trim(e) {
    return e.trim();
  }
  function replace(e, S, C) {
    return e.replace(S, C);
  }
  function indexof(e, S, C) {
    return e.indexOf(S, C);
  }
  function charat(e, S) {
    return e.charCodeAt(S) | 0;
  }
  function substr(e, S, C) {
    return e.slice(S, C);
  }
  function strlen(e) {
    return e.length;
  }
  function sizeof(e) {
    return e.length;
  }
  function append(e, S) {
    return S.push(e), e;
  }
  var line = 1, column = 1, length = 0, position = 0, character = 0, characters = "";
  function node(e, S, C, w, T, E, D, O) {
    return {
      value: e,
      root: S,
      parent: C,
      type: w,
      props: T,
      children: E,
      line,
      column,
      length: D,
      return: "",
      siblings: O
    };
  }
  function char() {
    return character;
  }
  function prev() {
    return character = position > 0 ? charat(characters, --position) : 0, column--, character === 10 && (column = 1, line--), character;
  }
  function next() {
    return character = position < length ? charat(characters, position++) : 0, column++, character === 10 && (column = 1, line++), character;
  }
  function peek() {
    return charat(characters, position);
  }
  function caret() {
    return position;
  }
  function slice(e, S) {
    return substr(characters, e, S);
  }
  function token(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 alloc(e) {
    return line = column = 1, length = strlen(characters = e), position = 0, [];
  }
  function dealloc(e) {
    return characters = "", e;
  }
  function delimit(e) {
    return trim(slice(position - 1, delimiter(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
  }
  function whitespace(e) {
    for (; (character = peek()) && character < 33; ) next();
    return token(e) > 2 || token(character) > 3 ? "" : " ";
  }
  function escaping(e, S) {
    for (; --S && next() && !(character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97); ) ;
    return slice(e, caret() + (S < 6 && peek() == 32 && next() == 32));
  }
  function delimiter(e) {
    for (; next(); ) switch (character) {
      case e:
        return position;
      case 34:
      case 39:
        e !== 34 && e !== 39 && delimiter(character);
        break;
      case 40:
        e === 41 && delimiter(e);
        break;
      case 92:
        next();
        break;
    }
    return position;
  }
  function commenter(e, S) {
    for (; next() && e + character !== 57 && !(e + character === 84 && peek() === 47); ) ;
    return "/*" + slice(S, position - 1) + "*" + from(e === 47 ? e : next());
  }
  function identifier(e) {
    for (; !token(peek()); ) next();
    return slice(e, position);
  }
  function compile(e) {
    return dealloc(parse$1("", null, null, null, [
      ""
    ], e = alloc(e), 0, [
      0
    ], e));
  }
  function parse$1(e, S, C, w, T, E, D, O, k) {
    for (var A = 0, j = 0, M = D, N = 0, P = 0, F = 0, I = 1, L = 1, R = 1, z = 0, B = "", V = T, H = E, U = w, W = B; L; ) switch (F = z, z = next()) {
      case 40:
        if (F != 108 && charat(W, M - 1) == 58) {
          indexof(W += replace(delimit(z), "&", "&\f"), "&\f", abs(A ? O[A - 1] : 0)) != -1 && (R = -1);
          break;
        }
      case 34:
      case 39:
      case 91:
        W += delimit(z);
        break;
      case 9:
      case 10:
      case 13:
      case 32:
        W += whitespace(F);
        break;
      case 92:
        W += escaping(caret() - 1, 7);
        continue;
      case 47:
        switch (peek()) {
          case 42:
          case 47:
            append(comment(commenter(next(), caret()), S, C, k), k), (token(F || 1) == 5 || token(peek() || 1) == 5) && strlen(W) && substr(W, -1, void 0) !== " " && (W += " ");
            break;
          default:
            W += "/";
        }
        break;
      case 123 * I:
        O[A++] = strlen(W) * R;
      case 125 * I:
      case 59:
      case 0:
        switch (z) {
          case 0:
          case 125:
            L = 0;
          case 59 + j:
            R == -1 && (W = replace(W, /\f/g, "")), P > 0 && (strlen(W) - M || I === 0 && F === 47) && append(P > 32 ? declaration(W + ";", w, C, M - 1, k) : declaration(replace(W, " ", "") + ";", w, C, M - 2, k), k);
            break;
          case 59:
            W += ";";
          default:
            if (append(U = ruleset(W, S, C, A, j, T, O, B, V = [], H = [], M, E), E), z === 123) if (j === 0) parse$1(W, S, U, U, V, E, M, O, H);
            else {
              switch (N) {
                case 99:
                  if (charat(W, 3) === 110) break;
                case 108:
                  if (charat(W, 2) === 97) break;
                default:
                  j = 0;
                case 100:
                case 109:
                case 115:
              }
              j ? parse$1(e, U, U, w && append(ruleset(e, U, U, 0, 0, T, O, B, T, V = [], M, H), H), T, H, M, O, w ? V : H) : parse$1(W, U, U, U, [
                ""
              ], H, 0, O, H);
            }
        }
        A = j = P = 0, I = R = 1, B = W = "", M = D;
        break;
      case 58:
        M = 1 + strlen(W), P = F;
      default:
        if (I < 1) {
          if (z == 123) --I;
          else if (z == 125 && I++ == 0 && prev() == 125) continue;
        }
        switch (W += from(z), z * I) {
          case 38:
            R = j > 0 ? 1 : (W += "\f", -1);
            break;
          case 44:
            O[A++] = (strlen(W) - 1) * R, R = 1;
            break;
          case 64:
            peek() === 45 && (W += delimit(next())), N = peek(), j = M = strlen(B = W += identifier(caret())), z++;
            break;
          case 45:
            F === 45 && strlen(W) == 2 && (I = 0);
        }
    }
    return E;
  }
  function ruleset(e, S, C, w, T, E, D, O, k, A, j, M) {
    for (var N = T - 1, P = T === 0 ? E : [
      ""
    ], F = sizeof(P), I = 0, L = 0, R = 0; I < w; ++I) for (var z = 0, B = substr(e, N + 1, N = abs(L = D[I])), V = e; z < F; ++z) (V = trim(L > 0 ? P[z] + " " + B : replace(B, /&\f/g, P[z]))) && (k[R++] = V);
    return node(e, S, C, T === 0 ? RULESET : O, k, A, j, M);
  }
  function comment(e, S, C, w) {
    return node(e, S, C, COMMENT, from(char()), substr(e, 2, -2), 0, w);
  }
  function declaration(e, S, C, w, T) {
    return node(e, S, C, DECLARATION, substr(e, 0, w), substr(e, w + 1, -1), w, T);
  }
  function serialize(e, S) {
    for (var C = "", w = 0; w < e.length; w++) C += S(e[w], w, e, S) || "";
    return C;
  }
  function stringify(e, S, C, w) {
    switch (e.type) {
      case LAYER:
        if (e.children.length) break;
      case IMPORT:
      case NAMESPACE:
      case DECLARATION:
        return e.return = e.return || e.value;
      case COMMENT:
        return "";
      case KEYFRAMES:
        return e.return = e.value + "{" + serialize(e.children, w) + "}";
      case RULESET:
        if (!strlen(e.value = e.props.join(","))) return "";
    }
    return strlen(C = serialize(e.children, w)) ? e.return = e.value + "{" + C + "}" : "";
  }
  var import_compiler_runtime = require_compiler_runtime(), id = "c4", c4Detector_default = {
    id,
    detector: __name((e) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./c4Diagram-YG6GDRKO-C2hc6ne8.js");
      return {
        id,
        diagram: e
      };
    }, "loader")
  }, id2 = "flowchart", flowDetector_default = {
    id: id2,
    detector: __name((e, S) => {
      var _a2, _b;
      return ((_a2 = S == null ? void 0 : S.flowchart) == null ? void 0 : _a2.defaultRenderer) === "dagre-wrapper" || ((_b = S == null ? void 0 : S.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk" ? false : /^\s*graph/.test(e);
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./flowDiagram-NV44I4VS-DQmWlo7f.js");
      return {
        id: id2,
        diagram: e
      };
    }, "loader")
  }, id3 = "flowchart-v2", flowDetector_v2_default = {
    id: id3,
    detector: __name((e, S) => {
      var _a2, _b, _c;
      return ((_a2 = S == null ? void 0 : S.flowchart) == null ? void 0 : _a2.defaultRenderer) === "dagre-d3" ? false : (((_b = S == null ? void 0 : S.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk" && (S.layout = "elk"), /^\s*graph/.test(e) && ((_c = S == null ? void 0 : S.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper" ? true : /^\s*flowchart/.test(e));
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./flowDiagram-NV44I4VS-DQmWlo7f.js");
      return {
        id: id3,
        diagram: e
      };
    }, "loader")
  }, id4 = "er", erDetector_default = {
    id: id4,
    detector: __name((e) => /^\s*erDiagram/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./erDiagram-Q2GNP2WA--19X2kU5.js");
      return {
        id: id4,
        diagram: e
      };
    }, "loader")
  }, id5 = "gitGraph", gitGraphDetector_default = {
    id: id5,
    detector: __name((e) => /^\s*gitGraph/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./gitGraphDiagram-V2S2FVAM-DjzxfF0P.js");
      return {
        id: id5,
        diagram: e
      };
    }, "loader")
  }, id6 = "gantt", ganttDetector_default = {
    id: id6,
    detector: __name((e) => /^\s*gantt/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./ganttDiagram-JELNMOA3-BOGXJ8Lk.js");
      return {
        id: id6,
        diagram: e
      };
    }, "loader")
  }, id7 = "info", info = {
    id: id7,
    detector: __name((e) => /^\s*info/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./infoDiagram-HS3SLOUP-ChNufFsP.js");
      return {
        id: id7,
        diagram: e
      };
    }, "loader")
  }, id8 = "pie", pie = {
    id: id8,
    detector: __name((e) => /^\s*pie/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./pieDiagram-ADFJNKIX-Di34MOFQ.js");
      return {
        id: id8,
        diagram: e
      };
    }, "loader")
  }, id9 = "quadrantChart", quadrantDetector_default = {
    id: id9,
    detector: __name((e) => /^\s*quadrantChart/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./quadrantDiagram-AYHSOK5B-B9kVk1ny.js");
      return {
        id: id9,
        diagram: e
      };
    }, "loader")
  }, id10 = "xychart", xychartDetector_default = {
    id: id10,
    detector: __name((e) => /^\s*xychart(-beta)?/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./xychartDiagram-PRI3JC2R-Dk2d_bX0.js");
      return {
        id: id10,
        diagram: e
      };
    }, "loader")
  }, id11 = "requirement", requirementDetector_default = {
    id: id11,
    detector: __name((e) => /^\s*requirement(Diagram)?/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./requirementDiagram-UZGBJVZJ-BxGfGYEx.js");
      return {
        id: id11,
        diagram: e
      };
    }, "loader")
  }, id12 = "sequence", sequenceDetector_default = {
    id: id12,
    detector: __name((e) => /^\s*sequenceDiagram/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./sequenceDiagram-WL72ISMW-t_Dpemj0.js");
      return {
        id: id12,
        diagram: e
      };
    }, "loader")
  }, id13 = "class", classDetector_default = {
    id: id13,
    detector: __name((e, S) => {
      var _a2;
      return ((_a2 = S == null ? void 0 : S.class) == null ? void 0 : _a2.defaultRenderer) === "dagre-wrapper" ? false : /^\s*classDiagram/.test(e);
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./classDiagram-2ON5EDUG--Yh__LHb.js");
      return {
        id: id13,
        diagram: e
      };
    }, "loader")
  }, id14 = "classDiagram", classDetector_V2_default = {
    id: id14,
    detector: __name((e, S) => {
      var _a2;
      return /^\s*classDiagram/.test(e) && ((_a2 = S == null ? void 0 : S.class) == null ? void 0 : _a2.defaultRenderer) === "dagre-wrapper" ? true : /^\s*classDiagram-v2/.test(e);
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./classDiagram-v2-WZHVMYZB-BC7X7Xtc.js");
      return {
        id: id14,
        diagram: e
      };
    }, "loader")
  }, id15 = "state", stateDetector_default = {
    id: id15,
    detector: __name((e, S) => {
      var _a2;
      return ((_a2 = S == null ? void 0 : S.state) == null ? void 0 : _a2.defaultRenderer) === "dagre-wrapper" ? false : /^\s*stateDiagram/.test(e);
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./stateDiagram-FKZM4ZOC-B18gTP_j.js");
      return {
        id: id15,
        diagram: e
      };
    }, "loader")
  }, id16 = "stateDiagram", stateDetector_V2_default = {
    id: id16,
    detector: __name((e, S) => {
      var _a2;
      return !!(/^\s*stateDiagram-v2/.test(e) || /^\s*stateDiagram/.test(e) && ((_a2 = S == null ? void 0 : S.state) == null ? void 0 : _a2.defaultRenderer) === "dagre-wrapper");
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./stateDiagram-v2-4FDKWEC3-B6e_t14A.js");
      return {
        id: id16,
        diagram: e
      };
    }, "loader")
  }, id17 = "journey", journeyDetector_default = {
    id: id17,
    detector: __name((e) => /^\s*journey/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./journeyDiagram-XKPGCS4Q-BO_O4Ij1.js");
      return {
        id: id17,
        diagram: e
      };
    }, "loader")
  }, renderer = {
    draw: __name((e, S, C) => {
      log.debug("rendering svg for syntax error\n");
      let w = selectSvgElement(S), T = w.append("g");
      w.attr("viewBox", "0 0 2412 512"), configureSvgSize(w, 100, 512, true), T.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"), T.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"), T.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"), T.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"), T.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"), T.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"), T.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"), T.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${C}`);
    }, "draw")
  }, errorRenderer_default = renderer, errorDiagram_default = {
    db: {},
    renderer,
    parser: {
      parse: __name(() => {
      }, "parse")
    }
  }, id18 = "flowchart-elk", detector_default = {
    id: id18,
    detector: __name((e, S = {}) => {
      var _a2;
      return /^\s*flowchart-elk/.test(e) || /^\s*(flowchart|graph)/.test(e) && ((_a2 = S == null ? void 0 : S.flowchart) == null ? void 0 : _a2.defaultRenderer) === "elk" ? (S.layout = "elk", true) : false;
    }, "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./flowDiagram-NV44I4VS-DQmWlo7f.js");
      return {
        id: id18,
        diagram: e
      };
    }, "loader")
  }, id19 = "timeline", detector_default2 = {
    id: id19,
    detector: __name((e) => /^\s*timeline/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./timeline-definition-IT6M3QCI-DJnh1ks5.js");
      return {
        id: id19,
        diagram: e
      };
    }, "loader")
  }, id20 = "mindmap", detector_default3 = {
    id: id20,
    detector: __name((e) => /^\s*mindmap/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./mindmap-definition-VGOIOE7T-CC1_Vl0f.js");
      return {
        id: id20,
        diagram: e
      };
    }, "loader")
  }, id21 = "kanban", detector_default4 = {
    id: id21,
    detector: __name((e) => /^\s*kanban/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./kanban-definition-3W4ZIXB7-CPpiiiWk.js");
      return {
        id: id21,
        diagram: e
      };
    }, "loader")
  }, id22 = "sankey", sankeyDetector_default = {
    id: id22,
    detector: __name((e) => /^\s*sankey(-beta)?/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./sankeyDiagram-TZEHDZUN-D09PBJ-n.js");
      return {
        id: id22,
        diagram: e
      };
    }, "loader")
  }, id23 = "packet", packet = {
    id: id23,
    detector: __name((e) => /^\s*packet(-beta)?/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./diagram-S2PKOQOG-CtuW_ZuL.js");
      return {
        id: id23,
        diagram: e
      };
    }, "loader")
  }, id24 = "radar", radar = {
    id: id24,
    detector: __name((e) => /^\s*radar-beta/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./diagram-QEK2KX5R-DItl5Wns.js");
      return {
        id: id24,
        diagram: e
      };
    }, "loader")
  }, id25 = "block", blockDetector_default = {
    id: id25,
    detector: __name((e) => /^\s*block(-beta)?/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./blockDiagram-VD42YOAC-DGDaxR8I.js");
      return {
        id: id25,
        diagram: e
      };
    }, "loader")
  }, id26 = "architecture", architectureDetector_default = {
    id: id26,
    detector: __name((e) => /^\s*architecture/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./architectureDiagram-VXUJARFQ-CXVJxFhH.js");
      return {
        id: id26,
        diagram: e
      };
    }, "loader")
  }, id27 = "treemap", treemap = {
    id: id27,
    detector: __name((e) => /^\s*treemap/.test(e), "detector"),
    loader: __name(async () => {
      let { diagram: e } = await import("./diagram-PSM6KHXK-H66ATWP2.js");
      return {
        id: id27,
        diagram: e
      };
    }, "loader")
  }, hasLoadedDiagrams = false, addDiagrams = __name(() => {
    hasLoadedDiagrams || (hasLoadedDiagrams = true, registerDiagram("error", errorDiagram_default, (e) => e.toLowerCase().trim() === "error"), registerDiagram("---", {
      db: {
        clear: __name(() => {
        }, "clear")
      },
      styles: {},
      renderer: {
        draw: __name(() => {
        }, "draw")
      },
      parser: {
        parse: __name(() => {
          throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks");
        }, "parse")
      },
      init: __name(() => null, "init")
    }, (e) => e.toLowerCase().trimStart().startsWith("---")), registerLazyLoadedDiagrams(detector_default, detector_default3, architectureDetector_default), registerLazyLoadedDiagrams(c4Detector_default, detector_default4, classDetector_V2_default, classDetector_default, erDetector_default, ganttDetector_default, info, pie, requirementDetector_default, sequenceDetector_default, flowDetector_v2_default, flowDetector_default, detector_default2, gitGraphDetector_default, stateDetector_V2_default, stateDetector_default, journeyDetector_default, quadrantDetector_default, sankeyDetector_default, packet, xychartDetector_default, blockDetector_default, radar, treemap));
  }, "addDiagrams"), loadRegisteredDiagrams = __name(async () => {
    log.debug("Loading registered diagrams");
    let e = (await Promise.allSettled(Object.entries(detectors).map(async ([e2, { detector: S, loader: C }]) => {
      if (C) try {
        getDiagram(e2);
      } catch {
        try {
          let { diagram: e3, id: w } = await C();
          registerDiagram(w, e3, S);
        } catch (S2) {
          throw log.error(`Failed to load external diagram with key ${e2}. Removing from detectors.`), delete detectors[e2], S2;
        }
      }
    }))).filter((e2) => e2.status === "rejected");
    if (e.length > 0) {
      log.error(`Failed to load ${e.length} external diagrams`);
      for (let S of e) log.error(S);
      throw Error(`Failed to load ${e.length} external diagrams`);
    }
  }, "loadRegisteredDiagrams"), SVG_ROLE = "graphics-document document";
  function setA11yDiagramInfo(e, S) {
    e.attr("role", SVG_ROLE), S !== "" && e.attr("aria-roledescription", S);
  }
  __name(setA11yDiagramInfo, "setA11yDiagramInfo");
  function addSVGa11yTitleDescription(e, S, C, w) {
    if (e.insert !== void 0) {
      if (C) {
        let S2 = `chart-desc-${w}`;
        e.attr("aria-describedby", S2), e.insert("desc", ":first-child").attr("id", S2).text(C);
      }
      if (S) {
        let C2 = `chart-title-${w}`;
        e.attr("aria-labelledby", C2), e.insert("title", ":first-child").attr("id", C2).text(S);
      }
    }
  }
  __name(addSVGa11yTitleDescription, "addSVGa11yTitleDescription");
  var Diagram = (_a = class {
    constructor(e, S, C, w, T) {
      this.type = e, this.text = S, this.db = C, this.parser = w, this.renderer = T;
    }
    static async fromText(S, C = {}) {
      var _a2, _b;
      let w = getConfig(), T = detectType(S, w);
      S = encodeEntities(S) + "\n";
      try {
        getDiagram(T);
      } catch {
        let e = getDiagramLoader(T);
        if (!e) throw new UnknownDiagramError(`Diagram ${T} not found.`);
        let { id: S2, diagram: C2 } = await e();
        registerDiagram(S2, C2);
      }
      let { db: E, parser: D, renderer: O, init: k } = getDiagram(T);
      return D.parser && (D.parser.yy = E), (_a2 = E.clear) == null ? void 0 : _a2.call(E), k == null ? void 0 : k(w), C.title && ((_b = E.setDiagramTitle) == null ? void 0 : _b.call(E, C.title)), await D.parse(S), new _a(T, S, E, D, O);
    }
    async render(e, S) {
      await this.renderer.draw(this.text, e, S, this);
    }
    getParser() {
      return this.parser;
    }
    getType() {
      return this.type;
    }
  }, __name(_a, "Diagram"), _a), interactionFunctions = [], attachFunctions = __name(() => {
    interactionFunctions.forEach((e) => {
      e();
    }), interactionFunctions = [];
  }, "attachFunctions"), cleanupComments = __name((e) => e.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(), "cleanupComments");
  function extractFrontMatter(e) {
    let S = e.match(frontMatterRegex);
    if (!S) return {
      text: e,
      metadata: {}
    };
    let C = load(S[1], {
      schema: JSON_SCHEMA
    }) ?? {};
    C = typeof C == "object" && !Array.isArray(C) ? C : {};
    let w = {};
    return C.displayMode && (w.displayMode = C.displayMode.toString()), C.title && (w.title = C.title.toString()), C.config && (w.config = C.config), {
      text: e.slice(S[0].length),
      metadata: w
    };
  }
  __name(extractFrontMatter, "extractFrontMatter");
  var cleanupText = __name((e) => e.replace(/\r\n?/g, "\n").replace(/<(\w+)([^>]*)>/g, (e2, S, C) => "<" + S + C.replace(/="([^"]*)"/g, "='$1'") + ">"), "cleanupText"), processFrontmatter = __name((e) => {
    let { text: S, metadata: C } = extractFrontMatter(e), { displayMode: w, title: T, config: E = {} } = C;
    return w && (E.gantt || (E.gantt = {}), E.gantt.displayMode = w), {
      title: T,
      config: E,
      text: S
    };
  }, "processFrontmatter"), processDirectives = __name((e) => {
    let S = utils_default.detectInit(e) ?? {}, C = utils_default.detectDirective(e, "wrap");
    return Array.isArray(C) ? S.wrap = C.some(({ type: e2 }) => e2 === "wrap") : (C == null ? void 0 : C.type) === "wrap" && (S.wrap = true), {
      text: removeDirectives(e),
      directive: S
    };
  }, "processDirectives");
  function preprocessDiagram(e) {
    let S = processFrontmatter(cleanupText(e)), C = processDirectives(S.text), w = cleanAndMerge(S.config, C.directive);
    return e = cleanupComments(C.text), {
      code: e,
      title: S.title,
      config: w
    };
  }
  __name(preprocessDiagram, "preprocessDiagram");
  function toBase64(e) {
    let S = new TextEncoder().encode(e), C = Array.from(S, (e2) => String.fromCodePoint(e2)).join("");
    return btoa(C);
  }
  __name(toBase64, "toBase64");
  var MAX_TEXTLENGTH = 5e4, MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", SECURITY_LVL_SANDBOX = "sandbox", SECURITY_LVL_LOOSE = "loose", XMLNS_SVG_STD = "http://www.w3.org/2000/svg", XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink", XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml", IFRAME_WIDTH = "100%", IFRAME_HEIGHT = "100%", IFRAME_STYLES = "border:0;margin:0;", IFRAME_BODY_STYLE = "margin:0", IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups", IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.', DOMPURIFY_TAGS = [
    "foreignobject"
  ], DOMPURIFY_ATTR = [
    "dominant-baseline"
  ];
  function processAndSetConfigs(e) {
    let S = preprocessDiagram(e);
    return reset(), addDirective(S.config ?? {}), S;
  }
  __name(processAndSetConfigs, "processAndSetConfigs");
  async function parse(e, S) {
    addDiagrams();
    try {
      let { code: S2, config: C } = processAndSetConfigs(e);
      return {
        diagramType: (await getDiagramFromText(S2)).type,
        config: C
      };
    } catch (e2) {
      if (S == null ? void 0 : S.suppressErrors) return false;
      throw e2;
    }
  }
  __name(parse, "parse");
  var cssImportantStyles = __name((e, S, C = []) => `
.${e} ${S} { ${C.join(" !important; ")} !important; }`, "cssImportantStyles"), createCssStyles = __name((e, S = /* @__PURE__ */ new Map()) => {
    var _a2;
    let C = "";
    if (e.themeCSS !== void 0 && (C += `
${e.themeCSS}`), e.fontFamily !== void 0 && (C += `
:root { --mermaid-font-family: ${e.fontFamily}}`), e.altFontFamily !== void 0 && (C += `
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`), S instanceof Map) {
      let w = e.htmlLabels ?? ((_a2 = e.flowchart) == null ? void 0 : _a2.htmlLabels) ? [
        "> *",
        "span"
      ] : [
        "rect",
        "polygon",
        "ellipse",
        "circle",
        "path"
      ];
      S.forEach((e2) => {
        isEmpty_default(e2.styles) || w.forEach((S2) => {
          C += cssImportantStyles(e2.id, S2, e2.styles);
        }), isEmpty_default(e2.textStyles) || (C += cssImportantStyles(e2.id, "tspan", ((e2 == null ? void 0 : e2.textStyles) || []).map((e3) => e3.replace("color", "fill"))));
      });
    }
    return C;
  }, "createCssStyles"), createUserStyles = __name((e, S, C, w) => serialize(compile(`${w}{${styles_default(S, createCssStyles(e, C), e.themeVariables)}}`), stringify), "createUserStyles"), cleanUpSvgCode = __name((e = "", S, C) => {
    let w = e;
    return !C && !S && (w = w.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g, 'marker-end="url(#')), w = decodeEntities(w), w = w.replace(/<br>/g, "<br/>"), w;
  }, "cleanUpSvgCode"), putIntoIFrame = __name((e = "", S) => {
    var _a2, _b;
    return `<iframe style="width:${IFRAME_WIDTH};height:${((_b = (_a2 = S == null ? void 0 : S.viewBox) == null ? void 0 : _a2.baseVal) == null ? void 0 : _b.height) ? S.viewBox.baseVal.height + "px" : IFRAME_HEIGHT};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${toBase64(`<body style="${IFRAME_BODY_STYLE}">${e}</body>`)}" sandbox="${IFRAME_SANDBOX_OPTS}">
  ${IFRAME_NOT_SUPPORTED_MSG}
</iframe>`;
  }, "putIntoIFrame"), appendDivSvgG = __name((e, S, C, w, T) => {
    let E = e.append("div");
    E.attr("id", C), w && E.attr("style", w);
    let D = E.append("svg").attr("id", S).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
    return T && D.attr("xmlns:xlink", T), D.append("g"), e;
  }, "appendDivSvgG");
  function sandboxedIframe(e, S) {
    return e.append("iframe").attr("id", S).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
  }
  __name(sandboxedIframe, "sandboxedIframe");
  var removeExistingElements = __name((e, S, C, w) => {
    var _a2, _b, _c;
    (_a2 = e.getElementById(S)) == null ? void 0 : _a2.remove(), (_b = e.getElementById(C)) == null ? void 0 : _b.remove(), (_c = e.getElementById(w)) == null ? void 0 : _c.remove();
  }, "removeExistingElements"), render = __name(async function(e, S, C) {
    var _a2, _b, _c, _d, _e, _f;
    addDiagrams();
    let w = processAndSetConfigs(S);
    S = w.code;
    let T = getConfig();
    log.debug(T), S.length > ((T == null ? void 0 : T.maxTextSize) ?? MAX_TEXTLENGTH) && (S = MAX_TEXTLENGTH_EXCEEDED_MSG);
    let E = "#" + e, D = "i" + e, O = "#" + D, A = "d" + e, j = "#" + A, M = __name(() => {
      let e2 = select_default(P ? O : j).node();
      e2 && "remove" in e2 && e2.remove();
    }, "removeTempElements"), N = select_default("body"), P = T.securityLevel === SECURITY_LVL_SANDBOX, F = T.securityLevel === SECURITY_LVL_LOOSE, I = T.fontFamily;
    C === void 0 ? (removeExistingElements(document, e, A, D), P ? (N = select_default(sandboxedIframe(select_default("body"), D).nodes()[0].contentDocument.body), N.node().style.margin = 0) : N = select_default("body"), appendDivSvgG(N, e, A)) : (C && (C.innerHTML = ""), P ? (N = select_default(sandboxedIframe(select_default(C), D).nodes()[0].contentDocument.body), N.node().style.margin = 0) : N = select_default(C), appendDivSvgG(N, e, A, `font-family: ${I}`, XMLNS_XLINK_STD));
    let L, H;
    try {
      L = await Diagram.fromText(S, {
        title: w.title
      });
    } catch (e2) {
      if (T.suppressErrorRendering) throw M(), e2;
      L = await Diagram.fromText("error"), H = e2;
    }
    let U = N.select(j).node(), W = L.type, G = U.firstChild, K = G.firstChild, q = (_b = (_a2 = L.renderer).getClasses) == null ? void 0 : _b.call(_a2, S, L), J = createUserStyles(T, W, q, E), Y = document.createElement("style");
    Y.innerHTML = J, G.insertBefore(Y, K);
    try {
      await L.renderer.draw(S, e, package_default.version, L);
    } catch (C2) {
      throw T.suppressErrorRendering ? M() : errorRenderer_default.draw(S, e, package_default.version), C2;
    }
    let X = N.select(`${j} svg`), Z = (_d = (_c = L.db).getAccTitle) == null ? void 0 : _d.call(_c), Q = (_f = (_e = L.db).getAccDescription) == null ? void 0 : _f.call(_e);
    addA11yInfo(W, X, Z, Q), N.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
    let $ = N.select(j).node().innerHTML;
    if (log.debug("config.arrowMarkerAbsolute", T.arrowMarkerAbsolute), $ = cleanUpSvgCode($, P, evaluate(T.arrowMarkerAbsolute)), P) {
      let e2 = N.select(j + " svg").node();
      $ = putIntoIFrame($, e2);
    } else F || ($ = purify.sanitize($, {
      ADD_TAGS: DOMPURIFY_TAGS,
      ADD_ATTR: DOMPURIFY_ATTR,
      HTML_INTEGRATION_POINTS: {
        foreignobject: true
      }
    }));
    if (attachFunctions(), H) throw H;
    return M(), {
      diagramType: W,
      svg: $,
      bindFunctions: L.db.bindFunctions
    };
  }, "render");
  function initialize(e = {}) {
    var _a2;
    let S = assignWithDepth_default({}, e);
    (S == null ? void 0 : S.fontFamily) && !((_a2 = S.themeVariables) == null ? void 0 : _a2.fontFamily) && (S.themeVariables || (S.themeVariables = {}), S.themeVariables.fontFamily = S.fontFamily), saveConfigFromInitialize(S), (S == null ? void 0 : S.theme) && S.theme in themes_default ? S.themeVariables = themes_default[S.theme].getThemeVariables(S.themeVariables) : S && (S.themeVariables = themes_default.default.getThemeVariables(S.themeVariables)), setLogLevel((typeof S == "object" ? setSiteConfig(S) : getSiteConfig()).logLevel), addDiagrams();
  }
  __name(initialize, "initialize");
  var getDiagramFromText = __name((e, S = {}) => {
    let { code: C } = preprocessDiagram(e);
    return Diagram.fromText(C, S);
  }, "getDiagramFromText");
  function addA11yInfo(e, S, C, w) {
    setA11yDiagramInfo(S, e), addSVGa11yTitleDescription(S, C, w, S.attr("id"));
  }
  __name(addA11yInfo, "addA11yInfo");
  var mermaidAPI = Object.freeze({
    render,
    parse,
    getDiagramFromText,
    initialize,
    getConfig,
    setConfig,
    getSiteConfig,
    updateSiteConfig,
    reset: __name(() => {
      reset();
    }, "reset"),
    globalReset: __name(() => {
      reset(defaultConfig);
    }, "globalReset"),
    defaultConfig
  });
  setLogLevel(getConfig().logLevel), reset(getConfig());
  var handleError = __name((e, S, C) => {
    log.warn(e), isDetailedError(e) ? (C && C(e.str, e.hash), S.push({
      ...e,
      message: e.str,
      error: e
    })) : (C && C(e), e instanceof Error && S.push({
      str: e.message,
      message: e.message,
      hash: e.name,
      error: e
    }));
  }, "handleError"), run = __name(async function(e = {
    querySelector: ".mermaid"
  }) {
    try {
      await runThrowsErrors(e);
    } catch (S) {
      if (isDetailedError(S) && log.error(S.str), mermaid.parseError && mermaid.parseError(S), !e.suppressErrors) throw log.error("Use the suppressErrors option to suppress these errors"), S;
    }
  }, "run"), runThrowsErrors = __name(async function({ postRenderCallback: e, querySelector: S, nodes: C } = {
    querySelector: ".mermaid"
  }) {
    let w = mermaidAPI.getConfig();
    log.debug(`${e ? "" : "No "}Callback function found`);
    let T;
    if (C) T = C;
    else if (S) T = document.querySelectorAll(S);
    else throw Error("Nodes and querySelector are both undefined");
    log.debug(`Found ${T.length} diagrams`), (w == null ? void 0 : w.startOnLoad) !== void 0 && (log.debug("Start On Load: " + (w == null ? void 0 : w.startOnLoad)), mermaidAPI.updateSiteConfig({
      startOnLoad: w == null ? void 0 : w.startOnLoad
    }));
    let E = new utils_default.InitIDGenerator(w.deterministicIds, w.deterministicIDSeed), D, O = [];
    for (let S2 of Array.from(T)) {
      if (log.info("Rendering diagram: " + S2.id), S2.getAttribute("data-processed")) continue;
      S2.setAttribute("data-processed", "true");
      let C2 = `mermaid-${E.next()}`;
      D = S2.innerHTML, D = dedent(utils_default.entityDecode(D)).trim().replace(/<br\s*\/?>/gi, "<br/>");
      let w2 = utils_default.detectInit(D);
      w2 && log.debug("Detected early reinit: ", w2);
      try {
        let { svg: w3, bindFunctions: T2 } = await render2(C2, D, S2);
        S2.innerHTML = w3, e && await e(C2), T2 && T2(S2);
      } catch (e2) {
        handleError(e2, O, mermaid.parseError);
      }
    }
    if (O.length > 0) throw O[0];
  }, "runThrowsErrors"), initialize2 = __name(function(e) {
    mermaidAPI.initialize(e);
  }, "initialize"), init = __name(async function(e, S, C) {
    log.warn("mermaid.init is deprecated. Please use run instead."), e && initialize2(e);
    let w = {
      postRenderCallback: C,
      querySelector: ".mermaid"
    };
    typeof S == "string" ? w.querySelector = S : S && (S instanceof HTMLElement ? w.nodes = [
      S
    ] : w.nodes = S), await run(w);
  }, "init"), registerExternalDiagrams = __name(async (e, { lazyLoad: S = true } = {}) => {
    addDiagrams(), registerLazyLoadedDiagrams(...e), S === false && await loadRegisteredDiagrams();
  }, "registerExternalDiagrams"), contentLoaded = __name(function() {
    if (mermaid.startOnLoad) {
      let { startOnLoad: e } = mermaidAPI.getConfig();
      e && mermaid.run().catch((e2) => log.error("Mermaid failed to initialize", e2));
    }
  }, "contentLoaded");
  typeof document < "u" && window.addEventListener("load", contentLoaded, false);
  var setParseErrorHandler = __name(function(e) {
    mermaid.parseError = e;
  }, "setParseErrorHandler"), executionQueue = [], executionQueueRunning = false, executeQueue = __name(async () => {
    if (!executionQueueRunning) {
      for (executionQueueRunning = true; executionQueue.length > 0; ) {
        let e = executionQueue.shift();
        if (e) try {
          await e();
        } catch (e2) {
          log.error("Error executing queue", e2);
        }
      }
      executionQueueRunning = false;
    }
  }, "executeQueue"), parse2 = __name(async (e, S) => new Promise((C, w) => {
    let T = __name(() => new Promise((T2, E) => {
      mermaidAPI.parse(e, S).then((e2) => {
        T2(e2), C(e2);
      }, (e2) => {
        var _a2;
        log.error("Error parsing", e2), (_a2 = mermaid.parseError) == null ? void 0 : _a2.call(mermaid, e2), E(e2), w(e2);
      });
    }), "performCall");
    executionQueue.push(T), executeQueue().catch(w);
  }), "parse"), render2 = __name((e, S, C) => new Promise((w, T) => {
    let E = __name(() => new Promise((E2, D) => {
      mermaidAPI.render(e, S, C).then((e2) => {
        E2(e2), w(e2);
      }, (e2) => {
        var _a2;
        log.error("Error parsing", e2), (_a2 = mermaid.parseError) == null ? void 0 : _a2.call(mermaid, e2), D(e2), T(e2);
      });
    }), "performCall");
    executionQueue.push(E), executeQueue().catch(T);
  }), "render"), mermaid = {
    startOnLoad: true,
    mermaidAPI,
    parse: parse2,
    render: render2,
    init,
    run,
    registerExternalDiagrams,
    registerLayoutLoaders,
    initialize: initialize2,
    parseError: void 0,
    contentLoaded,
    setParseErrorHandler,
    detectType,
    registerIconPacks,
    getRegisteredDiagramsMetadata: __name(() => Object.keys(detectors).map((e) => ({
      id: e
    })), "getRegisteredDiagramsMetadata")
  }, mermaid_default$1 = mermaid, import_react = __toESM(require_react(), 1), import_jsx_runtime = __toESM(require_jsx_runtime(), 1), DEFAULT_CONFIG = {
    startOnLoad: true,
    theme: "forest",
    logLevel: "fatal",
    securityLevel: "strict",
    fontFamily: "var(--text-font)",
    arrowMarkerAbsolute: false,
    flowchart: {
      htmlLabels: true,
      curve: "linear"
    },
    sequence: {
      diagramMarginX: 50,
      diagramMarginY: 10,
      actorMargin: 50,
      width: 150,
      height: 65,
      boxMargin: 10,
      boxTextMargin: 5,
      noteMargin: 10,
      messageMargin: 35,
      mirrorActors: true,
      bottomMarginAdj: 1,
      useMaxWidth: true,
      rightAngles: false,
      showSequenceNumbers: false
    },
    gantt: {
      titleTopMargin: 25,
      barHeight: 20,
      barGap: 4,
      topPadding: 50,
      leftPadding: 75,
      gridLineStartPadding: 35,
      fontSize: 11,
      numberSectionStyles: 4,
      axisFormat: "%Y-%m-%d"
    }
  };
  function randomAlpha() {
    return Array.from({
      length: 6
    }, () => "abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random() * 26)]).join("");
  }
  mermaid_default = (e) => {
    let C = (0, import_compiler_runtime.c)(15), { diagram: w, theme: T, themeVariables: D } = e, [k] = (0, import_react.useState)(_temp), j = useTheme().theme === "dark", M = T ?? (j ? "dark" : "forest");
    mermaid_default$1.initialize({
      ...DEFAULT_CONFIG,
      theme: M,
      themeVariables: D,
      darkMode: j
    });
    let N;
    C[0] === w ? N = C[1] : (N = w.trim(), C[0] = w, C[1] = N);
    let P = N, F;
    C[2] !== k || C[3] !== P ? (F = async () => (await mermaid_default$1.render(k, P, void 0).catch((e2) => {
      var _a2;
      throw (_a2 = document.getElementById(k)) == null ? void 0 : _a2.remove(), Logger.warn("Failed to render mermaid diagram", e2), e2;
    })).svg, C[2] = k, C[3] = P, C[4] = F) : F = C[4];
    let I;
    C[5] !== j || C[6] !== k || C[7] !== M || C[8] !== D || C[9] !== P ? (I = [
      P,
      k,
      j,
      M,
      D
    ], C[5] = j, C[6] = k, C[7] = M, C[8] = D, C[9] = P, C[10] = I) : I = C[10];
    let { data: L, error: R } = useAsyncData(F, I);
    if (R) {
      let e2;
      return C[11] === R ? e2 = C[12] : (e2 = (0, import_jsx_runtime.jsx)(ErrorBanner, {
        error: R
      }), C[11] = R, C[12] = e2), e2;
    }
    if (!L) return null;
    let z;
    return C[13] === L ? z = C[14] : (z = (0, import_jsx_runtime.jsx)("div", {
      dangerouslySetInnerHTML: {
        __html: L
      }
    }), C[13] = L, C[14] = z), z;
  };
  function _temp() {
    return randomAlpha();
  }
});
export {
  __tla,
  mermaid_default as default
};
