var t1 = Object.defineProperty;
var n1 = (a, n, s) => n in a ? t1(a, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[n] = s;
var He = (a, n, s) => (n1(a, typeof n != "symbol" ? n + "" : n, s), s), r1 = (a, n, s) => {
  if (!n.has(a))
    throw TypeError("Cannot " + s);
};
var ms = (a, n, s) => {
  if (n.has(a))
    throw TypeError("Cannot add the same private member more than once");
  n instanceof WeakSet ? n.add(a) : n.set(a, s);
};
var rr = (a, n, s) => (r1(a, n, "access private method"), s);
const s1 = [
  { color: "red", primary: 600, secondary: 100 },
  { color: "green", primary: 600, secondary: 100 },
  { color: "blue", primary: 600, secondary: 100 },
  { color: "yellow", primary: 500, secondary: 100 },
  { color: "purple", primary: 600, secondary: 100 },
  { color: "teal", primary: 600, secondary: 100 },
  { color: "orange", primary: 600, secondary: 100 },
  { color: "cyan", primary: 600, secondary: 100 },
  { color: "lime", primary: 500, secondary: 100 },
  { color: "pink", primary: 600, secondary: 100 }
], wl = {
  inherit: "inherit",
  current: "currentColor",
  transparent: "transparent",
  black: "#000",
  white: "#fff",
  slate: {
    50: "#f8fafc",
    100: "#f1f5f9",
    200: "#e2e8f0",
    300: "#cbd5e1",
    400: "#94a3b8",
    500: "#64748b",
    600: "#475569",
    700: "#334155",
    800: "#1e293b",
    900: "#0f172a",
    950: "#020617"
  },
  gray: {
    50: "#f9fafb",
    100: "#f3f4f6",
    200: "#e5e7eb",
    300: "#d1d5db",
    400: "#9ca3af",
    500: "#6b7280",
    600: "#4b5563",
    700: "#374151",
    800: "#1f2937",
    900: "#111827",
    950: "#030712"
  },
  zinc: {
    50: "#fafafa",
    100: "#f4f4f5",
    200: "#e4e4e7",
    300: "#d4d4d8",
    400: "#a1a1aa",
    500: "#71717a",
    600: "#52525b",
    700: "#3f3f46",
    800: "#27272a",
    900: "#18181b",
    950: "#09090b"
  },
  neutral: {
    50: "#fafafa",
    100: "#f5f5f5",
    200: "#e5e5e5",
    300: "#d4d4d4",
    400: "#a3a3a3",
    500: "#737373",
    600: "#525252",
    700: "#404040",
    800: "#262626",
    900: "#171717",
    950: "#0a0a0a"
  },
  stone: {
    50: "#fafaf9",
    100: "#f5f5f4",
    200: "#e7e5e4",
    300: "#d6d3d1",
    400: "#a8a29e",
    500: "#78716c",
    600: "#57534e",
    700: "#44403c",
    800: "#292524",
    900: "#1c1917",
    950: "#0c0a09"
  },
  red: {
    50: "#fef2f2",
    100: "#fee2e2",
    200: "#fecaca",
    300: "#fca5a5",
    400: "#f87171",
    500: "#ef4444",
    600: "#dc2626",
    700: "#b91c1c",
    800: "#991b1b",
    900: "#7f1d1d",
    950: "#450a0a"
  },
  orange: {
    50: "#fff7ed",
    100: "#ffedd5",
    200: "#fed7aa",
    300: "#fdba74",
    400: "#fb923c",
    500: "#f97316",
    600: "#ea580c",
    700: "#c2410c",
    800: "#9a3412",
    900: "#7c2d12",
    950: "#431407"
  },
  amber: {
    50: "#fffbeb",
    100: "#fef3c7",
    200: "#fde68a",
    300: "#fcd34d",
    400: "#fbbf24",
    500: "#f59e0b",
    600: "#d97706",
    700: "#b45309",
    800: "#92400e",
    900: "#78350f",
    950: "#451a03"
  },
  yellow: {
    50: "#fefce8",
    100: "#fef9c3",
    200: "#fef08a",
    300: "#fde047",
    400: "#facc15",
    500: "#eab308",
    600: "#ca8a04",
    700: "#a16207",
    800: "#854d0e",
    900: "#713f12",
    950: "#422006"
  },
  lime: {
    50: "#f7fee7",
    100: "#ecfccb",
    200: "#d9f99d",
    300: "#bef264",
    400: "#a3e635",
    500: "#84cc16",
    600: "#65a30d",
    700: "#4d7c0f",
    800: "#3f6212",
    900: "#365314",
    950: "#1a2e05"
  },
  green: {
    50: "#f0fdf4",
    100: "#dcfce7",
    200: "#bbf7d0",
    300: "#86efac",
    400: "#4ade80",
    500: "#22c55e",
    600: "#16a34a",
    700: "#15803d",
    800: "#166534",
    900: "#14532d",
    950: "#052e16"
  },
  emerald: {
    50: "#ecfdf5",
    100: "#d1fae5",
    200: "#a7f3d0",
    300: "#6ee7b7",
    400: "#34d399",
    500: "#10b981",
    600: "#059669",
    700: "#047857",
    800: "#065f46",
    900: "#064e3b",
    950: "#022c22"
  },
  teal: {
    50: "#f0fdfa",
    100: "#ccfbf1",
    200: "#99f6e4",
    300: "#5eead4",
    400: "#2dd4bf",
    500: "#14b8a6",
    600: "#0d9488",
    700: "#0f766e",
    800: "#115e59",
    900: "#134e4a",
    950: "#042f2e"
  },
  cyan: {
    50: "#ecfeff",
    100: "#cffafe",
    200: "#a5f3fc",
    300: "#67e8f9",
    400: "#22d3ee",
    500: "#06b6d4",
    600: "#0891b2",
    700: "#0e7490",
    800: "#155e75",
    900: "#164e63",
    950: "#083344"
  },
  sky: {
    50: "#f0f9ff",
    100: "#e0f2fe",
    200: "#bae6fd",
    300: "#7dd3fc",
    400: "#38bdf8",
    500: "#0ea5e9",
    600: "#0284c7",
    700: "#0369a1",
    800: "#075985",
    900: "#0c4a6e",
    950: "#082f49"
  },
  blue: {
    50: "#eff6ff",
    100: "#dbeafe",
    200: "#bfdbfe",
    300: "#93c5fd",
    400: "#60a5fa",
    500: "#3b82f6",
    600: "#2563eb",
    700: "#1d4ed8",
    800: "#1e40af",
    900: "#1e3a8a",
    950: "#172554"
  },
  indigo: {
    50: "#eef2ff",
    100: "#e0e7ff",
    200: "#c7d2fe",
    300: "#a5b4fc",
    400: "#818cf8",
    500: "#6366f1",
    600: "#4f46e5",
    700: "#4338ca",
    800: "#3730a3",
    900: "#312e81",
    950: "#1e1b4b"
  },
  violet: {
    50: "#f5f3ff",
    100: "#ede9fe",
    200: "#ddd6fe",
    300: "#c4b5fd",
    400: "#a78bfa",
    500: "#8b5cf6",
    600: "#7c3aed",
    700: "#6d28d9",
    800: "#5b21b6",
    900: "#4c1d95",
    950: "#2e1065"
  },
  purple: {
    50: "#faf5ff",
    100: "#f3e8ff",
    200: "#e9d5ff",
    300: "#d8b4fe",
    400: "#c084fc",
    500: "#a855f7",
    600: "#9333ea",
    700: "#7e22ce",
    800: "#6b21a8",
    900: "#581c87",
    950: "#3b0764"
  },
  fuchsia: {
    50: "#fdf4ff",
    100: "#fae8ff",
    200: "#f5d0fe",
    300: "#f0abfc",
    400: "#e879f9",
    500: "#d946ef",
    600: "#c026d3",
    700: "#a21caf",
    800: "#86198f",
    900: "#701a75",
    950: "#4a044e"
  },
  pink: {
    50: "#fdf2f8",
    100: "#fce7f3",
    200: "#fbcfe8",
    300: "#f9a8d4",
    400: "#f472b6",
    500: "#ec4899",
    600: "#db2777",
    700: "#be185d",
    800: "#9d174d",
    900: "#831843",
    950: "#500724"
  },
  rose: {
    50: "#fff1f2",
    100: "#ffe4e6",
    200: "#fecdd3",
    300: "#fda4af",
    400: "#fb7185",
    500: "#f43f5e",
    600: "#e11d48",
    700: "#be123c",
    800: "#9f1239",
    900: "#881337",
    950: "#4c0519"
  }
};
s1.reduce(
  (a, { color: n, primary: s, secondary: i }) => ({
    ...a,
    [n]: {
      primary: wl[n][s],
      secondary: wl[n][i]
    }
  }),
  {}
);
class pr extends Error {
  constructor(n) {
    super(n), this.name = "ShareError";
  }
}
async function _l(a, n) {
  var g;
  if (window.__gradio_space__ == null)
    throw new pr("Must be on Spaces to share.");
  let s, i, o;
  {
    const _ = await fetch(a);
    s = await _.blob(), i = _.headers.get("content-type") || "", o = _.headers.get("content-disposition") || "";
  }
  const u = new File([s], o, { type: i }), f = await fetch("https://huggingface.co/uploads", {
    method: "POST",
    body: u,
    headers: {
      "Content-Type": u.type,
      "X-Requested-With": "XMLHttpRequest"
    }
  });
  if (!f.ok) {
    if ((g = f.headers.get("content-type")) != null && g.includes("application/json")) {
      const _ = await f.json();
      throw new pr(`Upload failed: ${_.error}`);
    }
    throw new pr("Upload failed.");
  }
  return await f.text();
}
function i1(a) {
  a.addEventListener("click", n);
  async function n(s) {
    const i = s.composedPath(), [o] = i.filter(
      (u) => (u == null ? void 0 : u.tagName) === "BUTTON" && u.classList.contains("copy_code_button")
    );
    if (o) {
      let u = function(_) {
        _.style.opacity = "1", setTimeout(() => {
          _.style.opacity = "0";
        }, 2e3);
      };
      s.stopImmediatePropagation();
      const f = o.parentElement.innerText.trim(), p = Array.from(
        o.children
      )[1];
      await l1(f) && u(p);
    }
  }
  return {
    destroy() {
      a.removeEventListener("click", n);
    }
  };
}
async function l1(a) {
  let n = !1;
  if ("clipboard" in navigator)
    await navigator.clipboard.writeText(a), n = !0;
  else {
    const s = document.createElement("textarea");
    s.value = a, s.style.position = "absolute", s.style.left = "-999999px", document.body.prepend(s), s.select();
    try {
      document.execCommand("copy"), n = !0;
    } catch (i) {
      console.error(i), n = !1;
    } finally {
      s.remove();
    }
  }
  return n;
}
const a1 = async (a) => (await Promise.all(a.map(async (s) => await Promise.all(s.map(async (i, o) => {
  var p, g, _;
  if (i === null)
    return "";
  let u = o === 0 ? "😃" : "🤖", f = "";
  if (typeof i == "string") {
    const k = {
      audio: /<audio.*?src="(\/file=.*?)"/g,
      video: /<video.*?src="(\/file=.*?)"/g,
      image: /<img.*?src="(\/file=.*?)".*?\/>|!\[.*?\]\((\/file=.*?)\)/g
    };
    f = i;
    for (let [T, B] of Object.entries(k)) {
      let P;
      for (; (P = B.exec(i)) !== null; ) {
        const W = P[1] || P[2], j = await _l(W);
        f = f.replace(W, j);
      }
    }
  } else {
    if (!(i != null && i.url))
      return "";
    const k = await _l(i.url);
    (p = i.mime_type) != null && p.includes("audio") ? f = `<audio controls src="${k}"></audio>` : (g = i.mime_type) != null && g.includes("video") ? f = k : (_ = i.mime_type) != null && _.includes("image") && (f = `<img src="${k}" />`);
  }
  return `${u}: ${f}`;
}))))).map((s) => s.join(s[0] !== "" && s[1] !== "" ? `
` : "")).join(`
`);
var yl = Object.prototype.hasOwnProperty;
function Ns(a, n) {
  var s, i;
  if (a === n)
    return !0;
  if (a && n && (s = a.constructor) === n.constructor) {
    if (s === Date)
      return a.getTime() === n.getTime();
    if (s === RegExp)
      return a.toString() === n.toString();
    if (s === Array) {
      if ((i = a.length) === n.length)
        for (; i-- && Ns(a[i], n[i]); )
          ;
      return i === -1;
    }
    if (!s || typeof a == "object") {
      i = 0;
      for (s in a)
        if (yl.call(a, s) && ++i && !yl.call(n, s) || !(s in n) || !Ns(a[s], n[s]))
          return !1;
      return Object.keys(n).length === i;
    }
  }
  return a !== a && n !== n;
}
const {
  SvelteComponent: o1,
  assign: u1,
  create_slot: c1,
  detach: h1,
  element: f1,
  get_all_dirty_from_scope: d1,
  get_slot_changes: m1,
  get_spread_update: p1,
  init: g1,
  insert: b1,
  safe_not_equal: w1,
  set_dynamic_element_data: kl,
  set_style: Ct,
  toggle_class: o0,
  transition_in: eo,
  transition_out: to,
  update_slot_base: _1
} = window.__gradio__svelte__internal;
function y1(a) {
  let n, s, i;
  const o = (
    /*#slots*/
    a[18].default
  ), u = c1(
    o,
    a,
    /*$$scope*/
    a[17],
    null
  );
  let f = [
    { "data-testid": (
      /*test_id*/
      a[7]
    ) },
    { id: (
      /*elem_id*/
      a[2]
    ) },
    {
      class: s = "block " + /*elem_classes*/
      a[3].join(" ") + " svelte-nl1om8"
    }
  ], p = {};
  for (let g = 0; g < f.length; g += 1)
    p = u1(p, f[g]);
  return {
    c() {
      n = f1(
        /*tag*/
        a[14]
      ), u && u.c(), kl(
        /*tag*/
        a[14]
      )(n, p), o0(
        n,
        "hidden",
        /*visible*/
        a[10] === !1
      ), o0(
        n,
        "padded",
        /*padding*/
        a[6]
      ), o0(
        n,
        "border_focus",
        /*border_mode*/
        a[5] === "focus"
      ), o0(
        n,
        "border_contrast",
        /*border_mode*/
        a[5] === "contrast"
      ), o0(n, "hide-container", !/*explicit_call*/
      a[8] && !/*container*/
      a[9]), Ct(
        n,
        "height",
        /*get_dimension*/
        a[15](
          /*height*/
          a[0]
        )
      ), Ct(n, "width", typeof /*width*/
      a[1] == "number" ? `calc(min(${/*width*/
      a[1]}px, 100%))` : (
        /*get_dimension*/
        a[15](
          /*width*/
          a[1]
        )
      )), Ct(
        n,
        "border-style",
        /*variant*/
        a[4]
      ), Ct(
        n,
        "overflow",
        /*allow_overflow*/
        a[11] ? "visible" : "hidden"
      ), Ct(
        n,
        "flex-grow",
        /*scale*/
        a[12]
      ), Ct(n, "min-width", `calc(min(${/*min_width*/
      a[13]}px, 100%))`), Ct(n, "border-width", "var(--block-border-width)");
    },
    m(g, _) {
      b1(g, n, _), u && u.m(n, null), i = !0;
    },
    p(g, _) {
      u && u.p && (!i || _ & /*$$scope*/
      131072) && _1(
        u,
        o,
        g,
        /*$$scope*/
        g[17],
        i ? m1(
          o,
          /*$$scope*/
          g[17],
          _,
          null
        ) : d1(
          /*$$scope*/
          g[17]
        ),
        null
      ), kl(
        /*tag*/
        g[14]
      )(n, p = p1(f, [
        (!i || _ & /*test_id*/
        128) && { "data-testid": (
          /*test_id*/
          g[7]
        ) },
        (!i || _ & /*elem_id*/
        4) && { id: (
          /*elem_id*/
          g[2]
        ) },
        (!i || _ & /*elem_classes*/
        8 && s !== (s = "block " + /*elem_classes*/
        g[3].join(" ") + " svelte-nl1om8")) && { class: s }
      ])), o0(
        n,
        "hidden",
        /*visible*/
        g[10] === !1
      ), o0(
        n,
        "padded",
        /*padding*/
        g[6]
      ), o0(
        n,
        "border_focus",
        /*border_mode*/
        g[5] === "focus"
      ), o0(
        n,
        "border_contrast",
        /*border_mode*/
        g[5] === "contrast"
      ), o0(n, "hide-container", !/*explicit_call*/
      g[8] && !/*container*/
      g[9]), _ & /*height*/
      1 && Ct(
        n,
        "height",
        /*get_dimension*/
        g[15](
          /*height*/
          g[0]
        )
      ), _ & /*width*/
      2 && Ct(n, "width", typeof /*width*/
      g[1] == "number" ? `calc(min(${/*width*/
      g[1]}px, 100%))` : (
        /*get_dimension*/
        g[15](
          /*width*/
          g[1]
        )
      )), _ & /*variant*/
      16 && Ct(
        n,
        "border-style",
        /*variant*/
        g[4]
      ), _ & /*allow_overflow*/
      2048 && Ct(
        n,
        "overflow",
        /*allow_overflow*/
        g[11] ? "visible" : "hidden"
      ), _ & /*scale*/
      4096 && Ct(
        n,
        "flex-grow",
        /*scale*/
        g[12]
      ), _ & /*min_width*/
      8192 && Ct(n, "min-width", `calc(min(${/*min_width*/
      g[13]}px, 100%))`);
    },
    i(g) {
      i || (eo(u, g), i = !0);
    },
    o(g) {
      to(u, g), i = !1;
    },
    d(g) {
      g && h1(n), u && u.d(g);
    }
  };
}
function k1(a) {
  let n, s = (
    /*tag*/
    a[14] && y1(a)
  );
  return {
    c() {
      s && s.c();
    },
    m(i, o) {
      s && s.m(i, o), n = !0;
    },
    p(i, [o]) {
      /*tag*/
      i[14] && s.p(i, o);
    },
    i(i) {
      n || (eo(s, i), n = !0);
    },
    o(i) {
      to(s, i), n = !1;
    },
    d(i) {
      s && s.d(i);
    }
  };
}
function D1(a, n, s) {
  let { $$slots: i = {}, $$scope: o } = n, { height: u = void 0 } = n, { width: f = void 0 } = n, { elem_id: p = "" } = n, { elem_classes: g = [] } = n, { variant: _ = "solid" } = n, { border_mode: k = "base" } = n, { padding: T = !0 } = n, { type: B = "normal" } = n, { test_id: P = void 0 } = n, { explicit_call: W = !1 } = n, { container: j = !0 } = n, { visible: G = !0 } = n, { allow_overflow: U = !0 } = n, { scale: A = null } = n, { min_width: S = 0 } = n, M = B === "fieldset" ? "fieldset" : "div";
  const I = (O) => {
    if (O !== void 0) {
      if (typeof O == "number")
        return O + "px";
      if (typeof O == "string")
        return O;
    }
  };
  return a.$$set = (O) => {
    "height" in O && s(0, u = O.height), "width" in O && s(1, f = O.width), "elem_id" in O && s(2, p = O.elem_id), "elem_classes" in O && s(3, g = O.elem_classes), "variant" in O && s(4, _ = O.variant), "border_mode" in O && s(5, k = O.border_mode), "padding" in O && s(6, T = O.padding), "type" in O && s(16, B = O.type), "test_id" in O && s(7, P = O.test_id), "explicit_call" in O && s(8, W = O.explicit_call), "container" in O && s(9, j = O.container), "visible" in O && s(10, G = O.visible), "allow_overflow" in O && s(11, U = O.allow_overflow), "scale" in O && s(12, A = O.scale), "min_width" in O && s(13, S = O.min_width), "$$scope" in O && s(17, o = O.$$scope);
  }, [
    u,
    f,
    p,
    g,
    _,
    k,
    T,
    P,
    W,
    j,
    G,
    U,
    A,
    S,
    M,
    I,
    B,
    o,
    i
  ];
}
class x1 extends o1 {
  constructor(n) {
    super(), g1(this, n, D1, k1, w1, {
      height: 0,
      width: 1,
      elem_id: 2,
      elem_classes: 3,
      variant: 4,
      border_mode: 5,
      padding: 6,
      type: 16,
      test_id: 7,
      explicit_call: 8,
      container: 9,
      visible: 10,
      allow_overflow: 11,
      scale: 12,
      min_width: 13
    });
  }
}
const {
  SvelteComponent: v1,
  append: ps,
  attr: sr,
  create_component: A1,
  destroy_component: S1,
  detach: E1,
  element: Dl,
  init: F1,
  insert: T1,
  mount_component: C1,
  safe_not_equal: M1,
  set_data: z1,
  space: B1,
  text: N1,
  toggle_class: B0,
  transition_in: R1,
  transition_out: I1
} = window.__gradio__svelte__internal;
function L1(a) {
  let n, s, i, o, u, f;
  return i = new /*Icon*/
  a[1]({}), {
    c() {
      n = Dl("label"), s = Dl("span"), A1(i.$$.fragment), o = B1(), u = N1(
        /*label*/
        a[0]
      ), sr(s, "class", "svelte-9gxdi0"), sr(n, "for", ""), sr(n, "data-testid", "block-label"), sr(n, "class", "svelte-9gxdi0"), B0(n, "hide", !/*show_label*/
      a[2]), B0(n, "sr-only", !/*show_label*/
      a[2]), B0(
        n,
        "float",
        /*float*/
        a[4]
      ), B0(
        n,
        "hide-label",
        /*disable*/
        a[3]
      );
    },
    m(p, g) {
      T1(p, n, g), ps(n, s), C1(i, s, null), ps(n, o), ps(n, u), f = !0;
    },
    p(p, [g]) {
      (!f || g & /*label*/
      1) && z1(
        u,
        /*label*/
        p[0]
      ), (!f || g & /*show_label*/
      4) && B0(n, "hide", !/*show_label*/
      p[2]), (!f || g & /*show_label*/
      4) && B0(n, "sr-only", !/*show_label*/
      p[2]), (!f || g & /*float*/
      16) && B0(
        n,
        "float",
        /*float*/
        p[4]
      ), (!f || g & /*disable*/
      8) && B0(
        n,
        "hide-label",
        /*disable*/
        p[3]
      );
    },
    i(p) {
      f || (R1(i.$$.fragment, p), f = !0);
    },
    o(p) {
      I1(i.$$.fragment, p), f = !1;
    },
    d(p) {
      p && E1(n), S1(i);
    }
  };
}
function O1(a, n, s) {
  let { label: i = null } = n, { Icon: o } = n, { show_label: u = !0 } = n, { disable: f = !1 } = n, { float: p = !0 } = n;
  return a.$$set = (g) => {
    "label" in g && s(0, i = g.label), "Icon" in g && s(1, o = g.Icon), "show_label" in g && s(2, u = g.show_label), "disable" in g && s(3, f = g.disable), "float" in g && s(4, p = g.float);
  }, [i, o, u, f, p];
}
class q1 extends v1 {
  constructor(n) {
    super(), F1(this, n, O1, L1, M1, {
      label: 0,
      Icon: 1,
      show_label: 2,
      disable: 3,
      float: 4
    });
  }
}
const {
  SvelteComponent: P1,
  append: Rs,
  attr: A0,
  bubble: H1,
  create_component: U1,
  destroy_component: G1,
  detach: no,
  element: Is,
  init: V1,
  insert: ro,
  listen: W1,
  mount_component: j1,
  safe_not_equal: X1,
  set_data: Y1,
  set_style: nn,
  space: Z1,
  text: K1,
  toggle_class: kt,
  transition_in: Q1,
  transition_out: J1
} = window.__gradio__svelte__internal;
function xl(a) {
  let n, s;
  return {
    c() {
      n = Is("span"), s = K1(
        /*label*/
        a[1]
      ), A0(n, "class", "svelte-1lrphxw");
    },
    m(i, o) {
      ro(i, n, o), Rs(n, s);
    },
    p(i, o) {
      o & /*label*/
      2 && Y1(
        s,
        /*label*/
        i[1]
      );
    },
    d(i) {
      i && no(n);
    }
  };
}
function $1(a) {
  let n, s, i, o, u, f, p, g = (
    /*show_label*/
    a[2] && xl(a)
  );
  return o = new /*Icon*/
  a[0]({}), {
    c() {
      n = Is("button"), g && g.c(), s = Z1(), i = Is("div"), U1(o.$$.fragment), A0(i, "class", "svelte-1lrphxw"), kt(
        i,
        "small",
        /*size*/
        a[4] === "small"
      ), kt(
        i,
        "large",
        /*size*/
        a[4] === "large"
      ), kt(
        i,
        "medium",
        /*size*/
        a[4] === "medium"
      ), n.disabled = /*disabled*/
      a[7], A0(
        n,
        "aria-label",
        /*label*/
        a[1]
      ), A0(
        n,
        "aria-haspopup",
        /*hasPopup*/
        a[8]
      ), A0(
        n,
        "title",
        /*label*/
        a[1]
      ), A0(n, "class", "svelte-1lrphxw"), kt(
        n,
        "pending",
        /*pending*/
        a[3]
      ), kt(
        n,
        "padded",
        /*padded*/
        a[5]
      ), kt(
        n,
        "highlight",
        /*highlight*/
        a[6]
      ), kt(
        n,
        "transparent",
        /*transparent*/
        a[9]
      ), nn(n, "color", !/*disabled*/
      a[7] && /*_color*/
      a[12] ? (
        /*_color*/
        a[12]
      ) : "var(--block-label-text-color)"), nn(n, "--bg-color", /*disabled*/
      a[7] ? "auto" : (
        /*background*/
        a[10]
      )), nn(
        n,
        "margin-left",
        /*offset*/
        a[11] + "px"
      );
    },
    m(_, k) {
      ro(_, n, k), g && g.m(n, null), Rs(n, s), Rs(n, i), j1(o, i, null), u = !0, f || (p = W1(
        n,
        "click",
        /*click_handler*/
        a[14]
      ), f = !0);
    },
    p(_, [k]) {
      /*show_label*/
      _[2] ? g ? g.p(_, k) : (g = xl(_), g.c(), g.m(n, s)) : g && (g.d(1), g = null), (!u || k & /*size*/
      16) && kt(
        i,
        "small",
        /*size*/
        _[4] === "small"
      ), (!u || k & /*size*/
      16) && kt(
        i,
        "large",
        /*size*/
        _[4] === "large"
      ), (!u || k & /*size*/
      16) && kt(
        i,
        "medium",
        /*size*/
        _[4] === "medium"
      ), (!u || k & /*disabled*/
      128) && (n.disabled = /*disabled*/
      _[7]), (!u || k & /*label*/
      2) && A0(
        n,
        "aria-label",
        /*label*/
        _[1]
      ), (!u || k & /*hasPopup*/
      256) && A0(
        n,
        "aria-haspopup",
        /*hasPopup*/
        _[8]
      ), (!u || k & /*label*/
      2) && A0(
        n,
        "title",
        /*label*/
        _[1]
      ), (!u || k & /*pending*/
      8) && kt(
        n,
        "pending",
        /*pending*/
        _[3]
      ), (!u || k & /*padded*/
      32) && kt(
        n,
        "padded",
        /*padded*/
        _[5]
      ), (!u || k & /*highlight*/
      64) && kt(
        n,
        "highlight",
        /*highlight*/
        _[6]
      ), (!u || k & /*transparent*/
      512) && kt(
        n,
        "transparent",
        /*transparent*/
        _[9]
      ), k & /*disabled, _color*/
      4224 && nn(n, "color", !/*disabled*/
      _[7] && /*_color*/
      _[12] ? (
        /*_color*/
        _[12]
      ) : "var(--block-label-text-color)"), k & /*disabled, background*/
      1152 && nn(n, "--bg-color", /*disabled*/
      _[7] ? "auto" : (
        /*background*/
        _[10]
      )), k & /*offset*/
      2048 && nn(
        n,
        "margin-left",
        /*offset*/
        _[11] + "px"
      );
    },
    i(_) {
      u || (Q1(o.$$.fragment, _), u = !0);
    },
    o(_) {
      J1(o.$$.fragment, _), u = !1;
    },
    d(_) {
      _ && no(n), g && g.d(), G1(o), f = !1, p();
    }
  };
}
function ec(a, n, s) {
  let i, { Icon: o } = n, { label: u = "" } = n, { show_label: f = !1 } = n, { pending: p = !1 } = n, { size: g = "small" } = n, { padded: _ = !0 } = n, { highlight: k = !1 } = n, { disabled: T = !1 } = n, { hasPopup: B = !1 } = n, { color: P = "var(--block-label-text-color)" } = n, { transparent: W = !1 } = n, { background: j = "var(--background-fill-primary)" } = n, { offset: G = 0 } = n;
  function U(A) {
    H1.call(this, a, A);
  }
  return a.$$set = (A) => {
    "Icon" in A && s(0, o = A.Icon), "label" in A && s(1, u = A.label), "show_label" in A && s(2, f = A.show_label), "pending" in A && s(3, p = A.pending), "size" in A && s(4, g = A.size), "padded" in A && s(5, _ = A.padded), "highlight" in A && s(6, k = A.highlight), "disabled" in A && s(7, T = A.disabled), "hasPopup" in A && s(8, B = A.hasPopup), "color" in A && s(13, P = A.color), "transparent" in A && s(9, W = A.transparent), "background" in A && s(10, j = A.background), "offset" in A && s(11, G = A.offset);
  }, a.$$.update = () => {
    a.$$.dirty & /*highlight, color*/
    8256 && s(12, i = k ? "var(--color-accent)" : P);
  }, [
    o,
    u,
    f,
    p,
    g,
    _,
    k,
    T,
    B,
    W,
    j,
    G,
    i,
    P,
    U
  ];
}
class so extends P1 {
  constructor(n) {
    super(), V1(this, n, ec, $1, X1, {
      Icon: 0,
      label: 1,
      show_label: 2,
      pending: 3,
      size: 4,
      padded: 5,
      highlight: 6,
      disabled: 7,
      hasPopup: 8,
      color: 13,
      transparent: 9,
      background: 10,
      offset: 11
    });
  }
}
const {
  SvelteComponent: tc,
  append: vl,
  attr: Mt,
  detach: nc,
  init: rc,
  insert: sc,
  noop: gs,
  safe_not_equal: ic,
  svg_element: bs
} = window.__gradio__svelte__internal;
function lc(a) {
  let n, s, i;
  return {
    c() {
      n = bs("svg"), s = bs("path"), i = bs("path"), Mt(s, "fill", "currentColor"), Mt(s, "d", "M17.74 30L16 29l4-7h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h9v2H6a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4h20a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4h-4.84Z"), Mt(i, "fill", "currentColor"), Mt(i, "d", "M8 10h16v2H8zm0 6h10v2H8z"), Mt(n, "xmlns", "http://www.w3.org/2000/svg"), Mt(n, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Mt(n, "aria-hidden", "true"), Mt(n, "role", "img"), Mt(n, "class", "iconify iconify--carbon"), Mt(n, "width", "100%"), Mt(n, "height", "100%"), Mt(n, "preserveAspectRatio", "xMidYMid meet"), Mt(n, "viewBox", "0 0 32 32");
    },
    m(o, u) {
      sc(o, n, u), vl(n, s), vl(n, i);
    },
    p: gs,
    i: gs,
    o: gs,
    d(o) {
      o && nc(n);
    }
  };
}
class ac extends tc {
  constructor(n) {
    super(), rc(this, n, null, lc, ic, {});
  }
}
const {
  SvelteComponent: oc,
  append: ws,
  attr: Kt,
  detach: uc,
  init: cc,
  insert: hc,
  noop: _s,
  safe_not_equal: fc,
  set_style: u0,
  svg_element: ir
} = window.__gradio__svelte__internal;
function dc(a) {
  let n, s, i, o;
  return {
    c() {
      n = ir("svg"), s = ir("g"), i = ir("path"), o = ir("path"), Kt(i, "d", "M18,6L6.087,17.913"), u0(i, "fill", "none"), u0(i, "fill-rule", "nonzero"), u0(i, "stroke-width", "2px"), Kt(s, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Kt(o, "d", "M4.364,4.364L19.636,19.636"), u0(o, "fill", "none"), u0(o, "fill-rule", "nonzero"), u0(o, "stroke-width", "2px"), Kt(n, "width", "100%"), Kt(n, "height", "100%"), Kt(n, "viewBox", "0 0 24 24"), Kt(n, "version", "1.1"), Kt(n, "xmlns", "http://www.w3.org/2000/svg"), Kt(n, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Kt(n, "xml:space", "preserve"), Kt(n, "stroke", "currentColor"), u0(n, "fill-rule", "evenodd"), u0(n, "clip-rule", "evenodd"), u0(n, "stroke-linecap", "round"), u0(n, "stroke-linejoin", "round");
    },
    m(u, f) {
      hc(u, n, f), ws(n, s), ws(s, i), ws(n, o);
    },
    p: _s,
    i: _s,
    o: _s,
    d(u) {
      u && uc(n);
    }
  };
}
class mc extends oc {
  constructor(n) {
    super(), cc(this, n, null, dc, fc, {});
  }
}
const {
  SvelteComponent: pc,
  append: gc,
  attr: _n,
  detach: bc,
  init: wc,
  insert: _c,
  noop: ys,
  safe_not_equal: yc,
  svg_element: Al
} = window.__gradio__svelte__internal;
function kc(a) {
  let n, s;
  return {
    c() {
      n = Al("svg"), s = Al("path"), _n(s, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), _n(s, "fill", "currentColor"), _n(n, "id", "icon"), _n(n, "xmlns", "http://www.w3.org/2000/svg"), _n(n, "viewBox", "0 0 32 32");
    },
    m(i, o) {
      _c(i, n, o), gc(n, s);
    },
    p: ys,
    i: ys,
    o: ys,
    d(i) {
      i && bc(n);
    }
  };
}
class Dc extends pc {
  constructor(n) {
    super(), wc(this, n, null, kc, yc, {});
  }
}
const {
  SvelteComponent: xc,
  create_component: vc,
  destroy_component: Ac,
  init: Sc,
  mount_component: Ec,
  safe_not_equal: Fc,
  transition_in: Tc,
  transition_out: Cc
} = window.__gradio__svelte__internal, { createEventDispatcher: Mc } = window.__gradio__svelte__internal;
function zc(a) {
  let n, s;
  return n = new so({
    props: {
      Icon: Dc,
      label: (
        /*i18n*/
        a[2]("common.share")
      ),
      pending: (
        /*pending*/
        a[3]
      )
    }
  }), n.$on(
    "click",
    /*click_handler*/
    a[5]
  ), {
    c() {
      vc(n.$$.fragment);
    },
    m(i, o) {
      Ec(n, i, o), s = !0;
    },
    p(i, [o]) {
      const u = {};
      o & /*i18n*/
      4 && (u.label = /*i18n*/
      i[2]("common.share")), o & /*pending*/
      8 && (u.pending = /*pending*/
      i[3]), n.$set(u);
    },
    i(i) {
      s || (Tc(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Cc(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Ac(n, i);
    }
  };
}
function Bc(a, n, s) {
  const i = Mc();
  let { formatter: o } = n, { value: u } = n, { i18n: f } = n, p = !1;
  const g = async () => {
    try {
      s(3, p = !0);
      const _ = await o(u);
      i("share", { description: _ });
    } catch (_) {
      console.error(_);
      let k = _ instanceof pr ? _.message : "Share failed.";
      i("error", k);
    } finally {
      s(3, p = !1);
    }
  };
  return a.$$set = (_) => {
    "formatter" in _ && s(0, o = _.formatter), "value" in _ && s(1, u = _.value), "i18n" in _ && s(2, f = _.i18n);
  }, [o, u, f, p, i, g];
}
class Nc extends xc {
  constructor(n) {
    super(), Sc(this, n, Bc, zc, Fc, { formatter: 0, value: 1, i18n: 2 });
  }
}
const { setContext: Pd, getContext: Rc } = window.__gradio__svelte__internal, Ic = "WORKER_PROXY_CONTEXT_KEY";
function Lc() {
  return Rc(Ic);
}
function Oc(a) {
  return a.host === window.location.host || a.host === "localhost:7860" || a.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194
  a.host === "lite.local";
}
function qc(a, n) {
  const s = n.toLowerCase();
  for (const [i, o] of Object.entries(a))
    if (i.toLowerCase() === s)
      return o;
}
function Pc(a) {
  if (a == null)
    return !1;
  const n = new URL(a, window.location.href);
  return !(!Oc(n) || n.protocol !== "http:" && n.protocol !== "https:");
}
async function Ys(a) {
  if (a == null || !Pc(a))
    return a;
  const n = Lc();
  if (n == null)
    return a;
  const i = new URL(a, window.location.href).pathname;
  return n.httpRequest({
    method: "GET",
    path: i,
    headers: {},
    query_string: ""
  }).then((o) => {
    if (o.status !== 200)
      throw new Error(`Failed to get file ${i} from the Wasm worker.`);
    const u = new Blob([o.body], {
      type: qc(o.headers, "content-type")
    });
    return URL.createObjectURL(u);
  });
}
const {
  SvelteComponent: Hc,
  assign: Ls,
  compute_rest_props: Sl,
  detach: Uc,
  element: Gc,
  exclude_internal_props: Vc,
  get_spread_update: Wc,
  init: jc,
  insert: Xc,
  listen: ks,
  noop: El,
  run_all: Yc,
  safe_not_equal: Zc,
  set_attributes: Fl,
  src_url_equal: Kc
} = window.__gradio__svelte__internal, { createEventDispatcher: Qc } = window.__gradio__svelte__internal;
function Jc(a) {
  let n, s, i, o, u = [
    {
      src: s = /*resolved_src*/
      a[0]
    },
    /*$$restProps*/
    a[2]
  ], f = {};
  for (let p = 0; p < u.length; p += 1)
    f = Ls(f, u[p]);
  return {
    c() {
      n = Gc("audio"), Fl(n, f);
    },
    m(p, g) {
      Xc(p, n, g), i || (o = [
        ks(
          n,
          "play",
          /*dispatch*/
          a[1].bind(null, "play")
        ),
        ks(
          n,
          "pause",
          /*dispatch*/
          a[1].bind(null, "pause")
        ),
        ks(
          n,
          "ended",
          /*dispatch*/
          a[1].bind(null, "ended")
        )
      ], i = !0);
    },
    p(p, [g]) {
      Fl(n, f = Wc(u, [
        g & /*resolved_src*/
        1 && !Kc(n.src, s = /*resolved_src*/
        p[0]) && { src: s },
        g & /*$$restProps*/
        4 && /*$$restProps*/
        p[2]
      ]));
    },
    i: El,
    o: El,
    d(p) {
      p && Uc(n), i = !1, Yc(o);
    }
  };
}
function $c(a, n, s) {
  const i = ["src"];
  let o = Sl(n, i), { src: u = void 0 } = n, f, p;
  const g = Qc();
  return a.$$set = (_) => {
    n = Ls(Ls({}, n), Vc(_)), s(2, o = Sl(n, i)), "src" in _ && s(3, u = _.src);
  }, a.$$.update = () => {
    if (a.$$.dirty & /*src, latest_src*/
    24) {
      s(0, f = u), s(4, p = u);
      const _ = u;
      Ys(_).then((k) => {
        p === _ && s(0, f = k);
      });
    }
  }, [f, g, o, u, p];
}
class e4 extends Hc {
  constructor(n) {
    super(), jc(this, n, $c, Jc, Zc, { src: 3 });
  }
}
const {
  SvelteComponent: t4,
  assign: Os,
  compute_rest_props: Tl,
  detach: n4,
  element: r4,
  exclude_internal_props: s4,
  get_spread_update: i4,
  init: l4,
  insert: a4,
  noop: Cl,
  safe_not_equal: o4,
  set_attributes: Ml,
  src_url_equal: u4,
  toggle_class: zl
} = window.__gradio__svelte__internal;
function c4(a) {
  let n, s, i = [
    {
      src: s = /*resolved_src*/
      a[0]
    },
    /*$$restProps*/
    a[1]
  ], o = {};
  for (let u = 0; u < i.length; u += 1)
    o = Os(o, i[u]);
  return {
    c() {
      n = r4("img"), Ml(n, o), zl(n, "svelte-kxeri3", !0);
    },
    m(u, f) {
      a4(u, n, f);
    },
    p(u, [f]) {
      Ml(n, o = i4(i, [
        f & /*resolved_src*/
        1 && !u4(n.src, s = /*resolved_src*/
        u[0]) && { src: s },
        f & /*$$restProps*/
        2 && /*$$restProps*/
        u[1]
      ])), zl(n, "svelte-kxeri3", !0);
    },
    i: Cl,
    o: Cl,
    d(u) {
      u && n4(n);
    }
  };
}
function h4(a, n, s) {
  const i = ["src"];
  let o = Tl(n, i), { src: u = void 0 } = n, f, p;
  return a.$$set = (g) => {
    n = Os(Os({}, n), s4(g)), s(1, o = Tl(n, i)), "src" in g && s(2, u = g.src);
  }, a.$$.update = () => {
    if (a.$$.dirty & /*src, latest_src*/
    12) {
      s(0, f = u), s(3, p = u);
      const g = u;
      Ys(g).then((_) => {
        p === g && s(0, f = _);
      });
    }
  }, [f, o, u, p];
}
class io extends t4 {
  constructor(n) {
    super(), l4(this, n, h4, c4, o4, { src: 2 });
  }
}
var Bl;
(function(a) {
  a.LOAD = "LOAD", a.EXEC = "EXEC", a.WRITE_FILE = "WRITE_FILE", a.READ_FILE = "READ_FILE", a.DELETE_FILE = "DELETE_FILE", a.RENAME = "RENAME", a.CREATE_DIR = "CREATE_DIR", a.LIST_DIR = "LIST_DIR", a.DELETE_DIR = "DELETE_DIR", a.ERROR = "ERROR", a.DOWNLOAD = "DOWNLOAD", a.PROGRESS = "PROGRESS", a.LOG = "LOG", a.MOUNT = "MOUNT", a.UNMOUNT = "UNMOUNT";
})(Bl || (Bl = {}));
function f4(a, { autoplay: n }) {
  async function s() {
    n && await a.play();
  }
  return a.addEventListener("loadeddata", s), {
    destroy() {
      a.removeEventListener("loadeddata", s);
    }
  };
}
const {
  SvelteComponent: d4,
  action_destroyer: m4,
  add_render_callback: p4,
  assign: Nl,
  attr: N0,
  binding_callbacks: g4,
  create_slot: b4,
  detach: Ds,
  element: Rl,
  exclude_internal_props: Il,
  get_all_dirty_from_scope: w4,
  get_slot_changes: _4,
  init: y4,
  insert: xs,
  is_function: k4,
  listen: zt,
  raf: D4,
  run_all: x4,
  safe_not_equal: v4,
  space: A4,
  src_url_equal: Ll,
  toggle_class: Ol,
  transition_in: S4,
  transition_out: E4,
  update_slot_base: F4
} = window.__gradio__svelte__internal, { createEventDispatcher: T4 } = window.__gradio__svelte__internal;
function C4(a) {
  let n, s, i, o, u, f = !1, p, g = !0, _, k, T, B;
  const P = (
    /*#slots*/
    a[16].default
  ), W = b4(
    P,
    a,
    /*$$scope*/
    a[15],
    null
  );
  function j() {
    cancelAnimationFrame(p), i.paused || (p = D4(j), f = !0), a[17].call(i);
  }
  return {
    c() {
      n = Rl("div"), n.innerHTML = '<span class="load-wrap svelte-1pwzuub"><span class="loader svelte-1pwzuub"></span></span>', s = A4(), i = Rl("video"), W && W.c(), N0(n, "class", "overlay svelte-1pwzuub"), Ol(n, "hidden", !/*processingVideo*/
      a[9]), Ll(i.src, o = /*resolved_src*/
      a[10]) || N0(i, "src", o), i.muted = /*muted*/
      a[4], i.playsInline = /*playsinline*/
      a[5], N0(
        i,
        "preload",
        /*preload*/
        a[6]
      ), i.autoplay = /*autoplay*/
      a[7], i.controls = /*controls*/
      a[8], N0(i, "data-testid", u = /*$$props*/
      a[12]["data-testid"]), N0(i, "crossorigin", "anonymous"), /*duration*/
      a[1] === void 0 && p4(() => (
        /*video_durationchange_handler*/
        a[18].call(i)
      ));
    },
    m(G, U) {
      xs(G, n, U), xs(G, s, U), xs(G, i, U), W && W.m(i, null), a[20](i), k = !0, T || (B = [
        zt(
          i,
          "loadeddata",
          /*dispatch*/
          a[11].bind(null, "loadeddata")
        ),
        zt(
          i,
          "click",
          /*dispatch*/
          a[11].bind(null, "click")
        ),
        zt(
          i,
          "play",
          /*dispatch*/
          a[11].bind(null, "play")
        ),
        zt(
          i,
          "pause",
          /*dispatch*/
          a[11].bind(null, "pause")
        ),
        zt(
          i,
          "ended",
          /*dispatch*/
          a[11].bind(null, "ended")
        ),
        zt(
          i,
          "mouseover",
          /*dispatch*/
          a[11].bind(null, "mouseover")
        ),
        zt(
          i,
          "mouseout",
          /*dispatch*/
          a[11].bind(null, "mouseout")
        ),
        zt(
          i,
          "focus",
          /*dispatch*/
          a[11].bind(null, "focus")
        ),
        zt(
          i,
          "blur",
          /*dispatch*/
          a[11].bind(null, "blur")
        ),
        zt(i, "timeupdate", j),
        zt(
          i,
          "durationchange",
          /*video_durationchange_handler*/
          a[18]
        ),
        zt(
          i,
          "play",
          /*video_play_pause_handler*/
          a[19]
        ),
        zt(
          i,
          "pause",
          /*video_play_pause_handler*/
          a[19]
        ),
        m4(_ = f4.call(null, i, { autoplay: (
          /*autoplay*/
          a[7] ?? !1
        ) }))
      ], T = !0);
    },
    p(G, [U]) {
      (!k || U & /*processingVideo*/
      512) && Ol(n, "hidden", !/*processingVideo*/
      G[9]), W && W.p && (!k || U & /*$$scope*/
      32768) && F4(
        W,
        P,
        G,
        /*$$scope*/
        G[15],
        k ? _4(
          P,
          /*$$scope*/
          G[15],
          U,
          null
        ) : w4(
          /*$$scope*/
          G[15]
        ),
        null
      ), (!k || U & /*resolved_src*/
      1024 && !Ll(i.src, o = /*resolved_src*/
      G[10])) && N0(i, "src", o), (!k || U & /*muted*/
      16) && (i.muted = /*muted*/
      G[4]), (!k || U & /*playsinline*/
      32) && (i.playsInline = /*playsinline*/
      G[5]), (!k || U & /*preload*/
      64) && N0(
        i,
        "preload",
        /*preload*/
        G[6]
      ), (!k || U & /*autoplay*/
      128) && (i.autoplay = /*autoplay*/
      G[7]), (!k || U & /*controls*/
      256) && (i.controls = /*controls*/
      G[8]), (!k || U & /*$$props*/
      4096 && u !== (u = /*$$props*/
      G[12]["data-testid"])) && N0(i, "data-testid", u), !f && U & /*currentTime*/
      1 && !isNaN(
        /*currentTime*/
        G[0]
      ) && (i.currentTime = /*currentTime*/
      G[0]), f = !1, U & /*paused*/
      4 && g !== (g = /*paused*/
      G[2]) && i[g ? "pause" : "play"](), _ && k4(_.update) && U & /*autoplay*/
      128 && _.update.call(null, { autoplay: (
        /*autoplay*/
        G[7] ?? !1
      ) });
    },
    i(G) {
      k || (S4(W, G), k = !0);
    },
    o(G) {
      E4(W, G), k = !1;
    },
    d(G) {
      G && (Ds(n), Ds(s), Ds(i)), W && W.d(G), a[20](null), T = !1, x4(B);
    }
  };
}
function M4(a, n, s) {
  let { $$slots: i = {}, $$scope: o } = n, { src: u = void 0 } = n, { muted: f = void 0 } = n, { playsinline: p = void 0 } = n, { preload: g = void 0 } = n, { autoplay: _ = void 0 } = n, { controls: k = void 0 } = n, { currentTime: T = void 0 } = n, { duration: B = void 0 } = n, { paused: P = void 0 } = n, { node: W = void 0 } = n, { processingVideo: j = !1 } = n, G, U;
  const A = T4();
  function S() {
    T = this.currentTime, s(0, T);
  }
  function M() {
    B = this.duration, s(1, B);
  }
  function I() {
    P = this.paused, s(2, P);
  }
  function O(H) {
    g4[H ? "unshift" : "push"](() => {
      W = H, s(3, W);
    });
  }
  return a.$$set = (H) => {
    s(12, n = Nl(Nl({}, n), Il(H))), "src" in H && s(13, u = H.src), "muted" in H && s(4, f = H.muted), "playsinline" in H && s(5, p = H.playsinline), "preload" in H && s(6, g = H.preload), "autoplay" in H && s(7, _ = H.autoplay), "controls" in H && s(8, k = H.controls), "currentTime" in H && s(0, T = H.currentTime), "duration" in H && s(1, B = H.duration), "paused" in H && s(2, P = H.paused), "node" in H && s(3, W = H.node), "processingVideo" in H && s(9, j = H.processingVideo), "$$scope" in H && s(15, o = H.$$scope);
  }, a.$$.update = () => {
    if (a.$$.dirty & /*src, latest_src*/
    24576) {
      s(10, G = u), s(14, U = u);
      const H = u;
      Ys(H).then((J) => {
        U === H && s(10, G = J);
      });
    }
  }, n = Il(n), [
    T,
    B,
    P,
    W,
    f,
    p,
    g,
    _,
    k,
    j,
    G,
    A,
    n,
    u,
    U,
    o,
    i,
    S,
    M,
    I,
    O
  ];
}
class z4 extends d4 {
  constructor(n) {
    super(), y4(this, n, M4, C4, v4, {
      src: 13,
      muted: 4,
      playsinline: 5,
      preload: 6,
      autoplay: 7,
      controls: 8,
      currentTime: 0,
      duration: 1,
      paused: 2,
      node: 3,
      processingVideo: 9
    });
  }
}
/*! @license DOMPurify 3.1.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.3/LICENSE */
const {
  entries: lo,
  setPrototypeOf: ql,
  isFrozen: B4,
  getPrototypeOf: N4,
  getOwnPropertyDescriptor: R4
} = Object;
let {
  freeze: dt,
  seal: Vt,
  create: ao
} = Object, {
  apply: qs,
  construct: Ps
} = typeof Reflect < "u" && Reflect;
dt || (dt = function(n) {
  return n;
});
Vt || (Vt = function(n) {
  return n;
});
qs || (qs = function(n, s, i) {
  return n.apply(s, i);
});
Ps || (Ps = function(n, s) {
  return new n(...s);
});
const lr = Dt(Array.prototype.forEach), Pl = Dt(Array.prototype.pop), yn = Dt(Array.prototype.push), gr = Dt(String.prototype.toLowerCase), vs = Dt(String.prototype.toString), Hl = Dt(String.prototype.match), kn = Dt(String.prototype.replace), I4 = Dt(String.prototype.indexOf), L4 = Dt(String.prototype.trim), $t = Dt(Object.prototype.hasOwnProperty), ft = Dt(RegExp.prototype.test), Dn = O4(TypeError), Ul = Dt(Number.isNaN);
function Dt(a) {
  return function(n) {
    for (var s = arguments.length, i = new Array(s > 1 ? s - 1 : 0), o = 1; o < s; o++)
      i[o - 1] = arguments[o];
    return qs(a, n, i);
  };
}
function O4(a) {
  return function() {
    for (var n = arguments.length, s = new Array(n), i = 0; i < n; i++)
      s[i] = arguments[i];
    return Ps(a, s);
  };
}
function _e(a, n) {
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gr;
  ql && ql(a, null);
  let i = n.length;
  for (; i--; ) {
    let o = n[i];
    if (typeof o == "string") {
      const u = s(o);
      u !== o && (B4(n) || (n[i] = u), o = u);
    }
    a[o] = !0;
  }
  return a;
}
function q4(a) {
  for (let n = 0; n < a.length; n++)
    $t(a, n) || (a[n] = null);
  return a;
}
function V0(a) {
  const n = ao(null);
  for (const [s, i] of lo(a))
    $t(a, s) && (Array.isArray(i) ? n[s] = q4(i) : i && typeof i == "object" && i.constructor === Object ? n[s] = V0(i) : n[s] = i);
  return n;
}
function ar(a, n) {
  for (; a !== null; ) {
    const i = R4(a, n);
    if (i) {
      if (i.get)
        return Dt(i.get);
      if (typeof i.value == "function")
        return Dt(i.value);
    }
    a = N4(a);
  }
  function s() {
    return null;
  }
  return s;
}
const Gl = dt(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), As = dt(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ss = dt(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), P4 = dt(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Es = dt(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), H4 = dt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vl = dt(["#text"]), Wl = dt(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Fs = dt(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), jl = dt(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), or = dt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), U4 = Vt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), G4 = Vt(/<%[\w\W]*|[\w\W]*%>/gm), V4 = Vt(/\${[\w\W]*}/gm), W4 = Vt(/^data-[\-\w.\u00B7-\uFFFF]/), j4 = Vt(/^aria-[\-\w]+$/), oo = Vt(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), X4 = Vt(/^(?:\w+script|data):/i), Y4 = Vt(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), uo = Vt(/^html$/i), Z4 = Vt(/^[a-z][.\w]*(-[.\w]+)+$/i);
var Xl = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  MUSTACHE_EXPR: U4,
  ERB_EXPR: G4,
  TMPLIT_EXPR: V4,
  DATA_ATTR: W4,
  ARIA_ATTR: j4,
  IS_ALLOWED_URI: oo,
  IS_SCRIPT_OR_DATA: X4,
  ATTR_WHITESPACE: Y4,
  DOCTYPE_NAME: uo,
  CUSTOM_ELEMENT: Z4
});
const G0 = {
  element: 1,
  attribute: 2,
  text: 3,
  cdataSection: 4,
  entityReference: 5,
  // Deprecated
  entityNode: 6,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9,
  documentType: 10,
  documentFragment: 11,
  notation: 12
  // Deprecated
}, K4 = function() {
  return typeof window > "u" ? null : window;
}, Q4 = function(n, s) {
  if (typeof n != "object" || typeof n.createPolicy != "function")
    return null;
  let i = null;
  const o = "data-tt-policy-suffix";
  s && s.hasAttribute(o) && (i = s.getAttribute(o));
  const u = "dompurify" + (i ? "#" + i : "");
  try {
    return n.createPolicy(u, {
      createHTML(f) {
        return f;
      },
      createScriptURL(f) {
        return f;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + u + " could not be created."), null;
  }
};
function co() {
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : K4();
  const n = (re) => co(re);
  if (n.version = "3.1.3", n.removed = [], !a || !a.document || a.document.nodeType !== G0.document)
    return n.isSupported = !1, n;
  let {
    document: s
  } = a;
  const i = s, o = i.currentScript, {
    DocumentFragment: u,
    HTMLTemplateElement: f,
    Node: p,
    Element: g,
    NodeFilter: _,
    NamedNodeMap: k = a.NamedNodeMap || a.MozNamedAttrMap,
    HTMLFormElement: T,
    DOMParser: B,
    trustedTypes: P
  } = a, W = g.prototype, j = ar(W, "cloneNode"), G = ar(W, "nextSibling"), U = ar(W, "childNodes"), A = ar(W, "parentNode");
  if (typeof f == "function") {
    const re = s.createElement("template");
    re.content && re.content.ownerDocument && (s = re.content.ownerDocument);
  }
  let S, M = "";
  const {
    implementation: I,
    createNodeIterator: O,
    createDocumentFragment: H,
    getElementsByTagName: J
  } = s, {
    importNode: K
  } = i;
  let le = {};
  n.isSupported = typeof lo == "function" && typeof A == "function" && I && I.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: ce,
    ERB_EXPR: pe,
    TMPLIT_EXPR: ve,
    DATA_ATTR: Ie,
    ARIA_ATTR: ut,
    IS_SCRIPT_OR_DATA: st,
    ATTR_WHITESPACE: mt,
    CUSTOM_ELEMENT: Oe
  } = Xl;
  let {
    IS_ALLOWED_URI: $
  } = Xl, Fe = null;
  const V = _e({}, [...Gl, ...As, ...Ss, ...Es, ...Vl]);
  let he = null;
  const Ke = _e({}, [...Wl, ...Fs, ...jl, ...or]);
  let we = Object.seal(ao(null, {
    tagNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    attributeNameCheck: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: null
    },
    allowCustomizedBuiltInElements: {
      writable: !0,
      configurable: !1,
      enumerable: !0,
      value: !1
    }
  })), ie = null, at = null, pt = !0, gt = !0, g0 = !1, bt = !0, it = !1, b0 = !0, ct = !1, w0 = !1, At = !1, St = !1, K0 = !1, r0 = !1, Et = !0, O0 = !1;
  const Nn = "user-content-";
  let un = !0, _0 = !1, s0 = {}, S0 = null;
  const Rn = _e({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
  let cn = null;
  const hn = _e({}, ["audio", "video", "img", "source", "image", "track"]);
  let Ft = null;
  const In = _e({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), E0 = "http://www.w3.org/1998/Math/MathML", Q0 = "http://www.w3.org/2000/svg", Nt = "http://www.w3.org/1999/xhtml";
  let Me = Nt, Q = !1, Rt = null;
  const Ln = _e({}, [E0, Q0, Nt], vs);
  let F0 = null;
  const On = ["application/xhtml+xml", "text/html"], q0 = "text/html";
  let je = null, T0 = null;
  const qn = 255, wt = s.createElement("form"), It = function(z) {
    return z instanceof RegExp || z instanceof Function;
  }, Lt = function() {
    let z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(T0 && T0 === z)) {
      if ((!z || typeof z != "object") && (z = {}), z = V0(z), F0 = // eslint-disable-next-line unicorn/prefer-includes
      On.indexOf(z.PARSER_MEDIA_TYPE) === -1 ? q0 : z.PARSER_MEDIA_TYPE, je = F0 === "application/xhtml+xml" ? vs : gr, Fe = $t(z, "ALLOWED_TAGS") ? _e({}, z.ALLOWED_TAGS, je) : V, he = $t(z, "ALLOWED_ATTR") ? _e({}, z.ALLOWED_ATTR, je) : Ke, Rt = $t(z, "ALLOWED_NAMESPACES") ? _e({}, z.ALLOWED_NAMESPACES, vs) : Ln, Ft = $t(z, "ADD_URI_SAFE_ATTR") ? _e(
        V0(In),
        // eslint-disable-line indent
        z.ADD_URI_SAFE_ATTR,
        // eslint-disable-line indent
        je
        // eslint-disable-line indent
      ) : In, cn = $t(z, "ADD_DATA_URI_TAGS") ? _e(
        V0(hn),
        // eslint-disable-line indent
        z.ADD_DATA_URI_TAGS,
        // eslint-disable-line indent
        je
        // eslint-disable-line indent
      ) : hn, S0 = $t(z, "FORBID_CONTENTS") ? _e({}, z.FORBID_CONTENTS, je) : Rn, ie = $t(z, "FORBID_TAGS") ? _e({}, z.FORBID_TAGS, je) : {}, at = $t(z, "FORBID_ATTR") ? _e({}, z.FORBID_ATTR, je) : {}, s0 = $t(z, "USE_PROFILES") ? z.USE_PROFILES : !1, pt = z.ALLOW_ARIA_ATTR !== !1, gt = z.ALLOW_DATA_ATTR !== !1, g0 = z.ALLOW_UNKNOWN_PROTOCOLS || !1, bt = z.ALLOW_SELF_CLOSE_IN_ATTR !== !1, it = z.SAFE_FOR_TEMPLATES || !1, b0 = z.SAFE_FOR_XML !== !1, ct = z.WHOLE_DOCUMENT || !1, St = z.RETURN_DOM || !1, K0 = z.RETURN_DOM_FRAGMENT || !1, r0 = z.RETURN_TRUSTED_TYPE || !1, At = z.FORCE_BODY || !1, Et = z.SANITIZE_DOM !== !1, O0 = z.SANITIZE_NAMED_PROPS || !1, un = z.KEEP_CONTENT !== !1, _0 = z.IN_PLACE || !1, $ = z.ALLOWED_URI_REGEXP || oo, Me = z.NAMESPACE || Nt, we = z.CUSTOM_ELEMENT_HANDLING || {}, z.CUSTOM_ELEMENT_HANDLING && It(z.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (we.tagNameCheck = z.CUSTOM_ELEMENT_HANDLING.tagNameCheck), z.CUSTOM_ELEMENT_HANDLING && It(z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (we.attributeNameCheck = z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), z.CUSTOM_ELEMENT_HANDLING && typeof z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (we.allowCustomizedBuiltInElements = z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), it && (gt = !1), K0 && (St = !0), s0 && (Fe = _e({}, Vl), he = [], s0.html === !0 && (_e(Fe, Gl), _e(he, Wl)), s0.svg === !0 && (_e(Fe, As), _e(he, Fs), _e(he, or)), s0.svgFilters === !0 && (_e(Fe, Ss), _e(he, Fs), _e(he, or)), s0.mathMl === !0 && (_e(Fe, Es), _e(he, jl), _e(he, or))), z.ADD_TAGS && (Fe === V && (Fe = V0(Fe)), _e(Fe, z.ADD_TAGS, je)), z.ADD_ATTR && (he === Ke && (he = V0(he)), _e(he, z.ADD_ATTR, je)), z.ADD_URI_SAFE_ATTR && _e(Ft, z.ADD_URI_SAFE_ATTR, je), z.FORBID_CONTENTS && (S0 === Rn && (S0 = V0(S0)), _e(S0, z.FORBID_CONTENTS, je)), un && (Fe["#text"] = !0), ct && _e(Fe, ["html", "head", "body"]), Fe.table && (_e(Fe, ["tbody"]), delete ie.tbody), z.TRUSTED_TYPES_POLICY) {
        if (typeof z.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw Dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof z.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw Dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        S = z.TRUSTED_TYPES_POLICY, M = S.createHTML("");
      } else
        S === void 0 && (S = Q4(P, o)), S !== null && typeof M == "string" && (M = S.createHTML(""));
      dt && dt(z), T0 = z;
    }
  }, J0 = _e({}, ["mi", "mo", "mn", "ms", "mtext"]), fn = _e({}, ["foreignobject", "annotation-xml"]), Rr = _e({}, ["title", "style", "font", "a", "script"]), Pn = _e({}, [...As, ...Ss, ...P4]), Hn = _e({}, [...Es, ...H4]), $0 = function(z) {
    let x = A(z);
    (!x || !x.tagName) && (x = {
      namespaceURI: Me,
      tagName: "template"
    });
    const ne = gr(z.tagName), F = gr(x.tagName);
    return Rt[z.namespaceURI] ? z.namespaceURI === Q0 ? x.namespaceURI === Nt ? ne === "svg" : x.namespaceURI === E0 ? ne === "svg" && (F === "annotation-xml" || J0[F]) : !!Pn[ne] : z.namespaceURI === E0 ? x.namespaceURI === Nt ? ne === "math" : x.namespaceURI === Q0 ? ne === "math" && fn[F] : !!Hn[ne] : z.namespaceURI === Nt ? x.namespaceURI === Q0 && !fn[F] || x.namespaceURI === E0 && !J0[F] ? !1 : !Hn[ne] && (Rr[ne] || !Pn[ne]) : !!(F0 === "application/xhtml+xml" && Rt[z.namespaceURI]) : !1;
  }, ye = function(z) {
    yn(n.removed, {
      element: z
    });
    try {
      z.parentNode.removeChild(z);
    } catch {
      z.remove();
    }
  }, h = function(z, x) {
    try {
      yn(n.removed, {
        attribute: x.getAttributeNode(z),
        from: x
      });
    } catch {
      yn(n.removed, {
        attribute: null,
        from: x
      });
    }
    if (x.removeAttribute(z), z === "is" && !he[z])
      if (St || K0)
        try {
          ye(x);
        } catch {
        }
      else
        try {
          x.setAttribute(z, "");
        } catch {
        }
  }, d = function(z) {
    let x = null, ne = null;
    if (At)
      z = "<remove></remove>" + z;
    else {
      const Qe = Hl(z, /^[\r\n\t ]+/);
      ne = Qe && Qe[0];
    }
    F0 === "application/xhtml+xml" && Me === Nt && (z = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + z + "</body></html>");
    const F = S ? S.createHTML(z) : z;
    if (Me === Nt)
      try {
        x = new B().parseFromString(F, F0);
      } catch {
      }
    if (!x || !x.documentElement) {
      x = I.createDocument(Me, "template", null);
      try {
        x.documentElement.innerHTML = Q ? M : F;
      } catch {
      }
    }
    const Je = x.body || x.documentElement;
    return z && ne && Je.insertBefore(s.createTextNode(ne), Je.childNodes[0] || null), Me === Nt ? J.call(x, ct ? "html" : "body")[0] : ct ? x.documentElement : Je;
  }, X = function(z) {
    return O.call(
      z.ownerDocument || z,
      z,
      // eslint-disable-next-line no-bitwise
      _.SHOW_ELEMENT | _.SHOW_COMMENT | _.SHOW_TEXT | _.SHOW_PROCESSING_INSTRUCTION | _.SHOW_CDATA_SECTION,
      null
    );
  }, w = function(z) {
    return z instanceof T && // eslint-disable-next-line unicorn/no-typeof-undefined
    (typeof z.__depth < "u" && typeof z.__depth != "number" || // eslint-disable-next-line unicorn/no-typeof-undefined
    typeof z.__removalCount < "u" && typeof z.__removalCount != "number" || typeof z.nodeName != "string" || typeof z.textContent != "string" || typeof z.removeChild != "function" || !(z.attributes instanceof k) || typeof z.removeAttribute != "function" || typeof z.setAttribute != "function" || typeof z.namespaceURI != "string" || typeof z.insertBefore != "function" || typeof z.hasChildNodes != "function");
  }, E = function(z) {
    return typeof p == "function" && z instanceof p;
  }, De = function(z, x, ne) {
    le[z] && lr(le[z], (F) => {
      F.call(n, x, ne, T0);
    });
  }, te = function(z) {
    let x = null;
    if (De("beforeSanitizeElements", z, null), w(z))
      return ye(z), !0;
    const ne = je(z.nodeName);
    if (De("uponSanitizeElement", z, {
      tagName: ne,
      allowedTags: Fe
    }), z.hasChildNodes() && !E(z.firstElementChild) && ft(/<[/\w]/g, z.innerHTML) && ft(/<[/\w]/g, z.textContent) || z.nodeType === G0.progressingInstruction || b0 && z.nodeType === G0.comment && ft(/<[/\w]/g, z.data))
      return ye(z), !0;
    if (!Fe[ne] || ie[ne]) {
      if (!ie[ne] && y0(ne) && (we.tagNameCheck instanceof RegExp && ft(we.tagNameCheck, ne) || we.tagNameCheck instanceof Function && we.tagNameCheck(ne)))
        return !1;
      if (un && !S0[ne]) {
        const F = A(z) || z.parentNode, Je = U(z) || z.childNodes;
        if (Je && F) {
          const Qe = Je.length;
          for (let ot = Qe - 1; ot >= 0; --ot) {
            const $e = j(Je[ot], !0);
            $e.__removalCount = (z.__removalCount || 0) + 1, F.insertBefore($e, G(z));
          }
        }
      }
      return ye(z), !0;
    }
    return z instanceof g && !$0(z) || (ne === "noscript" || ne === "noembed" || ne === "noframes") && ft(/<\/no(script|embed|frames)/i, z.innerHTML) ? (ye(z), !0) : (it && z.nodeType === G0.text && (x = z.textContent, lr([ce, pe, ve], (F) => {
      x = kn(x, F, " ");
    }), z.textContent !== x && (yn(n.removed, {
      element: z.cloneNode()
    }), z.textContent = x)), De("afterSanitizeElements", z, null), !1);
  }, lt = function(z, x, ne) {
    if (Et && (x === "id" || x === "name") && (ne in s || ne in wt || ne === "__depth" || ne === "__removalCount"))
      return !1;
    if (!(gt && !at[x] && ft(Ie, x))) {
      if (!(pt && ft(ut, x))) {
        if (!he[x] || at[x]) {
          if (
            // First condition does a very basic check if a) it's basically a valid custom element tagname AND
            // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
            !(y0(z) && (we.tagNameCheck instanceof RegExp && ft(we.tagNameCheck, z) || we.tagNameCheck instanceof Function && we.tagNameCheck(z)) && (we.attributeNameCheck instanceof RegExp && ft(we.attributeNameCheck, x) || we.attributeNameCheck instanceof Function && we.attributeNameCheck(x)) || // Alternative, second condition checks if it's an `is`-attribute, AND
            // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            x === "is" && we.allowCustomizedBuiltInElements && (we.tagNameCheck instanceof RegExp && ft(we.tagNameCheck, ne) || we.tagNameCheck instanceof Function && we.tagNameCheck(ne)))
          )
            return !1;
        } else if (!Ft[x]) {
          if (!ft($, kn(ne, mt, ""))) {
            if (!((x === "src" || x === "xlink:href" || x === "href") && z !== "script" && I4(ne, "data:") === 0 && cn[z])) {
              if (!(g0 && !ft(st, kn(ne, mt, "")))) {
                if (ne)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, y0 = function(z) {
    return z !== "annotation-xml" && Hl(z, Oe);
  }, oe = function(z) {
    De("beforeSanitizeAttributes", z, null);
    const {
      attributes: x
    } = z;
    if (!x)
      return;
    const ne = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: he
    };
    let F = x.length;
    for (; F--; ) {
      const Je = x[F], {
        name: Qe,
        namespaceURI: ot,
        value: $e
      } = Je, ue = je(Qe);
      let et = Qe === "value" ? $e : L4($e);
      if (ne.attrName = ue, ne.attrValue = et, ne.keepAttr = !0, ne.forceKeepAttr = void 0, De("uponSanitizeAttribute", z, ne), et = ne.attrValue, ne.forceKeepAttr || (h(Qe, z), !ne.keepAttr))
        continue;
      if (!bt && ft(/\/>/i, et)) {
        h(Qe, z);
        continue;
      }
      if (b0 && ft(/((--!?|])>)|<\/(style|title)/i, et)) {
        h(Qe, z);
        continue;
      }
      it && lr([ce, pe, ve], (dn) => {
        et = kn(et, dn, " ");
      });
      const P0 = je(z.nodeName);
      if (lt(P0, ue, et)) {
        if (O0 && (ue === "id" || ue === "name") && (h(Qe, z), et = Nn + et), S && typeof P == "object" && typeof P.getAttributeType == "function" && !ot)
          switch (P.getAttributeType(P0, ue)) {
            case "TrustedHTML": {
              et = S.createHTML(et);
              break;
            }
            case "TrustedScriptURL": {
              et = S.createScriptURL(et);
              break;
            }
          }
        try {
          ot ? z.setAttributeNS(ot, Qe, et) : z.setAttribute(Qe, et), w(z) ? ye(z) : Pl(n.removed);
        } catch {
        }
      }
    }
    De("afterSanitizeAttributes", z, null);
  }, Xe = function re(z) {
    let x = null;
    const ne = X(z);
    for (De("beforeSanitizeShadowDOM", z, null); x = ne.nextNode(); ) {
      if (De("uponSanitizeShadowNode", x, null), te(x))
        continue;
      const F = A(x);
      x.nodeType === G0.element && (F && F.__depth ? x.__depth = (x.__removalCount || 0) + F.__depth + 1 : x.__depth = 1), (x.__depth >= qn || x.__depth < 0 || Ul(x.__depth)) && ye(x), x.content instanceof u && (x.content.__depth = x.__depth, re(x.content)), oe(x);
    }
    De("afterSanitizeShadowDOM", z, null);
  };
  return n.sanitize = function(re) {
    let z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = null, ne = null, F = null, Je = null;
    if (Q = !re, Q && (re = "<!-->"), typeof re != "string" && !E(re))
      if (typeof re.toString == "function") {
        if (re = re.toString(), typeof re != "string")
          throw Dn("dirty is not a string, aborting");
      } else
        throw Dn("toString is not a function");
    if (!n.isSupported)
      return re;
    if (w0 || Lt(z), n.removed = [], typeof re == "string" && (_0 = !1), _0) {
      if (re.nodeName) {
        const $e = je(re.nodeName);
        if (!Fe[$e] || ie[$e])
          throw Dn("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (re instanceof p)
      x = d("<!---->"), ne = x.ownerDocument.importNode(re, !0), ne.nodeType === G0.element && ne.nodeName === "BODY" || ne.nodeName === "HTML" ? x = ne : x.appendChild(ne);
    else {
      if (!St && !it && !ct && // eslint-disable-next-line unicorn/prefer-includes
      re.indexOf("<") === -1)
        return S && r0 ? S.createHTML(re) : re;
      if (x = d(re), !x)
        return St ? null : r0 ? M : "";
    }
    x && At && ye(x.firstChild);
    const Qe = X(_0 ? re : x);
    for (; F = Qe.nextNode(); ) {
      if (te(F))
        continue;
      const $e = A(F);
      F.nodeType === G0.element && ($e && $e.__depth ? F.__depth = (F.__removalCount || 0) + $e.__depth + 1 : F.__depth = 1), (F.__depth >= qn || F.__depth < 0 || Ul(F.__depth)) && ye(F), F.content instanceof u && (F.content.__depth = F.__depth, Xe(F.content)), oe(F);
    }
    if (_0)
      return re;
    if (St) {
      if (K0)
        for (Je = H.call(x.ownerDocument); x.firstChild; )
          Je.appendChild(x.firstChild);
      else
        Je = x;
      return (he.shadowroot || he.shadowrootmode) && (Je = K.call(i, Je, !0)), Je;
    }
    let ot = ct ? x.outerHTML : x.innerHTML;
    return ct && Fe["!doctype"] && x.ownerDocument && x.ownerDocument.doctype && x.ownerDocument.doctype.name && ft(uo, x.ownerDocument.doctype.name) && (ot = "<!DOCTYPE " + x.ownerDocument.doctype.name + `>
` + ot), it && lr([ce, pe, ve], ($e) => {
      ot = kn(ot, $e, " ");
    }), S && r0 ? S.createHTML(ot) : ot;
  }, n.setConfig = function() {
    let re = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    Lt(re), w0 = !0;
  }, n.clearConfig = function() {
    T0 = null, w0 = !1;
  }, n.isValidAttribute = function(re, z, x) {
    T0 || Lt({});
    const ne = je(re), F = je(z);
    return lt(ne, F, x);
  }, n.addHook = function(re, z) {
    typeof z == "function" && (le[re] = le[re] || [], yn(le[re], z));
  }, n.removeHook = function(re) {
    if (le[re])
      return Pl(le[re]);
  }, n.removeHooks = function(re) {
    le[re] && (le[re] = []);
  }, n.removeAllHooks = function() {
    le = {};
  }, n;
}
var Yl = co(), Dr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ho(a) {
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
}
var fo = { exports: {} }, Ts = { exports: {} }, Zl;
function J4() {
  return Zl || (Zl = 1, function(a, n) {
    (function(i, o) {
      a.exports = o();
    })(typeof self < "u" ? self : Dr, function() {
      return (
        /******/
        function() {
          var s = {};
          (function() {
            s.d = function(t, e) {
              for (var r in e)
                s.o(e, r) && !s.o(t, r) && Object.defineProperty(t, r, { enumerable: !0, get: e[r] });
            };
          })(), function() {
            s.o = function(t, e) {
              return Object.prototype.hasOwnProperty.call(t, e);
            };
          }();
          var i = {};
          s.d(i, {
            default: function() {
              return (
                /* binding */
                Ju
              );
            }
          });
          class o {
            // Error start position based on passed-in Token or ParseNode.
            // Length of affected text based on passed-in Token or ParseNode.
            // The underlying error message without any context added.
            constructor(e, r) {
              this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
              let l = "KaTeX parse error: " + e, c, m;
              const b = r && r.loc;
              if (b && b.start <= b.end) {
                const v = b.lexer.input;
                c = b.start, m = b.end, c === v.length ? l += " at end of input: " : l += " at position " + (c + 1) + ": ";
                const C = v.slice(c, m).replace(/[^]/g, "$&̲");
                let N;
                c > 15 ? N = "…" + v.slice(c - 15, c) : N = v.slice(0, c);
                let R;
                m + 15 < v.length ? R = v.slice(m, m + 15) + "…" : R = v.slice(m), l += N + C + R;
              }
              const y = new Error(l);
              return y.name = "ParseError", y.__proto__ = o.prototype, y.position = c, c != null && m != null && (y.length = m - c), y.rawMessage = e, y;
            }
          }
          o.prototype.__proto__ = Error.prototype;
          var u = o;
          const f = function(t, e) {
            return t.indexOf(e) !== -1;
          }, p = function(t, e) {
            return t === void 0 ? e : t;
          }, g = /([A-Z])/g, _ = function(t) {
            return t.replace(g, "-$1").toLowerCase();
          }, k = {
            "&": "&amp;",
            ">": "&gt;",
            "<": "&lt;",
            '"': "&quot;",
            "'": "&#x27;"
          }, T = /[&><"']/g;
          function B(t) {
            return String(t).replace(T, (e) => k[e]);
          }
          const P = function(t) {
            return t.type === "ordgroup" || t.type === "color" ? t.body.length === 1 ? P(t.body[0]) : t : t.type === "font" ? P(t.body) : t;
          }, W = function(t) {
            const e = P(t);
            return e.type === "mathord" || e.type === "textord" || e.type === "atom";
          }, j = function(t) {
            if (!t)
              throw new Error("Expected non-null, but got " + String(t));
            return t;
          };
          var U = {
            contains: f,
            deflt: p,
            escape: B,
            hyphenate: _,
            getBaseElem: P,
            isCharacterBox: W,
            protocolFromUrl: function(t) {
              const e = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);
              return e ? e[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1]) ? null : e[1].toLowerCase() : "_relative";
            }
          };
          const A = {
            displayMode: {
              type: "boolean",
              description: "Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",
              cli: "-d, --display-mode"
            },
            output: {
              type: {
                enum: ["htmlAndMathml", "html", "mathml"]
              },
              description: "Determines the markup language of the output.",
              cli: "-F, --format <type>"
            },
            leqno: {
              type: "boolean",
              description: "Render display math in leqno style (left-justified tags)."
            },
            fleqn: {
              type: "boolean",
              description: "Render display math flush left."
            },
            throwOnError: {
              type: "boolean",
              default: !0,
              cli: "-t, --no-throw-on-error",
              cliDescription: "Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."
            },
            errorColor: {
              type: "string",
              default: "#cc0000",
              cli: "-c, --error-color <color>",
              cliDescription: "A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",
              cliProcessor: (t) => "#" + t
            },
            macros: {
              type: "object",
              cli: "-m, --macro <def>",
              cliDescription: "Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",
              cliDefault: [],
              cliProcessor: (t, e) => (e.push(t), e)
            },
            minRuleThickness: {
              type: "number",
              description: "Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",
              processor: (t) => Math.max(0, t),
              cli: "--min-rule-thickness <size>",
              cliProcessor: parseFloat
            },
            colorIsTextColor: {
              type: "boolean",
              description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",
              cli: "-b, --color-is-text-color"
            },
            strict: {
              type: [{
                enum: ["warn", "ignore", "error"]
              }, "boolean", "function"],
              description: "Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",
              cli: "-S, --strict",
              cliDefault: !1
            },
            trust: {
              type: ["boolean", "function"],
              description: "Trust the input, enabling all HTML features such as \\url.",
              cli: "-T, --trust"
            },
            maxSize: {
              type: "number",
              default: 1 / 0,
              description: "If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",
              processor: (t) => Math.max(0, t),
              cli: "-s, --max-size <n>",
              cliProcessor: parseInt
            },
            maxExpand: {
              type: "number",
              default: 1e3,
              description: "Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",
              processor: (t) => Math.max(0, t),
              cli: "-e, --max-expand <n>",
              cliProcessor: (t) => t === "Infinity" ? 1 / 0 : parseInt(t)
            },
            globalGroup: {
              type: "boolean",
              cli: !1
            }
          };
          function S(t) {
            if (t.default)
              return t.default;
            const e = t.type, r = Array.isArray(e) ? e[0] : e;
            if (typeof r != "string")
              return r.enum[0];
            switch (r) {
              case "boolean":
                return !1;
              case "string":
                return "";
              case "number":
                return 0;
              case "object":
                return {};
            }
          }
          class M {
            constructor(e) {
              this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, e = e || {};
              for (const r in A)
                if (A.hasOwnProperty(r)) {
                  const l = A[r];
                  this[r] = e[r] !== void 0 ? l.processor ? l.processor(e[r]) : e[r] : S(l);
                }
            }
            /**
             * Report nonstrict (non-LaTeX-compatible) input.
             * Can safely not be called if `this.strict` is false in JavaScript.
             */
            reportNonstrict(e, r, l) {
              let c = this.strict;
              if (typeof c == "function" && (c = c(e, r, l)), !(!c || c === "ignore")) {
                if (c === !0 || c === "error")
                  throw new u("LaTeX-incompatible input and strict mode is set to 'error': " + (r + " [" + e + "]"), l);
                c === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (r + " [" + e + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + c + "': " + r + " [" + e + "]"));
              }
            }
            /**
             * Check whether to apply strict (LaTeX-adhering) behavior for unusual
             * input (like `\\`).  Unlike `nonstrict`, will not throw an error;
             * instead, "error" translates to a return value of `true`, while "ignore"
             * translates to a return value of `false`.  May still print a warning:
             * "warn" prints a warning and returns `false`.
             * This is for the second category of `errorCode`s listed in the README.
             */
            useStrictBehavior(e, r, l) {
              let c = this.strict;
              if (typeof c == "function")
                try {
                  c = c(e, r, l);
                } catch {
                  c = "error";
                }
              return !c || c === "ignore" ? !1 : c === !0 || c === "error" ? !0 : c === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (r + " [" + e + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + c + "': " + r + " [" + e + "]")), !1);
            }
            /**
             * Check whether to test potentially dangerous input, and return
             * `true` (trusted) or `false` (untrusted).  The sole argument `context`
             * should be an object with `command` field specifying the relevant LaTeX
             * command (as a string starting with `\`), and any other arguments, etc.
             * If `context` has a `url` field, a `protocol` field will automatically
             * get added by this function (changing the specified object).
             */
            isTrusted(e) {
              if (e.url && !e.protocol) {
                const l = U.protocolFromUrl(e.url);
                if (l == null)
                  return !1;
                e.protocol = l;
              }
              return !!(typeof this.trust == "function" ? this.trust(e) : this.trust);
            }
          }
          class I {
            constructor(e, r, l) {
              this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = r, this.cramped = l;
            }
            /**
             * Get the style of a superscript given a base in the current style.
             */
            sup() {
              return Ie[ut[this.id]];
            }
            /**
             * Get the style of a subscript given a base in the current style.
             */
            sub() {
              return Ie[st[this.id]];
            }
            /**
             * Get the style of a fraction numerator given the fraction in the current
             * style.
             */
            fracNum() {
              return Ie[mt[this.id]];
            }
            /**
             * Get the style of a fraction denominator given the fraction in the current
             * style.
             */
            fracDen() {
              return Ie[Oe[this.id]];
            }
            /**
             * Get the cramped version of a style (in particular, cramping a cramped style
             * doesn't change the style).
             */
            cramp() {
              return Ie[$[this.id]];
            }
            /**
             * Get a text or display version of this style.
             */
            text() {
              return Ie[Fe[this.id]];
            }
            /**
             * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
             */
            isTight() {
              return this.size >= 2;
            }
          }
          const O = 0, H = 1, J = 2, K = 3, le = 4, ce = 5, pe = 6, ve = 7, Ie = [new I(O, 0, !1), new I(H, 0, !0), new I(J, 1, !1), new I(K, 1, !0), new I(le, 2, !1), new I(ce, 2, !0), new I(pe, 3, !1), new I(ve, 3, !0)], ut = [le, ce, le, ce, pe, ve, pe, ve], st = [ce, ce, ce, ce, ve, ve, ve, ve], mt = [J, K, le, ce, pe, ve, pe, ve], Oe = [K, K, ce, ce, ve, ve, ve, ve], $ = [H, H, K, K, ce, ce, ve, ve], Fe = [O, H, J, K, J, K, J, K];
          var V = {
            DISPLAY: Ie[O],
            TEXT: Ie[J],
            SCRIPT: Ie[le],
            SCRIPTSCRIPT: Ie[pe]
          };
          const he = [{
            // Latin characters beyond the Latin-1 characters we have metrics for.
            // Needed for Czech, Hungarian and Turkish text, for example.
            name: "latin",
            blocks: [
              [256, 591],
              // Latin Extended-A and Latin Extended-B
              [768, 879]
              // Combining Diacritical marks
            ]
          }, {
            // The Cyrillic script used by Russian and related languages.
            // A Cyrillic subset used to be supported as explicitly defined
            // symbols in symbols.js
            name: "cyrillic",
            blocks: [[1024, 1279]]
          }, {
            // Armenian
            name: "armenian",
            blocks: [[1328, 1423]]
          }, {
            // The Brahmic scripts of South and Southeast Asia
            // Devanagari (0900–097F)
            // Bengali (0980–09FF)
            // Gurmukhi (0A00–0A7F)
            // Gujarati (0A80–0AFF)
            // Oriya (0B00–0B7F)
            // Tamil (0B80–0BFF)
            // Telugu (0C00–0C7F)
            // Kannada (0C80–0CFF)
            // Malayalam (0D00–0D7F)
            // Sinhala (0D80–0DFF)
            // Thai (0E00–0E7F)
            // Lao (0E80–0EFF)
            // Tibetan (0F00–0FFF)
            // Myanmar (1000–109F)
            name: "brahmic",
            blocks: [[2304, 4255]]
          }, {
            name: "georgian",
            blocks: [[4256, 4351]]
          }, {
            // Chinese and Japanese.
            // The "k" in cjk is for Korean, but we've separated Korean out
            name: "cjk",
            blocks: [
              [12288, 12543],
              // CJK symbols and punctuation, Hiragana, Katakana
              [19968, 40879],
              // CJK ideograms
              [65280, 65376]
              // Fullwidth punctuation
              // TODO: add halfwidth Katakana and Romanji glyphs
            ]
          }, {
            // Korean
            name: "hangul",
            blocks: [[44032, 55215]]
          }];
          function Ke(t) {
            for (let e = 0; e < he.length; e++) {
              const r = he[e];
              for (let l = 0; l < r.blocks.length; l++) {
                const c = r.blocks[l];
                if (t >= c[0] && t <= c[1])
                  return r.name;
              }
            }
            return null;
          }
          const we = [];
          he.forEach((t) => t.blocks.forEach((e) => we.push(...e)));
          function ie(t) {
            for (let e = 0; e < we.length; e += 2)
              if (t >= we[e] && t <= we[e + 1])
                return !0;
            return !1;
          }
          const at = 80, pt = function(t, e) {
            return "M95," + (622 + t + e) + `
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l` + t / 2.075 + " -" + t + `
c5.3,-9.3,12,-14,20,-14
H400000v` + (40 + t) + `H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M` + (834 + t) + " " + e + "h400000v" + (40 + t) + "h-400000z";
          }, gt = function(t, e) {
            return "M263," + (601 + t + e) + `c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l` + t / 2.084 + " -" + t + `
c4.7,-7.3,11,-11,19,-11
H40000v` + (40 + t) + `H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M` + (1001 + t) + " " + e + "h400000v" + (40 + t) + "h-400000z";
          }, g0 = function(t, e) {
            return "M983 " + (10 + t + e) + `
l` + t / 3.13 + " -" + t + `
c4,-6.7,10,-10,18,-10 H400000v` + (40 + t) + `
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M` + (1001 + t) + " " + e + "h400000v" + (40 + t) + "h-400000z";
          }, bt = function(t, e) {
            return "M424," + (2398 + t + e) + `
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l` + t / 4.223 + " -" + t + `c4,-6.7,10,-10,18,-10 H400000
v` + (40 + t) + `H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M` + (1001 + t) + " " + e + `
h400000v` + (40 + t) + "h-400000z";
          }, it = function(t, e) {
            return "M473," + (2713 + t + e) + `
c339.3,-1799.3,509.3,-2700,510,-2702 l` + t / 5.298 + " -" + t + `
c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + t) + `H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM` + (1001 + t) + " " + e + "h400000v" + (40 + t) + "H1017.7z";
          }, b0 = function(t) {
            const e = t / 2;
            return "M400000 " + t + " H0 L" + e + " 0 l65 45 L145 " + (t - 80) + " H400000z";
          }, ct = function(t, e, r) {
            const l = r - 54 - e - t;
            return "M702 " + (t + e) + "H400000" + (40 + t) + `
H742v` + l + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 ` + e + "H400000v" + (40 + t) + "H742z";
          }, w0 = function(t, e, r) {
            e = 1e3 * e;
            let l = "";
            switch (t) {
              case "sqrtMain":
                l = pt(e, at);
                break;
              case "sqrtSize1":
                l = gt(e, at);
                break;
              case "sqrtSize2":
                l = g0(e, at);
                break;
              case "sqrtSize3":
                l = bt(e, at);
                break;
              case "sqrtSize4":
                l = it(e, at);
                break;
              case "sqrtTall":
                l = ct(e, at, r);
            }
            return l;
          }, At = function(t, e) {
            switch (t) {
              case "⎜":
                return "M291 0 H417 V" + e + " H291z M291 0 H417 V" + e + " H291z";
              case "∣":
                return "M145 0 H188 V" + e + " H145z M145 0 H188 V" + e + " H145z";
              case "∥":
                return "M145 0 H188 V" + e + " H145z M145 0 H188 V" + e + " H145z" + ("M367 0 H410 V" + e + " H367z M367 0 H410 V" + e + " H367z");
              case "⎟":
                return "M457 0 H583 V" + e + " H457z M457 0 H583 V" + e + " H457z";
              case "⎢":
                return "M319 0 H403 V" + e + " H319z M319 0 H403 V" + e + " H319z";
              case "⎥":
                return "M263 0 H347 V" + e + " H263z M263 0 H347 V" + e + " H263z";
              case "⎪":
                return "M384 0 H504 V" + e + " H384z M384 0 H504 V" + e + " H384z";
              case "⏐":
                return "M312 0 H355 V" + e + " H312z M312 0 H355 V" + e + " H312z";
              case "‖":
                return "M257 0 H300 V" + e + " H257z M257 0 H300 V" + e + " H257z" + ("M478 0 H521 V" + e + " H478z M478 0 H521 V" + e + " H478z");
              default:
                return "";
            }
          }, St = {
            // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
            doubleleftarrow: `M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,
            // doublerightarrow is from glyph U+21D2 in font KaTeX Main
            doublerightarrow: `M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,
            // leftarrow is from glyph U+2190 in font KaTeX Main
            leftarrow: `M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,
            // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
            leftbrace: `M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,
            leftbraceunder: `M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,
            // overgroup is from the MnSymbol package (public domain)
            leftgroup: `M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,
            leftgroupunder: `M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,
            // Harpoons are from glyph U+21BD in font KaTeX Main
            leftharpoon: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,
            leftharpoonplus: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,
            leftharpoondown: `M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,
            leftharpoondownplus: `M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,
            // hook is from glyph U+21A9 in font KaTeX Main
            lefthook: `M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,
            leftlinesegment: `M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,
            leftmapsto: `M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,
            // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
            leftToFrom: `M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,
            longequal: `M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,
            midbrace: `M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,
            midbraceunder: `M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,
            oiintSize1: `M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,
            oiintSize2: `M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,
            oiiintSize1: `M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,
            oiiintSize2: `M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,
            rightarrow: `M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,
            rightbrace: `M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,
            rightbraceunder: `M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,
            rightgroup: `M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,
            rightgroupunder: `M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,
            rightharpoon: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,
            rightharpoonplus: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,
            rightharpoondown: `M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,
            rightharpoondownplus: `M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,
            righthook: `M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,
            rightlinesegment: `M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,
            rightToFrom: `M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,
            // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
            twoheadleftarrow: `M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,
            twoheadrightarrow: `M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,
            // tilde1 is a modified version of a glyph from the MnSymbol package
            tilde1: `M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,
            // ditto tilde2, tilde3, & tilde4
            tilde2: `M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,
            tilde3: `M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,
            tilde4: `M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,
            // vec is from glyph U+20D7 in font KaTeX Main
            vec: `M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,
            // widehat1 is a modified version of a glyph from the MnSymbol package
            widehat1: `M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,
            // ditto widehat2, widehat3, & widehat4
            widehat2: `M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
            widehat3: `M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
            widehat4: `M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
            // widecheck paths are all inverted versions of widehat
            widecheck1: `M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,
            widecheck2: `M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
            widecheck3: `M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
            widecheck4: `M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
            // The next ten paths support reaction arrows from the mhchem package.
            // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
            // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
            baraboveleftarrow: `M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
            // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
            rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,
            // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
            // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
            baraboveshortleftharpoon: `M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,
            rightharpoonaboveshortbar: `M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,
            shortbaraboveleftharpoon: `M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,
            shortrightharpoonabovebar: `M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`
          }, K0 = function(t, e) {
            switch (t) {
              case "lbrack":
                return "M403 1759 V84 H666 V0 H319 V1759 v" + e + ` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v` + e + " v1759 h84z";
              case "rbrack":
                return "M347 1759 V0 H0 V84 H263 V1759 v" + e + ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v` + e + " v1759 h84z";
              case "vert":
                return "M145 15 v585 v" + e + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -e + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + e + " v585 h43z";
              case "doublevert":
                return "M145 15 v585 v" + e + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -e + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + e + ` v585 h43z
M367 15 v585 v` + e + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -e + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + e + " v585 h43z";
              case "lfloor":
                return "M319 602 V0 H403 V602 v" + e + ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v` + e + " v1715 H319z";
              case "rfloor":
                return "M319 602 V0 H403 V602 v" + e + ` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v` + e + " v1715 H319z";
              case "lceil":
                return "M403 1759 V84 H666 V0 H319 V1759 v" + e + ` v602 h84z
M403 1759 V0 H319 V1759 v` + e + " v602 h84z";
              case "rceil":
                return "M347 1759 V0 H0 V84 H263 V1759 v" + e + ` v602 h84z
M347 1759 V0 h-84 V1759 v` + e + " v602 h84z";
              case "lparen":
                return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,` + (e + 84) + `c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-` + (e + 92) + `c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
              case "rparen":
                return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,` + (e + 9) + `
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-` + (e + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
              default:
                throw new Error("Unknown stretchy delimiter.");
            }
          };
          class r0 {
            // HtmlDomNode
            // Never used; needed for satisfying interface.
            constructor(e) {
              this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
            }
            hasClass(e) {
              return U.contains(this.classes, e);
            }
            /** Convert the fragment into a node. */
            toNode() {
              const e = document.createDocumentFragment();
              for (let r = 0; r < this.children.length; r++)
                e.appendChild(this.children[r].toNode());
              return e;
            }
            /** Convert the fragment into HTML markup. */
            toMarkup() {
              let e = "";
              for (let r = 0; r < this.children.length; r++)
                e += this.children[r].toMarkup();
              return e;
            }
            /**
             * Converts the math node into a string, similar to innerText. Applies to
             * MathDomNode's only.
             */
            toText() {
              const e = (r) => r.toText();
              return this.children.map(e).join("");
            }
          }
          var Et = {
            "AMS-Regular": {
              32: [0, 0, 0, 0, 0.25],
              65: [0, 0.68889, 0, 0, 0.72222],
              66: [0, 0.68889, 0, 0, 0.66667],
              67: [0, 0.68889, 0, 0, 0.72222],
              68: [0, 0.68889, 0, 0, 0.72222],
              69: [0, 0.68889, 0, 0, 0.66667],
              70: [0, 0.68889, 0, 0, 0.61111],
              71: [0, 0.68889, 0, 0, 0.77778],
              72: [0, 0.68889, 0, 0, 0.77778],
              73: [0, 0.68889, 0, 0, 0.38889],
              74: [0.16667, 0.68889, 0, 0, 0.5],
              75: [0, 0.68889, 0, 0, 0.77778],
              76: [0, 0.68889, 0, 0, 0.66667],
              77: [0, 0.68889, 0, 0, 0.94445],
              78: [0, 0.68889, 0, 0, 0.72222],
              79: [0.16667, 0.68889, 0, 0, 0.77778],
              80: [0, 0.68889, 0, 0, 0.61111],
              81: [0.16667, 0.68889, 0, 0, 0.77778],
              82: [0, 0.68889, 0, 0, 0.72222],
              83: [0, 0.68889, 0, 0, 0.55556],
              84: [0, 0.68889, 0, 0, 0.66667],
              85: [0, 0.68889, 0, 0, 0.72222],
              86: [0, 0.68889, 0, 0, 0.72222],
              87: [0, 0.68889, 0, 0, 1],
              88: [0, 0.68889, 0, 0, 0.72222],
              89: [0, 0.68889, 0, 0, 0.72222],
              90: [0, 0.68889, 0, 0, 0.66667],
              107: [0, 0.68889, 0, 0, 0.55556],
              160: [0, 0, 0, 0, 0.25],
              165: [0, 0.675, 0.025, 0, 0.75],
              174: [0.15559, 0.69224, 0, 0, 0.94666],
              240: [0, 0.68889, 0, 0, 0.55556],
              295: [0, 0.68889, 0, 0, 0.54028],
              710: [0, 0.825, 0, 0, 2.33334],
              732: [0, 0.9, 0, 0, 2.33334],
              770: [0, 0.825, 0, 0, 2.33334],
              771: [0, 0.9, 0, 0, 2.33334],
              989: [0.08167, 0.58167, 0, 0, 0.77778],
              1008: [0, 0.43056, 0.04028, 0, 0.66667],
              8245: [0, 0.54986, 0, 0, 0.275],
              8463: [0, 0.68889, 0, 0, 0.54028],
              8487: [0, 0.68889, 0, 0, 0.72222],
              8498: [0, 0.68889, 0, 0, 0.55556],
              8502: [0, 0.68889, 0, 0, 0.66667],
              8503: [0, 0.68889, 0, 0, 0.44445],
              8504: [0, 0.68889, 0, 0, 0.66667],
              8513: [0, 0.68889, 0, 0, 0.63889],
              8592: [-0.03598, 0.46402, 0, 0, 0.5],
              8594: [-0.03598, 0.46402, 0, 0, 0.5],
              8602: [-0.13313, 0.36687, 0, 0, 1],
              8603: [-0.13313, 0.36687, 0, 0, 1],
              8606: [0.01354, 0.52239, 0, 0, 1],
              8608: [0.01354, 0.52239, 0, 0, 1],
              8610: [0.01354, 0.52239, 0, 0, 1.11111],
              8611: [0.01354, 0.52239, 0, 0, 1.11111],
              8619: [0, 0.54986, 0, 0, 1],
              8620: [0, 0.54986, 0, 0, 1],
              8621: [-0.13313, 0.37788, 0, 0, 1.38889],
              8622: [-0.13313, 0.36687, 0, 0, 1],
              8624: [0, 0.69224, 0, 0, 0.5],
              8625: [0, 0.69224, 0, 0, 0.5],
              8630: [0, 0.43056, 0, 0, 1],
              8631: [0, 0.43056, 0, 0, 1],
              8634: [0.08198, 0.58198, 0, 0, 0.77778],
              8635: [0.08198, 0.58198, 0, 0, 0.77778],
              8638: [0.19444, 0.69224, 0, 0, 0.41667],
              8639: [0.19444, 0.69224, 0, 0, 0.41667],
              8642: [0.19444, 0.69224, 0, 0, 0.41667],
              8643: [0.19444, 0.69224, 0, 0, 0.41667],
              8644: [0.1808, 0.675, 0, 0, 1],
              8646: [0.1808, 0.675, 0, 0, 1],
              8647: [0.1808, 0.675, 0, 0, 1],
              8648: [0.19444, 0.69224, 0, 0, 0.83334],
              8649: [0.1808, 0.675, 0, 0, 1],
              8650: [0.19444, 0.69224, 0, 0, 0.83334],
              8651: [0.01354, 0.52239, 0, 0, 1],
              8652: [0.01354, 0.52239, 0, 0, 1],
              8653: [-0.13313, 0.36687, 0, 0, 1],
              8654: [-0.13313, 0.36687, 0, 0, 1],
              8655: [-0.13313, 0.36687, 0, 0, 1],
              8666: [0.13667, 0.63667, 0, 0, 1],
              8667: [0.13667, 0.63667, 0, 0, 1],
              8669: [-0.13313, 0.37788, 0, 0, 1],
              8672: [-0.064, 0.437, 0, 0, 1.334],
              8674: [-0.064, 0.437, 0, 0, 1.334],
              8705: [0, 0.825, 0, 0, 0.5],
              8708: [0, 0.68889, 0, 0, 0.55556],
              8709: [0.08167, 0.58167, 0, 0, 0.77778],
              8717: [0, 0.43056, 0, 0, 0.42917],
              8722: [-0.03598, 0.46402, 0, 0, 0.5],
              8724: [0.08198, 0.69224, 0, 0, 0.77778],
              8726: [0.08167, 0.58167, 0, 0, 0.77778],
              8733: [0, 0.69224, 0, 0, 0.77778],
              8736: [0, 0.69224, 0, 0, 0.72222],
              8737: [0, 0.69224, 0, 0, 0.72222],
              8738: [0.03517, 0.52239, 0, 0, 0.72222],
              8739: [0.08167, 0.58167, 0, 0, 0.22222],
              8740: [0.25142, 0.74111, 0, 0, 0.27778],
              8741: [0.08167, 0.58167, 0, 0, 0.38889],
              8742: [0.25142, 0.74111, 0, 0, 0.5],
              8756: [0, 0.69224, 0, 0, 0.66667],
              8757: [0, 0.69224, 0, 0, 0.66667],
              8764: [-0.13313, 0.36687, 0, 0, 0.77778],
              8765: [-0.13313, 0.37788, 0, 0, 0.77778],
              8769: [-0.13313, 0.36687, 0, 0, 0.77778],
              8770: [-0.03625, 0.46375, 0, 0, 0.77778],
              8774: [0.30274, 0.79383, 0, 0, 0.77778],
              8776: [-0.01688, 0.48312, 0, 0, 0.77778],
              8778: [0.08167, 0.58167, 0, 0, 0.77778],
              8782: [0.06062, 0.54986, 0, 0, 0.77778],
              8783: [0.06062, 0.54986, 0, 0, 0.77778],
              8785: [0.08198, 0.58198, 0, 0, 0.77778],
              8786: [0.08198, 0.58198, 0, 0, 0.77778],
              8787: [0.08198, 0.58198, 0, 0, 0.77778],
              8790: [0, 0.69224, 0, 0, 0.77778],
              8791: [0.22958, 0.72958, 0, 0, 0.77778],
              8796: [0.08198, 0.91667, 0, 0, 0.77778],
              8806: [0.25583, 0.75583, 0, 0, 0.77778],
              8807: [0.25583, 0.75583, 0, 0, 0.77778],
              8808: [0.25142, 0.75726, 0, 0, 0.77778],
              8809: [0.25142, 0.75726, 0, 0, 0.77778],
              8812: [0.25583, 0.75583, 0, 0, 0.5],
              8814: [0.20576, 0.70576, 0, 0, 0.77778],
              8815: [0.20576, 0.70576, 0, 0, 0.77778],
              8816: [0.30274, 0.79383, 0, 0, 0.77778],
              8817: [0.30274, 0.79383, 0, 0, 0.77778],
              8818: [0.22958, 0.72958, 0, 0, 0.77778],
              8819: [0.22958, 0.72958, 0, 0, 0.77778],
              8822: [0.1808, 0.675, 0, 0, 0.77778],
              8823: [0.1808, 0.675, 0, 0, 0.77778],
              8828: [0.13667, 0.63667, 0, 0, 0.77778],
              8829: [0.13667, 0.63667, 0, 0, 0.77778],
              8830: [0.22958, 0.72958, 0, 0, 0.77778],
              8831: [0.22958, 0.72958, 0, 0, 0.77778],
              8832: [0.20576, 0.70576, 0, 0, 0.77778],
              8833: [0.20576, 0.70576, 0, 0, 0.77778],
              8840: [0.30274, 0.79383, 0, 0, 0.77778],
              8841: [0.30274, 0.79383, 0, 0, 0.77778],
              8842: [0.13597, 0.63597, 0, 0, 0.77778],
              8843: [0.13597, 0.63597, 0, 0, 0.77778],
              8847: [0.03517, 0.54986, 0, 0, 0.77778],
              8848: [0.03517, 0.54986, 0, 0, 0.77778],
              8858: [0.08198, 0.58198, 0, 0, 0.77778],
              8859: [0.08198, 0.58198, 0, 0, 0.77778],
              8861: [0.08198, 0.58198, 0, 0, 0.77778],
              8862: [0, 0.675, 0, 0, 0.77778],
              8863: [0, 0.675, 0, 0, 0.77778],
              8864: [0, 0.675, 0, 0, 0.77778],
              8865: [0, 0.675, 0, 0, 0.77778],
              8872: [0, 0.69224, 0, 0, 0.61111],
              8873: [0, 0.69224, 0, 0, 0.72222],
              8874: [0, 0.69224, 0, 0, 0.88889],
              8876: [0, 0.68889, 0, 0, 0.61111],
              8877: [0, 0.68889, 0, 0, 0.61111],
              8878: [0, 0.68889, 0, 0, 0.72222],
              8879: [0, 0.68889, 0, 0, 0.72222],
              8882: [0.03517, 0.54986, 0, 0, 0.77778],
              8883: [0.03517, 0.54986, 0, 0, 0.77778],
              8884: [0.13667, 0.63667, 0, 0, 0.77778],
              8885: [0.13667, 0.63667, 0, 0, 0.77778],
              8888: [0, 0.54986, 0, 0, 1.11111],
              8890: [0.19444, 0.43056, 0, 0, 0.55556],
              8891: [0.19444, 0.69224, 0, 0, 0.61111],
              8892: [0.19444, 0.69224, 0, 0, 0.61111],
              8901: [0, 0.54986, 0, 0, 0.27778],
              8903: [0.08167, 0.58167, 0, 0, 0.77778],
              8905: [0.08167, 0.58167, 0, 0, 0.77778],
              8906: [0.08167, 0.58167, 0, 0, 0.77778],
              8907: [0, 0.69224, 0, 0, 0.77778],
              8908: [0, 0.69224, 0, 0, 0.77778],
              8909: [-0.03598, 0.46402, 0, 0, 0.77778],
              8910: [0, 0.54986, 0, 0, 0.76042],
              8911: [0, 0.54986, 0, 0, 0.76042],
              8912: [0.03517, 0.54986, 0, 0, 0.77778],
              8913: [0.03517, 0.54986, 0, 0, 0.77778],
              8914: [0, 0.54986, 0, 0, 0.66667],
              8915: [0, 0.54986, 0, 0, 0.66667],
              8916: [0, 0.69224, 0, 0, 0.66667],
              8918: [0.0391, 0.5391, 0, 0, 0.77778],
              8919: [0.0391, 0.5391, 0, 0, 0.77778],
              8920: [0.03517, 0.54986, 0, 0, 1.33334],
              8921: [0.03517, 0.54986, 0, 0, 1.33334],
              8922: [0.38569, 0.88569, 0, 0, 0.77778],
              8923: [0.38569, 0.88569, 0, 0, 0.77778],
              8926: [0.13667, 0.63667, 0, 0, 0.77778],
              8927: [0.13667, 0.63667, 0, 0, 0.77778],
              8928: [0.30274, 0.79383, 0, 0, 0.77778],
              8929: [0.30274, 0.79383, 0, 0, 0.77778],
              8934: [0.23222, 0.74111, 0, 0, 0.77778],
              8935: [0.23222, 0.74111, 0, 0, 0.77778],
              8936: [0.23222, 0.74111, 0, 0, 0.77778],
              8937: [0.23222, 0.74111, 0, 0, 0.77778],
              8938: [0.20576, 0.70576, 0, 0, 0.77778],
              8939: [0.20576, 0.70576, 0, 0, 0.77778],
              8940: [0.30274, 0.79383, 0, 0, 0.77778],
              8941: [0.30274, 0.79383, 0, 0, 0.77778],
              8994: [0.19444, 0.69224, 0, 0, 0.77778],
              8995: [0.19444, 0.69224, 0, 0, 0.77778],
              9416: [0.15559, 0.69224, 0, 0, 0.90222],
              9484: [0, 0.69224, 0, 0, 0.5],
              9488: [0, 0.69224, 0, 0, 0.5],
              9492: [0, 0.37788, 0, 0, 0.5],
              9496: [0, 0.37788, 0, 0, 0.5],
              9585: [0.19444, 0.68889, 0, 0, 0.88889],
              9586: [0.19444, 0.74111, 0, 0, 0.88889],
              9632: [0, 0.675, 0, 0, 0.77778],
              9633: [0, 0.675, 0, 0, 0.77778],
              9650: [0, 0.54986, 0, 0, 0.72222],
              9651: [0, 0.54986, 0, 0, 0.72222],
              9654: [0.03517, 0.54986, 0, 0, 0.77778],
              9660: [0, 0.54986, 0, 0, 0.72222],
              9661: [0, 0.54986, 0, 0, 0.72222],
              9664: [0.03517, 0.54986, 0, 0, 0.77778],
              9674: [0.11111, 0.69224, 0, 0, 0.66667],
              9733: [0.19444, 0.69224, 0, 0, 0.94445],
              10003: [0, 0.69224, 0, 0, 0.83334],
              10016: [0, 0.69224, 0, 0, 0.83334],
              10731: [0.11111, 0.69224, 0, 0, 0.66667],
              10846: [0.19444, 0.75583, 0, 0, 0.61111],
              10877: [0.13667, 0.63667, 0, 0, 0.77778],
              10878: [0.13667, 0.63667, 0, 0, 0.77778],
              10885: [0.25583, 0.75583, 0, 0, 0.77778],
              10886: [0.25583, 0.75583, 0, 0, 0.77778],
              10887: [0.13597, 0.63597, 0, 0, 0.77778],
              10888: [0.13597, 0.63597, 0, 0, 0.77778],
              10889: [0.26167, 0.75726, 0, 0, 0.77778],
              10890: [0.26167, 0.75726, 0, 0, 0.77778],
              10891: [0.48256, 0.98256, 0, 0, 0.77778],
              10892: [0.48256, 0.98256, 0, 0, 0.77778],
              10901: [0.13667, 0.63667, 0, 0, 0.77778],
              10902: [0.13667, 0.63667, 0, 0, 0.77778],
              10933: [0.25142, 0.75726, 0, 0, 0.77778],
              10934: [0.25142, 0.75726, 0, 0, 0.77778],
              10935: [0.26167, 0.75726, 0, 0, 0.77778],
              10936: [0.26167, 0.75726, 0, 0, 0.77778],
              10937: [0.26167, 0.75726, 0, 0, 0.77778],
              10938: [0.26167, 0.75726, 0, 0, 0.77778],
              10949: [0.25583, 0.75583, 0, 0, 0.77778],
              10950: [0.25583, 0.75583, 0, 0, 0.77778],
              10955: [0.28481, 0.79383, 0, 0, 0.77778],
              10956: [0.28481, 0.79383, 0, 0, 0.77778],
              57350: [0.08167, 0.58167, 0, 0, 0.22222],
              57351: [0.08167, 0.58167, 0, 0, 0.38889],
              57352: [0.08167, 0.58167, 0, 0, 0.77778],
              57353: [0, 0.43056, 0.04028, 0, 0.66667],
              57356: [0.25142, 0.75726, 0, 0, 0.77778],
              57357: [0.25142, 0.75726, 0, 0, 0.77778],
              57358: [0.41951, 0.91951, 0, 0, 0.77778],
              57359: [0.30274, 0.79383, 0, 0, 0.77778],
              57360: [0.30274, 0.79383, 0, 0, 0.77778],
              57361: [0.41951, 0.91951, 0, 0, 0.77778],
              57366: [0.25142, 0.75726, 0, 0, 0.77778],
              57367: [0.25142, 0.75726, 0, 0, 0.77778],
              57368: [0.25142, 0.75726, 0, 0, 0.77778],
              57369: [0.25142, 0.75726, 0, 0, 0.77778],
              57370: [0.13597, 0.63597, 0, 0, 0.77778],
              57371: [0.13597, 0.63597, 0, 0, 0.77778]
            },
            "Caligraphic-Regular": {
              32: [0, 0, 0, 0, 0.25],
              65: [0, 0.68333, 0, 0.19445, 0.79847],
              66: [0, 0.68333, 0.03041, 0.13889, 0.65681],
              67: [0, 0.68333, 0.05834, 0.13889, 0.52653],
              68: [0, 0.68333, 0.02778, 0.08334, 0.77139],
              69: [0, 0.68333, 0.08944, 0.11111, 0.52778],
              70: [0, 0.68333, 0.09931, 0.11111, 0.71875],
              71: [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
              72: [0, 0.68333, 965e-5, 0.11111, 0.84452],
              73: [0, 0.68333, 0.07382, 0, 0.54452],
              74: [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
              75: [0, 0.68333, 0.01445, 0.05556, 0.76195],
              76: [0, 0.68333, 0, 0.13889, 0.68972],
              77: [0, 0.68333, 0, 0.13889, 1.2009],
              78: [0, 0.68333, 0.14736, 0.08334, 0.82049],
              79: [0, 0.68333, 0.02778, 0.11111, 0.79611],
              80: [0, 0.68333, 0.08222, 0.08334, 0.69556],
              81: [0.09722, 0.68333, 0, 0.11111, 0.81667],
              82: [0, 0.68333, 0, 0.08334, 0.8475],
              83: [0, 0.68333, 0.075, 0.13889, 0.60556],
              84: [0, 0.68333, 0.25417, 0, 0.54464],
              85: [0, 0.68333, 0.09931, 0.08334, 0.62583],
              86: [0, 0.68333, 0.08222, 0, 0.61278],
              87: [0, 0.68333, 0.08222, 0.08334, 0.98778],
              88: [0, 0.68333, 0.14643, 0.13889, 0.7133],
              89: [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
              90: [0, 0.68333, 0.07944, 0.13889, 0.72473],
              160: [0, 0, 0, 0, 0.25]
            },
            "Fraktur-Regular": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69141, 0, 0, 0.29574],
              34: [0, 0.69141, 0, 0, 0.21471],
              38: [0, 0.69141, 0, 0, 0.73786],
              39: [0, 0.69141, 0, 0, 0.21201],
              40: [0.24982, 0.74947, 0, 0, 0.38865],
              41: [0.24982, 0.74947, 0, 0, 0.38865],
              42: [0, 0.62119, 0, 0, 0.27764],
              43: [0.08319, 0.58283, 0, 0, 0.75623],
              44: [0, 0.10803, 0, 0, 0.27764],
              45: [0.08319, 0.58283, 0, 0, 0.75623],
              46: [0, 0.10803, 0, 0, 0.27764],
              47: [0.24982, 0.74947, 0, 0, 0.50181],
              48: [0, 0.47534, 0, 0, 0.50181],
              49: [0, 0.47534, 0, 0, 0.50181],
              50: [0, 0.47534, 0, 0, 0.50181],
              51: [0.18906, 0.47534, 0, 0, 0.50181],
              52: [0.18906, 0.47534, 0, 0, 0.50181],
              53: [0.18906, 0.47534, 0, 0, 0.50181],
              54: [0, 0.69141, 0, 0, 0.50181],
              55: [0.18906, 0.47534, 0, 0, 0.50181],
              56: [0, 0.69141, 0, 0, 0.50181],
              57: [0.18906, 0.47534, 0, 0, 0.50181],
              58: [0, 0.47534, 0, 0, 0.21606],
              59: [0.12604, 0.47534, 0, 0, 0.21606],
              61: [-0.13099, 0.36866, 0, 0, 0.75623],
              63: [0, 0.69141, 0, 0, 0.36245],
              65: [0, 0.69141, 0, 0, 0.7176],
              66: [0, 0.69141, 0, 0, 0.88397],
              67: [0, 0.69141, 0, 0, 0.61254],
              68: [0, 0.69141, 0, 0, 0.83158],
              69: [0, 0.69141, 0, 0, 0.66278],
              70: [0.12604, 0.69141, 0, 0, 0.61119],
              71: [0, 0.69141, 0, 0, 0.78539],
              72: [0.06302, 0.69141, 0, 0, 0.7203],
              73: [0, 0.69141, 0, 0, 0.55448],
              74: [0.12604, 0.69141, 0, 0, 0.55231],
              75: [0, 0.69141, 0, 0, 0.66845],
              76: [0, 0.69141, 0, 0, 0.66602],
              77: [0, 0.69141, 0, 0, 1.04953],
              78: [0, 0.69141, 0, 0, 0.83212],
              79: [0, 0.69141, 0, 0, 0.82699],
              80: [0.18906, 0.69141, 0, 0, 0.82753],
              81: [0.03781, 0.69141, 0, 0, 0.82699],
              82: [0, 0.69141, 0, 0, 0.82807],
              83: [0, 0.69141, 0, 0, 0.82861],
              84: [0, 0.69141, 0, 0, 0.66899],
              85: [0, 0.69141, 0, 0, 0.64576],
              86: [0, 0.69141, 0, 0, 0.83131],
              87: [0, 0.69141, 0, 0, 1.04602],
              88: [0, 0.69141, 0, 0, 0.71922],
              89: [0.18906, 0.69141, 0, 0, 0.83293],
              90: [0.12604, 0.69141, 0, 0, 0.60201],
              91: [0.24982, 0.74947, 0, 0, 0.27764],
              93: [0.24982, 0.74947, 0, 0, 0.27764],
              94: [0, 0.69141, 0, 0, 0.49965],
              97: [0, 0.47534, 0, 0, 0.50046],
              98: [0, 0.69141, 0, 0, 0.51315],
              99: [0, 0.47534, 0, 0, 0.38946],
              100: [0, 0.62119, 0, 0, 0.49857],
              101: [0, 0.47534, 0, 0, 0.40053],
              102: [0.18906, 0.69141, 0, 0, 0.32626],
              103: [0.18906, 0.47534, 0, 0, 0.5037],
              104: [0.18906, 0.69141, 0, 0, 0.52126],
              105: [0, 0.69141, 0, 0, 0.27899],
              106: [0, 0.69141, 0, 0, 0.28088],
              107: [0, 0.69141, 0, 0, 0.38946],
              108: [0, 0.69141, 0, 0, 0.27953],
              109: [0, 0.47534, 0, 0, 0.76676],
              110: [0, 0.47534, 0, 0, 0.52666],
              111: [0, 0.47534, 0, 0, 0.48885],
              112: [0.18906, 0.52396, 0, 0, 0.50046],
              113: [0.18906, 0.47534, 0, 0, 0.48912],
              114: [0, 0.47534, 0, 0, 0.38919],
              115: [0, 0.47534, 0, 0, 0.44266],
              116: [0, 0.62119, 0, 0, 0.33301],
              117: [0, 0.47534, 0, 0, 0.5172],
              118: [0, 0.52396, 0, 0, 0.5118],
              119: [0, 0.52396, 0, 0, 0.77351],
              120: [0.18906, 0.47534, 0, 0, 0.38865],
              121: [0.18906, 0.47534, 0, 0, 0.49884],
              122: [0.18906, 0.47534, 0, 0, 0.39054],
              160: [0, 0, 0, 0, 0.25],
              8216: [0, 0.69141, 0, 0, 0.21471],
              8217: [0, 0.69141, 0, 0, 0.21471],
              58112: [0, 0.62119, 0, 0, 0.49749],
              58113: [0, 0.62119, 0, 0, 0.4983],
              58114: [0.18906, 0.69141, 0, 0, 0.33328],
              58115: [0.18906, 0.69141, 0, 0, 0.32923],
              58116: [0.18906, 0.47534, 0, 0, 0.50343],
              58117: [0, 0.69141, 0, 0, 0.33301],
              58118: [0, 0.62119, 0, 0, 0.33409],
              58119: [0, 0.47534, 0, 0, 0.50073]
            },
            "Main-Bold": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0, 0, 0.35],
              34: [0, 0.69444, 0, 0, 0.60278],
              35: [0.19444, 0.69444, 0, 0, 0.95833],
              36: [0.05556, 0.75, 0, 0, 0.575],
              37: [0.05556, 0.75, 0, 0, 0.95833],
              38: [0, 0.69444, 0, 0, 0.89444],
              39: [0, 0.69444, 0, 0, 0.31944],
              40: [0.25, 0.75, 0, 0, 0.44722],
              41: [0.25, 0.75, 0, 0, 0.44722],
              42: [0, 0.75, 0, 0, 0.575],
              43: [0.13333, 0.63333, 0, 0, 0.89444],
              44: [0.19444, 0.15556, 0, 0, 0.31944],
              45: [0, 0.44444, 0, 0, 0.38333],
              46: [0, 0.15556, 0, 0, 0.31944],
              47: [0.25, 0.75, 0, 0, 0.575],
              48: [0, 0.64444, 0, 0, 0.575],
              49: [0, 0.64444, 0, 0, 0.575],
              50: [0, 0.64444, 0, 0, 0.575],
              51: [0, 0.64444, 0, 0, 0.575],
              52: [0, 0.64444, 0, 0, 0.575],
              53: [0, 0.64444, 0, 0, 0.575],
              54: [0, 0.64444, 0, 0, 0.575],
              55: [0, 0.64444, 0, 0, 0.575],
              56: [0, 0.64444, 0, 0, 0.575],
              57: [0, 0.64444, 0, 0, 0.575],
              58: [0, 0.44444, 0, 0, 0.31944],
              59: [0.19444, 0.44444, 0, 0, 0.31944],
              60: [0.08556, 0.58556, 0, 0, 0.89444],
              61: [-0.10889, 0.39111, 0, 0, 0.89444],
              62: [0.08556, 0.58556, 0, 0, 0.89444],
              63: [0, 0.69444, 0, 0, 0.54305],
              64: [0, 0.69444, 0, 0, 0.89444],
              65: [0, 0.68611, 0, 0, 0.86944],
              66: [0, 0.68611, 0, 0, 0.81805],
              67: [0, 0.68611, 0, 0, 0.83055],
              68: [0, 0.68611, 0, 0, 0.88194],
              69: [0, 0.68611, 0, 0, 0.75555],
              70: [0, 0.68611, 0, 0, 0.72361],
              71: [0, 0.68611, 0, 0, 0.90416],
              72: [0, 0.68611, 0, 0, 0.9],
              73: [0, 0.68611, 0, 0, 0.43611],
              74: [0, 0.68611, 0, 0, 0.59444],
              75: [0, 0.68611, 0, 0, 0.90138],
              76: [0, 0.68611, 0, 0, 0.69166],
              77: [0, 0.68611, 0, 0, 1.09166],
              78: [0, 0.68611, 0, 0, 0.9],
              79: [0, 0.68611, 0, 0, 0.86388],
              80: [0, 0.68611, 0, 0, 0.78611],
              81: [0.19444, 0.68611, 0, 0, 0.86388],
              82: [0, 0.68611, 0, 0, 0.8625],
              83: [0, 0.68611, 0, 0, 0.63889],
              84: [0, 0.68611, 0, 0, 0.8],
              85: [0, 0.68611, 0, 0, 0.88472],
              86: [0, 0.68611, 0.01597, 0, 0.86944],
              87: [0, 0.68611, 0.01597, 0, 1.18888],
              88: [0, 0.68611, 0, 0, 0.86944],
              89: [0, 0.68611, 0.02875, 0, 0.86944],
              90: [0, 0.68611, 0, 0, 0.70277],
              91: [0.25, 0.75, 0, 0, 0.31944],
              92: [0.25, 0.75, 0, 0, 0.575],
              93: [0.25, 0.75, 0, 0, 0.31944],
              94: [0, 0.69444, 0, 0, 0.575],
              95: [0.31, 0.13444, 0.03194, 0, 0.575],
              97: [0, 0.44444, 0, 0, 0.55902],
              98: [0, 0.69444, 0, 0, 0.63889],
              99: [0, 0.44444, 0, 0, 0.51111],
              100: [0, 0.69444, 0, 0, 0.63889],
              101: [0, 0.44444, 0, 0, 0.52708],
              102: [0, 0.69444, 0.10903, 0, 0.35139],
              103: [0.19444, 0.44444, 0.01597, 0, 0.575],
              104: [0, 0.69444, 0, 0, 0.63889],
              105: [0, 0.69444, 0, 0, 0.31944],
              106: [0.19444, 0.69444, 0, 0, 0.35139],
              107: [0, 0.69444, 0, 0, 0.60694],
              108: [0, 0.69444, 0, 0, 0.31944],
              109: [0, 0.44444, 0, 0, 0.95833],
              110: [0, 0.44444, 0, 0, 0.63889],
              111: [0, 0.44444, 0, 0, 0.575],
              112: [0.19444, 0.44444, 0, 0, 0.63889],
              113: [0.19444, 0.44444, 0, 0, 0.60694],
              114: [0, 0.44444, 0, 0, 0.47361],
              115: [0, 0.44444, 0, 0, 0.45361],
              116: [0, 0.63492, 0, 0, 0.44722],
              117: [0, 0.44444, 0, 0, 0.63889],
              118: [0, 0.44444, 0.01597, 0, 0.60694],
              119: [0, 0.44444, 0.01597, 0, 0.83055],
              120: [0, 0.44444, 0, 0, 0.60694],
              121: [0.19444, 0.44444, 0.01597, 0, 0.60694],
              122: [0, 0.44444, 0, 0, 0.51111],
              123: [0.25, 0.75, 0, 0, 0.575],
              124: [0.25, 0.75, 0, 0, 0.31944],
              125: [0.25, 0.75, 0, 0, 0.575],
              126: [0.35, 0.34444, 0, 0, 0.575],
              160: [0, 0, 0, 0, 0.25],
              163: [0, 0.69444, 0, 0, 0.86853],
              168: [0, 0.69444, 0, 0, 0.575],
              172: [0, 0.44444, 0, 0, 0.76666],
              176: [0, 0.69444, 0, 0, 0.86944],
              177: [0.13333, 0.63333, 0, 0, 0.89444],
              184: [0.17014, 0, 0, 0, 0.51111],
              198: [0, 0.68611, 0, 0, 1.04166],
              215: [0.13333, 0.63333, 0, 0, 0.89444],
              216: [0.04861, 0.73472, 0, 0, 0.89444],
              223: [0, 0.69444, 0, 0, 0.59722],
              230: [0, 0.44444, 0, 0, 0.83055],
              247: [0.13333, 0.63333, 0, 0, 0.89444],
              248: [0.09722, 0.54167, 0, 0, 0.575],
              305: [0, 0.44444, 0, 0, 0.31944],
              338: [0, 0.68611, 0, 0, 1.16944],
              339: [0, 0.44444, 0, 0, 0.89444],
              567: [0.19444, 0.44444, 0, 0, 0.35139],
              710: [0, 0.69444, 0, 0, 0.575],
              711: [0, 0.63194, 0, 0, 0.575],
              713: [0, 0.59611, 0, 0, 0.575],
              714: [0, 0.69444, 0, 0, 0.575],
              715: [0, 0.69444, 0, 0, 0.575],
              728: [0, 0.69444, 0, 0, 0.575],
              729: [0, 0.69444, 0, 0, 0.31944],
              730: [0, 0.69444, 0, 0, 0.86944],
              732: [0, 0.69444, 0, 0, 0.575],
              733: [0, 0.69444, 0, 0, 0.575],
              915: [0, 0.68611, 0, 0, 0.69166],
              916: [0, 0.68611, 0, 0, 0.95833],
              920: [0, 0.68611, 0, 0, 0.89444],
              923: [0, 0.68611, 0, 0, 0.80555],
              926: [0, 0.68611, 0, 0, 0.76666],
              928: [0, 0.68611, 0, 0, 0.9],
              931: [0, 0.68611, 0, 0, 0.83055],
              933: [0, 0.68611, 0, 0, 0.89444],
              934: [0, 0.68611, 0, 0, 0.83055],
              936: [0, 0.68611, 0, 0, 0.89444],
              937: [0, 0.68611, 0, 0, 0.83055],
              8211: [0, 0.44444, 0.03194, 0, 0.575],
              8212: [0, 0.44444, 0.03194, 0, 1.14999],
              8216: [0, 0.69444, 0, 0, 0.31944],
              8217: [0, 0.69444, 0, 0, 0.31944],
              8220: [0, 0.69444, 0, 0, 0.60278],
              8221: [0, 0.69444, 0, 0, 0.60278],
              8224: [0.19444, 0.69444, 0, 0, 0.51111],
              8225: [0.19444, 0.69444, 0, 0, 0.51111],
              8242: [0, 0.55556, 0, 0, 0.34444],
              8407: [0, 0.72444, 0.15486, 0, 0.575],
              8463: [0, 0.69444, 0, 0, 0.66759],
              8465: [0, 0.69444, 0, 0, 0.83055],
              8467: [0, 0.69444, 0, 0, 0.47361],
              8472: [0.19444, 0.44444, 0, 0, 0.74027],
              8476: [0, 0.69444, 0, 0, 0.83055],
              8501: [0, 0.69444, 0, 0, 0.70277],
              8592: [-0.10889, 0.39111, 0, 0, 1.14999],
              8593: [0.19444, 0.69444, 0, 0, 0.575],
              8594: [-0.10889, 0.39111, 0, 0, 1.14999],
              8595: [0.19444, 0.69444, 0, 0, 0.575],
              8596: [-0.10889, 0.39111, 0, 0, 1.14999],
              8597: [0.25, 0.75, 0, 0, 0.575],
              8598: [0.19444, 0.69444, 0, 0, 1.14999],
              8599: [0.19444, 0.69444, 0, 0, 1.14999],
              8600: [0.19444, 0.69444, 0, 0, 1.14999],
              8601: [0.19444, 0.69444, 0, 0, 1.14999],
              8636: [-0.10889, 0.39111, 0, 0, 1.14999],
              8637: [-0.10889, 0.39111, 0, 0, 1.14999],
              8640: [-0.10889, 0.39111, 0, 0, 1.14999],
              8641: [-0.10889, 0.39111, 0, 0, 1.14999],
              8656: [-0.10889, 0.39111, 0, 0, 1.14999],
              8657: [0.19444, 0.69444, 0, 0, 0.70277],
              8658: [-0.10889, 0.39111, 0, 0, 1.14999],
              8659: [0.19444, 0.69444, 0, 0, 0.70277],
              8660: [-0.10889, 0.39111, 0, 0, 1.14999],
              8661: [0.25, 0.75, 0, 0, 0.70277],
              8704: [0, 0.69444, 0, 0, 0.63889],
              8706: [0, 0.69444, 0.06389, 0, 0.62847],
              8707: [0, 0.69444, 0, 0, 0.63889],
              8709: [0.05556, 0.75, 0, 0, 0.575],
              8711: [0, 0.68611, 0, 0, 0.95833],
              8712: [0.08556, 0.58556, 0, 0, 0.76666],
              8715: [0.08556, 0.58556, 0, 0, 0.76666],
              8722: [0.13333, 0.63333, 0, 0, 0.89444],
              8723: [0.13333, 0.63333, 0, 0, 0.89444],
              8725: [0.25, 0.75, 0, 0, 0.575],
              8726: [0.25, 0.75, 0, 0, 0.575],
              8727: [-0.02778, 0.47222, 0, 0, 0.575],
              8728: [-0.02639, 0.47361, 0, 0, 0.575],
              8729: [-0.02639, 0.47361, 0, 0, 0.575],
              8730: [0.18, 0.82, 0, 0, 0.95833],
              8733: [0, 0.44444, 0, 0, 0.89444],
              8734: [0, 0.44444, 0, 0, 1.14999],
              8736: [0, 0.69224, 0, 0, 0.72222],
              8739: [0.25, 0.75, 0, 0, 0.31944],
              8741: [0.25, 0.75, 0, 0, 0.575],
              8743: [0, 0.55556, 0, 0, 0.76666],
              8744: [0, 0.55556, 0, 0, 0.76666],
              8745: [0, 0.55556, 0, 0, 0.76666],
              8746: [0, 0.55556, 0, 0, 0.76666],
              8747: [0.19444, 0.69444, 0.12778, 0, 0.56875],
              8764: [-0.10889, 0.39111, 0, 0, 0.89444],
              8768: [0.19444, 0.69444, 0, 0, 0.31944],
              8771: [222e-5, 0.50222, 0, 0, 0.89444],
              8773: [0.027, 0.638, 0, 0, 0.894],
              8776: [0.02444, 0.52444, 0, 0, 0.89444],
              8781: [222e-5, 0.50222, 0, 0, 0.89444],
              8801: [222e-5, 0.50222, 0, 0, 0.89444],
              8804: [0.19667, 0.69667, 0, 0, 0.89444],
              8805: [0.19667, 0.69667, 0, 0, 0.89444],
              8810: [0.08556, 0.58556, 0, 0, 1.14999],
              8811: [0.08556, 0.58556, 0, 0, 1.14999],
              8826: [0.08556, 0.58556, 0, 0, 0.89444],
              8827: [0.08556, 0.58556, 0, 0, 0.89444],
              8834: [0.08556, 0.58556, 0, 0, 0.89444],
              8835: [0.08556, 0.58556, 0, 0, 0.89444],
              8838: [0.19667, 0.69667, 0, 0, 0.89444],
              8839: [0.19667, 0.69667, 0, 0, 0.89444],
              8846: [0, 0.55556, 0, 0, 0.76666],
              8849: [0.19667, 0.69667, 0, 0, 0.89444],
              8850: [0.19667, 0.69667, 0, 0, 0.89444],
              8851: [0, 0.55556, 0, 0, 0.76666],
              8852: [0, 0.55556, 0, 0, 0.76666],
              8853: [0.13333, 0.63333, 0, 0, 0.89444],
              8854: [0.13333, 0.63333, 0, 0, 0.89444],
              8855: [0.13333, 0.63333, 0, 0, 0.89444],
              8856: [0.13333, 0.63333, 0, 0, 0.89444],
              8857: [0.13333, 0.63333, 0, 0, 0.89444],
              8866: [0, 0.69444, 0, 0, 0.70277],
              8867: [0, 0.69444, 0, 0, 0.70277],
              8868: [0, 0.69444, 0, 0, 0.89444],
              8869: [0, 0.69444, 0, 0, 0.89444],
              8900: [-0.02639, 0.47361, 0, 0, 0.575],
              8901: [-0.02639, 0.47361, 0, 0, 0.31944],
              8902: [-0.02778, 0.47222, 0, 0, 0.575],
              8968: [0.25, 0.75, 0, 0, 0.51111],
              8969: [0.25, 0.75, 0, 0, 0.51111],
              8970: [0.25, 0.75, 0, 0, 0.51111],
              8971: [0.25, 0.75, 0, 0, 0.51111],
              8994: [-0.13889, 0.36111, 0, 0, 1.14999],
              8995: [-0.13889, 0.36111, 0, 0, 1.14999],
              9651: [0.19444, 0.69444, 0, 0, 1.02222],
              9657: [-0.02778, 0.47222, 0, 0, 0.575],
              9661: [0.19444, 0.69444, 0, 0, 1.02222],
              9667: [-0.02778, 0.47222, 0, 0, 0.575],
              9711: [0.19444, 0.69444, 0, 0, 1.14999],
              9824: [0.12963, 0.69444, 0, 0, 0.89444],
              9825: [0.12963, 0.69444, 0, 0, 0.89444],
              9826: [0.12963, 0.69444, 0, 0, 0.89444],
              9827: [0.12963, 0.69444, 0, 0, 0.89444],
              9837: [0, 0.75, 0, 0, 0.44722],
              9838: [0.19444, 0.69444, 0, 0, 0.44722],
              9839: [0.19444, 0.69444, 0, 0, 0.44722],
              10216: [0.25, 0.75, 0, 0, 0.44722],
              10217: [0.25, 0.75, 0, 0, 0.44722],
              10815: [0, 0.68611, 0, 0, 0.9],
              10927: [0.19667, 0.69667, 0, 0, 0.89444],
              10928: [0.19667, 0.69667, 0, 0, 0.89444],
              57376: [0.19444, 0.69444, 0, 0, 0]
            },
            "Main-BoldItalic": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0.11417, 0, 0.38611],
              34: [0, 0.69444, 0.07939, 0, 0.62055],
              35: [0.19444, 0.69444, 0.06833, 0, 0.94444],
              37: [0.05556, 0.75, 0.12861, 0, 0.94444],
              38: [0, 0.69444, 0.08528, 0, 0.88555],
              39: [0, 0.69444, 0.12945, 0, 0.35555],
              40: [0.25, 0.75, 0.15806, 0, 0.47333],
              41: [0.25, 0.75, 0.03306, 0, 0.47333],
              42: [0, 0.75, 0.14333, 0, 0.59111],
              43: [0.10333, 0.60333, 0.03306, 0, 0.88555],
              44: [0.19444, 0.14722, 0, 0, 0.35555],
              45: [0, 0.44444, 0.02611, 0, 0.41444],
              46: [0, 0.14722, 0, 0, 0.35555],
              47: [0.25, 0.75, 0.15806, 0, 0.59111],
              48: [0, 0.64444, 0.13167, 0, 0.59111],
              49: [0, 0.64444, 0.13167, 0, 0.59111],
              50: [0, 0.64444, 0.13167, 0, 0.59111],
              51: [0, 0.64444, 0.13167, 0, 0.59111],
              52: [0.19444, 0.64444, 0.13167, 0, 0.59111],
              53: [0, 0.64444, 0.13167, 0, 0.59111],
              54: [0, 0.64444, 0.13167, 0, 0.59111],
              55: [0.19444, 0.64444, 0.13167, 0, 0.59111],
              56: [0, 0.64444, 0.13167, 0, 0.59111],
              57: [0, 0.64444, 0.13167, 0, 0.59111],
              58: [0, 0.44444, 0.06695, 0, 0.35555],
              59: [0.19444, 0.44444, 0.06695, 0, 0.35555],
              61: [-0.10889, 0.39111, 0.06833, 0, 0.88555],
              63: [0, 0.69444, 0.11472, 0, 0.59111],
              64: [0, 0.69444, 0.09208, 0, 0.88555],
              65: [0, 0.68611, 0, 0, 0.86555],
              66: [0, 0.68611, 0.0992, 0, 0.81666],
              67: [0, 0.68611, 0.14208, 0, 0.82666],
              68: [0, 0.68611, 0.09062, 0, 0.87555],
              69: [0, 0.68611, 0.11431, 0, 0.75666],
              70: [0, 0.68611, 0.12903, 0, 0.72722],
              71: [0, 0.68611, 0.07347, 0, 0.89527],
              72: [0, 0.68611, 0.17208, 0, 0.8961],
              73: [0, 0.68611, 0.15681, 0, 0.47166],
              74: [0, 0.68611, 0.145, 0, 0.61055],
              75: [0, 0.68611, 0.14208, 0, 0.89499],
              76: [0, 0.68611, 0, 0, 0.69777],
              77: [0, 0.68611, 0.17208, 0, 1.07277],
              78: [0, 0.68611, 0.17208, 0, 0.8961],
              79: [0, 0.68611, 0.09062, 0, 0.85499],
              80: [0, 0.68611, 0.0992, 0, 0.78721],
              81: [0.19444, 0.68611, 0.09062, 0, 0.85499],
              82: [0, 0.68611, 0.02559, 0, 0.85944],
              83: [0, 0.68611, 0.11264, 0, 0.64999],
              84: [0, 0.68611, 0.12903, 0, 0.7961],
              85: [0, 0.68611, 0.17208, 0, 0.88083],
              86: [0, 0.68611, 0.18625, 0, 0.86555],
              87: [0, 0.68611, 0.18625, 0, 1.15999],
              88: [0, 0.68611, 0.15681, 0, 0.86555],
              89: [0, 0.68611, 0.19803, 0, 0.86555],
              90: [0, 0.68611, 0.14208, 0, 0.70888],
              91: [0.25, 0.75, 0.1875, 0, 0.35611],
              93: [0.25, 0.75, 0.09972, 0, 0.35611],
              94: [0, 0.69444, 0.06709, 0, 0.59111],
              95: [0.31, 0.13444, 0.09811, 0, 0.59111],
              97: [0, 0.44444, 0.09426, 0, 0.59111],
              98: [0, 0.69444, 0.07861, 0, 0.53222],
              99: [0, 0.44444, 0.05222, 0, 0.53222],
              100: [0, 0.69444, 0.10861, 0, 0.59111],
              101: [0, 0.44444, 0.085, 0, 0.53222],
              102: [0.19444, 0.69444, 0.21778, 0, 0.4],
              103: [0.19444, 0.44444, 0.105, 0, 0.53222],
              104: [0, 0.69444, 0.09426, 0, 0.59111],
              105: [0, 0.69326, 0.11387, 0, 0.35555],
              106: [0.19444, 0.69326, 0.1672, 0, 0.35555],
              107: [0, 0.69444, 0.11111, 0, 0.53222],
              108: [0, 0.69444, 0.10861, 0, 0.29666],
              109: [0, 0.44444, 0.09426, 0, 0.94444],
              110: [0, 0.44444, 0.09426, 0, 0.64999],
              111: [0, 0.44444, 0.07861, 0, 0.59111],
              112: [0.19444, 0.44444, 0.07861, 0, 0.59111],
              113: [0.19444, 0.44444, 0.105, 0, 0.53222],
              114: [0, 0.44444, 0.11111, 0, 0.50167],
              115: [0, 0.44444, 0.08167, 0, 0.48694],
              116: [0, 0.63492, 0.09639, 0, 0.385],
              117: [0, 0.44444, 0.09426, 0, 0.62055],
              118: [0, 0.44444, 0.11111, 0, 0.53222],
              119: [0, 0.44444, 0.11111, 0, 0.76777],
              120: [0, 0.44444, 0.12583, 0, 0.56055],
              121: [0.19444, 0.44444, 0.105, 0, 0.56166],
              122: [0, 0.44444, 0.13889, 0, 0.49055],
              126: [0.35, 0.34444, 0.11472, 0, 0.59111],
              160: [0, 0, 0, 0, 0.25],
              168: [0, 0.69444, 0.11473, 0, 0.59111],
              176: [0, 0.69444, 0, 0, 0.94888],
              184: [0.17014, 0, 0, 0, 0.53222],
              198: [0, 0.68611, 0.11431, 0, 1.02277],
              216: [0.04861, 0.73472, 0.09062, 0, 0.88555],
              223: [0.19444, 0.69444, 0.09736, 0, 0.665],
              230: [0, 0.44444, 0.085, 0, 0.82666],
              248: [0.09722, 0.54167, 0.09458, 0, 0.59111],
              305: [0, 0.44444, 0.09426, 0, 0.35555],
              338: [0, 0.68611, 0.11431, 0, 1.14054],
              339: [0, 0.44444, 0.085, 0, 0.82666],
              567: [0.19444, 0.44444, 0.04611, 0, 0.385],
              710: [0, 0.69444, 0.06709, 0, 0.59111],
              711: [0, 0.63194, 0.08271, 0, 0.59111],
              713: [0, 0.59444, 0.10444, 0, 0.59111],
              714: [0, 0.69444, 0.08528, 0, 0.59111],
              715: [0, 0.69444, 0, 0, 0.59111],
              728: [0, 0.69444, 0.10333, 0, 0.59111],
              729: [0, 0.69444, 0.12945, 0, 0.35555],
              730: [0, 0.69444, 0, 0, 0.94888],
              732: [0, 0.69444, 0.11472, 0, 0.59111],
              733: [0, 0.69444, 0.11472, 0, 0.59111],
              915: [0, 0.68611, 0.12903, 0, 0.69777],
              916: [0, 0.68611, 0, 0, 0.94444],
              920: [0, 0.68611, 0.09062, 0, 0.88555],
              923: [0, 0.68611, 0, 0, 0.80666],
              926: [0, 0.68611, 0.15092, 0, 0.76777],
              928: [0, 0.68611, 0.17208, 0, 0.8961],
              931: [0, 0.68611, 0.11431, 0, 0.82666],
              933: [0, 0.68611, 0.10778, 0, 0.88555],
              934: [0, 0.68611, 0.05632, 0, 0.82666],
              936: [0, 0.68611, 0.10778, 0, 0.88555],
              937: [0, 0.68611, 0.0992, 0, 0.82666],
              8211: [0, 0.44444, 0.09811, 0, 0.59111],
              8212: [0, 0.44444, 0.09811, 0, 1.18221],
              8216: [0, 0.69444, 0.12945, 0, 0.35555],
              8217: [0, 0.69444, 0.12945, 0, 0.35555],
              8220: [0, 0.69444, 0.16772, 0, 0.62055],
              8221: [0, 0.69444, 0.07939, 0, 0.62055]
            },
            "Main-Italic": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0.12417, 0, 0.30667],
              34: [0, 0.69444, 0.06961, 0, 0.51444],
              35: [0.19444, 0.69444, 0.06616, 0, 0.81777],
              37: [0.05556, 0.75, 0.13639, 0, 0.81777],
              38: [0, 0.69444, 0.09694, 0, 0.76666],
              39: [0, 0.69444, 0.12417, 0, 0.30667],
              40: [0.25, 0.75, 0.16194, 0, 0.40889],
              41: [0.25, 0.75, 0.03694, 0, 0.40889],
              42: [0, 0.75, 0.14917, 0, 0.51111],
              43: [0.05667, 0.56167, 0.03694, 0, 0.76666],
              44: [0.19444, 0.10556, 0, 0, 0.30667],
              45: [0, 0.43056, 0.02826, 0, 0.35778],
              46: [0, 0.10556, 0, 0, 0.30667],
              47: [0.25, 0.75, 0.16194, 0, 0.51111],
              48: [0, 0.64444, 0.13556, 0, 0.51111],
              49: [0, 0.64444, 0.13556, 0, 0.51111],
              50: [0, 0.64444, 0.13556, 0, 0.51111],
              51: [0, 0.64444, 0.13556, 0, 0.51111],
              52: [0.19444, 0.64444, 0.13556, 0, 0.51111],
              53: [0, 0.64444, 0.13556, 0, 0.51111],
              54: [0, 0.64444, 0.13556, 0, 0.51111],
              55: [0.19444, 0.64444, 0.13556, 0, 0.51111],
              56: [0, 0.64444, 0.13556, 0, 0.51111],
              57: [0, 0.64444, 0.13556, 0, 0.51111],
              58: [0, 0.43056, 0.0582, 0, 0.30667],
              59: [0.19444, 0.43056, 0.0582, 0, 0.30667],
              61: [-0.13313, 0.36687, 0.06616, 0, 0.76666],
              63: [0, 0.69444, 0.1225, 0, 0.51111],
              64: [0, 0.69444, 0.09597, 0, 0.76666],
              65: [0, 0.68333, 0, 0, 0.74333],
              66: [0, 0.68333, 0.10257, 0, 0.70389],
              67: [0, 0.68333, 0.14528, 0, 0.71555],
              68: [0, 0.68333, 0.09403, 0, 0.755],
              69: [0, 0.68333, 0.12028, 0, 0.67833],
              70: [0, 0.68333, 0.13305, 0, 0.65277],
              71: [0, 0.68333, 0.08722, 0, 0.77361],
              72: [0, 0.68333, 0.16389, 0, 0.74333],
              73: [0, 0.68333, 0.15806, 0, 0.38555],
              74: [0, 0.68333, 0.14028, 0, 0.525],
              75: [0, 0.68333, 0.14528, 0, 0.76888],
              76: [0, 0.68333, 0, 0, 0.62722],
              77: [0, 0.68333, 0.16389, 0, 0.89666],
              78: [0, 0.68333, 0.16389, 0, 0.74333],
              79: [0, 0.68333, 0.09403, 0, 0.76666],
              80: [0, 0.68333, 0.10257, 0, 0.67833],
              81: [0.19444, 0.68333, 0.09403, 0, 0.76666],
              82: [0, 0.68333, 0.03868, 0, 0.72944],
              83: [0, 0.68333, 0.11972, 0, 0.56222],
              84: [0, 0.68333, 0.13305, 0, 0.71555],
              85: [0, 0.68333, 0.16389, 0, 0.74333],
              86: [0, 0.68333, 0.18361, 0, 0.74333],
              87: [0, 0.68333, 0.18361, 0, 0.99888],
              88: [0, 0.68333, 0.15806, 0, 0.74333],
              89: [0, 0.68333, 0.19383, 0, 0.74333],
              90: [0, 0.68333, 0.14528, 0, 0.61333],
              91: [0.25, 0.75, 0.1875, 0, 0.30667],
              93: [0.25, 0.75, 0.10528, 0, 0.30667],
              94: [0, 0.69444, 0.06646, 0, 0.51111],
              95: [0.31, 0.12056, 0.09208, 0, 0.51111],
              97: [0, 0.43056, 0.07671, 0, 0.51111],
              98: [0, 0.69444, 0.06312, 0, 0.46],
              99: [0, 0.43056, 0.05653, 0, 0.46],
              100: [0, 0.69444, 0.10333, 0, 0.51111],
              101: [0, 0.43056, 0.07514, 0, 0.46],
              102: [0.19444, 0.69444, 0.21194, 0, 0.30667],
              103: [0.19444, 0.43056, 0.08847, 0, 0.46],
              104: [0, 0.69444, 0.07671, 0, 0.51111],
              105: [0, 0.65536, 0.1019, 0, 0.30667],
              106: [0.19444, 0.65536, 0.14467, 0, 0.30667],
              107: [0, 0.69444, 0.10764, 0, 0.46],
              108: [0, 0.69444, 0.10333, 0, 0.25555],
              109: [0, 0.43056, 0.07671, 0, 0.81777],
              110: [0, 0.43056, 0.07671, 0, 0.56222],
              111: [0, 0.43056, 0.06312, 0, 0.51111],
              112: [0.19444, 0.43056, 0.06312, 0, 0.51111],
              113: [0.19444, 0.43056, 0.08847, 0, 0.46],
              114: [0, 0.43056, 0.10764, 0, 0.42166],
              115: [0, 0.43056, 0.08208, 0, 0.40889],
              116: [0, 0.61508, 0.09486, 0, 0.33222],
              117: [0, 0.43056, 0.07671, 0, 0.53666],
              118: [0, 0.43056, 0.10764, 0, 0.46],
              119: [0, 0.43056, 0.10764, 0, 0.66444],
              120: [0, 0.43056, 0.12042, 0, 0.46389],
              121: [0.19444, 0.43056, 0.08847, 0, 0.48555],
              122: [0, 0.43056, 0.12292, 0, 0.40889],
              126: [0.35, 0.31786, 0.11585, 0, 0.51111],
              160: [0, 0, 0, 0, 0.25],
              168: [0, 0.66786, 0.10474, 0, 0.51111],
              176: [0, 0.69444, 0, 0, 0.83129],
              184: [0.17014, 0, 0, 0, 0.46],
              198: [0, 0.68333, 0.12028, 0, 0.88277],
              216: [0.04861, 0.73194, 0.09403, 0, 0.76666],
              223: [0.19444, 0.69444, 0.10514, 0, 0.53666],
              230: [0, 0.43056, 0.07514, 0, 0.71555],
              248: [0.09722, 0.52778, 0.09194, 0, 0.51111],
              338: [0, 0.68333, 0.12028, 0, 0.98499],
              339: [0, 0.43056, 0.07514, 0, 0.71555],
              710: [0, 0.69444, 0.06646, 0, 0.51111],
              711: [0, 0.62847, 0.08295, 0, 0.51111],
              713: [0, 0.56167, 0.10333, 0, 0.51111],
              714: [0, 0.69444, 0.09694, 0, 0.51111],
              715: [0, 0.69444, 0, 0, 0.51111],
              728: [0, 0.69444, 0.10806, 0, 0.51111],
              729: [0, 0.66786, 0.11752, 0, 0.30667],
              730: [0, 0.69444, 0, 0, 0.83129],
              732: [0, 0.66786, 0.11585, 0, 0.51111],
              733: [0, 0.69444, 0.1225, 0, 0.51111],
              915: [0, 0.68333, 0.13305, 0, 0.62722],
              916: [0, 0.68333, 0, 0, 0.81777],
              920: [0, 0.68333, 0.09403, 0, 0.76666],
              923: [0, 0.68333, 0, 0, 0.69222],
              926: [0, 0.68333, 0.15294, 0, 0.66444],
              928: [0, 0.68333, 0.16389, 0, 0.74333],
              931: [0, 0.68333, 0.12028, 0, 0.71555],
              933: [0, 0.68333, 0.11111, 0, 0.76666],
              934: [0, 0.68333, 0.05986, 0, 0.71555],
              936: [0, 0.68333, 0.11111, 0, 0.76666],
              937: [0, 0.68333, 0.10257, 0, 0.71555],
              8211: [0, 0.43056, 0.09208, 0, 0.51111],
              8212: [0, 0.43056, 0.09208, 0, 1.02222],
              8216: [0, 0.69444, 0.12417, 0, 0.30667],
              8217: [0, 0.69444, 0.12417, 0, 0.30667],
              8220: [0, 0.69444, 0.1685, 0, 0.51444],
              8221: [0, 0.69444, 0.06961, 0, 0.51444],
              8463: [0, 0.68889, 0, 0, 0.54028]
            },
            "Main-Regular": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0, 0, 0.27778],
              34: [0, 0.69444, 0, 0, 0.5],
              35: [0.19444, 0.69444, 0, 0, 0.83334],
              36: [0.05556, 0.75, 0, 0, 0.5],
              37: [0.05556, 0.75, 0, 0, 0.83334],
              38: [0, 0.69444, 0, 0, 0.77778],
              39: [0, 0.69444, 0, 0, 0.27778],
              40: [0.25, 0.75, 0, 0, 0.38889],
              41: [0.25, 0.75, 0, 0, 0.38889],
              42: [0, 0.75, 0, 0, 0.5],
              43: [0.08333, 0.58333, 0, 0, 0.77778],
              44: [0.19444, 0.10556, 0, 0, 0.27778],
              45: [0, 0.43056, 0, 0, 0.33333],
              46: [0, 0.10556, 0, 0, 0.27778],
              47: [0.25, 0.75, 0, 0, 0.5],
              48: [0, 0.64444, 0, 0, 0.5],
              49: [0, 0.64444, 0, 0, 0.5],
              50: [0, 0.64444, 0, 0, 0.5],
              51: [0, 0.64444, 0, 0, 0.5],
              52: [0, 0.64444, 0, 0, 0.5],
              53: [0, 0.64444, 0, 0, 0.5],
              54: [0, 0.64444, 0, 0, 0.5],
              55: [0, 0.64444, 0, 0, 0.5],
              56: [0, 0.64444, 0, 0, 0.5],
              57: [0, 0.64444, 0, 0, 0.5],
              58: [0, 0.43056, 0, 0, 0.27778],
              59: [0.19444, 0.43056, 0, 0, 0.27778],
              60: [0.0391, 0.5391, 0, 0, 0.77778],
              61: [-0.13313, 0.36687, 0, 0, 0.77778],
              62: [0.0391, 0.5391, 0, 0, 0.77778],
              63: [0, 0.69444, 0, 0, 0.47222],
              64: [0, 0.69444, 0, 0, 0.77778],
              65: [0, 0.68333, 0, 0, 0.75],
              66: [0, 0.68333, 0, 0, 0.70834],
              67: [0, 0.68333, 0, 0, 0.72222],
              68: [0, 0.68333, 0, 0, 0.76389],
              69: [0, 0.68333, 0, 0, 0.68056],
              70: [0, 0.68333, 0, 0, 0.65278],
              71: [0, 0.68333, 0, 0, 0.78472],
              72: [0, 0.68333, 0, 0, 0.75],
              73: [0, 0.68333, 0, 0, 0.36111],
              74: [0, 0.68333, 0, 0, 0.51389],
              75: [0, 0.68333, 0, 0, 0.77778],
              76: [0, 0.68333, 0, 0, 0.625],
              77: [0, 0.68333, 0, 0, 0.91667],
              78: [0, 0.68333, 0, 0, 0.75],
              79: [0, 0.68333, 0, 0, 0.77778],
              80: [0, 0.68333, 0, 0, 0.68056],
              81: [0.19444, 0.68333, 0, 0, 0.77778],
              82: [0, 0.68333, 0, 0, 0.73611],
              83: [0, 0.68333, 0, 0, 0.55556],
              84: [0, 0.68333, 0, 0, 0.72222],
              85: [0, 0.68333, 0, 0, 0.75],
              86: [0, 0.68333, 0.01389, 0, 0.75],
              87: [0, 0.68333, 0.01389, 0, 1.02778],
              88: [0, 0.68333, 0, 0, 0.75],
              89: [0, 0.68333, 0.025, 0, 0.75],
              90: [0, 0.68333, 0, 0, 0.61111],
              91: [0.25, 0.75, 0, 0, 0.27778],
              92: [0.25, 0.75, 0, 0, 0.5],
              93: [0.25, 0.75, 0, 0, 0.27778],
              94: [0, 0.69444, 0, 0, 0.5],
              95: [0.31, 0.12056, 0.02778, 0, 0.5],
              97: [0, 0.43056, 0, 0, 0.5],
              98: [0, 0.69444, 0, 0, 0.55556],
              99: [0, 0.43056, 0, 0, 0.44445],
              100: [0, 0.69444, 0, 0, 0.55556],
              101: [0, 0.43056, 0, 0, 0.44445],
              102: [0, 0.69444, 0.07778, 0, 0.30556],
              103: [0.19444, 0.43056, 0.01389, 0, 0.5],
              104: [0, 0.69444, 0, 0, 0.55556],
              105: [0, 0.66786, 0, 0, 0.27778],
              106: [0.19444, 0.66786, 0, 0, 0.30556],
              107: [0, 0.69444, 0, 0, 0.52778],
              108: [0, 0.69444, 0, 0, 0.27778],
              109: [0, 0.43056, 0, 0, 0.83334],
              110: [0, 0.43056, 0, 0, 0.55556],
              111: [0, 0.43056, 0, 0, 0.5],
              112: [0.19444, 0.43056, 0, 0, 0.55556],
              113: [0.19444, 0.43056, 0, 0, 0.52778],
              114: [0, 0.43056, 0, 0, 0.39167],
              115: [0, 0.43056, 0, 0, 0.39445],
              116: [0, 0.61508, 0, 0, 0.38889],
              117: [0, 0.43056, 0, 0, 0.55556],
              118: [0, 0.43056, 0.01389, 0, 0.52778],
              119: [0, 0.43056, 0.01389, 0, 0.72222],
              120: [0, 0.43056, 0, 0, 0.52778],
              121: [0.19444, 0.43056, 0.01389, 0, 0.52778],
              122: [0, 0.43056, 0, 0, 0.44445],
              123: [0.25, 0.75, 0, 0, 0.5],
              124: [0.25, 0.75, 0, 0, 0.27778],
              125: [0.25, 0.75, 0, 0, 0.5],
              126: [0.35, 0.31786, 0, 0, 0.5],
              160: [0, 0, 0, 0, 0.25],
              163: [0, 0.69444, 0, 0, 0.76909],
              167: [0.19444, 0.69444, 0, 0, 0.44445],
              168: [0, 0.66786, 0, 0, 0.5],
              172: [0, 0.43056, 0, 0, 0.66667],
              176: [0, 0.69444, 0, 0, 0.75],
              177: [0.08333, 0.58333, 0, 0, 0.77778],
              182: [0.19444, 0.69444, 0, 0, 0.61111],
              184: [0.17014, 0, 0, 0, 0.44445],
              198: [0, 0.68333, 0, 0, 0.90278],
              215: [0.08333, 0.58333, 0, 0, 0.77778],
              216: [0.04861, 0.73194, 0, 0, 0.77778],
              223: [0, 0.69444, 0, 0, 0.5],
              230: [0, 0.43056, 0, 0, 0.72222],
              247: [0.08333, 0.58333, 0, 0, 0.77778],
              248: [0.09722, 0.52778, 0, 0, 0.5],
              305: [0, 0.43056, 0, 0, 0.27778],
              338: [0, 0.68333, 0, 0, 1.01389],
              339: [0, 0.43056, 0, 0, 0.77778],
              567: [0.19444, 0.43056, 0, 0, 0.30556],
              710: [0, 0.69444, 0, 0, 0.5],
              711: [0, 0.62847, 0, 0, 0.5],
              713: [0, 0.56778, 0, 0, 0.5],
              714: [0, 0.69444, 0, 0, 0.5],
              715: [0, 0.69444, 0, 0, 0.5],
              728: [0, 0.69444, 0, 0, 0.5],
              729: [0, 0.66786, 0, 0, 0.27778],
              730: [0, 0.69444, 0, 0, 0.75],
              732: [0, 0.66786, 0, 0, 0.5],
              733: [0, 0.69444, 0, 0, 0.5],
              915: [0, 0.68333, 0, 0, 0.625],
              916: [0, 0.68333, 0, 0, 0.83334],
              920: [0, 0.68333, 0, 0, 0.77778],
              923: [0, 0.68333, 0, 0, 0.69445],
              926: [0, 0.68333, 0, 0, 0.66667],
              928: [0, 0.68333, 0, 0, 0.75],
              931: [0, 0.68333, 0, 0, 0.72222],
              933: [0, 0.68333, 0, 0, 0.77778],
              934: [0, 0.68333, 0, 0, 0.72222],
              936: [0, 0.68333, 0, 0, 0.77778],
              937: [0, 0.68333, 0, 0, 0.72222],
              8211: [0, 0.43056, 0.02778, 0, 0.5],
              8212: [0, 0.43056, 0.02778, 0, 1],
              8216: [0, 0.69444, 0, 0, 0.27778],
              8217: [0, 0.69444, 0, 0, 0.27778],
              8220: [0, 0.69444, 0, 0, 0.5],
              8221: [0, 0.69444, 0, 0, 0.5],
              8224: [0.19444, 0.69444, 0, 0, 0.44445],
              8225: [0.19444, 0.69444, 0, 0, 0.44445],
              8230: [0, 0.123, 0, 0, 1.172],
              8242: [0, 0.55556, 0, 0, 0.275],
              8407: [0, 0.71444, 0.15382, 0, 0.5],
              8463: [0, 0.68889, 0, 0, 0.54028],
              8465: [0, 0.69444, 0, 0, 0.72222],
              8467: [0, 0.69444, 0, 0.11111, 0.41667],
              8472: [0.19444, 0.43056, 0, 0.11111, 0.63646],
              8476: [0, 0.69444, 0, 0, 0.72222],
              8501: [0, 0.69444, 0, 0, 0.61111],
              8592: [-0.13313, 0.36687, 0, 0, 1],
              8593: [0.19444, 0.69444, 0, 0, 0.5],
              8594: [-0.13313, 0.36687, 0, 0, 1],
              8595: [0.19444, 0.69444, 0, 0, 0.5],
              8596: [-0.13313, 0.36687, 0, 0, 1],
              8597: [0.25, 0.75, 0, 0, 0.5],
              8598: [0.19444, 0.69444, 0, 0, 1],
              8599: [0.19444, 0.69444, 0, 0, 1],
              8600: [0.19444, 0.69444, 0, 0, 1],
              8601: [0.19444, 0.69444, 0, 0, 1],
              8614: [0.011, 0.511, 0, 0, 1],
              8617: [0.011, 0.511, 0, 0, 1.126],
              8618: [0.011, 0.511, 0, 0, 1.126],
              8636: [-0.13313, 0.36687, 0, 0, 1],
              8637: [-0.13313, 0.36687, 0, 0, 1],
              8640: [-0.13313, 0.36687, 0, 0, 1],
              8641: [-0.13313, 0.36687, 0, 0, 1],
              8652: [0.011, 0.671, 0, 0, 1],
              8656: [-0.13313, 0.36687, 0, 0, 1],
              8657: [0.19444, 0.69444, 0, 0, 0.61111],
              8658: [-0.13313, 0.36687, 0, 0, 1],
              8659: [0.19444, 0.69444, 0, 0, 0.61111],
              8660: [-0.13313, 0.36687, 0, 0, 1],
              8661: [0.25, 0.75, 0, 0, 0.61111],
              8704: [0, 0.69444, 0, 0, 0.55556],
              8706: [0, 0.69444, 0.05556, 0.08334, 0.5309],
              8707: [0, 0.69444, 0, 0, 0.55556],
              8709: [0.05556, 0.75, 0, 0, 0.5],
              8711: [0, 0.68333, 0, 0, 0.83334],
              8712: [0.0391, 0.5391, 0, 0, 0.66667],
              8715: [0.0391, 0.5391, 0, 0, 0.66667],
              8722: [0.08333, 0.58333, 0, 0, 0.77778],
              8723: [0.08333, 0.58333, 0, 0, 0.77778],
              8725: [0.25, 0.75, 0, 0, 0.5],
              8726: [0.25, 0.75, 0, 0, 0.5],
              8727: [-0.03472, 0.46528, 0, 0, 0.5],
              8728: [-0.05555, 0.44445, 0, 0, 0.5],
              8729: [-0.05555, 0.44445, 0, 0, 0.5],
              8730: [0.2, 0.8, 0, 0, 0.83334],
              8733: [0, 0.43056, 0, 0, 0.77778],
              8734: [0, 0.43056, 0, 0, 1],
              8736: [0, 0.69224, 0, 0, 0.72222],
              8739: [0.25, 0.75, 0, 0, 0.27778],
              8741: [0.25, 0.75, 0, 0, 0.5],
              8743: [0, 0.55556, 0, 0, 0.66667],
              8744: [0, 0.55556, 0, 0, 0.66667],
              8745: [0, 0.55556, 0, 0, 0.66667],
              8746: [0, 0.55556, 0, 0, 0.66667],
              8747: [0.19444, 0.69444, 0.11111, 0, 0.41667],
              8764: [-0.13313, 0.36687, 0, 0, 0.77778],
              8768: [0.19444, 0.69444, 0, 0, 0.27778],
              8771: [-0.03625, 0.46375, 0, 0, 0.77778],
              8773: [-0.022, 0.589, 0, 0, 0.778],
              8776: [-0.01688, 0.48312, 0, 0, 0.77778],
              8781: [-0.03625, 0.46375, 0, 0, 0.77778],
              8784: [-0.133, 0.673, 0, 0, 0.778],
              8801: [-0.03625, 0.46375, 0, 0, 0.77778],
              8804: [0.13597, 0.63597, 0, 0, 0.77778],
              8805: [0.13597, 0.63597, 0, 0, 0.77778],
              8810: [0.0391, 0.5391, 0, 0, 1],
              8811: [0.0391, 0.5391, 0, 0, 1],
              8826: [0.0391, 0.5391, 0, 0, 0.77778],
              8827: [0.0391, 0.5391, 0, 0, 0.77778],
              8834: [0.0391, 0.5391, 0, 0, 0.77778],
              8835: [0.0391, 0.5391, 0, 0, 0.77778],
              8838: [0.13597, 0.63597, 0, 0, 0.77778],
              8839: [0.13597, 0.63597, 0, 0, 0.77778],
              8846: [0, 0.55556, 0, 0, 0.66667],
              8849: [0.13597, 0.63597, 0, 0, 0.77778],
              8850: [0.13597, 0.63597, 0, 0, 0.77778],
              8851: [0, 0.55556, 0, 0, 0.66667],
              8852: [0, 0.55556, 0, 0, 0.66667],
              8853: [0.08333, 0.58333, 0, 0, 0.77778],
              8854: [0.08333, 0.58333, 0, 0, 0.77778],
              8855: [0.08333, 0.58333, 0, 0, 0.77778],
              8856: [0.08333, 0.58333, 0, 0, 0.77778],
              8857: [0.08333, 0.58333, 0, 0, 0.77778],
              8866: [0, 0.69444, 0, 0, 0.61111],
              8867: [0, 0.69444, 0, 0, 0.61111],
              8868: [0, 0.69444, 0, 0, 0.77778],
              8869: [0, 0.69444, 0, 0, 0.77778],
              8872: [0.249, 0.75, 0, 0, 0.867],
              8900: [-0.05555, 0.44445, 0, 0, 0.5],
              8901: [-0.05555, 0.44445, 0, 0, 0.27778],
              8902: [-0.03472, 0.46528, 0, 0, 0.5],
              8904: [5e-3, 0.505, 0, 0, 0.9],
              8942: [0.03, 0.903, 0, 0, 0.278],
              8943: [-0.19, 0.313, 0, 0, 1.172],
              8945: [-0.1, 0.823, 0, 0, 1.282],
              8968: [0.25, 0.75, 0, 0, 0.44445],
              8969: [0.25, 0.75, 0, 0, 0.44445],
              8970: [0.25, 0.75, 0, 0, 0.44445],
              8971: [0.25, 0.75, 0, 0, 0.44445],
              8994: [-0.14236, 0.35764, 0, 0, 1],
              8995: [-0.14236, 0.35764, 0, 0, 1],
              9136: [0.244, 0.744, 0, 0, 0.412],
              9137: [0.244, 0.745, 0, 0, 0.412],
              9651: [0.19444, 0.69444, 0, 0, 0.88889],
              9657: [-0.03472, 0.46528, 0, 0, 0.5],
              9661: [0.19444, 0.69444, 0, 0, 0.88889],
              9667: [-0.03472, 0.46528, 0, 0, 0.5],
              9711: [0.19444, 0.69444, 0, 0, 1],
              9824: [0.12963, 0.69444, 0, 0, 0.77778],
              9825: [0.12963, 0.69444, 0, 0, 0.77778],
              9826: [0.12963, 0.69444, 0, 0, 0.77778],
              9827: [0.12963, 0.69444, 0, 0, 0.77778],
              9837: [0, 0.75, 0, 0, 0.38889],
              9838: [0.19444, 0.69444, 0, 0, 0.38889],
              9839: [0.19444, 0.69444, 0, 0, 0.38889],
              10216: [0.25, 0.75, 0, 0, 0.38889],
              10217: [0.25, 0.75, 0, 0, 0.38889],
              10222: [0.244, 0.744, 0, 0, 0.412],
              10223: [0.244, 0.745, 0, 0, 0.412],
              10229: [0.011, 0.511, 0, 0, 1.609],
              10230: [0.011, 0.511, 0, 0, 1.638],
              10231: [0.011, 0.511, 0, 0, 1.859],
              10232: [0.024, 0.525, 0, 0, 1.609],
              10233: [0.024, 0.525, 0, 0, 1.638],
              10234: [0.024, 0.525, 0, 0, 1.858],
              10236: [0.011, 0.511, 0, 0, 1.638],
              10815: [0, 0.68333, 0, 0, 0.75],
              10927: [0.13597, 0.63597, 0, 0, 0.77778],
              10928: [0.13597, 0.63597, 0, 0, 0.77778],
              57376: [0.19444, 0.69444, 0, 0, 0]
            },
            "Math-BoldItalic": {
              32: [0, 0, 0, 0, 0.25],
              48: [0, 0.44444, 0, 0, 0.575],
              49: [0, 0.44444, 0, 0, 0.575],
              50: [0, 0.44444, 0, 0, 0.575],
              51: [0.19444, 0.44444, 0, 0, 0.575],
              52: [0.19444, 0.44444, 0, 0, 0.575],
              53: [0.19444, 0.44444, 0, 0, 0.575],
              54: [0, 0.64444, 0, 0, 0.575],
              55: [0.19444, 0.44444, 0, 0, 0.575],
              56: [0, 0.64444, 0, 0, 0.575],
              57: [0.19444, 0.44444, 0, 0, 0.575],
              65: [0, 0.68611, 0, 0, 0.86944],
              66: [0, 0.68611, 0.04835, 0, 0.8664],
              67: [0, 0.68611, 0.06979, 0, 0.81694],
              68: [0, 0.68611, 0.03194, 0, 0.93812],
              69: [0, 0.68611, 0.05451, 0, 0.81007],
              70: [0, 0.68611, 0.15972, 0, 0.68889],
              71: [0, 0.68611, 0, 0, 0.88673],
              72: [0, 0.68611, 0.08229, 0, 0.98229],
              73: [0, 0.68611, 0.07778, 0, 0.51111],
              74: [0, 0.68611, 0.10069, 0, 0.63125],
              75: [0, 0.68611, 0.06979, 0, 0.97118],
              76: [0, 0.68611, 0, 0, 0.75555],
              77: [0, 0.68611, 0.11424, 0, 1.14201],
              78: [0, 0.68611, 0.11424, 0, 0.95034],
              79: [0, 0.68611, 0.03194, 0, 0.83666],
              80: [0, 0.68611, 0.15972, 0, 0.72309],
              81: [0.19444, 0.68611, 0, 0, 0.86861],
              82: [0, 0.68611, 421e-5, 0, 0.87235],
              83: [0, 0.68611, 0.05382, 0, 0.69271],
              84: [0, 0.68611, 0.15972, 0, 0.63663],
              85: [0, 0.68611, 0.11424, 0, 0.80027],
              86: [0, 0.68611, 0.25555, 0, 0.67778],
              87: [0, 0.68611, 0.15972, 0, 1.09305],
              88: [0, 0.68611, 0.07778, 0, 0.94722],
              89: [0, 0.68611, 0.25555, 0, 0.67458],
              90: [0, 0.68611, 0.06979, 0, 0.77257],
              97: [0, 0.44444, 0, 0, 0.63287],
              98: [0, 0.69444, 0, 0, 0.52083],
              99: [0, 0.44444, 0, 0, 0.51342],
              100: [0, 0.69444, 0, 0, 0.60972],
              101: [0, 0.44444, 0, 0, 0.55361],
              102: [0.19444, 0.69444, 0.11042, 0, 0.56806],
              103: [0.19444, 0.44444, 0.03704, 0, 0.5449],
              104: [0, 0.69444, 0, 0, 0.66759],
              105: [0, 0.69326, 0, 0, 0.4048],
              106: [0.19444, 0.69326, 0.0622, 0, 0.47083],
              107: [0, 0.69444, 0.01852, 0, 0.6037],
              108: [0, 0.69444, 88e-4, 0, 0.34815],
              109: [0, 0.44444, 0, 0, 1.0324],
              110: [0, 0.44444, 0, 0, 0.71296],
              111: [0, 0.44444, 0, 0, 0.58472],
              112: [0.19444, 0.44444, 0, 0, 0.60092],
              113: [0.19444, 0.44444, 0.03704, 0, 0.54213],
              114: [0, 0.44444, 0.03194, 0, 0.5287],
              115: [0, 0.44444, 0, 0, 0.53125],
              116: [0, 0.63492, 0, 0, 0.41528],
              117: [0, 0.44444, 0, 0, 0.68102],
              118: [0, 0.44444, 0.03704, 0, 0.56666],
              119: [0, 0.44444, 0.02778, 0, 0.83148],
              120: [0, 0.44444, 0, 0, 0.65903],
              121: [0.19444, 0.44444, 0.03704, 0, 0.59028],
              122: [0, 0.44444, 0.04213, 0, 0.55509],
              160: [0, 0, 0, 0, 0.25],
              915: [0, 0.68611, 0.15972, 0, 0.65694],
              916: [0, 0.68611, 0, 0, 0.95833],
              920: [0, 0.68611, 0.03194, 0, 0.86722],
              923: [0, 0.68611, 0, 0, 0.80555],
              926: [0, 0.68611, 0.07458, 0, 0.84125],
              928: [0, 0.68611, 0.08229, 0, 0.98229],
              931: [0, 0.68611, 0.05451, 0, 0.88507],
              933: [0, 0.68611, 0.15972, 0, 0.67083],
              934: [0, 0.68611, 0, 0, 0.76666],
              936: [0, 0.68611, 0.11653, 0, 0.71402],
              937: [0, 0.68611, 0.04835, 0, 0.8789],
              945: [0, 0.44444, 0, 0, 0.76064],
              946: [0.19444, 0.69444, 0.03403, 0, 0.65972],
              947: [0.19444, 0.44444, 0.06389, 0, 0.59003],
              948: [0, 0.69444, 0.03819, 0, 0.52222],
              949: [0, 0.44444, 0, 0, 0.52882],
              950: [0.19444, 0.69444, 0.06215, 0, 0.50833],
              951: [0.19444, 0.44444, 0.03704, 0, 0.6],
              952: [0, 0.69444, 0.03194, 0, 0.5618],
              953: [0, 0.44444, 0, 0, 0.41204],
              954: [0, 0.44444, 0, 0, 0.66759],
              955: [0, 0.69444, 0, 0, 0.67083],
              956: [0.19444, 0.44444, 0, 0, 0.70787],
              957: [0, 0.44444, 0.06898, 0, 0.57685],
              958: [0.19444, 0.69444, 0.03021, 0, 0.50833],
              959: [0, 0.44444, 0, 0, 0.58472],
              960: [0, 0.44444, 0.03704, 0, 0.68241],
              961: [0.19444, 0.44444, 0, 0, 0.6118],
              962: [0.09722, 0.44444, 0.07917, 0, 0.42361],
              963: [0, 0.44444, 0.03704, 0, 0.68588],
              964: [0, 0.44444, 0.13472, 0, 0.52083],
              965: [0, 0.44444, 0.03704, 0, 0.63055],
              966: [0.19444, 0.44444, 0, 0, 0.74722],
              967: [0.19444, 0.44444, 0, 0, 0.71805],
              968: [0.19444, 0.69444, 0.03704, 0, 0.75833],
              969: [0, 0.44444, 0.03704, 0, 0.71782],
              977: [0, 0.69444, 0, 0, 0.69155],
              981: [0.19444, 0.69444, 0, 0, 0.7125],
              982: [0, 0.44444, 0.03194, 0, 0.975],
              1009: [0.19444, 0.44444, 0, 0, 0.6118],
              1013: [0, 0.44444, 0, 0, 0.48333],
              57649: [0, 0.44444, 0, 0, 0.39352],
              57911: [0.19444, 0.44444, 0, 0, 0.43889]
            },
            "Math-Italic": {
              32: [0, 0, 0, 0, 0.25],
              48: [0, 0.43056, 0, 0, 0.5],
              49: [0, 0.43056, 0, 0, 0.5],
              50: [0, 0.43056, 0, 0, 0.5],
              51: [0.19444, 0.43056, 0, 0, 0.5],
              52: [0.19444, 0.43056, 0, 0, 0.5],
              53: [0.19444, 0.43056, 0, 0, 0.5],
              54: [0, 0.64444, 0, 0, 0.5],
              55: [0.19444, 0.43056, 0, 0, 0.5],
              56: [0, 0.64444, 0, 0, 0.5],
              57: [0.19444, 0.43056, 0, 0, 0.5],
              65: [0, 0.68333, 0, 0.13889, 0.75],
              66: [0, 0.68333, 0.05017, 0.08334, 0.75851],
              67: [0, 0.68333, 0.07153, 0.08334, 0.71472],
              68: [0, 0.68333, 0.02778, 0.05556, 0.82792],
              69: [0, 0.68333, 0.05764, 0.08334, 0.7382],
              70: [0, 0.68333, 0.13889, 0.08334, 0.64306],
              71: [0, 0.68333, 0, 0.08334, 0.78625],
              72: [0, 0.68333, 0.08125, 0.05556, 0.83125],
              73: [0, 0.68333, 0.07847, 0.11111, 0.43958],
              74: [0, 0.68333, 0.09618, 0.16667, 0.55451],
              75: [0, 0.68333, 0.07153, 0.05556, 0.84931],
              76: [0, 0.68333, 0, 0.02778, 0.68056],
              77: [0, 0.68333, 0.10903, 0.08334, 0.97014],
              78: [0, 0.68333, 0.10903, 0.08334, 0.80347],
              79: [0, 0.68333, 0.02778, 0.08334, 0.76278],
              80: [0, 0.68333, 0.13889, 0.08334, 0.64201],
              81: [0.19444, 0.68333, 0, 0.08334, 0.79056],
              82: [0, 0.68333, 773e-5, 0.08334, 0.75929],
              83: [0, 0.68333, 0.05764, 0.08334, 0.6132],
              84: [0, 0.68333, 0.13889, 0.08334, 0.58438],
              85: [0, 0.68333, 0.10903, 0.02778, 0.68278],
              86: [0, 0.68333, 0.22222, 0, 0.58333],
              87: [0, 0.68333, 0.13889, 0, 0.94445],
              88: [0, 0.68333, 0.07847, 0.08334, 0.82847],
              89: [0, 0.68333, 0.22222, 0, 0.58056],
              90: [0, 0.68333, 0.07153, 0.08334, 0.68264],
              97: [0, 0.43056, 0, 0, 0.52859],
              98: [0, 0.69444, 0, 0, 0.42917],
              99: [0, 0.43056, 0, 0.05556, 0.43276],
              100: [0, 0.69444, 0, 0.16667, 0.52049],
              101: [0, 0.43056, 0, 0.05556, 0.46563],
              102: [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
              103: [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
              104: [0, 0.69444, 0, 0, 0.57616],
              105: [0, 0.65952, 0, 0, 0.34451],
              106: [0.19444, 0.65952, 0.05724, 0, 0.41181],
              107: [0, 0.69444, 0.03148, 0, 0.5206],
              108: [0, 0.69444, 0.01968, 0.08334, 0.29838],
              109: [0, 0.43056, 0, 0, 0.87801],
              110: [0, 0.43056, 0, 0, 0.60023],
              111: [0, 0.43056, 0, 0.05556, 0.48472],
              112: [0.19444, 0.43056, 0, 0.08334, 0.50313],
              113: [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
              114: [0, 0.43056, 0.02778, 0.05556, 0.45116],
              115: [0, 0.43056, 0, 0.05556, 0.46875],
              116: [0, 0.61508, 0, 0.08334, 0.36111],
              117: [0, 0.43056, 0, 0.02778, 0.57246],
              118: [0, 0.43056, 0.03588, 0.02778, 0.48472],
              119: [0, 0.43056, 0.02691, 0.08334, 0.71592],
              120: [0, 0.43056, 0, 0.02778, 0.57153],
              121: [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
              122: [0, 0.43056, 0.04398, 0.05556, 0.46505],
              160: [0, 0, 0, 0, 0.25],
              915: [0, 0.68333, 0.13889, 0.08334, 0.61528],
              916: [0, 0.68333, 0, 0.16667, 0.83334],
              920: [0, 0.68333, 0.02778, 0.08334, 0.76278],
              923: [0, 0.68333, 0, 0.16667, 0.69445],
              926: [0, 0.68333, 0.07569, 0.08334, 0.74236],
              928: [0, 0.68333, 0.08125, 0.05556, 0.83125],
              931: [0, 0.68333, 0.05764, 0.08334, 0.77986],
              933: [0, 0.68333, 0.13889, 0.05556, 0.58333],
              934: [0, 0.68333, 0, 0.08334, 0.66667],
              936: [0, 0.68333, 0.11, 0.05556, 0.61222],
              937: [0, 0.68333, 0.05017, 0.08334, 0.7724],
              945: [0, 0.43056, 37e-4, 0.02778, 0.6397],
              946: [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
              947: [0.19444, 0.43056, 0.05556, 0, 0.51773],
              948: [0, 0.69444, 0.03785, 0.05556, 0.44444],
              949: [0, 0.43056, 0, 0.08334, 0.46632],
              950: [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
              951: [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
              952: [0, 0.69444, 0.02778, 0.08334, 0.46944],
              953: [0, 0.43056, 0, 0.05556, 0.35394],
              954: [0, 0.43056, 0, 0, 0.57616],
              955: [0, 0.69444, 0, 0, 0.58334],
              956: [0.19444, 0.43056, 0, 0.02778, 0.60255],
              957: [0, 0.43056, 0.06366, 0.02778, 0.49398],
              958: [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
              959: [0, 0.43056, 0, 0.05556, 0.48472],
              960: [0, 0.43056, 0.03588, 0, 0.57003],
              961: [0.19444, 0.43056, 0, 0.08334, 0.51702],
              962: [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
              963: [0, 0.43056, 0.03588, 0, 0.57141],
              964: [0, 0.43056, 0.1132, 0.02778, 0.43715],
              965: [0, 0.43056, 0.03588, 0.02778, 0.54028],
              966: [0.19444, 0.43056, 0, 0.08334, 0.65417],
              967: [0.19444, 0.43056, 0, 0.05556, 0.62569],
              968: [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
              969: [0, 0.43056, 0.03588, 0, 0.62245],
              977: [0, 0.69444, 0, 0.08334, 0.59144],
              981: [0.19444, 0.69444, 0, 0.08334, 0.59583],
              982: [0, 0.43056, 0.02778, 0, 0.82813],
              1009: [0.19444, 0.43056, 0, 0.08334, 0.51702],
              1013: [0, 0.43056, 0, 0.05556, 0.4059],
              57649: [0, 0.43056, 0, 0.02778, 0.32246],
              57911: [0.19444, 0.43056, 0, 0.08334, 0.38403]
            },
            "SansSerif-Bold": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0, 0, 0.36667],
              34: [0, 0.69444, 0, 0, 0.55834],
              35: [0.19444, 0.69444, 0, 0, 0.91667],
              36: [0.05556, 0.75, 0, 0, 0.55],
              37: [0.05556, 0.75, 0, 0, 1.02912],
              38: [0, 0.69444, 0, 0, 0.83056],
              39: [0, 0.69444, 0, 0, 0.30556],
              40: [0.25, 0.75, 0, 0, 0.42778],
              41: [0.25, 0.75, 0, 0, 0.42778],
              42: [0, 0.75, 0, 0, 0.55],
              43: [0.11667, 0.61667, 0, 0, 0.85556],
              44: [0.10556, 0.13056, 0, 0, 0.30556],
              45: [0, 0.45833, 0, 0, 0.36667],
              46: [0, 0.13056, 0, 0, 0.30556],
              47: [0.25, 0.75, 0, 0, 0.55],
              48: [0, 0.69444, 0, 0, 0.55],
              49: [0, 0.69444, 0, 0, 0.55],
              50: [0, 0.69444, 0, 0, 0.55],
              51: [0, 0.69444, 0, 0, 0.55],
              52: [0, 0.69444, 0, 0, 0.55],
              53: [0, 0.69444, 0, 0, 0.55],
              54: [0, 0.69444, 0, 0, 0.55],
              55: [0, 0.69444, 0, 0, 0.55],
              56: [0, 0.69444, 0, 0, 0.55],
              57: [0, 0.69444, 0, 0, 0.55],
              58: [0, 0.45833, 0, 0, 0.30556],
              59: [0.10556, 0.45833, 0, 0, 0.30556],
              61: [-0.09375, 0.40625, 0, 0, 0.85556],
              63: [0, 0.69444, 0, 0, 0.51945],
              64: [0, 0.69444, 0, 0, 0.73334],
              65: [0, 0.69444, 0, 0, 0.73334],
              66: [0, 0.69444, 0, 0, 0.73334],
              67: [0, 0.69444, 0, 0, 0.70278],
              68: [0, 0.69444, 0, 0, 0.79445],
              69: [0, 0.69444, 0, 0, 0.64167],
              70: [0, 0.69444, 0, 0, 0.61111],
              71: [0, 0.69444, 0, 0, 0.73334],
              72: [0, 0.69444, 0, 0, 0.79445],
              73: [0, 0.69444, 0, 0, 0.33056],
              74: [0, 0.69444, 0, 0, 0.51945],
              75: [0, 0.69444, 0, 0, 0.76389],
              76: [0, 0.69444, 0, 0, 0.58056],
              77: [0, 0.69444, 0, 0, 0.97778],
              78: [0, 0.69444, 0, 0, 0.79445],
              79: [0, 0.69444, 0, 0, 0.79445],
              80: [0, 0.69444, 0, 0, 0.70278],
              81: [0.10556, 0.69444, 0, 0, 0.79445],
              82: [0, 0.69444, 0, 0, 0.70278],
              83: [0, 0.69444, 0, 0, 0.61111],
              84: [0, 0.69444, 0, 0, 0.73334],
              85: [0, 0.69444, 0, 0, 0.76389],
              86: [0, 0.69444, 0.01528, 0, 0.73334],
              87: [0, 0.69444, 0.01528, 0, 1.03889],
              88: [0, 0.69444, 0, 0, 0.73334],
              89: [0, 0.69444, 0.0275, 0, 0.73334],
              90: [0, 0.69444, 0, 0, 0.67223],
              91: [0.25, 0.75, 0, 0, 0.34306],
              93: [0.25, 0.75, 0, 0, 0.34306],
              94: [0, 0.69444, 0, 0, 0.55],
              95: [0.35, 0.10833, 0.03056, 0, 0.55],
              97: [0, 0.45833, 0, 0, 0.525],
              98: [0, 0.69444, 0, 0, 0.56111],
              99: [0, 0.45833, 0, 0, 0.48889],
              100: [0, 0.69444, 0, 0, 0.56111],
              101: [0, 0.45833, 0, 0, 0.51111],
              102: [0, 0.69444, 0.07639, 0, 0.33611],
              103: [0.19444, 0.45833, 0.01528, 0, 0.55],
              104: [0, 0.69444, 0, 0, 0.56111],
              105: [0, 0.69444, 0, 0, 0.25556],
              106: [0.19444, 0.69444, 0, 0, 0.28611],
              107: [0, 0.69444, 0, 0, 0.53056],
              108: [0, 0.69444, 0, 0, 0.25556],
              109: [0, 0.45833, 0, 0, 0.86667],
              110: [0, 0.45833, 0, 0, 0.56111],
              111: [0, 0.45833, 0, 0, 0.55],
              112: [0.19444, 0.45833, 0, 0, 0.56111],
              113: [0.19444, 0.45833, 0, 0, 0.56111],
              114: [0, 0.45833, 0.01528, 0, 0.37222],
              115: [0, 0.45833, 0, 0, 0.42167],
              116: [0, 0.58929, 0, 0, 0.40417],
              117: [0, 0.45833, 0, 0, 0.56111],
              118: [0, 0.45833, 0.01528, 0, 0.5],
              119: [0, 0.45833, 0.01528, 0, 0.74445],
              120: [0, 0.45833, 0, 0, 0.5],
              121: [0.19444, 0.45833, 0.01528, 0, 0.5],
              122: [0, 0.45833, 0, 0, 0.47639],
              126: [0.35, 0.34444, 0, 0, 0.55],
              160: [0, 0, 0, 0, 0.25],
              168: [0, 0.69444, 0, 0, 0.55],
              176: [0, 0.69444, 0, 0, 0.73334],
              180: [0, 0.69444, 0, 0, 0.55],
              184: [0.17014, 0, 0, 0, 0.48889],
              305: [0, 0.45833, 0, 0, 0.25556],
              567: [0.19444, 0.45833, 0, 0, 0.28611],
              710: [0, 0.69444, 0, 0, 0.55],
              711: [0, 0.63542, 0, 0, 0.55],
              713: [0, 0.63778, 0, 0, 0.55],
              728: [0, 0.69444, 0, 0, 0.55],
              729: [0, 0.69444, 0, 0, 0.30556],
              730: [0, 0.69444, 0, 0, 0.73334],
              732: [0, 0.69444, 0, 0, 0.55],
              733: [0, 0.69444, 0, 0, 0.55],
              915: [0, 0.69444, 0, 0, 0.58056],
              916: [0, 0.69444, 0, 0, 0.91667],
              920: [0, 0.69444, 0, 0, 0.85556],
              923: [0, 0.69444, 0, 0, 0.67223],
              926: [0, 0.69444, 0, 0, 0.73334],
              928: [0, 0.69444, 0, 0, 0.79445],
              931: [0, 0.69444, 0, 0, 0.79445],
              933: [0, 0.69444, 0, 0, 0.85556],
              934: [0, 0.69444, 0, 0, 0.79445],
              936: [0, 0.69444, 0, 0, 0.85556],
              937: [0, 0.69444, 0, 0, 0.79445],
              8211: [0, 0.45833, 0.03056, 0, 0.55],
              8212: [0, 0.45833, 0.03056, 0, 1.10001],
              8216: [0, 0.69444, 0, 0, 0.30556],
              8217: [0, 0.69444, 0, 0, 0.30556],
              8220: [0, 0.69444, 0, 0, 0.55834],
              8221: [0, 0.69444, 0, 0, 0.55834]
            },
            "SansSerif-Italic": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0.05733, 0, 0.31945],
              34: [0, 0.69444, 316e-5, 0, 0.5],
              35: [0.19444, 0.69444, 0.05087, 0, 0.83334],
              36: [0.05556, 0.75, 0.11156, 0, 0.5],
              37: [0.05556, 0.75, 0.03126, 0, 0.83334],
              38: [0, 0.69444, 0.03058, 0, 0.75834],
              39: [0, 0.69444, 0.07816, 0, 0.27778],
              40: [0.25, 0.75, 0.13164, 0, 0.38889],
              41: [0.25, 0.75, 0.02536, 0, 0.38889],
              42: [0, 0.75, 0.11775, 0, 0.5],
              43: [0.08333, 0.58333, 0.02536, 0, 0.77778],
              44: [0.125, 0.08333, 0, 0, 0.27778],
              45: [0, 0.44444, 0.01946, 0, 0.33333],
              46: [0, 0.08333, 0, 0, 0.27778],
              47: [0.25, 0.75, 0.13164, 0, 0.5],
              48: [0, 0.65556, 0.11156, 0, 0.5],
              49: [0, 0.65556, 0.11156, 0, 0.5],
              50: [0, 0.65556, 0.11156, 0, 0.5],
              51: [0, 0.65556, 0.11156, 0, 0.5],
              52: [0, 0.65556, 0.11156, 0, 0.5],
              53: [0, 0.65556, 0.11156, 0, 0.5],
              54: [0, 0.65556, 0.11156, 0, 0.5],
              55: [0, 0.65556, 0.11156, 0, 0.5],
              56: [0, 0.65556, 0.11156, 0, 0.5],
              57: [0, 0.65556, 0.11156, 0, 0.5],
              58: [0, 0.44444, 0.02502, 0, 0.27778],
              59: [0.125, 0.44444, 0.02502, 0, 0.27778],
              61: [-0.13, 0.37, 0.05087, 0, 0.77778],
              63: [0, 0.69444, 0.11809, 0, 0.47222],
              64: [0, 0.69444, 0.07555, 0, 0.66667],
              65: [0, 0.69444, 0, 0, 0.66667],
              66: [0, 0.69444, 0.08293, 0, 0.66667],
              67: [0, 0.69444, 0.11983, 0, 0.63889],
              68: [0, 0.69444, 0.07555, 0, 0.72223],
              69: [0, 0.69444, 0.11983, 0, 0.59722],
              70: [0, 0.69444, 0.13372, 0, 0.56945],
              71: [0, 0.69444, 0.11983, 0, 0.66667],
              72: [0, 0.69444, 0.08094, 0, 0.70834],
              73: [0, 0.69444, 0.13372, 0, 0.27778],
              74: [0, 0.69444, 0.08094, 0, 0.47222],
              75: [0, 0.69444, 0.11983, 0, 0.69445],
              76: [0, 0.69444, 0, 0, 0.54167],
              77: [0, 0.69444, 0.08094, 0, 0.875],
              78: [0, 0.69444, 0.08094, 0, 0.70834],
              79: [0, 0.69444, 0.07555, 0, 0.73611],
              80: [0, 0.69444, 0.08293, 0, 0.63889],
              81: [0.125, 0.69444, 0.07555, 0, 0.73611],
              82: [0, 0.69444, 0.08293, 0, 0.64584],
              83: [0, 0.69444, 0.09205, 0, 0.55556],
              84: [0, 0.69444, 0.13372, 0, 0.68056],
              85: [0, 0.69444, 0.08094, 0, 0.6875],
              86: [0, 0.69444, 0.1615, 0, 0.66667],
              87: [0, 0.69444, 0.1615, 0, 0.94445],
              88: [0, 0.69444, 0.13372, 0, 0.66667],
              89: [0, 0.69444, 0.17261, 0, 0.66667],
              90: [0, 0.69444, 0.11983, 0, 0.61111],
              91: [0.25, 0.75, 0.15942, 0, 0.28889],
              93: [0.25, 0.75, 0.08719, 0, 0.28889],
              94: [0, 0.69444, 0.0799, 0, 0.5],
              95: [0.35, 0.09444, 0.08616, 0, 0.5],
              97: [0, 0.44444, 981e-5, 0, 0.48056],
              98: [0, 0.69444, 0.03057, 0, 0.51667],
              99: [0, 0.44444, 0.08336, 0, 0.44445],
              100: [0, 0.69444, 0.09483, 0, 0.51667],
              101: [0, 0.44444, 0.06778, 0, 0.44445],
              102: [0, 0.69444, 0.21705, 0, 0.30556],
              103: [0.19444, 0.44444, 0.10836, 0, 0.5],
              104: [0, 0.69444, 0.01778, 0, 0.51667],
              105: [0, 0.67937, 0.09718, 0, 0.23889],
              106: [0.19444, 0.67937, 0.09162, 0, 0.26667],
              107: [0, 0.69444, 0.08336, 0, 0.48889],
              108: [0, 0.69444, 0.09483, 0, 0.23889],
              109: [0, 0.44444, 0.01778, 0, 0.79445],
              110: [0, 0.44444, 0.01778, 0, 0.51667],
              111: [0, 0.44444, 0.06613, 0, 0.5],
              112: [0.19444, 0.44444, 0.0389, 0, 0.51667],
              113: [0.19444, 0.44444, 0.04169, 0, 0.51667],
              114: [0, 0.44444, 0.10836, 0, 0.34167],
              115: [0, 0.44444, 0.0778, 0, 0.38333],
              116: [0, 0.57143, 0.07225, 0, 0.36111],
              117: [0, 0.44444, 0.04169, 0, 0.51667],
              118: [0, 0.44444, 0.10836, 0, 0.46111],
              119: [0, 0.44444, 0.10836, 0, 0.68334],
              120: [0, 0.44444, 0.09169, 0, 0.46111],
              121: [0.19444, 0.44444, 0.10836, 0, 0.46111],
              122: [0, 0.44444, 0.08752, 0, 0.43472],
              126: [0.35, 0.32659, 0.08826, 0, 0.5],
              160: [0, 0, 0, 0, 0.25],
              168: [0, 0.67937, 0.06385, 0, 0.5],
              176: [0, 0.69444, 0, 0, 0.73752],
              184: [0.17014, 0, 0, 0, 0.44445],
              305: [0, 0.44444, 0.04169, 0, 0.23889],
              567: [0.19444, 0.44444, 0.04169, 0, 0.26667],
              710: [0, 0.69444, 0.0799, 0, 0.5],
              711: [0, 0.63194, 0.08432, 0, 0.5],
              713: [0, 0.60889, 0.08776, 0, 0.5],
              714: [0, 0.69444, 0.09205, 0, 0.5],
              715: [0, 0.69444, 0, 0, 0.5],
              728: [0, 0.69444, 0.09483, 0, 0.5],
              729: [0, 0.67937, 0.07774, 0, 0.27778],
              730: [0, 0.69444, 0, 0, 0.73752],
              732: [0, 0.67659, 0.08826, 0, 0.5],
              733: [0, 0.69444, 0.09205, 0, 0.5],
              915: [0, 0.69444, 0.13372, 0, 0.54167],
              916: [0, 0.69444, 0, 0, 0.83334],
              920: [0, 0.69444, 0.07555, 0, 0.77778],
              923: [0, 0.69444, 0, 0, 0.61111],
              926: [0, 0.69444, 0.12816, 0, 0.66667],
              928: [0, 0.69444, 0.08094, 0, 0.70834],
              931: [0, 0.69444, 0.11983, 0, 0.72222],
              933: [0, 0.69444, 0.09031, 0, 0.77778],
              934: [0, 0.69444, 0.04603, 0, 0.72222],
              936: [0, 0.69444, 0.09031, 0, 0.77778],
              937: [0, 0.69444, 0.08293, 0, 0.72222],
              8211: [0, 0.44444, 0.08616, 0, 0.5],
              8212: [0, 0.44444, 0.08616, 0, 1],
              8216: [0, 0.69444, 0.07816, 0, 0.27778],
              8217: [0, 0.69444, 0.07816, 0, 0.27778],
              8220: [0, 0.69444, 0.14205, 0, 0.5],
              8221: [0, 0.69444, 316e-5, 0, 0.5]
            },
            "SansSerif-Regular": {
              32: [0, 0, 0, 0, 0.25],
              33: [0, 0.69444, 0, 0, 0.31945],
              34: [0, 0.69444, 0, 0, 0.5],
              35: [0.19444, 0.69444, 0, 0, 0.83334],
              36: [0.05556, 0.75, 0, 0, 0.5],
              37: [0.05556, 0.75, 0, 0, 0.83334],
              38: [0, 0.69444, 0, 0, 0.75834],
              39: [0, 0.69444, 0, 0, 0.27778],
              40: [0.25, 0.75, 0, 0, 0.38889],
              41: [0.25, 0.75, 0, 0, 0.38889],
              42: [0, 0.75, 0, 0, 0.5],
              43: [0.08333, 0.58333, 0, 0, 0.77778],
              44: [0.125, 0.08333, 0, 0, 0.27778],
              45: [0, 0.44444, 0, 0, 0.33333],
              46: [0, 0.08333, 0, 0, 0.27778],
              47: [0.25, 0.75, 0, 0, 0.5],
              48: [0, 0.65556, 0, 0, 0.5],
              49: [0, 0.65556, 0, 0, 0.5],
              50: [0, 0.65556, 0, 0, 0.5],
              51: [0, 0.65556, 0, 0, 0.5],
              52: [0, 0.65556, 0, 0, 0.5],
              53: [0, 0.65556, 0, 0, 0.5],
              54: [0, 0.65556, 0, 0, 0.5],
              55: [0, 0.65556, 0, 0, 0.5],
              56: [0, 0.65556, 0, 0, 0.5],
              57: [0, 0.65556, 0, 0, 0.5],
              58: [0, 0.44444, 0, 0, 0.27778],
              59: [0.125, 0.44444, 0, 0, 0.27778],
              61: [-0.13, 0.37, 0, 0, 0.77778],
              63: [0, 0.69444, 0, 0, 0.47222],
              64: [0, 0.69444, 0, 0, 0.66667],
              65: [0, 0.69444, 0, 0, 0.66667],
              66: [0, 0.69444, 0, 0, 0.66667],
              67: [0, 0.69444, 0, 0, 0.63889],
              68: [0, 0.69444, 0, 0, 0.72223],
              69: [0, 0.69444, 0, 0, 0.59722],
              70: [0, 0.69444, 0, 0, 0.56945],
              71: [0, 0.69444, 0, 0, 0.66667],
              72: [0, 0.69444, 0, 0, 0.70834],
              73: [0, 0.69444, 0, 0, 0.27778],
              74: [0, 0.69444, 0, 0, 0.47222],
              75: [0, 0.69444, 0, 0, 0.69445],
              76: [0, 0.69444, 0, 0, 0.54167],
              77: [0, 0.69444, 0, 0, 0.875],
              78: [0, 0.69444, 0, 0, 0.70834],
              79: [0, 0.69444, 0, 0, 0.73611],
              80: [0, 0.69444, 0, 0, 0.63889],
              81: [0.125, 0.69444, 0, 0, 0.73611],
              82: [0, 0.69444, 0, 0, 0.64584],
              83: [0, 0.69444, 0, 0, 0.55556],
              84: [0, 0.69444, 0, 0, 0.68056],
              85: [0, 0.69444, 0, 0, 0.6875],
              86: [0, 0.69444, 0.01389, 0, 0.66667],
              87: [0, 0.69444, 0.01389, 0, 0.94445],
              88: [0, 0.69444, 0, 0, 0.66667],
              89: [0, 0.69444, 0.025, 0, 0.66667],
              90: [0, 0.69444, 0, 0, 0.61111],
              91: [0.25, 0.75, 0, 0, 0.28889],
              93: [0.25, 0.75, 0, 0, 0.28889],
              94: [0, 0.69444, 0, 0, 0.5],
              95: [0.35, 0.09444, 0.02778, 0, 0.5],
              97: [0, 0.44444, 0, 0, 0.48056],
              98: [0, 0.69444, 0, 0, 0.51667],
              99: [0, 0.44444, 0, 0, 0.44445],
              100: [0, 0.69444, 0, 0, 0.51667],
              101: [0, 0.44444, 0, 0, 0.44445],
              102: [0, 0.69444, 0.06944, 0, 0.30556],
              103: [0.19444, 0.44444, 0.01389, 0, 0.5],
              104: [0, 0.69444, 0, 0, 0.51667],
              105: [0, 0.67937, 0, 0, 0.23889],
              106: [0.19444, 0.67937, 0, 0, 0.26667],
              107: [0, 0.69444, 0, 0, 0.48889],
              108: [0, 0.69444, 0, 0, 0.23889],
              109: [0, 0.44444, 0, 0, 0.79445],
              110: [0, 0.44444, 0, 0, 0.51667],
              111: [0, 0.44444, 0, 0, 0.5],
              112: [0.19444, 0.44444, 0, 0, 0.51667],
              113: [0.19444, 0.44444, 0, 0, 0.51667],
              114: [0, 0.44444, 0.01389, 0, 0.34167],
              115: [0, 0.44444, 0, 0, 0.38333],
              116: [0, 0.57143, 0, 0, 0.36111],
              117: [0, 0.44444, 0, 0, 0.51667],
              118: [0, 0.44444, 0.01389, 0, 0.46111],
              119: [0, 0.44444, 0.01389, 0, 0.68334],
              120: [0, 0.44444, 0, 0, 0.46111],
              121: [0.19444, 0.44444, 0.01389, 0, 0.46111],
              122: [0, 0.44444, 0, 0, 0.43472],
              126: [0.35, 0.32659, 0, 0, 0.5],
              160: [0, 0, 0, 0, 0.25],
              168: [0, 0.67937, 0, 0, 0.5],
              176: [0, 0.69444, 0, 0, 0.66667],
              184: [0.17014, 0, 0, 0, 0.44445],
              305: [0, 0.44444, 0, 0, 0.23889],
              567: [0.19444, 0.44444, 0, 0, 0.26667],
              710: [0, 0.69444, 0, 0, 0.5],
              711: [0, 0.63194, 0, 0, 0.5],
              713: [0, 0.60889, 0, 0, 0.5],
              714: [0, 0.69444, 0, 0, 0.5],
              715: [0, 0.69444, 0, 0, 0.5],
              728: [0, 0.69444, 0, 0, 0.5],
              729: [0, 0.67937, 0, 0, 0.27778],
              730: [0, 0.69444, 0, 0, 0.66667],
              732: [0, 0.67659, 0, 0, 0.5],
              733: [0, 0.69444, 0, 0, 0.5],
              915: [0, 0.69444, 0, 0, 0.54167],
              916: [0, 0.69444, 0, 0, 0.83334],
              920: [0, 0.69444, 0, 0, 0.77778],
              923: [0, 0.69444, 0, 0, 0.61111],
              926: [0, 0.69444, 0, 0, 0.66667],
              928: [0, 0.69444, 0, 0, 0.70834],
              931: [0, 0.69444, 0, 0, 0.72222],
              933: [0, 0.69444, 0, 0, 0.77778],
              934: [0, 0.69444, 0, 0, 0.72222],
              936: [0, 0.69444, 0, 0, 0.77778],
              937: [0, 0.69444, 0, 0, 0.72222],
              8211: [0, 0.44444, 0.02778, 0, 0.5],
              8212: [0, 0.44444, 0.02778, 0, 1],
              8216: [0, 0.69444, 0, 0, 0.27778],
              8217: [0, 0.69444, 0, 0, 0.27778],
              8220: [0, 0.69444, 0, 0, 0.5],
              8221: [0, 0.69444, 0, 0, 0.5]
            },
            "Script-Regular": {
              32: [0, 0, 0, 0, 0.25],
              65: [0, 0.7, 0.22925, 0, 0.80253],
              66: [0, 0.7, 0.04087, 0, 0.90757],
              67: [0, 0.7, 0.1689, 0, 0.66619],
              68: [0, 0.7, 0.09371, 0, 0.77443],
              69: [0, 0.7, 0.18583, 0, 0.56162],
              70: [0, 0.7, 0.13634, 0, 0.89544],
              71: [0, 0.7, 0.17322, 0, 0.60961],
              72: [0, 0.7, 0.29694, 0, 0.96919],
              73: [0, 0.7, 0.19189, 0, 0.80907],
              74: [0.27778, 0.7, 0.19189, 0, 1.05159],
              75: [0, 0.7, 0.31259, 0, 0.91364],
              76: [0, 0.7, 0.19189, 0, 0.87373],
              77: [0, 0.7, 0.15981, 0, 1.08031],
              78: [0, 0.7, 0.3525, 0, 0.9015],
              79: [0, 0.7, 0.08078, 0, 0.73787],
              80: [0, 0.7, 0.08078, 0, 1.01262],
              81: [0, 0.7, 0.03305, 0, 0.88282],
              82: [0, 0.7, 0.06259, 0, 0.85],
              83: [0, 0.7, 0.19189, 0, 0.86767],
              84: [0, 0.7, 0.29087, 0, 0.74697],
              85: [0, 0.7, 0.25815, 0, 0.79996],
              86: [0, 0.7, 0.27523, 0, 0.62204],
              87: [0, 0.7, 0.27523, 0, 0.80532],
              88: [0, 0.7, 0.26006, 0, 0.94445],
              89: [0, 0.7, 0.2939, 0, 0.70961],
              90: [0, 0.7, 0.24037, 0, 0.8212],
              160: [0, 0, 0, 0, 0.25]
            },
            "Size1-Regular": {
              32: [0, 0, 0, 0, 0.25],
              40: [0.35001, 0.85, 0, 0, 0.45834],
              41: [0.35001, 0.85, 0, 0, 0.45834],
              47: [0.35001, 0.85, 0, 0, 0.57778],
              91: [0.35001, 0.85, 0, 0, 0.41667],
              92: [0.35001, 0.85, 0, 0, 0.57778],
              93: [0.35001, 0.85, 0, 0, 0.41667],
              123: [0.35001, 0.85, 0, 0, 0.58334],
              125: [0.35001, 0.85, 0, 0, 0.58334],
              160: [0, 0, 0, 0, 0.25],
              710: [0, 0.72222, 0, 0, 0.55556],
              732: [0, 0.72222, 0, 0, 0.55556],
              770: [0, 0.72222, 0, 0, 0.55556],
              771: [0, 0.72222, 0, 0, 0.55556],
              8214: [-99e-5, 0.601, 0, 0, 0.77778],
              8593: [1e-5, 0.6, 0, 0, 0.66667],
              8595: [1e-5, 0.6, 0, 0, 0.66667],
              8657: [1e-5, 0.6, 0, 0, 0.77778],
              8659: [1e-5, 0.6, 0, 0, 0.77778],
              8719: [0.25001, 0.75, 0, 0, 0.94445],
              8720: [0.25001, 0.75, 0, 0, 0.94445],
              8721: [0.25001, 0.75, 0, 0, 1.05556],
              8730: [0.35001, 0.85, 0, 0, 1],
              8739: [-599e-5, 0.606, 0, 0, 0.33333],
              8741: [-599e-5, 0.606, 0, 0, 0.55556],
              8747: [0.30612, 0.805, 0.19445, 0, 0.47222],
              8748: [0.306, 0.805, 0.19445, 0, 0.47222],
              8749: [0.306, 0.805, 0.19445, 0, 0.47222],
              8750: [0.30612, 0.805, 0.19445, 0, 0.47222],
              8896: [0.25001, 0.75, 0, 0, 0.83334],
              8897: [0.25001, 0.75, 0, 0, 0.83334],
              8898: [0.25001, 0.75, 0, 0, 0.83334],
              8899: [0.25001, 0.75, 0, 0, 0.83334],
              8968: [0.35001, 0.85, 0, 0, 0.47222],
              8969: [0.35001, 0.85, 0, 0, 0.47222],
              8970: [0.35001, 0.85, 0, 0, 0.47222],
              8971: [0.35001, 0.85, 0, 0, 0.47222],
              9168: [-99e-5, 0.601, 0, 0, 0.66667],
              10216: [0.35001, 0.85, 0, 0, 0.47222],
              10217: [0.35001, 0.85, 0, 0, 0.47222],
              10752: [0.25001, 0.75, 0, 0, 1.11111],
              10753: [0.25001, 0.75, 0, 0, 1.11111],
              10754: [0.25001, 0.75, 0, 0, 1.11111],
              10756: [0.25001, 0.75, 0, 0, 0.83334],
              10758: [0.25001, 0.75, 0, 0, 0.83334]
            },
            "Size2-Regular": {
              32: [0, 0, 0, 0, 0.25],
              40: [0.65002, 1.15, 0, 0, 0.59722],
              41: [0.65002, 1.15, 0, 0, 0.59722],
              47: [0.65002, 1.15, 0, 0, 0.81111],
              91: [0.65002, 1.15, 0, 0, 0.47222],
              92: [0.65002, 1.15, 0, 0, 0.81111],
              93: [0.65002, 1.15, 0, 0, 0.47222],
              123: [0.65002, 1.15, 0, 0, 0.66667],
              125: [0.65002, 1.15, 0, 0, 0.66667],
              160: [0, 0, 0, 0, 0.25],
              710: [0, 0.75, 0, 0, 1],
              732: [0, 0.75, 0, 0, 1],
              770: [0, 0.75, 0, 0, 1],
              771: [0, 0.75, 0, 0, 1],
              8719: [0.55001, 1.05, 0, 0, 1.27778],
              8720: [0.55001, 1.05, 0, 0, 1.27778],
              8721: [0.55001, 1.05, 0, 0, 1.44445],
              8730: [0.65002, 1.15, 0, 0, 1],
              8747: [0.86225, 1.36, 0.44445, 0, 0.55556],
              8748: [0.862, 1.36, 0.44445, 0, 0.55556],
              8749: [0.862, 1.36, 0.44445, 0, 0.55556],
              8750: [0.86225, 1.36, 0.44445, 0, 0.55556],
              8896: [0.55001, 1.05, 0, 0, 1.11111],
              8897: [0.55001, 1.05, 0, 0, 1.11111],
              8898: [0.55001, 1.05, 0, 0, 1.11111],
              8899: [0.55001, 1.05, 0, 0, 1.11111],
              8968: [0.65002, 1.15, 0, 0, 0.52778],
              8969: [0.65002, 1.15, 0, 0, 0.52778],
              8970: [0.65002, 1.15, 0, 0, 0.52778],
              8971: [0.65002, 1.15, 0, 0, 0.52778],
              10216: [0.65002, 1.15, 0, 0, 0.61111],
              10217: [0.65002, 1.15, 0, 0, 0.61111],
              10752: [0.55001, 1.05, 0, 0, 1.51112],
              10753: [0.55001, 1.05, 0, 0, 1.51112],
              10754: [0.55001, 1.05, 0, 0, 1.51112],
              10756: [0.55001, 1.05, 0, 0, 1.11111],
              10758: [0.55001, 1.05, 0, 0, 1.11111]
            },
            "Size3-Regular": {
              32: [0, 0, 0, 0, 0.25],
              40: [0.95003, 1.45, 0, 0, 0.73611],
              41: [0.95003, 1.45, 0, 0, 0.73611],
              47: [0.95003, 1.45, 0, 0, 1.04445],
              91: [0.95003, 1.45, 0, 0, 0.52778],
              92: [0.95003, 1.45, 0, 0, 1.04445],
              93: [0.95003, 1.45, 0, 0, 0.52778],
              123: [0.95003, 1.45, 0, 0, 0.75],
              125: [0.95003, 1.45, 0, 0, 0.75],
              160: [0, 0, 0, 0, 0.25],
              710: [0, 0.75, 0, 0, 1.44445],
              732: [0, 0.75, 0, 0, 1.44445],
              770: [0, 0.75, 0, 0, 1.44445],
              771: [0, 0.75, 0, 0, 1.44445],
              8730: [0.95003, 1.45, 0, 0, 1],
              8968: [0.95003, 1.45, 0, 0, 0.58334],
              8969: [0.95003, 1.45, 0, 0, 0.58334],
              8970: [0.95003, 1.45, 0, 0, 0.58334],
              8971: [0.95003, 1.45, 0, 0, 0.58334],
              10216: [0.95003, 1.45, 0, 0, 0.75],
              10217: [0.95003, 1.45, 0, 0, 0.75]
            },
            "Size4-Regular": {
              32: [0, 0, 0, 0, 0.25],
              40: [1.25003, 1.75, 0, 0, 0.79167],
              41: [1.25003, 1.75, 0, 0, 0.79167],
              47: [1.25003, 1.75, 0, 0, 1.27778],
              91: [1.25003, 1.75, 0, 0, 0.58334],
              92: [1.25003, 1.75, 0, 0, 1.27778],
              93: [1.25003, 1.75, 0, 0, 0.58334],
              123: [1.25003, 1.75, 0, 0, 0.80556],
              125: [1.25003, 1.75, 0, 0, 0.80556],
              160: [0, 0, 0, 0, 0.25],
              710: [0, 0.825, 0, 0, 1.8889],
              732: [0, 0.825, 0, 0, 1.8889],
              770: [0, 0.825, 0, 0, 1.8889],
              771: [0, 0.825, 0, 0, 1.8889],
              8730: [1.25003, 1.75, 0, 0, 1],
              8968: [1.25003, 1.75, 0, 0, 0.63889],
              8969: [1.25003, 1.75, 0, 0, 0.63889],
              8970: [1.25003, 1.75, 0, 0, 0.63889],
              8971: [1.25003, 1.75, 0, 0, 0.63889],
              9115: [0.64502, 1.155, 0, 0, 0.875],
              9116: [1e-5, 0.6, 0, 0, 0.875],
              9117: [0.64502, 1.155, 0, 0, 0.875],
              9118: [0.64502, 1.155, 0, 0, 0.875],
              9119: [1e-5, 0.6, 0, 0, 0.875],
              9120: [0.64502, 1.155, 0, 0, 0.875],
              9121: [0.64502, 1.155, 0, 0, 0.66667],
              9122: [-99e-5, 0.601, 0, 0, 0.66667],
              9123: [0.64502, 1.155, 0, 0, 0.66667],
              9124: [0.64502, 1.155, 0, 0, 0.66667],
              9125: [-99e-5, 0.601, 0, 0, 0.66667],
              9126: [0.64502, 1.155, 0, 0, 0.66667],
              9127: [1e-5, 0.9, 0, 0, 0.88889],
              9128: [0.65002, 1.15, 0, 0, 0.88889],
              9129: [0.90001, 0, 0, 0, 0.88889],
              9130: [0, 0.3, 0, 0, 0.88889],
              9131: [1e-5, 0.9, 0, 0, 0.88889],
              9132: [0.65002, 1.15, 0, 0, 0.88889],
              9133: [0.90001, 0, 0, 0, 0.88889],
              9143: [0.88502, 0.915, 0, 0, 1.05556],
              10216: [1.25003, 1.75, 0, 0, 0.80556],
              10217: [1.25003, 1.75, 0, 0, 0.80556],
              57344: [-499e-5, 0.605, 0, 0, 1.05556],
              57345: [-499e-5, 0.605, 0, 0, 1.05556],
              57680: [0, 0.12, 0, 0, 0.45],
              57681: [0, 0.12, 0, 0, 0.45],
              57682: [0, 0.12, 0, 0, 0.45],
              57683: [0, 0.12, 0, 0, 0.45]
            },
            "Typewriter-Regular": {
              32: [0, 0, 0, 0, 0.525],
              33: [0, 0.61111, 0, 0, 0.525],
              34: [0, 0.61111, 0, 0, 0.525],
              35: [0, 0.61111, 0, 0, 0.525],
              36: [0.08333, 0.69444, 0, 0, 0.525],
              37: [0.08333, 0.69444, 0, 0, 0.525],
              38: [0, 0.61111, 0, 0, 0.525],
              39: [0, 0.61111, 0, 0, 0.525],
              40: [0.08333, 0.69444, 0, 0, 0.525],
              41: [0.08333, 0.69444, 0, 0, 0.525],
              42: [0, 0.52083, 0, 0, 0.525],
              43: [-0.08056, 0.53055, 0, 0, 0.525],
              44: [0.13889, 0.125, 0, 0, 0.525],
              45: [-0.08056, 0.53055, 0, 0, 0.525],
              46: [0, 0.125, 0, 0, 0.525],
              47: [0.08333, 0.69444, 0, 0, 0.525],
              48: [0, 0.61111, 0, 0, 0.525],
              49: [0, 0.61111, 0, 0, 0.525],
              50: [0, 0.61111, 0, 0, 0.525],
              51: [0, 0.61111, 0, 0, 0.525],
              52: [0, 0.61111, 0, 0, 0.525],
              53: [0, 0.61111, 0, 0, 0.525],
              54: [0, 0.61111, 0, 0, 0.525],
              55: [0, 0.61111, 0, 0, 0.525],
              56: [0, 0.61111, 0, 0, 0.525],
              57: [0, 0.61111, 0, 0, 0.525],
              58: [0, 0.43056, 0, 0, 0.525],
              59: [0.13889, 0.43056, 0, 0, 0.525],
              60: [-0.05556, 0.55556, 0, 0, 0.525],
              61: [-0.19549, 0.41562, 0, 0, 0.525],
              62: [-0.05556, 0.55556, 0, 0, 0.525],
              63: [0, 0.61111, 0, 0, 0.525],
              64: [0, 0.61111, 0, 0, 0.525],
              65: [0, 0.61111, 0, 0, 0.525],
              66: [0, 0.61111, 0, 0, 0.525],
              67: [0, 0.61111, 0, 0, 0.525],
              68: [0, 0.61111, 0, 0, 0.525],
              69: [0, 0.61111, 0, 0, 0.525],
              70: [0, 0.61111, 0, 0, 0.525],
              71: [0, 0.61111, 0, 0, 0.525],
              72: [0, 0.61111, 0, 0, 0.525],
              73: [0, 0.61111, 0, 0, 0.525],
              74: [0, 0.61111, 0, 0, 0.525],
              75: [0, 0.61111, 0, 0, 0.525],
              76: [0, 0.61111, 0, 0, 0.525],
              77: [0, 0.61111, 0, 0, 0.525],
              78: [0, 0.61111, 0, 0, 0.525],
              79: [0, 0.61111, 0, 0, 0.525],
              80: [0, 0.61111, 0, 0, 0.525],
              81: [0.13889, 0.61111, 0, 0, 0.525],
              82: [0, 0.61111, 0, 0, 0.525],
              83: [0, 0.61111, 0, 0, 0.525],
              84: [0, 0.61111, 0, 0, 0.525],
              85: [0, 0.61111, 0, 0, 0.525],
              86: [0, 0.61111, 0, 0, 0.525],
              87: [0, 0.61111, 0, 0, 0.525],
              88: [0, 0.61111, 0, 0, 0.525],
              89: [0, 0.61111, 0, 0, 0.525],
              90: [0, 0.61111, 0, 0, 0.525],
              91: [0.08333, 0.69444, 0, 0, 0.525],
              92: [0.08333, 0.69444, 0, 0, 0.525],
              93: [0.08333, 0.69444, 0, 0, 0.525],
              94: [0, 0.61111, 0, 0, 0.525],
              95: [0.09514, 0, 0, 0, 0.525],
              96: [0, 0.61111, 0, 0, 0.525],
              97: [0, 0.43056, 0, 0, 0.525],
              98: [0, 0.61111, 0, 0, 0.525],
              99: [0, 0.43056, 0, 0, 0.525],
              100: [0, 0.61111, 0, 0, 0.525],
              101: [0, 0.43056, 0, 0, 0.525],
              102: [0, 0.61111, 0, 0, 0.525],
              103: [0.22222, 0.43056, 0, 0, 0.525],
              104: [0, 0.61111, 0, 0, 0.525],
              105: [0, 0.61111, 0, 0, 0.525],
              106: [0.22222, 0.61111, 0, 0, 0.525],
              107: [0, 0.61111, 0, 0, 0.525],
              108: [0, 0.61111, 0, 0, 0.525],
              109: [0, 0.43056, 0, 0, 0.525],
              110: [0, 0.43056, 0, 0, 0.525],
              111: [0, 0.43056, 0, 0, 0.525],
              112: [0.22222, 0.43056, 0, 0, 0.525],
              113: [0.22222, 0.43056, 0, 0, 0.525],
              114: [0, 0.43056, 0, 0, 0.525],
              115: [0, 0.43056, 0, 0, 0.525],
              116: [0, 0.55358, 0, 0, 0.525],
              117: [0, 0.43056, 0, 0, 0.525],
              118: [0, 0.43056, 0, 0, 0.525],
              119: [0, 0.43056, 0, 0, 0.525],
              120: [0, 0.43056, 0, 0, 0.525],
              121: [0.22222, 0.43056, 0, 0, 0.525],
              122: [0, 0.43056, 0, 0, 0.525],
              123: [0.08333, 0.69444, 0, 0, 0.525],
              124: [0.08333, 0.69444, 0, 0, 0.525],
              125: [0.08333, 0.69444, 0, 0, 0.525],
              126: [0, 0.61111, 0, 0, 0.525],
              127: [0, 0.61111, 0, 0, 0.525],
              160: [0, 0, 0, 0, 0.525],
              176: [0, 0.61111, 0, 0, 0.525],
              184: [0.19445, 0, 0, 0, 0.525],
              305: [0, 0.43056, 0, 0, 0.525],
              567: [0.22222, 0.43056, 0, 0, 0.525],
              711: [0, 0.56597, 0, 0, 0.525],
              713: [0, 0.56555, 0, 0, 0.525],
              714: [0, 0.61111, 0, 0, 0.525],
              715: [0, 0.61111, 0, 0, 0.525],
              728: [0, 0.61111, 0, 0, 0.525],
              730: [0, 0.61111, 0, 0, 0.525],
              770: [0, 0.61111, 0, 0, 0.525],
              771: [0, 0.61111, 0, 0, 0.525],
              776: [0, 0.61111, 0, 0, 0.525],
              915: [0, 0.61111, 0, 0, 0.525],
              916: [0, 0.61111, 0, 0, 0.525],
              920: [0, 0.61111, 0, 0, 0.525],
              923: [0, 0.61111, 0, 0, 0.525],
              926: [0, 0.61111, 0, 0, 0.525],
              928: [0, 0.61111, 0, 0, 0.525],
              931: [0, 0.61111, 0, 0, 0.525],
              933: [0, 0.61111, 0, 0, 0.525],
              934: [0, 0.61111, 0, 0, 0.525],
              936: [0, 0.61111, 0, 0, 0.525],
              937: [0, 0.61111, 0, 0, 0.525],
              8216: [0, 0.61111, 0, 0, 0.525],
              8217: [0, 0.61111, 0, 0, 0.525],
              8242: [0, 0.61111, 0, 0, 0.525],
              9251: [0.11111, 0.21944, 0, 0, 0.525]
            }
          };
          const O0 = {
            slant: [0.25, 0.25, 0.25],
            // sigma1
            space: [0, 0, 0],
            // sigma2
            stretch: [0, 0, 0],
            // sigma3
            shrink: [0, 0, 0],
            // sigma4
            xHeight: [0.431, 0.431, 0.431],
            // sigma5
            quad: [1, 1.171, 1.472],
            // sigma6
            extraSpace: [0, 0, 0],
            // sigma7
            num1: [0.677, 0.732, 0.925],
            // sigma8
            num2: [0.394, 0.384, 0.387],
            // sigma9
            num3: [0.444, 0.471, 0.504],
            // sigma10
            denom1: [0.686, 0.752, 1.025],
            // sigma11
            denom2: [0.345, 0.344, 0.532],
            // sigma12
            sup1: [0.413, 0.503, 0.504],
            // sigma13
            sup2: [0.363, 0.431, 0.404],
            // sigma14
            sup3: [0.289, 0.286, 0.294],
            // sigma15
            sub1: [0.15, 0.143, 0.2],
            // sigma16
            sub2: [0.247, 0.286, 0.4],
            // sigma17
            supDrop: [0.386, 0.353, 0.494],
            // sigma18
            subDrop: [0.05, 0.071, 0.1],
            // sigma19
            delim1: [2.39, 1.7, 1.98],
            // sigma20
            delim2: [1.01, 1.157, 1.42],
            // sigma21
            axisHeight: [0.25, 0.25, 0.25],
            // sigma22
            // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
            // they correspond to the font parameters of the extension fonts (family 3).
            // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
            // match cmex7, we'd use cmex7.tfm values for script and scriptscript
            // values.
            defaultRuleThickness: [0.04, 0.049, 0.049],
            // xi8; cmex7: 0.049
            bigOpSpacing1: [0.111, 0.111, 0.111],
            // xi9
            bigOpSpacing2: [0.166, 0.166, 0.166],
            // xi10
            bigOpSpacing3: [0.2, 0.2, 0.2],
            // xi11
            bigOpSpacing4: [0.6, 0.611, 0.611],
            // xi12; cmex7: 0.611
            bigOpSpacing5: [0.1, 0.143, 0.143],
            // xi13; cmex7: 0.143
            // The \sqrt rule width is taken from the height of the surd character.
            // Since we use the same font at all sizes, this thickness doesn't scale.
            sqrtRuleThickness: [0.04, 0.04, 0.04],
            // This value determines how large a pt is, for metrics which are defined
            // in terms of pts.
            // This value is also used in katex.less; if you change it make sure the
            // values match.
            ptPerEm: [10, 10, 10],
            // The space between adjacent `|` columns in an array definition. From
            // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
            doubleRuleSep: [0.2, 0.2, 0.2],
            // The width of separator lines in {array} environments. From
            // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
            arrayRuleWidth: [0.04, 0.04, 0.04],
            // Two values from LaTeX source2e:
            fboxsep: [0.3, 0.3, 0.3],
            //        3 pt / ptPerEm
            fboxrule: [0.04, 0.04, 0.04]
            // 0.4 pt / ptPerEm
          }, Nn = {
            // Latin-1
            Å: "A",
            Ð: "D",
            Þ: "o",
            å: "a",
            ð: "d",
            þ: "o",
            // Cyrillic
            А: "A",
            Б: "B",
            В: "B",
            Г: "F",
            Д: "A",
            Е: "E",
            Ж: "K",
            З: "3",
            И: "N",
            Й: "N",
            К: "K",
            Л: "N",
            М: "M",
            Н: "H",
            О: "O",
            П: "N",
            Р: "P",
            С: "C",
            Т: "T",
            У: "y",
            Ф: "O",
            Х: "X",
            Ц: "U",
            Ч: "h",
            Ш: "W",
            Щ: "W",
            Ъ: "B",
            Ы: "X",
            Ь: "B",
            Э: "3",
            Ю: "X",
            Я: "R",
            а: "a",
            б: "b",
            в: "a",
            г: "r",
            д: "y",
            е: "e",
            ж: "m",
            з: "e",
            и: "n",
            й: "n",
            к: "n",
            л: "n",
            м: "m",
            н: "n",
            о: "o",
            п: "n",
            р: "p",
            с: "c",
            т: "o",
            у: "y",
            ф: "b",
            х: "x",
            ц: "n",
            ч: "n",
            ш: "w",
            щ: "w",
            ъ: "a",
            ы: "m",
            ь: "a",
            э: "e",
            ю: "m",
            я: "r"
          };
          function un(t, e) {
            Et[t] = e;
          }
          function _0(t, e, r) {
            if (!Et[e])
              throw new Error("Font metrics not found for font: " + e + ".");
            let l = t.charCodeAt(0), c = Et[e][l];
            if (!c && t[0] in Nn && (l = Nn[t[0]].charCodeAt(0), c = Et[e][l]), !c && r === "text" && ie(l) && (c = Et[e][77]), c)
              return {
                depth: c[0],
                height: c[1],
                italic: c[2],
                skew: c[3],
                width: c[4]
              };
          }
          const s0 = {};
          function S0(t) {
            let e;
            if (t >= 5 ? e = 0 : t >= 3 ? e = 1 : e = 2, !s0[e]) {
              const r = s0[e] = {
                cssEmPerMu: O0.quad[e] / 18
              };
              for (const l in O0)
                O0.hasOwnProperty(l) && (r[l] = O0[l][e]);
            }
            return s0[e];
          }
          const Rn = [
            // Each element contains [textsize, scriptsize, scriptscriptsize].
            // The size mappings are taken from TeX with \normalsize=10pt.
            [1, 1, 1],
            // size1: [5, 5, 5]              \tiny
            [2, 1, 1],
            // size2: [6, 5, 5]
            [3, 1, 1],
            // size3: [7, 5, 5]              \scriptsize
            [4, 2, 1],
            // size4: [8, 6, 5]              \footnotesize
            [5, 2, 1],
            // size5: [9, 6, 5]              \small
            [6, 3, 1],
            // size6: [10, 7, 5]             \normalsize
            [7, 4, 2],
            // size7: [12, 8, 6]             \large
            [8, 6, 3],
            // size8: [14.4, 10, 7]          \Large
            [9, 7, 6],
            // size9: [17.28, 12, 10]        \LARGE
            [10, 8, 7],
            // size10: [20.74, 14.4, 12]     \huge
            [11, 10, 9]
            // size11: [24.88, 20.74, 17.28] \HUGE
          ], cn = [
            // fontMetrics.js:getGlobalMetrics also uses size indexes, so if
            // you change size indexes, change that function.
            0.5,
            0.6,
            0.7,
            0.8,
            0.9,
            1,
            1.2,
            1.44,
            1.728,
            2.074,
            2.488
          ], hn = function(t, e) {
            return e.size < 2 ? t : Rn[t - 1][e.size - 1];
          };
          class Ft {
            // A font family applies to a group of fonts (i.e. SansSerif), while a font
            // represents a specific font (i.e. SansSerif Bold).
            // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
            /**
             * The base size index.
             */
            constructor(e) {
              this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = e.style, this.color = e.color, this.size = e.size || Ft.BASESIZE, this.textSize = e.textSize || this.size, this.phantom = !!e.phantom, this.font = e.font || "", this.fontFamily = e.fontFamily || "", this.fontWeight = e.fontWeight || "", this.fontShape = e.fontShape || "", this.sizeMultiplier = cn[this.size - 1], this.maxSize = e.maxSize, this.minRuleThickness = e.minRuleThickness, this._fontMetrics = void 0;
            }
            /**
             * Returns a new options object with the same properties as "this".  Properties
             * from "extension" will be copied to the new options object.
             */
            extend(e) {
              const r = {
                style: this.style,
                size: this.size,
                textSize: this.textSize,
                color: this.color,
                phantom: this.phantom,
                font: this.font,
                fontFamily: this.fontFamily,
                fontWeight: this.fontWeight,
                fontShape: this.fontShape,
                maxSize: this.maxSize,
                minRuleThickness: this.minRuleThickness
              };
              for (const l in e)
                e.hasOwnProperty(l) && (r[l] = e[l]);
              return new Ft(r);
            }
            /**
             * Return an options object with the given style. If `this.style === style`,
             * returns `this`.
             */
            havingStyle(e) {
              return this.style === e ? this : this.extend({
                style: e,
                size: hn(this.textSize, e)
              });
            }
            /**
             * Return an options object with a cramped version of the current style. If
             * the current style is cramped, returns `this`.
             */
            havingCrampedStyle() {
              return this.havingStyle(this.style.cramp());
            }
            /**
             * Return an options object with the given size and in at least `\textstyle`.
             * Returns `this` if appropriate.
             */
            havingSize(e) {
              return this.size === e && this.textSize === e ? this : this.extend({
                style: this.style.text(),
                size: e,
                textSize: e,
                sizeMultiplier: cn[e - 1]
              });
            }
            /**
             * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
             * changes to at least `\textstyle`.
             */
            havingBaseStyle(e) {
              e = e || this.style.text();
              const r = hn(Ft.BASESIZE, e);
              return this.size === r && this.textSize === Ft.BASESIZE && this.style === e ? this : this.extend({
                style: e,
                size: r
              });
            }
            /**
             * Remove the effect of sizing changes such as \Huge.
             * Keep the effect of the current style, such as \scriptstyle.
             */
            havingBaseSizing() {
              let e;
              switch (this.style.id) {
                case 4:
                case 5:
                  e = 3;
                  break;
                case 6:
                case 7:
                  e = 1;
                  break;
                default:
                  e = 6;
              }
              return this.extend({
                style: this.style.text(),
                size: e
              });
            }
            /**
             * Create a new options object with the given color.
             */
            withColor(e) {
              return this.extend({
                color: e
              });
            }
            /**
             * Create a new options object with "phantom" set to true.
             */
            withPhantom() {
              return this.extend({
                phantom: !0
              });
            }
            /**
             * Creates a new options object with the given math font or old text font.
             * @type {[type]}
             */
            withFont(e) {
              return this.extend({
                font: e
              });
            }
            /**
             * Create a new options objects with the given fontFamily.
             */
            withTextFontFamily(e) {
              return this.extend({
                fontFamily: e,
                font: ""
              });
            }
            /**
             * Creates a new options object with the given font weight
             */
            withTextFontWeight(e) {
              return this.extend({
                fontWeight: e,
                font: ""
              });
            }
            /**
             * Creates a new options object with the given font weight
             */
            withTextFontShape(e) {
              return this.extend({
                fontShape: e,
                font: ""
              });
            }
            /**
             * Return the CSS sizing classes required to switch from enclosing options
             * `oldOptions` to `this`. Returns an array of classes.
             */
            sizingClasses(e) {
              return e.size !== this.size ? ["sizing", "reset-size" + e.size, "size" + this.size] : [];
            }
            /**
             * Return the CSS sizing classes required to switch to the base size. Like
             * `this.havingSize(BASESIZE).sizingClasses(this)`.
             */
            baseSizingClasses() {
              return this.size !== Ft.BASESIZE ? ["sizing", "reset-size" + this.size, "size" + Ft.BASESIZE] : [];
            }
            /**
             * Return the font metrics for this size.
             */
            fontMetrics() {
              return this._fontMetrics || (this._fontMetrics = S0(this.size)), this._fontMetrics;
            }
            /**
             * Gets the CSS color of the current options object
             */
            getColor() {
              return this.phantom ? "transparent" : this.color;
            }
          }
          Ft.BASESIZE = 6;
          var In = Ft;
          const E0 = {
            // https://en.wikibooks.org/wiki/LaTeX/Lengths and
            // https://tex.stackexchange.com/a/8263
            pt: 1,
            // TeX point
            mm: 7227 / 2540,
            // millimeter
            cm: 7227 / 254,
            // centimeter
            in: 72.27,
            // inch
            bp: 803 / 800,
            // big (PostScript) points
            pc: 12,
            // pica
            dd: 1238 / 1157,
            // didot
            cc: 14856 / 1157,
            // cicero (12 didot)
            nd: 685 / 642,
            // new didot
            nc: 1370 / 107,
            // new cicero (12 new didot)
            sp: 1 / 65536,
            // scaled point (TeX's internal smallest unit)
            // https://tex.stackexchange.com/a/41371
            px: 803 / 800
            // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
          }, Q0 = {
            ex: !0,
            em: !0,
            mu: !0
          }, Nt = function(t) {
            return typeof t != "string" && (t = t.unit), t in E0 || t in Q0 || t === "ex";
          }, Me = function(t, e) {
            let r;
            if (t.unit in E0)
              r = E0[t.unit] / e.fontMetrics().ptPerEm / e.sizeMultiplier;
            else if (t.unit === "mu")
              r = e.fontMetrics().cssEmPerMu;
            else {
              let l;
              if (e.style.isTight() ? l = e.havingStyle(e.style.text()) : l = e, t.unit === "ex")
                r = l.fontMetrics().xHeight;
              else if (t.unit === "em")
                r = l.fontMetrics().quad;
              else
                throw new u("Invalid unit: '" + t.unit + "'");
              l !== e && (r *= l.sizeMultiplier / e.sizeMultiplier);
            }
            return Math.min(t.number * r, e.maxSize);
          }, Q = function(t) {
            return +t.toFixed(4) + "em";
          }, Rt = function(t) {
            return t.filter((e) => e).join(" ");
          }, Ln = function(t, e, r) {
            if (this.classes = t || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = r || {}, e) {
              e.style.isTight() && this.classes.push("mtight");
              const l = e.getColor();
              l && (this.style.color = l);
            }
          }, F0 = function(t) {
            const e = document.createElement(t);
            e.className = Rt(this.classes);
            for (const r in this.style)
              this.style.hasOwnProperty(r) && (e.style[r] = this.style[r]);
            for (const r in this.attributes)
              this.attributes.hasOwnProperty(r) && e.setAttribute(r, this.attributes[r]);
            for (let r = 0; r < this.children.length; r++)
              e.appendChild(this.children[r].toNode());
            return e;
          }, On = function(t) {
            let e = "<" + t;
            this.classes.length && (e += ' class="' + U.escape(Rt(this.classes)) + '"');
            let r = "";
            for (const l in this.style)
              this.style.hasOwnProperty(l) && (r += U.hyphenate(l) + ":" + this.style[l] + ";");
            r && (e += ' style="' + U.escape(r) + '"');
            for (const l in this.attributes)
              this.attributes.hasOwnProperty(l) && (e += " " + l + '="' + U.escape(this.attributes[l]) + '"');
            e += ">";
            for (let l = 0; l < this.children.length; l++)
              e += this.children[l].toMarkup();
            return e += "</" + t + ">", e;
          };
          class q0 {
            constructor(e, r, l, c) {
              this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, Ln.call(this, e, l, c), this.children = r || [];
            }
            /**
             * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
             * all browsers support attributes the same, and having too many custom
             * attributes is probably bad.
             */
            setAttribute(e, r) {
              this.attributes[e] = r;
            }
            hasClass(e) {
              return U.contains(this.classes, e);
            }
            toNode() {
              return F0.call(this, "span");
            }
            toMarkup() {
              return On.call(this, "span");
            }
          }
          class je {
            constructor(e, r, l, c) {
              this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, Ln.call(this, r, c), this.children = l || [], this.setAttribute("href", e);
            }
            setAttribute(e, r) {
              this.attributes[e] = r;
            }
            hasClass(e) {
              return U.contains(this.classes, e);
            }
            toNode() {
              return F0.call(this, "a");
            }
            toMarkup() {
              return On.call(this, "a");
            }
          }
          class T0 {
            constructor(e, r, l) {
              this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = r, this.src = e, this.classes = ["mord"], this.style = l;
            }
            hasClass(e) {
              return U.contains(this.classes, e);
            }
            toNode() {
              const e = document.createElement("img");
              e.src = this.src, e.alt = this.alt, e.className = "mord";
              for (const r in this.style)
                this.style.hasOwnProperty(r) && (e.style[r] = this.style[r]);
              return e;
            }
            toMarkup() {
              let e = '<img src="' + U.escape(this.src) + '"' + (' alt="' + U.escape(this.alt) + '"'), r = "";
              for (const l in this.style)
                this.style.hasOwnProperty(l) && (r += U.hyphenate(l) + ":" + this.style[l] + ";");
              return r && (e += ' style="' + U.escape(r) + '"'), e += "'/>", e;
            }
          }
          const qn = {
            î: "ı̂",
            ï: "ı̈",
            í: "ı́",
            // 'ī': '\u0131\u0304', // enable when we add Extended Latin
            ì: "ı̀"
          };
          class wt {
            constructor(e, r, l, c, m, b, y, v) {
              this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = r || 0, this.depth = l || 0, this.italic = c || 0, this.skew = m || 0, this.width = b || 0, this.classes = y || [], this.style = v || {}, this.maxFontSize = 0;
              const C = Ke(this.text.charCodeAt(0));
              C && this.classes.push(C + "_fallback"), /[îïíì]/.test(this.text) && (this.text = qn[this.text]);
            }
            hasClass(e) {
              return U.contains(this.classes, e);
            }
            /**
             * Creates a text node or span from a symbol node. Note that a span is only
             * created if it is needed.
             */
            toNode() {
              const e = document.createTextNode(this.text);
              let r = null;
              this.italic > 0 && (r = document.createElement("span"), r.style.marginRight = Q(this.italic)), this.classes.length > 0 && (r = r || document.createElement("span"), r.className = Rt(this.classes));
              for (const l in this.style)
                this.style.hasOwnProperty(l) && (r = r || document.createElement("span"), r.style[l] = this.style[l]);
              return r ? (r.appendChild(e), r) : e;
            }
            /**
             * Creates markup for a symbol node.
             */
            toMarkup() {
              let e = !1, r = "<span";
              this.classes.length && (e = !0, r += ' class="', r += U.escape(Rt(this.classes)), r += '"');
              let l = "";
              this.italic > 0 && (l += "margin-right:" + this.italic + "em;");
              for (const m in this.style)
                this.style.hasOwnProperty(m) && (l += U.hyphenate(m) + ":" + this.style[m] + ";");
              l && (e = !0, r += ' style="' + U.escape(l) + '"');
              const c = U.escape(this.text);
              return e ? (r += ">", r += c, r += "</span>", r) : c;
            }
          }
          class It {
            constructor(e, r) {
              this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = r || {};
            }
            toNode() {
              const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
              for (const l in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, l) && r.setAttribute(l, this.attributes[l]);
              for (let l = 0; l < this.children.length; l++)
                r.appendChild(this.children[l].toNode());
              return r;
            }
            toMarkup() {
              let e = '<svg xmlns="http://www.w3.org/2000/svg"';
              for (const r in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, r) && (e += " " + r + '="' + U.escape(this.attributes[r]) + '"');
              e += ">";
              for (let r = 0; r < this.children.length; r++)
                e += this.children[r].toMarkup();
              return e += "</svg>", e;
            }
          }
          class Lt {
            constructor(e, r) {
              this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = r;
            }
            toNode() {
              const r = document.createElementNS("http://www.w3.org/2000/svg", "path");
              return this.alternate ? r.setAttribute("d", this.alternate) : r.setAttribute("d", St[this.pathName]), r;
            }
            toMarkup() {
              return this.alternate ? '<path d="' + U.escape(this.alternate) + '"/>' : '<path d="' + U.escape(St[this.pathName]) + '"/>';
            }
          }
          class J0 {
            constructor(e) {
              this.attributes = void 0, this.attributes = e || {};
            }
            toNode() {
              const r = document.createElementNS("http://www.w3.org/2000/svg", "line");
              for (const l in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, l) && r.setAttribute(l, this.attributes[l]);
              return r;
            }
            toMarkup() {
              let e = "<line";
              for (const r in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, r) && (e += " " + r + '="' + U.escape(this.attributes[r]) + '"');
              return e += "/>", e;
            }
          }
          function fn(t) {
            if (t instanceof wt)
              return t;
            throw new Error("Expected symbolNode but got " + String(t) + ".");
          }
          function Rr(t) {
            if (t instanceof q0)
              return t;
            throw new Error("Expected span<HtmlDomNode> but got " + String(t) + ".");
          }
          const Pn = {
            bin: 1,
            close: 1,
            inner: 1,
            open: 1,
            punct: 1,
            rel: 1
          }, Hn = {
            "accent-token": 1,
            mathord: 1,
            "op-token": 1,
            spacing: 1,
            textord: 1
          }, $0 = {
            math: {},
            text: {}
          };
          var ye = $0;
          function h(t, e, r, l, c, m) {
            $0[t][c] = {
              font: e,
              group: r,
              replace: l
            }, m && l && ($0[t][l] = $0[t][c]);
          }
          const d = "math", X = "text", w = "main", E = "ams", De = "accent-token", te = "bin", lt = "close", y0 = "inner", oe = "mathord", Xe = "op-token", re = "open", z = "punct", x = "rel", ne = "spacing", F = "textord";
          h(d, w, x, "≡", "\\equiv", !0), h(d, w, x, "≺", "\\prec", !0), h(d, w, x, "≻", "\\succ", !0), h(d, w, x, "∼", "\\sim", !0), h(d, w, x, "⊥", "\\perp"), h(d, w, x, "⪯", "\\preceq", !0), h(d, w, x, "⪰", "\\succeq", !0), h(d, w, x, "≃", "\\simeq", !0), h(d, w, x, "∣", "\\mid", !0), h(d, w, x, "≪", "\\ll", !0), h(d, w, x, "≫", "\\gg", !0), h(d, w, x, "≍", "\\asymp", !0), h(d, w, x, "∥", "\\parallel"), h(d, w, x, "⋈", "\\bowtie", !0), h(d, w, x, "⌣", "\\smile", !0), h(d, w, x, "⊑", "\\sqsubseteq", !0), h(d, w, x, "⊒", "\\sqsupseteq", !0), h(d, w, x, "≐", "\\doteq", !0), h(d, w, x, "⌢", "\\frown", !0), h(d, w, x, "∋", "\\ni", !0), h(d, w, x, "∝", "\\propto", !0), h(d, w, x, "⊢", "\\vdash", !0), h(d, w, x, "⊣", "\\dashv", !0), h(d, w, x, "∋", "\\owns"), h(d, w, z, ".", "\\ldotp"), h(d, w, z, "⋅", "\\cdotp"), h(d, w, F, "#", "\\#"), h(X, w, F, "#", "\\#"), h(d, w, F, "&", "\\&"), h(X, w, F, "&", "\\&"), h(d, w, F, "ℵ", "\\aleph", !0), h(d, w, F, "∀", "\\forall", !0), h(d, w, F, "ℏ", "\\hbar", !0), h(d, w, F, "∃", "\\exists", !0), h(d, w, F, "∇", "\\nabla", !0), h(d, w, F, "♭", "\\flat", !0), h(d, w, F, "ℓ", "\\ell", !0), h(d, w, F, "♮", "\\natural", !0), h(d, w, F, "♣", "\\clubsuit", !0), h(d, w, F, "℘", "\\wp", !0), h(d, w, F, "♯", "\\sharp", !0), h(d, w, F, "♢", "\\diamondsuit", !0), h(d, w, F, "ℜ", "\\Re", !0), h(d, w, F, "♡", "\\heartsuit", !0), h(d, w, F, "ℑ", "\\Im", !0), h(d, w, F, "♠", "\\spadesuit", !0), h(d, w, F, "§", "\\S", !0), h(X, w, F, "§", "\\S"), h(d, w, F, "¶", "\\P", !0), h(X, w, F, "¶", "\\P"), h(d, w, F, "†", "\\dag"), h(X, w, F, "†", "\\dag"), h(X, w, F, "†", "\\textdagger"), h(d, w, F, "‡", "\\ddag"), h(X, w, F, "‡", "\\ddag"), h(X, w, F, "‡", "\\textdaggerdbl"), h(d, w, lt, "⎱", "\\rmoustache", !0), h(d, w, re, "⎰", "\\lmoustache", !0), h(d, w, lt, "⟯", "\\rgroup", !0), h(d, w, re, "⟮", "\\lgroup", !0), h(d, w, te, "∓", "\\mp", !0), h(d, w, te, "⊖", "\\ominus", !0), h(d, w, te, "⊎", "\\uplus", !0), h(d, w, te, "⊓", "\\sqcap", !0), h(d, w, te, "∗", "\\ast"), h(d, w, te, "⊔", "\\sqcup", !0), h(d, w, te, "◯", "\\bigcirc", !0), h(d, w, te, "∙", "\\bullet", !0), h(d, w, te, "‡", "\\ddagger"), h(d, w, te, "≀", "\\wr", !0), h(d, w, te, "⨿", "\\amalg"), h(d, w, te, "&", "\\And"), h(d, w, x, "⟵", "\\longleftarrow", !0), h(d, w, x, "⇐", "\\Leftarrow", !0), h(d, w, x, "⟸", "\\Longleftarrow", !0), h(d, w, x, "⟶", "\\longrightarrow", !0), h(d, w, x, "⇒", "\\Rightarrow", !0), h(d, w, x, "⟹", "\\Longrightarrow", !0), h(d, w, x, "↔", "\\leftrightarrow", !0), h(d, w, x, "⟷", "\\longleftrightarrow", !0), h(d, w, x, "⇔", "\\Leftrightarrow", !0), h(d, w, x, "⟺", "\\Longleftrightarrow", !0), h(d, w, x, "↦", "\\mapsto", !0), h(d, w, x, "⟼", "\\longmapsto", !0), h(d, w, x, "↗", "\\nearrow", !0), h(d, w, x, "↩", "\\hookleftarrow", !0), h(d, w, x, "↪", "\\hookrightarrow", !0), h(d, w, x, "↘", "\\searrow", !0), h(d, w, x, "↼", "\\leftharpoonup", !0), h(d, w, x, "⇀", "\\rightharpoonup", !0), h(d, w, x, "↙", "\\swarrow", !0), h(d, w, x, "↽", "\\leftharpoondown", !0), h(d, w, x, "⇁", "\\rightharpoondown", !0), h(d, w, x, "↖", "\\nwarrow", !0), h(d, w, x, "⇌", "\\rightleftharpoons", !0), h(d, E, x, "≮", "\\nless", !0), h(d, E, x, "", "\\@nleqslant"), h(d, E, x, "", "\\@nleqq"), h(d, E, x, "⪇", "\\lneq", !0), h(d, E, x, "≨", "\\lneqq", !0), h(d, E, x, "", "\\@lvertneqq"), h(d, E, x, "⋦", "\\lnsim", !0), h(d, E, x, "⪉", "\\lnapprox", !0), h(d, E, x, "⊀", "\\nprec", !0), h(d, E, x, "⋠", "\\npreceq", !0), h(d, E, x, "⋨", "\\precnsim", !0), h(d, E, x, "⪹", "\\precnapprox", !0), h(d, E, x, "≁", "\\nsim", !0), h(d, E, x, "", "\\@nshortmid"), h(d, E, x, "∤", "\\nmid", !0), h(d, E, x, "⊬", "\\nvdash", !0), h(d, E, x, "⊭", "\\nvDash", !0), h(d, E, x, "⋪", "\\ntriangleleft"), h(d, E, x, "⋬", "\\ntrianglelefteq", !0), h(d, E, x, "⊊", "\\subsetneq", !0), h(d, E, x, "", "\\@varsubsetneq"), h(d, E, x, "⫋", "\\subsetneqq", !0), h(d, E, x, "", "\\@varsubsetneqq"), h(d, E, x, "≯", "\\ngtr", !0), h(d, E, x, "", "\\@ngeqslant"), h(d, E, x, "", "\\@ngeqq"), h(d, E, x, "⪈", "\\gneq", !0), h(d, E, x, "≩", "\\gneqq", !0), h(d, E, x, "", "\\@gvertneqq"), h(d, E, x, "⋧", "\\gnsim", !0), h(d, E, x, "⪊", "\\gnapprox", !0), h(d, E, x, "⊁", "\\nsucc", !0), h(d, E, x, "⋡", "\\nsucceq", !0), h(d, E, x, "⋩", "\\succnsim", !0), h(d, E, x, "⪺", "\\succnapprox", !0), h(d, E, x, "≆", "\\ncong", !0), h(d, E, x, "", "\\@nshortparallel"), h(d, E, x, "∦", "\\nparallel", !0), h(d, E, x, "⊯", "\\nVDash", !0), h(d, E, x, "⋫", "\\ntriangleright"), h(d, E, x, "⋭", "\\ntrianglerighteq", !0), h(d, E, x, "", "\\@nsupseteqq"), h(d, E, x, "⊋", "\\supsetneq", !0), h(d, E, x, "", "\\@varsupsetneq"), h(d, E, x, "⫌", "\\supsetneqq", !0), h(d, E, x, "", "\\@varsupsetneqq"), h(d, E, x, "⊮", "\\nVdash", !0), h(d, E, x, "⪵", "\\precneqq", !0), h(d, E, x, "⪶", "\\succneqq", !0), h(d, E, x, "", "\\@nsubseteqq"), h(d, E, te, "⊴", "\\unlhd"), h(d, E, te, "⊵", "\\unrhd"), h(d, E, x, "↚", "\\nleftarrow", !0), h(d, E, x, "↛", "\\nrightarrow", !0), h(d, E, x, "⇍", "\\nLeftarrow", !0), h(d, E, x, "⇏", "\\nRightarrow", !0), h(d, E, x, "↮", "\\nleftrightarrow", !0), h(d, E, x, "⇎", "\\nLeftrightarrow", !0), h(d, E, x, "△", "\\vartriangle"), h(d, E, F, "ℏ", "\\hslash"), h(d, E, F, "▽", "\\triangledown"), h(d, E, F, "◊", "\\lozenge"), h(d, E, F, "Ⓢ", "\\circledS"), h(d, E, F, "®", "\\circledR"), h(X, E, F, "®", "\\circledR"), h(d, E, F, "∡", "\\measuredangle", !0), h(d, E, F, "∄", "\\nexists"), h(d, E, F, "℧", "\\mho"), h(d, E, F, "Ⅎ", "\\Finv", !0), h(d, E, F, "⅁", "\\Game", !0), h(d, E, F, "‵", "\\backprime"), h(d, E, F, "▲", "\\blacktriangle"), h(d, E, F, "▼", "\\blacktriangledown"), h(d, E, F, "■", "\\blacksquare"), h(d, E, F, "⧫", "\\blacklozenge"), h(d, E, F, "★", "\\bigstar"), h(d, E, F, "∢", "\\sphericalangle", !0), h(d, E, F, "∁", "\\complement", !0), h(d, E, F, "ð", "\\eth", !0), h(X, w, F, "ð", "ð"), h(d, E, F, "╱", "\\diagup"), h(d, E, F, "╲", "\\diagdown"), h(d, E, F, "□", "\\square"), h(d, E, F, "□", "\\Box"), h(d, E, F, "◊", "\\Diamond"), h(d, E, F, "¥", "\\yen", !0), h(X, E, F, "¥", "\\yen", !0), h(d, E, F, "✓", "\\checkmark", !0), h(X, E, F, "✓", "\\checkmark"), h(d, E, F, "ℶ", "\\beth", !0), h(d, E, F, "ℸ", "\\daleth", !0), h(d, E, F, "ℷ", "\\gimel", !0), h(d, E, F, "ϝ", "\\digamma", !0), h(d, E, F, "ϰ", "\\varkappa"), h(d, E, re, "┌", "\\@ulcorner", !0), h(d, E, lt, "┐", "\\@urcorner", !0), h(d, E, re, "└", "\\@llcorner", !0), h(d, E, lt, "┘", "\\@lrcorner", !0), h(d, E, x, "≦", "\\leqq", !0), h(d, E, x, "⩽", "\\leqslant", !0), h(d, E, x, "⪕", "\\eqslantless", !0), h(d, E, x, "≲", "\\lesssim", !0), h(d, E, x, "⪅", "\\lessapprox", !0), h(d, E, x, "≊", "\\approxeq", !0), h(d, E, te, "⋖", "\\lessdot"), h(d, E, x, "⋘", "\\lll", !0), h(d, E, x, "≶", "\\lessgtr", !0), h(d, E, x, "⋚", "\\lesseqgtr", !0), h(d, E, x, "⪋", "\\lesseqqgtr", !0), h(d, E, x, "≑", "\\doteqdot"), h(d, E, x, "≓", "\\risingdotseq", !0), h(d, E, x, "≒", "\\fallingdotseq", !0), h(d, E, x, "∽", "\\backsim", !0), h(d, E, x, "⋍", "\\backsimeq", !0), h(d, E, x, "⫅", "\\subseteqq", !0), h(d, E, x, "⋐", "\\Subset", !0), h(d, E, x, "⊏", "\\sqsubset", !0), h(d, E, x, "≼", "\\preccurlyeq", !0), h(d, E, x, "⋞", "\\curlyeqprec", !0), h(d, E, x, "≾", "\\precsim", !0), h(d, E, x, "⪷", "\\precapprox", !0), h(d, E, x, "⊲", "\\vartriangleleft"), h(d, E, x, "⊴", "\\trianglelefteq"), h(d, E, x, "⊨", "\\vDash", !0), h(d, E, x, "⊪", "\\Vvdash", !0), h(d, E, x, "⌣", "\\smallsmile"), h(d, E, x, "⌢", "\\smallfrown"), h(d, E, x, "≏", "\\bumpeq", !0), h(d, E, x, "≎", "\\Bumpeq", !0), h(d, E, x, "≧", "\\geqq", !0), h(d, E, x, "⩾", "\\geqslant", !0), h(d, E, x, "⪖", "\\eqslantgtr", !0), h(d, E, x, "≳", "\\gtrsim", !0), h(d, E, x, "⪆", "\\gtrapprox", !0), h(d, E, te, "⋗", "\\gtrdot"), h(d, E, x, "⋙", "\\ggg", !0), h(d, E, x, "≷", "\\gtrless", !0), h(d, E, x, "⋛", "\\gtreqless", !0), h(d, E, x, "⪌", "\\gtreqqless", !0), h(d, E, x, "≖", "\\eqcirc", !0), h(d, E, x, "≗", "\\circeq", !0), h(d, E, x, "≜", "\\triangleq", !0), h(d, E, x, "∼", "\\thicksim"), h(d, E, x, "≈", "\\thickapprox"), h(d, E, x, "⫆", "\\supseteqq", !0), h(d, E, x, "⋑", "\\Supset", !0), h(d, E, x, "⊐", "\\sqsupset", !0), h(d, E, x, "≽", "\\succcurlyeq", !0), h(d, E, x, "⋟", "\\curlyeqsucc", !0), h(d, E, x, "≿", "\\succsim", !0), h(d, E, x, "⪸", "\\succapprox", !0), h(d, E, x, "⊳", "\\vartriangleright"), h(d, E, x, "⊵", "\\trianglerighteq"), h(d, E, x, "⊩", "\\Vdash", !0), h(d, E, x, "∣", "\\shortmid"), h(d, E, x, "∥", "\\shortparallel"), h(d, E, x, "≬", "\\between", !0), h(d, E, x, "⋔", "\\pitchfork", !0), h(d, E, x, "∝", "\\varpropto"), h(d, E, x, "◀", "\\blacktriangleleft"), h(d, E, x, "∴", "\\therefore", !0), h(d, E, x, "∍", "\\backepsilon"), h(d, E, x, "▶", "\\blacktriangleright"), h(d, E, x, "∵", "\\because", !0), h(d, E, x, "⋘", "\\llless"), h(d, E, x, "⋙", "\\gggtr"), h(d, E, te, "⊲", "\\lhd"), h(d, E, te, "⊳", "\\rhd"), h(d, E, x, "≂", "\\eqsim", !0), h(d, w, x, "⋈", "\\Join"), h(d, E, x, "≑", "\\Doteq", !0), h(d, E, te, "∔", "\\dotplus", !0), h(d, E, te, "∖", "\\smallsetminus"), h(d, E, te, "⋒", "\\Cap", !0), h(d, E, te, "⋓", "\\Cup", !0), h(d, E, te, "⩞", "\\doublebarwedge", !0), h(d, E, te, "⊟", "\\boxminus", !0), h(d, E, te, "⊞", "\\boxplus", !0), h(d, E, te, "⋇", "\\divideontimes", !0), h(d, E, te, "⋉", "\\ltimes", !0), h(d, E, te, "⋊", "\\rtimes", !0), h(d, E, te, "⋋", "\\leftthreetimes", !0), h(d, E, te, "⋌", "\\rightthreetimes", !0), h(d, E, te, "⋏", "\\curlywedge", !0), h(d, E, te, "⋎", "\\curlyvee", !0), h(d, E, te, "⊝", "\\circleddash", !0), h(d, E, te, "⊛", "\\circledast", !0), h(d, E, te, "⋅", "\\centerdot"), h(d, E, te, "⊺", "\\intercal", !0), h(d, E, te, "⋒", "\\doublecap"), h(d, E, te, "⋓", "\\doublecup"), h(d, E, te, "⊠", "\\boxtimes", !0), h(d, E, x, "⇢", "\\dashrightarrow", !0), h(d, E, x, "⇠", "\\dashleftarrow", !0), h(d, E, x, "⇇", "\\leftleftarrows", !0), h(d, E, x, "⇆", "\\leftrightarrows", !0), h(d, E, x, "⇚", "\\Lleftarrow", !0), h(d, E, x, "↞", "\\twoheadleftarrow", !0), h(d, E, x, "↢", "\\leftarrowtail", !0), h(d, E, x, "↫", "\\looparrowleft", !0), h(d, E, x, "⇋", "\\leftrightharpoons", !0), h(d, E, x, "↶", "\\curvearrowleft", !0), h(d, E, x, "↺", "\\circlearrowleft", !0), h(d, E, x, "↰", "\\Lsh", !0), h(d, E, x, "⇈", "\\upuparrows", !0), h(d, E, x, "↿", "\\upharpoonleft", !0), h(d, E, x, "⇃", "\\downharpoonleft", !0), h(d, w, x, "⊶", "\\origof", !0), h(d, w, x, "⊷", "\\imageof", !0), h(d, E, x, "⊸", "\\multimap", !0), h(d, E, x, "↭", "\\leftrightsquigarrow", !0), h(d, E, x, "⇉", "\\rightrightarrows", !0), h(d, E, x, "⇄", "\\rightleftarrows", !0), h(d, E, x, "↠", "\\twoheadrightarrow", !0), h(d, E, x, "↣", "\\rightarrowtail", !0), h(d, E, x, "↬", "\\looparrowright", !0), h(d, E, x, "↷", "\\curvearrowright", !0), h(d, E, x, "↻", "\\circlearrowright", !0), h(d, E, x, "↱", "\\Rsh", !0), h(d, E, x, "⇊", "\\downdownarrows", !0), h(d, E, x, "↾", "\\upharpoonright", !0), h(d, E, x, "⇂", "\\downharpoonright", !0), h(d, E, x, "⇝", "\\rightsquigarrow", !0), h(d, E, x, "⇝", "\\leadsto"), h(d, E, x, "⇛", "\\Rrightarrow", !0), h(d, E, x, "↾", "\\restriction"), h(d, w, F, "‘", "`"), h(d, w, F, "$", "\\$"), h(X, w, F, "$", "\\$"), h(X, w, F, "$", "\\textdollar"), h(d, w, F, "%", "\\%"), h(X, w, F, "%", "\\%"), h(d, w, F, "_", "\\_"), h(X, w, F, "_", "\\_"), h(X, w, F, "_", "\\textunderscore"), h(d, w, F, "∠", "\\angle", !0), h(d, w, F, "∞", "\\infty", !0), h(d, w, F, "′", "\\prime"), h(d, w, F, "△", "\\triangle"), h(d, w, F, "Γ", "\\Gamma", !0), h(d, w, F, "Δ", "\\Delta", !0), h(d, w, F, "Θ", "\\Theta", !0), h(d, w, F, "Λ", "\\Lambda", !0), h(d, w, F, "Ξ", "\\Xi", !0), h(d, w, F, "Π", "\\Pi", !0), h(d, w, F, "Σ", "\\Sigma", !0), h(d, w, F, "Υ", "\\Upsilon", !0), h(d, w, F, "Φ", "\\Phi", !0), h(d, w, F, "Ψ", "\\Psi", !0), h(d, w, F, "Ω", "\\Omega", !0), h(d, w, F, "A", "Α"), h(d, w, F, "B", "Β"), h(d, w, F, "E", "Ε"), h(d, w, F, "Z", "Ζ"), h(d, w, F, "H", "Η"), h(d, w, F, "I", "Ι"), h(d, w, F, "K", "Κ"), h(d, w, F, "M", "Μ"), h(d, w, F, "N", "Ν"), h(d, w, F, "O", "Ο"), h(d, w, F, "P", "Ρ"), h(d, w, F, "T", "Τ"), h(d, w, F, "X", "Χ"), h(d, w, F, "¬", "\\neg", !0), h(d, w, F, "¬", "\\lnot"), h(d, w, F, "⊤", "\\top"), h(d, w, F, "⊥", "\\bot"), h(d, w, F, "∅", "\\emptyset"), h(d, E, F, "∅", "\\varnothing"), h(d, w, oe, "α", "\\alpha", !0), h(d, w, oe, "β", "\\beta", !0), h(d, w, oe, "γ", "\\gamma", !0), h(d, w, oe, "δ", "\\delta", !0), h(d, w, oe, "ϵ", "\\epsilon", !0), h(d, w, oe, "ζ", "\\zeta", !0), h(d, w, oe, "η", "\\eta", !0), h(d, w, oe, "θ", "\\theta", !0), h(d, w, oe, "ι", "\\iota", !0), h(d, w, oe, "κ", "\\kappa", !0), h(d, w, oe, "λ", "\\lambda", !0), h(d, w, oe, "μ", "\\mu", !0), h(d, w, oe, "ν", "\\nu", !0), h(d, w, oe, "ξ", "\\xi", !0), h(d, w, oe, "ο", "\\omicron", !0), h(d, w, oe, "π", "\\pi", !0), h(d, w, oe, "ρ", "\\rho", !0), h(d, w, oe, "σ", "\\sigma", !0), h(d, w, oe, "τ", "\\tau", !0), h(d, w, oe, "υ", "\\upsilon", !0), h(d, w, oe, "ϕ", "\\phi", !0), h(d, w, oe, "χ", "\\chi", !0), h(d, w, oe, "ψ", "\\psi", !0), h(d, w, oe, "ω", "\\omega", !0), h(d, w, oe, "ε", "\\varepsilon", !0), h(d, w, oe, "ϑ", "\\vartheta", !0), h(d, w, oe, "ϖ", "\\varpi", !0), h(d, w, oe, "ϱ", "\\varrho", !0), h(d, w, oe, "ς", "\\varsigma", !0), h(d, w, oe, "φ", "\\varphi", !0), h(d, w, te, "∗", "*", !0), h(d, w, te, "+", "+"), h(d, w, te, "−", "-", !0), h(d, w, te, "⋅", "\\cdot", !0), h(d, w, te, "∘", "\\circ", !0), h(d, w, te, "÷", "\\div", !0), h(d, w, te, "±", "\\pm", !0), h(d, w, te, "×", "\\times", !0), h(d, w, te, "∩", "\\cap", !0), h(d, w, te, "∪", "\\cup", !0), h(d, w, te, "∖", "\\setminus", !0), h(d, w, te, "∧", "\\land"), h(d, w, te, "∨", "\\lor"), h(d, w, te, "∧", "\\wedge", !0), h(d, w, te, "∨", "\\vee", !0), h(d, w, F, "√", "\\surd"), h(d, w, re, "⟨", "\\langle", !0), h(d, w, re, "∣", "\\lvert"), h(d, w, re, "∥", "\\lVert"), h(d, w, lt, "?", "?"), h(d, w, lt, "!", "!"), h(d, w, lt, "⟩", "\\rangle", !0), h(d, w, lt, "∣", "\\rvert"), h(d, w, lt, "∥", "\\rVert"), h(d, w, x, "=", "="), h(d, w, x, ":", ":"), h(d, w, x, "≈", "\\approx", !0), h(d, w, x, "≅", "\\cong", !0), h(d, w, x, "≥", "\\ge"), h(d, w, x, "≥", "\\geq", !0), h(d, w, x, "←", "\\gets"), h(d, w, x, ">", "\\gt", !0), h(d, w, x, "∈", "\\in", !0), h(d, w, x, "", "\\@not"), h(d, w, x, "⊂", "\\subset", !0), h(d, w, x, "⊃", "\\supset", !0), h(d, w, x, "⊆", "\\subseteq", !0), h(d, w, x, "⊇", "\\supseteq", !0), h(d, E, x, "⊈", "\\nsubseteq", !0), h(d, E, x, "⊉", "\\nsupseteq", !0), h(d, w, x, "⊨", "\\models"), h(d, w, x, "←", "\\leftarrow", !0), h(d, w, x, "≤", "\\le"), h(d, w, x, "≤", "\\leq", !0), h(d, w, x, "<", "\\lt", !0), h(d, w, x, "→", "\\rightarrow", !0), h(d, w, x, "→", "\\to"), h(d, E, x, "≱", "\\ngeq", !0), h(d, E, x, "≰", "\\nleq", !0), h(d, w, ne, " ", "\\ "), h(d, w, ne, " ", "\\space"), h(d, w, ne, " ", "\\nobreakspace"), h(X, w, ne, " ", "\\ "), h(X, w, ne, " ", " "), h(X, w, ne, " ", "\\space"), h(X, w, ne, " ", "\\nobreakspace"), h(d, w, ne, null, "\\nobreak"), h(d, w, ne, null, "\\allowbreak"), h(d, w, z, ",", ","), h(d, w, z, ";", ";"), h(d, E, te, "⊼", "\\barwedge", !0), h(d, E, te, "⊻", "\\veebar", !0), h(d, w, te, "⊙", "\\odot", !0), h(d, w, te, "⊕", "\\oplus", !0), h(d, w, te, "⊗", "\\otimes", !0), h(d, w, F, "∂", "\\partial", !0), h(d, w, te, "⊘", "\\oslash", !0), h(d, E, te, "⊚", "\\circledcirc", !0), h(d, E, te, "⊡", "\\boxdot", !0), h(d, w, te, "△", "\\bigtriangleup"), h(d, w, te, "▽", "\\bigtriangledown"), h(d, w, te, "†", "\\dagger"), h(d, w, te, "⋄", "\\diamond"), h(d, w, te, "⋆", "\\star"), h(d, w, te, "◃", "\\triangleleft"), h(d, w, te, "▹", "\\triangleright"), h(d, w, re, "{", "\\{"), h(X, w, F, "{", "\\{"), h(X, w, F, "{", "\\textbraceleft"), h(d, w, lt, "}", "\\}"), h(X, w, F, "}", "\\}"), h(X, w, F, "}", "\\textbraceright"), h(d, w, re, "{", "\\lbrace"), h(d, w, lt, "}", "\\rbrace"), h(d, w, re, "[", "\\lbrack", !0), h(X, w, F, "[", "\\lbrack", !0), h(d, w, lt, "]", "\\rbrack", !0), h(X, w, F, "]", "\\rbrack", !0), h(d, w, re, "(", "\\lparen", !0), h(d, w, lt, ")", "\\rparen", !0), h(X, w, F, "<", "\\textless", !0), h(X, w, F, ">", "\\textgreater", !0), h(d, w, re, "⌊", "\\lfloor", !0), h(d, w, lt, "⌋", "\\rfloor", !0), h(d, w, re, "⌈", "\\lceil", !0), h(d, w, lt, "⌉", "\\rceil", !0), h(d, w, F, "\\", "\\backslash"), h(d, w, F, "∣", "|"), h(d, w, F, "∣", "\\vert"), h(X, w, F, "|", "\\textbar", !0), h(d, w, F, "∥", "\\|"), h(d, w, F, "∥", "\\Vert"), h(X, w, F, "∥", "\\textbardbl"), h(X, w, F, "~", "\\textasciitilde"), h(X, w, F, "\\", "\\textbackslash"), h(X, w, F, "^", "\\textasciicircum"), h(d, w, x, "↑", "\\uparrow", !0), h(d, w, x, "⇑", "\\Uparrow", !0), h(d, w, x, "↓", "\\downarrow", !0), h(d, w, x, "⇓", "\\Downarrow", !0), h(d, w, x, "↕", "\\updownarrow", !0), h(d, w, x, "⇕", "\\Updownarrow", !0), h(d, w, Xe, "∐", "\\coprod"), h(d, w, Xe, "⋁", "\\bigvee"), h(d, w, Xe, "⋀", "\\bigwedge"), h(d, w, Xe, "⨄", "\\biguplus"), h(d, w, Xe, "⋂", "\\bigcap"), h(d, w, Xe, "⋃", "\\bigcup"), h(d, w, Xe, "∫", "\\int"), h(d, w, Xe, "∫", "\\intop"), h(d, w, Xe, "∬", "\\iint"), h(d, w, Xe, "∭", "\\iiint"), h(d, w, Xe, "∏", "\\prod"), h(d, w, Xe, "∑", "\\sum"), h(d, w, Xe, "⨂", "\\bigotimes"), h(d, w, Xe, "⨁", "\\bigoplus"), h(d, w, Xe, "⨀", "\\bigodot"), h(d, w, Xe, "∮", "\\oint"), h(d, w, Xe, "∯", "\\oiint"), h(d, w, Xe, "∰", "\\oiiint"), h(d, w, Xe, "⨆", "\\bigsqcup"), h(d, w, Xe, "∫", "\\smallint"), h(X, w, y0, "…", "\\textellipsis"), h(d, w, y0, "…", "\\mathellipsis"), h(X, w, y0, "…", "\\ldots", !0), h(d, w, y0, "…", "\\ldots", !0), h(d, w, y0, "⋯", "\\@cdots", !0), h(d, w, y0, "⋱", "\\ddots", !0), h(d, w, F, "⋮", "\\varvdots"), h(d, w, De, "ˊ", "\\acute"), h(d, w, De, "ˋ", "\\grave"), h(d, w, De, "¨", "\\ddot"), h(d, w, De, "~", "\\tilde"), h(d, w, De, "ˉ", "\\bar"), h(d, w, De, "˘", "\\breve"), h(d, w, De, "ˇ", "\\check"), h(d, w, De, "^", "\\hat"), h(d, w, De, "⃗", "\\vec"), h(d, w, De, "˙", "\\dot"), h(d, w, De, "˚", "\\mathring"), h(d, w, oe, "", "\\@imath"), h(d, w, oe, "", "\\@jmath"), h(d, w, F, "ı", "ı"), h(d, w, F, "ȷ", "ȷ"), h(X, w, F, "ı", "\\i", !0), h(X, w, F, "ȷ", "\\j", !0), h(X, w, F, "ß", "\\ss", !0), h(X, w, F, "æ", "\\ae", !0), h(X, w, F, "œ", "\\oe", !0), h(X, w, F, "ø", "\\o", !0), h(X, w, F, "Æ", "\\AE", !0), h(X, w, F, "Œ", "\\OE", !0), h(X, w, F, "Ø", "\\O", !0), h(X, w, De, "ˊ", "\\'"), h(X, w, De, "ˋ", "\\`"), h(X, w, De, "ˆ", "\\^"), h(X, w, De, "˜", "\\~"), h(X, w, De, "ˉ", "\\="), h(X, w, De, "˘", "\\u"), h(X, w, De, "˙", "\\."), h(X, w, De, "¸", "\\c"), h(X, w, De, "˚", "\\r"), h(X, w, De, "ˇ", "\\v"), h(X, w, De, "¨", '\\"'), h(X, w, De, "˝", "\\H"), h(X, w, De, "◯", "\\textcircled");
          const Je = {
            "--": !0,
            "---": !0,
            "``": !0,
            "''": !0
          };
          h(X, w, F, "–", "--", !0), h(X, w, F, "–", "\\textendash"), h(X, w, F, "—", "---", !0), h(X, w, F, "—", "\\textemdash"), h(X, w, F, "‘", "`", !0), h(X, w, F, "‘", "\\textquoteleft"), h(X, w, F, "’", "'", !0), h(X, w, F, "’", "\\textquoteright"), h(X, w, F, "“", "``", !0), h(X, w, F, "“", "\\textquotedblleft"), h(X, w, F, "”", "''", !0), h(X, w, F, "”", "\\textquotedblright"), h(d, w, F, "°", "\\degree", !0), h(X, w, F, "°", "\\degree"), h(X, w, F, "°", "\\textdegree", !0), h(d, w, F, "£", "\\pounds"), h(d, w, F, "£", "\\mathsterling", !0), h(X, w, F, "£", "\\pounds"), h(X, w, F, "£", "\\textsterling", !0), h(d, E, F, "✠", "\\maltese"), h(X, E, F, "✠", "\\maltese");
          const Qe = '0123456789/@."';
          for (let t = 0; t < Qe.length; t++) {
            const e = Qe.charAt(t);
            h(d, w, F, e, e);
          }
          const ot = '0123456789!@*()-=+";:?/.,';
          for (let t = 0; t < ot.length; t++) {
            const e = ot.charAt(t);
            h(X, w, F, e, e);
          }
          const $e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
          for (let t = 0; t < $e.length; t++) {
            const e = $e.charAt(t);
            h(d, w, oe, e, e), h(X, w, F, e, e);
          }
          h(d, E, F, "C", "ℂ"), h(X, E, F, "C", "ℂ"), h(d, E, F, "H", "ℍ"), h(X, E, F, "H", "ℍ"), h(d, E, F, "N", "ℕ"), h(X, E, F, "N", "ℕ"), h(d, E, F, "P", "ℙ"), h(X, E, F, "P", "ℙ"), h(d, E, F, "Q", "ℚ"), h(X, E, F, "Q", "ℚ"), h(d, E, F, "R", "ℝ"), h(X, E, F, "R", "ℝ"), h(d, E, F, "Z", "ℤ"), h(X, E, F, "Z", "ℤ"), h(d, w, oe, "h", "ℎ"), h(X, w, oe, "h", "ℎ");
          let ue = "";
          for (let t = 0; t < $e.length; t++) {
            const e = $e.charAt(t);
            ue = String.fromCharCode(55349, 56320 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56372 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56424 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56580 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56684 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56736 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56788 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56840 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56944 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), t < 26 && (ue = String.fromCharCode(55349, 56632 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 56476 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue));
          }
          ue = "𝕜", h(d, w, oe, "k", ue), h(X, w, F, "k", ue);
          for (let t = 0; t < 10; t++) {
            const e = t.toString();
            ue = String.fromCharCode(55349, 57294 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 57314 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 57324 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue), ue = String.fromCharCode(55349, 57334 + t), h(d, w, oe, e, ue), h(X, w, F, e, ue);
          }
          const et = "ÐÞþ";
          for (let t = 0; t < et.length; t++) {
            const e = et.charAt(t);
            h(d, w, oe, e, e), h(X, w, F, e, e);
          }
          const P0 = [
            ["mathbf", "textbf", "Main-Bold"],
            // A-Z bold upright
            ["mathbf", "textbf", "Main-Bold"],
            // a-z bold upright
            ["mathnormal", "textit", "Math-Italic"],
            // A-Z italic
            ["mathnormal", "textit", "Math-Italic"],
            // a-z italic
            ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
            // A-Z bold italic
            ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
            // a-z bold italic
            // Map fancy A-Z letters to script, not calligraphic.
            // This aligns with unicode-math and math fonts (except Cambria Math).
            ["mathscr", "textscr", "Script-Regular"],
            // A-Z script
            ["", "", ""],
            // a-z script.  No font
            ["", "", ""],
            // A-Z bold script. No font
            ["", "", ""],
            // a-z bold script. No font
            ["mathfrak", "textfrak", "Fraktur-Regular"],
            // A-Z Fraktur
            ["mathfrak", "textfrak", "Fraktur-Regular"],
            // a-z Fraktur
            ["mathbb", "textbb", "AMS-Regular"],
            // A-Z double-struck
            ["mathbb", "textbb", "AMS-Regular"],
            // k double-struck
            // Note that we are using a bold font, but font metrics for regular Fraktur.
            ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
            // A-Z bold Fraktur
            ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
            // a-z bold Fraktur
            ["mathsf", "textsf", "SansSerif-Regular"],
            // A-Z sans-serif
            ["mathsf", "textsf", "SansSerif-Regular"],
            // a-z sans-serif
            ["mathboldsf", "textboldsf", "SansSerif-Bold"],
            // A-Z bold sans-serif
            ["mathboldsf", "textboldsf", "SansSerif-Bold"],
            // a-z bold sans-serif
            ["mathitsf", "textitsf", "SansSerif-Italic"],
            // A-Z italic sans-serif
            ["mathitsf", "textitsf", "SansSerif-Italic"],
            // a-z italic sans-serif
            ["", "", ""],
            // A-Z bold italic sans. No font
            ["", "", ""],
            // a-z bold italic sans. No font
            ["mathtt", "texttt", "Typewriter-Regular"],
            // A-Z monospace
            ["mathtt", "texttt", "Typewriter-Regular"]
            // a-z monospace
          ], dn = [
            ["mathbf", "textbf", "Main-Bold"],
            // 0-9 bold
            ["", "", ""],
            // 0-9 double-struck. No KaTeX font.
            ["mathsf", "textsf", "SansSerif-Regular"],
            // 0-9 sans-serif
            ["mathboldsf", "textboldsf", "SansSerif-Bold"],
            // 0-9 bold sans-serif
            ["mathtt", "texttt", "Typewriter-Regular"]
            // 0-9 monospace
          ], jo = function(t, e) {
            const r = t.charCodeAt(0), l = t.charCodeAt(1), c = (r - 55296) * 1024 + (l - 56320) + 65536, m = e === "math" ? 0 : 1;
            if (119808 <= c && c < 120484) {
              const b = Math.floor((c - 119808) / 26);
              return [P0[b][2], P0[b][m]];
            } else if (120782 <= c && c <= 120831) {
              const b = Math.floor((c - 120782) / 10);
              return [dn[b][2], dn[b][m]];
            } else {
              if (c === 120485 || c === 120486)
                return [P0[0][2], P0[0][m]];
              if (120486 < c && c < 120782)
                return ["", ""];
              throw new u("Unsupported character: " + t);
            }
          }, Un = function(t, e, r) {
            return ye[r][t] && ye[r][t].replace && (t = ye[r][t].replace), {
              value: t,
              metrics: _0(t, e, r)
            };
          }, Zt = function(t, e, r, l, c) {
            const m = Un(t, e, r), b = m.metrics;
            t = m.value;
            let y;
            if (b) {
              let v = b.italic;
              (r === "text" || l && l.font === "mathit") && (v = 0), y = new wt(t, b.height, b.depth, v, b.skew, b.width, c);
            } else
              typeof console < "u" && console.warn("No character metrics " + ("for '" + t + "' in style '" + e + "' and mode '" + r + "'")), y = new wt(t, 0, 0, 0, 0, 0, c);
            if (l) {
              y.maxFontSize = l.sizeMultiplier, l.style.isTight() && y.classes.push("mtight");
              const v = l.getColor();
              v && (y.style.color = v);
            }
            return y;
          }, Xo = function(t, e, r, l) {
            return l === void 0 && (l = []), r.font === "boldsymbol" && Un(t, "Main-Bold", e).metrics ? Zt(t, "Main-Bold", e, r, l.concat(["mathbf"])) : t === "\\" || ye[e][t].font === "main" ? Zt(t, "Main-Regular", e, r, l) : Zt(t, "AMS-Regular", e, r, l.concat(["amsrm"]));
          }, Yo = function(t, e, r, l, c) {
            return c !== "textord" && Un(t, "Math-BoldItalic", e).metrics ? {
              fontName: "Math-BoldItalic",
              fontClass: "boldsymbol"
            } : {
              fontName: "Main-Bold",
              fontClass: "mathbf"
            };
          }, Zo = function(t, e, r) {
            const l = t.mode, c = t.text, m = ["mord"], b = l === "math" || l === "text" && e.font, y = b ? e.font : e.fontFamily;
            let v = "", C = "";
            if (c.charCodeAt(0) === 55349 && ([v, C] = jo(c, l)), v.length > 0)
              return Zt(c, v, l, e, m.concat(C));
            if (y) {
              let N, R;
              if (y === "boldsymbol") {
                const q = Yo(c, l, e, m, r);
                N = q.fontName, R = [q.fontClass];
              } else
                b ? (N = ai[y].fontName, R = [y]) : (N = Gn(y, e.fontWeight, e.fontShape), R = [y, e.fontWeight, e.fontShape]);
              if (Un(c, N, l).metrics)
                return Zt(c, N, l, e, m.concat(R));
              if (Je.hasOwnProperty(c) && N.slice(0, 10) === "Typewriter") {
                const q = [];
                for (let Y = 0; Y < c.length; Y++)
                  q.push(Zt(c[Y], N, l, e, m.concat(R)));
                return li(q);
              }
            }
            if (r === "mathord")
              return Zt(c, "Math-Italic", l, e, m.concat(["mathnormal"]));
            if (r === "textord") {
              const N = ye[l][c] && ye[l][c].font;
              if (N === "ams") {
                const R = Gn("amsrm", e.fontWeight, e.fontShape);
                return Zt(c, R, l, e, m.concat("amsrm", e.fontWeight, e.fontShape));
              } else if (N === "main" || !N) {
                const R = Gn("textrm", e.fontWeight, e.fontShape);
                return Zt(c, R, l, e, m.concat(e.fontWeight, e.fontShape));
              } else {
                const R = Gn(N, e.fontWeight, e.fontShape);
                return Zt(c, R, l, e, m.concat(R, e.fontWeight, e.fontShape));
              }
            } else
              throw new Error("unexpected type: " + r + " in makeOrd");
          }, Ko = (t, e) => {
            if (Rt(t.classes) !== Rt(e.classes) || t.skew !== e.skew || t.maxFontSize !== e.maxFontSize)
              return !1;
            if (t.classes.length === 1) {
              const r = t.classes[0];
              if (r === "mbin" || r === "mord")
                return !1;
            }
            for (const r in t.style)
              if (t.style.hasOwnProperty(r) && t.style[r] !== e.style[r])
                return !1;
            for (const r in e.style)
              if (e.style.hasOwnProperty(r) && t.style[r] !== e.style[r])
                return !1;
            return !0;
          }, Qo = (t) => {
            for (let e = 0; e < t.length - 1; e++) {
              const r = t[e], l = t[e + 1];
              r instanceof wt && l instanceof wt && Ko(r, l) && (r.text += l.text, r.height = Math.max(r.height, l.height), r.depth = Math.max(r.depth, l.depth), r.italic = l.italic, t.splice(e + 1, 1), e--);
            }
            return t;
          }, Ir = function(t) {
            let e = 0, r = 0, l = 0;
            for (let c = 0; c < t.children.length; c++) {
              const m = t.children[c];
              m.height > e && (e = m.height), m.depth > r && (r = m.depth), m.maxFontSize > l && (l = m.maxFontSize);
            }
            t.height = e, t.depth = r, t.maxFontSize = l;
          }, _t = function(t, e, r, l) {
            const c = new q0(t, e, r, l);
            return Ir(c), c;
          }, ii = (t, e, r, l) => new q0(t, e, r, l), Jo = function(t, e, r) {
            const l = _t([t], [], e);
            return l.height = Math.max(r || e.fontMetrics().defaultRuleThickness, e.minRuleThickness), l.style.borderBottomWidth = Q(l.height), l.maxFontSize = 1, l;
          }, $o = function(t, e, r, l) {
            const c = new je(t, e, r, l);
            return Ir(c), c;
          }, li = function(t) {
            const e = new r0(t);
            return Ir(e), e;
          }, eu = function(t, e) {
            return t instanceof r0 ? _t([], [t], e) : t;
          }, tu = function(t) {
            if (t.positionType === "individualShift") {
              const r = t.children, l = [r[0]], c = -r[0].shift - r[0].elem.depth;
              let m = c;
              for (let b = 1; b < r.length; b++) {
                const y = -r[b].shift - m - r[b].elem.depth, v = y - (r[b - 1].elem.height + r[b - 1].elem.depth);
                m = m + y, l.push({
                  type: "kern",
                  size: v
                }), l.push(r[b]);
              }
              return {
                children: l,
                depth: c
              };
            }
            let e;
            if (t.positionType === "top") {
              let r = t.positionData;
              for (let l = 0; l < t.children.length; l++) {
                const c = t.children[l];
                r -= c.type === "kern" ? c.size : c.elem.height + c.elem.depth;
              }
              e = r;
            } else if (t.positionType === "bottom")
              e = -t.positionData;
            else {
              const r = t.children[0];
              if (r.type !== "elem")
                throw new Error('First child must have type "elem".');
              if (t.positionType === "shift")
                e = -r.elem.depth - t.positionData;
              else if (t.positionType === "firstBaseline")
                e = -r.elem.depth;
              else
                throw new Error("Invalid positionType " + t.positionType + ".");
            }
            return {
              children: t.children,
              depth: e
            };
          }, nu = function(t, e) {
            const {
              children: r,
              depth: l
            } = tu(t);
            let c = 0;
            for (let Y = 0; Y < r.length; Y++) {
              const se = r[Y];
              if (se.type === "elem") {
                const ae = se.elem;
                c = Math.max(c, ae.maxFontSize, ae.height);
              }
            }
            c += 2;
            const m = _t(["pstrut"], []);
            m.style.height = Q(c);
            const b = [];
            let y = l, v = l, C = l;
            for (let Y = 0; Y < r.length; Y++) {
              const se = r[Y];
              if (se.type === "kern")
                C += se.size;
              else {
                const ae = se.elem, ke = se.wrapperClasses || [], ge = se.wrapperStyle || {}, xe = _t(ke, [m, ae], void 0, ge);
                xe.style.top = Q(-c - C - ae.depth), se.marginLeft && (xe.style.marginLeft = se.marginLeft), se.marginRight && (xe.style.marginRight = se.marginRight), b.push(xe), C += ae.height + ae.depth;
              }
              y = Math.min(y, C), v = Math.max(v, C);
            }
            const N = _t(["vlist"], b);
            N.style.height = Q(v);
            let R;
            if (y < 0) {
              const Y = _t([], []), se = _t(["vlist"], [Y]);
              se.style.height = Q(-y);
              const ae = _t(["vlist-s"], [new wt("​")]);
              R = [_t(["vlist-r"], [N, ae]), _t(["vlist-r"], [se])];
            } else
              R = [_t(["vlist-r"], [N])];
            const q = _t(["vlist-t"], R);
            return R.length === 2 && q.classes.push("vlist-t2"), q.height = v, q.depth = -y, q;
          }, ru = (t, e) => {
            const r = _t(["mspace"], [], e), l = Me(t, e);
            return r.style.marginRight = Q(l), r;
          }, Gn = function(t, e, r) {
            let l = "";
            switch (t) {
              case "amsrm":
                l = "AMS";
                break;
              case "textrm":
                l = "Main";
                break;
              case "textsf":
                l = "SansSerif";
                break;
              case "texttt":
                l = "Typewriter";
                break;
              default:
                l = t;
            }
            let c;
            return e === "textbf" && r === "textit" ? c = "BoldItalic" : e === "textbf" ? c = "Bold" : e === "textit" ? c = "Italic" : c = "Regular", l + "-" + c;
          }, ai = {
            // styles
            mathbf: {
              variant: "bold",
              fontName: "Main-Bold"
            },
            mathrm: {
              variant: "normal",
              fontName: "Main-Regular"
            },
            textit: {
              variant: "italic",
              fontName: "Main-Italic"
            },
            mathit: {
              variant: "italic",
              fontName: "Main-Italic"
            },
            mathnormal: {
              variant: "italic",
              fontName: "Math-Italic"
            },
            // "boldsymbol" is missing because they require the use of multiple fonts:
            // Math-BoldItalic and Main-Bold.  This is handled by a special case in
            // makeOrd which ends up calling boldsymbol.
            // families
            mathbb: {
              variant: "double-struck",
              fontName: "AMS-Regular"
            },
            mathcal: {
              variant: "script",
              fontName: "Caligraphic-Regular"
            },
            mathfrak: {
              variant: "fraktur",
              fontName: "Fraktur-Regular"
            },
            mathscr: {
              variant: "script",
              fontName: "Script-Regular"
            },
            mathsf: {
              variant: "sans-serif",
              fontName: "SansSerif-Regular"
            },
            mathtt: {
              variant: "monospace",
              fontName: "Typewriter-Regular"
            }
          }, oi = {
            //   path, width, height
            vec: ["vec", 0.471, 0.714],
            // values from the font glyph
            oiintSize1: ["oiintSize1", 0.957, 0.499],
            // oval to overlay the integrand
            oiintSize2: ["oiintSize2", 1.472, 0.659],
            oiiintSize1: ["oiiintSize1", 1.304, 0.499],
            oiiintSize2: ["oiiintSize2", 1.98, 0.659]
          };
          var L = {
            fontMap: ai,
            makeSymbol: Zt,
            mathsym: Xo,
            makeSpan: _t,
            makeSvgSpan: ii,
            makeLineSpan: Jo,
            makeAnchor: $o,
            makeFragment: li,
            wrapFragment: eu,
            makeVList: nu,
            makeOrd: Zo,
            makeGlue: ru,
            staticSvg: function(t, e) {
              const [r, l, c] = oi[t], m = new Lt(r), b = new It([m], {
                width: Q(l),
                height: Q(c),
                // Override CSS rule `.katex svg { width: 100% }`
                style: "width:" + Q(l),
                viewBox: "0 0 " + 1e3 * l + " " + 1e3 * c,
                preserveAspectRatio: "xMinYMin"
              }), y = ii(["overlay"], [b], e);
              return y.height = c, y.style.height = Q(c), y.style.width = Q(l), y;
            },
            svgData: oi,
            tryCombineChars: Qo
          };
          const Ge = {
            number: 3,
            unit: "mu"
          }, H0 = {
            number: 4,
            unit: "mu"
          }, k0 = {
            number: 5,
            unit: "mu"
          }, su = {
            mord: {
              mop: Ge,
              mbin: H0,
              mrel: k0,
              minner: Ge
            },
            mop: {
              mord: Ge,
              mop: Ge,
              mrel: k0,
              minner: Ge
            },
            mbin: {
              mord: H0,
              mop: H0,
              mopen: H0,
              minner: H0
            },
            mrel: {
              mord: k0,
              mop: k0,
              mopen: k0,
              minner: k0
            },
            mopen: {},
            mclose: {
              mop: Ge,
              mbin: H0,
              mrel: k0,
              minner: Ge
            },
            mpunct: {
              mord: Ge,
              mop: Ge,
              mrel: k0,
              mopen: Ge,
              mclose: Ge,
              mpunct: Ge,
              minner: Ge
            },
            minner: {
              mord: Ge,
              mop: Ge,
              mbin: H0,
              mrel: k0,
              mopen: Ge,
              mpunct: Ge,
              minner: Ge
            }
          }, iu = {
            mord: {
              mop: Ge
            },
            mop: {
              mord: Ge,
              mop: Ge
            },
            mbin: {},
            mrel: {},
            mopen: {},
            mclose: {
              mop: Ge
            },
            mpunct: {},
            minner: {
              mop: Ge
            }
          }, ui = {}, Vn = {}, Wn = {};
          function ee(t) {
            let {
              type: e,
              names: r,
              props: l,
              handler: c,
              htmlBuilder: m,
              mathmlBuilder: b
            } = t;
            const y = {
              type: e,
              numArgs: l.numArgs,
              argTypes: l.argTypes,
              allowedInArgument: !!l.allowedInArgument,
              allowedInText: !!l.allowedInText,
              allowedInMath: l.allowedInMath === void 0 ? !0 : l.allowedInMath,
              numOptionalArgs: l.numOptionalArgs || 0,
              infix: !!l.infix,
              primitive: !!l.primitive,
              handler: c
            };
            for (let v = 0; v < r.length; ++v)
              ui[r[v]] = y;
            e && (m && (Vn[e] = m), b && (Wn[e] = b));
          }
          function U0(t) {
            let {
              type: e,
              htmlBuilder: r,
              mathmlBuilder: l
            } = t;
            ee({
              type: e,
              names: [],
              props: {
                numArgs: 0
              },
              handler() {
                throw new Error("Should never be called.");
              },
              htmlBuilder: r,
              mathmlBuilder: l
            });
          }
          const jn = function(t) {
            return t.type === "ordgroup" && t.body.length === 1 ? t.body[0] : t;
          }, Ze = function(t) {
            return t.type === "ordgroup" ? t.body : [t];
          }, D0 = L.makeSpan, lu = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], au = ["rightmost", "mrel", "mclose", "mpunct"], ou = {
            display: V.DISPLAY,
            text: V.TEXT,
            script: V.SCRIPT,
            scriptscript: V.SCRIPTSCRIPT
          }, uu = {
            mord: "mord",
            mop: "mop",
            mbin: "mbin",
            mrel: "mrel",
            mopen: "mopen",
            mclose: "mclose",
            mpunct: "mpunct",
            minner: "minner"
          }, tt = function(t, e, r, l) {
            l === void 0 && (l = [null, null]);
            const c = [];
            for (let C = 0; C < t.length; C++) {
              const N = Ae(t[C], e);
              if (N instanceof r0) {
                const R = N.children;
                c.push(...R);
              } else
                c.push(N);
            }
            if (L.tryCombineChars(c), !r)
              return c;
            let m = e;
            if (t.length === 1) {
              const C = t[0];
              C.type === "sizing" ? m = e.havingSize(C.size) : C.type === "styling" && (m = e.havingStyle(ou[C.style]));
            }
            const b = D0([l[0] || "leftmost"], [], e), y = D0([l[1] || "rightmost"], [], e), v = r === "root";
            return Lr(c, (C, N) => {
              const R = N.classes[0], q = C.classes[0];
              R === "mbin" && U.contains(au, q) ? N.classes[0] = "mord" : q === "mbin" && U.contains(lu, R) && (C.classes[0] = "mord");
            }, {
              node: b
            }, y, v), Lr(c, (C, N) => {
              const R = qr(N), q = qr(C), Y = R && q ? C.hasClass("mtight") ? iu[R][q] : su[R][q] : null;
              if (Y)
                return L.makeGlue(Y, m);
            }, {
              node: b
            }, y, v), c;
          }, Lr = function(t, e, r, l, c) {
            l && t.push(l);
            let m = 0;
            for (; m < t.length; m++) {
              const b = t[m], y = ci(b);
              if (y) {
                Lr(y.children, e, r, null, c);
                continue;
              }
              const v = !b.hasClass("mspace");
              if (v) {
                const C = e(b, r.node);
                C && (r.insertAfter ? r.insertAfter(C) : (t.unshift(C), m++));
              }
              v ? r.node = b : c && b.hasClass("newline") && (r.node = D0(["leftmost"])), r.insertAfter = /* @__PURE__ */ ((C) => (N) => {
                t.splice(C + 1, 0, N), m++;
              })(m);
            }
            l && t.pop();
          }, ci = function(t) {
            return t instanceof r0 || t instanceof je || t instanceof q0 && t.hasClass("enclosing") ? t : null;
          }, Or = function(t, e) {
            const r = ci(t);
            if (r) {
              const l = r.children;
              if (l.length) {
                if (e === "right")
                  return Or(l[l.length - 1], "right");
                if (e === "left")
                  return Or(l[0], "left");
              }
            }
            return t;
          }, qr = function(t, e) {
            return t ? (e && (t = Or(t, e)), uu[t.classes[0]] || null) : null;
          }, mn = function(t, e) {
            const r = ["nulldelimiter"].concat(t.baseSizingClasses());
            return D0(e.concat(r));
          }, Ae = function(t, e, r) {
            if (!t)
              return D0();
            if (Vn[t.type]) {
              let l = Vn[t.type](t, e);
              if (r && e.size !== r.size) {
                l = D0(e.sizingClasses(r), [l], e);
                const c = e.sizeMultiplier / r.sizeMultiplier;
                l.height *= c, l.depth *= c;
              }
              return l;
            } else
              throw new u("Got group of unknown type: '" + t.type + "'");
          };
          function Xn(t, e) {
            const r = D0(["base"], t, e), l = D0(["strut"]);
            return l.style.height = Q(r.height + r.depth), r.depth && (l.style.verticalAlign = Q(-r.depth)), r.children.unshift(l), r;
          }
          function Pr(t, e) {
            let r = null;
            t.length === 1 && t[0].type === "tag" && (r = t[0].tag, t = t[0].body);
            const l = tt(t, e, "root");
            let c;
            l.length === 2 && l[1].hasClass("tag") && (c = l.pop());
            const m = [];
            let b = [];
            for (let C = 0; C < l.length; C++)
              if (b.push(l[C]), l[C].hasClass("mbin") || l[C].hasClass("mrel") || l[C].hasClass("allowbreak")) {
                let N = !1;
                for (; C < l.length - 1 && l[C + 1].hasClass("mspace") && !l[C + 1].hasClass("newline"); )
                  C++, b.push(l[C]), l[C].hasClass("nobreak") && (N = !0);
                N || (m.push(Xn(b, e)), b = []);
              } else
                l[C].hasClass("newline") && (b.pop(), b.length > 0 && (m.push(Xn(b, e)), b = []), m.push(l[C]));
            b.length > 0 && m.push(Xn(b, e));
            let y;
            r ? (y = Xn(tt(r, e, !0)), y.classes = ["tag"], m.push(y)) : c && m.push(c);
            const v = D0(["katex-html"], m);
            if (v.setAttribute("aria-hidden", "true"), y) {
              const C = y.children[0];
              C.style.height = Q(v.height + v.depth), v.depth && (C.style.verticalAlign = Q(-v.depth));
            }
            return v;
          }
          function hi(t) {
            return new r0(t);
          }
          class Ot {
            constructor(e, r, l) {
              this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = e, this.attributes = {}, this.children = r || [], this.classes = l || [];
            }
            /**
             * Sets an attribute on a MathML node. MathML depends on attributes to convey a
             * semantic content, so this is used heavily.
             */
            setAttribute(e, r) {
              this.attributes[e] = r;
            }
            /**
             * Gets an attribute on a MathML node.
             */
            getAttribute(e) {
              return this.attributes[e];
            }
            /**
             * Converts the math node into a MathML-namespaced DOM element.
             */
            toNode() {
              const e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
              for (const r in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, r) && e.setAttribute(r, this.attributes[r]);
              this.classes.length > 0 && (e.className = Rt(this.classes));
              for (let r = 0; r < this.children.length; r++)
                e.appendChild(this.children[r].toNode());
              return e;
            }
            /**
             * Converts the math node into an HTML markup string.
             */
            toMarkup() {
              let e = "<" + this.type;
              for (const r in this.attributes)
                Object.prototype.hasOwnProperty.call(this.attributes, r) && (e += " " + r + '="', e += U.escape(this.attributes[r]), e += '"');
              this.classes.length > 0 && (e += ' class ="' + U.escape(Rt(this.classes)) + '"'), e += ">";
              for (let r = 0; r < this.children.length; r++)
                e += this.children[r].toMarkup();
              return e += "</" + this.type + ">", e;
            }
            /**
             * Converts the math node into a string, similar to innerText, but escaped.
             */
            toText() {
              return this.children.map((e) => e.toText()).join("");
            }
          }
          class pn {
            constructor(e) {
              this.text = void 0, this.text = e;
            }
            /**
             * Converts the text node into a DOM text node.
             */
            toNode() {
              return document.createTextNode(this.text);
            }
            /**
             * Converts the text node into escaped HTML markup
             * (representing the text itself).
             */
            toMarkup() {
              return U.escape(this.toText());
            }
            /**
             * Converts the text node into a string
             * (representing the text itself).
             */
            toText() {
              return this.text;
            }
          }
          class cu {
            /**
             * Create a Space node with width given in CSS ems.
             */
            constructor(e) {
              this.width = void 0, this.character = void 0, this.width = e, e >= 0.05555 && e <= 0.05556 ? this.character = " " : e >= 0.1666 && e <= 0.1667 ? this.character = " " : e >= 0.2222 && e <= 0.2223 ? this.character = " " : e >= 0.2777 && e <= 0.2778 ? this.character = "  " : e >= -0.05556 && e <= -0.05555 ? this.character = " ⁣" : e >= -0.1667 && e <= -0.1666 ? this.character = " ⁣" : e >= -0.2223 && e <= -0.2222 ? this.character = " ⁣" : e >= -0.2778 && e <= -0.2777 ? this.character = " ⁣" : this.character = null;
            }
            /**
             * Converts the math node into a MathML-namespaced DOM element.
             */
            toNode() {
              if (this.character)
                return document.createTextNode(this.character);
              {
                const e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
                return e.setAttribute("width", Q(this.width)), e;
              }
            }
            /**
             * Converts the math node into an HTML markup string.
             */
            toMarkup() {
              return this.character ? "<mtext>" + this.character + "</mtext>" : '<mspace width="' + Q(this.width) + '"/>';
            }
            /**
             * Converts the math node into a string, similar to innerText.
             */
            toText() {
              return this.character ? this.character : " ";
            }
          }
          var Z = {
            MathNode: Ot,
            TextNode: pn,
            SpaceNode: cu,
            newDocumentFragment: hi
          };
          const qt = function(t, e, r) {
            return ye[e][t] && ye[e][t].replace && t.charCodeAt(0) !== 55349 && !(Je.hasOwnProperty(t) && r && (r.fontFamily && r.fontFamily.slice(4, 6) === "tt" || r.font && r.font.slice(4, 6) === "tt")) && (t = ye[e][t].replace), new Z.TextNode(t);
          }, Hr = function(t) {
            return t.length === 1 ? t[0] : new Z.MathNode("mrow", t);
          }, Ur = function(t, e) {
            if (e.fontFamily === "texttt")
              return "monospace";
            if (e.fontFamily === "textsf")
              return e.fontShape === "textit" && e.fontWeight === "textbf" ? "sans-serif-bold-italic" : e.fontShape === "textit" ? "sans-serif-italic" : e.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
            if (e.fontShape === "textit" && e.fontWeight === "textbf")
              return "bold-italic";
            if (e.fontShape === "textit")
              return "italic";
            if (e.fontWeight === "textbf")
              return "bold";
            const r = e.font;
            if (!r || r === "mathnormal")
              return null;
            const l = t.mode;
            if (r === "mathit")
              return "italic";
            if (r === "boldsymbol")
              return t.type === "textord" ? "bold" : "bold-italic";
            if (r === "mathbf")
              return "bold";
            if (r === "mathbb")
              return "double-struck";
            if (r === "mathfrak")
              return "fraktur";
            if (r === "mathscr" || r === "mathcal")
              return "script";
            if (r === "mathsf")
              return "sans-serif";
            if (r === "mathtt")
              return "monospace";
            let c = t.text;
            if (U.contains(["\\imath", "\\jmath"], c))
              return null;
            ye[l][c] && ye[l][c].replace && (c = ye[l][c].replace);
            const m = L.fontMap[r].fontName;
            return _0(c, m, l) ? L.fontMap[r].variant : null;
          }, yt = function(t, e, r) {
            if (t.length === 1) {
              const m = Le(t[0], e);
              return r && m instanceof Ot && m.type === "mo" && (m.setAttribute("lspace", "0em"), m.setAttribute("rspace", "0em")), [m];
            }
            const l = [];
            let c;
            for (let m = 0; m < t.length; m++) {
              const b = Le(t[m], e);
              if (b instanceof Ot && c instanceof Ot) {
                if (b.type === "mtext" && c.type === "mtext" && b.getAttribute("mathvariant") === c.getAttribute("mathvariant")) {
                  c.children.push(...b.children);
                  continue;
                } else if (b.type === "mn" && c.type === "mn") {
                  c.children.push(...b.children);
                  continue;
                } else if (b.type === "mi" && b.children.length === 1 && c.type === "mn") {
                  const y = b.children[0];
                  if (y instanceof pn && y.text === ".") {
                    c.children.push(...b.children);
                    continue;
                  }
                } else if (c.type === "mi" && c.children.length === 1) {
                  const y = c.children[0];
                  if (y instanceof pn && y.text === "̸" && (b.type === "mo" || b.type === "mi" || b.type === "mn")) {
                    const v = b.children[0];
                    v instanceof pn && v.text.length > 0 && (v.text = v.text.slice(0, 1) + "̸" + v.text.slice(1), l.pop());
                  }
                }
              }
              l.push(b), c = b;
            }
            return l;
          }, C0 = function(t, e, r) {
            return Hr(yt(t, e, r));
          }, Le = function(t, e) {
            if (!t)
              return new Z.MathNode("mrow");
            if (Wn[t.type])
              return Wn[t.type](t, e);
            throw new u("Got group of unknown type: '" + t.type + "'");
          };
          function fi(t, e, r, l, c) {
            const m = yt(t, r);
            let b;
            m.length === 1 && m[0] instanceof Ot && U.contains(["mrow", "mtable"], m[0].type) ? b = m[0] : b = new Z.MathNode("mrow", m);
            const y = new Z.MathNode("annotation", [new Z.TextNode(e)]);
            y.setAttribute("encoding", "application/x-tex");
            const v = new Z.MathNode("semantics", [b, y]), C = new Z.MathNode("math", [v]);
            C.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), l && C.setAttribute("display", "block");
            const N = c ? "katex" : "katex-mathml";
            return L.makeSpan([N], [C]);
          }
          const di = function(t) {
            return new In({
              style: t.displayMode ? V.DISPLAY : V.TEXT,
              maxSize: t.maxSize,
              minRuleThickness: t.minRuleThickness
            });
          }, mi = function(t, e) {
            if (e.displayMode) {
              const r = ["katex-display"];
              e.leqno && r.push("leqno"), e.fleqn && r.push("fleqn"), t = L.makeSpan(r, [t]);
            }
            return t;
          }, hu = function(t, e, r) {
            const l = di(r);
            let c;
            if (r.output === "mathml")
              return fi(t, e, l, r.displayMode, !0);
            if (r.output === "html") {
              const m = Pr(t, l);
              c = L.makeSpan(["katex"], [m]);
            } else {
              const m = fi(t, e, l, r.displayMode, !1), b = Pr(t, l);
              c = L.makeSpan(["katex"], [m, b]);
            }
            return mi(c, r);
          }, fu = function(t, e, r) {
            const l = di(r), c = Pr(t, l), m = L.makeSpan(["katex"], [c]);
            return mi(m, r);
          }, du = {
            widehat: "^",
            widecheck: "ˇ",
            widetilde: "~",
            utilde: "~",
            overleftarrow: "←",
            underleftarrow: "←",
            xleftarrow: "←",
            overrightarrow: "→",
            underrightarrow: "→",
            xrightarrow: "→",
            underbrace: "⏟",
            overbrace: "⏞",
            overgroup: "⏠",
            undergroup: "⏡",
            overleftrightarrow: "↔",
            underleftrightarrow: "↔",
            xleftrightarrow: "↔",
            Overrightarrow: "⇒",
            xRightarrow: "⇒",
            overleftharpoon: "↼",
            xleftharpoonup: "↼",
            overrightharpoon: "⇀",
            xrightharpoonup: "⇀",
            xLeftarrow: "⇐",
            xLeftrightarrow: "⇔",
            xhookleftarrow: "↩",
            xhookrightarrow: "↪",
            xmapsto: "↦",
            xrightharpoondown: "⇁",
            xleftharpoondown: "↽",
            xrightleftharpoons: "⇌",
            xleftrightharpoons: "⇋",
            xtwoheadleftarrow: "↞",
            xtwoheadrightarrow: "↠",
            xlongequal: "=",
            xtofrom: "⇄",
            xrightleftarrows: "⇄",
            xrightequilibrium: "⇌",
            // Not a perfect match.
            xleftequilibrium: "⇋",
            // None better available.
            "\\cdrightarrow": "→",
            "\\cdleftarrow": "←",
            "\\cdlongequal": "="
          }, mu = function(t) {
            const e = new Z.MathNode("mo", [new Z.TextNode(du[t.replace(/^\\/, "")])]);
            return e.setAttribute("stretchy", "true"), e;
          }, pu = {
            //   path(s), minWidth, height, align
            overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
            overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
            underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
            underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
            xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
            "\\cdrightarrow": [["rightarrow"], 3, 522, "xMaxYMin"],
            // CD minwwidth2.5pc
            xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
            "\\cdleftarrow": [["leftarrow"], 3, 522, "xMinYMin"],
            Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
            xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
            xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
            overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
            xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
            xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
            overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
            xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
            xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
            xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
            "\\cdlongequal": [["longequal"], 3, 334, "xMinYMin"],
            xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
            xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
            overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
            overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
            underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
            underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
            xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
            xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
            xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
            xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
            xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
            xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
            overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
            underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
            overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
            undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
            xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
            xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
            // The next three arrows are from the mhchem package.
            // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
            // document as \xrightarrow or \xrightleftharpoons. Those have
            // min-length = 1.75em, so we set min-length on these next three to match.
            xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
            xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
            xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
          }, gu = function(t) {
            return t.type === "ordgroup" ? t.body.length : 1;
          };
          var x0 = {
            encloseSpan: function(t, e, r, l, c) {
              let m;
              const b = t.height + t.depth + r + l;
              if (/fbox|color|angl/.test(e)) {
                if (m = L.makeSpan(["stretchy", e], [], c), e === "fbox") {
                  const y = c.color && c.getColor();
                  y && (m.style.borderColor = y);
                }
              } else {
                const y = [];
                /^[bx]cancel$/.test(e) && y.push(new J0({
                  x1: "0",
                  y1: "0",
                  x2: "100%",
                  y2: "100%",
                  "stroke-width": "0.046em"
                })), /^x?cancel$/.test(e) && y.push(new J0({
                  x1: "0",
                  y1: "100%",
                  x2: "100%",
                  y2: "0",
                  "stroke-width": "0.046em"
                }));
                const v = new It(y, {
                  width: "100%",
                  height: Q(b)
                });
                m = L.makeSvgSpan([], [v], c);
              }
              return m.height = b, m.style.height = Q(b), m;
            },
            mathMLnode: mu,
            svgSpan: function(t, e) {
              function r() {
                let b = 4e5;
                const y = t.label.slice(1);
                if (U.contains(["widehat", "widecheck", "widetilde", "utilde"], y)) {
                  const C = gu(t.base);
                  let N, R, q;
                  if (C > 5)
                    y === "widehat" || y === "widecheck" ? (N = 420, b = 2364, q = 0.42, R = y + "4") : (N = 312, b = 2340, q = 0.34, R = "tilde4");
                  else {
                    const ae = [1, 1, 2, 2, 3, 3][C];
                    y === "widehat" || y === "widecheck" ? (b = [0, 1062, 2364, 2364, 2364][ae], N = [0, 239, 300, 360, 420][ae], q = [0, 0.24, 0.3, 0.3, 0.36, 0.42][ae], R = y + ae) : (b = [0, 600, 1033, 2339, 2340][ae], N = [0, 260, 286, 306, 312][ae], q = [0, 0.26, 0.286, 0.3, 0.306, 0.34][ae], R = "tilde" + ae);
                  }
                  const Y = new Lt(R), se = new It([Y], {
                    width: "100%",
                    height: Q(q),
                    viewBox: "0 0 " + b + " " + N,
                    preserveAspectRatio: "none"
                  });
                  return {
                    span: L.makeSvgSpan([], [se], e),
                    minWidth: 0,
                    height: q
                  };
                } else {
                  const v = [], C = pu[y], [N, R, q] = C, Y = q / 1e3, se = N.length;
                  let ae, ke;
                  if (se === 1) {
                    const ge = C[3];
                    ae = ["hide-tail"], ke = [ge];
                  } else if (se === 2)
                    ae = ["halfarrow-left", "halfarrow-right"], ke = ["xMinYMin", "xMaxYMin"];
                  else if (se === 3)
                    ae = ["brace-left", "brace-center", "brace-right"], ke = ["xMinYMin", "xMidYMin", "xMaxYMin"];
                  else
                    throw new Error(`Correct katexImagesData or update code here to support
                    ` + se + " children.");
                  for (let ge = 0; ge < se; ge++) {
                    const xe = new Lt(N[ge]), Ce = new It([xe], {
                      width: "400em",
                      height: Q(Y),
                      viewBox: "0 0 " + b + " " + q,
                      preserveAspectRatio: ke[ge] + " slice"
                    }), qe = L.makeSvgSpan([ae[ge]], [Ce], e);
                    if (se === 1)
                      return {
                        span: qe,
                        minWidth: R,
                        height: Y
                      };
                    qe.style.height = Q(Y), v.push(qe);
                  }
                  return {
                    span: L.makeSpan(["stretchy"], v, e),
                    minWidth: R,
                    height: Y
                  };
                }
              }
              const {
                span: l,
                minWidth: c,
                height: m
              } = r();
              return l.height = m, l.style.height = Q(m), c > 0 && (l.style.minWidth = Q(c)), l;
            }
          };
          function me(t, e) {
            if (!t || t.type !== e)
              throw new Error("Expected node of type " + e + ", but got " + (t ? "node of type " + t.type : String(t)));
            return t;
          }
          function Gr(t) {
            const e = Yn(t);
            if (!e)
              throw new Error("Expected node of symbol group type, but got " + (t ? "node of type " + t.type : String(t)));
            return e;
          }
          function Yn(t) {
            return t && (t.type === "atom" || Hn.hasOwnProperty(t.type)) ? t : null;
          }
          const Vr = (t, e) => {
            let r, l, c;
            t && t.type === "supsub" ? (l = me(t.base, "accent"), r = l.base, t.base = r, c = Rr(Ae(t, e)), t.base = l) : (l = me(t, "accent"), r = l.base);
            const m = Ae(r, e.havingCrampedStyle()), b = l.isShifty && U.isCharacterBox(r);
            let y = 0;
            if (b) {
              const q = U.getBaseElem(r), Y = Ae(q, e.havingCrampedStyle());
              y = fn(Y).skew;
            }
            const v = l.label === "\\c";
            let C = v ? m.height + m.depth : Math.min(m.height, e.fontMetrics().xHeight), N;
            if (l.isStretchy)
              N = x0.svgSpan(l, e), N = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: m
                }, {
                  type: "elem",
                  elem: N,
                  wrapperClasses: ["svg-align"],
                  wrapperStyle: y > 0 ? {
                    width: "calc(100% - " + Q(2 * y) + ")",
                    marginLeft: Q(2 * y)
                  } : void 0
                }]
              }, e);
            else {
              let q, Y;
              l.label === "\\vec" ? (q = L.staticSvg("vec", e), Y = L.svgData.vec[1]) : (q = L.makeOrd({
                mode: l.mode,
                text: l.label
              }, e, "textord"), q = fn(q), q.italic = 0, Y = q.width, v && (C += q.depth)), N = L.makeSpan(["accent-body"], [q]);
              const se = l.label === "\\textcircled";
              se && (N.classes.push("accent-full"), C = m.height);
              let ae = y;
              se || (ae -= Y / 2), N.style.left = Q(ae), l.label === "\\textcircled" && (N.style.top = ".2em"), N = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: m
                }, {
                  type: "kern",
                  size: -C
                }, {
                  type: "elem",
                  elem: N
                }]
              }, e);
            }
            const R = L.makeSpan(["mord", "accent"], [N], e);
            return c ? (c.children[0] = R, c.height = Math.max(R.height, c.height), c.classes[0] = "mord", c) : R;
          }, pi = (t, e) => {
            const r = t.isStretchy ? x0.mathMLnode(t.label) : new Z.MathNode("mo", [qt(t.label, t.mode)]), l = new Z.MathNode("mover", [Le(t.base, e), r]);
            return l.setAttribute("accent", "true"), l;
          }, bu = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((t) => "\\" + t).join("|"));
          ee({
            type: "accent",
            names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
            props: {
              numArgs: 1
            },
            handler: (t, e) => {
              const r = jn(e[0]), l = !bu.test(t.funcName), c = !l || t.funcName === "\\widehat" || t.funcName === "\\widetilde" || t.funcName === "\\widecheck";
              return {
                type: "accent",
                mode: t.parser.mode,
                label: t.funcName,
                isStretchy: l,
                isShifty: c,
                base: r
              };
            },
            htmlBuilder: Vr,
            mathmlBuilder: pi
          }), ee({
            type: "accent",
            names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
            props: {
              numArgs: 1,
              allowedInText: !0,
              allowedInMath: !0,
              // unless in strict mode
              argTypes: ["primitive"]
            },
            handler: (t, e) => {
              const r = e[0];
              let l = t.parser.mode;
              return l === "math" && (t.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + t.funcName + " works only in text mode"), l = "text"), {
                type: "accent",
                mode: l,
                label: t.funcName,
                isStretchy: !1,
                isShifty: !0,
                base: r
              };
            },
            htmlBuilder: Vr,
            mathmlBuilder: pi
          }), ee({
            type: "accentUnder",
            names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
            props: {
              numArgs: 1
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "accentUnder",
                mode: r.mode,
                label: l,
                base: c
              };
            },
            htmlBuilder: (t, e) => {
              const r = Ae(t.base, e), l = x0.svgSpan(t, e), c = t.label === "\\utilde" ? 0.12 : 0, m = L.makeVList({
                positionType: "top",
                positionData: r.height,
                children: [{
                  type: "elem",
                  elem: l,
                  wrapperClasses: ["svg-align"]
                }, {
                  type: "kern",
                  size: c
                }, {
                  type: "elem",
                  elem: r
                }]
              }, e);
              return L.makeSpan(["mord", "accentunder"], [m], e);
            },
            mathmlBuilder: (t, e) => {
              const r = x0.mathMLnode(t.label), l = new Z.MathNode("munder", [Le(t.base, e), r]);
              return l.setAttribute("accentunder", "true"), l;
            }
          });
          const Zn = (t) => {
            const e = new Z.MathNode("mpadded", t ? [t] : []);
            return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e;
          };
          ee({
            type: "xArrow",
            names: [
              "\\xleftarrow",
              "\\xrightarrow",
              "\\xLeftarrow",
              "\\xRightarrow",
              "\\xleftrightarrow",
              "\\xLeftrightarrow",
              "\\xhookleftarrow",
              "\\xhookrightarrow",
              "\\xmapsto",
              "\\xrightharpoondown",
              "\\xrightharpoonup",
              "\\xleftharpoondown",
              "\\xleftharpoonup",
              "\\xrightleftharpoons",
              "\\xleftrightharpoons",
              "\\xlongequal",
              "\\xtwoheadrightarrow",
              "\\xtwoheadleftarrow",
              "\\xtofrom",
              // The next 3 functions are here to support the mhchem extension.
              // Direct use of these functions is discouraged and may break someday.
              "\\xrightleftarrows",
              "\\xrightequilibrium",
              "\\xleftequilibrium",
              // The next 3 functions are here only to support the {CD} environment.
              "\\\\cdrightarrow",
              "\\\\cdleftarrow",
              "\\\\cdlongequal"
            ],
            props: {
              numArgs: 1,
              numOptionalArgs: 1
            },
            handler(t, e, r) {
              let {
                parser: l,
                funcName: c
              } = t;
              return {
                type: "xArrow",
                mode: l.mode,
                label: c,
                body: e[0],
                below: r[0]
              };
            },
            // Flow is unable to correctly infer the type of `group`, even though it's
            // unambiguously determined from the passed-in `type` above.
            htmlBuilder(t, e) {
              const r = e.style;
              let l = e.havingStyle(r.sup());
              const c = L.wrapFragment(Ae(t.body, l, e), e), m = t.label.slice(0, 2) === "\\x" ? "x" : "cd";
              c.classes.push(m + "-arrow-pad");
              let b;
              t.below && (l = e.havingStyle(r.sub()), b = L.wrapFragment(Ae(t.below, l, e), e), b.classes.push(m + "-arrow-pad"));
              const y = x0.svgSpan(t, e), v = -e.fontMetrics().axisHeight + 0.5 * y.height;
              let C = -e.fontMetrics().axisHeight - 0.5 * y.height - 0.111;
              (c.depth > 0.25 || t.label === "\\xleftequilibrium") && (C -= c.depth);
              let N;
              if (b) {
                const R = -e.fontMetrics().axisHeight + b.height + 0.5 * y.height + 0.111;
                N = L.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: c,
                    shift: C
                  }, {
                    type: "elem",
                    elem: y,
                    shift: v
                  }, {
                    type: "elem",
                    elem: b,
                    shift: R
                  }]
                }, e);
              } else
                N = L.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: c,
                    shift: C
                  }, {
                    type: "elem",
                    elem: y,
                    shift: v
                  }]
                }, e);
              return N.children[0].children[0].children[1].classes.push("svg-align"), L.makeSpan(["mrel", "x-arrow"], [N], e);
            },
            mathmlBuilder(t, e) {
              const r = x0.mathMLnode(t.label);
              r.setAttribute("minsize", t.label.charAt(0) === "x" ? "1.75em" : "3.0em");
              let l;
              if (t.body) {
                const c = Zn(Le(t.body, e));
                if (t.below) {
                  const m = Zn(Le(t.below, e));
                  l = new Z.MathNode("munderover", [r, m, c]);
                } else
                  l = new Z.MathNode("mover", [r, c]);
              } else if (t.below) {
                const c = Zn(Le(t.below, e));
                l = new Z.MathNode("munder", [r, c]);
              } else
                l = Zn(), l = new Z.MathNode("mover", [r, l]);
              return l;
            }
          });
          const wu = L.makeSpan;
          function gi(t, e) {
            const r = tt(t.body, e, !0);
            return wu([t.mclass], r, e);
          }
          function bi(t, e) {
            let r;
            const l = yt(t.body, e);
            return t.mclass === "minner" ? r = new Z.MathNode("mpadded", l) : t.mclass === "mord" ? t.isCharacterBox ? (r = l[0], r.type = "mi") : r = new Z.MathNode("mi", l) : (t.isCharacterBox ? (r = l[0], r.type = "mo") : r = new Z.MathNode("mo", l), t.mclass === "mbin" ? (r.attributes.lspace = "0.22em", r.attributes.rspace = "0.22em") : t.mclass === "mpunct" ? (r.attributes.lspace = "0em", r.attributes.rspace = "0.17em") : t.mclass === "mopen" || t.mclass === "mclose" ? (r.attributes.lspace = "0em", r.attributes.rspace = "0em") : t.mclass === "minner" && (r.attributes.lspace = "0.0556em", r.attributes.width = "+0.1111em")), r;
          }
          ee({
            type: "mclass",
            names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "mclass",
                mode: r.mode,
                mclass: "m" + l.slice(5),
                // TODO(kevinb): don't prefix with 'm'
                body: Ze(c),
                isCharacterBox: U.isCharacterBox(c)
              };
            },
            htmlBuilder: gi,
            mathmlBuilder: bi
          });
          const Kn = (t) => {
            const e = t.type === "ordgroup" && t.body.length ? t.body[0] : t;
            return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
          };
          ee({
            type: "mclass",
            names: ["\\@binrel"],
            props: {
              numArgs: 2
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "mclass",
                mode: r.mode,
                mclass: Kn(e[0]),
                body: Ze(e[1]),
                isCharacterBox: U.isCharacterBox(e[1])
              };
            }
          }), ee({
            type: "mclass",
            names: ["\\stackrel", "\\overset", "\\underset"],
            props: {
              numArgs: 2
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[1], m = e[0];
              let b;
              l !== "\\stackrel" ? b = Kn(c) : b = "mrel";
              const y = {
                type: "op",
                mode: c.mode,
                limits: !0,
                alwaysHandleSupSub: !0,
                parentIsSupSub: !1,
                symbol: !1,
                suppressBaseShift: l !== "\\stackrel",
                body: Ze(c)
              }, v = {
                type: "supsub",
                mode: m.mode,
                base: y,
                sup: l === "\\underset" ? null : m,
                sub: l === "\\underset" ? m : null
              };
              return {
                type: "mclass",
                mode: r.mode,
                mclass: b,
                body: [v],
                isCharacterBox: U.isCharacterBox(v)
              };
            },
            htmlBuilder: gi,
            mathmlBuilder: bi
          }), ee({
            type: "pmb",
            names: ["\\pmb"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "pmb",
                mode: r.mode,
                mclass: Kn(e[0]),
                body: Ze(e[0])
              };
            },
            htmlBuilder(t, e) {
              const r = tt(t.body, e, !0), l = L.makeSpan([t.mclass], r, e);
              return l.style.textShadow = "0.02em 0.01em 0.04px", l;
            },
            mathmlBuilder(t, e) {
              const r = yt(t.body, e), l = new Z.MathNode("mstyle", r);
              return l.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), l;
            }
          });
          const _u = {
            ">": "\\\\cdrightarrow",
            "<": "\\\\cdleftarrow",
            "=": "\\\\cdlongequal",
            A: "\\uparrow",
            V: "\\downarrow",
            "|": "\\Vert",
            ".": "no arrow"
          }, wi = () => ({
            type: "styling",
            body: [],
            mode: "math",
            style: "display"
          }), _i = (t) => t.type === "textord" && t.text === "@", yu = (t, e) => (t.type === "mathord" || t.type === "atom") && t.text === e;
          function ku(t, e, r) {
            const l = _u[t];
            switch (l) {
              case "\\\\cdrightarrow":
              case "\\\\cdleftarrow":
                return r.callFunction(l, [e[0]], [e[1]]);
              case "\\uparrow":
              case "\\downarrow": {
                const c = r.callFunction("\\\\cdleft", [e[0]], []), m = {
                  type: "atom",
                  text: l,
                  mode: "math",
                  family: "rel"
                }, b = r.callFunction("\\Big", [m], []), y = r.callFunction("\\\\cdright", [e[1]], []), v = {
                  type: "ordgroup",
                  mode: "math",
                  body: [c, b, y]
                };
                return r.callFunction("\\\\cdparent", [v], []);
              }
              case "\\\\cdlongequal":
                return r.callFunction("\\\\cdlongequal", [], []);
              case "\\Vert": {
                const c = {
                  type: "textord",
                  text: "\\Vert",
                  mode: "math"
                };
                return r.callFunction("\\Big", [c], []);
              }
              default:
                return {
                  type: "textord",
                  text: " ",
                  mode: "math"
                };
            }
          }
          function Du(t) {
            const e = [];
            for (t.gullet.beginGroup(), t.gullet.macros.set("\\cr", "\\\\\\relax"), t.gullet.beginGroup(); ; ) {
              e.push(t.parseExpression(!1, "\\\\")), t.gullet.endGroup(), t.gullet.beginGroup();
              const m = t.fetch().text;
              if (m === "&" || m === "\\\\")
                t.consume();
              else if (m === "\\end") {
                e[e.length - 1].length === 0 && e.pop();
                break;
              } else
                throw new u("Expected \\\\ or \\cr or \\end", t.nextToken);
            }
            let r = [];
            const l = [r];
            for (let m = 0; m < e.length; m++) {
              const b = e[m];
              let y = wi();
              for (let v = 0; v < b.length; v++)
                if (!_i(b[v]))
                  y.body.push(b[v]);
                else {
                  r.push(y), v += 1;
                  const C = Gr(b[v]).text, N = new Array(2);
                  if (N[0] = {
                    type: "ordgroup",
                    mode: "math",
                    body: []
                  }, N[1] = {
                    type: "ordgroup",
                    mode: "math",
                    body: []
                  }, !("=|.".indexOf(C) > -1))
                    if ("<>AV".indexOf(C) > -1)
                      for (let Y = 0; Y < 2; Y++) {
                        let se = !0;
                        for (let ae = v + 1; ae < b.length; ae++) {
                          if (yu(b[ae], C)) {
                            se = !1, v = ae;
                            break;
                          }
                          if (_i(b[ae]))
                            throw new u("Missing a " + C + " character to complete a CD arrow.", b[ae]);
                          N[Y].body.push(b[ae]);
                        }
                        if (se)
                          throw new u("Missing a " + C + " character to complete a CD arrow.", b[v]);
                      }
                    else
                      throw new u('Expected one of "<>AV=|." after @', b[v]);
                  const q = {
                    type: "styling",
                    body: [ku(C, N, t)],
                    mode: "math",
                    style: "display"
                    // CD is always displaystyle.
                  };
                  r.push(q), y = wi();
                }
              m % 2 === 0 ? r.push(y) : r.shift(), r = [], l.push(r);
            }
            t.gullet.endGroup(), t.gullet.endGroup();
            const c = new Array(l[0].length).fill({
              type: "align",
              align: "c",
              pregap: 0.25,
              // CD package sets \enskip between columns.
              postgap: 0.25
              // So pre and post each get half an \enskip, i.e. 0.25em.
            });
            return {
              type: "array",
              mode: "math",
              body: l,
              arraystretch: 1,
              addJot: !0,
              rowGaps: [null],
              cols: c,
              colSeparationType: "CD",
              hLinesBeforeRow: new Array(l.length + 1).fill([])
            };
          }
          ee({
            type: "cdlabel",
            names: ["\\\\cdleft", "\\\\cdright"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              return {
                type: "cdlabel",
                mode: r.mode,
                side: l.slice(4),
                label: e[0]
              };
            },
            htmlBuilder(t, e) {
              const r = e.havingStyle(e.style.sup()), l = L.wrapFragment(Ae(t.label, r, e), e);
              return l.classes.push("cd-label-" + t.side), l.style.bottom = Q(0.8 - l.depth), l.height = 0, l.depth = 0, l;
            },
            mathmlBuilder(t, e) {
              let r = new Z.MathNode("mrow", [Le(t.label, e)]);
              return r = new Z.MathNode("mpadded", [r]), r.setAttribute("width", "0"), t.side === "left" && r.setAttribute("lspace", "-1width"), r.setAttribute("voffset", "0.7em"), r = new Z.MathNode("mstyle", [r]), r.setAttribute("displaystyle", "false"), r.setAttribute("scriptlevel", "1"), r;
            }
          }), ee({
            type: "cdlabelparent",
            names: ["\\\\cdparent"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "cdlabelparent",
                mode: r.mode,
                fragment: e[0]
              };
            },
            htmlBuilder(t, e) {
              const r = L.wrapFragment(Ae(t.fragment, e), e);
              return r.classes.push("cd-vert-arrow"), r;
            },
            mathmlBuilder(t, e) {
              return new Z.MathNode("mrow", [Le(t.fragment, e)]);
            }
          }), ee({
            type: "textord",
            names: ["\\@char"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              const c = me(e[0], "ordgroup").body;
              let m = "";
              for (let v = 0; v < c.length; v++) {
                const C = me(c[v], "textord");
                m += C.text;
              }
              let b = parseInt(m), y;
              if (isNaN(b))
                throw new u("\\@char has non-numeric argument " + m);
              if (b < 0 || b >= 1114111)
                throw new u("\\@char with invalid code point " + m);
              return b <= 65535 ? y = String.fromCharCode(b) : (b -= 65536, y = String.fromCharCode((b >> 10) + 55296, (b & 1023) + 56320)), {
                type: "textord",
                mode: r.mode,
                text: y
              };
            }
          });
          const yi = (t, e) => {
            const r = tt(t.body, e.withColor(t.color), !1);
            return L.makeFragment(r);
          }, ki = (t, e) => {
            const r = yt(t.body, e.withColor(t.color)), l = new Z.MathNode("mstyle", r);
            return l.setAttribute("mathcolor", t.color), l;
          };
          ee({
            type: "color",
            names: ["\\textcolor"],
            props: {
              numArgs: 2,
              allowedInText: !0,
              argTypes: ["color", "original"]
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              const l = me(e[0], "color-token").color, c = e[1];
              return {
                type: "color",
                mode: r.mode,
                color: l,
                body: Ze(c)
              };
            },
            htmlBuilder: yi,
            mathmlBuilder: ki
          }), ee({
            type: "color",
            names: ["\\color"],
            props: {
              numArgs: 1,
              allowedInText: !0,
              argTypes: ["color"]
            },
            handler(t, e) {
              let {
                parser: r,
                breakOnTokenText: l
              } = t;
              const c = me(e[0], "color-token").color;
              r.gullet.macros.set("\\current@color", c);
              const m = r.parseExpression(!0, l);
              return {
                type: "color",
                mode: r.mode,
                color: c,
                body: m
              };
            },
            htmlBuilder: yi,
            mathmlBuilder: ki
          }), ee({
            type: "cr",
            names: ["\\\\"],
            props: {
              numArgs: 0,
              numOptionalArgs: 0,
              allowedInText: !0
            },
            handler(t, e, r) {
              let {
                parser: l
              } = t;
              const c = l.gullet.future().text === "[" ? l.parseSizeGroup(!0) : null, m = !l.settings.displayMode || !l.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
              return {
                type: "cr",
                mode: l.mode,
                newLine: m,
                size: c && me(c, "size").value
              };
            },
            // The following builders are called only at the top level,
            // not within tabular/array environments.
            htmlBuilder(t, e) {
              const r = L.makeSpan(["mspace"], [], e);
              return t.newLine && (r.classes.push("newline"), t.size && (r.style.marginTop = Q(Me(t.size, e)))), r;
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mspace");
              return t.newLine && (r.setAttribute("linebreak", "newline"), t.size && r.setAttribute("height", Q(Me(t.size, e)))), r;
            }
          });
          const Wr = {
            "\\global": "\\global",
            "\\long": "\\\\globallong",
            "\\\\globallong": "\\\\globallong",
            "\\def": "\\gdef",
            "\\gdef": "\\gdef",
            "\\edef": "\\xdef",
            "\\xdef": "\\xdef",
            "\\let": "\\\\globallet",
            "\\futurelet": "\\\\globalfuture"
          }, Di = (t) => {
            const e = t.text;
            if (/^(?:[\\{}$&#^_]|EOF)$/.test(e))
              throw new u("Expected a control sequence", t);
            return e;
          }, xu = (t) => {
            let e = t.gullet.popToken();
            return e.text === "=" && (e = t.gullet.popToken(), e.text === " " && (e = t.gullet.popToken())), e;
          }, xi = (t, e, r, l) => {
            let c = t.gullet.macros.get(r.text);
            c == null && (r.noexpand = !0, c = {
              tokens: [r],
              numArgs: 0,
              // reproduce the same behavior in expansion
              unexpandable: !t.gullet.isExpandable(r.text)
            }), t.gullet.macros.set(e, c, l);
          };
          ee({
            type: "internal",
            names: [
              "\\global",
              "\\long",
              "\\\\globallong"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t;
              e.consumeSpaces();
              const l = e.fetch();
              if (Wr[l.text])
                return (r === "\\global" || r === "\\\\globallong") && (l.text = Wr[l.text]), me(e.parseFunction(), "internal");
              throw new u("Invalid token after macro prefix", l);
            }
          }), ee({
            type: "internal",
            names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t, l = e.gullet.popToken();
              const c = l.text;
              if (/^(?:[\\{}$&#^_]|EOF)$/.test(c))
                throw new u("Expected a control sequence", l);
              let m = 0, b;
              const y = [[]];
              for (; e.gullet.future().text !== "{"; )
                if (l = e.gullet.popToken(), l.text === "#") {
                  if (e.gullet.future().text === "{") {
                    b = e.gullet.future(), y[m].push("{");
                    break;
                  }
                  if (l = e.gullet.popToken(), !/^[1-9]$/.test(l.text))
                    throw new u('Invalid argument number "' + l.text + '"');
                  if (parseInt(l.text) !== m + 1)
                    throw new u('Argument number "' + l.text + '" out of order');
                  m++, y.push([]);
                } else {
                  if (l.text === "EOF")
                    throw new u("Expected a macro definition");
                  y[m].push(l.text);
                }
              let {
                tokens: v
              } = e.gullet.consumeArg();
              return b && v.unshift(b), (r === "\\edef" || r === "\\xdef") && (v = e.gullet.expandTokens(v), v.reverse()), e.gullet.macros.set(c, {
                tokens: v,
                numArgs: m,
                delimiters: y
              }, r === Wr[r]), {
                type: "internal",
                mode: e.mode
              };
            }
          }), ee({
            type: "internal",
            names: [
              "\\let",
              "\\\\globallet"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t;
              const l = Di(e.gullet.popToken());
              e.gullet.consumeSpaces();
              const c = xu(e);
              return xi(e, l, c, r === "\\\\globallet"), {
                type: "internal",
                mode: e.mode
              };
            }
          }), ee({
            type: "internal",
            names: [
              "\\futurelet",
              "\\\\globalfuture"
              // can’t be entered directly
            ],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t;
              const l = Di(e.gullet.popToken()), c = e.gullet.popToken(), m = e.gullet.popToken();
              return xi(e, l, m, r === "\\\\globalfuture"), e.gullet.pushToken(m), e.gullet.pushToken(c), {
                type: "internal",
                mode: e.mode
              };
            }
          });
          const gn = function(t, e, r) {
            const l = ye.math[t] && ye.math[t].replace, c = _0(l || t, e, r);
            if (!c)
              throw new Error("Unsupported symbol " + t + " and font size " + e + ".");
            return c;
          }, jr = function(t, e, r, l) {
            const c = r.havingBaseStyle(e), m = L.makeSpan(l.concat(c.sizingClasses(r)), [t], r), b = c.sizeMultiplier / r.sizeMultiplier;
            return m.height *= b, m.depth *= b, m.maxFontSize = c.sizeMultiplier, m;
          }, vi = function(t, e, r) {
            const l = e.havingBaseStyle(r), c = (1 - e.sizeMultiplier / l.sizeMultiplier) * e.fontMetrics().axisHeight;
            t.classes.push("delimcenter"), t.style.top = Q(c), t.height -= c, t.depth += c;
          }, vu = function(t, e, r, l, c, m) {
            const b = L.makeSymbol(t, "Main-Regular", c, l), y = jr(b, e, l, m);
            return r && vi(y, l, e), y;
          }, Au = function(t, e, r, l) {
            return L.makeSymbol(t, "Size" + e + "-Regular", r, l);
          }, Ai = function(t, e, r, l, c, m) {
            const b = Au(t, e, c, l), y = jr(L.makeSpan(["delimsizing", "size" + e], [b], l), V.TEXT, l, m);
            return r && vi(y, l, V.TEXT), y;
          }, Xr = function(t, e, r) {
            let l;
            return e === "Size1-Regular" ? l = "delim-size1" : l = "delim-size4", {
              type: "elem",
              elem: L.makeSpan(["delimsizinginner", l], [L.makeSpan([], [L.makeSymbol(t, e, r)])])
            };
          }, Yr = function(t, e, r) {
            const l = Et["Size4-Regular"][t.charCodeAt(0)] ? Et["Size4-Regular"][t.charCodeAt(0)][4] : Et["Size1-Regular"][t.charCodeAt(0)][4], c = new Lt("inner", At(t, Math.round(1e3 * e))), m = new It([c], {
              width: Q(l),
              height: Q(e),
              // Override CSS rule `.katex svg { width: 100% }`
              style: "width:" + Q(l),
              viewBox: "0 0 " + 1e3 * l + " " + Math.round(1e3 * e),
              preserveAspectRatio: "xMinYMin"
            }), b = L.makeSvgSpan([], [m], r);
            return b.height = e, b.style.height = Q(e), b.style.width = Q(l), {
              type: "elem",
              elem: b
            };
          }, Zr = 8e-3, Qn = {
            type: "kern",
            size: -1 * Zr
          }, Su = ["|", "\\lvert", "\\rvert", "\\vert"], Eu = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Si = function(t, e, r, l, c, m) {
            let b, y, v, C, N = "", R = 0;
            b = v = C = t, y = null;
            let q = "Size1-Regular";
            t === "\\uparrow" ? v = C = "⏐" : t === "\\Uparrow" ? v = C = "‖" : t === "\\downarrow" ? b = v = "⏐" : t === "\\Downarrow" ? b = v = "‖" : t === "\\updownarrow" ? (b = "\\uparrow", v = "⏐", C = "\\downarrow") : t === "\\Updownarrow" ? (b = "\\Uparrow", v = "‖", C = "\\Downarrow") : U.contains(Su, t) ? (v = "∣", N = "vert", R = 333) : U.contains(Eu, t) ? (v = "∥", N = "doublevert", R = 556) : t === "[" || t === "\\lbrack" ? (b = "⎡", v = "⎢", C = "⎣", q = "Size4-Regular", N = "lbrack", R = 667) : t === "]" || t === "\\rbrack" ? (b = "⎤", v = "⎥", C = "⎦", q = "Size4-Regular", N = "rbrack", R = 667) : t === "\\lfloor" || t === "⌊" ? (v = b = "⎢", C = "⎣", q = "Size4-Regular", N = "lfloor", R = 667) : t === "\\lceil" || t === "⌈" ? (b = "⎡", v = C = "⎢", q = "Size4-Regular", N = "lceil", R = 667) : t === "\\rfloor" || t === "⌋" ? (v = b = "⎥", C = "⎦", q = "Size4-Regular", N = "rfloor", R = 667) : t === "\\rceil" || t === "⌉" ? (b = "⎤", v = C = "⎥", q = "Size4-Regular", N = "rceil", R = 667) : t === "(" || t === "\\lparen" ? (b = "⎛", v = "⎜", C = "⎝", q = "Size4-Regular", N = "lparen", R = 875) : t === ")" || t === "\\rparen" ? (b = "⎞", v = "⎟", C = "⎠", q = "Size4-Regular", N = "rparen", R = 875) : t === "\\{" || t === "\\lbrace" ? (b = "⎧", y = "⎨", C = "⎩", v = "⎪", q = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (b = "⎫", y = "⎬", C = "⎭", v = "⎪", q = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (b = "⎧", C = "⎩", v = "⎪", q = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (b = "⎫", C = "⎭", v = "⎪", q = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (b = "⎧", C = "⎭", v = "⎪", q = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (b = "⎫", C = "⎩", v = "⎪", q = "Size4-Regular");
            const Y = gn(b, q, c), se = Y.height + Y.depth, ae = gn(v, q, c), ke = ae.height + ae.depth, ge = gn(C, q, c), xe = ge.height + ge.depth;
            let Ce = 0, qe = 1;
            if (y !== null) {
              const Ye = gn(y, q, c);
              Ce = Ye.height + Ye.depth, qe = 2;
            }
            const ht = se + xe + Ce, nt = Math.max(0, Math.ceil((e - ht) / (qe * ke))), Ht = ht + nt * qe * ke;
            let tn = l.fontMetrics().axisHeight;
            r && (tn *= l.sizeMultiplier);
            const Se = Ht / 2 - tn, ze = [];
            if (N.length > 0) {
              const Ye = Ht - se - xe, Ve = Math.round(Ht * 1e3), Ut = K0(N, Math.round(Ye * 1e3)), $u = new Lt(N, Ut), gl = (R / 1e3).toFixed(3) + "em", bl = (Ve / 1e3).toFixed(3) + "em", e1 = new It([$u], {
                width: gl,
                height: bl,
                viewBox: "0 0 " + R + " " + Ve
              }), nr = L.makeSvgSpan([], [e1], l);
              nr.height = Ve / 1e3, nr.style.width = gl, nr.style.height = bl, ze.push({
                type: "elem",
                elem: nr
              });
            } else {
              if (ze.push(Xr(C, q, c)), ze.push(Qn), y === null) {
                const Ye = Ht - se - xe + 2 * Zr;
                ze.push(Yr(v, Ye, l));
              } else {
                const Ye = (Ht - se - xe - Ce) / 2 + 2 * Zr;
                ze.push(Yr(v, Ye, l)), ze.push(Qn), ze.push(Xr(y, q, c)), ze.push(Qn), ze.push(Yr(v, Ye, l));
              }
              ze.push(Qn), ze.push(Xr(b, q, c));
            }
            const Pe = l.havingBaseStyle(V.TEXT), Ue = L.makeVList({
              positionType: "bottom",
              positionData: Se,
              children: ze
            }, Pe);
            return jr(L.makeSpan(["delimsizing", "mult"], [Ue], Pe), V.TEXT, l, m);
          }, Kr = 80, Qr = 0.08, Jr = function(t, e, r, l, c) {
            const m = w0(t, l, r), b = new Lt(t, m), y = new It([b], {
              // Note: 1000:1 ratio of viewBox to document em width.
              width: "400em",
              height: Q(e),
              viewBox: "0 0 400000 " + r,
              preserveAspectRatio: "xMinYMin slice"
            });
            return L.makeSvgSpan(["hide-tail"], [y], c);
          }, Fu = function(t, e) {
            const r = e.havingBaseSizing(), l = Ci("\\surd", t * r.sizeMultiplier, Ti, r);
            let c = r.sizeMultiplier;
            const m = Math.max(0, e.minRuleThickness - e.fontMetrics().sqrtRuleThickness);
            let b, y = 0, v = 0, C = 0, N;
            return l.type === "small" ? (C = 1e3 + 1e3 * m + Kr, t < 1 ? c = 1 : t < 1.4 && (c = 0.7), y = (1 + m + Qr) / c, v = (1 + m) / c, b = Jr("sqrtMain", y, C, m, e), b.style.minWidth = "0.853em", N = 0.833 / c) : l.type === "large" ? (C = (1e3 + Kr) * bn[l.size], v = (bn[l.size] + m) / c, y = (bn[l.size] + m + Qr) / c, b = Jr("sqrtSize" + l.size, y, C, m, e), b.style.minWidth = "1.02em", N = 1 / c) : (y = t + m + Qr, v = t + m, C = Math.floor(1e3 * t + m) + Kr, b = Jr("sqrtTall", y, C, m, e), b.style.minWidth = "0.742em", N = 1.056), b.height = v, b.style.height = Q(y), {
              span: b,
              advanceWidth: N,
              // Calculate the actual line width.
              // This actually should depend on the chosen font -- e.g. \boldmath
              // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
              // have thicker rules.
              ruleWidth: (e.fontMetrics().sqrtRuleThickness + m) * c
            };
          }, Ei = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], Tu = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], Fi = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], bn = [0, 1.2, 1.8, 2.4, 3], Cu = function(t, e, r, l, c) {
            if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"), U.contains(Ei, t) || U.contains(Fi, t))
              return Ai(t, e, !1, r, l, c);
            if (U.contains(Tu, t))
              return Si(t, bn[e], !1, r, l, c);
            throw new u("Illegal delimiter: '" + t + "'");
          }, Mu = [{
            type: "small",
            style: V.SCRIPTSCRIPT
          }, {
            type: "small",
            style: V.SCRIPT
          }, {
            type: "small",
            style: V.TEXT
          }, {
            type: "large",
            size: 1
          }, {
            type: "large",
            size: 2
          }, {
            type: "large",
            size: 3
          }, {
            type: "large",
            size: 4
          }], zu = [{
            type: "small",
            style: V.SCRIPTSCRIPT
          }, {
            type: "small",
            style: V.SCRIPT
          }, {
            type: "small",
            style: V.TEXT
          }, {
            type: "stack"
          }], Ti = [{
            type: "small",
            style: V.SCRIPTSCRIPT
          }, {
            type: "small",
            style: V.SCRIPT
          }, {
            type: "small",
            style: V.TEXT
          }, {
            type: "large",
            size: 1
          }, {
            type: "large",
            size: 2
          }, {
            type: "large",
            size: 3
          }, {
            type: "large",
            size: 4
          }, {
            type: "stack"
          }], Bu = function(t) {
            if (t.type === "small")
              return "Main-Regular";
            if (t.type === "large")
              return "Size" + t.size + "-Regular";
            if (t.type === "stack")
              return "Size4-Regular";
            throw new Error("Add support for delim type '" + t.type + "' here.");
          }, Ci = function(t, e, r, l) {
            const c = Math.min(2, 3 - l.style.size);
            for (let m = c; m < r.length && r[m].type !== "stack"; m++) {
              const b = gn(t, Bu(r[m]), "math");
              let y = b.height + b.depth;
              if (r[m].type === "small") {
                const v = l.havingBaseStyle(r[m].style);
                y *= v.sizeMultiplier;
              }
              if (y > e)
                return r[m];
            }
            return r[r.length - 1];
          }, Mi = function(t, e, r, l, c, m) {
            t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle");
            let b;
            U.contains(Fi, t) ? b = Mu : U.contains(Ei, t) ? b = Ti : b = zu;
            const y = Ci(t, e, b, l);
            return y.type === "small" ? vu(t, y.style, r, l, c, m) : y.type === "large" ? Ai(t, y.size, r, l, c, m) : Si(t, e, r, l, c, m);
          };
          var v0 = {
            sqrtImage: Fu,
            sizedDelim: Cu,
            sizeToMaxHeight: bn,
            customSizedDelim: Mi,
            leftRightDelim: function(t, e, r, l, c, m) {
              const b = l.fontMetrics().axisHeight * l.sizeMultiplier, y = 901, v = 5 / l.fontMetrics().ptPerEm, C = Math.max(e - b, r + b), N = Math.max(
                // In real TeX, calculations are done using integral values which are
                // 65536 per pt, or 655360 per em. So, the division here truncates in
                // TeX but doesn't here, producing different results. If we wanted to
                // exactly match TeX's calculation, we could do
                //   Math.floor(655360 * maxDistFromAxis / 500) *
                //    delimiterFactor / 655360
                // (To see the difference, compare
                //    x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
                // in TeX and KaTeX)
                C / 500 * y,
                2 * C - v
              );
              return Mi(t, N, !0, l, c, m);
            }
          };
          const zi = {
            "\\bigl": {
              mclass: "mopen",
              size: 1
            },
            "\\Bigl": {
              mclass: "mopen",
              size: 2
            },
            "\\biggl": {
              mclass: "mopen",
              size: 3
            },
            "\\Biggl": {
              mclass: "mopen",
              size: 4
            },
            "\\bigr": {
              mclass: "mclose",
              size: 1
            },
            "\\Bigr": {
              mclass: "mclose",
              size: 2
            },
            "\\biggr": {
              mclass: "mclose",
              size: 3
            },
            "\\Biggr": {
              mclass: "mclose",
              size: 4
            },
            "\\bigm": {
              mclass: "mrel",
              size: 1
            },
            "\\Bigm": {
              mclass: "mrel",
              size: 2
            },
            "\\biggm": {
              mclass: "mrel",
              size: 3
            },
            "\\Biggm": {
              mclass: "mrel",
              size: 4
            },
            "\\big": {
              mclass: "mord",
              size: 1
            },
            "\\Big": {
              mclass: "mord",
              size: 2
            },
            "\\bigg": {
              mclass: "mord",
              size: 3
            },
            "\\Bigg": {
              mclass: "mord",
              size: 4
            }
          }, Nu = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
          function Jn(t, e) {
            const r = Yn(t);
            if (r && U.contains(Nu, r.text))
              return r;
            throw r ? new u("Invalid delimiter '" + r.text + "' after '" + e.funcName + "'", t) : new u("Invalid delimiter type '" + t.type + "'", t);
          }
          ee({
            type: "delimsizing",
            names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
            props: {
              numArgs: 1,
              argTypes: ["primitive"]
            },
            handler: (t, e) => {
              const r = Jn(e[0], t);
              return {
                type: "delimsizing",
                mode: t.parser.mode,
                size: zi[t.funcName].size,
                mclass: zi[t.funcName].mclass,
                delim: r.text
              };
            },
            htmlBuilder: (t, e) => t.delim === "." ? L.makeSpan([t.mclass]) : v0.sizedDelim(t.delim, t.size, e, t.mode, [t.mclass]),
            mathmlBuilder: (t) => {
              const e = [];
              t.delim !== "." && e.push(qt(t.delim, t.mode));
              const r = new Z.MathNode("mo", e);
              t.mclass === "mopen" || t.mclass === "mclose" ? r.setAttribute("fence", "true") : r.setAttribute("fence", "false"), r.setAttribute("stretchy", "true");
              const l = Q(v0.sizeToMaxHeight[t.size]);
              return r.setAttribute("minsize", l), r.setAttribute("maxsize", l), r;
            }
          });
          function Bi(t) {
            if (!t.body)
              throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
          }
          ee({
            type: "leftright-right",
            names: ["\\right"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (t, e) => {
              const r = t.parser.gullet.macros.get("\\current@color");
              if (r && typeof r != "string")
                throw new u("\\current@color set to non-string in \\right");
              return {
                type: "leftright-right",
                mode: t.parser.mode,
                delim: Jn(e[0], t).text,
                color: r
                // undefined if not set via \color
              };
            }
          }), ee({
            type: "leftright",
            names: ["\\left"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (t, e) => {
              const r = Jn(e[0], t), l = t.parser;
              ++l.leftrightDepth;
              const c = l.parseExpression(!1);
              --l.leftrightDepth, l.expect("\\right", !1);
              const m = me(l.parseFunction(), "leftright-right");
              return {
                type: "leftright",
                mode: l.mode,
                body: c,
                left: r.text,
                right: m.delim,
                rightColor: m.color
              };
            },
            htmlBuilder: (t, e) => {
              Bi(t);
              const r = tt(t.body, e, !0, ["mopen", "mclose"]);
              let l = 0, c = 0, m = !1;
              for (let v = 0; v < r.length; v++)
                r[v].isMiddle ? m = !0 : (l = Math.max(r[v].height, l), c = Math.max(r[v].depth, c));
              l *= e.sizeMultiplier, c *= e.sizeMultiplier;
              let b;
              if (t.left === "." ? b = mn(e, ["mopen"]) : b = v0.leftRightDelim(t.left, l, c, e, t.mode, ["mopen"]), r.unshift(b), m)
                for (let v = 1; v < r.length; v++) {
                  const N = r[v].isMiddle;
                  N && (r[v] = v0.leftRightDelim(N.delim, l, c, N.options, t.mode, []));
                }
              let y;
              if (t.right === ".")
                y = mn(e, ["mclose"]);
              else {
                const v = t.rightColor ? e.withColor(t.rightColor) : e;
                y = v0.leftRightDelim(t.right, l, c, v, t.mode, ["mclose"]);
              }
              return r.push(y), L.makeSpan(["minner"], r, e);
            },
            mathmlBuilder: (t, e) => {
              Bi(t);
              const r = yt(t.body, e);
              if (t.left !== ".") {
                const l = new Z.MathNode("mo", [qt(t.left, t.mode)]);
                l.setAttribute("fence", "true"), r.unshift(l);
              }
              if (t.right !== ".") {
                const l = new Z.MathNode("mo", [qt(t.right, t.mode)]);
                l.setAttribute("fence", "true"), t.rightColor && l.setAttribute("mathcolor", t.rightColor), r.push(l);
              }
              return Hr(r);
            }
          }), ee({
            type: "middle",
            names: ["\\middle"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (t, e) => {
              const r = Jn(e[0], t);
              if (!t.parser.leftrightDepth)
                throw new u("\\middle without preceding \\left", r);
              return {
                type: "middle",
                mode: t.parser.mode,
                delim: r.text
              };
            },
            htmlBuilder: (t, e) => {
              let r;
              if (t.delim === ".")
                r = mn(e, []);
              else {
                r = v0.sizedDelim(t.delim, 1, e, t.mode, []);
                const l = {
                  delim: t.delim,
                  options: e
                };
                r.isMiddle = l;
              }
              return r;
            },
            mathmlBuilder: (t, e) => {
              const r = t.delim === "\\vert" || t.delim === "|" ? qt("|", "text") : qt(t.delim, t.mode), l = new Z.MathNode("mo", [r]);
              return l.setAttribute("fence", "true"), l.setAttribute("lspace", "0.05em"), l.setAttribute("rspace", "0.05em"), l;
            }
          });
          const $r = (t, e) => {
            const r = L.wrapFragment(Ae(t.body, e), e), l = t.label.slice(1);
            let c = e.sizeMultiplier, m, b = 0;
            const y = U.isCharacterBox(t.body);
            if (l === "sout")
              m = L.makeSpan(["stretchy", "sout"]), m.height = e.fontMetrics().defaultRuleThickness / c, b = -0.5 * e.fontMetrics().xHeight;
            else if (l === "phase") {
              const C = Me({
                number: 0.6,
                unit: "pt"
              }, e), N = Me({
                number: 0.35,
                unit: "ex"
              }, e), R = e.havingBaseSizing();
              c = c / R.sizeMultiplier;
              const q = r.height + r.depth + C + N;
              r.style.paddingLeft = Q(q / 2 + C);
              const Y = Math.floor(1e3 * q * c), se = b0(Y), ae = new It([new Lt("phase", se)], {
                width: "400em",
                height: Q(Y / 1e3),
                viewBox: "0 0 400000 " + Y,
                preserveAspectRatio: "xMinYMin slice"
              });
              m = L.makeSvgSpan(["hide-tail"], [ae], e), m.style.height = Q(q), b = r.depth + C + N;
            } else {
              /cancel/.test(l) ? y || r.classes.push("cancel-pad") : l === "angl" ? r.classes.push("anglpad") : r.classes.push("boxpad");
              let C = 0, N = 0, R = 0;
              /box/.test(l) ? (R = Math.max(
                e.fontMetrics().fboxrule,
                // default
                e.minRuleThickness
                // User override.
              ), C = e.fontMetrics().fboxsep + (l === "colorbox" ? 0 : R), N = C) : l === "angl" ? (R = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), C = 4 * R, N = Math.max(0, 0.25 - r.depth)) : (C = y ? 0.2 : 0, N = C), m = x0.encloseSpan(r, l, C, N, e), /fbox|boxed|fcolorbox/.test(l) ? (m.style.borderStyle = "solid", m.style.borderWidth = Q(R)) : l === "angl" && R !== 0.049 && (m.style.borderTopWidth = Q(R), m.style.borderRightWidth = Q(R)), b = r.depth + N, t.backgroundColor && (m.style.backgroundColor = t.backgroundColor, t.borderColor && (m.style.borderColor = t.borderColor));
            }
            let v;
            if (t.backgroundColor)
              v = L.makeVList({
                positionType: "individualShift",
                children: [
                  // Put the color background behind inner;
                  {
                    type: "elem",
                    elem: m,
                    shift: b
                  },
                  {
                    type: "elem",
                    elem: r,
                    shift: 0
                  }
                ]
              }, e);
            else {
              const C = /cancel|phase/.test(l) ? ["svg-align"] : [];
              v = L.makeVList({
                positionType: "individualShift",
                children: [
                  // Write the \cancel stroke on top of inner.
                  {
                    type: "elem",
                    elem: r,
                    shift: 0
                  },
                  {
                    type: "elem",
                    elem: m,
                    shift: b,
                    wrapperClasses: C
                  }
                ]
              }, e);
            }
            return /cancel/.test(l) && (v.height = r.height, v.depth = r.depth), /cancel/.test(l) && !y ? L.makeSpan(["mord", "cancel-lap"], [v], e) : L.makeSpan(["mord"], [v], e);
          }, es = (t, e) => {
            let r = 0;
            const l = new Z.MathNode(t.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [Le(t.body, e)]);
            switch (t.label) {
              case "\\cancel":
                l.setAttribute("notation", "updiagonalstrike");
                break;
              case "\\bcancel":
                l.setAttribute("notation", "downdiagonalstrike");
                break;
              case "\\phase":
                l.setAttribute("notation", "phasorangle");
                break;
              case "\\sout":
                l.setAttribute("notation", "horizontalstrike");
                break;
              case "\\fbox":
                l.setAttribute("notation", "box");
                break;
              case "\\angl":
                l.setAttribute("notation", "actuarial");
                break;
              case "\\fcolorbox":
              case "\\colorbox":
                if (r = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, l.setAttribute("width", "+" + 2 * r + "pt"), l.setAttribute("height", "+" + 2 * r + "pt"), l.setAttribute("lspace", r + "pt"), l.setAttribute("voffset", r + "pt"), t.label === "\\fcolorbox") {
                  const c = Math.max(
                    e.fontMetrics().fboxrule,
                    // default
                    e.minRuleThickness
                    // user override
                  );
                  l.setAttribute("style", "border: " + c + "em solid " + String(t.borderColor));
                }
                break;
              case "\\xcancel":
                l.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
                break;
            }
            return t.backgroundColor && l.setAttribute("mathbackground", t.backgroundColor), l;
          };
          ee({
            type: "enclose",
            names: ["\\colorbox"],
            props: {
              numArgs: 2,
              allowedInText: !0,
              argTypes: ["color", "text"]
            },
            handler(t, e, r) {
              let {
                parser: l,
                funcName: c
              } = t;
              const m = me(e[0], "color-token").color, b = e[1];
              return {
                type: "enclose",
                mode: l.mode,
                label: c,
                backgroundColor: m,
                body: b
              };
            },
            htmlBuilder: $r,
            mathmlBuilder: es
          }), ee({
            type: "enclose",
            names: ["\\fcolorbox"],
            props: {
              numArgs: 3,
              allowedInText: !0,
              argTypes: ["color", "color", "text"]
            },
            handler(t, e, r) {
              let {
                parser: l,
                funcName: c
              } = t;
              const m = me(e[0], "color-token").color, b = me(e[1], "color-token").color, y = e[2];
              return {
                type: "enclose",
                mode: l.mode,
                label: c,
                backgroundColor: b,
                borderColor: m,
                body: y
              };
            },
            htmlBuilder: $r,
            mathmlBuilder: es
          }), ee({
            type: "enclose",
            names: ["\\fbox"],
            props: {
              numArgs: 1,
              argTypes: ["hbox"],
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "enclose",
                mode: r.mode,
                label: "\\fbox",
                body: e[0]
              };
            }
          }), ee({
            type: "enclose",
            names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "enclose",
                mode: r.mode,
                label: l,
                body: c
              };
            },
            htmlBuilder: $r,
            mathmlBuilder: es
          }), ee({
            type: "enclose",
            names: ["\\angl"],
            props: {
              numArgs: 1,
              argTypes: ["hbox"],
              allowedInText: !1
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "enclose",
                mode: r.mode,
                label: "\\angl",
                body: e[0]
              };
            }
          });
          const Ni = {};
          function i0(t) {
            let {
              type: e,
              names: r,
              props: l,
              handler: c,
              htmlBuilder: m,
              mathmlBuilder: b
            } = t;
            const y = {
              type: e,
              numArgs: l.numArgs || 0,
              allowedInText: !1,
              numOptionalArgs: 0,
              handler: c
            };
            for (let v = 0; v < r.length; ++v)
              Ni[r[v]] = y;
            m && (Vn[e] = m), b && (Wn[e] = b);
          }
          const Ri = {};
          function D(t, e) {
            Ri[t] = e;
          }
          class Tt {
            // The + prefix indicates that these fields aren't writeable
            // Lexer holding the input string.
            // Start offset, zero-based inclusive.
            // End offset, zero-based exclusive.
            constructor(e, r, l) {
              this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = r, this.end = l;
            }
            /**
             * Merges two `SourceLocation`s from location providers, given they are
             * provided in order of appearance.
             * - Returns the first one's location if only the first is provided.
             * - Returns a merged range of the first and the last if both are provided
             *   and their lexers match.
             * - Otherwise, returns null.
             */
            static range(e, r) {
              return r ? !e || !e.loc || !r.loc || e.loc.lexer !== r.loc.lexer ? null : new Tt(e.loc.lexer, e.loc.start, r.loc.end) : e && e.loc;
            }
          }
          class Pt {
            // don't expand the token
            // used in \noexpand
            constructor(e, r) {
              this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = r;
            }
            /**
             * Given a pair of tokens (this and endToken), compute a `Token` encompassing
             * the whole input range enclosed by these two.
             */
            range(e, r) {
              return new Pt(r, Tt.range(this, e));
            }
          }
          function Ii(t) {
            const e = [];
            t.consumeSpaces();
            let r = t.fetch().text;
            for (r === "\\relax" && (t.consume(), t.consumeSpaces(), r = t.fetch().text); r === "\\hline" || r === "\\hdashline"; )
              t.consume(), e.push(r === "\\hdashline"), t.consumeSpaces(), r = t.fetch().text;
            return e;
          }
          const $n = (t) => {
            if (!t.parser.settings.displayMode)
              throw new u("{" + t.envName + "} can be used only in display mode.");
          };
          function ts(t) {
            if (t.indexOf("ed") === -1)
              return t.indexOf("*") === -1;
          }
          function M0(t, e, r) {
            let {
              hskipBeforeAndAfter: l,
              addJot: c,
              cols: m,
              arraystretch: b,
              colSeparationType: y,
              autoTag: v,
              singleRow: C,
              emptySingleRow: N,
              maxNumCols: R,
              leqno: q
            } = e;
            if (t.gullet.beginGroup(), C || t.gullet.macros.set("\\cr", "\\\\\\relax"), !b) {
              const qe = t.gullet.expandMacroAsText("\\arraystretch");
              if (qe == null)
                b = 1;
              else if (b = parseFloat(qe), !b || b < 0)
                throw new u("Invalid \\arraystretch: " + qe);
            }
            t.gullet.beginGroup();
            let Y = [];
            const se = [Y], ae = [], ke = [], ge = v != null ? [] : void 0;
            function xe() {
              v && t.gullet.macros.set("\\@eqnsw", "1", !0);
            }
            function Ce() {
              ge && (t.gullet.macros.get("\\df@tag") ? (ge.push(t.subparse([new Pt("\\df@tag")])), t.gullet.macros.set("\\df@tag", void 0, !0)) : ge.push(!!v && t.gullet.macros.get("\\@eqnsw") === "1"));
            }
            for (xe(), ke.push(Ii(t)); ; ) {
              let qe = t.parseExpression(!1, C ? "\\end" : "\\\\");
              t.gullet.endGroup(), t.gullet.beginGroup(), qe = {
                type: "ordgroup",
                mode: t.mode,
                body: qe
              }, r && (qe = {
                type: "styling",
                mode: t.mode,
                style: r,
                body: [qe]
              }), Y.push(qe);
              const ht = t.fetch().text;
              if (ht === "&") {
                if (R && Y.length === R) {
                  if (C || y)
                    throw new u("Too many tab characters: &", t.nextToken);
                  t.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
                }
                t.consume();
              } else if (ht === "\\end") {
                Ce(), Y.length === 1 && qe.type === "styling" && qe.body[0].body.length === 0 && (se.length > 1 || !N) && se.pop(), ke.length < se.length + 1 && ke.push([]);
                break;
              } else if (ht === "\\\\") {
                t.consume();
                let nt;
                t.gullet.future().text !== " " && (nt = t.parseSizeGroup(!0)), ae.push(nt ? nt.value : null), Ce(), ke.push(Ii(t)), Y = [], se.push(Y), xe();
              } else
                throw new u("Expected & or \\\\ or \\cr or \\end", t.nextToken);
            }
            return t.gullet.endGroup(), t.gullet.endGroup(), {
              type: "array",
              mode: t.mode,
              addJot: c,
              arraystretch: b,
              body: se,
              cols: m,
              rowGaps: ae,
              hskipBeforeAndAfter: l,
              hLinesBeforeRow: ke,
              colSeparationType: y,
              tags: ge,
              leqno: q
            };
          }
          function ns(t) {
            return t.slice(0, 1) === "d" ? "display" : "text";
          }
          const l0 = function(t, e) {
            let r, l;
            const c = t.body.length, m = t.hLinesBeforeRow;
            let b = 0, y = new Array(c);
            const v = [], C = Math.max(
              // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
              e.fontMetrics().arrayRuleWidth,
              e.minRuleThickness
              // User override.
            ), N = 1 / e.fontMetrics().ptPerEm;
            let R = 5 * N;
            t.colSeparationType && t.colSeparationType === "small" && (R = 0.2778 * (e.havingStyle(V.SCRIPT).sizeMultiplier / e.sizeMultiplier));
            const q = t.colSeparationType === "CD" ? Me({
              number: 3,
              unit: "ex"
            }, e) : 12 * N, Y = 3 * N, se = t.arraystretch * q, ae = 0.7 * se, ke = 0.3 * se;
            let ge = 0;
            function xe(Se) {
              for (let ze = 0; ze < Se.length; ++ze)
                ze > 0 && (ge += 0.25), v.push({
                  pos: ge,
                  isDashed: Se[ze]
                });
            }
            for (xe(m[0]), r = 0; r < t.body.length; ++r) {
              const Se = t.body[r];
              let ze = ae, Pe = ke;
              b < Se.length && (b = Se.length);
              const Ue = new Array(Se.length);
              for (l = 0; l < Se.length; ++l) {
                const Ut = Ae(Se[l], e);
                Pe < Ut.depth && (Pe = Ut.depth), ze < Ut.height && (ze = Ut.height), Ue[l] = Ut;
              }
              const Ye = t.rowGaps[r];
              let Ve = 0;
              Ye && (Ve = Me(Ye, e), Ve > 0 && (Ve += ke, Pe < Ve && (Pe = Ve), Ve = 0)), t.addJot && (Pe += Y), Ue.height = ze, Ue.depth = Pe, ge += ze, Ue.pos = ge, ge += Pe + Ve, y[r] = Ue, xe(m[r + 1]);
            }
            const Ce = ge / 2 + e.fontMetrics().axisHeight, qe = t.cols || [], ht = [];
            let nt, Ht;
            const tn = [];
            if (t.tags && t.tags.some((Se) => Se))
              for (r = 0; r < c; ++r) {
                const Se = y[r], ze = Se.pos - Ce, Pe = t.tags[r];
                let Ue;
                Pe === !0 ? Ue = L.makeSpan(["eqn-num"], [], e) : Pe === !1 ? Ue = L.makeSpan([], [], e) : Ue = L.makeSpan([], tt(Pe, e, !0), e), Ue.depth = Se.depth, Ue.height = Se.height, tn.push({
                  type: "elem",
                  elem: Ue,
                  shift: ze
                });
              }
            for (
              l = 0, Ht = 0;
              // Continue while either there are more columns or more column
              // descriptions, so trailing separators don't get lost.
              l < b || Ht < qe.length;
              ++l, ++Ht
            ) {
              let Se = qe[Ht] || {}, ze = !0;
              for (; Se.type === "separator"; ) {
                if (ze || (nt = L.makeSpan(["arraycolsep"], []), nt.style.width = Q(e.fontMetrics().doubleRuleSep), ht.push(nt)), Se.separator === "|" || Se.separator === ":") {
                  const Ye = Se.separator === "|" ? "solid" : "dashed", Ve = L.makeSpan(["vertical-separator"], [], e);
                  Ve.style.height = Q(ge), Ve.style.borderRightWidth = Q(C), Ve.style.borderRightStyle = Ye, Ve.style.margin = "0 " + Q(-C / 2);
                  const Ut = ge - Ce;
                  Ut && (Ve.style.verticalAlign = Q(-Ut)), ht.push(Ve);
                } else
                  throw new u("Invalid separator type: " + Se.separator);
                Ht++, Se = qe[Ht] || {}, ze = !1;
              }
              if (l >= b)
                continue;
              let Pe;
              (l > 0 || t.hskipBeforeAndAfter) && (Pe = U.deflt(Se.pregap, R), Pe !== 0 && (nt = L.makeSpan(["arraycolsep"], []), nt.style.width = Q(Pe), ht.push(nt)));
              let Ue = [];
              for (r = 0; r < c; ++r) {
                const Ye = y[r], Ve = Ye[l];
                if (!Ve)
                  continue;
                const Ut = Ye.pos - Ce;
                Ve.depth = Ye.depth, Ve.height = Ye.height, Ue.push({
                  type: "elem",
                  elem: Ve,
                  shift: Ut
                });
              }
              Ue = L.makeVList({
                positionType: "individualShift",
                children: Ue
              }, e), Ue = L.makeSpan(["col-align-" + (Se.align || "c")], [Ue]), ht.push(Ue), (l < b - 1 || t.hskipBeforeAndAfter) && (Pe = U.deflt(Se.postgap, R), Pe !== 0 && (nt = L.makeSpan(["arraycolsep"], []), nt.style.width = Q(Pe), ht.push(nt)));
            }
            if (y = L.makeSpan(["mtable"], ht), v.length > 0) {
              const Se = L.makeLineSpan("hline", e, C), ze = L.makeLineSpan("hdashline", e, C), Pe = [{
                type: "elem",
                elem: y,
                shift: 0
              }];
              for (; v.length > 0; ) {
                const Ue = v.pop(), Ye = Ue.pos - Ce;
                Ue.isDashed ? Pe.push({
                  type: "elem",
                  elem: ze,
                  shift: Ye
                }) : Pe.push({
                  type: "elem",
                  elem: Se,
                  shift: Ye
                });
              }
              y = L.makeVList({
                positionType: "individualShift",
                children: Pe
              }, e);
            }
            if (tn.length === 0)
              return L.makeSpan(["mord"], [y], e);
            {
              let Se = L.makeVList({
                positionType: "individualShift",
                children: tn
              }, e);
              return Se = L.makeSpan(["tag"], [Se], e), L.makeFragment([y, Se]);
            }
          }, Ru = {
            c: "center ",
            l: "left ",
            r: "right "
          }, a0 = function(t, e) {
            const r = [], l = new Z.MathNode("mtd", [], ["mtr-glue"]), c = new Z.MathNode("mtd", [], ["mml-eqn-num"]);
            for (let R = 0; R < t.body.length; R++) {
              const q = t.body[R], Y = [];
              for (let se = 0; se < q.length; se++)
                Y.push(new Z.MathNode("mtd", [Le(q[se], e)]));
              t.tags && t.tags[R] && (Y.unshift(l), Y.push(l), t.leqno ? Y.unshift(c) : Y.push(c)), r.push(new Z.MathNode("mtr", Y));
            }
            let m = new Z.MathNode("mtable", r);
            const b = t.arraystretch === 0.5 ? 0.1 : 0.16 + t.arraystretch - 1 + (t.addJot ? 0.09 : 0);
            m.setAttribute("rowspacing", Q(b));
            let y = "", v = "";
            if (t.cols && t.cols.length > 0) {
              const R = t.cols;
              let q = "", Y = !1, se = 0, ae = R.length;
              R[0].type === "separator" && (y += "top ", se = 1), R[R.length - 1].type === "separator" && (y += "bottom ", ae -= 1);
              for (let ke = se; ke < ae; ke++)
                R[ke].type === "align" ? (v += Ru[R[ke].align], Y && (q += "none "), Y = !0) : R[ke].type === "separator" && Y && (q += R[ke].separator === "|" ? "solid " : "dashed ", Y = !1);
              m.setAttribute("columnalign", v.trim()), /[sd]/.test(q) && m.setAttribute("columnlines", q.trim());
            }
            if (t.colSeparationType === "align") {
              const R = t.cols || [];
              let q = "";
              for (let Y = 1; Y < R.length; Y++)
                q += Y % 2 ? "0em " : "1em ";
              m.setAttribute("columnspacing", q.trim());
            } else
              t.colSeparationType === "alignat" || t.colSeparationType === "gather" ? m.setAttribute("columnspacing", "0em") : t.colSeparationType === "small" ? m.setAttribute("columnspacing", "0.2778em") : t.colSeparationType === "CD" ? m.setAttribute("columnspacing", "0.5em") : m.setAttribute("columnspacing", "1em");
            let C = "";
            const N = t.hLinesBeforeRow;
            y += N[0].length > 0 ? "left " : "", y += N[N.length - 1].length > 0 ? "right " : "";
            for (let R = 1; R < N.length - 1; R++)
              C += N[R].length === 0 ? "none " : N[R][0] ? "dashed " : "solid ";
            return /[sd]/.test(C) && m.setAttribute("rowlines", C.trim()), y !== "" && (m = new Z.MathNode("menclose", [m]), m.setAttribute("notation", y.trim())), t.arraystretch && t.arraystretch < 1 && (m = new Z.MathNode("mstyle", [m]), m.setAttribute("scriptlevel", "1")), m;
          }, Li = function(t, e) {
            t.envName.indexOf("ed") === -1 && $n(t);
            const r = [], l = t.envName.indexOf("at") > -1 ? "alignat" : "align", c = t.envName === "split", m = M0(t.parser, {
              cols: r,
              addJot: !0,
              autoTag: c ? void 0 : ts(t.envName),
              emptySingleRow: !0,
              colSeparationType: l,
              maxNumCols: c ? 2 : void 0,
              leqno: t.parser.settings.leqno
            }, "display");
            let b, y = 0;
            const v = {
              type: "ordgroup",
              mode: t.mode,
              body: []
            };
            if (e[0] && e[0].type === "ordgroup") {
              let N = "";
              for (let R = 0; R < e[0].body.length; R++) {
                const q = me(e[0].body[R], "textord");
                N += q.text;
              }
              b = Number(N), y = b * 2;
            }
            const C = !y;
            m.body.forEach(function(N) {
              for (let R = 1; R < N.length; R += 2) {
                const q = me(N[R], "styling");
                me(q.body[0], "ordgroup").body.unshift(v);
              }
              if (C)
                y < N.length && (y = N.length);
              else {
                const R = N.length / 2;
                if (b < R)
                  throw new u("Too many math in a row: " + ("expected " + b + ", but got " + R), N[0]);
              }
            });
            for (let N = 0; N < y; ++N) {
              let R = "r", q = 0;
              N % 2 === 1 ? R = "l" : N > 0 && C && (q = 1), r[N] = {
                type: "align",
                align: R,
                pregap: q,
                postgap: 0
              };
            }
            return m.colSeparationType = C ? "align" : "alignat", m;
          };
          i0({
            type: "array",
            names: ["array", "darray"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              const c = (Yn(e[0]) ? [e[0]] : me(e[0], "ordgroup").body).map(function(b) {
                const v = Gr(b).text;
                if ("lcr".indexOf(v) !== -1)
                  return {
                    type: "align",
                    align: v
                  };
                if (v === "|")
                  return {
                    type: "separator",
                    separator: "|"
                  };
                if (v === ":")
                  return {
                    type: "separator",
                    separator: ":"
                  };
                throw new u("Unknown column alignment: " + v, b);
              }), m = {
                cols: c,
                hskipBeforeAndAfter: !0,
                // \@preamble in lttab.dtx
                maxNumCols: c.length
              };
              return M0(t.parser, m, ns(t.envName));
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
            props: {
              numArgs: 0
            },
            handler(t) {
              const e = {
                matrix: null,
                pmatrix: ["(", ")"],
                bmatrix: ["[", "]"],
                Bmatrix: ["\\{", "\\}"],
                vmatrix: ["|", "|"],
                Vmatrix: ["\\Vert", "\\Vert"]
              }[t.envName.replace("*", "")];
              let r = "c";
              const l = {
                hskipBeforeAndAfter: !1,
                cols: [{
                  type: "align",
                  align: r
                }]
              };
              if (t.envName.charAt(t.envName.length - 1) === "*") {
                const b = t.parser;
                if (b.consumeSpaces(), b.fetch().text === "[") {
                  if (b.consume(), b.consumeSpaces(), r = b.fetch().text, "lcr".indexOf(r) === -1)
                    throw new u("Expected l or c or r", b.nextToken);
                  b.consume(), b.consumeSpaces(), b.expect("]"), b.consume(), l.cols = [{
                    type: "align",
                    align: r
                  }];
                }
              }
              const c = M0(t.parser, l, ns(t.envName)), m = Math.max(0, ...c.body.map((b) => b.length));
              return c.cols = new Array(m).fill({
                type: "align",
                align: r
              }), e ? {
                type: "leftright",
                mode: t.mode,
                body: [c],
                left: e[0],
                right: e[1],
                rightColor: void 0
                // \right uninfluenced by \color in array
              } : c;
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["smallmatrix"],
            props: {
              numArgs: 0
            },
            handler(t) {
              const e = {
                arraystretch: 0.5
              }, r = M0(t.parser, e, "script");
              return r.colSeparationType = "small", r;
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["subarray"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              const c = (Yn(e[0]) ? [e[0]] : me(e[0], "ordgroup").body).map(function(b) {
                const v = Gr(b).text;
                if ("lc".indexOf(v) !== -1)
                  return {
                    type: "align",
                    align: v
                  };
                throw new u("Unknown column alignment: " + v, b);
              });
              if (c.length > 1)
                throw new u("{subarray} can contain only one column");
              let m = {
                cols: c,
                hskipBeforeAndAfter: !1,
                arraystretch: 0.5
              };
              if (m = M0(t.parser, m, "script"), m.body.length > 0 && m.body[0].length > 1)
                throw new u("{subarray} can contain only one column");
              return m;
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["cases", "dcases", "rcases", "drcases"],
            props: {
              numArgs: 0
            },
            handler(t) {
              const e = {
                arraystretch: 1.2,
                cols: [{
                  type: "align",
                  align: "l",
                  pregap: 0,
                  // TODO(kevinb) get the current style.
                  // For now we use the metrics for TEXT style which is what we were
                  // doing before.  Before attempting to get the current style we
                  // should look at TeX's behavior especially for \over and matrices.
                  postgap: 1
                  /* 1em quad */
                }, {
                  type: "align",
                  align: "l",
                  pregap: 0,
                  postgap: 0
                }]
              }, r = M0(t.parser, e, ns(t.envName));
              return {
                type: "leftright",
                mode: t.mode,
                body: [r],
                left: t.envName.indexOf("r") > -1 ? "." : "\\{",
                right: t.envName.indexOf("r") > -1 ? "\\}" : ".",
                rightColor: void 0
              };
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["align", "align*", "aligned", "split"],
            props: {
              numArgs: 0
            },
            handler: Li,
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["gathered", "gather", "gather*"],
            props: {
              numArgs: 0
            },
            handler(t) {
              U.contains(["gather", "gather*"], t.envName) && $n(t);
              const e = {
                cols: [{
                  type: "align",
                  align: "c"
                }],
                addJot: !0,
                colSeparationType: "gather",
                autoTag: ts(t.envName),
                emptySingleRow: !0,
                leqno: t.parser.settings.leqno
              };
              return M0(t.parser, e, "display");
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["alignat", "alignat*", "alignedat"],
            props: {
              numArgs: 1
            },
            handler: Li,
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["equation", "equation*"],
            props: {
              numArgs: 0
            },
            handler(t) {
              $n(t);
              const e = {
                autoTag: ts(t.envName),
                emptySingleRow: !0,
                singleRow: !0,
                maxNumCols: 1,
                leqno: t.parser.settings.leqno
              };
              return M0(t.parser, e, "display");
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), i0({
            type: "array",
            names: ["CD"],
            props: {
              numArgs: 0
            },
            handler(t) {
              return $n(t), Du(t.parser);
            },
            htmlBuilder: l0,
            mathmlBuilder: a0
          }), D("\\nonumber", "\\gdef\\@eqnsw{0}"), D("\\notag", "\\nonumber"), ee({
            type: "text",
            // Doesn't matter what this is.
            names: ["\\hline", "\\hdashline"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !0
            },
            handler(t, e) {
              throw new u(t.funcName + " valid only within array environment");
            }
          });
          var Oi = Ni;
          ee({
            type: "environment",
            names: ["\\begin", "\\end"],
            props: {
              numArgs: 1,
              argTypes: ["text"]
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              if (c.type !== "ordgroup")
                throw new u("Invalid environment name", c);
              let m = "";
              for (let b = 0; b < c.body.length; ++b)
                m += me(c.body[b], "textord").text;
              if (l === "\\begin") {
                if (!Oi.hasOwnProperty(m))
                  throw new u("No such environment: " + m, c);
                const b = Oi[m], {
                  args: y,
                  optArgs: v
                } = r.parseArguments("\\begin{" + m + "}", b), C = {
                  mode: r.mode,
                  envName: m,
                  parser: r
                }, N = b.handler(C, y, v);
                r.expect("\\end", !1);
                const R = r.nextToken, q = me(r.parseFunction(), "environment");
                if (q.name !== m)
                  throw new u("Mismatch: \\begin{" + m + "} matched by \\end{" + q.name + "}", R);
                return N;
              }
              return {
                type: "environment",
                mode: r.mode,
                name: m,
                nameGroup: c
              };
            }
          });
          const qi = (t, e) => {
            const r = t.font, l = e.withFont(r);
            return Ae(t.body, l);
          }, Pi = (t, e) => {
            const r = t.font, l = e.withFont(r);
            return Le(t.body, l);
          }, Hi = {
            "\\Bbb": "\\mathbb",
            "\\bold": "\\mathbf",
            "\\frak": "\\mathfrak",
            "\\bm": "\\boldsymbol"
          };
          ee({
            type: "font",
            names: [
              // styles, except \boldsymbol defined below
              "\\mathrm",
              "\\mathit",
              "\\mathbf",
              "\\mathnormal",
              // families
              "\\mathbb",
              "\\mathcal",
              "\\mathfrak",
              "\\mathscr",
              "\\mathsf",
              "\\mathtt",
              // aliases, except \bm defined below
              "\\Bbb",
              "\\bold",
              "\\frak"
            ],
            props: {
              numArgs: 1,
              allowedInArgument: !0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = jn(e[0]);
              let m = l;
              return m in Hi && (m = Hi[m]), {
                type: "font",
                mode: r.mode,
                font: m.slice(1),
                body: c
              };
            },
            htmlBuilder: qi,
            mathmlBuilder: Pi
          }), ee({
            type: "mclass",
            names: ["\\boldsymbol", "\\bm"],
            props: {
              numArgs: 1
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[0], c = U.isCharacterBox(l);
              return {
                type: "mclass",
                mode: r.mode,
                mclass: Kn(l),
                body: [{
                  type: "font",
                  mode: r.mode,
                  font: "boldsymbol",
                  body: l
                }],
                isCharacterBox: c
              };
            }
          }), ee({
            type: "font",
            names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l,
                breakOnTokenText: c
              } = t;
              const {
                mode: m
              } = r, b = r.parseExpression(!0, c), y = "math" + l.slice(1);
              return {
                type: "font",
                mode: m,
                font: y,
                body: {
                  type: "ordgroup",
                  mode: r.mode,
                  body: b
                }
              };
            },
            htmlBuilder: qi,
            mathmlBuilder: Pi
          });
          const Ui = (t, e) => {
            let r = e;
            return t === "display" ? r = r.id >= V.SCRIPT.id ? r.text() : V.DISPLAY : t === "text" && r.size === V.DISPLAY.size ? r = V.TEXT : t === "script" ? r = V.SCRIPT : t === "scriptscript" && (r = V.SCRIPTSCRIPT), r;
          }, rs = (t, e) => {
            const r = Ui(t.size, e.style), l = r.fracNum(), c = r.fracDen();
            let m;
            m = e.havingStyle(l);
            const b = Ae(t.numer, m, e);
            if (t.continued) {
              const xe = 8.5 / e.fontMetrics().ptPerEm, Ce = 3.5 / e.fontMetrics().ptPerEm;
              b.height = b.height < xe ? xe : b.height, b.depth = b.depth < Ce ? Ce : b.depth;
            }
            m = e.havingStyle(c);
            const y = Ae(t.denom, m, e);
            let v, C, N;
            t.hasBarLine ? (t.barSize ? (C = Me(t.barSize, e), v = L.makeLineSpan("frac-line", e, C)) : v = L.makeLineSpan("frac-line", e), C = v.height, N = v.height) : (v = null, C = 0, N = e.fontMetrics().defaultRuleThickness);
            let R, q, Y;
            r.size === V.DISPLAY.size || t.size === "display" ? (R = e.fontMetrics().num1, C > 0 ? q = 3 * N : q = 7 * N, Y = e.fontMetrics().denom1) : (C > 0 ? (R = e.fontMetrics().num2, q = N) : (R = e.fontMetrics().num3, q = 3 * N), Y = e.fontMetrics().denom2);
            let se;
            if (v) {
              const xe = e.fontMetrics().axisHeight;
              R - b.depth - (xe + 0.5 * C) < q && (R += q - (R - b.depth - (xe + 0.5 * C))), xe - 0.5 * C - (y.height - Y) < q && (Y += q - (xe - 0.5 * C - (y.height - Y)));
              const Ce = -(xe - 0.5 * C);
              se = L.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: y,
                  shift: Y
                }, {
                  type: "elem",
                  elem: v,
                  shift: Ce
                }, {
                  type: "elem",
                  elem: b,
                  shift: -R
                }]
              }, e);
            } else {
              const xe = R - b.depth - (y.height - Y);
              xe < q && (R += 0.5 * (q - xe), Y += 0.5 * (q - xe)), se = L.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: y,
                  shift: Y
                }, {
                  type: "elem",
                  elem: b,
                  shift: -R
                }]
              }, e);
            }
            m = e.havingStyle(r), se.height *= m.sizeMultiplier / e.sizeMultiplier, se.depth *= m.sizeMultiplier / e.sizeMultiplier;
            let ae;
            r.size === V.DISPLAY.size ? ae = e.fontMetrics().delim1 : r.size === V.SCRIPTSCRIPT.size ? ae = e.havingStyle(V.SCRIPT).fontMetrics().delim2 : ae = e.fontMetrics().delim2;
            let ke, ge;
            return t.leftDelim == null ? ke = mn(e, ["mopen"]) : ke = v0.customSizedDelim(t.leftDelim, ae, !0, e.havingStyle(r), t.mode, ["mopen"]), t.continued ? ge = L.makeSpan([]) : t.rightDelim == null ? ge = mn(e, ["mclose"]) : ge = v0.customSizedDelim(t.rightDelim, ae, !0, e.havingStyle(r), t.mode, ["mclose"]), L.makeSpan(["mord"].concat(m.sizingClasses(e)), [ke, L.makeSpan(["mfrac"], [se]), ge], e);
          }, ss = (t, e) => {
            let r = new Z.MathNode("mfrac", [Le(t.numer, e), Le(t.denom, e)]);
            if (!t.hasBarLine)
              r.setAttribute("linethickness", "0px");
            else if (t.barSize) {
              const c = Me(t.barSize, e);
              r.setAttribute("linethickness", Q(c));
            }
            const l = Ui(t.size, e.style);
            if (l.size !== e.style.size) {
              r = new Z.MathNode("mstyle", [r]);
              const c = l.size === V.DISPLAY.size ? "true" : "false";
              r.setAttribute("displaystyle", c), r.setAttribute("scriptlevel", "0");
            }
            if (t.leftDelim != null || t.rightDelim != null) {
              const c = [];
              if (t.leftDelim != null) {
                const m = new Z.MathNode("mo", [new Z.TextNode(t.leftDelim.replace("\\", ""))]);
                m.setAttribute("fence", "true"), c.push(m);
              }
              if (c.push(r), t.rightDelim != null) {
                const m = new Z.MathNode("mo", [new Z.TextNode(t.rightDelim.replace("\\", ""))]);
                m.setAttribute("fence", "true"), c.push(m);
              }
              return Hr(c);
            }
            return r;
          };
          ee({
            type: "genfrac",
            names: [
              "\\dfrac",
              "\\frac",
              "\\tfrac",
              "\\dbinom",
              "\\binom",
              "\\tbinom",
              "\\\\atopfrac",
              // can’t be entered directly
              "\\\\bracefrac",
              "\\\\brackfrac"
              // ditto
            ],
            props: {
              numArgs: 2,
              allowedInArgument: !0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0], m = e[1];
              let b, y = null, v = null, C = "auto";
              switch (l) {
                case "\\dfrac":
                case "\\frac":
                case "\\tfrac":
                  b = !0;
                  break;
                case "\\\\atopfrac":
                  b = !1;
                  break;
                case "\\dbinom":
                case "\\binom":
                case "\\tbinom":
                  b = !1, y = "(", v = ")";
                  break;
                case "\\\\bracefrac":
                  b = !1, y = "\\{", v = "\\}";
                  break;
                case "\\\\brackfrac":
                  b = !1, y = "[", v = "]";
                  break;
                default:
                  throw new Error("Unrecognized genfrac command");
              }
              switch (l) {
                case "\\dfrac":
                case "\\dbinom":
                  C = "display";
                  break;
                case "\\tfrac":
                case "\\tbinom":
                  C = "text";
                  break;
              }
              return {
                type: "genfrac",
                mode: r.mode,
                continued: !1,
                numer: c,
                denom: m,
                hasBarLine: b,
                leftDelim: y,
                rightDelim: v,
                size: C,
                barSize: null
              };
            },
            htmlBuilder: rs,
            mathmlBuilder: ss
          }), ee({
            type: "genfrac",
            names: ["\\cfrac"],
            props: {
              numArgs: 2
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0], m = e[1];
              return {
                type: "genfrac",
                mode: r.mode,
                continued: !0,
                numer: c,
                denom: m,
                hasBarLine: !0,
                leftDelim: null,
                rightDelim: null,
                size: "display",
                barSize: null
              };
            }
          }), ee({
            type: "infix",
            names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
            props: {
              numArgs: 0,
              infix: !0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r,
                token: l
              } = t, c;
              switch (r) {
                case "\\over":
                  c = "\\frac";
                  break;
                case "\\choose":
                  c = "\\binom";
                  break;
                case "\\atop":
                  c = "\\\\atopfrac";
                  break;
                case "\\brace":
                  c = "\\\\bracefrac";
                  break;
                case "\\brack":
                  c = "\\\\brackfrac";
                  break;
                default:
                  throw new Error("Unrecognized infix genfrac command");
              }
              return {
                type: "infix",
                mode: e.mode,
                replaceWith: c,
                token: l
              };
            }
          });
          const Gi = ["display", "text", "script", "scriptscript"], Vi = function(t) {
            let e = null;
            return t.length > 0 && (e = t, e = e === "." ? null : e), e;
          };
          ee({
            type: "genfrac",
            names: ["\\genfrac"],
            props: {
              numArgs: 6,
              allowedInArgument: !0,
              argTypes: ["math", "math", "size", "text", "math", "math"]
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              const l = e[4], c = e[5], m = jn(e[0]), b = m.type === "atom" && m.family === "open" ? Vi(m.text) : null, y = jn(e[1]), v = y.type === "atom" && y.family === "close" ? Vi(y.text) : null, C = me(e[2], "size");
              let N, R = null;
              C.isBlank ? N = !0 : (R = C.value, N = R.number > 0);
              let q = "auto", Y = e[3];
              if (Y.type === "ordgroup") {
                if (Y.body.length > 0) {
                  const se = me(Y.body[0], "textord");
                  q = Gi[Number(se.text)];
                }
              } else
                Y = me(Y, "textord"), q = Gi[Number(Y.text)];
              return {
                type: "genfrac",
                mode: r.mode,
                numer: l,
                denom: c,
                continued: !1,
                hasBarLine: N,
                barSize: R,
                leftDelim: b,
                rightDelim: v,
                size: q
              };
            },
            htmlBuilder: rs,
            mathmlBuilder: ss
          }), ee({
            type: "infix",
            names: ["\\above"],
            props: {
              numArgs: 1,
              argTypes: ["size"],
              infix: !0
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l,
                token: c
              } = t;
              return {
                type: "infix",
                mode: r.mode,
                replaceWith: "\\\\abovefrac",
                size: me(e[0], "size").value,
                token: c
              };
            }
          }), ee({
            type: "genfrac",
            names: ["\\\\abovefrac"],
            props: {
              numArgs: 3,
              argTypes: ["math", "size", "math"]
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0], m = j(me(e[1], "infix").size), b = e[2], y = m.number > 0;
              return {
                type: "genfrac",
                mode: r.mode,
                numer: c,
                denom: b,
                continued: !1,
                hasBarLine: y,
                barSize: m,
                leftDelim: null,
                rightDelim: null,
                size: "auto"
              };
            },
            htmlBuilder: rs,
            mathmlBuilder: ss
          });
          const Wi = (t, e) => {
            const r = e.style;
            let l, c;
            t.type === "supsub" ? (l = t.sup ? Ae(t.sup, e.havingStyle(r.sup()), e) : Ae(t.sub, e.havingStyle(r.sub()), e), c = me(t.base, "horizBrace")) : c = me(t, "horizBrace");
            const m = Ae(c.base, e.havingBaseStyle(V.DISPLAY)), b = x0.svgSpan(c, e);
            let y;
            if (c.isOver ? (y = L.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: m
              }, {
                type: "kern",
                size: 0.1
              }, {
                type: "elem",
                elem: b
              }]
            }, e), y.children[0].children[0].children[1].classes.push("svg-align")) : (y = L.makeVList({
              positionType: "bottom",
              positionData: m.depth + 0.1 + b.height,
              children: [{
                type: "elem",
                elem: b
              }, {
                type: "kern",
                size: 0.1
              }, {
                type: "elem",
                elem: m
              }]
            }, e), y.children[0].children[0].children[0].classes.push("svg-align")), l) {
              const v = L.makeSpan(["mord", c.isOver ? "mover" : "munder"], [y], e);
              c.isOver ? y = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: v
                }, {
                  type: "kern",
                  size: 0.2
                }, {
                  type: "elem",
                  elem: l
                }]
              }, e) : y = L.makeVList({
                positionType: "bottom",
                positionData: v.depth + 0.2 + l.height + l.depth,
                children: [{
                  type: "elem",
                  elem: l
                }, {
                  type: "kern",
                  size: 0.2
                }, {
                  type: "elem",
                  elem: v
                }]
              }, e);
            }
            return L.makeSpan(["mord", c.isOver ? "mover" : "munder"], [y], e);
          };
          ee({
            type: "horizBrace",
            names: ["\\overbrace", "\\underbrace"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              return {
                type: "horizBrace",
                mode: r.mode,
                label: l,
                isOver: /^\\over/.test(l),
                base: e[0]
              };
            },
            htmlBuilder: Wi,
            mathmlBuilder: (t, e) => {
              const r = x0.mathMLnode(t.label);
              return new Z.MathNode(t.isOver ? "mover" : "munder", [Le(t.base, e), r]);
            }
          }), ee({
            type: "href",
            names: ["\\href"],
            props: {
              numArgs: 2,
              argTypes: ["url", "original"],
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[1], c = me(e[0], "url").url;
              return r.settings.isTrusted({
                command: "\\href",
                url: c
              }) ? {
                type: "href",
                mode: r.mode,
                href: c,
                body: Ze(l)
              } : r.formatUnsupportedCmd("\\href");
            },
            htmlBuilder: (t, e) => {
              const r = tt(t.body, e, !1);
              return L.makeAnchor(t.href, [], r, e);
            },
            mathmlBuilder: (t, e) => {
              let r = C0(t.body, e);
              return r instanceof Ot || (r = new Ot("mrow", [r])), r.setAttribute("href", t.href), r;
            }
          }), ee({
            type: "href",
            names: ["\\url"],
            props: {
              numArgs: 1,
              argTypes: ["url"],
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = me(e[0], "url").url;
              if (!r.settings.isTrusted({
                command: "\\url",
                url: l
              }))
                return r.formatUnsupportedCmd("\\url");
              const c = [];
              for (let b = 0; b < l.length; b++) {
                let y = l[b];
                y === "~" && (y = "\\textasciitilde"), c.push({
                  type: "textord",
                  mode: "text",
                  text: y
                });
              }
              const m = {
                type: "text",
                mode: r.mode,
                font: "\\texttt",
                body: c
              };
              return {
                type: "href",
                mode: r.mode,
                href: l,
                body: Ze(m)
              };
            }
          }), ee({
            type: "hbox",
            names: ["\\hbox"],
            props: {
              numArgs: 1,
              argTypes: ["text"],
              allowedInText: !0,
              primitive: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "hbox",
                mode: r.mode,
                body: Ze(e[0])
              };
            },
            htmlBuilder(t, e) {
              const r = tt(t.body, e, !1);
              return L.makeFragment(r);
            },
            mathmlBuilder(t, e) {
              return new Z.MathNode("mrow", yt(t.body, e));
            }
          }), ee({
            type: "html",
            names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
            props: {
              numArgs: 2,
              argTypes: ["raw", "original"],
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l,
                token: c
              } = t;
              const m = me(e[0], "raw").string, b = e[1];
              r.settings.strict && r.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
              let y;
              const v = {};
              switch (l) {
                case "\\htmlClass":
                  v.class = m, y = {
                    command: "\\htmlClass",
                    class: m
                  };
                  break;
                case "\\htmlId":
                  v.id = m, y = {
                    command: "\\htmlId",
                    id: m
                  };
                  break;
                case "\\htmlStyle":
                  v.style = m, y = {
                    command: "\\htmlStyle",
                    style: m
                  };
                  break;
                case "\\htmlData": {
                  const C = m.split(",");
                  for (let N = 0; N < C.length; N++) {
                    const R = C[N].split("=");
                    if (R.length !== 2)
                      throw new u("Error parsing key-value for \\htmlData");
                    v["data-" + R[0].trim()] = R[1].trim();
                  }
                  y = {
                    command: "\\htmlData",
                    attributes: v
                  };
                  break;
                }
                default:
                  throw new Error("Unrecognized html command");
              }
              return r.settings.isTrusted(y) ? {
                type: "html",
                mode: r.mode,
                attributes: v,
                body: Ze(b)
              } : r.formatUnsupportedCmd(l);
            },
            htmlBuilder: (t, e) => {
              const r = tt(t.body, e, !1), l = ["enclosing"];
              t.attributes.class && l.push(...t.attributes.class.trim().split(/\s+/));
              const c = L.makeSpan(l, r, e);
              for (const m in t.attributes)
                m !== "class" && t.attributes.hasOwnProperty(m) && c.setAttribute(m, t.attributes[m]);
              return c;
            },
            mathmlBuilder: (t, e) => C0(t.body, e)
          }), ee({
            type: "htmlmathml",
            names: ["\\html@mathml"],
            props: {
              numArgs: 2,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              return {
                type: "htmlmathml",
                mode: r.mode,
                html: Ze(e[0]),
                mathml: Ze(e[1])
              };
            },
            htmlBuilder: (t, e) => {
              const r = tt(t.html, e, !1);
              return L.makeFragment(r);
            },
            mathmlBuilder: (t, e) => C0(t.mathml, e)
          });
          const is = function(t) {
            if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))
              return {
                number: +t,
                unit: "bp"
              };
            {
              const e = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);
              if (!e)
                throw new u("Invalid size: '" + t + "' in \\includegraphics");
              const r = {
                number: +(e[1] + e[2]),
                // sign + magnitude, cast to number
                unit: e[3]
              };
              if (!Nt(r))
                throw new u("Invalid unit: '" + r.unit + "' in \\includegraphics.");
              return r;
            }
          };
          ee({
            type: "includegraphics",
            names: ["\\includegraphics"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1,
              argTypes: ["raw", "url"],
              allowedInText: !1
            },
            handler: (t, e, r) => {
              let {
                parser: l
              } = t, c = {
                number: 0,
                unit: "em"
              }, m = {
                number: 0.9,
                unit: "em"
              }, b = {
                number: 0,
                unit: "em"
              }, y = "";
              if (r[0]) {
                const N = me(r[0], "raw").string.split(",");
                for (let R = 0; R < N.length; R++) {
                  const q = N[R].split("=");
                  if (q.length === 2) {
                    const Y = q[1].trim();
                    switch (q[0].trim()) {
                      case "alt":
                        y = Y;
                        break;
                      case "width":
                        c = is(Y);
                        break;
                      case "height":
                        m = is(Y);
                        break;
                      case "totalheight":
                        b = is(Y);
                        break;
                      default:
                        throw new u("Invalid key: '" + q[0] + "' in \\includegraphics.");
                    }
                  }
                }
              }
              const v = me(e[0], "url").url;
              return y === "" && (y = v, y = y.replace(/^.*[\\/]/, ""), y = y.substring(0, y.lastIndexOf("."))), l.settings.isTrusted({
                command: "\\includegraphics",
                url: v
              }) ? {
                type: "includegraphics",
                mode: l.mode,
                alt: y,
                width: c,
                height: m,
                totalheight: b,
                src: v
              } : l.formatUnsupportedCmd("\\includegraphics");
            },
            htmlBuilder: (t, e) => {
              const r = Me(t.height, e);
              let l = 0;
              t.totalheight.number > 0 && (l = Me(t.totalheight, e) - r);
              let c = 0;
              t.width.number > 0 && (c = Me(t.width, e));
              const m = {
                height: Q(r + l)
              };
              c > 0 && (m.width = Q(c)), l > 0 && (m.verticalAlign = Q(-l));
              const b = new T0(t.src, t.alt, m);
              return b.height = r, b.depth = l, b;
            },
            mathmlBuilder: (t, e) => {
              const r = new Z.MathNode("mglyph", []);
              r.setAttribute("alt", t.alt);
              const l = Me(t.height, e);
              let c = 0;
              if (t.totalheight.number > 0 && (c = Me(t.totalheight, e) - l, r.setAttribute("valign", Q(-c))), r.setAttribute("height", Q(l + c)), t.width.number > 0) {
                const m = Me(t.width, e);
                r.setAttribute("width", Q(m));
              }
              return r.setAttribute("src", t.src), r;
            }
          }), ee({
            type: "kern",
            names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
            props: {
              numArgs: 1,
              argTypes: ["size"],
              primitive: !0,
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = me(e[0], "size");
              if (r.settings.strict) {
                const m = l[1] === "m", b = c.value.unit === "mu";
                m ? (b || r.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + l + " supports only mu units, " + ("not " + c.value.unit + " units")), r.mode !== "math" && r.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + l + " works only in math mode")) : b && r.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + l + " doesn't support mu units");
              }
              return {
                type: "kern",
                mode: r.mode,
                dimension: c.value
              };
            },
            htmlBuilder(t, e) {
              return L.makeGlue(t.dimension, e);
            },
            mathmlBuilder(t, e) {
              const r = Me(t.dimension, e);
              return new Z.SpaceNode(r);
            }
          }), ee({
            type: "lap",
            names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "lap",
                mode: r.mode,
                alignment: l.slice(5),
                body: c
              };
            },
            htmlBuilder: (t, e) => {
              let r;
              t.alignment === "clap" ? (r = L.makeSpan([], [Ae(t.body, e)]), r = L.makeSpan(["inner"], [r], e)) : r = L.makeSpan(["inner"], [Ae(t.body, e)]);
              const l = L.makeSpan(["fix"], []);
              let c = L.makeSpan([t.alignment], [r, l], e);
              const m = L.makeSpan(["strut"]);
              return m.style.height = Q(c.height + c.depth), c.depth && (m.style.verticalAlign = Q(-c.depth)), c.children.unshift(m), c = L.makeSpan(["thinbox"], [c], e), L.makeSpan(["mord", "vbox"], [c], e);
            },
            mathmlBuilder: (t, e) => {
              const r = new Z.MathNode("mpadded", [Le(t.body, e)]);
              if (t.alignment !== "rlap") {
                const l = t.alignment === "llap" ? "-1" : "-0.5";
                r.setAttribute("lspace", l + "width");
              }
              return r.setAttribute("width", "0px"), r;
            }
          }), ee({
            type: "styling",
            names: ["\\(", "$"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !1
            },
            handler(t, e) {
              let {
                funcName: r,
                parser: l
              } = t;
              const c = l.mode;
              l.switchMode("math");
              const m = r === "\\(" ? "\\)" : "$", b = l.parseExpression(!1, m);
              return l.expect(m), l.switchMode(c), {
                type: "styling",
                mode: l.mode,
                style: "text",
                body: b
              };
            }
          }), ee({
            type: "text",
            // Doesn't matter what this is.
            names: ["\\)", "\\]"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              allowedInMath: !1
            },
            handler(t, e) {
              throw new u("Mismatched " + t.funcName);
            }
          });
          const ji = (t, e) => {
            switch (e.style.size) {
              case V.DISPLAY.size:
                return t.display;
              case V.TEXT.size:
                return t.text;
              case V.SCRIPT.size:
                return t.script;
              case V.SCRIPTSCRIPT.size:
                return t.scriptscript;
              default:
                return t.text;
            }
          };
          ee({
            type: "mathchoice",
            names: ["\\mathchoice"],
            props: {
              numArgs: 4,
              primitive: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              return {
                type: "mathchoice",
                mode: r.mode,
                display: Ze(e[0]),
                text: Ze(e[1]),
                script: Ze(e[2]),
                scriptscript: Ze(e[3])
              };
            },
            htmlBuilder: (t, e) => {
              const r = ji(t, e), l = tt(r, e, !1);
              return L.makeFragment(l);
            },
            mathmlBuilder: (t, e) => {
              const r = ji(t, e);
              return C0(r, e);
            }
          });
          const Xi = (t, e, r, l, c, m, b) => {
            t = L.makeSpan([], [t]);
            const y = r && U.isCharacterBox(r);
            let v, C;
            if (e) {
              const q = Ae(e, l.havingStyle(c.sup()), l);
              C = {
                elem: q,
                kern: Math.max(l.fontMetrics().bigOpSpacing1, l.fontMetrics().bigOpSpacing3 - q.depth)
              };
            }
            if (r) {
              const q = Ae(r, l.havingStyle(c.sub()), l);
              v = {
                elem: q,
                kern: Math.max(l.fontMetrics().bigOpSpacing2, l.fontMetrics().bigOpSpacing4 - q.height)
              };
            }
            let N;
            if (C && v) {
              const q = l.fontMetrics().bigOpSpacing5 + v.elem.height + v.elem.depth + v.kern + t.depth + b;
              N = L.makeVList({
                positionType: "bottom",
                positionData: q,
                children: [{
                  type: "kern",
                  size: l.fontMetrics().bigOpSpacing5
                }, {
                  type: "elem",
                  elem: v.elem,
                  marginLeft: Q(-m)
                }, {
                  type: "kern",
                  size: v.kern
                }, {
                  type: "elem",
                  elem: t
                }, {
                  type: "kern",
                  size: C.kern
                }, {
                  type: "elem",
                  elem: C.elem,
                  marginLeft: Q(m)
                }, {
                  type: "kern",
                  size: l.fontMetrics().bigOpSpacing5
                }]
              }, l);
            } else if (v) {
              const q = t.height - b;
              N = L.makeVList({
                positionType: "top",
                positionData: q,
                children: [{
                  type: "kern",
                  size: l.fontMetrics().bigOpSpacing5
                }, {
                  type: "elem",
                  elem: v.elem,
                  marginLeft: Q(-m)
                }, {
                  type: "kern",
                  size: v.kern
                }, {
                  type: "elem",
                  elem: t
                }]
              }, l);
            } else if (C) {
              const q = t.depth + b;
              N = L.makeVList({
                positionType: "bottom",
                positionData: q,
                children: [{
                  type: "elem",
                  elem: t
                }, {
                  type: "kern",
                  size: C.kern
                }, {
                  type: "elem",
                  elem: C.elem,
                  marginLeft: Q(m)
                }, {
                  type: "kern",
                  size: l.fontMetrics().bigOpSpacing5
                }]
              }, l);
            } else
              return t;
            const R = [N];
            if (v && m !== 0 && !y) {
              const q = L.makeSpan(["mspace"], [], l);
              q.style.marginRight = Q(m), R.unshift(q);
            }
            return L.makeSpan(["mop", "op-limits"], R, l);
          }, Yi = ["\\smallint"], en = (t, e) => {
            let r, l, c = !1, m;
            t.type === "supsub" ? (r = t.sup, l = t.sub, m = me(t.base, "op"), c = !0) : m = me(t, "op");
            const b = e.style;
            let y = !1;
            b.size === V.DISPLAY.size && m.symbol && !U.contains(Yi, m.name) && (y = !0);
            let v;
            if (m.symbol) {
              const R = y ? "Size2-Regular" : "Size1-Regular";
              let q = "";
              if ((m.name === "\\oiint" || m.name === "\\oiiint") && (q = m.name.slice(1), m.name = q === "oiint" ? "\\iint" : "\\iiint"), v = L.makeSymbol(m.name, R, "math", e, ["mop", "op-symbol", y ? "large-op" : "small-op"]), q.length > 0) {
                const Y = v.italic, se = L.staticSvg(q + "Size" + (y ? "2" : "1"), e);
                v = L.makeVList({
                  positionType: "individualShift",
                  children: [{
                    type: "elem",
                    elem: v,
                    shift: 0
                  }, {
                    type: "elem",
                    elem: se,
                    shift: y ? 0.08 : 0
                  }]
                }, e), m.name = "\\" + q, v.classes.unshift("mop"), v.italic = Y;
              }
            } else if (m.body) {
              const R = tt(m.body, e, !0);
              R.length === 1 && R[0] instanceof wt ? (v = R[0], v.classes[0] = "mop") : v = L.makeSpan(["mop"], R, e);
            } else {
              const R = [];
              for (let q = 1; q < m.name.length; q++)
                R.push(L.mathsym(m.name[q], m.mode, e));
              v = L.makeSpan(["mop"], R, e);
            }
            let C = 0, N = 0;
            return (v instanceof wt || m.name === "\\oiint" || m.name === "\\oiiint") && !m.suppressBaseShift && (C = (v.height - v.depth) / 2 - e.fontMetrics().axisHeight, N = v.italic), c ? Xi(v, r, l, e, b, N, C) : (C && (v.style.position = "relative", v.style.top = Q(C)), v);
          }, wn = (t, e) => {
            let r;
            if (t.symbol)
              r = new Ot("mo", [qt(t.name, t.mode)]), U.contains(Yi, t.name) && r.setAttribute("largeop", "false");
            else if (t.body)
              r = new Ot("mo", yt(t.body, e));
            else {
              r = new Ot("mi", [new pn(t.name.slice(1))]);
              const l = new Ot("mo", [qt("⁡", "text")]);
              t.parentIsSupSub ? r = new Ot("mrow", [r, l]) : r = hi([r, l]);
            }
            return r;
          }, Iu = {
            "∏": "\\prod",
            "∐": "\\coprod",
            "∑": "\\sum",
            "⋀": "\\bigwedge",
            "⋁": "\\bigvee",
            "⋂": "\\bigcap",
            "⋃": "\\bigcup",
            "⨀": "\\bigodot",
            "⨁": "\\bigoplus",
            "⨂": "\\bigotimes",
            "⨄": "\\biguplus",
            "⨆": "\\bigsqcup"
          };
          ee({
            type: "op",
            names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
            props: {
              numArgs: 0
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t, c = l;
              return c.length === 1 && (c = Iu[c]), {
                type: "op",
                mode: r.mode,
                limits: !0,
                parentIsSupSub: !1,
                symbol: !0,
                name: c
              };
            },
            htmlBuilder: en,
            mathmlBuilder: wn
          }), ee({
            type: "op",
            names: ["\\mathop"],
            props: {
              numArgs: 1,
              primitive: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[0];
              return {
                type: "op",
                mode: r.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !1,
                body: Ze(l)
              };
            },
            htmlBuilder: en,
            mathmlBuilder: wn
          });
          const Lu = {
            "∫": "\\int",
            "∬": "\\iint",
            "∭": "\\iiint",
            "∮": "\\oint",
            "∯": "\\oiint",
            "∰": "\\oiiint"
          };
          ee({
            type: "op",
            names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
            props: {
              numArgs: 0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t;
              return {
                type: "op",
                mode: e.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !1,
                name: r
              };
            },
            htmlBuilder: en,
            mathmlBuilder: wn
          }), ee({
            type: "op",
            names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
            props: {
              numArgs: 0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t;
              return {
                type: "op",
                mode: e.mode,
                limits: !0,
                parentIsSupSub: !1,
                symbol: !1,
                name: r
              };
            },
            htmlBuilder: en,
            mathmlBuilder: wn
          }), ee({
            type: "op",
            names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
            props: {
              numArgs: 0
            },
            handler(t) {
              let {
                parser: e,
                funcName: r
              } = t, l = r;
              return l.length === 1 && (l = Lu[l]), {
                type: "op",
                mode: e.mode,
                limits: !1,
                parentIsSupSub: !1,
                symbol: !0,
                name: l
              };
            },
            htmlBuilder: en,
            mathmlBuilder: wn
          });
          const Zi = (t, e) => {
            let r, l, c = !1, m;
            t.type === "supsub" ? (r = t.sup, l = t.sub, m = me(t.base, "operatorname"), c = !0) : m = me(t, "operatorname");
            let b;
            if (m.body.length > 0) {
              const y = m.body.map((C) => {
                const N = C.text;
                return typeof N == "string" ? {
                  type: "textord",
                  mode: C.mode,
                  text: N
                } : C;
              }), v = tt(y, e.withFont("mathrm"), !0);
              for (let C = 0; C < v.length; C++) {
                const N = v[C];
                N instanceof wt && (N.text = N.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
              }
              b = L.makeSpan(["mop"], v, e);
            } else
              b = L.makeSpan(["mop"], [], e);
            return c ? Xi(b, r, l, e, e.style, 0, 0) : b;
          };
          ee({
            type: "operatorname",
            names: ["\\operatorname@", "\\operatornamewithlimits"],
            props: {
              numArgs: 1
            },
            handler: (t, e) => {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "operatorname",
                mode: r.mode,
                body: Ze(c),
                alwaysHandleSupSub: l === "\\operatornamewithlimits",
                limits: !1,
                parentIsSupSub: !1
              };
            },
            htmlBuilder: Zi,
            mathmlBuilder: (t, e) => {
              let r = yt(t.body, e.withFont("mathrm")), l = !0;
              for (let b = 0; b < r.length; b++) {
                const y = r[b];
                if (!(y instanceof Z.SpaceNode))
                  if (y instanceof Z.MathNode)
                    switch (y.type) {
                      case "mi":
                      case "mn":
                      case "ms":
                      case "mspace":
                      case "mtext":
                        break;
                      case "mo": {
                        const v = y.children[0];
                        y.children.length === 1 && v instanceof Z.TextNode ? v.text = v.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : l = !1;
                        break;
                      }
                      default:
                        l = !1;
                    }
                  else
                    l = !1;
              }
              if (l) {
                const b = r.map((y) => y.toText()).join("");
                r = [new Z.TextNode(b)];
              }
              const c = new Z.MathNode("mi", r);
              c.setAttribute("mathvariant", "normal");
              const m = new Z.MathNode("mo", [qt("⁡", "text")]);
              return t.parentIsSupSub ? new Z.MathNode("mrow", [c, m]) : Z.newDocumentFragment([c, m]);
            }
          }), D("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"), U0({
            type: "ordgroup",
            htmlBuilder(t, e) {
              return t.semisimple ? L.makeFragment(tt(t.body, e, !1)) : L.makeSpan(["mord"], tt(t.body, e, !0), e);
            },
            mathmlBuilder(t, e) {
              return C0(t.body, e, !0);
            }
          }), ee({
            type: "overline",
            names: ["\\overline"],
            props: {
              numArgs: 1
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              const l = e[0];
              return {
                type: "overline",
                mode: r.mode,
                body: l
              };
            },
            htmlBuilder(t, e) {
              const r = Ae(t.body, e.havingCrampedStyle()), l = L.makeLineSpan("overline-line", e), c = e.fontMetrics().defaultRuleThickness, m = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: r
                }, {
                  type: "kern",
                  size: 3 * c
                }, {
                  type: "elem",
                  elem: l
                }, {
                  type: "kern",
                  size: c
                }]
              }, e);
              return L.makeSpan(["mord", "overline"], [m], e);
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mo", [new Z.TextNode("‾")]);
              r.setAttribute("stretchy", "true");
              const l = new Z.MathNode("mover", [Le(t.body, e), r]);
              return l.setAttribute("accent", "true"), l;
            }
          }), ee({
            type: "phantom",
            names: ["\\phantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[0];
              return {
                type: "phantom",
                mode: r.mode,
                body: Ze(l)
              };
            },
            htmlBuilder: (t, e) => {
              const r = tt(t.body, e.withPhantom(), !1);
              return L.makeFragment(r);
            },
            mathmlBuilder: (t, e) => {
              const r = yt(t.body, e);
              return new Z.MathNode("mphantom", r);
            }
          }), ee({
            type: "hphantom",
            names: ["\\hphantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[0];
              return {
                type: "hphantom",
                mode: r.mode,
                body: l
              };
            },
            htmlBuilder: (t, e) => {
              let r = L.makeSpan([], [Ae(t.body, e.withPhantom())]);
              if (r.height = 0, r.depth = 0, r.children)
                for (let l = 0; l < r.children.length; l++)
                  r.children[l].height = 0, r.children[l].depth = 0;
              return r = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: r
                }]
              }, e), L.makeSpan(["mord"], [r], e);
            },
            mathmlBuilder: (t, e) => {
              const r = yt(Ze(t.body), e), l = new Z.MathNode("mphantom", r), c = new Z.MathNode("mpadded", [l]);
              return c.setAttribute("height", "0px"), c.setAttribute("depth", "0px"), c;
            }
          }), ee({
            type: "vphantom",
            names: ["\\vphantom"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                parser: r
              } = t;
              const l = e[0];
              return {
                type: "vphantom",
                mode: r.mode,
                body: l
              };
            },
            htmlBuilder: (t, e) => {
              const r = L.makeSpan(["inner"], [Ae(t.body, e.withPhantom())]), l = L.makeSpan(["fix"], []);
              return L.makeSpan(["mord", "rlap"], [r, l], e);
            },
            mathmlBuilder: (t, e) => {
              const r = yt(Ze(t.body), e), l = new Z.MathNode("mphantom", r), c = new Z.MathNode("mpadded", [l]);
              return c.setAttribute("width", "0px"), c;
            }
          }), ee({
            type: "raisebox",
            names: ["\\raisebox"],
            props: {
              numArgs: 2,
              argTypes: ["size", "hbox"],
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              const l = me(e[0], "size").value, c = e[1];
              return {
                type: "raisebox",
                mode: r.mode,
                dy: l,
                body: c
              };
            },
            htmlBuilder(t, e) {
              const r = Ae(t.body, e), l = Me(t.dy, e);
              return L.makeVList({
                positionType: "shift",
                positionData: -l,
                children: [{
                  type: "elem",
                  elem: r
                }]
              }, e);
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mpadded", [Le(t.body, e)]), l = t.dy.number + t.dy.unit;
              return r.setAttribute("voffset", l), r;
            }
          }), ee({
            type: "internal",
            names: ["\\relax"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(t) {
              let {
                parser: e
              } = t;
              return {
                type: "internal",
                mode: e.mode
              };
            }
          }), ee({
            type: "rule",
            names: ["\\rule"],
            props: {
              numArgs: 2,
              numOptionalArgs: 1,
              argTypes: ["size", "size", "size"]
            },
            handler(t, e, r) {
              let {
                parser: l
              } = t;
              const c = r[0], m = me(e[0], "size"), b = me(e[1], "size");
              return {
                type: "rule",
                mode: l.mode,
                shift: c && me(c, "size").value,
                width: m.value,
                height: b.value
              };
            },
            htmlBuilder(t, e) {
              const r = L.makeSpan(["mord", "rule"], [], e), l = Me(t.width, e), c = Me(t.height, e), m = t.shift ? Me(t.shift, e) : 0;
              return r.style.borderRightWidth = Q(l), r.style.borderTopWidth = Q(c), r.style.bottom = Q(m), r.width = l, r.height = c + m, r.depth = -m, r.maxFontSize = c * 1.125 * e.sizeMultiplier, r;
            },
            mathmlBuilder(t, e) {
              const r = Me(t.width, e), l = Me(t.height, e), c = t.shift ? Me(t.shift, e) : 0, m = e.color && e.getColor() || "black", b = new Z.MathNode("mspace");
              b.setAttribute("mathbackground", m), b.setAttribute("width", Q(r)), b.setAttribute("height", Q(l));
              const y = new Z.MathNode("mpadded", [b]);
              return c >= 0 ? y.setAttribute("height", Q(c)) : (y.setAttribute("height", Q(c)), y.setAttribute("depth", Q(-c))), y.setAttribute("voffset", Q(c)), y;
            }
          });
          function Ki(t, e, r) {
            const l = tt(t, e, !1), c = e.sizeMultiplier / r.sizeMultiplier;
            for (let m = 0; m < l.length; m++) {
              const b = l[m].classes.indexOf("sizing");
              b < 0 ? Array.prototype.push.apply(l[m].classes, e.sizingClasses(r)) : l[m].classes[b + 1] === "reset-size" + e.size && (l[m].classes[b + 1] = "reset-size" + r.size), l[m].height *= c, l[m].depth *= c;
            }
            return L.makeFragment(l);
          }
          const Qi = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
          ee({
            type: "sizing",
            names: Qi,
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler: (t, e) => {
              let {
                breakOnTokenText: r,
                funcName: l,
                parser: c
              } = t;
              const m = c.parseExpression(!1, r);
              return {
                type: "sizing",
                mode: c.mode,
                // Figure out what size to use based on the list of functions above
                size: Qi.indexOf(l) + 1,
                body: m
              };
            },
            htmlBuilder: (t, e) => {
              const r = e.havingSize(t.size);
              return Ki(t.body, r, e);
            },
            mathmlBuilder: (t, e) => {
              const r = e.havingSize(t.size), l = yt(t.body, r), c = new Z.MathNode("mstyle", l);
              return c.setAttribute("mathsize", Q(r.sizeMultiplier)), c;
            }
          }), ee({
            type: "smash",
            names: ["\\smash"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1,
              allowedInText: !0
            },
            handler: (t, e, r) => {
              let {
                parser: l
              } = t, c = !1, m = !1;
              const b = r[0] && me(r[0], "ordgroup");
              if (b) {
                let v = "";
                for (let C = 0; C < b.body.length; ++C)
                  if (v = b.body[C].text, v === "t")
                    c = !0;
                  else if (v === "b")
                    m = !0;
                  else {
                    c = !1, m = !1;
                    break;
                  }
              } else
                c = !0, m = !0;
              const y = e[0];
              return {
                type: "smash",
                mode: l.mode,
                body: y,
                smashHeight: c,
                smashDepth: m
              };
            },
            htmlBuilder: (t, e) => {
              const r = L.makeSpan([], [Ae(t.body, e)]);
              if (!t.smashHeight && !t.smashDepth)
                return r;
              if (t.smashHeight && (r.height = 0, r.children))
                for (let c = 0; c < r.children.length; c++)
                  r.children[c].height = 0;
              if (t.smashDepth && (r.depth = 0, r.children))
                for (let c = 0; c < r.children.length; c++)
                  r.children[c].depth = 0;
              const l = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: r
                }]
              }, e);
              return L.makeSpan(["mord"], [l], e);
            },
            mathmlBuilder: (t, e) => {
              const r = new Z.MathNode("mpadded", [Le(t.body, e)]);
              return t.smashHeight && r.setAttribute("height", "0px"), t.smashDepth && r.setAttribute("depth", "0px"), r;
            }
          }), ee({
            type: "sqrt",
            names: ["\\sqrt"],
            props: {
              numArgs: 1,
              numOptionalArgs: 1
            },
            handler(t, e, r) {
              let {
                parser: l
              } = t;
              const c = r[0], m = e[0];
              return {
                type: "sqrt",
                mode: l.mode,
                body: m,
                index: c
              };
            },
            htmlBuilder(t, e) {
              let r = Ae(t.body, e.havingCrampedStyle());
              r.height === 0 && (r.height = e.fontMetrics().xHeight), r = L.wrapFragment(r, e);
              const c = e.fontMetrics().defaultRuleThickness;
              let m = c;
              e.style.id < V.TEXT.id && (m = e.fontMetrics().xHeight);
              let b = c + m / 4;
              const y = r.height + r.depth + b + c, {
                span: v,
                ruleWidth: C,
                advanceWidth: N
              } = v0.sqrtImage(y, e), R = v.height - C;
              R > r.height + r.depth + b && (b = (b + R - r.height - r.depth) / 2);
              const q = v.height - r.height - b - C;
              r.style.paddingLeft = Q(N);
              const Y = L.makeVList({
                positionType: "firstBaseline",
                children: [{
                  type: "elem",
                  elem: r,
                  wrapperClasses: ["svg-align"]
                }, {
                  type: "kern",
                  size: -(r.height + q)
                }, {
                  type: "elem",
                  elem: v
                }, {
                  type: "kern",
                  size: C
                }]
              }, e);
              if (t.index) {
                const se = e.havingStyle(V.SCRIPTSCRIPT), ae = Ae(t.index, se, e), ke = 0.6 * (Y.height - Y.depth), ge = L.makeVList({
                  positionType: "shift",
                  positionData: -ke,
                  children: [{
                    type: "elem",
                    elem: ae
                  }]
                }, e), xe = L.makeSpan(["root"], [ge]);
                return L.makeSpan(["mord", "sqrt"], [xe, Y], e);
              } else
                return L.makeSpan(["mord", "sqrt"], [Y], e);
            },
            mathmlBuilder(t, e) {
              const {
                body: r,
                index: l
              } = t;
              return l ? new Z.MathNode("mroot", [Le(r, e), Le(l, e)]) : new Z.MathNode("msqrt", [Le(r, e)]);
            }
          });
          const Ji = {
            display: V.DISPLAY,
            text: V.TEXT,
            script: V.SCRIPT,
            scriptscript: V.SCRIPTSCRIPT
          };
          ee({
            type: "styling",
            names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
            props: {
              numArgs: 0,
              allowedInText: !0,
              primitive: !0
            },
            handler(t, e) {
              let {
                breakOnTokenText: r,
                funcName: l,
                parser: c
              } = t;
              const m = c.parseExpression(!0, r), b = l.slice(1, l.length - 5);
              return {
                type: "styling",
                mode: c.mode,
                // Figure out what style to use by pulling out the style from
                // the function name
                style: b,
                body: m
              };
            },
            htmlBuilder(t, e) {
              const r = Ji[t.style], l = e.havingStyle(r).withFont("");
              return Ki(t.body, l, e);
            },
            mathmlBuilder(t, e) {
              const r = Ji[t.style], l = e.havingStyle(r), c = yt(t.body, l), m = new Z.MathNode("mstyle", c), y = {
                display: ["0", "true"],
                text: ["0", "false"],
                script: ["1", "false"],
                scriptscript: ["2", "false"]
              }[t.style];
              return m.setAttribute("scriptlevel", y[0]), m.setAttribute("displaystyle", y[1]), m;
            }
          });
          const Ou = function(t, e) {
            const r = t.base;
            return r ? r.type === "op" ? r.limits && (e.style.size === V.DISPLAY.size || r.alwaysHandleSupSub) ? en : null : r.type === "operatorname" ? r.alwaysHandleSupSub && (e.style.size === V.DISPLAY.size || r.limits) ? Zi : null : r.type === "accent" ? U.isCharacterBox(r.base) ? Vr : null : r.type === "horizBrace" && !t.sub === r.isOver ? Wi : null : null;
          };
          U0({
            type: "supsub",
            htmlBuilder(t, e) {
              const r = Ou(t, e);
              if (r)
                return r(t, e);
              const {
                base: l,
                sup: c,
                sub: m
              } = t, b = Ae(l, e);
              let y, v;
              const C = e.fontMetrics();
              let N = 0, R = 0;
              const q = l && U.isCharacterBox(l);
              if (c) {
                const Ce = e.havingStyle(e.style.sup());
                y = Ae(c, Ce, e), q || (N = b.height - Ce.fontMetrics().supDrop * Ce.sizeMultiplier / e.sizeMultiplier);
              }
              if (m) {
                const Ce = e.havingStyle(e.style.sub());
                v = Ae(m, Ce, e), q || (R = b.depth + Ce.fontMetrics().subDrop * Ce.sizeMultiplier / e.sizeMultiplier);
              }
              let Y;
              e.style === V.DISPLAY ? Y = C.sup1 : e.style.cramped ? Y = C.sup3 : Y = C.sup2;
              const se = e.sizeMultiplier, ae = Q(0.5 / C.ptPerEm / se);
              let ke = null;
              if (v) {
                const Ce = t.base && t.base.type === "op" && t.base.name && (t.base.name === "\\oiint" || t.base.name === "\\oiiint");
                (b instanceof wt || Ce) && (ke = Q(-b.italic));
              }
              let ge;
              if (y && v) {
                N = Math.max(N, Y, y.depth + 0.25 * C.xHeight), R = Math.max(R, C.sub2);
                const qe = 4 * C.defaultRuleThickness;
                if (N - y.depth - (v.height - R) < qe) {
                  R = qe - (N - y.depth) + v.height;
                  const nt = 0.8 * C.xHeight - (N - y.depth);
                  nt > 0 && (N += nt, R -= nt);
                }
                const ht = [{
                  type: "elem",
                  elem: v,
                  shift: R,
                  marginRight: ae,
                  marginLeft: ke
                }, {
                  type: "elem",
                  elem: y,
                  shift: -N,
                  marginRight: ae
                }];
                ge = L.makeVList({
                  positionType: "individualShift",
                  children: ht
                }, e);
              } else if (v) {
                R = Math.max(R, C.sub1, v.height - 0.8 * C.xHeight);
                const Ce = [{
                  type: "elem",
                  elem: v,
                  marginLeft: ke,
                  marginRight: ae
                }];
                ge = L.makeVList({
                  positionType: "shift",
                  positionData: R,
                  children: Ce
                }, e);
              } else if (y)
                N = Math.max(N, Y, y.depth + 0.25 * C.xHeight), ge = L.makeVList({
                  positionType: "shift",
                  positionData: -N,
                  children: [{
                    type: "elem",
                    elem: y,
                    marginRight: ae
                  }]
                }, e);
              else
                throw new Error("supsub must have either sup or sub.");
              const xe = qr(b, "right") || "mord";
              return L.makeSpan([xe], [b, L.makeSpan(["msupsub"], [ge])], e);
            },
            mathmlBuilder(t, e) {
              let r = !1, l, c;
              t.base && t.base.type === "horizBrace" && (c = !!t.sup, c === t.base.isOver && (r = !0, l = t.base.isOver)), t.base && (t.base.type === "op" || t.base.type === "operatorname") && (t.base.parentIsSupSub = !0);
              const m = [Le(t.base, e)];
              t.sub && m.push(Le(t.sub, e)), t.sup && m.push(Le(t.sup, e));
              let b;
              if (r)
                b = l ? "mover" : "munder";
              else if (t.sub)
                if (t.sup) {
                  const y = t.base;
                  y && y.type === "op" && y.limits && e.style === V.DISPLAY || y && y.type === "operatorname" && y.alwaysHandleSupSub && (e.style === V.DISPLAY || y.limits) ? b = "munderover" : b = "msubsup";
                } else {
                  const y = t.base;
                  y && y.type === "op" && y.limits && (e.style === V.DISPLAY || y.alwaysHandleSupSub) || y && y.type === "operatorname" && y.alwaysHandleSupSub && (y.limits || e.style === V.DISPLAY) ? b = "munder" : b = "msub";
                }
              else {
                const y = t.base;
                y && y.type === "op" && y.limits && (e.style === V.DISPLAY || y.alwaysHandleSupSub) || y && y.type === "operatorname" && y.alwaysHandleSupSub && (y.limits || e.style === V.DISPLAY) ? b = "mover" : b = "msup";
              }
              return new Z.MathNode(b, m);
            }
          }), U0({
            type: "atom",
            htmlBuilder(t, e) {
              return L.mathsym(t.text, t.mode, e, ["m" + t.family]);
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mo", [qt(t.text, t.mode)]);
              if (t.family === "bin") {
                const l = Ur(t, e);
                l === "bold-italic" && r.setAttribute("mathvariant", l);
              } else
                t.family === "punct" ? r.setAttribute("separator", "true") : (t.family === "open" || t.family === "close") && r.setAttribute("stretchy", "false");
              return r;
            }
          });
          const $i = {
            mi: "italic",
            mn: "normal",
            mtext: "normal"
          };
          U0({
            type: "mathord",
            htmlBuilder(t, e) {
              return L.makeOrd(t, e, "mathord");
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mi", [qt(t.text, t.mode, e)]), l = Ur(t, e) || "italic";
              return l !== $i[r.type] && r.setAttribute("mathvariant", l), r;
            }
          }), U0({
            type: "textord",
            htmlBuilder(t, e) {
              return L.makeOrd(t, e, "textord");
            },
            mathmlBuilder(t, e) {
              const r = qt(t.text, t.mode, e), l = Ur(t, e) || "normal";
              let c;
              return t.mode === "text" ? c = new Z.MathNode("mtext", [r]) : /[0-9]/.test(t.text) ? c = new Z.MathNode("mn", [r]) : t.text === "\\prime" ? c = new Z.MathNode("mo", [r]) : c = new Z.MathNode("mi", [r]), l !== $i[c.type] && c.setAttribute("mathvariant", l), c;
            }
          });
          const ls = {
            "\\nobreak": "nobreak",
            "\\allowbreak": "allowbreak"
          }, as = {
            " ": {},
            "\\ ": {},
            "~": {
              className: "nobreak"
            },
            "\\space": {},
            "\\nobreakspace": {
              className: "nobreak"
            }
          };
          U0({
            type: "spacing",
            htmlBuilder(t, e) {
              if (as.hasOwnProperty(t.text)) {
                const r = as[t.text].className || "";
                if (t.mode === "text") {
                  const l = L.makeOrd(t, e, "textord");
                  return l.classes.push(r), l;
                } else
                  return L.makeSpan(["mspace", r], [L.mathsym(t.text, t.mode, e)], e);
              } else {
                if (ls.hasOwnProperty(t.text))
                  return L.makeSpan(["mspace", ls[t.text]], [], e);
                throw new u('Unknown type of space "' + t.text + '"');
              }
            },
            mathmlBuilder(t, e) {
              let r;
              if (as.hasOwnProperty(t.text))
                r = new Z.MathNode("mtext", [new Z.TextNode(" ")]);
              else {
                if (ls.hasOwnProperty(t.text))
                  return new Z.MathNode("mspace");
                throw new u('Unknown type of space "' + t.text + '"');
              }
              return r;
            }
          });
          const el = () => {
            const t = new Z.MathNode("mtd", []);
            return t.setAttribute("width", "50%"), t;
          };
          U0({
            type: "tag",
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mtable", [new Z.MathNode("mtr", [el(), new Z.MathNode("mtd", [C0(t.body, e)]), el(), new Z.MathNode("mtd", [C0(t.tag, e)])])]);
              return r.setAttribute("width", "100%"), r;
            }
          });
          const tl = {
            "\\text": void 0,
            "\\textrm": "textrm",
            "\\textsf": "textsf",
            "\\texttt": "texttt",
            "\\textnormal": "textrm"
          }, nl = {
            "\\textbf": "textbf",
            "\\textmd": "textmd"
          }, qu = {
            "\\textit": "textit",
            "\\textup": "textup"
          }, rl = (t, e) => {
            const r = t.font;
            return r ? tl[r] ? e.withTextFontFamily(tl[r]) : nl[r] ? e.withTextFontWeight(nl[r]) : e.withTextFontShape(qu[r]) : e;
          };
          ee({
            type: "text",
            names: [
              // Font families
              "\\text",
              "\\textrm",
              "\\textsf",
              "\\texttt",
              "\\textnormal",
              // Font weights
              "\\textbf",
              "\\textmd",
              // Font Shapes
              "\\textit",
              "\\textup"
            ],
            props: {
              numArgs: 1,
              argTypes: ["text"],
              allowedInArgument: !0,
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r,
                funcName: l
              } = t;
              const c = e[0];
              return {
                type: "text",
                mode: r.mode,
                body: Ze(c),
                font: l
              };
            },
            htmlBuilder(t, e) {
              const r = rl(t, e), l = tt(t.body, r, !0);
              return L.makeSpan(["mord", "text"], l, r);
            },
            mathmlBuilder(t, e) {
              const r = rl(t, e);
              return C0(t.body, r);
            }
          }), ee({
            type: "underline",
            names: ["\\underline"],
            props: {
              numArgs: 1,
              allowedInText: !0
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "underline",
                mode: r.mode,
                body: e[0]
              };
            },
            htmlBuilder(t, e) {
              const r = Ae(t.body, e), l = L.makeLineSpan("underline-line", e), c = e.fontMetrics().defaultRuleThickness, m = L.makeVList({
                positionType: "top",
                positionData: r.height,
                children: [{
                  type: "kern",
                  size: c
                }, {
                  type: "elem",
                  elem: l
                }, {
                  type: "kern",
                  size: 3 * c
                }, {
                  type: "elem",
                  elem: r
                }]
              }, e);
              return L.makeSpan(["mord", "underline"], [m], e);
            },
            mathmlBuilder(t, e) {
              const r = new Z.MathNode("mo", [new Z.TextNode("‾")]);
              r.setAttribute("stretchy", "true");
              const l = new Z.MathNode("munder", [Le(t.body, e), r]);
              return l.setAttribute("accentunder", "true"), l;
            }
          }), ee({
            type: "vcenter",
            names: ["\\vcenter"],
            props: {
              numArgs: 1,
              argTypes: ["original"],
              // In LaTeX, \vcenter can act only on a box.
              allowedInText: !1
            },
            handler(t, e) {
              let {
                parser: r
              } = t;
              return {
                type: "vcenter",
                mode: r.mode,
                body: e[0]
              };
            },
            htmlBuilder(t, e) {
              const r = Ae(t.body, e), l = e.fontMetrics().axisHeight, c = 0.5 * (r.height - l - (r.depth + l));
              return L.makeVList({
                positionType: "shift",
                positionData: c,
                children: [{
                  type: "elem",
                  elem: r
                }]
              }, e);
            },
            mathmlBuilder(t, e) {
              return new Z.MathNode("mpadded", [Le(t.body, e)], ["vcenter"]);
            }
          }), ee({
            type: "verb",
            names: ["\\verb"],
            props: {
              numArgs: 0,
              allowedInText: !0
            },
            handler(t, e, r) {
              throw new u("\\verb ended by end of line instead of matching delimiter");
            },
            htmlBuilder(t, e) {
              const r = sl(t), l = [], c = e.havingStyle(e.style.text());
              for (let m = 0; m < r.length; m++) {
                let b = r[m];
                b === "~" && (b = "\\textasciitilde"), l.push(L.makeSymbol(b, "Typewriter-Regular", t.mode, c, ["mord", "texttt"]));
              }
              return L.makeSpan(["mord", "text"].concat(c.sizingClasses(e)), L.tryCombineChars(l), c);
            },
            mathmlBuilder(t, e) {
              const r = new Z.TextNode(sl(t)), l = new Z.MathNode("mtext", [r]);
              return l.setAttribute("mathvariant", "monospace"), l;
            }
          });
          const sl = (t) => t.body.replace(/ /g, t.star ? "␣" : " ");
          var z0 = ui;
          const il = `[ \r
	]`, Pu = "\\\\[a-zA-Z@]+", Hu = "\\\\[^\uD800-\uDFFF]", Uu = "(" + Pu + ")" + il + "*", Gu = `\\\\(
|[ \r	]+
?)[ \r	]*`, os = "[̀-ͯ]", Vu = new RegExp(os + "+$"), Wu = "(" + il + "+)|" + // whitespace
          (Gu + "|") + // \whitespace
          "([!-\\[\\]-‧‪-퟿豈-]" + // single codepoint
          (os + "*") + // ...plus accents
          "|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
          (os + "*") + // ...plus accents
          "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + // \verb unstarred
          ("|" + Uu) + // \macroName + spaces
          ("|" + Hu + ")");
          class ll {
            // Category codes. The lexer only supports comment characters (14) for now.
            // MacroExpander additionally distinguishes active (13).
            constructor(e, r) {
              this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = r, this.tokenRegex = new RegExp(Wu, "g"), this.catcodes = {
                "%": 14,
                // comment character
                "~": 13
                // active character
              };
            }
            setCatcode(e, r) {
              this.catcodes[e] = r;
            }
            /**
             * This function lexes a single token.
             */
            lex() {
              const e = this.input, r = this.tokenRegex.lastIndex;
              if (r === e.length)
                return new Pt("EOF", new Tt(this, r, r));
              const l = this.tokenRegex.exec(e);
              if (l === null || l.index !== r)
                throw new u("Unexpected character: '" + e[r] + "'", new Pt(e[r], new Tt(this, r, r + 1)));
              const c = l[6] || l[3] || (l[2] ? "\\ " : " ");
              if (this.catcodes[c] === 14) {
                const m = e.indexOf(`
`, this.tokenRegex.lastIndex);
                return m === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = m + 1, this.lex();
              }
              return new Pt(c, new Tt(this, r, this.tokenRegex.lastIndex));
            }
          }
          class ju {
            /**
             * Both arguments are optional.  The first argument is an object of
             * built-in mappings which never change.  The second argument is an object
             * of initial (global-level) mappings, which will constantly change
             * according to any global/top-level `set`s done.
             */
            constructor(e, r) {
              e === void 0 && (e = {}), r === void 0 && (r = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = r, this.builtins = e, this.undefStack = [];
            }
            /**
             * Start a new nested group, affecting future local `set`s.
             */
            beginGroup() {
              this.undefStack.push({});
            }
            /**
             * End current nested group, restoring values before the group began.
             */
            endGroup() {
              if (this.undefStack.length === 0)
                throw new u("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
              const e = this.undefStack.pop();
              for (const r in e)
                e.hasOwnProperty(r) && (e[r] == null ? delete this.current[r] : this.current[r] = e[r]);
            }
            /**
             * Ends all currently nested groups (if any), restoring values before the
             * groups began.  Useful in case of an error in the middle of parsing.
             */
            endGroups() {
              for (; this.undefStack.length > 0; )
                this.endGroup();
            }
            /**
             * Detect whether `name` has a definition.  Equivalent to
             * `get(name) != null`.
             */
            has(e) {
              return this.current.hasOwnProperty(e) || this.builtins.hasOwnProperty(e);
            }
            /**
             * Get the current value of a name, or `undefined` if there is no value.
             *
             * Note: Do not use `if (namespace.get(...))` to detect whether a macro
             * is defined, as the definition may be the empty string which evaluates
             * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
             * `if (namespace.has(...))`.
             */
            get(e) {
              return this.current.hasOwnProperty(e) ? this.current[e] : this.builtins[e];
            }
            /**
             * Set the current value of a name, and optionally set it globally too.
             * Local set() sets the current value and (when appropriate) adds an undo
             * operation to the undo stack.  Global set() may change the undo
             * operation at every level, so takes time linear in their number.
             * A value of undefined means to delete existing definitions.
             */
            set(e, r, l) {
              if (l === void 0 && (l = !1), l) {
                for (let c = 0; c < this.undefStack.length; c++)
                  delete this.undefStack[c][e];
                this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][e] = r);
              } else {
                const c = this.undefStack[this.undefStack.length - 1];
                c && !c.hasOwnProperty(e) && (c[e] = this.current[e]);
              }
              r == null ? delete this.current[e] : this.current[e] = r;
            }
          }
          var Xu = Ri;
          D("\\noexpand", function(t) {
            const e = t.popToken();
            return t.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), {
              tokens: [e],
              numArgs: 0
            };
          }), D("\\expandafter", function(t) {
            const e = t.popToken();
            return t.expandOnce(!0), {
              tokens: [e],
              numArgs: 0
            };
          }), D("\\@firstoftwo", function(t) {
            return {
              tokens: t.consumeArgs(2)[0],
              numArgs: 0
            };
          }), D("\\@secondoftwo", function(t) {
            return {
              tokens: t.consumeArgs(2)[1],
              numArgs: 0
            };
          }), D("\\@ifnextchar", function(t) {
            const e = t.consumeArgs(3);
            t.consumeSpaces();
            const r = t.future();
            return e[0].length === 1 && e[0][0].text === r.text ? {
              tokens: e[1],
              numArgs: 0
            } : {
              tokens: e[2],
              numArgs: 0
            };
          }), D("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"), D("\\TextOrMath", function(t) {
            const e = t.consumeArgs(2);
            return t.mode === "text" ? {
              tokens: e[0],
              numArgs: 0
            } : {
              tokens: e[1],
              numArgs: 0
            };
          });
          const al = {
            0: 0,
            1: 1,
            2: 2,
            3: 3,
            4: 4,
            5: 5,
            6: 6,
            7: 7,
            8: 8,
            9: 9,
            a: 10,
            A: 10,
            b: 11,
            B: 11,
            c: 12,
            C: 12,
            d: 13,
            D: 13,
            e: 14,
            E: 14,
            f: 15,
            F: 15
          };
          D("\\char", function(t) {
            let e = t.popToken(), r, l = "";
            if (e.text === "'")
              r = 8, e = t.popToken();
            else if (e.text === '"')
              r = 16, e = t.popToken();
            else if (e.text === "`")
              if (e = t.popToken(), e.text[0] === "\\")
                l = e.text.charCodeAt(1);
              else {
                if (e.text === "EOF")
                  throw new u("\\char` missing argument");
                l = e.text.charCodeAt(0);
              }
            else
              r = 10;
            if (r) {
              if (l = al[e.text], l == null || l >= r)
                throw new u("Invalid base-" + r + " digit " + e.text);
              let c;
              for (; (c = al[t.future().text]) != null && c < r; )
                l *= r, l += c, t.popToken();
            }
            return "\\@char{" + l + "}";
          });
          const us = (t, e, r) => {
            let l = t.consumeArg().tokens;
            if (l.length !== 1)
              throw new u("\\newcommand's first argument must be a macro name");
            const c = l[0].text, m = t.isDefined(c);
            if (m && !e)
              throw new u("\\newcommand{" + c + "} attempting to redefine " + (c + "; use \\renewcommand"));
            if (!m && !r)
              throw new u("\\renewcommand{" + c + "} when command " + c + " does not yet exist; use \\newcommand");
            let b = 0;
            if (l = t.consumeArg().tokens, l.length === 1 && l[0].text === "[") {
              let y = "", v = t.expandNextToken();
              for (; v.text !== "]" && v.text !== "EOF"; )
                y += v.text, v = t.expandNextToken();
              if (!y.match(/^\s*[0-9]+\s*$/))
                throw new u("Invalid number of arguments: " + y);
              b = parseInt(y), l = t.consumeArg().tokens;
            }
            return t.macros.set(c, {
              tokens: l,
              numArgs: b
            }), "";
          };
          D("\\newcommand", (t) => us(t, !1, !0)), D("\\renewcommand", (t) => us(t, !0, !1)), D("\\providecommand", (t) => us(t, !0, !0)), D("\\message", (t) => {
            const e = t.consumeArgs(1)[0];
            return console.log(e.reverse().map((r) => r.text).join("")), "";
          }), D("\\errmessage", (t) => {
            const e = t.consumeArgs(1)[0];
            return console.error(e.reverse().map((r) => r.text).join("")), "";
          }), D("\\show", (t) => {
            const e = t.popToken(), r = e.text;
            return console.log(e, t.macros.get(r), z0[r], ye.math[r], ye.text[r]), "";
          }), D("\\bgroup", "{"), D("\\egroup", "}"), D("~", "\\nobreakspace"), D("\\lq", "`"), D("\\rq", "'"), D("\\aa", "\\r a"), D("\\AA", "\\r A"), D("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), D("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), D("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), D("ℬ", "\\mathscr{B}"), D("ℰ", "\\mathscr{E}"), D("ℱ", "\\mathscr{F}"), D("ℋ", "\\mathscr{H}"), D("ℐ", "\\mathscr{I}"), D("ℒ", "\\mathscr{L}"), D("ℳ", "\\mathscr{M}"), D("ℛ", "\\mathscr{R}"), D("ℭ", "\\mathfrak{C}"), D("ℌ", "\\mathfrak{H}"), D("ℨ", "\\mathfrak{Z}"), D("\\Bbbk", "\\Bbb{k}"), D("·", "\\cdotp"), D("\\llap", "\\mathllap{\\textrm{#1}}"), D("\\rlap", "\\mathrlap{\\textrm{#1}}"), D("\\clap", "\\mathclap{\\textrm{#1}}"), D("\\mathstrut", "\\vphantom{(}"), D("\\underbar", "\\underline{\\text{#1}}"), D("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'), D("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), D("\\ne", "\\neq"), D("≠", "\\neq"), D("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), D("∉", "\\notin"), D("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), D("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), D("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), D("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), D("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), D("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), D("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), D("⟂", "\\perp"), D("‼", "\\mathclose{!\\mkern-0.8mu!}"), D("∌", "\\notni"), D("⌜", "\\ulcorner"), D("⌝", "\\urcorner"), D("⌞", "\\llcorner"), D("⌟", "\\lrcorner"), D("©", "\\copyright"), D("®", "\\textregistered"), D("️", "\\textregistered"), D("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'), D("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'), D("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'), D("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'), D("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}"), D("⋮", "\\vdots"), D("\\varGamma", "\\mathit{\\Gamma}"), D("\\varDelta", "\\mathit{\\Delta}"), D("\\varTheta", "\\mathit{\\Theta}"), D("\\varLambda", "\\mathit{\\Lambda}"), D("\\varXi", "\\mathit{\\Xi}"), D("\\varPi", "\\mathit{\\Pi}"), D("\\varSigma", "\\mathit{\\Sigma}"), D("\\varUpsilon", "\\mathit{\\Upsilon}"), D("\\varPhi", "\\mathit{\\Phi}"), D("\\varPsi", "\\mathit{\\Psi}"), D("\\varOmega", "\\mathit{\\Omega}"), D("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), D("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), D("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), D("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), D("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), D("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
          const ol = {
            ",": "\\dotsc",
            "\\not": "\\dotsb",
            // \keybin@ checks for the following:
            "+": "\\dotsb",
            "=": "\\dotsb",
            "<": "\\dotsb",
            ">": "\\dotsb",
            "-": "\\dotsb",
            "*": "\\dotsb",
            ":": "\\dotsb",
            // Symbols whose definition starts with \DOTSB:
            "\\DOTSB": "\\dotsb",
            "\\coprod": "\\dotsb",
            "\\bigvee": "\\dotsb",
            "\\bigwedge": "\\dotsb",
            "\\biguplus": "\\dotsb",
            "\\bigcap": "\\dotsb",
            "\\bigcup": "\\dotsb",
            "\\prod": "\\dotsb",
            "\\sum": "\\dotsb",
            "\\bigotimes": "\\dotsb",
            "\\bigoplus": "\\dotsb",
            "\\bigodot": "\\dotsb",
            "\\bigsqcup": "\\dotsb",
            "\\And": "\\dotsb",
            "\\longrightarrow": "\\dotsb",
            "\\Longrightarrow": "\\dotsb",
            "\\longleftarrow": "\\dotsb",
            "\\Longleftarrow": "\\dotsb",
            "\\longleftrightarrow": "\\dotsb",
            "\\Longleftrightarrow": "\\dotsb",
            "\\mapsto": "\\dotsb",
            "\\longmapsto": "\\dotsb",
            "\\hookrightarrow": "\\dotsb",
            "\\doteq": "\\dotsb",
            // Symbols whose definition starts with \mathbin:
            "\\mathbin": "\\dotsb",
            // Symbols whose definition starts with \mathrel:
            "\\mathrel": "\\dotsb",
            "\\relbar": "\\dotsb",
            "\\Relbar": "\\dotsb",
            "\\xrightarrow": "\\dotsb",
            "\\xleftarrow": "\\dotsb",
            // Symbols whose definition starts with \DOTSI:
            "\\DOTSI": "\\dotsi",
            "\\int": "\\dotsi",
            "\\oint": "\\dotsi",
            "\\iint": "\\dotsi",
            "\\iiint": "\\dotsi",
            "\\iiiint": "\\dotsi",
            "\\idotsint": "\\dotsi",
            // Symbols whose definition starts with \DOTSX:
            "\\DOTSX": "\\dotsx"
          };
          D("\\dots", function(t) {
            let e = "\\dotso";
            const r = t.expandAfterFuture().text;
            return r in ol ? e = ol[r] : (r.slice(0, 4) === "\\not" || r in ye.math && U.contains(["bin", "rel"], ye.math[r].group)) && (e = "\\dotsb"), e;
          });
          const cs = {
            // \rightdelim@ checks for the following:
            ")": !0,
            "]": !0,
            "\\rbrack": !0,
            "\\}": !0,
            "\\rbrace": !0,
            "\\rangle": !0,
            "\\rceil": !0,
            "\\rfloor": !0,
            "\\rgroup": !0,
            "\\rmoustache": !0,
            "\\right": !0,
            "\\bigr": !0,
            "\\biggr": !0,
            "\\Bigr": !0,
            "\\Biggr": !0,
            // \extra@ also tests for the following:
            $: !0,
            // \extrap@ checks for the following:
            ";": !0,
            ".": !0,
            ",": !0
          };
          D("\\dotso", function(t) {
            return t.future().text in cs ? "\\ldots\\," : "\\ldots";
          }), D("\\dotsc", function(t) {
            const e = t.future().text;
            return e in cs && e !== "," ? "\\ldots\\," : "\\ldots";
          }), D("\\cdots", function(t) {
            return t.future().text in cs ? "\\@cdots\\," : "\\@cdots";
          }), D("\\dotsb", "\\cdots"), D("\\dotsm", "\\cdots"), D("\\dotsi", "\\!\\cdots"), D("\\dotsx", "\\ldots\\,"), D("\\DOTSI", "\\relax"), D("\\DOTSB", "\\relax"), D("\\DOTSX", "\\relax"), D("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), D("\\,", "\\tmspace+{3mu}{.1667em}"), D("\\thinspace", "\\,"), D("\\>", "\\mskip{4mu}"), D("\\:", "\\tmspace+{4mu}{.2222em}"), D("\\medspace", "\\:"), D("\\;", "\\tmspace+{5mu}{.2777em}"), D("\\thickspace", "\\;"), D("\\!", "\\tmspace-{3mu}{.1667em}"), D("\\negthinspace", "\\!"), D("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), D("\\negthickspace", "\\tmspace-{5mu}{.277em}"), D("\\enspace", "\\kern.5em "), D("\\enskip", "\\hskip.5em\\relax"), D("\\quad", "\\hskip1em\\relax"), D("\\qquad", "\\hskip2em\\relax"), D("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), D("\\tag@paren", "\\tag@literal{({#1})}"), D("\\tag@literal", (t) => {
            if (t.macros.get("\\df@tag"))
              throw new u("Multiple \\tag");
            return "\\gdef\\df@tag{\\text{#1}}";
          }), D("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), D("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), D("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), D("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), D("\\newline", "\\\\\\relax"), D("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
          const ul = Q(Et["Main-Regular"][84][1] - 0.7 * Et["Main-Regular"][65][1]);
          D("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + ul + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), D("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + ul + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), D("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), D("\\@hspace", "\\hskip #1\\relax"), D("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), D("\\ordinarycolon", ":"), D("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), D("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'), D("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'), D("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'), D("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'), D("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'), D("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'), D("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'), D("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'), D("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'), D("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'), D("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'), D("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'), D("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'), D("∷", "\\dblcolon"), D("∹", "\\eqcolon"), D("≔", "\\coloneqq"), D("≕", "\\eqqcolon"), D("⩴", "\\Coloneqq"), D("\\ratio", "\\vcentcolon"), D("\\coloncolon", "\\dblcolon"), D("\\colonequals", "\\coloneqq"), D("\\coloncolonequals", "\\Coloneqq"), D("\\equalscolon", "\\eqqcolon"), D("\\equalscoloncolon", "\\Eqqcolon"), D("\\colonminus", "\\coloneq"), D("\\coloncolonminus", "\\Coloneq"), D("\\minuscolon", "\\eqcolon"), D("\\minuscoloncolon", "\\Eqcolon"), D("\\coloncolonapprox", "\\Colonapprox"), D("\\coloncolonsim", "\\Colonsim"), D("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), D("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), D("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), D("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), D("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), D("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), D("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), D("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), D("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), D("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), D("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), D("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), D("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), D("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), D("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), D("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), D("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), D("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), D("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), D("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), D("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), D("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), D("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), D("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), D("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), D("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), D("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), D("\\imath", "\\html@mathml{\\@imath}{ı}"), D("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), D("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), D("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), D("⟦", "\\llbracket"), D("⟧", "\\rrbracket"), D("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), D("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), D("⦃", "\\lBrace"), D("⦄", "\\rBrace"), D("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), D("⦵", "\\minuso"), D("\\darr", "\\downarrow"), D("\\dArr", "\\Downarrow"), D("\\Darr", "\\Downarrow"), D("\\lang", "\\langle"), D("\\rang", "\\rangle"), D("\\uarr", "\\uparrow"), D("\\uArr", "\\Uparrow"), D("\\Uarr", "\\Uparrow"), D("\\N", "\\mathbb{N}"), D("\\R", "\\mathbb{R}"), D("\\Z", "\\mathbb{Z}"), D("\\alef", "\\aleph"), D("\\alefsym", "\\aleph"), D("\\Alpha", "\\mathrm{A}"), D("\\Beta", "\\mathrm{B}"), D("\\bull", "\\bullet"), D("\\Chi", "\\mathrm{X}"), D("\\clubs", "\\clubsuit"), D("\\cnums", "\\mathbb{C}"), D("\\Complex", "\\mathbb{C}"), D("\\Dagger", "\\ddagger"), D("\\diamonds", "\\diamondsuit"), D("\\empty", "\\emptyset"), D("\\Epsilon", "\\mathrm{E}"), D("\\Eta", "\\mathrm{H}"), D("\\exist", "\\exists"), D("\\harr", "\\leftrightarrow"), D("\\hArr", "\\Leftrightarrow"), D("\\Harr", "\\Leftrightarrow"), D("\\hearts", "\\heartsuit"), D("\\image", "\\Im"), D("\\infin", "\\infty"), D("\\Iota", "\\mathrm{I}"), D("\\isin", "\\in"), D("\\Kappa", "\\mathrm{K}"), D("\\larr", "\\leftarrow"), D("\\lArr", "\\Leftarrow"), D("\\Larr", "\\Leftarrow"), D("\\lrarr", "\\leftrightarrow"), D("\\lrArr", "\\Leftrightarrow"), D("\\Lrarr", "\\Leftrightarrow"), D("\\Mu", "\\mathrm{M}"), D("\\natnums", "\\mathbb{N}"), D("\\Nu", "\\mathrm{N}"), D("\\Omicron", "\\mathrm{O}"), D("\\plusmn", "\\pm"), D("\\rarr", "\\rightarrow"), D("\\rArr", "\\Rightarrow"), D("\\Rarr", "\\Rightarrow"), D("\\real", "\\Re"), D("\\reals", "\\mathbb{R}"), D("\\Reals", "\\mathbb{R}"), D("\\Rho", "\\mathrm{P}"), D("\\sdot", "\\cdot"), D("\\sect", "\\S"), D("\\spades", "\\spadesuit"), D("\\sub", "\\subset"), D("\\sube", "\\subseteq"), D("\\supe", "\\supseteq"), D("\\Tau", "\\mathrm{T}"), D("\\thetasym", "\\vartheta"), D("\\weierp", "\\wp"), D("\\Zeta", "\\mathrm{Z}"), D("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), D("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), D("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), D("\\bra", "\\mathinner{\\langle{#1}|}"), D("\\ket", "\\mathinner{|{#1}\\rangle}"), D("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), D("\\Bra", "\\left\\langle#1\\right|"), D("\\Ket", "\\left|#1\\right\\rangle");
          const cl = (t) => (e) => {
            const r = e.consumeArg().tokens, l = e.consumeArg().tokens, c = e.consumeArg().tokens, m = e.consumeArg().tokens, b = e.macros.get("|"), y = e.macros.get("\\|");
            e.macros.beginGroup();
            const v = (R) => (q) => {
              t && (q.macros.set("|", b), c.length && q.macros.set("\\|", y));
              let Y = R;
              return !R && c.length && q.future().text === "|" && (q.popToken(), Y = !0), {
                tokens: Y ? c : l,
                numArgs: 0
              };
            };
            e.macros.set("|", v(!1)), c.length && e.macros.set("\\|", v(!0));
            const C = e.consumeArg().tokens, N = e.expandTokens([
              ...m,
              ...C,
              ...r
              // reversed
            ]);
            return e.macros.endGroup(), {
              tokens: N.reverse(),
              numArgs: 0
            };
          };
          D("\\bra@ket", cl(!1)), D("\\bra@set", cl(!0)), D("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), D("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), D("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), D("\\angln", "{\\angl n}"), D("\\blue", "\\textcolor{##6495ed}{#1}"), D("\\orange", "\\textcolor{##ffa500}{#1}"), D("\\pink", "\\textcolor{##ff00af}{#1}"), D("\\red", "\\textcolor{##df0030}{#1}"), D("\\green", "\\textcolor{##28ae7b}{#1}"), D("\\gray", "\\textcolor{gray}{#1}"), D("\\purple", "\\textcolor{##9d38bd}{#1}"), D("\\blueA", "\\textcolor{##ccfaff}{#1}"), D("\\blueB", "\\textcolor{##80f6ff}{#1}"), D("\\blueC", "\\textcolor{##63d9ea}{#1}"), D("\\blueD", "\\textcolor{##11accd}{#1}"), D("\\blueE", "\\textcolor{##0c7f99}{#1}"), D("\\tealA", "\\textcolor{##94fff5}{#1}"), D("\\tealB", "\\textcolor{##26edd5}{#1}"), D("\\tealC", "\\textcolor{##01d1c1}{#1}"), D("\\tealD", "\\textcolor{##01a995}{#1}"), D("\\tealE", "\\textcolor{##208170}{#1}"), D("\\greenA", "\\textcolor{##b6ffb0}{#1}"), D("\\greenB", "\\textcolor{##8af281}{#1}"), D("\\greenC", "\\textcolor{##74cf70}{#1}"), D("\\greenD", "\\textcolor{##1fab54}{#1}"), D("\\greenE", "\\textcolor{##0d923f}{#1}"), D("\\goldA", "\\textcolor{##ffd0a9}{#1}"), D("\\goldB", "\\textcolor{##ffbb71}{#1}"), D("\\goldC", "\\textcolor{##ff9c39}{#1}"), D("\\goldD", "\\textcolor{##e07d10}{#1}"), D("\\goldE", "\\textcolor{##a75a05}{#1}"), D("\\redA", "\\textcolor{##fca9a9}{#1}"), D("\\redB", "\\textcolor{##ff8482}{#1}"), D("\\redC", "\\textcolor{##f9685d}{#1}"), D("\\redD", "\\textcolor{##e84d39}{#1}"), D("\\redE", "\\textcolor{##bc2612}{#1}"), D("\\maroonA", "\\textcolor{##ffbde0}{#1}"), D("\\maroonB", "\\textcolor{##ff92c6}{#1}"), D("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), D("\\maroonD", "\\textcolor{##ca337c}{#1}"), D("\\maroonE", "\\textcolor{##9e034e}{#1}"), D("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), D("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), D("\\purpleC", "\\textcolor{##aa87ff}{#1}"), D("\\purpleD", "\\textcolor{##7854ab}{#1}"), D("\\purpleE", "\\textcolor{##543b78}{#1}"), D("\\mintA", "\\textcolor{##f5f9e8}{#1}"), D("\\mintB", "\\textcolor{##edf2df}{#1}"), D("\\mintC", "\\textcolor{##e0e5cc}{#1}"), D("\\grayA", "\\textcolor{##f6f7f7}{#1}"), D("\\grayB", "\\textcolor{##f0f1f2}{#1}"), D("\\grayC", "\\textcolor{##e3e5e6}{#1}"), D("\\grayD", "\\textcolor{##d6d8da}{#1}"), D("\\grayE", "\\textcolor{##babec2}{#1}"), D("\\grayF", "\\textcolor{##888d93}{#1}"), D("\\grayG", "\\textcolor{##626569}{#1}"), D("\\grayH", "\\textcolor{##3b3e40}{#1}"), D("\\grayI", "\\textcolor{##21242c}{#1}"), D("\\kaBlue", "\\textcolor{##314453}{#1}"), D("\\kaGreen", "\\textcolor{##71B307}{#1}");
          const hl = {
            "^": !0,
            // Parser.js
            _: !0,
            // Parser.js
            "\\limits": !0,
            // Parser.js
            "\\nolimits": !0
            // Parser.js
          };
          class Yu {
            constructor(e, r, l) {
              this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = r, this.expansionCount = 0, this.feed(e), this.macros = new ju(Xu, r.macros), this.mode = l, this.stack = [];
            }
            /**
             * Feed a new input string to the same MacroExpander
             * (with existing macros etc.).
             */
            feed(e) {
              this.lexer = new ll(e, this.settings);
            }
            /**
             * Switches between "text" and "math" modes.
             */
            switchMode(e) {
              this.mode = e;
            }
            /**
             * Start a new group nesting within all namespaces.
             */
            beginGroup() {
              this.macros.beginGroup();
            }
            /**
             * End current group nesting within all namespaces.
             */
            endGroup() {
              this.macros.endGroup();
            }
            /**
             * Ends all currently nested groups (if any), restoring values before the
             * groups began.  Useful in case of an error in the middle of parsing.
             */
            endGroups() {
              this.macros.endGroups();
            }
            /**
             * Returns the topmost token on the stack, without expanding it.
             * Similar in behavior to TeX's `\futurelet`.
             */
            future() {
              return this.stack.length === 0 && this.pushToken(this.lexer.lex()), this.stack[this.stack.length - 1];
            }
            /**
             * Remove and return the next unexpanded token.
             */
            popToken() {
              return this.future(), this.stack.pop();
            }
            /**
             * Add a given token to the token stack.  In particular, this get be used
             * to put back a token returned from one of the other methods.
             */
            pushToken(e) {
              this.stack.push(e);
            }
            /**
             * Append an array of tokens to the token stack.
             */
            pushTokens(e) {
              this.stack.push(...e);
            }
            /**
             * Find an macro argument without expanding tokens and append the array of
             * tokens to the token stack. Uses Token as a container for the result.
             */
            scanArgument(e) {
              let r, l, c;
              if (e) {
                if (this.consumeSpaces(), this.future().text !== "[")
                  return null;
                r = this.popToken(), {
                  tokens: c,
                  end: l
                } = this.consumeArg(["]"]);
              } else
                ({
                  tokens: c,
                  start: r,
                  end: l
                } = this.consumeArg());
              return this.pushToken(new Pt("EOF", l.loc)), this.pushTokens(c), r.range(l, "");
            }
            /**
             * Consume all following space tokens, without expansion.
             */
            consumeSpaces() {
              for (; this.future().text === " "; )
                this.stack.pop();
            }
            /**
             * Consume an argument from the token stream, and return the resulting array
             * of tokens and start/end token.
             */
            consumeArg(e) {
              const r = [], l = e && e.length > 0;
              l || this.consumeSpaces();
              const c = this.future();
              let m, b = 0, y = 0;
              do {
                if (m = this.popToken(), r.push(m), m.text === "{")
                  ++b;
                else if (m.text === "}") {
                  if (--b, b === -1)
                    throw new u("Extra }", m);
                } else if (m.text === "EOF")
                  throw new u("Unexpected end of input in a macro argument, expected '" + (e && l ? e[y] : "}") + "'", m);
                if (e && l)
                  if ((b === 0 || b === 1 && e[y] === "{") && m.text === e[y]) {
                    if (++y, y === e.length) {
                      r.splice(-y, y);
                      break;
                    }
                  } else
                    y = 0;
              } while (b !== 0 || l);
              return c.text === "{" && r[r.length - 1].text === "}" && (r.pop(), r.shift()), r.reverse(), {
                tokens: r,
                start: c,
                end: m
              };
            }
            /**
             * Consume the specified number of (delimited) arguments from the token
             * stream and return the resulting array of arguments.
             */
            consumeArgs(e, r) {
              if (r) {
                if (r.length !== e + 1)
                  throw new u("The length of delimiters doesn't match the number of args!");
                const c = r[0];
                for (let m = 0; m < c.length; m++) {
                  const b = this.popToken();
                  if (c[m] !== b.text)
                    throw new u("Use of the macro doesn't match its definition", b);
                }
              }
              const l = [];
              for (let c = 0; c < e; c++)
                l.push(this.consumeArg(r && r[c + 1]).tokens);
              return l;
            }
            /**
             * Increment `expansionCount` by the specified amount.
             * Throw an error if it exceeds `maxExpand`.
             */
            countExpansion(e) {
              if (this.expansionCount += e, this.expansionCount > this.settings.maxExpand)
                throw new u("Too many expansions: infinite loop or need to increase maxExpand setting");
            }
            /**
             * Expand the next token only once if possible.
             *
             * If the token is expanded, the resulting tokens will be pushed onto
             * the stack in reverse order, and the number of such tokens will be
             * returned.  This number might be zero or positive.
             *
             * If not, the return value is `false`, and the next token remains at the
             * top of the stack.
             *
             * In either case, the next token will be on the top of the stack,
             * or the stack will be empty (in case of empty expansion
             * and no other tokens).
             *
             * Used to implement `expandAfterFuture` and `expandNextToken`.
             *
             * If expandableOnly, only expandable tokens are expanded and
             * an undefined control sequence results in an error.
             */
            expandOnce(e) {
              const r = this.popToken(), l = r.text, c = r.noexpand ? null : this._getExpansion(l);
              if (c == null || e && c.unexpandable) {
                if (e && c == null && l[0] === "\\" && !this.isDefined(l))
                  throw new u("Undefined control sequence: " + l);
                return this.pushToken(r), !1;
              }
              this.countExpansion(1);
              let m = c.tokens;
              const b = this.consumeArgs(c.numArgs, c.delimiters);
              if (c.numArgs) {
                m = m.slice();
                for (let y = m.length - 1; y >= 0; --y) {
                  let v = m[y];
                  if (v.text === "#") {
                    if (y === 0)
                      throw new u("Incomplete placeholder at end of macro body", v);
                    if (v = m[--y], v.text === "#")
                      m.splice(y + 1, 1);
                    else if (/^[1-9]$/.test(v.text))
                      m.splice(y, 2, ...b[+v.text - 1]);
                    else
                      throw new u("Not a valid argument number", v);
                  }
                }
              }
              return this.pushTokens(m), m.length;
            }
            /**
             * Expand the next token only once (if possible), and return the resulting
             * top token on the stack (without removing anything from the stack).
             * Similar in behavior to TeX's `\expandafter\futurelet`.
             * Equivalent to expandOnce() followed by future().
             */
            expandAfterFuture() {
              return this.expandOnce(), this.future();
            }
            /**
             * Recursively expand first token, then return first non-expandable token.
             */
            expandNextToken() {
              for (; ; )
                if (this.expandOnce() === !1) {
                  const e = this.stack.pop();
                  return e.treatAsRelax && (e.text = "\\relax"), e;
                }
              throw new Error();
            }
            /**
             * Fully expand the given macro name and return the resulting list of
             * tokens, or return `undefined` if no such macro is defined.
             */
            expandMacro(e) {
              return this.macros.has(e) ? this.expandTokens([new Pt(e)]) : void 0;
            }
            /**
             * Fully expand the given token stream and return the resulting list of
             * tokens.  Note that the input tokens are in reverse order, but the
             * output tokens are in forward order.
             */
            expandTokens(e) {
              const r = [], l = this.stack.length;
              for (this.pushTokens(e); this.stack.length > l; )
                if (this.expandOnce(!0) === !1) {
                  const c = this.stack.pop();
                  c.treatAsRelax && (c.noexpand = !1, c.treatAsRelax = !1), r.push(c);
                }
              return this.countExpansion(r.length), r;
            }
            /**
             * Fully expand the given macro name and return the result as a string,
             * or return `undefined` if no such macro is defined.
             */
            expandMacroAsText(e) {
              const r = this.expandMacro(e);
              return r && r.map((l) => l.text).join("");
            }
            /**
             * Returns the expanded macro as a reversed array of tokens and a macro
             * argument count.  Or returns `null` if no such macro.
             */
            _getExpansion(e) {
              const r = this.macros.get(e);
              if (r == null)
                return r;
              if (e.length === 1) {
                const c = this.lexer.catcodes[e];
                if (c != null && c !== 13)
                  return;
              }
              const l = typeof r == "function" ? r(this) : r;
              if (typeof l == "string") {
                let c = 0;
                if (l.indexOf("#") !== -1) {
                  const C = l.replace(/##/g, "");
                  for (; C.indexOf("#" + (c + 1)) !== -1; )
                    ++c;
                }
                const m = new ll(l, this.settings), b = [];
                let y = m.lex();
                for (; y.text !== "EOF"; )
                  b.push(y), y = m.lex();
                return b.reverse(), {
                  tokens: b,
                  numArgs: c
                };
              }
              return l;
            }
            /**
             * Determine whether a command is currently "defined" (has some
             * functionality), meaning that it's a macro (in the current group),
             * a function, a symbol, or one of the special commands listed in
             * `implicitCommands`.
             */
            isDefined(e) {
              return this.macros.has(e) || z0.hasOwnProperty(e) || ye.math.hasOwnProperty(e) || ye.text.hasOwnProperty(e) || hl.hasOwnProperty(e);
            }
            /**
             * Determine whether a command is expandable.
             */
            isExpandable(e) {
              const r = this.macros.get(e);
              return r != null ? typeof r == "string" || typeof r == "function" || !r.unexpandable : z0.hasOwnProperty(e) && !z0[e].primitive;
            }
          }
          const fl = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, er = Object.freeze({
            "₊": "+",
            "₋": "-",
            "₌": "=",
            "₍": "(",
            "₎": ")",
            "₀": "0",
            "₁": "1",
            "₂": "2",
            "₃": "3",
            "₄": "4",
            "₅": "5",
            "₆": "6",
            "₇": "7",
            "₈": "8",
            "₉": "9",
            "ₐ": "a",
            "ₑ": "e",
            "ₕ": "h",
            "ᵢ": "i",
            "ⱼ": "j",
            "ₖ": "k",
            "ₗ": "l",
            "ₘ": "m",
            "ₙ": "n",
            "ₒ": "o",
            "ₚ": "p",
            "ᵣ": "r",
            "ₛ": "s",
            "ₜ": "t",
            "ᵤ": "u",
            "ᵥ": "v",
            "ₓ": "x",
            "ᵦ": "β",
            "ᵧ": "γ",
            "ᵨ": "ρ",
            "ᵩ": "ϕ",
            "ᵪ": "χ",
            "⁺": "+",
            "⁻": "-",
            "⁼": "=",
            "⁽": "(",
            "⁾": ")",
            "⁰": "0",
            "¹": "1",
            "²": "2",
            "³": "3",
            "⁴": "4",
            "⁵": "5",
            "⁶": "6",
            "⁷": "7",
            "⁸": "8",
            "⁹": "9",
            "ᴬ": "A",
            "ᴮ": "B",
            "ᴰ": "D",
            "ᴱ": "E",
            "ᴳ": "G",
            "ᴴ": "H",
            "ᴵ": "I",
            "ᴶ": "J",
            "ᴷ": "K",
            "ᴸ": "L",
            "ᴹ": "M",
            "ᴺ": "N",
            "ᴼ": "O",
            "ᴾ": "P",
            "ᴿ": "R",
            "ᵀ": "T",
            "ᵁ": "U",
            "ⱽ": "V",
            "ᵂ": "W",
            "ᵃ": "a",
            "ᵇ": "b",
            "ᶜ": "c",
            "ᵈ": "d",
            "ᵉ": "e",
            "ᶠ": "f",
            "ᵍ": "g",
            ʰ: "h",
            "ⁱ": "i",
            ʲ: "j",
            "ᵏ": "k",
            ˡ: "l",
            "ᵐ": "m",
            ⁿ: "n",
            "ᵒ": "o",
            "ᵖ": "p",
            ʳ: "r",
            ˢ: "s",
            "ᵗ": "t",
            "ᵘ": "u",
            "ᵛ": "v",
            ʷ: "w",
            ˣ: "x",
            ʸ: "y",
            "ᶻ": "z",
            "ᵝ": "β",
            "ᵞ": "γ",
            "ᵟ": "δ",
            "ᵠ": "ϕ",
            "ᵡ": "χ",
            "ᶿ": "θ"
          }), hs = {
            "́": {
              text: "\\'",
              math: "\\acute"
            },
            "̀": {
              text: "\\`",
              math: "\\grave"
            },
            "̈": {
              text: '\\"',
              math: "\\ddot"
            },
            "̃": {
              text: "\\~",
              math: "\\tilde"
            },
            "̄": {
              text: "\\=",
              math: "\\bar"
            },
            "̆": {
              text: "\\u",
              math: "\\breve"
            },
            "̌": {
              text: "\\v",
              math: "\\check"
            },
            "̂": {
              text: "\\^",
              math: "\\hat"
            },
            "̇": {
              text: "\\.",
              math: "\\dot"
            },
            "̊": {
              text: "\\r",
              math: "\\mathring"
            },
            "̋": {
              text: "\\H"
            },
            "̧": {
              text: "\\c"
            }
          }, dl = {
            á: "á",
            à: "à",
            ä: "ä",
            ǟ: "ǟ",
            ã: "ã",
            ā: "ā",
            ă: "ă",
            ắ: "ắ",
            ằ: "ằ",
            ẵ: "ẵ",
            ǎ: "ǎ",
            â: "â",
            ấ: "ấ",
            ầ: "ầ",
            ẫ: "ẫ",
            ȧ: "ȧ",
            ǡ: "ǡ",
            å: "å",
            ǻ: "ǻ",
            ḃ: "ḃ",
            ć: "ć",
            ḉ: "ḉ",
            č: "č",
            ĉ: "ĉ",
            ċ: "ċ",
            ç: "ç",
            ď: "ď",
            ḋ: "ḋ",
            ḑ: "ḑ",
            é: "é",
            è: "è",
            ë: "ë",
            ẽ: "ẽ",
            ē: "ē",
            ḗ: "ḗ",
            ḕ: "ḕ",
            ĕ: "ĕ",
            ḝ: "ḝ",
            ě: "ě",
            ê: "ê",
            ế: "ế",
            ề: "ề",
            ễ: "ễ",
            ė: "ė",
            ȩ: "ȩ",
            ḟ: "ḟ",
            ǵ: "ǵ",
            ḡ: "ḡ",
            ğ: "ğ",
            ǧ: "ǧ",
            ĝ: "ĝ",
            ġ: "ġ",
            ģ: "ģ",
            ḧ: "ḧ",
            ȟ: "ȟ",
            ĥ: "ĥ",
            ḣ: "ḣ",
            ḩ: "ḩ",
            í: "í",
            ì: "ì",
            ï: "ï",
            ḯ: "ḯ",
            ĩ: "ĩ",
            ī: "ī",
            ĭ: "ĭ",
            ǐ: "ǐ",
            î: "î",
            ǰ: "ǰ",
            ĵ: "ĵ",
            ḱ: "ḱ",
            ǩ: "ǩ",
            ķ: "ķ",
            ĺ: "ĺ",
            ľ: "ľ",
            ļ: "ļ",
            ḿ: "ḿ",
            ṁ: "ṁ",
            ń: "ń",
            ǹ: "ǹ",
            ñ: "ñ",
            ň: "ň",
            ṅ: "ṅ",
            ņ: "ņ",
            ó: "ó",
            ò: "ò",
            ö: "ö",
            ȫ: "ȫ",
            õ: "õ",
            ṍ: "ṍ",
            ṏ: "ṏ",
            ȭ: "ȭ",
            ō: "ō",
            ṓ: "ṓ",
            ṑ: "ṑ",
            ŏ: "ŏ",
            ǒ: "ǒ",
            ô: "ô",
            ố: "ố",
            ồ: "ồ",
            ỗ: "ỗ",
            ȯ: "ȯ",
            ȱ: "ȱ",
            ő: "ő",
            ṕ: "ṕ",
            ṗ: "ṗ",
            ŕ: "ŕ",
            ř: "ř",
            ṙ: "ṙ",
            ŗ: "ŗ",
            ś: "ś",
            ṥ: "ṥ",
            š: "š",
            ṧ: "ṧ",
            ŝ: "ŝ",
            ṡ: "ṡ",
            ş: "ş",
            ẗ: "ẗ",
            ť: "ť",
            ṫ: "ṫ",
            ţ: "ţ",
            ú: "ú",
            ù: "ù",
            ü: "ü",
            ǘ: "ǘ",
            ǜ: "ǜ",
            ǖ: "ǖ",
            ǚ: "ǚ",
            ũ: "ũ",
            ṹ: "ṹ",
            ū: "ū",
            ṻ: "ṻ",
            ŭ: "ŭ",
            ǔ: "ǔ",
            û: "û",
            ů: "ů",
            ű: "ű",
            ṽ: "ṽ",
            ẃ: "ẃ",
            ẁ: "ẁ",
            ẅ: "ẅ",
            ŵ: "ŵ",
            ẇ: "ẇ",
            ẘ: "ẘ",
            ẍ: "ẍ",
            ẋ: "ẋ",
            ý: "ý",
            ỳ: "ỳ",
            ÿ: "ÿ",
            ỹ: "ỹ",
            ȳ: "ȳ",
            ŷ: "ŷ",
            ẏ: "ẏ",
            ẙ: "ẙ",
            ź: "ź",
            ž: "ž",
            ẑ: "ẑ",
            ż: "ż",
            Á: "Á",
            À: "À",
            Ä: "Ä",
            Ǟ: "Ǟ",
            Ã: "Ã",
            Ā: "Ā",
            Ă: "Ă",
            Ắ: "Ắ",
            Ằ: "Ằ",
            Ẵ: "Ẵ",
            Ǎ: "Ǎ",
            Â: "Â",
            Ấ: "Ấ",
            Ầ: "Ầ",
            Ẫ: "Ẫ",
            Ȧ: "Ȧ",
            Ǡ: "Ǡ",
            Å: "Å",
            Ǻ: "Ǻ",
            Ḃ: "Ḃ",
            Ć: "Ć",
            Ḉ: "Ḉ",
            Č: "Č",
            Ĉ: "Ĉ",
            Ċ: "Ċ",
            Ç: "Ç",
            Ď: "Ď",
            Ḋ: "Ḋ",
            Ḑ: "Ḑ",
            É: "É",
            È: "È",
            Ë: "Ë",
            Ẽ: "Ẽ",
            Ē: "Ē",
            Ḗ: "Ḗ",
            Ḕ: "Ḕ",
            Ĕ: "Ĕ",
            Ḝ: "Ḝ",
            Ě: "Ě",
            Ê: "Ê",
            Ế: "Ế",
            Ề: "Ề",
            Ễ: "Ễ",
            Ė: "Ė",
            Ȩ: "Ȩ",
            Ḟ: "Ḟ",
            Ǵ: "Ǵ",
            Ḡ: "Ḡ",
            Ğ: "Ğ",
            Ǧ: "Ǧ",
            Ĝ: "Ĝ",
            Ġ: "Ġ",
            Ģ: "Ģ",
            Ḧ: "Ḧ",
            Ȟ: "Ȟ",
            Ĥ: "Ĥ",
            Ḣ: "Ḣ",
            Ḩ: "Ḩ",
            Í: "Í",
            Ì: "Ì",
            Ï: "Ï",
            Ḯ: "Ḯ",
            Ĩ: "Ĩ",
            Ī: "Ī",
            Ĭ: "Ĭ",
            Ǐ: "Ǐ",
            Î: "Î",
            İ: "İ",
            Ĵ: "Ĵ",
            Ḱ: "Ḱ",
            Ǩ: "Ǩ",
            Ķ: "Ķ",
            Ĺ: "Ĺ",
            Ľ: "Ľ",
            Ļ: "Ļ",
            Ḿ: "Ḿ",
            Ṁ: "Ṁ",
            Ń: "Ń",
            Ǹ: "Ǹ",
            Ñ: "Ñ",
            Ň: "Ň",
            Ṅ: "Ṅ",
            Ņ: "Ņ",
            Ó: "Ó",
            Ò: "Ò",
            Ö: "Ö",
            Ȫ: "Ȫ",
            Õ: "Õ",
            Ṍ: "Ṍ",
            Ṏ: "Ṏ",
            Ȭ: "Ȭ",
            Ō: "Ō",
            Ṓ: "Ṓ",
            Ṑ: "Ṑ",
            Ŏ: "Ŏ",
            Ǒ: "Ǒ",
            Ô: "Ô",
            Ố: "Ố",
            Ồ: "Ồ",
            Ỗ: "Ỗ",
            Ȯ: "Ȯ",
            Ȱ: "Ȱ",
            Ő: "Ő",
            Ṕ: "Ṕ",
            Ṗ: "Ṗ",
            Ŕ: "Ŕ",
            Ř: "Ř",
            Ṙ: "Ṙ",
            Ŗ: "Ŗ",
            Ś: "Ś",
            Ṥ: "Ṥ",
            Š: "Š",
            Ṧ: "Ṧ",
            Ŝ: "Ŝ",
            Ṡ: "Ṡ",
            Ş: "Ş",
            Ť: "Ť",
            Ṫ: "Ṫ",
            Ţ: "Ţ",
            Ú: "Ú",
            Ù: "Ù",
            Ü: "Ü",
            Ǘ: "Ǘ",
            Ǜ: "Ǜ",
            Ǖ: "Ǖ",
            Ǚ: "Ǚ",
            Ũ: "Ũ",
            Ṹ: "Ṹ",
            Ū: "Ū",
            Ṻ: "Ṻ",
            Ŭ: "Ŭ",
            Ǔ: "Ǔ",
            Û: "Û",
            Ů: "Ů",
            Ű: "Ű",
            Ṽ: "Ṽ",
            Ẃ: "Ẃ",
            Ẁ: "Ẁ",
            Ẅ: "Ẅ",
            Ŵ: "Ŵ",
            Ẇ: "Ẇ",
            Ẍ: "Ẍ",
            Ẋ: "Ẋ",
            Ý: "Ý",
            Ỳ: "Ỳ",
            Ÿ: "Ÿ",
            Ỹ: "Ỹ",
            Ȳ: "Ȳ",
            Ŷ: "Ŷ",
            Ẏ: "Ẏ",
            Ź: "Ź",
            Ž: "Ž",
            Ẑ: "Ẑ",
            Ż: "Ż",
            ά: "ά",
            ὰ: "ὰ",
            ᾱ: "ᾱ",
            ᾰ: "ᾰ",
            έ: "έ",
            ὲ: "ὲ",
            ή: "ή",
            ὴ: "ὴ",
            ί: "ί",
            ὶ: "ὶ",
            ϊ: "ϊ",
            ΐ: "ΐ",
            ῒ: "ῒ",
            ῑ: "ῑ",
            ῐ: "ῐ",
            ό: "ό",
            ὸ: "ὸ",
            ύ: "ύ",
            ὺ: "ὺ",
            ϋ: "ϋ",
            ΰ: "ΰ",
            ῢ: "ῢ",
            ῡ: "ῡ",
            ῠ: "ῠ",
            ώ: "ώ",
            ὼ: "ὼ",
            Ύ: "Ύ",
            Ὺ: "Ὺ",
            Ϋ: "Ϋ",
            Ῡ: "Ῡ",
            Ῠ: "Ῠ",
            Ώ: "Ώ",
            Ὼ: "Ὼ"
          };
          class tr {
            constructor(e, r) {
              this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new Yu(e, r, this.mode), this.settings = r, this.leftrightDepth = 0;
            }
            /**
             * Checks a result to make sure it has the right type, and throws an
             * appropriate error otherwise.
             */
            expect(e, r) {
              if (r === void 0 && (r = !0), this.fetch().text !== e)
                throw new u("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
              r && this.consume();
            }
            /**
             * Discards the current lookahead token, considering it consumed.
             */
            consume() {
              this.nextToken = null;
            }
            /**
             * Return the current lookahead token, or if there isn't one (at the
             * beginning, or if the previous lookahead token was consume()d),
             * fetch the next token as the new lookahead token and return it.
             */
            fetch() {
              return this.nextToken == null && (this.nextToken = this.gullet.expandNextToken()), this.nextToken;
            }
            /**
             * Switches between "text" and "math" modes.
             */
            switchMode(e) {
              this.mode = e, this.gullet.switchMode(e);
            }
            /**
             * Main parsing function, which parses an entire input.
             */
            parse() {
              this.settings.globalGroup || this.gullet.beginGroup(), this.settings.colorIsTextColor && this.gullet.macros.set("\\color", "\\textcolor");
              try {
                const e = this.parseExpression(!1);
                return this.expect("EOF"), this.settings.globalGroup || this.gullet.endGroup(), e;
              } finally {
                this.gullet.endGroups();
              }
            }
            /**
             * Fully parse a separate sequence of tokens as a separate job.
             * Tokens should be specified in reverse order, as in a MacroDefinition.
             */
            subparse(e) {
              const r = this.nextToken;
              this.consume(), this.gullet.pushToken(new Pt("}")), this.gullet.pushTokens(e);
              const l = this.parseExpression(!1);
              return this.expect("}"), this.nextToken = r, l;
            }
            /**
             * Parses an "expression", which is a list of atoms.
             *
             * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
             *                 happens when functions have higher precedence han infix
             *                 nodes in implicit parses.
             *
             * `breakOnTokenText`: The text of the token that the expression should end
             *                     with, or `null` if something else should end the
             *                     expression.
             */
            parseExpression(e, r) {
              const l = [];
              for (; ; ) {
                this.mode === "math" && this.consumeSpaces();
                const c = this.fetch();
                if (tr.endOfExpression.indexOf(c.text) !== -1 || r && c.text === r || e && z0[c.text] && z0[c.text].infix)
                  break;
                const m = this.parseAtom(r);
                if (m) {
                  if (m.type === "internal")
                    continue;
                } else
                  break;
                l.push(m);
              }
              return this.mode === "text" && this.formLigatures(l), this.handleInfixNodes(l);
            }
            /**
             * Rewrites infix operators such as \over with corresponding commands such
             * as \frac.
             *
             * There can only be one infix operator per group.  If there's more than one
             * then the expression is ambiguous.  This can be resolved by adding {}.
             */
            handleInfixNodes(e) {
              let r = -1, l;
              for (let c = 0; c < e.length; c++)
                if (e[c].type === "infix") {
                  if (r !== -1)
                    throw new u("only one infix operator per group", e[c].token);
                  r = c, l = e[c].replaceWith;
                }
              if (r !== -1 && l) {
                let c, m;
                const b = e.slice(0, r), y = e.slice(r + 1);
                b.length === 1 && b[0].type === "ordgroup" ? c = b[0] : c = {
                  type: "ordgroup",
                  mode: this.mode,
                  body: b
                }, y.length === 1 && y[0].type === "ordgroup" ? m = y[0] : m = {
                  type: "ordgroup",
                  mode: this.mode,
                  body: y
                };
                let v;
                return l === "\\\\abovefrac" ? v = this.callFunction(l, [c, e[r], m], []) : v = this.callFunction(l, [c, m], []), [v];
              } else
                return e;
            }
            /**
             * Handle a subscript or superscript with nice errors.
             */
            handleSupSubscript(e) {
              const r = this.fetch(), l = r.text;
              this.consume(), this.consumeSpaces();
              const c = this.parseGroup(e);
              if (!c)
                throw new u("Expected group after '" + l + "'", r);
              return c;
            }
            /**
             * Converts the textual input of an unsupported command into a text node
             * contained within a color node whose color is determined by errorColor
             */
            formatUnsupportedCmd(e) {
              const r = [];
              for (let m = 0; m < e.length; m++)
                r.push({
                  type: "textord",
                  mode: "text",
                  text: e[m]
                });
              const l = {
                type: "text",
                mode: this.mode,
                body: r
              };
              return {
                type: "color",
                mode: this.mode,
                color: this.settings.errorColor,
                body: [l]
              };
            }
            /**
             * Parses a group with optional super/subscripts.
             */
            parseAtom(e) {
              const r = this.parseGroup("atom", e);
              if (this.mode === "text")
                return r;
              let l, c;
              for (; ; ) {
                this.consumeSpaces();
                const m = this.fetch();
                if (m.text === "\\limits" || m.text === "\\nolimits") {
                  if (r && r.type === "op") {
                    const b = m.text === "\\limits";
                    r.limits = b, r.alwaysHandleSupSub = !0;
                  } else if (r && r.type === "operatorname")
                    r.alwaysHandleSupSub && (r.limits = m.text === "\\limits");
                  else
                    throw new u("Limit controls must follow a math operator", m);
                  this.consume();
                } else if (m.text === "^") {
                  if (l)
                    throw new u("Double superscript", m);
                  l = this.handleSupSubscript("superscript");
                } else if (m.text === "_") {
                  if (c)
                    throw new u("Double subscript", m);
                  c = this.handleSupSubscript("subscript");
                } else if (m.text === "'") {
                  if (l)
                    throw new u("Double superscript", m);
                  const b = {
                    type: "textord",
                    mode: this.mode,
                    text: "\\prime"
                  }, y = [b];
                  for (this.consume(); this.fetch().text === "'"; )
                    y.push(b), this.consume();
                  this.fetch().text === "^" && y.push(this.handleSupSubscript("superscript")), l = {
                    type: "ordgroup",
                    mode: this.mode,
                    body: y
                  };
                } else if (er[m.text]) {
                  const b = fl.test(m.text), y = [];
                  for (y.push(new Pt(er[m.text])), this.consume(); ; ) {
                    const C = this.fetch().text;
                    if (!er[C] || fl.test(C) !== b)
                      break;
                    y.unshift(new Pt(er[C])), this.consume();
                  }
                  const v = this.subparse(y);
                  b ? c = {
                    type: "ordgroup",
                    mode: "math",
                    body: v
                  } : l = {
                    type: "ordgroup",
                    mode: "math",
                    body: v
                  };
                } else
                  break;
              }
              return l || c ? {
                type: "supsub",
                mode: this.mode,
                base: r,
                sup: l,
                sub: c
              } : r;
            }
            /**
             * Parses an entire function, including its base and all of its arguments.
             */
            parseFunction(e, r) {
              const l = this.fetch(), c = l.text, m = z0[c];
              if (!m)
                return null;
              if (this.consume(), r && r !== "atom" && !m.allowedInArgument)
                throw new u("Got function '" + c + "' with no arguments" + (r ? " as " + r : ""), l);
              if (this.mode === "text" && !m.allowedInText)
                throw new u("Can't use function '" + c + "' in text mode", l);
              if (this.mode === "math" && m.allowedInMath === !1)
                throw new u("Can't use function '" + c + "' in math mode", l);
              const {
                args: b,
                optArgs: y
              } = this.parseArguments(c, m);
              return this.callFunction(c, b, y, l, e);
            }
            /**
             * Call a function handler with a suitable context and arguments.
             */
            callFunction(e, r, l, c, m) {
              const b = {
                funcName: e,
                parser: this,
                token: c,
                breakOnTokenText: m
              }, y = z0[e];
              if (y && y.handler)
                return y.handler(b, r, l);
              throw new u("No function handler for " + e);
            }
            /**
             * Parses the arguments of a function or environment
             */
            parseArguments(e, r) {
              const l = r.numArgs + r.numOptionalArgs;
              if (l === 0)
                return {
                  args: [],
                  optArgs: []
                };
              const c = [], m = [];
              for (let b = 0; b < l; b++) {
                let y = r.argTypes && r.argTypes[b];
                const v = b < r.numOptionalArgs;
                (r.primitive && y == null || // \sqrt expands into primitive if optional argument doesn't exist
                r.type === "sqrt" && b === 1 && m[0] == null) && (y = "primitive");
                const C = this.parseGroupOfType("argument to '" + e + "'", y, v);
                if (v)
                  m.push(C);
                else if (C != null)
                  c.push(C);
                else
                  throw new u("Null argument, please report this as a bug");
              }
              return {
                args: c,
                optArgs: m
              };
            }
            /**
             * Parses a group when the mode is changing.
             */
            parseGroupOfType(e, r, l) {
              switch (r) {
                case "color":
                  return this.parseColorGroup(l);
                case "size":
                  return this.parseSizeGroup(l);
                case "url":
                  return this.parseUrlGroup(l);
                case "math":
                case "text":
                  return this.parseArgumentGroup(l, r);
                case "hbox": {
                  const c = this.parseArgumentGroup(l, "text");
                  return c != null ? {
                    type: "styling",
                    mode: c.mode,
                    body: [c],
                    style: "text"
                    // simulate \textstyle
                  } : null;
                }
                case "raw": {
                  const c = this.parseStringGroup("raw", l);
                  return c != null ? {
                    type: "raw",
                    mode: "text",
                    string: c.text
                  } : null;
                }
                case "primitive": {
                  if (l)
                    throw new u("A primitive argument cannot be optional");
                  const c = this.parseGroup(e);
                  if (c == null)
                    throw new u("Expected group as " + e, this.fetch());
                  return c;
                }
                case "original":
                case null:
                case void 0:
                  return this.parseArgumentGroup(l);
                default:
                  throw new u("Unknown group type as " + e, this.fetch());
              }
            }
            /**
             * Discard any space tokens, fetching the next non-space token.
             */
            consumeSpaces() {
              for (; this.fetch().text === " "; )
                this.consume();
            }
            /**
             * Parses a group, essentially returning the string formed by the
             * brace-enclosed tokens plus some position information.
             */
            parseStringGroup(e, r) {
              const l = this.gullet.scanArgument(r);
              if (l == null)
                return null;
              let c = "", m;
              for (; (m = this.fetch()).text !== "EOF"; )
                c += m.text, this.consume();
              return this.consume(), l.text = c, l;
            }
            /**
             * Parses a regex-delimited group: the largest sequence of tokens
             * whose concatenated strings match `regex`. Returns the string
             * formed by the tokens plus some position information.
             */
            parseRegexGroup(e, r) {
              const l = this.fetch();
              let c = l, m = "", b;
              for (; (b = this.fetch()).text !== "EOF" && e.test(m + b.text); )
                c = b, m += c.text, this.consume();
              if (m === "")
                throw new u("Invalid " + r + ": '" + l.text + "'", l);
              return l.range(c, m);
            }
            /**
             * Parses a color description.
             */
            parseColorGroup(e) {
              const r = this.parseStringGroup("color", e);
              if (r == null)
                return null;
              const l = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);
              if (!l)
                throw new u("Invalid color: '" + r.text + "'", r);
              let c = l[0];
              return /^[0-9a-f]{6}$/i.test(c) && (c = "#" + c), {
                type: "color-token",
                mode: this.mode,
                color: c
              };
            }
            /**
             * Parses a size specification, consisting of magnitude and unit.
             */
            parseSizeGroup(e) {
              let r, l = !1;
              if (this.gullet.consumeSpaces(), !e && this.gullet.future().text !== "{" ? r = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : r = this.parseStringGroup("size", e), !r)
                return null;
              !e && r.text.length === 0 && (r.text = "0pt", l = !0);
              const c = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);
              if (!c)
                throw new u("Invalid size: '" + r.text + "'", r);
              const m = {
                number: +(c[1] + c[2]),
                // sign + magnitude, cast to number
                unit: c[3]
              };
              if (!Nt(m))
                throw new u("Invalid unit: '" + m.unit + "'", r);
              return {
                type: "size",
                mode: this.mode,
                value: m,
                isBlank: l
              };
            }
            /**
             * Parses an URL, checking escaped letters and allowed protocols,
             * and setting the catcode of % as an active character (as in \hyperref).
             */
            parseUrlGroup(e) {
              this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
              const r = this.parseStringGroup("url", e);
              if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), r == null)
                return null;
              const l = r.text.replace(/\\([#$%&~_^{}])/g, "$1");
              return {
                type: "url",
                mode: this.mode,
                url: l
              };
            }
            /**
             * Parses an argument with the mode specified.
             */
            parseArgumentGroup(e, r) {
              const l = this.gullet.scanArgument(e);
              if (l == null)
                return null;
              const c = this.mode;
              r && this.switchMode(r), this.gullet.beginGroup();
              const m = this.parseExpression(!1, "EOF");
              this.expect("EOF"), this.gullet.endGroup();
              const b = {
                type: "ordgroup",
                mode: this.mode,
                loc: l.loc,
                body: m
              };
              return r && this.switchMode(c), b;
            }
            /**
             * Parses an ordinary group, which is either a single nucleus (like "x")
             * or an expression in braces (like "{x+y}") or an implicit group, a group
             * that starts at the current position, and ends right before a higher explicit
             * group ends, or at EOF.
             */
            parseGroup(e, r) {
              const l = this.fetch(), c = l.text;
              let m;
              if (c === "{" || c === "\\begingroup") {
                this.consume();
                const b = c === "{" ? "}" : "\\endgroup";
                this.gullet.beginGroup();
                const y = this.parseExpression(!1, b), v = this.fetch();
                this.expect(b), this.gullet.endGroup(), m = {
                  type: "ordgroup",
                  mode: this.mode,
                  loc: Tt.range(l, v),
                  body: y,
                  // A group formed by \begingroup...\endgroup is a semi-simple group
                  // which doesn't affect spacing in math mode, i.e., is transparent.
                  // https://tex.stackexchange.com/questions/1930/when-should-one-
                  // use-begingroup-instead-of-bgroup
                  semisimple: c === "\\begingroup" || void 0
                };
              } else if (m = this.parseFunction(r, e) || this.parseSymbol(), m == null && c[0] === "\\" && !hl.hasOwnProperty(c)) {
                if (this.settings.throwOnError)
                  throw new u("Undefined control sequence: " + c, l);
                m = this.formatUnsupportedCmd(c), this.consume();
              }
              return m;
            }
            /**
             * Form ligature-like combinations of characters for text mode.
             * This includes inputs like "--", "---", "``" and "''".
             * The result will simply replace multiple textord nodes with a single
             * character in each value by a single textord node having multiple
             * characters in its value.  The representation is still ASCII source.
             * The group will be modified in place.
             */
            formLigatures(e) {
              let r = e.length - 1;
              for (let l = 0; l < r; ++l) {
                const c = e[l], m = c.text;
                m === "-" && e[l + 1].text === "-" && (l + 1 < r && e[l + 2].text === "-" ? (e.splice(l, 3, {
                  type: "textord",
                  mode: "text",
                  loc: Tt.range(c, e[l + 2]),
                  text: "---"
                }), r -= 2) : (e.splice(l, 2, {
                  type: "textord",
                  mode: "text",
                  loc: Tt.range(c, e[l + 1]),
                  text: "--"
                }), r -= 1)), (m === "'" || m === "`") && e[l + 1].text === m && (e.splice(l, 2, {
                  type: "textord",
                  mode: "text",
                  loc: Tt.range(c, e[l + 1]),
                  text: m + m
                }), r -= 1);
              }
            }
            /**
             * Parse a single symbol out of the string. Here, we handle single character
             * symbols and special functions like \verb.
             */
            parseSymbol() {
              const e = this.fetch();
              let r = e.text;
              if (/^\\verb[^a-zA-Z]/.test(r)) {
                this.consume();
                let m = r.slice(5);
                const b = m.charAt(0) === "*";
                if (b && (m = m.slice(1)), m.length < 2 || m.charAt(0) !== m.slice(-1))
                  throw new u(`\\verb assertion failed --
                    please report what input caused this bug`);
                return m = m.slice(1, -1), {
                  type: "verb",
                  mode: "text",
                  body: m,
                  star: b
                };
              }
              dl.hasOwnProperty(r[0]) && !ye[this.mode][r[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + r[0] + '" used in math mode', e), r = dl[r[0]] + r.slice(1));
              const l = Vu.exec(r);
              l && (r = r.substring(0, l.index), r === "i" ? r = "ı" : r === "j" && (r = "ȷ"));
              let c;
              if (ye[this.mode][r]) {
                this.settings.strict && this.mode === "math" && et.indexOf(r) >= 0 && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + r[0] + '" used in math mode', e);
                const m = ye[this.mode][r].group, b = Tt.range(e);
                let y;
                if (Pn.hasOwnProperty(m)) {
                  const v = m;
                  y = {
                    type: "atom",
                    mode: this.mode,
                    family: v,
                    loc: b,
                    text: r
                  };
                } else
                  y = {
                    type: m,
                    mode: this.mode,
                    loc: b,
                    text: r
                  };
                c = y;
              } else if (r.charCodeAt(0) >= 128)
                this.settings.strict && (ie(r.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + r[0] + '" used in math mode', e) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + r[0] + '"' + (" (" + r.charCodeAt(0) + ")"), e)), c = {
                  type: "textord",
                  mode: "text",
                  loc: Tt.range(e),
                  text: r
                };
              else
                return null;
              if (this.consume(), l)
                for (let m = 0; m < l[0].length; m++) {
                  const b = l[0][m];
                  if (!hs[b])
                    throw new u("Unknown accent ' " + b + "'", e);
                  const y = hs[b][this.mode] || hs[b].text;
                  if (!y)
                    throw new u("Accent " + b + " unsupported in " + this.mode + " mode", e);
                  c = {
                    type: "accent",
                    mode: this.mode,
                    loc: Tt.range(e),
                    label: y,
                    isStretchy: !1,
                    isShifty: !0,
                    // $FlowFixMe
                    base: c
                  };
                }
              return c;
            }
          }
          tr.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
          var fs = function(t, e) {
            if (!(typeof t == "string" || t instanceof String))
              throw new TypeError("KaTeX can only parse string typed expression");
            const r = new tr(t, e);
            delete r.gullet.macros.current["\\df@tag"];
            let l = r.parse();
            if (delete r.gullet.macros.current["\\current@color"], delete r.gullet.macros.current["\\color"], r.gullet.macros.get("\\df@tag")) {
              if (!e.displayMode)
                throw new u("\\tag works only in display equations");
              l = [{
                type: "tag",
                mode: "text",
                body: l,
                tag: r.subparse([new Pt("\\df@tag")])
              }];
            }
            return l;
          };
          let ml = function(t, e, r) {
            e.textContent = "";
            const l = ds(t, r).toNode();
            e.appendChild(l);
          };
          typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), ml = function() {
            throw new u("KaTeX doesn't work in quirks mode.");
          });
          const Zu = function(t, e) {
            return ds(t, e).toMarkup();
          }, Ku = function(t, e) {
            const r = new M(e);
            return fs(t, r);
          }, pl = function(t, e, r) {
            if (r.throwOnError || !(t instanceof u))
              throw t;
            const l = L.makeSpan(["katex-error"], [new wt(e)]);
            return l.setAttribute("title", t.toString()), l.setAttribute("style", "color:" + r.errorColor), l;
          }, ds = function(t, e) {
            const r = new M(e);
            try {
              const l = fs(t, r);
              return hu(l, t, r);
            } catch (l) {
              return pl(l, t, r);
            }
          };
          var Qu = {
            /**
             * Current KaTeX version
             */
            version: "0.16.10",
            /**
             * Renders the given LaTeX into an HTML+MathML combination, and adds
             * it as a child to the specified DOM node.
             */
            render: ml,
            /**
             * Renders the given LaTeX into an HTML+MathML combination string,
             * for sending to the client.
             */
            renderToString: Zu,
            /**
             * KaTeX error, usually during parsing.
             */
            ParseError: u,
            /**
             * The shema of Settings
             */
            SETTINGS_SCHEMA: A,
            /**
             * Parses the given LaTeX into KaTeX's internal parse tree structure,
             * without rendering to HTML or MathML.
             *
             * NOTE: This method is not currently recommended for public use.
             * The internal tree representation is unstable and is very likely
             * to change. Use at your own risk.
             */
            __parse: Ku,
            /**
             * Renders the given LaTeX into an HTML+MathML internal DOM tree
             * representation, without flattening that representation to a string.
             *
             * NOTE: This method is not currently recommended for public use.
             * The internal tree representation is unstable and is very likely
             * to change. Use at your own risk.
             */
            __renderToDomTree: ds,
            /**
             * Renders the given LaTeX into an HTML internal DOM tree representation,
             * without MathML and without flattening that representation to a string.
             *
             * NOTE: This method is not currently recommended for public use.
             * The internal tree representation is unstable and is very likely
             * to change. Use at your own risk.
             */
            __renderToHTMLTree: function(t, e) {
              const r = new M(e);
              try {
                const l = fs(t, r);
                return fu(l, t, r);
              } catch (l) {
                return pl(l, t, r);
              }
            },
            /**
             * extends internal font metrics object with a new object
             * each key in the new object represents a font name
            */
            __setFontMetrics: un,
            /**
             * adds a new symbol to builtin symbols table
             */
            __defineSymbol: h,
            /**
             * adds a new function to builtin function list,
             * which directly produce parse tree elements
             * and have their own html/mathml builders
             */
            __defineFunction: ee,
            /**
             * adds a new macro to builtin macro list
             */
            __defineMacro: D,
            /**
             * Expose the dom tree node types, which can be useful for type checking nodes.
             *
             * NOTE: This method is not currently recommended for public use.
             * The internal tree representation is unstable and is very likely
             * to change. Use at your own risk.
             */
            __domTree: {
              Span: q0,
              Anchor: je,
              SymbolNode: wt,
              SvgNode: It,
              PathNode: Lt,
              LineNode: J0
            }
          }, Ju = Qu;
          return i = i.default, i;
        }()
      );
    });
  }(Ts)), Ts.exports;
}
(function(a, n) {
  (function(i, o) {
    a.exports = o(J4());
  })(typeof self < "u" ? self : Dr, function(s) {
    return (
      /******/
      function() {
        var i = {
          /***/
          771: (
            /***/
            function(p) {
              p.exports = s;
            }
          )
          /******/
        }, o = {};
        function u(p) {
          var g = o[p];
          if (g !== void 0)
            return g.exports;
          var _ = o[p] = {
            /******/
            // no module.id needed
            /******/
            // no module.loaded needed
            /******/
            exports: {}
            /******/
          };
          return i[p](_, _.exports, u), _.exports;
        }
        (function() {
          u.n = function(p) {
            var g = p && p.__esModule ? (
              /******/
              function() {
                return p.default;
              }
            ) : (
              /******/
              function() {
                return p;
              }
            );
            return u.d(g, { a: g }), g;
          };
        })(), function() {
          u.d = function(p, g) {
            for (var _ in g)
              u.o(g, _) && !u.o(p, _) && Object.defineProperty(p, _, { enumerable: !0, get: g[_] });
          };
        }(), function() {
          u.o = function(p, g) {
            return Object.prototype.hasOwnProperty.call(p, g);
          };
        }();
        var f = {};
        return function() {
          u.d(f, {
            default: function() {
              return (
                /* binding */
                U
              );
            }
          });
          var p = u(771), g = /* @__PURE__ */ u.n(p);
          const _ = function(A, S, M) {
            let I = M, O = 0;
            const H = A.length;
            for (; I < S.length; ) {
              const J = S[I];
              if (O <= 0 && S.slice(I, I + H) === A)
                return I;
              J === "\\" ? I++ : J === "{" ? O++ : J === "}" && O--, I++;
            }
            return -1;
          }, k = function(A) {
            return A.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
          }, T = /^\\begin{/;
          var P = function(A, S) {
            let M;
            const I = [], O = new RegExp("(" + S.map((H) => k(H.left)).join("|") + ")");
            for (; M = A.search(O), M !== -1; ) {
              M > 0 && (I.push({
                type: "text",
                data: A.slice(0, M)
              }), A = A.slice(M));
              const H = S.findIndex((le) => A.startsWith(le.left));
              if (M = _(S[H].right, A, S[H].left.length), M === -1)
                break;
              const J = A.slice(0, M + S[H].right.length), K = T.test(J) ? J : A.slice(S[H].left.length, M);
              I.push({
                type: "math",
                data: K,
                rawData: J,
                display: S[H].display
              }), A = A.slice(M + S[H].right.length);
            }
            return A !== "" && I.push({
              type: "text",
              data: A
            }), I;
          };
          const W = function(A, S) {
            const M = P(A, S.delimiters);
            if (M.length === 1 && M[0].type === "text")
              return null;
            const I = document.createDocumentFragment();
            for (let O = 0; O < M.length; O++)
              if (M[O].type === "text")
                I.appendChild(document.createTextNode(M[O].data));
              else {
                const H = document.createElement("span");
                let J = M[O].data;
                S.displayMode = M[O].display;
                try {
                  S.preProcess && (J = S.preProcess(J)), g().render(J, H, S);
                } catch (K) {
                  if (!(K instanceof g().ParseError))
                    throw K;
                  S.errorCallback("KaTeX auto-render: Failed to parse `" + M[O].data + "` with ", K), I.appendChild(document.createTextNode(M[O].rawData));
                  continue;
                }
                I.appendChild(H);
              }
            return I;
          }, j = function(A, S) {
            for (let M = 0; M < A.childNodes.length; M++) {
              const I = A.childNodes[M];
              if (I.nodeType === 3) {
                let O = I.textContent, H = I.nextSibling, J = 0;
                for (; H && H.nodeType === Node.TEXT_NODE; )
                  O += H.textContent, H = H.nextSibling, J++;
                const K = W(O, S);
                if (K) {
                  for (let le = 0; le < J; le++)
                    I.nextSibling.remove();
                  M += K.childNodes.length - 1, A.replaceChild(K, I);
                } else
                  M += J;
              } else if (I.nodeType === 1) {
                const O = " " + I.className + " ";
                S.ignoredTags.indexOf(I.nodeName.toLowerCase()) === -1 && S.ignoredClasses.every((J) => O.indexOf(" " + J + " ") === -1) && j(I, S);
              }
            }
          };
          var U = function(A, S) {
            if (!A)
              throw new Error("No element provided to render");
            const M = {};
            for (const I in S)
              S.hasOwnProperty(I) && (M[I] = S[I]);
            M.delimiters = M.delimiters || [
              {
                left: "$$",
                right: "$$",
                display: !0
              },
              {
                left: "\\(",
                right: "\\)",
                display: !1
              },
              // LaTeX uses $…$, but it ruins the display of normal `$` in text:
              // {left: "$", right: "$", display: false},
              // $ must come after $$
              // Render AMS environments even if outside $$…$$ delimiters.
              {
                left: "\\begin{equation}",
                right: "\\end{equation}",
                display: !0
              },
              {
                left: "\\begin{align}",
                right: "\\end{align}",
                display: !0
              },
              {
                left: "\\begin{alignat}",
                right: "\\end{alignat}",
                display: !0
              },
              {
                left: "\\begin{gather}",
                right: "\\end{gather}",
                display: !0
              },
              {
                left: "\\begin{CD}",
                right: "\\end{CD}",
                display: !0
              },
              {
                left: "\\[",
                right: "\\]",
                display: !0
              }
            ], M.ignoredTags = M.ignoredTags || ["script", "noscript", "style", "textarea", "pre", "code", "option"], M.ignoredClasses = M.ignoredClasses || [], M.errorCallback = M.errorCallback || console.error, M.macros = M.macros || {}, j(A, M);
          };
        }(), f = f.default, f;
      }()
    );
  });
})(fo);
var $4 = fo.exports;
const eh = /* @__PURE__ */ ho($4);
function Zs() {
  return {
    async: !1,
    breaks: !1,
    extensions: null,
    gfm: !0,
    hooks: null,
    pedantic: !1,
    renderer: null,
    silent: !1,
    tokenizer: null,
    walkTokens: null
  };
}
let Z0 = Zs();
function mo(a) {
  Z0 = a;
}
const po = /[&<>"']/, th = new RegExp(po.source, "g"), go = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, nh = new RegExp(go.source, "g"), rh = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, Kl = (a) => rh[a];
function Bt(a, n) {
  if (n) {
    if (po.test(a))
      return a.replace(th, Kl);
  } else if (go.test(a))
    return a.replace(nh, Kl);
  return a;
}
const sh = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
function ih(a) {
  return a.replace(sh, (n, s) => (s = s.toLowerCase(), s === "colon" ? ":" : s.charAt(0) === "#" ? s.charAt(1) === "x" ? String.fromCharCode(parseInt(s.substring(2), 16)) : String.fromCharCode(+s.substring(1)) : ""));
}
const lh = /(^|[^\[])\^/g;
function Re(a, n) {
  let s = typeof a == "string" ? a : a.source;
  n = n || "";
  const i = {
    replace: (o, u) => {
      let f = typeof u == "string" ? u : u.source;
      return f = f.replace(lh, "$1"), s = s.replace(o, f), i;
    },
    getRegex: () => new RegExp(s, n)
  };
  return i;
}
function Ql(a) {
  try {
    a = encodeURI(a).replace(/%25/g, "%");
  } catch {
    return null;
  }
  return a;
}
const Fn = { exec: () => null };
function Jl(a, n) {
  const s = a.replace(/\|/g, (u, f, p) => {
    let g = !1, _ = f;
    for (; --_ >= 0 && p[_] === "\\"; )
      g = !g;
    return g ? "|" : " |";
  }), i = s.split(/ \|/);
  let o = 0;
  if (i[0].trim() || i.shift(), i.length > 0 && !i[i.length - 1].trim() && i.pop(), n)
    if (i.length > n)
      i.splice(n);
    else
      for (; i.length < n; )
        i.push("");
  for (; o < i.length; o++)
    i[o] = i[o].trim().replace(/\\\|/g, "|");
  return i;
}
function ur(a, n, s) {
  const i = a.length;
  if (i === 0)
    return "";
  let o = 0;
  for (; o < i; ) {
    const u = a.charAt(i - o - 1);
    if (u === n && !s)
      o++;
    else if (u !== n && s)
      o++;
    else
      break;
  }
  return a.slice(0, i - o);
}
function ah(a, n) {
  if (a.indexOf(n[1]) === -1)
    return -1;
  let s = 0;
  for (let i = 0; i < a.length; i++)
    if (a[i] === "\\")
      i++;
    else if (a[i] === n[0])
      s++;
    else if (a[i] === n[1] && (s--, s < 0))
      return i;
  return -1;
}
function $l(a, n, s, i) {
  const o = n.href, u = n.title ? Bt(n.title) : null, f = a[1].replace(/\\([\[\]])/g, "$1");
  if (a[0].charAt(0) !== "!") {
    i.state.inLink = !0;
    const p = {
      type: "link",
      raw: s,
      href: o,
      title: u,
      text: f,
      tokens: i.inlineTokens(f)
    };
    return i.state.inLink = !1, p;
  }
  return {
    type: "image",
    raw: s,
    href: o,
    title: u,
    text: Bt(f)
  };
}
function oh(a, n) {
  const s = a.match(/^(\s+)(?:```)/);
  if (s === null)
    return n;
  const i = s[1];
  return n.split(`
`).map((o) => {
    const u = o.match(/^\s+/);
    if (u === null)
      return o;
    const [f] = u;
    return f.length >= i.length ? o.slice(i.length) : o;
  }).join(`
`);
}
class xr {
  // set by the lexer
  constructor(n) {
    He(this, "options");
    He(this, "rules");
    // set by the lexer
    He(this, "lexer");
    this.options = n || Z0;
  }
  space(n) {
    const s = this.rules.block.newline.exec(n);
    if (s && s[0].length > 0)
      return {
        type: "space",
        raw: s[0]
      };
  }
  code(n) {
    const s = this.rules.block.code.exec(n);
    if (s) {
      const i = s[0].replace(/^ {1,4}/gm, "");
      return {
        type: "code",
        raw: s[0],
        codeBlockStyle: "indented",
        text: this.options.pedantic ? i : ur(i, `
`)
      };
    }
  }
  fences(n) {
    const s = this.rules.block.fences.exec(n);
    if (s) {
      const i = s[0], o = oh(i, s[3] || "");
      return {
        type: "code",
        raw: i,
        lang: s[2] ? s[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : s[2],
        text: o
      };
    }
  }
  heading(n) {
    const s = this.rules.block.heading.exec(n);
    if (s) {
      let i = s[2].trim();
      if (/#$/.test(i)) {
        const o = ur(i, "#");
        (this.options.pedantic || !o || / $/.test(o)) && (i = o.trim());
      }
      return {
        type: "heading",
        raw: s[0],
        depth: s[1].length,
        text: i,
        tokens: this.lexer.inline(i)
      };
    }
  }
  hr(n) {
    const s = this.rules.block.hr.exec(n);
    if (s)
      return {
        type: "hr",
        raw: s[0]
      };
  }
  blockquote(n) {
    const s = this.rules.block.blockquote.exec(n);
    if (s) {
      let i = s[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
    $1`);
      i = ur(i.replace(/^ *>[ \t]?/gm, ""), `
`);
      const o = this.lexer.state.top;
      this.lexer.state.top = !0;
      const u = this.lexer.blockTokens(i);
      return this.lexer.state.top = o, {
        type: "blockquote",
        raw: s[0],
        tokens: u,
        text: i
      };
    }
  }
  list(n) {
    let s = this.rules.block.list.exec(n);
    if (s) {
      let i = s[1].trim();
      const o = i.length > 1, u = {
        type: "list",
        raw: "",
        ordered: o,
        start: o ? +i.slice(0, -1) : "",
        loose: !1,
        items: []
      };
      i = o ? `\\d{1,9}\\${i.slice(-1)}` : `\\${i}`, this.options.pedantic && (i = o ? i : "[*+-]");
      const f = new RegExp(`^( {0,3}${i})((?:[	 ][^\\n]*)?(?:\\n|$))`);
      let p = "", g = "", _ = !1;
      for (; n; ) {
        let k = !1;
        if (!(s = f.exec(n)) || this.rules.block.hr.test(n))
          break;
        p = s[0], n = n.substring(p.length);
        let T = s[2].split(`
`, 1)[0].replace(/^\t+/, (U) => " ".repeat(3 * U.length)), B = n.split(`
`, 1)[0], P = 0;
        this.options.pedantic ? (P = 2, g = T.trimStart()) : (P = s[2].search(/[^ ]/), P = P > 4 ? 1 : P, g = T.slice(P), P += s[1].length);
        let W = !1;
        if (!T && /^ *$/.test(B) && (p += B + `
`, n = n.substring(B.length + 1), k = !0), !k) {
          const U = new RegExp(`^ {0,${Math.min(3, P - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`), A = new RegExp(`^ {0,${Math.min(3, P - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), S = new RegExp(`^ {0,${Math.min(3, P - 1)}}(?:\`\`\`|~~~)`), M = new RegExp(`^ {0,${Math.min(3, P - 1)}}#`);
          for (; n; ) {
            const I = n.split(`
`, 1)[0];
            if (B = I, this.options.pedantic && (B = B.replace(/^ {1,4}(?=( {4})*[^ ])/g, "  ")), S.test(B) || M.test(B) || U.test(B) || A.test(n))
              break;
            if (B.search(/[^ ]/) >= P || !B.trim())
              g += `
` + B.slice(P);
            else {
              if (W || T.search(/[^ ]/) >= 4 || S.test(T) || M.test(T) || A.test(T))
                break;
              g += `
` + B;
            }
            !W && !B.trim() && (W = !0), p += I + `
`, n = n.substring(I.length + 1), T = B.slice(P);
          }
        }
        u.loose || (_ ? u.loose = !0 : /\n *\n *$/.test(p) && (_ = !0));
        let j = null, G;
        this.options.gfm && (j = /^\[[ xX]\] /.exec(g), j && (G = j[0] !== "[ ] ", g = g.replace(/^\[[ xX]\] +/, ""))), u.items.push({
          type: "list_item",
          raw: p,
          task: !!j,
          checked: G,
          loose: !1,
          text: g,
          tokens: []
        }), u.raw += p;
      }
      u.items[u.items.length - 1].raw = p.trimEnd(), u.items[u.items.length - 1].text = g.trimEnd(), u.raw = u.raw.trimEnd();
      for (let k = 0; k < u.items.length; k++)
        if (this.lexer.state.top = !1, u.items[k].tokens = this.lexer.blockTokens(u.items[k].text, []), !u.loose) {
          const T = u.items[k].tokens.filter((P) => P.type === "space"), B = T.length > 0 && T.some((P) => /\n.*\n/.test(P.raw));
          u.loose = B;
        }
      if (u.loose)
        for (let k = 0; k < u.items.length; k++)
          u.items[k].loose = !0;
      return u;
    }
  }
  html(n) {
    const s = this.rules.block.html.exec(n);
    if (s)
      return {
        type: "html",
        block: !0,
        raw: s[0],
        pre: s[1] === "pre" || s[1] === "script" || s[1] === "style",
        text: s[0]
      };
  }
  def(n) {
    const s = this.rules.block.def.exec(n);
    if (s) {
      const i = s[1].toLowerCase().replace(/\s+/g, " "), o = s[2] ? s[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", u = s[3] ? s[3].substring(1, s[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : s[3];
      return {
        type: "def",
        tag: i,
        raw: s[0],
        href: o,
        title: u
      };
    }
  }
  table(n) {
    const s = this.rules.block.table.exec(n);
    if (!s || !/[:|]/.test(s[2]))
      return;
    const i = Jl(s[1]), o = s[2].replace(/^\||\| *$/g, "").split("|"), u = s[3] && s[3].trim() ? s[3].replace(/\n[ \t]*$/, "").split(`
`) : [], f = {
      type: "table",
      raw: s[0],
      header: [],
      align: [],
      rows: []
    };
    if (i.length === o.length) {
      for (const p of o)
        /^ *-+: *$/.test(p) ? f.align.push("right") : /^ *:-+: *$/.test(p) ? f.align.push("center") : /^ *:-+ *$/.test(p) ? f.align.push("left") : f.align.push(null);
      for (const p of i)
        f.header.push({
          text: p,
          tokens: this.lexer.inline(p)
        });
      for (const p of u)
        f.rows.push(Jl(p, f.header.length).map((g) => ({
          text: g,
          tokens: this.lexer.inline(g)
        })));
      return f;
    }
  }
  lheading(n) {
    const s = this.rules.block.lheading.exec(n);
    if (s)
      return {
        type: "heading",
        raw: s[0],
        depth: s[2].charAt(0) === "=" ? 1 : 2,
        text: s[1],
        tokens: this.lexer.inline(s[1])
      };
  }
  paragraph(n) {
    const s = this.rules.block.paragraph.exec(n);
    if (s) {
      const i = s[1].charAt(s[1].length - 1) === `
` ? s[1].slice(0, -1) : s[1];
      return {
        type: "paragraph",
        raw: s[0],
        text: i,
        tokens: this.lexer.inline(i)
      };
    }
  }
  text(n) {
    const s = this.rules.block.text.exec(n);
    if (s)
      return {
        type: "text",
        raw: s[0],
        text: s[0],
        tokens: this.lexer.inline(s[0])
      };
  }
  escape(n) {
    const s = this.rules.inline.escape.exec(n);
    if (s)
      return {
        type: "escape",
        raw: s[0],
        text: Bt(s[1])
      };
  }
  tag(n) {
    const s = this.rules.inline.tag.exec(n);
    if (s)
      return !this.lexer.state.inLink && /^<a /i.test(s[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && /^<\/a>/i.test(s[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(s[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0]) && (this.lexer.state.inRawBlock = !1), {
        type: "html",
        raw: s[0],
        inLink: this.lexer.state.inLink,
        inRawBlock: this.lexer.state.inRawBlock,
        block: !1,
        text: s[0]
      };
  }
  link(n) {
    const s = this.rules.inline.link.exec(n);
    if (s) {
      const i = s[2].trim();
      if (!this.options.pedantic && /^</.test(i)) {
        if (!/>$/.test(i))
          return;
        const f = ur(i.slice(0, -1), "\\");
        if ((i.length - f.length) % 2 === 0)
          return;
      } else {
        const f = ah(s[2], "()");
        if (f > -1) {
          const g = (s[0].indexOf("!") === 0 ? 5 : 4) + s[1].length + f;
          s[2] = s[2].substring(0, f), s[0] = s[0].substring(0, g).trim(), s[3] = "";
        }
      }
      let o = s[2], u = "";
      if (this.options.pedantic) {
        const f = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);
        f && (o = f[1], u = f[3]);
      } else
        u = s[3] ? s[3].slice(1, -1) : "";
      return o = o.trim(), /^</.test(o) && (this.options.pedantic && !/>$/.test(i) ? o = o.slice(1) : o = o.slice(1, -1)), $l(s, {
        href: o && o.replace(this.rules.inline.anyPunctuation, "$1"),
        title: u && u.replace(this.rules.inline.anyPunctuation, "$1")
      }, s[0], this.lexer);
    }
  }
  reflink(n, s) {
    let i;
    if ((i = this.rules.inline.reflink.exec(n)) || (i = this.rules.inline.nolink.exec(n))) {
      const o = (i[2] || i[1]).replace(/\s+/g, " "), u = s[o.toLowerCase()];
      if (!u) {
        const f = i[0].charAt(0);
        return {
          type: "text",
          raw: f,
          text: f
        };
      }
      return $l(i, u, i[0], this.lexer);
    }
  }
  emStrong(n, s, i = "") {
    let o = this.rules.inline.emStrongLDelim.exec(n);
    if (!o || o[3] && i.match(/[\p{L}\p{N}]/u))
      return;
    if (!(o[1] || o[2] || "") || !i || this.rules.inline.punctuation.exec(i)) {
      const f = [...o[0]].length - 1;
      let p, g, _ = f, k = 0;
      const T = o[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
      for (T.lastIndex = 0, s = s.slice(-1 * n.length + f); (o = T.exec(s)) != null; ) {
        if (p = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !p)
          continue;
        if (g = [...p].length, o[3] || o[4]) {
          _ += g;
          continue;
        } else if ((o[5] || o[6]) && f % 3 && !((f + g) % 3)) {
          k += g;
          continue;
        }
        if (_ -= g, _ > 0)
          continue;
        g = Math.min(g, g + _ + k);
        const B = [...o[0]][0].length, P = n.slice(0, f + o.index + B + g);
        if (Math.min(f, g) % 2) {
          const j = P.slice(1, -1);
          return {
            type: "em",
            raw: P,
            text: j,
            tokens: this.lexer.inlineTokens(j)
          };
        }
        const W = P.slice(2, -2);
        return {
          type: "strong",
          raw: P,
          text: W,
          tokens: this.lexer.inlineTokens(W)
        };
      }
    }
  }
  codespan(n) {
    const s = this.rules.inline.code.exec(n);
    if (s) {
      let i = s[2].replace(/\n/g, " ");
      const o = /[^ ]/.test(i), u = /^ /.test(i) && / $/.test(i);
      return o && u && (i = i.substring(1, i.length - 1)), i = Bt(i, !0), {
        type: "codespan",
        raw: s[0],
        text: i
      };
    }
  }
  br(n) {
    const s = this.rules.inline.br.exec(n);
    if (s)
      return {
        type: "br",
        raw: s[0]
      };
  }
  del(n) {
    const s = this.rules.inline.del.exec(n);
    if (s)
      return {
        type: "del",
        raw: s[0],
        text: s[2],
        tokens: this.lexer.inlineTokens(s[2])
      };
  }
  autolink(n) {
    const s = this.rules.inline.autolink.exec(n);
    if (s) {
      let i, o;
      return s[2] === "@" ? (i = Bt(s[1]), o = "mailto:" + i) : (i = Bt(s[1]), o = i), {
        type: "link",
        raw: s[0],
        text: i,
        href: o,
        tokens: [
          {
            type: "text",
            raw: i,
            text: i
          }
        ]
      };
    }
  }
  url(n) {
    var i;
    let s;
    if (s = this.rules.inline.url.exec(n)) {
      let o, u;
      if (s[2] === "@")
        o = Bt(s[0]), u = "mailto:" + o;
      else {
        let f;
        do
          f = s[0], s[0] = ((i = this.rules.inline._backpedal.exec(s[0])) == null ? void 0 : i[0]) ?? "";
        while (f !== s[0]);
        o = Bt(s[0]), s[1] === "www." ? u = "http://" + s[0] : u = s[0];
      }
      return {
        type: "link",
        raw: s[0],
        text: o,
        href: u,
        tokens: [
          {
            type: "text",
            raw: o,
            text: o
          }
        ]
      };
    }
  }
  inlineText(n) {
    const s = this.rules.inline.text.exec(n);
    if (s) {
      let i;
      return this.lexer.state.inRawBlock ? i = s[0] : i = Bt(s[0]), {
        type: "text",
        raw: s[0],
        text: i
      };
    }
  }
}
const uh = /^(?: *(?:\n|$))+/, ch = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, hh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, zn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, fh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, bo = /(?:[*+-]|\d{1,9}[.)])/, wo = Re(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, bo).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), Ks = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dh = /^[^\n]+/, Qs = /(?!\s*\])(?:\\.|[^\[\]\\])+/, mh = Re(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Qs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ph = Re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bo).getRegex(), Tr = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Js = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, gh = Re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Js).replace("tag", Tr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), _o = Re(Ks).replace("hr", zn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tr).getRegex(), bh = Re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", _o).getRegex(), $s = {
  blockquote: bh,
  code: ch,
  def: mh,
  fences: hh,
  heading: fh,
  hr: zn,
  html: gh,
  lheading: wo,
  list: ph,
  newline: uh,
  paragraph: _o,
  table: Fn,
  text: dh
}, ea = Re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", zn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tr).getRegex(), wh = {
  ...$s,
  table: ea,
  paragraph: Re(Ks).replace("hr", zn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ea).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tr).getRegex()
}, _h = {
  ...$s,
  html: Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Js).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
  fences: Fn,
  // fences not supported
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
  paragraph: Re(Ks).replace("hr", zn).replace("heading", ` *#{1,6} *[^
]`).replace("lheading", wo).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
}, yo = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ko = /^( {2,}|\\)\n(?!\s*$)/, kh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Bn = "\\p{P}\\p{S}", Dh = Re(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Bn).getRegex(), xh = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, vh = Re(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Bn).getRegex(), Ah = Re("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Bn).getRegex(), Sh = Re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Bn).getRegex(), Eh = Re(/\\([punct])/, "gu").replace(/punct/g, Bn).getRegex(), Fh = Re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Th = Re(Js).replace("(?:-->|$)", "-->").getRegex(), Ch = Re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Th).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vr = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Mh = Re(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", vr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Do = Re(/^!?\[(label)\]\[(ref)\]/).replace("label", vr).replace("ref", Qs).getRegex(), xo = Re(/^!?\[(ref)\](?:\[\])?/).replace("ref", Qs).getRegex(), zh = Re("reflink|nolink(?!\\()", "g").replace("reflink", Do).replace("nolink", xo).getRegex(), ei = {
  _backpedal: Fn,
  // only used for GFM url
  anyPunctuation: Eh,
  autolink: Fh,
  blockSkip: xh,
  br: ko,
  code: yh,
  del: Fn,
  emStrongLDelim: vh,
  emStrongRDelimAst: Ah,
  emStrongRDelimUnd: Sh,
  escape: yo,
  link: Mh,
  nolink: xo,
  punctuation: Dh,
  reflink: Do,
  reflinkSearch: zh,
  tag: Ch,
  text: kh,
  url: Fn
}, Bh = {
  ...ei,
  link: Re(/^!?\[(label)\]\((.*?)\)/).replace("label", vr).getRegex(),
  reflink: Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vr).getRegex()
}, Hs = {
  ...ei,
  escape: Re(yo).replace("])", "~|])").getRegex(),
  url: Re(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
  del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
}, Nh = {
  ...Hs,
  br: Re(ko).replace("{2,}", "*").getRegex(),
  text: Re(Hs.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
}, cr = {
  normal: $s,
  gfm: wh,
  pedantic: _h
}, xn = {
  normal: ei,
  gfm: Hs,
  breaks: Nh,
  pedantic: Bh
};
class h0 {
  constructor(n) {
    He(this, "tokens");
    He(this, "options");
    He(this, "state");
    He(this, "tokenizer");
    He(this, "inlineQueue");
    this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = n || Z0, this.options.tokenizer = this.options.tokenizer || new xr(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
      inLink: !1,
      inRawBlock: !1,
      top: !0
    };
    const s = {
      block: cr.normal,
      inline: xn.normal
    };
    this.options.pedantic ? (s.block = cr.pedantic, s.inline = xn.pedantic) : this.options.gfm && (s.block = cr.gfm, this.options.breaks ? s.inline = xn.breaks : s.inline = xn.gfm), this.tokenizer.rules = s;
  }
  /**
   * Expose Rules
   */
  static get rules() {
    return {
      block: cr,
      inline: xn
    };
  }
  /**
   * Static Lex Method
   */
  static lex(n, s) {
    return new h0(s).lex(n);
  }
  /**
   * Static Lex Inline Method
   */
  static lexInline(n, s) {
    return new h0(s).inlineTokens(n);
  }
  /**
   * Preprocessing
   */
  lex(n) {
    n = n.replace(/\r\n|\r/g, `
`), this.blockTokens(n, this.tokens);
    for (let s = 0; s < this.inlineQueue.length; s++) {
      const i = this.inlineQueue[s];
      this.inlineTokens(i.src, i.tokens);
    }
    return this.inlineQueue = [], this.tokens;
  }
  blockTokens(n, s = []) {
    this.options.pedantic ? n = n.replace(/\t/g, "    ").replace(/^ +$/gm, "") : n = n.replace(/^( *)(\t+)/gm, (p, g, _) => g + "    ".repeat(_.length));
    let i, o, u, f;
    for (; n; )
      if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((p) => (i = p.call({ lexer: this }, n, s)) ? (n = n.substring(i.raw.length), s.push(i), !0) : !1))) {
        if (i = this.tokenizer.space(n)) {
          n = n.substring(i.raw.length), i.raw.length === 1 && s.length > 0 ? s[s.length - 1].raw += `
` : s.push(i);
          continue;
        }
        if (i = this.tokenizer.code(n)) {
          n = n.substring(i.raw.length), o = s[s.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += `
` + i.raw, o.text += `
` + i.text, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : s.push(i);
          continue;
        }
        if (i = this.tokenizer.fences(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.heading(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.hr(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.blockquote(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.list(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.html(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.def(n)) {
          n = n.substring(i.raw.length), o = s[s.length - 1], o && (o.type === "paragraph" || o.type === "text") ? (o.raw += `
` + i.raw, o.text += `
` + i.raw, this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
            href: i.href,
            title: i.title
          });
          continue;
        }
        if (i = this.tokenizer.table(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.lheading(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (u = n, this.options.extensions && this.options.extensions.startBlock) {
          let p = 1 / 0;
          const g = n.slice(1);
          let _;
          this.options.extensions.startBlock.forEach((k) => {
            _ = k.call({ lexer: this }, g), typeof _ == "number" && _ >= 0 && (p = Math.min(p, _));
          }), p < 1 / 0 && p >= 0 && (u = n.substring(0, p + 1));
        }
        if (this.state.top && (i = this.tokenizer.paragraph(u))) {
          o = s[s.length - 1], f && o.type === "paragraph" ? (o.raw += `
` + i.raw, o.text += `
` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : s.push(i), f = u.length !== n.length, n = n.substring(i.raw.length);
          continue;
        }
        if (i = this.tokenizer.text(n)) {
          n = n.substring(i.raw.length), o = s[s.length - 1], o && o.type === "text" ? (o.raw += `
` + i.raw, o.text += `
` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = o.text) : s.push(i);
          continue;
        }
        if (n) {
          const p = "Infinite loop on byte: " + n.charCodeAt(0);
          if (this.options.silent) {
            console.error(p);
            break;
          } else
            throw new Error(p);
        }
      }
    return this.state.top = !0, s;
  }
  inline(n, s = []) {
    return this.inlineQueue.push({ src: n, tokens: s }), s;
  }
  /**
   * Lexing/Compiling
   */
  inlineTokens(n, s = []) {
    let i, o, u, f = n, p, g, _;
    if (this.tokens.links) {
      const k = Object.keys(this.tokens.links);
      if (k.length > 0)
        for (; (p = this.tokenizer.rules.inline.reflinkSearch.exec(f)) != null; )
          k.includes(p[0].slice(p[0].lastIndexOf("[") + 1, -1)) && (f = f.slice(0, p.index) + "[" + "a".repeat(p[0].length - 2) + "]" + f.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
    }
    for (; (p = this.tokenizer.rules.inline.blockSkip.exec(f)) != null; )
      f = f.slice(0, p.index) + "[" + "a".repeat(p[0].length - 2) + "]" + f.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
    for (; (p = this.tokenizer.rules.inline.anyPunctuation.exec(f)) != null; )
      f = f.slice(0, p.index) + "++" + f.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
    for (; n; )
      if (g || (_ = ""), g = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((k) => (i = k.call({ lexer: this }, n, s)) ? (n = n.substring(i.raw.length), s.push(i), !0) : !1))) {
        if (i = this.tokenizer.escape(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.tag(n)) {
          n = n.substring(i.raw.length), o = s[s.length - 1], o && i.type === "text" && o.type === "text" ? (o.raw += i.raw, o.text += i.text) : s.push(i);
          continue;
        }
        if (i = this.tokenizer.link(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.reflink(n, this.tokens.links)) {
          n = n.substring(i.raw.length), o = s[s.length - 1], o && i.type === "text" && o.type === "text" ? (o.raw += i.raw, o.text += i.text) : s.push(i);
          continue;
        }
        if (i = this.tokenizer.emStrong(n, f, _)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.codespan(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.br(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.del(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (i = this.tokenizer.autolink(n)) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (!this.state.inLink && (i = this.tokenizer.url(n))) {
          n = n.substring(i.raw.length), s.push(i);
          continue;
        }
        if (u = n, this.options.extensions && this.options.extensions.startInline) {
          let k = 1 / 0;
          const T = n.slice(1);
          let B;
          this.options.extensions.startInline.forEach((P) => {
            B = P.call({ lexer: this }, T), typeof B == "number" && B >= 0 && (k = Math.min(k, B));
          }), k < 1 / 0 && k >= 0 && (u = n.substring(0, k + 1));
        }
        if (i = this.tokenizer.inlineText(u)) {
          n = n.substring(i.raw.length), i.raw.slice(-1) !== "_" && (_ = i.raw.slice(-1)), g = !0, o = s[s.length - 1], o && o.type === "text" ? (o.raw += i.raw, o.text += i.text) : s.push(i);
          continue;
        }
        if (n) {
          const k = "Infinite loop on byte: " + n.charCodeAt(0);
          if (this.options.silent) {
            console.error(k);
            break;
          } else
            throw new Error(k);
        }
      }
    return s;
  }
}
class Ar {
  constructor(n) {
    He(this, "options");
    this.options = n || Z0;
  }
  code(n, s, i) {
    var u;
    const o = (u = (s || "").match(/^\S*/)) == null ? void 0 : u[0];
    return n = n.replace(/\n$/, "") + `
`, o ? '<pre><code class="language-' + Bt(o) + '">' + (i ? n : Bt(n, !0)) + `</code></pre>
` : "<pre><code>" + (i ? n : Bt(n, !0)) + `</code></pre>
`;
  }
  blockquote(n) {
    return `<blockquote>
${n}</blockquote>
`;
  }
  html(n, s) {
    return n;
  }
  heading(n, s, i) {
    return `<h${s}>${n}</h${s}>
`;
  }
  hr() {
    return `<hr>
`;
  }
  list(n, s, i) {
    const o = s ? "ol" : "ul", u = s && i !== 1 ? ' start="' + i + '"' : "";
    return "<" + o + u + `>
` + n + "</" + o + `>
`;
  }
  listitem(n, s, i) {
    return `<li>${n}</li>
`;
  }
  checkbox(n) {
    return "<input " + (n ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
  }
  paragraph(n) {
    return `<p>${n}</p>
`;
  }
  table(n, s) {
    return s && (s = `<tbody>${s}</tbody>`), `<table>
<thead>
` + n + `</thead>
` + s + `</table>
`;
  }
  tablerow(n) {
    return `<tr>
${n}</tr>
`;
  }
  tablecell(n, s) {
    const i = s.header ? "th" : "td";
    return (s.align ? `<${i} align="${s.align}">` : `<${i}>`) + n + `</${i}>
`;
  }
  /**
   * span level renderer
   */
  strong(n) {
    return `<strong>${n}</strong>`;
  }
  em(n) {
    return `<em>${n}</em>`;
  }
  codespan(n) {
    return `<code>${n}</code>`;
  }
  br() {
    return "<br>";
  }
  del(n) {
    return `<del>${n}</del>`;
  }
  link(n, s, i) {
    const o = Ql(n);
    if (o === null)
      return i;
    n = o;
    let u = '<a href="' + n + '"';
    return s && (u += ' title="' + s + '"'), u += ">" + i + "</a>", u;
  }
  image(n, s, i) {
    const o = Ql(n);
    if (o === null)
      return i;
    n = o;
    let u = `<img src="${n}" alt="${i}"`;
    return s && (u += ` title="${s}"`), u += ">", u;
  }
  text(n) {
    return n;
  }
}
class ti {
  // no need for block level renderers
  strong(n) {
    return n;
  }
  em(n) {
    return n;
  }
  codespan(n) {
    return n;
  }
  del(n) {
    return n;
  }
  html(n) {
    return n;
  }
  text(n) {
    return n;
  }
  link(n, s, i) {
    return "" + i;
  }
  image(n, s, i) {
    return "" + i;
  }
  br() {
    return "";
  }
}
class f0 {
  constructor(n) {
    He(this, "options");
    He(this, "renderer");
    He(this, "textRenderer");
    this.options = n || Z0, this.options.renderer = this.options.renderer || new Ar(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new ti();
  }
  /**
   * Static Parse Method
   */
  static parse(n, s) {
    return new f0(s).parse(n);
  }
  /**
   * Static Parse Inline Method
   */
  static parseInline(n, s) {
    return new f0(s).parseInline(n);
  }
  /**
   * Parse Loop
   */
  parse(n, s = !0) {
    let i = "";
    for (let o = 0; o < n.length; o++) {
      const u = n[o];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[u.type]) {
        const f = u, p = this.options.extensions.renderers[f.type].call({ parser: this }, f);
        if (p !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(f.type)) {
          i += p || "";
          continue;
        }
      }
      switch (u.type) {
        case "space":
          continue;
        case "hr": {
          i += this.renderer.hr();
          continue;
        }
        case "heading": {
          const f = u;
          i += this.renderer.heading(this.parseInline(f.tokens), f.depth, ih(this.parseInline(f.tokens, this.textRenderer)));
          continue;
        }
        case "code": {
          const f = u;
          i += this.renderer.code(f.text, f.lang, !!f.escaped);
          continue;
        }
        case "table": {
          const f = u;
          let p = "", g = "";
          for (let k = 0; k < f.header.length; k++)
            g += this.renderer.tablecell(this.parseInline(f.header[k].tokens), { header: !0, align: f.align[k] });
          p += this.renderer.tablerow(g);
          let _ = "";
          for (let k = 0; k < f.rows.length; k++) {
            const T = f.rows[k];
            g = "";
            for (let B = 0; B < T.length; B++)
              g += this.renderer.tablecell(this.parseInline(T[B].tokens), { header: !1, align: f.align[B] });
            _ += this.renderer.tablerow(g);
          }
          i += this.renderer.table(p, _);
          continue;
        }
        case "blockquote": {
          const f = u, p = this.parse(f.tokens);
          i += this.renderer.blockquote(p);
          continue;
        }
        case "list": {
          const f = u, p = f.ordered, g = f.start, _ = f.loose;
          let k = "";
          for (let T = 0; T < f.items.length; T++) {
            const B = f.items[T], P = B.checked, W = B.task;
            let j = "";
            if (B.task) {
              const G = this.renderer.checkbox(!!P);
              _ ? B.tokens.length > 0 && B.tokens[0].type === "paragraph" ? (B.tokens[0].text = G + " " + B.tokens[0].text, B.tokens[0].tokens && B.tokens[0].tokens.length > 0 && B.tokens[0].tokens[0].type === "text" && (B.tokens[0].tokens[0].text = G + " " + B.tokens[0].tokens[0].text)) : B.tokens.unshift({
                type: "text",
                text: G + " "
              }) : j += G + " ";
            }
            j += this.parse(B.tokens, _), k += this.renderer.listitem(j, W, !!P);
          }
          i += this.renderer.list(k, p, g);
          continue;
        }
        case "html": {
          const f = u;
          i += this.renderer.html(f.text, f.block);
          continue;
        }
        case "paragraph": {
          const f = u;
          i += this.renderer.paragraph(this.parseInline(f.tokens));
          continue;
        }
        case "text": {
          let f = u, p = f.tokens ? this.parseInline(f.tokens) : f.text;
          for (; o + 1 < n.length && n[o + 1].type === "text"; )
            f = n[++o], p += `
` + (f.tokens ? this.parseInline(f.tokens) : f.text);
          i += s ? this.renderer.paragraph(p) : p;
          continue;
        }
        default: {
          const f = 'Token with "' + u.type + '" type was not found.';
          if (this.options.silent)
            return console.error(f), "";
          throw new Error(f);
        }
      }
    }
    return i;
  }
  /**
   * Parse Inline Tokens
   */
  parseInline(n, s) {
    s = s || this.renderer;
    let i = "";
    for (let o = 0; o < n.length; o++) {
      const u = n[o];
      if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[u.type]) {
        const f = this.options.extensions.renderers[u.type].call({ parser: this }, u);
        if (f !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(u.type)) {
          i += f || "";
          continue;
        }
      }
      switch (u.type) {
        case "escape": {
          const f = u;
          i += s.text(f.text);
          break;
        }
        case "html": {
          const f = u;
          i += s.html(f.text);
          break;
        }
        case "link": {
          const f = u;
          i += s.link(f.href, f.title, this.parseInline(f.tokens, s));
          break;
        }
        case "image": {
          const f = u;
          i += s.image(f.href, f.title, f.text);
          break;
        }
        case "strong": {
          const f = u;
          i += s.strong(this.parseInline(f.tokens, s));
          break;
        }
        case "em": {
          const f = u;
          i += s.em(this.parseInline(f.tokens, s));
          break;
        }
        case "codespan": {
          const f = u;
          i += s.codespan(f.text);
          break;
        }
        case "br": {
          i += s.br();
          break;
        }
        case "del": {
          const f = u;
          i += s.del(this.parseInline(f.tokens, s));
          break;
        }
        case "text": {
          const f = u;
          i += s.text(f.text);
          break;
        }
        default: {
          const f = 'Token with "' + u.type + '" type was not found.';
          if (this.options.silent)
            return console.error(f), "";
          throw new Error(f);
        }
      }
    }
    return i;
  }
}
class Tn {
  constructor(n) {
    He(this, "options");
    this.options = n || Z0;
  }
  /**
   * Process markdown before marked
   */
  preprocess(n) {
    return n;
  }
  /**
   * Process HTML after marked is finished
   */
  postprocess(n) {
    return n;
  }
  /**
   * Process all tokens before walk tokens
   */
  processAllTokens(n) {
    return n;
  }
}
He(Tn, "passThroughHooks", /* @__PURE__ */ new Set([
  "preprocess",
  "postprocess",
  "processAllTokens"
]));
var Mn, Us, Fr, Ao;
class vo {
  constructor(...n) {
    ms(this, Mn);
    ms(this, Fr);
    He(this, "defaults", Zs());
    He(this, "options", this.setOptions);
    He(this, "parse", rr(this, Mn, Us).call(this, h0.lex, f0.parse));
    He(this, "parseInline", rr(this, Mn, Us).call(this, h0.lexInline, f0.parseInline));
    He(this, "Parser", f0);
    He(this, "Renderer", Ar);
    He(this, "TextRenderer", ti);
    He(this, "Lexer", h0);
    He(this, "Tokenizer", xr);
    He(this, "Hooks", Tn);
    this.use(...n);
  }
  /**
   * Run callback for every token
   */
  walkTokens(n, s) {
    var o, u;
    let i = [];
    for (const f of n)
      switch (i = i.concat(s.call(this, f)), f.type) {
        case "table": {
          const p = f;
          for (const g of p.header)
            i = i.concat(this.walkTokens(g.tokens, s));
          for (const g of p.rows)
            for (const _ of g)
              i = i.concat(this.walkTokens(_.tokens, s));
          break;
        }
        case "list": {
          const p = f;
          i = i.concat(this.walkTokens(p.items, s));
          break;
        }
        default: {
          const p = f;
          (u = (o = this.defaults.extensions) == null ? void 0 : o.childTokens) != null && u[p.type] ? this.defaults.extensions.childTokens[p.type].forEach((g) => {
            const _ = p[g].flat(1 / 0);
            i = i.concat(this.walkTokens(_, s));
          }) : p.tokens && (i = i.concat(this.walkTokens(p.tokens, s)));
        }
      }
    return i;
  }
  use(...n) {
    const s = this.defaults.extensions || { renderers: {}, childTokens: {} };
    return n.forEach((i) => {
      const o = { ...i };
      if (o.async = this.defaults.async || o.async || !1, i.extensions && (i.extensions.forEach((u) => {
        if (!u.name)
          throw new Error("extension name required");
        if ("renderer" in u) {
          const f = s.renderers[u.name];
          f ? s.renderers[u.name] = function(...p) {
            let g = u.renderer.apply(this, p);
            return g === !1 && (g = f.apply(this, p)), g;
          } : s.renderers[u.name] = u.renderer;
        }
        if ("tokenizer" in u) {
          if (!u.level || u.level !== "block" && u.level !== "inline")
            throw new Error("extension level must be 'block' or 'inline'");
          const f = s[u.level];
          f ? f.unshift(u.tokenizer) : s[u.level] = [u.tokenizer], u.start && (u.level === "block" ? s.startBlock ? s.startBlock.push(u.start) : s.startBlock = [u.start] : u.level === "inline" && (s.startInline ? s.startInline.push(u.start) : s.startInline = [u.start]));
        }
        "childTokens" in u && u.childTokens && (s.childTokens[u.name] = u.childTokens);
      }), o.extensions = s), i.renderer) {
        const u = this.defaults.renderer || new Ar(this.defaults);
        for (const f in i.renderer) {
          if (!(f in u))
            throw new Error(`renderer '${f}' does not exist`);
          if (f === "options")
            continue;
          const p = f, g = i.renderer[p], _ = u[p];
          u[p] = (...k) => {
            let T = g.apply(u, k);
            return T === !1 && (T = _.apply(u, k)), T || "";
          };
        }
        o.renderer = u;
      }
      if (i.tokenizer) {
        const u = this.defaults.tokenizer || new xr(this.defaults);
        for (const f in i.tokenizer) {
          if (!(f in u))
            throw new Error(`tokenizer '${f}' does not exist`);
          if (["options", "rules", "lexer"].includes(f))
            continue;
          const p = f, g = i.tokenizer[p], _ = u[p];
          u[p] = (...k) => {
            let T = g.apply(u, k);
            return T === !1 && (T = _.apply(u, k)), T;
          };
        }
        o.tokenizer = u;
      }
      if (i.hooks) {
        const u = this.defaults.hooks || new Tn();
        for (const f in i.hooks) {
          if (!(f in u))
            throw new Error(`hook '${f}' does not exist`);
          if (f === "options")
            continue;
          const p = f, g = i.hooks[p], _ = u[p];
          Tn.passThroughHooks.has(f) ? u[p] = (k) => {
            if (this.defaults.async)
              return Promise.resolve(g.call(u, k)).then((B) => _.call(u, B));
            const T = g.call(u, k);
            return _.call(u, T);
          } : u[p] = (...k) => {
            let T = g.apply(u, k);
            return T === !1 && (T = _.apply(u, k)), T;
          };
        }
        o.hooks = u;
      }
      if (i.walkTokens) {
        const u = this.defaults.walkTokens, f = i.walkTokens;
        o.walkTokens = function(p) {
          let g = [];
          return g.push(f.call(this, p)), u && (g = g.concat(u.call(this, p))), g;
        };
      }
      this.defaults = { ...this.defaults, ...o };
    }), this;
  }
  setOptions(n) {
    return this.defaults = { ...this.defaults, ...n }, this;
  }
  lexer(n, s) {
    return h0.lex(n, s ?? this.defaults);
  }
  parser(n, s) {
    return f0.parse(n, s ?? this.defaults);
  }
}
Mn = new WeakSet(), Us = function(n, s) {
  return (i, o) => {
    const u = { ...o }, f = { ...this.defaults, ...u };
    this.defaults.async === !0 && u.async === !1 && (f.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), f.async = !0);
    const p = rr(this, Fr, Ao).call(this, !!f.silent, !!f.async);
    if (typeof i > "u" || i === null)
      return p(new Error("marked(): input parameter is undefined or null"));
    if (typeof i != "string")
      return p(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(i) + ", string expected"));
    if (f.hooks && (f.hooks.options = f), f.async)
      return Promise.resolve(f.hooks ? f.hooks.preprocess(i) : i).then((g) => n(g, f)).then((g) => f.hooks ? f.hooks.processAllTokens(g) : g).then((g) => f.walkTokens ? Promise.all(this.walkTokens(g, f.walkTokens)).then(() => g) : g).then((g) => s(g, f)).then((g) => f.hooks ? f.hooks.postprocess(g) : g).catch(p);
    try {
      f.hooks && (i = f.hooks.preprocess(i));
      let g = n(i, f);
      f.hooks && (g = f.hooks.processAllTokens(g)), f.walkTokens && this.walkTokens(g, f.walkTokens);
      let _ = s(g, f);
      return f.hooks && (_ = f.hooks.postprocess(_)), _;
    } catch (g) {
      return p(g);
    }
  };
}, Fr = new WeakSet(), Ao = function(n, s) {
  return (i) => {
    if (i.message += `
Please report this to https://github.com/markedjs/marked.`, n) {
      const o = "<p>An error occurred:</p><pre>" + Bt(i.message + "", !0) + "</pre>";
      return s ? Promise.resolve(o) : o;
    }
    if (s)
      return Promise.reject(i);
    throw i;
  };
};
const j0 = new vo();
function Ne(a, n) {
  return j0.parse(a, n);
}
Ne.options = Ne.setOptions = function(a) {
  return j0.setOptions(a), Ne.defaults = j0.defaults, mo(Ne.defaults), Ne;
};
Ne.getDefaults = Zs;
Ne.defaults = Z0;
Ne.use = function(...a) {
  return j0.use(...a), Ne.defaults = j0.defaults, mo(Ne.defaults), Ne;
};
Ne.walkTokens = function(a, n) {
  return j0.walkTokens(a, n);
};
Ne.parseInline = j0.parseInline;
Ne.Parser = f0;
Ne.parser = f0.parse;
Ne.Renderer = Ar;
Ne.TextRenderer = ti;
Ne.Lexer = h0;
Ne.lexer = h0.lex;
Ne.Tokenizer = xr;
Ne.Hooks = Tn;
Ne.parse = Ne;
Ne.options;
Ne.setOptions;
Ne.use;
Ne.walkTokens;
Ne.parseInline;
f0.parse;
h0.lex;
function Rh(a) {
  if (typeof a == "function" && (a = {
    highlight: a
  }), !a || typeof a.highlight != "function")
    throw new Error("Must provide highlight function");
  return typeof a.langPrefix != "string" && (a.langPrefix = "language-"), {
    async: !!a.async,
    walkTokens(n) {
      if (n.type !== "code")
        return;
      const s = ta(n.lang);
      if (a.async)
        return Promise.resolve(a.highlight(n.text, s, n.lang || "")).then(na(n));
      const i = a.highlight(n.text, s, n.lang || "");
      if (i instanceof Promise)
        throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");
      na(n)(i);
    },
    renderer: {
      code(n, s, i) {
        const o = ta(s), u = o ? ` class="${a.langPrefix}${sa(o)}"` : "";
        return n = n.replace(/\n$/, ""), `<pre><code${u}>${i ? n : sa(n, !0)}
</code></pre>`;
      }
    }
  };
}
function ta(a) {
  return (a || "").match(/\S*/)[0];
}
function na(a) {
  return (n) => {
    typeof n == "string" && n !== a.text && (a.escaped = !0, a.text = n);
  };
}
const So = /[&<>"']/, Ih = new RegExp(So.source, "g"), Eo = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Lh = new RegExp(Eo.source, "g"), Oh = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, ra = (a) => Oh[a];
function sa(a, n) {
  if (n) {
    if (So.test(a))
      return a.replace(Ih, ra);
  } else if (Eo.test(a))
    return a.replace(Lh, ra);
  return a;
}
const qh = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Ph = Object.hasOwnProperty;
class Fo {
  /**
   * Create a new slug class.
   */
  constructor() {
    this.occurrences, this.reset();
  }
  /**
   * Generate a unique slug.
  *
  * Tracks previously generated slugs: repeated calls with the same value
  * will result in different slugs.
  * Use the `slug` function to get same slugs.
   *
   * @param  {string} value
   *   String of text to slugify
   * @param  {boolean} [maintainCase=false]
   *   Keep the current case, otherwise make all lowercase
   * @return {string}
   *   A unique slug string
   */
  slug(n, s) {
    const i = this;
    let o = Hh(n, s === !0);
    const u = o;
    for (; Ph.call(i.occurrences, o); )
      i.occurrences[u]++, o = u + "-" + i.occurrences[u];
    return i.occurrences[o] = 0, o;
  }
  /**
   * Reset - Forget all previous slugs
   *
   * @return void
   */
  reset() {
    this.occurrences = /* @__PURE__ */ Object.create(null);
  }
}
function Hh(a, n) {
  return typeof a != "string" ? "" : (n || (a = a.toLowerCase()), a.replace(qh, "").replace(/ /g, "-"));
}
let ia, la = [];
function Uh({ prefix: a = "" } = {}) {
  return {
    headerIds: !1,
    // prevent deprecation warning; remove this once headerIds option is removed
    hooks: {
      preprocess(n) {
        return la = [], ia = new Fo(), n;
      }
    },
    renderer: {
      heading(n, s, i) {
        i = i.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, "");
        const o = `${a}${ia.slug(i)}`, u = { level: s, text: n, id: o };
        return la.push(u), `<h${s} id="${o}">${n}</h${s}>
`;
      }
    }
  };
}
var To = { exports: {} };
(function(a) {
  var n = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
  /**
   * Prism: Lightweight, robust, elegant syntax highlighting
   *
   * @license MIT <https://opensource.org/licenses/MIT>
   * @author Lea Verou <https://lea.verou.me>
   * @namespace
   * @public
   */
  var s = function(i) {
    var o = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, u = 0, f = {}, p = {
      /**
       * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
       * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
       * additional languages or plugins yourself.
       *
       * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
       *
       * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
       * empty Prism object into the global scope before loading the Prism script like this:
       *
       * ```js
       * window.Prism = window.Prism || {};
       * Prism.manual = true;
       * // add a new <script> to load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      manual: i.Prism && i.Prism.manual,
      /**
       * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
       * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
       * own worker, you don't want it to do this.
       *
       * By setting this value to `true`, Prism will not add its own listeners to the worker.
       *
       * You obviously have to change this value before Prism executes. To do this, you can add an
       * empty Prism object into the global scope before loading the Prism script like this:
       *
       * ```js
       * window.Prism = window.Prism || {};
       * Prism.disableWorkerMessageHandler = true;
       * // Load Prism's script
       * ```
       *
       * @default false
       * @type {boolean}
       * @memberof Prism
       * @public
       */
      disableWorkerMessageHandler: i.Prism && i.Prism.disableWorkerMessageHandler,
      /**
       * A namespace for utility methods.
       *
       * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
       * change or disappear at any time.
       *
       * @namespace
       * @memberof Prism
       */
      util: {
        encode: function A(S) {
          return S instanceof g ? new g(S.type, A(S.content), S.alias) : Array.isArray(S) ? S.map(A) : S.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
        },
        /**
         * Returns the name of the type of the given value.
         *
         * @param {any} o
         * @returns {string}
         * @example
         * type(null)      === 'Null'
         * type(undefined) === 'Undefined'
         * type(123)       === 'Number'
         * type('foo')     === 'String'
         * type(true)      === 'Boolean'
         * type([1, 2])    === 'Array'
         * type({})        === 'Object'
         * type(String)    === 'Function'
         * type(/abc+/)    === 'RegExp'
         */
        type: function(A) {
          return Object.prototype.toString.call(A).slice(8, -1);
        },
        /**
         * Returns a unique number for the given object. Later calls will still return the same number.
         *
         * @param {Object} obj
         * @returns {number}
         */
        objId: function(A) {
          return A.__id || Object.defineProperty(A, "__id", { value: ++u }), A.__id;
        },
        /**
         * Creates a deep clone of the given object.
         *
         * The main intended use of this function is to clone language definitions.
         *
         * @param {T} o
         * @param {Record<number, any>} [visited]
         * @returns {T}
         * @template T
         */
        clone: function A(S, M) {
          M = M || {};
          var I, O;
          switch (p.util.type(S)) {
            case "Object":
              if (O = p.util.objId(S), M[O])
                return M[O];
              I = /** @type {Record<string, any>} */
              {}, M[O] = I;
              for (var H in S)
                S.hasOwnProperty(H) && (I[H] = A(S[H], M));
              return (
                /** @type {any} */
                I
              );
            case "Array":
              return O = p.util.objId(S), M[O] ? M[O] : (I = [], M[O] = I, /** @type {Array} */
              /** @type {any} */
              S.forEach(function(J, K) {
                I[K] = A(J, M);
              }), /** @type {any} */
              I);
            default:
              return S;
          }
        },
        /**
         * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
         *
         * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
         *
         * @param {Element} element
         * @returns {string}
         */
        getLanguage: function(A) {
          for (; A; ) {
            var S = o.exec(A.className);
            if (S)
              return S[1].toLowerCase();
            A = A.parentElement;
          }
          return "none";
        },
        /**
         * Sets the Prism `language-xxxx` class of the given element.
         *
         * @param {Element} element
         * @param {string} language
         * @returns {void}
         */
        setLanguage: function(A, S) {
          A.className = A.className.replace(RegExp(o, "gi"), ""), A.classList.add("language-" + S);
        },
        /**
         * Returns the script element that is currently executing.
         *
         * This does __not__ work for line script element.
         *
         * @returns {HTMLScriptElement | null}
         */
        currentScript: function() {
          if (typeof document > "u")
            return null;
          if ("currentScript" in document)
            return (
              /** @type {any} */
              document.currentScript
            );
          try {
            throw new Error();
          } catch (I) {
            var A = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack) || [])[1];
            if (A) {
              var S = document.getElementsByTagName("script");
              for (var M in S)
                if (S[M].src == A)
                  return S[M];
            }
            return null;
          }
        },
        /**
         * Returns whether a given class is active for `element`.
         *
         * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
         * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
         * given class is just the given class with a `no-` prefix.
         *
         * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
         * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
         * ancestors have the given class or the negated version of it, then the default activation will be returned.
         *
         * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
         * version of it, the class is considered active.
         *
         * @param {Element} element
         * @param {string} className
         * @param {boolean} [defaultActivation=false]
         * @returns {boolean}
         */
        isActive: function(A, S, M) {
          for (var I = "no-" + S; A; ) {
            var O = A.classList;
            if (O.contains(S))
              return !0;
            if (O.contains(I))
              return !1;
            A = A.parentElement;
          }
          return !!M;
        }
      },
      /**
       * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
       *
       * @namespace
       * @memberof Prism
       * @public
       */
      languages: {
        /**
         * The grammar for plain, unformatted text.
         */
        plain: f,
        plaintext: f,
        text: f,
        txt: f,
        /**
         * Creates a deep copy of the language with the given id and appends the given tokens.
         *
         * If a token in `redef` also appears in the copied language, then the existing token in the copied language
         * will be overwritten at its original position.
         *
         * ## Best practices
         *
         * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
         * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
         * understand the language definition because, normally, the order of tokens matters in Prism grammars.
         *
         * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
         * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
         *
         * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
         * @param {Grammar} redef The new tokens to append.
         * @returns {Grammar} The new language created.
         * @public
         * @example
         * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
         *     // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
         *     // at its original position
         *     'comment': { ... },
         *     // CSS doesn't have a 'color' token, so this token will be appended
         *     'color': /\b(?:red|green|blue)\b/
         * });
         */
        extend: function(A, S) {
          var M = p.util.clone(p.languages[A]);
          for (var I in S)
            M[I] = S[I];
          return M;
        },
        /**
         * Inserts tokens _before_ another token in a language definition or any other grammar.
         *
         * ## Usage
         *
         * This helper method makes it easy to modify existing languages. For example, the CSS language definition
         * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
         * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
         * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
         * this:
         *
         * ```js
         * Prism.languages.markup.style = {
         *     // token
         * };
         * ```
         *
         * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
         * before existing tokens. For the CSS example above, you would use it like this:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'cdata', {
         *     'style': {
         *         // token
         *     }
         * });
         * ```
         *
         * ## Special cases
         *
         * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
         * will be ignored.
         *
         * This behavior can be used to insert tokens after `before`:
         *
         * ```js
         * Prism.languages.insertBefore('markup', 'comment', {
         *     'comment': Prism.languages.markup.comment,
         *     // tokens after 'comment'
         * });
         * ```
         *
         * ## Limitations
         *
         * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
         * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
         * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
         * deleting properties which is necessary to insert at arbitrary positions.
         *
         * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
         * Instead, it will create a new object and replace all references to the target object with the new one. This
         * can be done without temporarily deleting properties, so the iteration order is well-defined.
         *
         * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
         * you hold the target object in a variable, then the value of the variable will not change.
         *
         * ```js
         * var oldMarkup = Prism.languages.markup;
         * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
         *
         * assert(oldMarkup !== Prism.languages.markup);
         * assert(newMarkup === Prism.languages.markup);
         * ```
         *
         * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
         * object to be modified.
         * @param {string} before The key to insert before.
         * @param {Grammar} insert An object containing the key-value pairs to be inserted.
         * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
         * object to be modified.
         *
         * Defaults to `Prism.languages`.
         * @returns {Grammar} The new grammar object.
         * @public
         */
        insertBefore: function(A, S, M, I) {
          I = I || /** @type {any} */
          p.languages;
          var O = I[A], H = {};
          for (var J in O)
            if (O.hasOwnProperty(J)) {
              if (J == S)
                for (var K in M)
                  M.hasOwnProperty(K) && (H[K] = M[K]);
              M.hasOwnProperty(J) || (H[J] = O[J]);
            }
          var le = I[A];
          return I[A] = H, p.languages.DFS(p.languages, function(ce, pe) {
            pe === le && ce != A && (this[ce] = H);
          }), H;
        },
        // Traverse a language definition with Depth First Search
        DFS: function A(S, M, I, O) {
          O = O || {};
          var H = p.util.objId;
          for (var J in S)
            if (S.hasOwnProperty(J)) {
              M.call(S, J, S[J], I || J);
              var K = S[J], le = p.util.type(K);
              le === "Object" && !O[H(K)] ? (O[H(K)] = !0, A(K, M, null, O)) : le === "Array" && !O[H(K)] && (O[H(K)] = !0, A(K, M, J, O));
            }
        }
      },
      plugins: {},
      /**
       * This is the most high-level function in Prism’s API.
       * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
       * each one of them.
       *
       * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
       *
       * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
       * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
       * @memberof Prism
       * @public
       */
      highlightAll: function(A, S) {
        p.highlightAllUnder(document, A, S);
      },
      /**
       * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
       * {@link Prism.highlightElement} on each one of them.
       *
       * The following hooks will be run:
       * 1. `before-highlightall`
       * 2. `before-all-elements-highlight`
       * 3. All hooks of {@link Prism.highlightElement} for each element.
       *
       * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
       * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
       * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
       * @memberof Prism
       * @public
       */
      highlightAllUnder: function(A, S, M) {
        var I = {
          callback: M,
          container: A,
          selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
        };
        p.hooks.run("before-highlightall", I), I.elements = Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)), p.hooks.run("before-all-elements-highlight", I);
        for (var O = 0, H; H = I.elements[O++]; )
          p.highlightElement(H, S === !0, I.callback);
      },
      /**
       * Highlights the code inside a single element.
       *
       * The following hooks will be run:
       * 1. `before-sanity-check`
       * 2. `before-highlight`
       * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
       * 4. `before-insert`
       * 5. `after-highlight`
       * 6. `complete`
       *
       * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
       * the element's language.
       *
       * @param {Element} element The element containing the code.
       * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
       * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
       * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
       * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
       *
       * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
       * asynchronous highlighting to work. You can build your own bundle on the
       * [Download page](https://prismjs.com/download.html).
       * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
       * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
       * @memberof Prism
       * @public
       */
      highlightElement: function(A, S, M) {
        var I = p.util.getLanguage(A), O = p.languages[I];
        p.util.setLanguage(A, I);
        var H = A.parentElement;
        H && H.nodeName.toLowerCase() === "pre" && p.util.setLanguage(H, I);
        var J = A.textContent, K = {
          element: A,
          language: I,
          grammar: O,
          code: J
        };
        function le(pe) {
          K.highlightedCode = pe, p.hooks.run("before-insert", K), K.element.innerHTML = K.highlightedCode, p.hooks.run("after-highlight", K), p.hooks.run("complete", K), M && M.call(K.element);
        }
        if (p.hooks.run("before-sanity-check", K), H = K.element.parentElement, H && H.nodeName.toLowerCase() === "pre" && !H.hasAttribute("tabindex") && H.setAttribute("tabindex", "0"), !K.code) {
          p.hooks.run("complete", K), M && M.call(K.element);
          return;
        }
        if (p.hooks.run("before-highlight", K), !K.grammar) {
          le(p.util.encode(K.code));
          return;
        }
        if (S && i.Worker) {
          var ce = new Worker(p.filename);
          ce.onmessage = function(pe) {
            le(pe.data);
          }, ce.postMessage(JSON.stringify({
            language: K.language,
            code: K.code,
            immediateClose: !0
          }));
        } else
          le(p.highlight(K.code, K.grammar, K.language));
      },
      /**
       * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
       * and the language definitions to use, and returns a string with the HTML produced.
       *
       * The following hooks will be run:
       * 1. `before-tokenize`
       * 2. `after-tokenize`
       * 3. `wrap`: On each {@link Token}.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @param {string} language The name of the language definition passed to `grammar`.
       * @returns {string} The highlighted HTML.
       * @memberof Prism
       * @public
       * @example
       * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
       */
      highlight: function(A, S, M) {
        var I = {
          code: A,
          grammar: S,
          language: M
        };
        if (p.hooks.run("before-tokenize", I), !I.grammar)
          throw new Error('The language "' + I.language + '" has no grammar.');
        return I.tokens = p.tokenize(I.code, I.grammar), p.hooks.run("after-tokenize", I), g.stringify(p.util.encode(I.tokens), I.language);
      },
      /**
       * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
       * and the language definitions to use, and returns an array with the tokenized code.
       *
       * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
       *
       * This method could be useful in other contexts as well, as a very crude parser.
       *
       * @param {string} text A string with the code to be highlighted.
       * @param {Grammar} grammar An object containing the tokens to use.
       *
       * Usually a language definition like `Prism.languages.markup`.
       * @returns {TokenStream} An array of strings and tokens, a token stream.
       * @memberof Prism
       * @public
       * @example
       * let code = `var foo = 0;`;
       * let tokens = Prism.tokenize(code, Prism.languages.javascript);
       * tokens.forEach(token => {
       *     if (token instanceof Prism.Token && token.type === 'number') {
       *         console.log(`Found numeric literal: ${token.content}`);
       *     }
       * });
       */
      tokenize: function(A, S) {
        var M = S.rest;
        if (M) {
          for (var I in M)
            S[I] = M[I];
          delete S.rest;
        }
        var O = new T();
        return B(O, O.head, A), k(A, O, S, O.head, 0), W(O);
      },
      /**
       * @namespace
       * @memberof Prism
       * @public
       */
      hooks: {
        all: {},
        /**
         * Adds the given callback to the list of callbacks for the given hook.
         *
         * The callback will be invoked when the hook it is registered for is run.
         * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
         *
         * One callback function can be registered to multiple hooks and the same hook multiple times.
         *
         * @param {string} name The name of the hook.
         * @param {HookCallback} callback The callback function which is given environment variables.
         * @public
         */
        add: function(A, S) {
          var M = p.hooks.all;
          M[A] = M[A] || [], M[A].push(S);
        },
        /**
         * Runs a hook invoking all registered callbacks with the given environment variables.
         *
         * Callbacks will be invoked synchronously and in the order in which they were registered.
         *
         * @param {string} name The name of the hook.
         * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
         * @public
         */
        run: function(A, S) {
          var M = p.hooks.all[A];
          if (!(!M || !M.length))
            for (var I = 0, O; O = M[I++]; )
              O(S);
        }
      },
      Token: g
    };
    i.Prism = p;
    function g(A, S, M, I) {
      this.type = A, this.content = S, this.alias = M, this.length = (I || "").length | 0;
    }
    g.stringify = function A(S, M) {
      if (typeof S == "string")
        return S;
      if (Array.isArray(S)) {
        var I = "";
        return S.forEach(function(le) {
          I += A(le, M);
        }), I;
      }
      var O = {
        type: S.type,
        content: A(S.content, M),
        tag: "span",
        classes: ["token", S.type],
        attributes: {},
        language: M
      }, H = S.alias;
      H && (Array.isArray(H) ? Array.prototype.push.apply(O.classes, H) : O.classes.push(H)), p.hooks.run("wrap", O);
      var J = "";
      for (var K in O.attributes)
        J += " " + K + '="' + (O.attributes[K] || "").replace(/"/g, "&quot;") + '"';
      return "<" + O.tag + ' class="' + O.classes.join(" ") + '"' + J + ">" + O.content + "</" + O.tag + ">";
    };
    function _(A, S, M, I) {
      A.lastIndex = S;
      var O = A.exec(M);
      if (O && I && O[1]) {
        var H = O[1].length;
        O.index += H, O[0] = O[0].slice(H);
      }
      return O;
    }
    function k(A, S, M, I, O, H) {
      for (var J in M)
        if (!(!M.hasOwnProperty(J) || !M[J])) {
          var K = M[J];
          K = Array.isArray(K) ? K : [K];
          for (var le = 0; le < K.length; ++le) {
            if (H && H.cause == J + "," + le)
              return;
            var ce = K[le], pe = ce.inside, ve = !!ce.lookbehind, Ie = !!ce.greedy, ut = ce.alias;
            if (Ie && !ce.pattern.global) {
              var st = ce.pattern.toString().match(/[imsuy]*$/)[0];
              ce.pattern = RegExp(ce.pattern.source, st + "g");
            }
            for (var mt = ce.pattern || ce, Oe = I.next, $ = O; Oe !== S.tail && !(H && $ >= H.reach); $ += Oe.value.length, Oe = Oe.next) {
              var Fe = Oe.value;
              if (S.length > A.length)
                return;
              if (!(Fe instanceof g)) {
                var V = 1, he;
                if (Ie) {
                  if (he = _(mt, $, A, ve), !he || he.index >= A.length)
                    break;
                  var at = he.index, Ke = he.index + he[0].length, we = $;
                  for (we += Oe.value.length; at >= we; )
                    Oe = Oe.next, we += Oe.value.length;
                  if (we -= Oe.value.length, $ = we, Oe.value instanceof g)
                    continue;
                  for (var ie = Oe; ie !== S.tail && (we < Ke || typeof ie.value == "string"); ie = ie.next)
                    V++, we += ie.value.length;
                  V--, Fe = A.slice($, we), he.index -= $;
                } else if (he = _(mt, 0, Fe, ve), !he)
                  continue;
                var at = he.index, pt = he[0], gt = Fe.slice(0, at), g0 = Fe.slice(at + pt.length), bt = $ + Fe.length;
                H && bt > H.reach && (H.reach = bt);
                var it = Oe.prev;
                gt && (it = B(S, it, gt), $ += gt.length), P(S, it, V);
                var b0 = new g(J, pe ? p.tokenize(pt, pe) : pt, ut, pt);
                if (Oe = B(S, it, b0), g0 && B(S, Oe, g0), V > 1) {
                  var ct = {
                    cause: J + "," + le,
                    reach: bt
                  };
                  k(A, S, M, Oe.prev, $, ct), H && ct.reach > H.reach && (H.reach = ct.reach);
                }
              }
            }
          }
        }
    }
    function T() {
      var A = { value: null, prev: null, next: null }, S = { value: null, prev: A, next: null };
      A.next = S, this.head = A, this.tail = S, this.length = 0;
    }
    function B(A, S, M) {
      var I = S.next, O = { value: M, prev: S, next: I };
      return S.next = O, I.prev = O, A.length++, O;
    }
    function P(A, S, M) {
      for (var I = S.next, O = 0; O < M && I !== A.tail; O++)
        I = I.next;
      S.next = I, I.prev = S, A.length -= O;
    }
    function W(A) {
      for (var S = [], M = A.head.next; M !== A.tail; )
        S.push(M.value), M = M.next;
      return S;
    }
    if (!i.document)
      return i.addEventListener && (p.disableWorkerMessageHandler || i.addEventListener("message", function(A) {
        var S = JSON.parse(A.data), M = S.language, I = S.code, O = S.immediateClose;
        i.postMessage(p.highlight(I, p.languages[M], M)), O && i.close();
      }, !1)), p;
    var j = p.util.currentScript();
    j && (p.filename = j.src, j.hasAttribute("data-manual") && (p.manual = !0));
    function G() {
      p.manual || p.highlightAll();
    }
    if (!p.manual) {
      var U = document.readyState;
      U === "loading" || U === "interactive" && j && j.defer ? document.addEventListener("DOMContentLoaded", G) : window.requestAnimationFrame ? window.requestAnimationFrame(G) : window.setTimeout(G, 16);
    }
    return p;
  }(n);
  a.exports && (a.exports = s), typeof Dr < "u" && (Dr.Prism = s), s.languages.markup = {
    comment: {
      pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
      greedy: !0
    },
    prolog: {
      pattern: /<\?[\s\S]+?\?>/,
      greedy: !0
    },
    doctype: {
      // https://www.w3.org/TR/xml/#NT-doctypedecl
      pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
      greedy: !0,
      inside: {
        "internal-subset": {
          pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
          lookbehind: !0,
          greedy: !0,
          inside: null
          // see below
        },
        string: {
          pattern: /"[^"]*"|'[^']*'/,
          greedy: !0
        },
        punctuation: /^<!|>$|[[\]]/,
        "doctype-tag": /^DOCTYPE/i,
        name: /[^\s<>'"]+/
      }
    },
    cdata: {
      pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
      greedy: !0
    },
    tag: {
      pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
      greedy: !0,
      inside: {
        tag: {
          pattern: /^<\/?[^\s>\/]+/,
          inside: {
            punctuation: /^<\/?/,
            namespace: /^[^\s>\/:]+:/
          }
        },
        "special-attr": [],
        "attr-value": {
          pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
          inside: {
            punctuation: [
              {
                pattern: /^=/,
                alias: "attr-equals"
              },
              {
                pattern: /^(\s*)["']|["']$/,
                lookbehind: !0
              }
            ]
          }
        },
        punctuation: /\/?>/,
        "attr-name": {
          pattern: /[^\s>\/]+/,
          inside: {
            namespace: /^[^\s>\/:]+:/
          }
        }
      }
    },
    entity: [
      {
        pattern: /&[\da-z]{1,8};/i,
        alias: "named-entity"
      },
      /&#x?[\da-f]{1,8};/i
    ]
  }, s.languages.markup.tag.inside["attr-value"].inside.entity = s.languages.markup.entity, s.languages.markup.doctype.inside["internal-subset"].inside = s.languages.markup, s.hooks.add("wrap", function(i) {
    i.type === "entity" && (i.attributes.title = i.content.replace(/&amp;/, "&"));
  }), Object.defineProperty(s.languages.markup.tag, "addInlined", {
    /**
     * Adds an inlined language to markup.
     *
     * An example of an inlined language is CSS with `<style>` tags.
     *
     * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addInlined('style', 'css');
     */
    value: function(o, u) {
      var f = {};
      f["language-" + u] = {
        pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
        lookbehind: !0,
        inside: s.languages[u]
      }, f.cdata = /^<!\[CDATA\[|\]\]>$/i;
      var p = {
        "included-cdata": {
          pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
          inside: f
        }
      };
      p["language-" + u] = {
        pattern: /[\s\S]+/,
        inside: s.languages[u]
      };
      var g = {};
      g[o] = {
        pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
          return o;
        }), "i"),
        lookbehind: !0,
        greedy: !0,
        inside: p
      }, s.languages.insertBefore("markup", "cdata", g);
    }
  }), Object.defineProperty(s.languages.markup.tag, "addAttribute", {
    /**
     * Adds an pattern to highlight languages embedded in HTML attributes.
     *
     * An example of an inlined language is CSS with `style` attributes.
     *
     * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
     * case insensitive.
     * @param {string} lang The language key.
     * @example
     * addAttribute('style', 'css');
     */
    value: function(i, o) {
      s.languages.markup.tag.inside["special-attr"].push({
        pattern: RegExp(
          /(^|["'\s])/.source + "(?:" + i + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
          "i"
        ),
        lookbehind: !0,
        inside: {
          "attr-name": /^[^\s=]+/,
          "attr-value": {
            pattern: /=[\s\S]+/,
            inside: {
              value: {
                pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
                lookbehind: !0,
                alias: [o, "language-" + o],
                inside: s.languages[o]
              },
              punctuation: [
                {
                  pattern: /^=/,
                  alias: "attr-equals"
                },
                /"|'/
              ]
            }
          }
        }
      });
    }
  }), s.languages.html = s.languages.markup, s.languages.mathml = s.languages.markup, s.languages.svg = s.languages.markup, s.languages.xml = s.languages.extend("markup", {}), s.languages.ssml = s.languages.xml, s.languages.atom = s.languages.xml, s.languages.rss = s.languages.xml, function(i) {
    var o = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
    i.languages.css = {
      comment: /\/\*[\s\S]*?\*\//,
      atrule: {
        pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + o.source + ")*?" + /(?:;|(?=\s*\{))/.source),
        inside: {
          rule: /^@[\w-]+/,
          "selector-function-argument": {
            pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
            lookbehind: !0,
            alias: "selector"
          },
          keyword: {
            pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
            lookbehind: !0
          }
          // See rest below
        }
      },
      url: {
        // https://drafts.csswg.org/css-values-3/#urls
        pattern: RegExp("\\burl\\((?:" + o.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
        greedy: !0,
        inside: {
          function: /^url/i,
          punctuation: /^\(|\)$/,
          string: {
            pattern: RegExp("^" + o.source + "$"),
            alias: "url"
          }
        }
      },
      selector: {
        pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + o.source + ")*(?=\\s*\\{)"),
        lookbehind: !0
      },
      string: {
        pattern: o,
        greedy: !0
      },
      property: {
        pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
        lookbehind: !0
      },
      important: /!important\b/i,
      function: {
        pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
        lookbehind: !0
      },
      punctuation: /[(){};:,]/
    }, i.languages.css.atrule.inside.rest = i.languages.css;
    var u = i.languages.markup;
    u && (u.tag.addInlined("style", "css"), u.tag.addAttribute("style", "css"));
  }(s), s.languages.clike = {
    comment: [
      {
        pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
        lookbehind: !0,
        greedy: !0
      },
      {
        pattern: /(^|[^\\:])\/\/.*/,
        lookbehind: !0,
        greedy: !0
      }
    ],
    string: {
      pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
      greedy: !0
    },
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
      lookbehind: !0,
      inside: {
        punctuation: /[.\\]/
      }
    },
    keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
    boolean: /\b(?:false|true)\b/,
    function: /\b\w+(?=\()/,
    number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
    operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
    punctuation: /[{}[\];(),.:]/
  }, s.languages.javascript = s.languages.extend("clike", {
    "class-name": [
      s.languages.clike["class-name"],
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
        lookbehind: !0
      }
    ],
    keyword: [
      {
        pattern: /((?:^|\})\s*)catch\b/,
        lookbehind: !0
      },
      {
        pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
        lookbehind: !0
      }
    ],
    // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
    function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
    number: {
      pattern: RegExp(
        /(^|[^\w$])/.source + "(?:" + // constant
        (/NaN|Infinity/.source + "|" + // binary integer
        /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
        /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
        /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
        /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
        /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
      ),
      lookbehind: !0
    },
    operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
  }), s.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, s.languages.insertBefore("javascript", "keyword", {
    regex: {
      pattern: RegExp(
        // lookbehind
        // eslint-disable-next-line regexp/no-dupe-characters-character-class
        /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
        // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
        // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
        // with the only syntax, so we have to define 2 different regex patterns.
        /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
        /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
        /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        "regex-source": {
          pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
          lookbehind: !0,
          alias: "language-regex",
          inside: s.languages.regex
        },
        "regex-delimiter": /^\/|\/$/,
        "regex-flags": /^[a-z]+$/
      }
    },
    // This must be declared before keyword because we use "function" inside the look-forward
    "function-variable": {
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
      alias: "function"
    },
    parameter: [
      {
        pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
        lookbehind: !0,
        inside: s.languages.javascript
      },
      {
        pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
        lookbehind: !0,
        inside: s.languages.javascript
      },
      {
        pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
        lookbehind: !0,
        inside: s.languages.javascript
      },
      {
        pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
        lookbehind: !0,
        inside: s.languages.javascript
      }
    ],
    constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
  }), s.languages.insertBefore("javascript", "string", {
    hashbang: {
      pattern: /^#!.*/,
      greedy: !0,
      alias: "comment"
    },
    "template-string": {
      pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
      greedy: !0,
      inside: {
        "template-punctuation": {
          pattern: /^`|`$/,
          alias: "string"
        },
        interpolation: {
          pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
          lookbehind: !0,
          inside: {
            "interpolation-punctuation": {
              pattern: /^\$\{|\}$/,
              alias: "punctuation"
            },
            rest: s.languages.javascript
          }
        },
        string: /[\s\S]+/
      }
    },
    "string-property": {
      pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
      lookbehind: !0,
      greedy: !0,
      alias: "property"
    }
  }), s.languages.insertBefore("javascript", "operator", {
    "literal-property": {
      pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
      lookbehind: !0,
      alias: "property"
    }
  }), s.languages.markup && (s.languages.markup.tag.addInlined("script", "javascript"), s.languages.markup.tag.addAttribute(
    /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
    "javascript"
  )), s.languages.js = s.languages.javascript, function() {
    if (typeof s > "u" || typeof document > "u")
      return;
    Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
    var i = "Loading…", o = function(j, G) {
      return "✖ Error " + j + " while fetching file: " + G;
    }, u = "✖ Error: File does not exist or is empty", f = {
      js: "javascript",
      py: "python",
      rb: "ruby",
      ps1: "powershell",
      psm1: "powershell",
      sh: "bash",
      bat: "batch",
      h: "c",
      tex: "latex"
    }, p = "data-src-status", g = "loading", _ = "loaded", k = "failed", T = "pre[data-src]:not([" + p + '="' + _ + '"]):not([' + p + '="' + g + '"])';
    function B(j, G, U) {
      var A = new XMLHttpRequest();
      A.open("GET", j, !0), A.onreadystatechange = function() {
        A.readyState == 4 && (A.status < 400 && A.responseText ? G(A.responseText) : A.status >= 400 ? U(o(A.status, A.statusText)) : U(u));
      }, A.send(null);
    }
    function P(j) {
      var G = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(j || "");
      if (G) {
        var U = Number(G[1]), A = G[2], S = G[3];
        return A ? S ? [U, Number(S)] : [U, void 0] : [U, U];
      }
    }
    s.hooks.add("before-highlightall", function(j) {
      j.selector += ", " + T;
    }), s.hooks.add("before-sanity-check", function(j) {
      var G = (
        /** @type {HTMLPreElement} */
        j.element
      );
      if (G.matches(T)) {
        j.code = "", G.setAttribute(p, g);
        var U = G.appendChild(document.createElement("CODE"));
        U.textContent = i;
        var A = G.getAttribute("data-src"), S = j.language;
        if (S === "none") {
          var M = (/\.(\w+)$/.exec(A) || [, "none"])[1];
          S = f[M] || M;
        }
        s.util.setLanguage(U, S), s.util.setLanguage(G, S);
        var I = s.plugins.autoloader;
        I && I.loadLanguages(S), B(
          A,
          function(O) {
            G.setAttribute(p, _);
            var H = P(G.getAttribute("data-range"));
            if (H) {
              var J = O.split(/\r\n?|\n/g), K = H[0], le = H[1] == null ? J.length : H[1];
              K < 0 && (K += J.length), K = Math.max(0, Math.min(K - 1, J.length)), le < 0 && (le += J.length), le = Math.max(0, Math.min(le, J.length)), O = J.slice(K, le).join(`
`), G.hasAttribute("data-start") || G.setAttribute("data-start", String(K + 1));
            }
            U.textContent = O, s.highlightElement(U);
          },
          function(O) {
            G.setAttribute(p, k), U.textContent = O;
          }
        );
      }
    }), s.plugins.fileHighlight = {
      /**
       * Executes the File Highlight plugin for all matching `pre` elements under the given container.
       *
       * Note: Elements which are already loaded or currently loading will not be touched by this method.
       *
       * @param {ParentNode} [container=document]
       */
      highlight: function(G) {
        for (var U = (G || document).querySelectorAll(T), A = 0, S; S = U[A++]; )
          s.highlightElement(S);
      }
    };
    var W = !1;
    s.fileHighlight = function() {
      W || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), W = !0), s.plugins.fileHighlight.highlight.apply(this, arguments);
    };
  }();
})(To);
var Gh = To.exports;
const Cs = /* @__PURE__ */ ho(Gh);
Prism.languages.python = {
  comment: {
    pattern: /(^|[^\\])#.*/,
    lookbehind: !0,
    greedy: !0
  },
  "string-interpolation": {
    pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
    greedy: !0,
    inside: {
      interpolation: {
        // "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
        pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
        lookbehind: !0,
        inside: {
          "format-spec": {
            pattern: /(:)[^:(){}]+(?=\}$)/,
            lookbehind: !0
          },
          "conversion-option": {
            pattern: /![sra](?=[:}]$)/,
            alias: "punctuation"
          },
          rest: null
        }
      },
      string: /[\s\S]+/
    }
  },
  "triple-quoted-string": {
    pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
    greedy: !0,
    alias: "string"
  },
  string: {
    pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
    greedy: !0
  },
  function: {
    pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
    lookbehind: !0
  },
  "class-name": {
    pattern: /(\bclass\s+)\w+/i,
    lookbehind: !0
  },
  decorator: {
    pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
    lookbehind: !0,
    alias: ["annotation", "punctuation"],
    inside: {
      punctuation: /\./
    }
  },
  keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
  builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
  boolean: /\b(?:False|None|True)\b/,
  number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
  operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
  punctuation: /[{}[\];(),.:]/
};
Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python;
Prism.languages.py = Prism.languages.python;
(function(a) {
  var n = /\\(?:[^a-z()[\]]|[a-z*]+)/i, s = {
    "equation-command": {
      pattern: n,
      alias: "regex"
    }
  };
  a.languages.latex = {
    comment: /%.*/,
    // the verbatim environment prints whitespace to the document
    cdata: {
      pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
      lookbehind: !0
    },
    /*
     * equations can be between $$ $$ or $ $ or \( \) or \[ \]
     * (all are multiline)
     */
    equation: [
      {
        pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,
        inside: s,
        alias: "string"
      },
      {
        pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
        lookbehind: !0,
        inside: s,
        alias: "string"
      }
    ],
    /*
     * arguments which are keywords or references are highlighted
     * as keywords
     */
    keyword: {
      pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
      lookbehind: !0
    },
    url: {
      pattern: /(\\url\{)[^}]+(?=\})/,
      lookbehind: !0
    },
    /*
     * section or chapter headlines are highlighted as bold so that
     * they stand out more
     */
    headline: {
      pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
      lookbehind: !0,
      alias: "class-name"
    },
    function: {
      pattern: n,
      alias: "selector"
    },
    punctuation: /[[\]{}&]/
  }, a.languages.tex = a.languages.latex, a.languages.context = a.languages.latex;
})(Prism);
(function(a) {
  var n = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", s = {
    pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
    lookbehind: !0,
    alias: "punctuation",
    // this looks reasonably well in all themes
    inside: null
    // see below
  }, i = {
    bash: s,
    environment: {
      pattern: RegExp("\\$" + n),
      alias: "constant"
    },
    variable: [
      // [0]: Arithmetic Environment
      {
        pattern: /\$?\(\([\s\S]+?\)\)/,
        greedy: !0,
        inside: {
          // If there is a $ sign at the beginning highlight $(( and )) as variable
          variable: [
            {
              pattern: /(^\$\(\([\s\S]+)\)\)/,
              lookbehind: !0
            },
            /^\$\(\(/
          ],
          number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
          // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
          operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
          // If there is no $ sign at the beginning highlight (( and )) as punctuation
          punctuation: /\(\(?|\)\)?|,|;/
        }
      },
      // [1]: Command Substitution
      {
        pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
        greedy: !0,
        inside: {
          variable: /^\$\(|^`|\)$|`$/
        }
      },
      // [2]: Brace expansion
      {
        pattern: /\$\{[^}]+\}/,
        greedy: !0,
        inside: {
          operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
          punctuation: /[\[\]]/,
          environment: {
            pattern: RegExp("(\\{)" + n),
            lookbehind: !0,
            alias: "constant"
          }
        }
      },
      /\$(?:\w+|[#?*!@$])/
    ],
    // Escape sequences from echo and printf's manuals, and escaped quotes.
    entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
  };
  a.languages.bash = {
    shebang: {
      pattern: /^#!\s*\/.*/,
      alias: "important"
    },
    comment: {
      pattern: /(^|[^"{\\$])#.*/,
      lookbehind: !0
    },
    "function-name": [
      // a) function foo {
      // b) foo() {
      // c) function foo() {
      // but not “foo {”
      {
        // a) and c)
        pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
        lookbehind: !0,
        alias: "function"
      },
      {
        // b)
        pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
        alias: "function"
      }
    ],
    // Highlight variable names as variables in for and select beginnings.
    "for-or-select": {
      pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
      alias: "variable",
      lookbehind: !0
    },
    // Highlight variable names as variables in the left-hand part
    // of assignments (“=” and “+=”).
    "assign-left": {
      pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
      inside: {
        environment: {
          pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + n),
          lookbehind: !0,
          alias: "constant"
        }
      },
      alias: "variable",
      lookbehind: !0
    },
    // Highlight parameter names as variables
    parameter: {
      pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
      alias: "variable",
      lookbehind: !0
    },
    string: [
      // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
      {
        pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
        lookbehind: !0,
        greedy: !0,
        inside: i
      },
      // Here-document with quotes around the tag
      // → No expansion (so no “inside”).
      {
        pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
        lookbehind: !0,
        greedy: !0,
        inside: {
          bash: s
        }
      },
      // “Normal” string
      {
        // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
        pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
        lookbehind: !0,
        greedy: !0,
        inside: i
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
        pattern: /(^|[^$\\])'[^']*'/,
        lookbehind: !0,
        greedy: !0
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
        pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
        greedy: !0,
        inside: {
          entity: i.entity
        }
      }
    ],
    environment: {
      pattern: RegExp("\\$?" + n),
      alias: "constant"
    },
    variable: i.variable,
    function: {
      pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    keyword: {
      pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
    builtin: {
      pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
      lookbehind: !0,
      // Alias added to make those easier to distinguish from strings.
      alias: "class-name"
    },
    boolean: {
      pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    "file-descriptor": {
      pattern: /\B&\d\b/,
      alias: "important"
    },
    operator: {
      // Lots of redirections here, but not just that.
      pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
      inside: {
        "file-descriptor": {
          pattern: /^\d/,
          alias: "important"
        }
      }
    },
    punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
    number: {
      pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
      lookbehind: !0
    }
  }, s.inside = a.languages.bash;
  for (var o = [
    "comment",
    "function-name",
    "for-or-select",
    "assign-left",
    "parameter",
    "string",
    "environment",
    "function",
    "keyword",
    "builtin",
    "boolean",
    "file-descriptor",
    "operator",
    "punctuation",
    "number"
  ], u = i.variable[1].inside, f = 0; f < o.length; f++)
    u[o[f]] = a.languages.bash[o[f]];
  a.languages.sh = a.languages.bash, a.languages.shell = a.languages.bash;
})(Prism);
const Vh = '<svg class="md-link-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true" fill="currentColor"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>', Wh = `<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 32 32"
><path
  fill="currentColor"
  d="M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"
/><path fill="currentColor" d="M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z" /></svg>`, jh = `<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`, aa = `<button title="copy" class="copy_code_button">
<span class="copy-text">${Wh}</span>
<span class="check">${jh}</span>
</button>`, Co = /[&<>"']/, Xh = new RegExp(Co.source, "g"), Mo = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Yh = new RegExp(Mo.source, "g"), Zh = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
}, oa = (a) => Zh[a] || "";
function Ms(a, n) {
  if (n) {
    if (Co.test(a))
      return a.replace(Xh, oa);
  } else if (Mo.test(a))
    return a.replace(Yh, oa);
  return a;
}
const Kh = {
  code(a, n, s) {
    var o;
    const i = ((o = (n ?? "").match(/\S*/)) == null ? void 0 : o[0]) ?? "";
    return a = a.replace(/\n$/, "") + `
`, i ? '<div class="code_wrap">' + aa + '<pre><code class="language-' + Ms(i) + '">' + (s ? a : Ms(a, !0)) + `</code></pre></div>
` : '<div class="code_wrap">' + aa + "<pre><code>" + (s ? a : Ms(a, !0)) + `</code></pre></div>
`;
  }
}, Qh = new Fo();
function Jh({
  header_links: a,
  line_breaks: n
}) {
  const s = new vo();
  return s.use(
    {
      gfm: !0,
      pedantic: !1,
      breaks: n
    },
    Rh({
      highlight: (i, o) => Cs.languages[o] ? Cs.highlight(i, Cs.languages[o], o) : i
    }),
    { renderer: Kh }
  ), a && (s.use(Uh()), s.use({
    extensions: [
      {
        name: "heading",
        level: "block",
        renderer(i) {
          const o = i.raw.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, ""), u = "h" + Qh.slug(o), f = i.depth, p = this.parser.parseInline(i.tokens);
          return `<h${f} id="${u}"><a class="md-header-anchor" href="#${u}">${Vh}</a>${p}</h${f}>
`;
        }
      }
    ]
  })), s;
}
const {
  HtmlTag: $h,
  SvelteComponent: e2,
  attr: t2,
  binding_callbacks: n2,
  detach: ni,
  element: r2,
  empty: s2,
  init: i2,
  insert: ri,
  noop: ua,
  safe_not_equal: l2,
  set_data: a2,
  text: o2,
  toggle_class: hr
} = window.__gradio__svelte__internal, { afterUpdate: u2 } = window.__gradio__svelte__internal;
function c2(a) {
  let n;
  return {
    c() {
      n = o2(
        /*html*/
        a[3]
      );
    },
    m(s, i) {
      ri(s, n, i);
    },
    p(s, i) {
      i & /*html*/
      8 && a2(
        n,
        /*html*/
        s[3]
      );
    },
    d(s) {
      s && ni(n);
    }
  };
}
function h2(a) {
  let n, s;
  return {
    c() {
      n = new $h(!1), s = s2(), n.a = s;
    },
    m(i, o) {
      n.m(
        /*html*/
        a[3],
        i,
        o
      ), ri(i, s, o);
    },
    p(i, o) {
      o & /*html*/
      8 && n.p(
        /*html*/
        i[3]
      );
    },
    d(i) {
      i && (ni(s), n.d());
    }
  };
}
function f2(a) {
  let n;
  function s(u, f) {
    return (
      /*render_markdown*/
      u[1] ? h2 : c2
    );
  }
  let i = s(a), o = i(a);
  return {
    c() {
      n = r2("span"), o.c(), t2(n, "class", "md svelte-jhaueu"), hr(
        n,
        "chatbot",
        /*chatbot*/
        a[0]
      ), hr(
        n,
        "prose",
        /*render_markdown*/
        a[1]
      );
    },
    m(u, f) {
      ri(u, n, f), o.m(n, null), a[9](n);
    },
    p(u, [f]) {
      i === (i = s(u)) && o ? o.p(u, f) : (o.d(1), o = i(u), o && (o.c(), o.m(n, null))), f & /*chatbot*/
      1 && hr(
        n,
        "chatbot",
        /*chatbot*/
        u[0]
      ), f & /*render_markdown*/
      2 && hr(
        n,
        "prose",
        /*render_markdown*/
        u[1]
      );
    },
    i: ua,
    o: ua,
    d(u) {
      u && ni(n), o.d(), a[9](null);
    }
  };
}
function d2(a, n, s) {
  var i = this && this.__awaiter || function(A, S, M, I) {
    function O(H) {
      return H instanceof M ? H : new M(function(J) {
        J(H);
      });
    }
    return new (M || (M = Promise))(function(H, J) {
      function K(pe) {
        try {
          ce(I.next(pe));
        } catch (ve) {
          J(ve);
        }
      }
      function le(pe) {
        try {
          ce(I.throw(pe));
        } catch (ve) {
          J(ve);
        }
      }
      function ce(pe) {
        pe.done ? H(pe.value) : O(pe.value).then(K, le);
      }
      ce((I = I.apply(A, S || [])).next());
    });
  };
  let { chatbot: o = !0 } = n, { message: u } = n, { sanitize_html: f = !0 } = n, { latex_delimiters: p = [] } = n, { render_markdown: g = !0 } = n, { line_breaks: _ = !0 } = n, { header_links: k = !1 } = n, T, B;
  const P = Jh({ header_links: k, line_breaks: _ }), W = (A) => {
    try {
      return !!A && new URL(A, location.href).origin !== location.origin;
    } catch {
      return !1;
    }
  };
  Yl.addHook("afterSanitizeAttributes", function(A) {
    "target" in A && W(A.getAttribute("href")) && (A.setAttribute("target", "_blank"), A.setAttribute("rel", "noopener noreferrer"));
  });
  function j(A) {
    return g && (A = P.parse(A)), f && (A = Yl.sanitize(A)), A;
  }
  function G(A) {
    return i(this, void 0, void 0, function* () {
      p.length > 0 && A && p.some((M) => A.includes(M.left) && A.includes(M.right)) && eh(T, {
        delimiters: p,
        throwOnError: !1
      });
    });
  }
  u2(() => G(u));
  function U(A) {
    n2[A ? "unshift" : "push"](() => {
      T = A, s(2, T);
    });
  }
  return a.$$set = (A) => {
    "chatbot" in A && s(0, o = A.chatbot), "message" in A && s(4, u = A.message), "sanitize_html" in A && s(5, f = A.sanitize_html), "latex_delimiters" in A && s(6, p = A.latex_delimiters), "render_markdown" in A && s(1, g = A.render_markdown), "line_breaks" in A && s(7, _ = A.line_breaks), "header_links" in A && s(8, k = A.header_links);
  }, a.$$.update = () => {
    a.$$.dirty & /*message*/
    16 && (u && u.trim() ? s(3, B = j(u)) : s(3, B = ""));
  }, [
    o,
    g,
    T,
    B,
    u,
    f,
    p,
    _,
    k,
    U
  ];
}
class Cr extends e2 {
  constructor(n) {
    super(), i2(this, n, d2, f2, l2, {
      chatbot: 0,
      message: 4,
      sanitize_html: 5,
      latex_delimiters: 6,
      render_markdown: 1,
      line_breaks: 7,
      header_links: 8
    });
  }
}
function ln(a) {
  let n = ["", "k", "M", "G", "T", "P", "E", "Z"], s = 0;
  for (; a > 1e3 && s < n.length - 1; )
    a /= 1e3, s++;
  let i = n[s];
  return (Number.isInteger(a) ? a : a.toFixed(1)) + i;
}
function br() {
}
function m2(a, n) {
  return a != a ? n == n : a !== n || a && typeof a == "object" || typeof a == "function";
}
const zo = typeof window < "u";
let ca = zo ? () => window.performance.now() : () => Date.now(), Bo = zo ? (a) => requestAnimationFrame(a) : br;
const an = /* @__PURE__ */ new Set();
function No(a) {
  an.forEach((n) => {
    n.c(a) || (an.delete(n), n.f());
  }), an.size !== 0 && Bo(No);
}
function p2(a) {
  let n;
  return an.size === 0 && Bo(No), {
    promise: new Promise((s) => {
      an.add(n = {
        c: a,
        f: s
      });
    }),
    abort() {
      an.delete(n);
    }
  };
}
const rn = [];
function g2(a, n = br) {
  let s;
  const i = /* @__PURE__ */ new Set();
  function o(p) {
    if (m2(a, p) && (a = p, s)) {
      const g = !rn.length;
      for (const _ of i)
        _[1](), rn.push(_, a);
      if (g) {
        for (let _ = 0; _ < rn.length; _ += 2)
          rn[_][0](rn[_ + 1]);
        rn.length = 0;
      }
    }
  }
  function u(p) {
    o(p(a));
  }
  function f(p, g = br) {
    const _ = [p, g];
    return i.add(_), i.size === 1 && (s = n(o, u) || br), p(a), () => {
      i.delete(_), i.size === 0 && s && (s(), s = null);
    };
  }
  return {
    set: o,
    update: u,
    subscribe: f
  };
}
function ha(a) {
  return Object.prototype.toString.call(a) === "[object Date]";
}
function Gs(a, n, s, i) {
  if (typeof s == "number" || ha(s)) {
    const o = i - s, u = (s - n) / (a.dt || 1 / 60), f = a.opts.stiffness * o, p = a.opts.damping * u, g = (f - p) * a.inv_mass, _ = (u + g) * a.dt;
    return Math.abs(_) < a.opts.precision && Math.abs(o) < a.opts.precision ? i : (a.settled = !1, ha(s) ? new Date(s.getTime() + _) : s + _);
  } else {
    if (Array.isArray(s))
      return s.map((o, u) => Gs(a, n[u], s[u], i[u]));
    if (typeof s == "object") {
      const o = {};
      for (const u in s)
        o[u] = Gs(a, n[u], s[u], i[u]);
      return o;
    } else
      throw new Error(`Cannot spring ${typeof s} values`);
  }
}
function fa(a, n = {}) {
  const s = g2(a), {
    stiffness: i = 0.15,
    damping: o = 0.8,
    precision: u = 0.01
  } = n;
  let f, p, g, _ = a, k = a, T = 1, B = 0, P = !1;
  function W(G, U = {}) {
    k = G;
    const A = g = {};
    return a == null || U.hard || j.stiffness >= 1 && j.damping >= 1 ? (P = !0, f = ca(), _ = G, s.set(a = k), Promise.resolve()) : (U.soft && (B = 1 / ((U.soft === !0 ? 0.5 : +U.soft) * 60), T = 0), p || (f = ca(), P = !1, p = p2((S) => {
      if (P)
        return P = !1, p = null, !1;
      T = Math.min(T + B, 1);
      const M = {
        inv_mass: T,
        opts: j,
        settled: !0,
        dt: (S - f) * 60 / 1e3
      }, I = Gs(M, _, a, k);
      return f = S, _ = a, s.set(a = I), M.settled && (p = null), !M.settled;
    })), new Promise((S) => {
      p.promise.then(() => {
        A === g && S();
      });
    }));
  }
  const j = {
    set: W,
    update: (G, U) => W(G(k, a), U),
    subscribe: s.subscribe,
    stiffness: i,
    damping: o,
    precision: u
  };
  return j;
}
const {
  SvelteComponent: b2,
  append: Qt,
  attr: Ee,
  component_subscribe: da,
  detach: w2,
  element: _2,
  init: y2,
  insert: k2,
  noop: ma,
  safe_not_equal: D2,
  set_style: fr,
  svg_element: Jt,
  toggle_class: pa
} = window.__gradio__svelte__internal, { onMount: x2 } = window.__gradio__svelte__internal;
function v2(a) {
  let n, s, i, o, u, f, p, g, _, k, T, B;
  return {
    c() {
      n = _2("div"), s = Jt("svg"), i = Jt("g"), o = Jt("path"), u = Jt("path"), f = Jt("path"), p = Jt("path"), g = Jt("g"), _ = Jt("path"), k = Jt("path"), T = Jt("path"), B = Jt("path"), Ee(o, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), Ee(o, "fill", "#FF7C00"), Ee(o, "fill-opacity", "0.4"), Ee(o, "class", "svelte-43sxxs"), Ee(u, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), Ee(u, "fill", "#FF7C00"), Ee(u, "class", "svelte-43sxxs"), Ee(f, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), Ee(f, "fill", "#FF7C00"), Ee(f, "fill-opacity", "0.4"), Ee(f, "class", "svelte-43sxxs"), Ee(p, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), Ee(p, "fill", "#FF7C00"), Ee(p, "class", "svelte-43sxxs"), fr(i, "transform", "translate(" + /*$top*/
      a[1][0] + "px, " + /*$top*/
      a[1][1] + "px)"), Ee(_, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), Ee(_, "fill", "#FF7C00"), Ee(_, "fill-opacity", "0.4"), Ee(_, "class", "svelte-43sxxs"), Ee(k, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), Ee(k, "fill", "#FF7C00"), Ee(k, "class", "svelte-43sxxs"), Ee(T, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), Ee(T, "fill", "#FF7C00"), Ee(T, "fill-opacity", "0.4"), Ee(T, "class", "svelte-43sxxs"), Ee(B, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), Ee(B, "fill", "#FF7C00"), Ee(B, "class", "svelte-43sxxs"), fr(g, "transform", "translate(" + /*$bottom*/
      a[2][0] + "px, " + /*$bottom*/
      a[2][1] + "px)"), Ee(s, "viewBox", "-1200 -1200 3000 3000"), Ee(s, "fill", "none"), Ee(s, "xmlns", "http://www.w3.org/2000/svg"), Ee(s, "class", "svelte-43sxxs"), Ee(n, "class", "svelte-43sxxs"), pa(
        n,
        "margin",
        /*margin*/
        a[0]
      );
    },
    m(P, W) {
      k2(P, n, W), Qt(n, s), Qt(s, i), Qt(i, o), Qt(i, u), Qt(i, f), Qt(i, p), Qt(s, g), Qt(g, _), Qt(g, k), Qt(g, T), Qt(g, B);
    },
    p(P, [W]) {
      W & /*$top*/
      2 && fr(i, "transform", "translate(" + /*$top*/
      P[1][0] + "px, " + /*$top*/
      P[1][1] + "px)"), W & /*$bottom*/
      4 && fr(g, "transform", "translate(" + /*$bottom*/
      P[2][0] + "px, " + /*$bottom*/
      P[2][1] + "px)"), W & /*margin*/
      1 && pa(
        n,
        "margin",
        /*margin*/
        P[0]
      );
    },
    i: ma,
    o: ma,
    d(P) {
      P && w2(n);
    }
  };
}
function A2(a, n, s) {
  let i, o;
  var u = this && this.__awaiter || function(P, W, j, G) {
    function U(A) {
      return A instanceof j ? A : new j(function(S) {
        S(A);
      });
    }
    return new (j || (j = Promise))(function(A, S) {
      function M(H) {
        try {
          O(G.next(H));
        } catch (J) {
          S(J);
        }
      }
      function I(H) {
        try {
          O(G.throw(H));
        } catch (J) {
          S(J);
        }
      }
      function O(H) {
        H.done ? A(H.value) : U(H.value).then(M, I);
      }
      O((G = G.apply(P, W || [])).next());
    });
  };
  let { margin: f = !0 } = n;
  const p = fa([0, 0]);
  da(a, p, (P) => s(1, i = P));
  const g = fa([0, 0]);
  da(a, g, (P) => s(2, o = P));
  let _;
  function k() {
    return u(this, void 0, void 0, function* () {
      yield Promise.all([p.set([125, 140]), g.set([-125, -140])]), yield Promise.all([p.set([-125, 140]), g.set([125, -140])]), yield Promise.all([p.set([-125, 0]), g.set([125, -0])]), yield Promise.all([p.set([125, 0]), g.set([-125, 0])]);
    });
  }
  function T() {
    return u(this, void 0, void 0, function* () {
      yield k(), _ || T();
    });
  }
  function B() {
    return u(this, void 0, void 0, function* () {
      yield Promise.all([p.set([125, 0]), g.set([-125, 0])]), T();
    });
  }
  return x2(() => (B(), () => _ = !0)), a.$$set = (P) => {
    "margin" in P && s(0, f = P.margin);
  }, [f, i, o, p, g];
}
class S2 extends b2 {
  constructor(n) {
    super(), y2(this, n, A2, v2, D2, { margin: 0 });
  }
}
const {
  SvelteComponent: E2,
  append: W0,
  attr: e0,
  binding_callbacks: ga,
  check_outros: Ro,
  create_component: Io,
  create_slot: F2,
  destroy_component: Lo,
  destroy_each: Oo,
  detach: fe,
  element: d0,
  empty: on,
  ensure_array_like: Sr,
  get_all_dirty_from_scope: T2,
  get_slot_changes: C2,
  group_outros: qo,
  init: M2,
  insert: de,
  mount_component: Po,
  noop: Vs,
  safe_not_equal: z2,
  set_data: Wt,
  set_style: L0,
  space: t0,
  text: We,
  toggle_class: Gt,
  transition_in: X0,
  transition_out: Y0,
  update_slot_base: B2
} = window.__gradio__svelte__internal, { tick: N2 } = window.__gradio__svelte__internal, { onDestroy: R2 } = window.__gradio__svelte__internal, { createEventDispatcher: I2 } = window.__gradio__svelte__internal, L2 = (a) => ({}), ba = (a) => ({});
function wa(a, n, s) {
  const i = a.slice();
  return i[41] = n[s], i[43] = s, i;
}
function _a(a, n, s) {
  const i = a.slice();
  return i[41] = n[s], i;
}
function O2(a) {
  let n, s, i, o, u = (
    /*i18n*/
    a[1]("common.error") + ""
  ), f, p, g;
  s = new so({
    props: {
      Icon: mc,
      label: (
        /*i18n*/
        a[1]("common.clear")
      ),
      disabled: !1
    }
  }), s.$on(
    "click",
    /*click_handler*/
    a[32]
  );
  const _ = (
    /*#slots*/
    a[30].error
  ), k = F2(
    _,
    a,
    /*$$scope*/
    a[29],
    ba
  );
  return {
    c() {
      n = d0("div"), Io(s.$$.fragment), i = t0(), o = d0("span"), f = We(u), p = t0(), k && k.c(), e0(n, "class", "clear-status svelte-vopvsi"), e0(o, "class", "error svelte-vopvsi");
    },
    m(T, B) {
      de(T, n, B), Po(s, n, null), de(T, i, B), de(T, o, B), W0(o, f), de(T, p, B), k && k.m(T, B), g = !0;
    },
    p(T, B) {
      const P = {};
      B[0] & /*i18n*/
      2 && (P.label = /*i18n*/
      T[1]("common.clear")), s.$set(P), (!g || B[0] & /*i18n*/
      2) && u !== (u = /*i18n*/
      T[1]("common.error") + "") && Wt(f, u), k && k.p && (!g || B[0] & /*$$scope*/
      536870912) && B2(
        k,
        _,
        T,
        /*$$scope*/
        T[29],
        g ? C2(
          _,
          /*$$scope*/
          T[29],
          B,
          L2
        ) : T2(
          /*$$scope*/
          T[29]
        ),
        ba
      );
    },
    i(T) {
      g || (X0(s.$$.fragment, T), X0(k, T), g = !0);
    },
    o(T) {
      Y0(s.$$.fragment, T), Y0(k, T), g = !1;
    },
    d(T) {
      T && (fe(n), fe(i), fe(o), fe(p)), Lo(s), k && k.d(T);
    }
  };
}
function q2(a) {
  let n, s, i, o, u, f, p, g, _, k = (
    /*variant*/
    a[8] === "default" && /*show_eta_bar*/
    a[18] && /*show_progress*/
    a[6] === "full" && ya(a)
  );
  function T(S, M) {
    if (
      /*progress*/
      S[7]
    )
      return U2;
    if (
      /*queue_position*/
      S[2] !== null && /*queue_size*/
      S[3] !== void 0 && /*queue_position*/
      S[2] >= 0
    )
      return H2;
    if (
      /*queue_position*/
      S[2] === 0
    )
      return P2;
  }
  let B = T(a), P = B && B(a), W = (
    /*timer*/
    a[5] && xa(a)
  );
  const j = [j2, W2], G = [];
  function U(S, M) {
    return (
      /*last_progress_level*/
      S[15] != null ? 0 : (
        /*show_progress*/
        S[6] === "full" ? 1 : -1
      )
    );
  }
  ~(u = U(a)) && (f = G[u] = j[u](a));
  let A = !/*timer*/
  a[5] && Ca(a);
  return {
    c() {
      k && k.c(), n = t0(), s = d0("div"), P && P.c(), i = t0(), W && W.c(), o = t0(), f && f.c(), p = t0(), A && A.c(), g = on(), e0(s, "class", "progress-text svelte-vopvsi"), Gt(
        s,
        "meta-text-center",
        /*variant*/
        a[8] === "center"
      ), Gt(
        s,
        "meta-text",
        /*variant*/
        a[8] === "default"
      );
    },
    m(S, M) {
      k && k.m(S, M), de(S, n, M), de(S, s, M), P && P.m(s, null), W0(s, i), W && W.m(s, null), de(S, o, M), ~u && G[u].m(S, M), de(S, p, M), A && A.m(S, M), de(S, g, M), _ = !0;
    },
    p(S, M) {
      /*variant*/
      S[8] === "default" && /*show_eta_bar*/
      S[18] && /*show_progress*/
      S[6] === "full" ? k ? k.p(S, M) : (k = ya(S), k.c(), k.m(n.parentNode, n)) : k && (k.d(1), k = null), B === (B = T(S)) && P ? P.p(S, M) : (P && P.d(1), P = B && B(S), P && (P.c(), P.m(s, i))), /*timer*/
      S[5] ? W ? W.p(S, M) : (W = xa(S), W.c(), W.m(s, null)) : W && (W.d(1), W = null), (!_ || M[0] & /*variant*/
      256) && Gt(
        s,
        "meta-text-center",
        /*variant*/
        S[8] === "center"
      ), (!_ || M[0] & /*variant*/
      256) && Gt(
        s,
        "meta-text",
        /*variant*/
        S[8] === "default"
      );
      let I = u;
      u = U(S), u === I ? ~u && G[u].p(S, M) : (f && (qo(), Y0(G[I], 1, 1, () => {
        G[I] = null;
      }), Ro()), ~u ? (f = G[u], f ? f.p(S, M) : (f = G[u] = j[u](S), f.c()), X0(f, 1), f.m(p.parentNode, p)) : f = null), /*timer*/
      S[5] ? A && (A.d(1), A = null) : A ? A.p(S, M) : (A = Ca(S), A.c(), A.m(g.parentNode, g));
    },
    i(S) {
      _ || (X0(f), _ = !0);
    },
    o(S) {
      Y0(f), _ = !1;
    },
    d(S) {
      S && (fe(n), fe(s), fe(o), fe(p), fe(g)), k && k.d(S), P && P.d(), W && W.d(), ~u && G[u].d(S), A && A.d(S);
    }
  };
}
function ya(a) {
  let n, s = `translateX(${/*eta_level*/
  (a[17] || 0) * 100 - 100}%)`;
  return {
    c() {
      n = d0("div"), e0(n, "class", "eta-bar svelte-vopvsi"), L0(n, "transform", s);
    },
    m(i, o) {
      de(i, n, o);
    },
    p(i, o) {
      o[0] & /*eta_level*/
      131072 && s !== (s = `translateX(${/*eta_level*/
      (i[17] || 0) * 100 - 100}%)`) && L0(n, "transform", s);
    },
    d(i) {
      i && fe(n);
    }
  };
}
function P2(a) {
  let n;
  return {
    c() {
      n = We("processing |");
    },
    m(s, i) {
      de(s, n, i);
    },
    p: Vs,
    d(s) {
      s && fe(n);
    }
  };
}
function H2(a) {
  let n, s = (
    /*queue_position*/
    a[2] + 1 + ""
  ), i, o, u, f;
  return {
    c() {
      n = We("queue: "), i = We(s), o = We("/"), u = We(
        /*queue_size*/
        a[3]
      ), f = We(" |");
    },
    m(p, g) {
      de(p, n, g), de(p, i, g), de(p, o, g), de(p, u, g), de(p, f, g);
    },
    p(p, g) {
      g[0] & /*queue_position*/
      4 && s !== (s = /*queue_position*/
      p[2] + 1 + "") && Wt(i, s), g[0] & /*queue_size*/
      8 && Wt(
        u,
        /*queue_size*/
        p[3]
      );
    },
    d(p) {
      p && (fe(n), fe(i), fe(o), fe(u), fe(f));
    }
  };
}
function U2(a) {
  let n, s = Sr(
    /*progress*/
    a[7]
  ), i = [];
  for (let o = 0; o < s.length; o += 1)
    i[o] = Da(_a(a, s, o));
  return {
    c() {
      for (let o = 0; o < i.length; o += 1)
        i[o].c();
      n = on();
    },
    m(o, u) {
      for (let f = 0; f < i.length; f += 1)
        i[f] && i[f].m(o, u);
      de(o, n, u);
    },
    p(o, u) {
      if (u[0] & /*progress*/
      128) {
        s = Sr(
          /*progress*/
          o[7]
        );
        let f;
        for (f = 0; f < s.length; f += 1) {
          const p = _a(o, s, f);
          i[f] ? i[f].p(p, u) : (i[f] = Da(p), i[f].c(), i[f].m(n.parentNode, n));
        }
        for (; f < i.length; f += 1)
          i[f].d(1);
        i.length = s.length;
      }
    },
    d(o) {
      o && fe(n), Oo(i, o);
    }
  };
}
function ka(a) {
  let n, s = (
    /*p*/
    a[41].unit + ""
  ), i, o, u = " ", f;
  function p(k, T) {
    return (
      /*p*/
      k[41].length != null ? V2 : G2
    );
  }
  let g = p(a), _ = g(a);
  return {
    c() {
      _.c(), n = t0(), i = We(s), o = We(" | "), f = We(u);
    },
    m(k, T) {
      _.m(k, T), de(k, n, T), de(k, i, T), de(k, o, T), de(k, f, T);
    },
    p(k, T) {
      g === (g = p(k)) && _ ? _.p(k, T) : (_.d(1), _ = g(k), _ && (_.c(), _.m(n.parentNode, n))), T[0] & /*progress*/
      128 && s !== (s = /*p*/
      k[41].unit + "") && Wt(i, s);
    },
    d(k) {
      k && (fe(n), fe(i), fe(o), fe(f)), _.d(k);
    }
  };
}
function G2(a) {
  let n = ln(
    /*p*/
    a[41].index || 0
  ) + "", s;
  return {
    c() {
      s = We(n);
    },
    m(i, o) {
      de(i, s, o);
    },
    p(i, o) {
      o[0] & /*progress*/
      128 && n !== (n = ln(
        /*p*/
        i[41].index || 0
      ) + "") && Wt(s, n);
    },
    d(i) {
      i && fe(s);
    }
  };
}
function V2(a) {
  let n = ln(
    /*p*/
    a[41].index || 0
  ) + "", s, i, o = ln(
    /*p*/
    a[41].length
  ) + "", u;
  return {
    c() {
      s = We(n), i = We("/"), u = We(o);
    },
    m(f, p) {
      de(f, s, p), de(f, i, p), de(f, u, p);
    },
    p(f, p) {
      p[0] & /*progress*/
      128 && n !== (n = ln(
        /*p*/
        f[41].index || 0
      ) + "") && Wt(s, n), p[0] & /*progress*/
      128 && o !== (o = ln(
        /*p*/
        f[41].length
      ) + "") && Wt(u, o);
    },
    d(f) {
      f && (fe(s), fe(i), fe(u));
    }
  };
}
function Da(a) {
  let n, s = (
    /*p*/
    a[41].index != null && ka(a)
  );
  return {
    c() {
      s && s.c(), n = on();
    },
    m(i, o) {
      s && s.m(i, o), de(i, n, o);
    },
    p(i, o) {
      /*p*/
      i[41].index != null ? s ? s.p(i, o) : (s = ka(i), s.c(), s.m(n.parentNode, n)) : s && (s.d(1), s = null);
    },
    d(i) {
      i && fe(n), s && s.d(i);
    }
  };
}
function xa(a) {
  let n, s = (
    /*eta*/
    a[0] ? `/${/*formatted_eta*/
    a[19]}` : ""
  ), i, o;
  return {
    c() {
      n = We(
        /*formatted_timer*/
        a[20]
      ), i = We(s), o = We("s");
    },
    m(u, f) {
      de(u, n, f), de(u, i, f), de(u, o, f);
    },
    p(u, f) {
      f[0] & /*formatted_timer*/
      1048576 && Wt(
        n,
        /*formatted_timer*/
        u[20]
      ), f[0] & /*eta, formatted_eta*/
      524289 && s !== (s = /*eta*/
      u[0] ? `/${/*formatted_eta*/
      u[19]}` : "") && Wt(i, s);
    },
    d(u) {
      u && (fe(n), fe(i), fe(o));
    }
  };
}
function W2(a) {
  let n, s;
  return n = new S2({
    props: { margin: (
      /*variant*/
      a[8] === "default"
    ) }
  }), {
    c() {
      Io(n.$$.fragment);
    },
    m(i, o) {
      Po(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*variant*/
      256 && (u.margin = /*variant*/
      i[8] === "default"), n.$set(u);
    },
    i(i) {
      s || (X0(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Y0(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Lo(n, i);
    }
  };
}
function j2(a) {
  let n, s, i, o, u, f = `${/*last_progress_level*/
  a[15] * 100}%`, p = (
    /*progress*/
    a[7] != null && va(a)
  );
  return {
    c() {
      n = d0("div"), s = d0("div"), p && p.c(), i = t0(), o = d0("div"), u = d0("div"), e0(s, "class", "progress-level-inner svelte-vopvsi"), e0(u, "class", "progress-bar svelte-vopvsi"), L0(u, "width", f), e0(o, "class", "progress-bar-wrap svelte-vopvsi"), e0(n, "class", "progress-level svelte-vopvsi");
    },
    m(g, _) {
      de(g, n, _), W0(n, s), p && p.m(s, null), W0(n, i), W0(n, o), W0(o, u), a[31](u);
    },
    p(g, _) {
      /*progress*/
      g[7] != null ? p ? p.p(g, _) : (p = va(g), p.c(), p.m(s, null)) : p && (p.d(1), p = null), _[0] & /*last_progress_level*/
      32768 && f !== (f = `${/*last_progress_level*/
      g[15] * 100}%`) && L0(u, "width", f);
    },
    i: Vs,
    o: Vs,
    d(g) {
      g && fe(n), p && p.d(), a[31](null);
    }
  };
}
function va(a) {
  let n, s = Sr(
    /*progress*/
    a[7]
  ), i = [];
  for (let o = 0; o < s.length; o += 1)
    i[o] = Ta(wa(a, s, o));
  return {
    c() {
      for (let o = 0; o < i.length; o += 1)
        i[o].c();
      n = on();
    },
    m(o, u) {
      for (let f = 0; f < i.length; f += 1)
        i[f] && i[f].m(o, u);
      de(o, n, u);
    },
    p(o, u) {
      if (u[0] & /*progress_level, progress*/
      16512) {
        s = Sr(
          /*progress*/
          o[7]
        );
        let f;
        for (f = 0; f < s.length; f += 1) {
          const p = wa(o, s, f);
          i[f] ? i[f].p(p, u) : (i[f] = Ta(p), i[f].c(), i[f].m(n.parentNode, n));
        }
        for (; f < i.length; f += 1)
          i[f].d(1);
        i.length = s.length;
      }
    },
    d(o) {
      o && fe(n), Oo(i, o);
    }
  };
}
function Aa(a) {
  let n, s, i, o, u = (
    /*i*/
    a[43] !== 0 && X2()
  ), f = (
    /*p*/
    a[41].desc != null && Sa(a)
  ), p = (
    /*p*/
    a[41].desc != null && /*progress_level*/
    a[14] && /*progress_level*/
    a[14][
      /*i*/
      a[43]
    ] != null && Ea()
  ), g = (
    /*progress_level*/
    a[14] != null && Fa(a)
  );
  return {
    c() {
      u && u.c(), n = t0(), f && f.c(), s = t0(), p && p.c(), i = t0(), g && g.c(), o = on();
    },
    m(_, k) {
      u && u.m(_, k), de(_, n, k), f && f.m(_, k), de(_, s, k), p && p.m(_, k), de(_, i, k), g && g.m(_, k), de(_, o, k);
    },
    p(_, k) {
      /*p*/
      _[41].desc != null ? f ? f.p(_, k) : (f = Sa(_), f.c(), f.m(s.parentNode, s)) : f && (f.d(1), f = null), /*p*/
      _[41].desc != null && /*progress_level*/
      _[14] && /*progress_level*/
      _[14][
        /*i*/
        _[43]
      ] != null ? p || (p = Ea(), p.c(), p.m(i.parentNode, i)) : p && (p.d(1), p = null), /*progress_level*/
      _[14] != null ? g ? g.p(_, k) : (g = Fa(_), g.c(), g.m(o.parentNode, o)) : g && (g.d(1), g = null);
    },
    d(_) {
      _ && (fe(n), fe(s), fe(i), fe(o)), u && u.d(_), f && f.d(_), p && p.d(_), g && g.d(_);
    }
  };
}
function X2(a) {
  let n;
  return {
    c() {
      n = We(" /");
    },
    m(s, i) {
      de(s, n, i);
    },
    d(s) {
      s && fe(n);
    }
  };
}
function Sa(a) {
  let n = (
    /*p*/
    a[41].desc + ""
  ), s;
  return {
    c() {
      s = We(n);
    },
    m(i, o) {
      de(i, s, o);
    },
    p(i, o) {
      o[0] & /*progress*/
      128 && n !== (n = /*p*/
      i[41].desc + "") && Wt(s, n);
    },
    d(i) {
      i && fe(s);
    }
  };
}
function Ea(a) {
  let n;
  return {
    c() {
      n = We("-");
    },
    m(s, i) {
      de(s, n, i);
    },
    d(s) {
      s && fe(n);
    }
  };
}
function Fa(a) {
  let n = (100 * /*progress_level*/
  (a[14][
    /*i*/
    a[43]
  ] || 0)).toFixed(1) + "", s, i;
  return {
    c() {
      s = We(n), i = We("%");
    },
    m(o, u) {
      de(o, s, u), de(o, i, u);
    },
    p(o, u) {
      u[0] & /*progress_level*/
      16384 && n !== (n = (100 * /*progress_level*/
      (o[14][
        /*i*/
        o[43]
      ] || 0)).toFixed(1) + "") && Wt(s, n);
    },
    d(o) {
      o && (fe(s), fe(i));
    }
  };
}
function Ta(a) {
  let n, s = (
    /*p*/
    (a[41].desc != null || /*progress_level*/
    a[14] && /*progress_level*/
    a[14][
      /*i*/
      a[43]
    ] != null) && Aa(a)
  );
  return {
    c() {
      s && s.c(), n = on();
    },
    m(i, o) {
      s && s.m(i, o), de(i, n, o);
    },
    p(i, o) {
      /*p*/
      i[41].desc != null || /*progress_level*/
      i[14] && /*progress_level*/
      i[14][
        /*i*/
        i[43]
      ] != null ? s ? s.p(i, o) : (s = Aa(i), s.c(), s.m(n.parentNode, n)) : s && (s.d(1), s = null);
    },
    d(i) {
      i && fe(n), s && s.d(i);
    }
  };
}
function Ca(a) {
  let n, s;
  return {
    c() {
      n = d0("p"), s = We(
        /*loading_text*/
        a[9]
      ), e0(n, "class", "loading svelte-vopvsi");
    },
    m(i, o) {
      de(i, n, o), W0(n, s);
    },
    p(i, o) {
      o[0] & /*loading_text*/
      512 && Wt(
        s,
        /*loading_text*/
        i[9]
      );
    },
    d(i) {
      i && fe(n);
    }
  };
}
function Y2(a) {
  let n, s, i, o, u;
  const f = [q2, O2], p = [];
  function g(_, k) {
    return (
      /*status*/
      _[4] === "pending" ? 0 : (
        /*status*/
        _[4] === "error" ? 1 : -1
      )
    );
  }
  return ~(s = g(a)) && (i = p[s] = f[s](a)), {
    c() {
      n = d0("div"), i && i.c(), e0(n, "class", o = "wrap " + /*variant*/
      a[8] + " " + /*show_progress*/
      a[6] + " svelte-vopvsi"), Gt(n, "hide", !/*status*/
      a[4] || /*status*/
      a[4] === "complete" || /*show_progress*/
      a[6] === "hidden"), Gt(
        n,
        "translucent",
        /*variant*/
        a[8] === "center" && /*status*/
        (a[4] === "pending" || /*status*/
        a[4] === "error") || /*translucent*/
        a[11] || /*show_progress*/
        a[6] === "minimal"
      ), Gt(
        n,
        "generating",
        /*status*/
        a[4] === "generating"
      ), Gt(
        n,
        "border",
        /*border*/
        a[12]
      ), L0(
        n,
        "position",
        /*absolute*/
        a[10] ? "absolute" : "static"
      ), L0(
        n,
        "padding",
        /*absolute*/
        a[10] ? "0" : "var(--size-8) 0"
      );
    },
    m(_, k) {
      de(_, n, k), ~s && p[s].m(n, null), a[33](n), u = !0;
    },
    p(_, k) {
      let T = s;
      s = g(_), s === T ? ~s && p[s].p(_, k) : (i && (qo(), Y0(p[T], 1, 1, () => {
        p[T] = null;
      }), Ro()), ~s ? (i = p[s], i ? i.p(_, k) : (i = p[s] = f[s](_), i.c()), X0(i, 1), i.m(n, null)) : i = null), (!u || k[0] & /*variant, show_progress*/
      320 && o !== (o = "wrap " + /*variant*/
      _[8] + " " + /*show_progress*/
      _[6] + " svelte-vopvsi")) && e0(n, "class", o), (!u || k[0] & /*variant, show_progress, status, show_progress*/
      336) && Gt(n, "hide", !/*status*/
      _[4] || /*status*/
      _[4] === "complete" || /*show_progress*/
      _[6] === "hidden"), (!u || k[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
      2384) && Gt(
        n,
        "translucent",
        /*variant*/
        _[8] === "center" && /*status*/
        (_[4] === "pending" || /*status*/
        _[4] === "error") || /*translucent*/
        _[11] || /*show_progress*/
        _[6] === "minimal"
      ), (!u || k[0] & /*variant, show_progress, status*/
      336) && Gt(
        n,
        "generating",
        /*status*/
        _[4] === "generating"
      ), (!u || k[0] & /*variant, show_progress, border*/
      4416) && Gt(
        n,
        "border",
        /*border*/
        _[12]
      ), k[0] & /*absolute*/
      1024 && L0(
        n,
        "position",
        /*absolute*/
        _[10] ? "absolute" : "static"
      ), k[0] & /*absolute*/
      1024 && L0(
        n,
        "padding",
        /*absolute*/
        _[10] ? "0" : "var(--size-8) 0"
      );
    },
    i(_) {
      u || (X0(i), u = !0);
    },
    o(_) {
      Y0(i), u = !1;
    },
    d(_) {
      _ && fe(n), ~s && p[s].d(), a[33](null);
    }
  };
}
var Z2 = function(a, n, s, i) {
  function o(u) {
    return u instanceof s ? u : new s(function(f) {
      f(u);
    });
  }
  return new (s || (s = Promise))(function(u, f) {
    function p(k) {
      try {
        _(i.next(k));
      } catch (T) {
        f(T);
      }
    }
    function g(k) {
      try {
        _(i.throw(k));
      } catch (T) {
        f(T);
      }
    }
    function _(k) {
      k.done ? u(k.value) : o(k.value).then(p, g);
    }
    _((i = i.apply(a, n || [])).next());
  });
};
let dr = [], zs = !1;
function K2(a) {
  return Z2(this, arguments, void 0, function* (n, s = !0) {
    if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && s !== !0)) {
      if (dr.push(n), !zs)
        zs = !0;
      else
        return;
      yield N2(), requestAnimationFrame(() => {
        let i = [0, 0];
        for (let o = 0; o < dr.length; o++) {
          const f = dr[o].getBoundingClientRect();
          (o === 0 || f.top + window.scrollY <= i[0]) && (i[0] = f.top + window.scrollY, i[1] = o);
        }
        window.scrollTo({ top: i[0] - 20, behavior: "smooth" }), zs = !1, dr = [];
      });
    }
  });
}
function Q2(a, n, s) {
  let i, { $$slots: o = {}, $$scope: u } = n;
  this && this.__awaiter;
  const f = I2();
  let { i18n: p } = n, { eta: g = null } = n, { queue_position: _ } = n, { queue_size: k } = n, { status: T } = n, { scroll_to_output: B = !1 } = n, { timer: P = !0 } = n, { show_progress: W = "full" } = n, { message: j = null } = n, { progress: G = null } = n, { variant: U = "default" } = n, { loading_text: A = "Loading..." } = n, { absolute: S = !0 } = n, { translucent: M = !1 } = n, { border: I = !1 } = n, { autoscroll: O } = n, H, J = !1, K = 0, le = 0, ce = null, pe = null, ve = 0, Ie = null, ut, st = null, mt = !0;
  const Oe = () => {
    s(0, g = s(27, ce = s(19, V = null))), s(25, K = performance.now()), s(26, le = 0), J = !0, $();
  };
  function $() {
    requestAnimationFrame(() => {
      s(26, le = (performance.now() - K) / 1e3), J && $();
    });
  }
  function Fe() {
    s(26, le = 0), s(0, g = s(27, ce = s(19, V = null))), J && (J = !1);
  }
  R2(() => {
    J && Fe();
  });
  let V = null;
  function he(ie) {
    ga[ie ? "unshift" : "push"](() => {
      st = ie, s(16, st), s(7, G), s(14, Ie), s(15, ut);
    });
  }
  const Ke = () => {
    f("clear_status");
  };
  function we(ie) {
    ga[ie ? "unshift" : "push"](() => {
      H = ie, s(13, H);
    });
  }
  return a.$$set = (ie) => {
    "i18n" in ie && s(1, p = ie.i18n), "eta" in ie && s(0, g = ie.eta), "queue_position" in ie && s(2, _ = ie.queue_position), "queue_size" in ie && s(3, k = ie.queue_size), "status" in ie && s(4, T = ie.status), "scroll_to_output" in ie && s(22, B = ie.scroll_to_output), "timer" in ie && s(5, P = ie.timer), "show_progress" in ie && s(6, W = ie.show_progress), "message" in ie && s(23, j = ie.message), "progress" in ie && s(7, G = ie.progress), "variant" in ie && s(8, U = ie.variant), "loading_text" in ie && s(9, A = ie.loading_text), "absolute" in ie && s(10, S = ie.absolute), "translucent" in ie && s(11, M = ie.translucent), "border" in ie && s(12, I = ie.border), "autoscroll" in ie && s(24, O = ie.autoscroll), "$$scope" in ie && s(29, u = ie.$$scope);
  }, a.$$.update = () => {
    a.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
    436207617 && (g === null && s(0, g = ce), g != null && ce !== g && (s(28, pe = (performance.now() - K) / 1e3 + g), s(19, V = pe.toFixed(1)), s(27, ce = g))), a.$$.dirty[0] & /*eta_from_start, timer_diff*/
    335544320 && s(17, ve = pe === null || pe <= 0 || !le ? null : Math.min(le / pe, 1)), a.$$.dirty[0] & /*progress*/
    128 && G != null && s(18, mt = !1), a.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
    114816 && (G != null ? s(14, Ie = G.map((ie) => {
      if (ie.index != null && ie.length != null)
        return ie.index / ie.length;
      if (ie.progress != null)
        return ie.progress;
    })) : s(14, Ie = null), Ie ? (s(15, ut = Ie[Ie.length - 1]), st && (ut === 0 ? s(16, st.style.transition = "0", st) : s(16, st.style.transition = "150ms", st))) : s(15, ut = void 0)), a.$$.dirty[0] & /*status*/
    16 && (T === "pending" ? Oe() : Fe()), a.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
    20979728 && H && B && (T === "pending" || T === "complete") && K2(H, O), a.$$.dirty[0] & /*status, message*/
    8388624, a.$$.dirty[0] & /*timer_diff*/
    67108864 && s(20, i = le.toFixed(1));
  }, [
    g,
    p,
    _,
    k,
    T,
    P,
    W,
    G,
    U,
    A,
    S,
    M,
    I,
    H,
    Ie,
    ut,
    st,
    ve,
    mt,
    V,
    i,
    f,
    B,
    j,
    O,
    K,
    le,
    ce,
    pe,
    u,
    o,
    he,
    Ke,
    we
  ];
}
class J2 extends E2 {
  constructor(n) {
    super(), M2(
      this,
      n,
      Q2,
      Y2,
      z2,
      {
        i18n: 1,
        eta: 0,
        queue_position: 2,
        queue_size: 3,
        status: 4,
        scroll_to_output: 22,
        timer: 5,
        show_progress: 6,
        message: 23,
        progress: 7,
        variant: 8,
        loading_text: 9,
        absolute: 10,
        translucent: 11,
        border: 12,
        autoscroll: 24
      },
      null,
      [-1, -1]
    );
  }
}
const {
  SvelteComponent: $2,
  attr: mr,
  detach: ef,
  element: tf,
  init: nf,
  insert: rf,
  noop: Ma,
  safe_not_equal: sf,
  set_style: za
} = window.__gradio__svelte__internal;
function lf(a) {
  let n;
  return {
    c() {
      n = tf("div"), n.innerHTML = `<span class="sr-only">Loading content</span> <div class="dot-flashing svelte-1pwlswb"></div>
	 
	<div class="dot-flashing svelte-1pwlswb"></div>
	 
	<div class="dot-flashing svelte-1pwlswb"></div>`, mr(n, "class", "message pending svelte-1pwlswb"), mr(n, "role", "status"), mr(n, "aria-label", "Loading response"), mr(n, "aria-live", "polite"), za(
        n,
        "border-radius",
        /*layout*/
        a[0] === "bubble" ? "var(--radius-xxl)" : "none"
      );
    },
    m(s, i) {
      rf(s, n, i);
    },
    p(s, [i]) {
      i & /*layout*/
      1 && za(
        n,
        "border-radius",
        /*layout*/
        s[0] === "bubble" ? "var(--radius-xxl)" : "none"
      );
    },
    i: Ma,
    o: Ma,
    d(s) {
      s && ef(n);
    }
  };
}
function af(a, n, s) {
  let { layout: i = "bubble" } = n;
  return a.$$set = (o) => {
    "layout" in o && s(0, i = o.layout);
  }, [i];
}
class of extends $2 {
  constructor(n) {
    super(), nf(this, n, af, lf, sf, { layout: 0 });
  }
}
const {
  SvelteComponent: uf,
  append: sn,
  attr: wr,
  check_outros: cf,
  create_slot: hf,
  detach: Ho,
  element: Sn,
  get_all_dirty_from_scope: ff,
  get_slot_changes: df,
  group_outros: mf,
  init: pf,
  insert: Uo,
  listen: gf,
  safe_not_equal: bf,
  set_data: wf,
  space: Ba,
  text: _f,
  transition_in: _r,
  transition_out: Ws,
  update_slot_base: yf
} = window.__gradio__svelte__internal;
function Na(a) {
  let n, s;
  const i = (
    /*#slots*/
    a[4].default
  ), o = hf(
    i,
    a,
    /*$$scope*/
    a[3],
    null
  );
  return {
    c() {
      n = Sn("div"), o && o.c(), wr(n, "class", "content svelte-jbmuis");
    },
    m(u, f) {
      Uo(u, n, f), o && o.m(n, null), s = !0;
    },
    p(u, f) {
      o && o.p && (!s || f & /*$$scope*/
      8) && yf(
        o,
        i,
        u,
        /*$$scope*/
        u[3],
        s ? df(
          i,
          /*$$scope*/
          u[3],
          f,
          null
        ) : ff(
          /*$$scope*/
          u[3]
        ),
        null
      );
    },
    i(u) {
      s || (_r(o, u), s = !0);
    },
    o(u) {
      Ws(o, u), s = !1;
    },
    d(u) {
      u && Ho(n), o && o.d(u);
    }
  };
}
function kf(a) {
  let n, s, i, o, u, f, p, g, _, k, T = (
    /*expanded*/
    a[1] && Na(a)
  );
  return {
    c() {
      n = Sn("div"), s = Sn("div"), i = Sn("div"), i.textContent = "🛠️", o = Ba(), u = Sn("span"), f = _f(
        /*title*/
        a[0]
      ), p = Ba(), T && T.c(), wr(i, "class", "wrench-icon svelte-jbmuis"), wr(s, "class", "title svelte-jbmuis"), wr(n, "class", "box svelte-jbmuis");
    },
    m(B, P) {
      Uo(B, n, P), sn(n, s), sn(s, i), sn(s, o), sn(s, u), sn(u, f), sn(n, p), T && T.m(n, null), g = !0, _ || (k = gf(
        n,
        "click",
        /*toggleExpanded*/
        a[2]
      ), _ = !0);
    },
    p(B, [P]) {
      (!g || P & /*title*/
      1) && wf(
        f,
        /*title*/
        B[0]
      ), /*expanded*/
      B[1] ? T ? (T.p(B, P), P & /*expanded*/
      2 && _r(T, 1)) : (T = Na(B), T.c(), _r(T, 1), T.m(n, null)) : T && (mf(), Ws(T, 1, 1, () => {
        T = null;
      }), cf());
    },
    i(B) {
      g || (_r(T), g = !0);
    },
    o(B) {
      Ws(T), g = !1;
    },
    d(B) {
      B && Ho(n), T && T.d(), _ = !1, k();
    }
  };
}
function Df(a, n, s) {
  let { $$slots: i = {}, $$scope: o } = n, { title: u } = n, f = !1;
  function p() {
    s(1, f = !f);
  }
  return a.$$set = (g) => {
    "title" in g && s(0, u = g.title), "$$scope" in g && s(3, o = g.$$scope);
  }, [u, f, p, o, i];
}
class xf extends uf {
  constructor(n) {
    super(), pf(this, n, Df, kf, bf, { title: 0 });
  }
}
const {
  SvelteComponent: vf,
  append: vn,
  attr: yr,
  check_outros: Af,
  create_slot: Sf,
  detach: Go,
  element: En,
  get_all_dirty_from_scope: Ef,
  get_slot_changes: Ff,
  group_outros: Tf,
  init: Cf,
  insert: Vo,
  listen: Mf,
  safe_not_equal: zf,
  space: Ra,
  transition_in: kr,
  transition_out: js,
  update_slot_base: Bf
} = window.__gradio__svelte__internal;
function Ia(a) {
  let n, s;
  const i = (
    /*#slots*/
    a[3].default
  ), o = Sf(
    i,
    a,
    /*$$scope*/
    a[2],
    null
  );
  return {
    c() {
      n = En("div"), o && o.c(), yr(n, "class", "content svelte-hj4vhn");
    },
    m(u, f) {
      Vo(u, n, f), o && o.m(n, null), s = !0;
    },
    p(u, f) {
      o && o.p && (!s || f & /*$$scope*/
      4) && Bf(
        o,
        i,
        u,
        /*$$scope*/
        u[2],
        s ? Ff(
          i,
          /*$$scope*/
          u[2],
          f,
          null
        ) : Ef(
          /*$$scope*/
          u[2]
        ),
        null
      );
    },
    i(u) {
      s || (kr(o, u), s = !0);
    },
    o(u) {
      js(o, u), s = !1;
    },
    d(u) {
      u && Go(n), o && o.d(u);
    }
  };
}
function Nf(a) {
  let n, s, i, o, u, f, p, g, _, k = (
    /*expanded*/
    a[0] && Ia(a)
  );
  return {
    c() {
      n = En("div"), s = En("div"), i = En("div"), i.textContent = "💥", o = Ra(), u = En("span"), u.textContent = "Error", f = Ra(), k && k.c(), yr(i, "class", "icon svelte-hj4vhn"), yr(s, "class", "title svelte-hj4vhn"), yr(n, "class", "box svelte-hj4vhn");
    },
    m(T, B) {
      Vo(T, n, B), vn(n, s), vn(s, i), vn(s, o), vn(s, u), vn(n, f), k && k.m(n, null), p = !0, g || (_ = Mf(
        n,
        "click",
        /*toggleExpanded*/
        a[1]
      ), g = !0);
    },
    p(T, [B]) {
      /*expanded*/
      T[0] ? k ? (k.p(T, B), B & /*expanded*/
      1 && kr(k, 1)) : (k = Ia(T), k.c(), kr(k, 1), k.m(n, null)) : k && (Tf(), js(k, 1, 1, () => {
        k = null;
      }), Af());
    },
    i(T) {
      p || (kr(k), p = !0);
    },
    o(T) {
      js(k), p = !1;
    },
    d(T) {
      T && Go(n), k && k.d(), g = !1, _();
    }
  };
}
function Rf(a, n, s) {
  let { $$slots: i = {}, $$scope: o } = n, u = !1;
  function f() {
    s(0, u = !u);
  }
  return a.$$set = (p) => {
    "$$scope" in p && s(2, o = p.$$scope);
  }, [u, f, o, i];
}
class If extends vf {
  constructor(n) {
    super(), Cf(this, n, Rf, Nf, zf, {});
  }
}
const {
  SvelteComponent: Lf,
  action_destroyer: Of,
  append: Cn,
  attr: Be,
  binding_callbacks: qf,
  bubble: R0,
  check_outros: m0,
  create_component: jt,
  destroy_component: Xt,
  destroy_each: Wo,
  detach: xt,
  element: n0,
  empty: Mr,
  ensure_array_like: Er,
  group_outros: p0,
  init: Pf,
  insert: vt,
  listen: La,
  mount_component: Yt,
  noop: Xs,
  null_to_empty: Oa,
  run_all: Hf,
  safe_not_equal: Uf,
  set_data: Gf,
  set_style: An,
  space: si,
  text: Vf,
  toggle_class: rt,
  transition_in: be,
  transition_out: Te
} = window.__gradio__svelte__internal, { beforeUpdate: Wf, afterUpdate: jf, createEventDispatcher: Xf } = window.__gradio__svelte__internal;
function qa(a, n, s) {
  const i = a.slice();
  return i[36] = n[s], i[38] = s, i;
}
function Pa(a, n, s) {
  const i = a.slice();
  return i[41] = n[s], i[43] = s, i;
}
function Bs(a) {
  const n = a.slice(), s = (
    /*messages*/
    n[36][0].role === "user" ? "user" : "bot"
  );
  n[39] = s;
  const i = (
    /*avatar_images*/
    n[6][
      /*role*/
      n[39] === "user" ? 0 : 1
    ]
  );
  return n[40] = i, n;
}
function Yf(a) {
  const n = a.slice(), s = fd(
    /*value*/
    n[0]
  );
  return n[35] = s, n;
}
function Ha(a) {
  let n, s, i;
  return s = new Nc({
    props: {
      i18n: (
        /*i18n*/
        a[11]
      ),
      formatter: a1,
      value: (
        /*value*/
        a[0]
      )
    }
  }), s.$on(
    "error",
    /*error_handler*/
    a[21]
  ), s.$on(
    "share",
    /*share_handler*/
    a[22]
  ), {
    c() {
      n = n0("div"), jt(s.$$.fragment), Be(n, "class", "share-button svelte-kqrm1b");
    },
    m(o, u) {
      vt(o, n, u), Yt(s, n, null), i = !0;
    },
    p(o, u) {
      const f = {};
      u[0] & /*i18n*/
      2048 && (f.i18n = /*i18n*/
      o[11]), u[0] & /*value*/
      1 && (f.value = /*value*/
      o[0]), s.$set(f);
    },
    i(o) {
      i || (be(s.$$.fragment, o), i = !0);
    },
    o(o) {
      Te(s.$$.fragment, o), i = !1;
    },
    d(o) {
      o && xt(n), Xt(s);
    }
  };
}
function Zf(a) {
  let n, s, i;
  return s = new Cr({
    props: {
      message: (
        /*placeholder*/
        a[13]
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        a[1]
      )
    }
  }), {
    c() {
      n = n0("center"), jt(s.$$.fragment), Be(n, "class", "svelte-kqrm1b");
    },
    m(o, u) {
      vt(o, n, u), Yt(s, n, null), i = !0;
    },
    p(o, u) {
      const f = {};
      u[0] & /*placeholder*/
      8192 && (f.message = /*placeholder*/
      o[13]), u[0] & /*latex_delimiters*/
      2 && (f.latex_delimiters = /*latex_delimiters*/
      o[1]), s.$set(f);
    },
    i(o) {
      i || (be(s.$$.fragment, o), i = !0);
    },
    o(o) {
      Te(s.$$.fragment, o), i = !1;
    },
    d(o) {
      o && xt(n), Xt(s);
    }
  };
}
function Kf(a) {
  let n, s, i, o = Er(
    /*groupedMessages*/
    a[35]
  ), u = [];
  for (let g = 0; g < o.length; g += 1)
    u[g] = Wa(qa(a, o, g));
  const f = (g) => Te(u[g], 1, 1, () => {
    u[g] = null;
  });
  let p = (
    /*pending_message*/
    a[2] && ja(a)
  );
  return {
    c() {
      for (let g = 0; g < u.length; g += 1)
        u[g].c();
      n = si(), p && p.c(), s = Mr();
    },
    m(g, _) {
      for (let k = 0; k < u.length; k += 1)
        u[k] && u[k].m(g, _);
      vt(g, n, _), p && p.m(g, _), vt(g, s, _), i = !0;
    },
    p(g, _) {
      if (_[0] & /*layout, value, bubble_full_width, render_markdown, rtl, selectable, handle_select, latex_delimiters, sanitize_html, line_breaks, scroll, avatar_images*/
      104427) {
        o = Er(
          /*groupedMessages*/
          g[35]
        );
        let k;
        for (k = 0; k < o.length; k += 1) {
          const T = qa(g, o, k);
          u[k] ? (u[k].p(T, _), be(u[k], 1)) : (u[k] = Wa(T), u[k].c(), be(u[k], 1), u[k].m(n.parentNode, n));
        }
        for (p0(), k = o.length; k < u.length; k += 1)
          f(k);
        m0();
      }
      /*pending_message*/
      g[2] ? p ? (p.p(g, _), _[0] & /*pending_message*/
      4 && be(p, 1)) : (p = ja(g), p.c(), be(p, 1), p.m(s.parentNode, s)) : p && (p0(), Te(p, 1, 1, () => {
        p = null;
      }), m0());
    },
    i(g) {
      if (!i) {
        for (let _ = 0; _ < o.length; _ += 1)
          be(u[_]);
        be(p), i = !0;
      }
    },
    o(g) {
      u = u.filter(Boolean);
      for (let _ = 0; _ < u.length; _ += 1)
        Te(u[_]);
      Te(p), i = !1;
    },
    d(g) {
      g && (xt(n), xt(s)), Wo(u, g), p && p.d(g);
    }
  };
}
function Ua(a) {
  let n, s, i, o, u, f, p, g, _, k, T, B = (
    /*avatar_img*/
    a[40] && Ga(a)
  ), P = Er(
    /*messages*/
    a[36]
  ), W = [];
  for (let A = 0; A < P.length; A += 1)
    W[A] = Va(Pa(a, P, A));
  const j = (A) => Te(W[A], 1, 1, () => {
    W[A] = null;
  });
  function G() {
    return (
      /*click_handler*/
      a[29](
        /*i*/
        a[38],
        /*messages*/
        a[36]
      )
    );
  }
  function U(...A) {
    return (
      /*keydown_handler*/
      a[30](
        /*i*/
        a[38],
        /*messages*/
        a[36],
        ...A
      )
    );
  }
  return {
    c() {
      n = n0("div"), B && B.c(), s = si(), i = n0("div"), o = n0("button");
      for (let A = 0; A < W.length; A += 1)
        W[A].c();
      Be(o, "data-testid", u = /*role*/
      a[39]), Be(o, "dir", f = /*rtl*/
      a[5] ? "rtl" : "ltr"), Be(o, "class", "svelte-kqrm1b"), rt(
        o,
        "latest",
        /*i*/
        a[38] === /*groupedMessages*/
        a[35].length - 1
      ), rt(o, "message-markdown-disabled", !/*render_markdown*/
      a[9]), rt(
        o,
        "selectable",
        /*selectable*/
        a[3]
      ), An(o, "user-select", "text"), An(
        o,
        "text-align",
        /*rtl*/
        a[5] ? "right" : "left"
      ), Be(i, "class", p = "message " + /*role*/
      (a[39] === "user" ? "user" : "bot") + " svelte-kqrm1b"), rt(
        i,
        "message-fit",
        /*layout*/
        a[12] === "bubble" && !/*bubble_full_width*/
        a[8]
      ), rt(
        i,
        "panel-full-width",
        /*layout*/
        a[12] === "panel"
      ), rt(
        i,
        "message-bubble-border",
        /*layout*/
        a[12] === "bubble"
      ), rt(i, "message-markdown-disabled", !/*render_markdown*/
      a[9]), An(
        i,
        "text-align",
        /*rtl*/
        a[5] && /*role*/
        a[39] == "bot" ? "left" : "right"
      ), Be(n, "class", g = "message-row " + /*layout*/
      a[12] + " " + /*role*/
      (a[39] === "user" ? "user-row" : "bot-row") + " svelte-kqrm1b");
    },
    m(A, S) {
      vt(A, n, S), B && B.m(n, null), Cn(n, s), Cn(n, i), Cn(i, o);
      for (let M = 0; M < W.length; M += 1)
        W[M] && W[M].m(o, null);
      _ = !0, k || (T = [
        La(o, "click", G),
        La(o, "keydown", U)
      ], k = !0);
    },
    p(A, S) {
      if (a = A, /*avatar_img*/
      a[40] ? B ? (B.p(a, S), S[0] & /*avatar_images, value*/
      65 && be(B, 1)) : (B = Ga(a), B.c(), be(B, 1), B.m(n, s)) : B && (p0(), Te(B, 1, 1, () => {
        B = null;
      }), m0()), S[0] & /*value, latex_delimiters, sanitize_html, render_markdown, line_breaks, scroll*/
      34435) {
        P = Er(
          /*messages*/
          a[36]
        );
        let M;
        for (M = 0; M < P.length; M += 1) {
          const I = Pa(a, P, M);
          W[M] ? (W[M].p(I, S), be(W[M], 1)) : (W[M] = Va(I), W[M].c(), be(W[M], 1), W[M].m(o, null));
        }
        for (p0(), M = P.length; M < W.length; M += 1)
          j(M);
        m0();
      }
      (!_ || S[0] & /*value*/
      1 && u !== (u = /*role*/
      a[39])) && Be(o, "data-testid", u), (!_ || S[0] & /*rtl*/
      32 && f !== (f = /*rtl*/
      a[5] ? "rtl" : "ltr")) && Be(o, "dir", f), (!_ || S[0] & /*value*/
      1) && rt(
        o,
        "latest",
        /*i*/
        a[38] === /*groupedMessages*/
        a[35].length - 1
      ), (!_ || S[0] & /*render_markdown*/
      512) && rt(o, "message-markdown-disabled", !/*render_markdown*/
      a[9]), (!_ || S[0] & /*selectable*/
      8) && rt(
        o,
        "selectable",
        /*selectable*/
        a[3]
      ), S[0] & /*rtl*/
      32 && An(
        o,
        "text-align",
        /*rtl*/
        a[5] ? "right" : "left"
      ), (!_ || S[0] & /*value*/
      1 && p !== (p = "message " + /*role*/
      (a[39] === "user" ? "user" : "bot") + " svelte-kqrm1b")) && Be(i, "class", p), (!_ || S[0] & /*value, layout, bubble_full_width*/
      4353) && rt(
        i,
        "message-fit",
        /*layout*/
        a[12] === "bubble" && !/*bubble_full_width*/
        a[8]
      ), (!_ || S[0] & /*value, layout*/
      4097) && rt(
        i,
        "panel-full-width",
        /*layout*/
        a[12] === "panel"
      ), (!_ || S[0] & /*value, layout*/
      4097) && rt(
        i,
        "message-bubble-border",
        /*layout*/
        a[12] === "bubble"
      ), (!_ || S[0] & /*value, render_markdown*/
      513) && rt(i, "message-markdown-disabled", !/*render_markdown*/
      a[9]), S[0] & /*rtl, value*/
      33 && An(
        i,
        "text-align",
        /*rtl*/
        a[5] && /*role*/
        a[39] == "bot" ? "left" : "right"
      ), (!_ || S[0] & /*layout, value*/
      4097 && g !== (g = "message-row " + /*layout*/
      a[12] + " " + /*role*/
      (a[39] === "user" ? "user-row" : "bot-row") + " svelte-kqrm1b")) && Be(n, "class", g);
    },
    i(A) {
      if (!_) {
        be(B);
        for (let S = 0; S < P.length; S += 1)
          be(W[S]);
        _ = !0;
      }
    },
    o(A) {
      Te(B), W = W.filter(Boolean);
      for (let S = 0; S < W.length; S += 1)
        Te(W[S]);
      _ = !1;
    },
    d(A) {
      A && xt(n), B && B.d(), Wo(W, A), k = !1, Hf(T);
    }
  };
}
function Ga(a) {
  let n, s, i;
  return s = new io({
    props: {
      class: "avatar-image",
      src: (
        /*avatar_img*/
        a[40].url
      ),
      alt: (
        /*role*/
        a[39] + " avatar"
      )
    }
  }), {
    c() {
      n = n0("div"), jt(s.$$.fragment), Be(n, "class", "avatar-container svelte-kqrm1b");
    },
    m(o, u) {
      vt(o, n, u), Yt(s, n, null), i = !0;
    },
    p(o, u) {
      const f = {};
      u[0] & /*avatar_images, value*/
      65 && (f.src = /*avatar_img*/
      o[40].url), u[0] & /*value*/
      1 && (f.alt = /*role*/
      o[39] + " avatar"), s.$set(f);
    },
    i(o) {
      i || (be(s.$$.fragment, o), i = !0);
    },
    o(o) {
      Te(s.$$.fragment, o), i = !1;
    },
    d(o) {
      o && xt(n), Xt(s);
    }
  };
}
function Qf(a) {
  let n, s, i, o, u, f, p;
  const g = [nd, td, ed, $f], _ = [];
  function k(T, B) {
    var P, W, j, G, U, A;
    return B[0] & /*value*/
    1 && (n = null), B[0] & /*value*/
    1 && (s = null), B[0] & /*value*/
    1 && (i = null), n == null && (n = !!/*message*/
    ((P = T[41].content.file.mime_type) != null && P.includes("audio"))), n ? 0 : (s == null && (s = !!/*message*/
    (T[41] !== null && /*message*/
    ((j = (W = T[41].content.file) == null ? void 0 : W.mime_type) != null && j.includes("video")))), s ? 1 : (i == null && (i = !!/*message*/
    (T[41] !== null && /*message*/
    ((U = (G = T[41].content.file) == null ? void 0 : G.mime_type) != null && U.includes("image")))), i ? 2 : (
      /*message*/
      T[41] !== null && /*message*/
      ((A = T[41].content.file) == null ? void 0 : A.url) !== null ? 3 : -1
    )));
  }
  return ~(o = k(a, [-1, -1])) && (u = _[o] = g[o](a)), {
    c() {
      u && u.c(), f = Mr();
    },
    m(T, B) {
      ~o && _[o].m(T, B), vt(T, f, B), p = !0;
    },
    p(T, B) {
      let P = o;
      o = k(T, B), o === P ? ~o && _[o].p(T, B) : (u && (p0(), Te(_[P], 1, 1, () => {
        _[P] = null;
      }), m0()), ~o ? (u = _[o], u ? u.p(T, B) : (u = _[o] = g[o](T), u.c()), be(u, 1), u.m(f.parentNode, f)) : u = null);
    },
    i(T) {
      p || (be(u), p = !0);
    },
    o(T) {
      Te(u), p = !1;
    },
    d(T) {
      T && xt(f), ~o && _[o].d(T);
    }
  };
}
function Jf(a) {
  let n, s, i, o;
  const u = [ld, id, sd], f = [];
  function p(g, _) {
    return (
      /*message*/
      g[41].metadata.tool_name ? 0 : (
        /*message*/
        g[41].metadata.error ? 1 : 2
      )
    );
  }
  return s = p(a), i = f[s] = u[s](a), {
    c() {
      n = n0("div"), i.c(), Be(n, "class", "svelte-kqrm1b"), rt(
        n,
        "thought",
        /*thought_index*/
        a[43] > 0
      );
    },
    m(g, _) {
      vt(g, n, _), f[s].m(n, null), o = !0;
    },
    p(g, _) {
      let k = s;
      s = p(g), s === k ? f[s].p(g, _) : (p0(), Te(f[k], 1, 1, () => {
        f[k] = null;
      }), m0(), i = f[s], i ? i.p(g, _) : (i = f[s] = u[s](g), i.c()), be(i, 1), i.m(n, null));
    },
    i(g) {
      o || (be(i), o = !0);
    },
    o(g) {
      Te(i), o = !1;
    },
    d(g) {
      g && xt(n), f[s].d();
    }
  };
}
function $f(a) {
  var f, p;
  let n, s = (
    /*message*/
    (((f = a[41].content.file) == null ? void 0 : f.orig_name) || /*message*/
    ((p = a[41].content.file) == null ? void 0 : p.path)) + ""
  ), i, o, u;
  return {
    c() {
      var g, _, k;
      n = n0("a"), i = Vf(s), Be(n, "data-testid", "chatbot-file"), Be(n, "href", o = /*message*/
      (g = a[41].content.file) == null ? void 0 : g.url), Be(n, "target", "_blank"), Be(n, "download", u = window.__is_colab__ ? null : (
        /*message*/
        ((_ = a[41].content.file) == null ? void 0 : _.orig_name) || /*message*/
        ((k = a[41].content.file) == null ? void 0 : k.path)
      )), Be(n, "class", "svelte-kqrm1b");
    },
    m(g, _) {
      vt(g, n, _), Cn(n, i);
    },
    p(g, _) {
      var k, T, B, P, W;
      _[0] & /*value*/
      1 && s !== (s = /*message*/
      (((k = g[41].content.file) == null ? void 0 : k.orig_name) || /*message*/
      ((T = g[41].content.file) == null ? void 0 : T.path)) + "") && Gf(i, s), _[0] & /*value*/
      1 && o !== (o = /*message*/
      (B = g[41].content.file) == null ? void 0 : B.url) && Be(n, "href", o), _[0] & /*value*/
      1 && u !== (u = window.__is_colab__ ? null : (
        /*message*/
        ((P = g[41].content.file) == null ? void 0 : P.orig_name) || /*message*/
        ((W = g[41].content.file) == null ? void 0 : W.path)
      )) && Be(n, "download", u);
    },
    i: Xs,
    o: Xs,
    d(g) {
      g && xt(n);
    }
  };
}
function ed(a) {
  var i;
  let n, s;
  return n = new io({
    props: {
      "data-testid": "chatbot-image",
      src: (
        /*message*/
        (i = a[41].content.file) == null ? void 0 : i.url
      ),
      alt: (
        /*message*/
        a[41].content.alt_text
      )
    }
  }), {
    c() {
      jt(n.$$.fragment);
    },
    m(o, u) {
      Yt(n, o, u), s = !0;
    },
    p(o, u) {
      var p;
      const f = {};
      u[0] & /*value*/
      1 && (f.src = /*message*/
      (p = o[41].content.file) == null ? void 0 : p.url), u[0] & /*value*/
      1 && (f.alt = /*message*/
      o[41].content.alt_text), n.$set(f);
    },
    i(o) {
      s || (be(n.$$.fragment, o), s = !0);
    },
    o(o) {
      Te(n.$$.fragment, o), s = !1;
    },
    d(o) {
      Xt(n, o);
    }
  };
}
function td(a) {
  var i;
  let n, s;
  return n = new z4({
    props: {
      "data-testid": "chatbot-video",
      controls: !0,
      src: (
        /*message*/
        (i = a[41].content.file) == null ? void 0 : i.url
      ),
      title: (
        /*message*/
        a[41].content.alt_text
      ),
      preload: "auto",
      $$slots: { default: [rd] },
      $$scope: { ctx: a }
    }
  }), n.$on(
    "play",
    /*play_handler_1*/
    a[26]
  ), n.$on(
    "pause",
    /*pause_handler_1*/
    a[27]
  ), n.$on(
    "ended",
    /*ended_handler_1*/
    a[28]
  ), {
    c() {
      jt(n.$$.fragment);
    },
    m(o, u) {
      Yt(n, o, u), s = !0;
    },
    p(o, u) {
      var p;
      const f = {};
      u[0] & /*value*/
      1 && (f.src = /*message*/
      (p = o[41].content.file) == null ? void 0 : p.url), u[0] & /*value*/
      1 && (f.title = /*message*/
      o[41].content.alt_text), u[1] & /*$$scope*/
      8192 && (f.$$scope = { dirty: u, ctx: o }), n.$set(f);
    },
    i(o) {
      s || (be(n.$$.fragment, o), s = !0);
    },
    o(o) {
      Te(n.$$.fragment, o), s = !1;
    },
    d(o) {
      Xt(n, o);
    }
  };
}
function nd(a) {
  var i;
  let n, s;
  return n = new e4({
    props: {
      "data-testid": "chatbot-audio",
      controls: !0,
      preload: "metadata",
      src: (
        /*message*/
        (i = a[41].content.file) == null ? void 0 : i.url
      ),
      title: (
        /*message*/
        a[41].content.alt_text
      )
    }
  }), n.$on(
    "play",
    /*play_handler*/
    a[23]
  ), n.$on(
    "pause",
    /*pause_handler*/
    a[24]
  ), n.$on(
    "ended",
    /*ended_handler*/
    a[25]
  ), {
    c() {
      jt(n.$$.fragment);
    },
    m(o, u) {
      Yt(n, o, u), s = !0;
    },
    p(o, u) {
      var p;
      const f = {};
      u[0] & /*value*/
      1 && (f.src = /*message*/
      (p = o[41].content.file) == null ? void 0 : p.url), u[0] & /*value*/
      1 && (f.title = /*message*/
      o[41].content.alt_text), n.$set(f);
    },
    i(o) {
      s || (be(n.$$.fragment, o), s = !0);
    },
    o(o) {
      Te(n.$$.fragment, o), s = !1;
    },
    d(o) {
      Xt(n, o);
    }
  };
}
function rd(a) {
  let n;
  return {
    c() {
      n = n0("track"), Be(n, "kind", "captions"), Be(n, "class", "svelte-kqrm1b");
    },
    m(s, i) {
      vt(s, n, i);
    },
    p: Xs,
    d(s) {
      s && xt(n);
    }
  };
}
function sd(a) {
  let n, s;
  return n = new Cr({
    props: {
      message: (
        /*message*/
        a[41].content
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        a[1]
      ),
      sanitize_html: (
        /*sanitize_html*/
        a[7]
      ),
      render_markdown: (
        /*render_markdown*/
        a[9]
      ),
      line_breaks: (
        /*line_breaks*/
        a[10]
      )
    }
  }), n.$on(
    "load",
    /*scroll*/
    a[15]
  ), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*value*/
      1 && (u.message = /*message*/
      i[41].content), o[0] & /*latex_delimiters*/
      2 && (u.latex_delimiters = /*latex_delimiters*/
      i[1]), o[0] & /*sanitize_html*/
      128 && (u.sanitize_html = /*sanitize_html*/
      i[7]), o[0] & /*render_markdown*/
      512 && (u.render_markdown = /*render_markdown*/
      i[9]), o[0] & /*line_breaks*/
      1024 && (u.line_breaks = /*line_breaks*/
      i[10]), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function id(a) {
  let n, s;
  return n = new If({
    props: {
      $$slots: { default: [ad] },
      $$scope: { ctx: a }
    }
  }), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*value, latex_delimiters, sanitize_html, render_markdown, line_breaks*/
      1667 | o[1] & /*$$scope*/
      8192 && (u.$$scope = { dirty: o, ctx: i }), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function ld(a) {
  let n, s;
  return n = new xf({
    props: {
      title: `Used tool ${/*message*/
      a[41].metadata.tool_name}`,
      $$slots: { default: [od] },
      $$scope: { ctx: a }
    }
  }), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*value*/
      1 && (u.title = `Used tool ${/*message*/
      i[41].metadata.tool_name}`), o[0] & /*value, latex_delimiters, sanitize_html, render_markdown, line_breaks*/
      1667 | o[1] & /*$$scope*/
      8192 && (u.$$scope = { dirty: o, ctx: i }), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function ad(a) {
  let n, s;
  return n = new Cr({
    props: {
      message: (
        /*message*/
        a[41].content
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        a[1]
      ),
      sanitize_html: (
        /*sanitize_html*/
        a[7]
      ),
      render_markdown: (
        /*render_markdown*/
        a[9]
      ),
      line_breaks: (
        /*line_breaks*/
        a[10]
      )
    }
  }), n.$on(
    "load",
    /*scroll*/
    a[15]
  ), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*value*/
      1 && (u.message = /*message*/
      i[41].content), o[0] & /*latex_delimiters*/
      2 && (u.latex_delimiters = /*latex_delimiters*/
      i[1]), o[0] & /*sanitize_html*/
      128 && (u.sanitize_html = /*sanitize_html*/
      i[7]), o[0] & /*render_markdown*/
      512 && (u.render_markdown = /*render_markdown*/
      i[9]), o[0] & /*line_breaks*/
      1024 && (u.line_breaks = /*line_breaks*/
      i[10]), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function od(a) {
  let n, s;
  return n = new Cr({
    props: {
      message: (
        /*message*/
        a[41].content
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        a[1]
      ),
      sanitize_html: (
        /*sanitize_html*/
        a[7]
      ),
      render_markdown: (
        /*render_markdown*/
        a[9]
      ),
      line_breaks: (
        /*line_breaks*/
        a[10]
      )
    }
  }), n.$on(
    "load",
    /*scroll*/
    a[15]
  ), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*value*/
      1 && (u.message = /*message*/
      i[41].content), o[0] & /*latex_delimiters*/
      2 && (u.latex_delimiters = /*latex_delimiters*/
      i[1]), o[0] & /*sanitize_html*/
      128 && (u.sanitize_html = /*sanitize_html*/
      i[7]), o[0] & /*render_markdown*/
      512 && (u.render_markdown = /*render_markdown*/
      i[9]), o[0] & /*line_breaks*/
      1024 && (u.line_breaks = /*line_breaks*/
      i[10]), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function Va(a) {
  let n, s, i, o, u, f;
  const p = [Jf, Qf], g = [];
  function _(k, T) {
    return T[0] & /*value*/
    1 && (n = null), T[0] & /*value*/
    1 && (s = null), n == null && (n = !!hd(
      /*message*/
      k[41]
    )), n ? 0 : (s == null && (s = !!cd(
      /*message*/
      k[41]
    )), s ? 1 : -1);
  }
  return ~(i = _(a, [-1, -1])) && (o = g[i] = p[i](a)), {
    c() {
      o && o.c(), u = Mr();
    },
    m(k, T) {
      ~i && g[i].m(k, T), vt(k, u, T), f = !0;
    },
    p(k, T) {
      let B = i;
      i = _(k, T), i === B ? ~i && g[i].p(k, T) : (o && (p0(), Te(g[B], 1, 1, () => {
        g[B] = null;
      }), m0()), ~i ? (o = g[i], o ? o.p(k, T) : (o = g[i] = p[i](k), o.c()), be(o, 1), o.m(u.parentNode, u)) : o = null);
    },
    i(k) {
      f || (be(o), f = !0);
    },
    o(k) {
      Te(o), f = !1;
    },
    d(k) {
      k && xt(u), ~i && g[i].d(k);
    }
  };
}
function Wa(a) {
  let n, s, i = (
    /*messages*/
    a[36].length && Ua(Bs(a))
  );
  return {
    c() {
      i && i.c(), n = Mr();
    },
    m(o, u) {
      i && i.m(o, u), vt(o, n, u), s = !0;
    },
    p(o, u) {
      /*messages*/
      o[36].length ? i ? (i.p(Bs(o), u), u[0] & /*value*/
      1 && be(i, 1)) : (i = Ua(Bs(o)), i.c(), be(i, 1), i.m(n.parentNode, n)) : i && (p0(), Te(i, 1, 1, () => {
        i = null;
      }), m0());
    },
    i(o) {
      s || (be(i), s = !0);
    },
    o(o) {
      Te(i), s = !1;
    },
    d(o) {
      o && xt(n), i && i.d(o);
    }
  };
}
function ja(a) {
  let n, s;
  return n = new of({ props: { layout: (
    /*layout*/
    a[12]
  ) } }), {
    c() {
      jt(n.$$.fragment);
    },
    m(i, o) {
      Yt(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*layout*/
      4096 && (u.layout = /*layout*/
      i[12]), n.$set(u);
    },
    i(i) {
      s || (be(n.$$.fragment, i), s = !0);
    },
    o(i) {
      Te(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Xt(n, i);
    }
  };
}
function ud(a) {
  let n, s, i, o, u, f, p, g, _, k = (
    /*show_share_button*/
    a[4] && /*value*/
    a[0] !== null && /*value*/
    a[0].length > 0 && Ha(a)
  );
  const T = [Kf, Zf], B = [];
  function P(j, G) {
    return (
      /*value*/
      j[0] !== null && /*value*/
      j[0].length > 0 ? 0 : (
        /*placeholder*/
        j[13] !== null ? 1 : -1
      )
    );
  }
  function W(j, G) {
    return G === 0 ? Yf(j) : j;
  }
  return ~(o = P(a)) && (u = B[o] = T[o](W(a, o))), {
    c() {
      k && k.c(), n = si(), s = n0("div"), i = n0("div"), u && u.c(), Be(i, "class", "message-wrap svelte-kqrm1b"), rt(
        i,
        "bubble-gap",
        /*layout*/
        a[12] === "bubble"
      ), Be(s, "class", f = Oa(
        /*layout*/
        a[12] === "bubble" ? "bubble-wrap" : "panel-wrap"
      ) + " svelte-kqrm1b"), Be(s, "role", "log"), Be(s, "aria-label", "chatbot conversation"), Be(s, "aria-live", "polite"), rt(
        s,
        "placeholder-container",
        /*value*/
        a[0] === null || /*value*/
        a[0].length === 0
      );
    },
    m(j, G) {
      k && k.m(j, G), vt(j, n, G), vt(j, s, G), Cn(s, i), ~o && B[o].m(i, null), a[31](s), p = !0, g || (_ = Of(i1.call(null, i)), g = !0);
    },
    p(j, G) {
      /*show_share_button*/
      j[4] && /*value*/
      j[0] !== null && /*value*/
      j[0].length > 0 ? k ? (k.p(j, G), G[0] & /*show_share_button, value*/
      17 && be(k, 1)) : (k = Ha(j), k.c(), be(k, 1), k.m(n.parentNode, n)) : k && (p0(), Te(k, 1, 1, () => {
        k = null;
      }), m0());
      let U = o;
      o = P(j), o === U ? ~o && B[o].p(W(j, o), G) : (u && (p0(), Te(B[U], 1, 1, () => {
        B[U] = null;
      }), m0()), ~o ? (u = B[o], u ? u.p(W(j, o), G) : (u = B[o] = T[o](W(j, o)), u.c()), be(u, 1), u.m(i, null)) : u = null), (!p || G[0] & /*layout*/
      4096) && rt(
        i,
        "bubble-gap",
        /*layout*/
        j[12] === "bubble"
      ), (!p || G[0] & /*layout*/
      4096 && f !== (f = Oa(
        /*layout*/
        j[12] === "bubble" ? "bubble-wrap" : "panel-wrap"
      ) + " svelte-kqrm1b")) && Be(s, "class", f), (!p || G[0] & /*layout, value*/
      4097) && rt(
        s,
        "placeholder-container",
        /*value*/
        j[0] === null || /*value*/
        j[0].length === 0
      );
    },
    i(j) {
      p || (be(k), be(u), p = !0);
    },
    o(j) {
      Te(k), Te(u), p = !1;
    },
    d(j) {
      j && (xt(n), xt(s)), k && k.d(j), ~o && B[o].d(), a[31](null), g = !1, _();
    }
  };
}
function cd(a) {
  return typeof a.content != "string";
}
function hd(a) {
  return typeof a.content == "string";
}
function fd(a) {
  const n = [];
  let s = [], i = null;
  for (const o of a)
    o.role === i ? s.push(o) : (s.length > 0 && n.push(s), s = [o], i = o.role);
  return s.length > 0 && n.push(s), n;
}
function dd(a, n, s) {
  let i, { value: o = [] } = n, u = null, { latex_delimiters: f } = n, { pending_message: p = !1 } = n, { selectable: g = !1 } = n, { likeable: _ = !1 } = n, { show_share_button: k = !1 } = n, { rtl: T = !1 } = n, { show_copy_button: B = !1 } = n, { avatar_images: P = [null, null] } = n, { sanitize_html: W = !0 } = n, { bubble_full_width: j = !0 } = n, { render_markdown: G = !0 } = n, { line_breaks: U = !0 } = n, { i18n: A } = n, { layout: S = "bubble" } = n, { placeholder: M = null } = n, I, O;
  const H = Xf();
  Wf(() => {
    O = I && I.offsetHeight + I.scrollTop > I.scrollHeight - 100;
  });
  const J = () => {
    O && I.scrollTo(0, I.scrollHeight);
  };
  jf(() => {
    O && (J(), I.querySelectorAll("img").forEach((V) => {
      V.addEventListener("load", () => {
        J();
      });
    }));
  });
  function K(V, he) {
    var Ke;
    H("select", {
      index: V,
      value: ((Ke = he.content.file) === null || Ke === void 0 ? void 0 : Ke.url) || he.content
    });
  }
  function le(V) {
    R0.call(this, a, V);
  }
  function ce(V) {
    R0.call(this, a, V);
  }
  function pe(V) {
    R0.call(this, a, V);
  }
  function ve(V) {
    R0.call(this, a, V);
  }
  function Ie(V) {
    R0.call(this, a, V);
  }
  function ut(V) {
    R0.call(this, a, V);
  }
  function st(V) {
    R0.call(this, a, V);
  }
  function mt(V) {
    R0.call(this, a, V);
  }
  const Oe = (V, he) => K(V, he[0]), $ = (V, he, Ke) => {
    Ke.key === "Enter" && K(V, he[0]);
  };
  function Fe(V) {
    qf[V ? "unshift" : "push"](() => {
      I = V, s(14, I);
    });
  }
  return a.$$set = (V) => {
    "value" in V && s(0, o = V.value), "latex_delimiters" in V && s(1, f = V.latex_delimiters), "pending_message" in V && s(2, p = V.pending_message), "selectable" in V && s(3, g = V.selectable), "likeable" in V && s(17, _ = V.likeable), "show_share_button" in V && s(4, k = V.show_share_button), "rtl" in V && s(5, T = V.rtl), "show_copy_button" in V && s(18, B = V.show_copy_button), "avatar_images" in V && s(6, P = V.avatar_images), "sanitize_html" in V && s(7, W = V.sanitize_html), "bubble_full_width" in V && s(8, j = V.bubble_full_width), "render_markdown" in V && s(9, G = V.render_markdown), "line_breaks" in V && s(10, U = V.line_breaks), "i18n" in V && s(11, A = V.i18n), "layout" in V && s(12, S = V.layout), "placeholder" in V && s(13, M = V.placeholder);
  }, a.$$.update = () => {
    a.$$.dirty[0] & /*adjust_text_size*/
    1048576 && i(), a.$$.dirty[0] & /*value, old_value*/
    524289 && (Ns(o, u) || (s(19, u = o), H("change")));
  }, s(20, i = () => {
    let he = getComputedStyle(document.body).getPropertyValue("--body-text-size"), Ke;
    switch (he) {
      case "13px":
        Ke = 14;
        break;
      case "14px":
        Ke = 16;
        break;
      case "16px":
        Ke = 20;
        break;
      default:
        Ke = 14;
        break;
    }
    document.body.style.setProperty("--chatbot-body-text-size", Ke + "px");
  }), [
    o,
    f,
    p,
    g,
    k,
    T,
    P,
    W,
    j,
    G,
    U,
    A,
    S,
    M,
    I,
    J,
    K,
    _,
    B,
    u,
    i,
    le,
    ce,
    pe,
    ve,
    Ie,
    ut,
    st,
    mt,
    Oe,
    $,
    Fe
  ];
}
class md extends Lf {
  constructor(n) {
    super(), Pf(
      this,
      n,
      dd,
      ud,
      Uf,
      {
        value: 0,
        latex_delimiters: 1,
        pending_message: 2,
        selectable: 3,
        likeable: 17,
        show_share_button: 4,
        rtl: 5,
        show_copy_button: 18,
        avatar_images: 6,
        sanitize_html: 7,
        bubble_full_width: 8,
        render_markdown: 9,
        line_breaks: 10,
        i18n: 11,
        layout: 12,
        placeholder: 13
      },
      null,
      [-1, -1]
    );
  }
}
const {
  SvelteComponent: pd,
  append: gd,
  assign: bd,
  attr: wd,
  check_outros: Xa,
  create_component: zr,
  destroy_component: Br,
  detach: Ya,
  element: _d,
  get_spread_object: yd,
  get_spread_update: kd,
  group_outros: Za,
  init: Dd,
  insert: Ka,
  mount_component: Nr,
  safe_not_equal: xd,
  space: Qa,
  transition_in: c0,
  transition_out: I0
} = window.__gradio__svelte__internal;
function Ja(a) {
  let n, s;
  const i = [
    {
      autoscroll: (
        /*gradio*/
        a[19].autoscroll
      )
    },
    { i18n: (
      /*gradio*/
      a[19].i18n
    ) },
    /*loading_status*/
    a[21],
    {
      show_progress: (
        /*loading_status*/
        a[21].show_progress === "hidden" ? "hidden" : "minimal"
      )
    }
  ];
  let o = {};
  for (let u = 0; u < i.length; u += 1)
    o = bd(o, i[u]);
  return n = new J2({ props: o }), n.$on(
    "clear_status",
    /*clear_status_handler*/
    a[26]
  ), {
    c() {
      zr(n.$$.fragment);
    },
    m(u, f) {
      Nr(n, u, f), s = !0;
    },
    p(u, f) {
      const p = f[0] & /*gradio, loading_status*/
      2621440 ? kd(i, [
        f[0] & /*gradio*/
        524288 && {
          autoscroll: (
            /*gradio*/
            u[19].autoscroll
          )
        },
        f[0] & /*gradio*/
        524288 && { i18n: (
          /*gradio*/
          u[19].i18n
        ) },
        f[0] & /*loading_status*/
        2097152 && yd(
          /*loading_status*/
          u[21]
        ),
        f[0] & /*loading_status*/
        2097152 && {
          show_progress: (
            /*loading_status*/
            u[21].show_progress === "hidden" ? "hidden" : "minimal"
          )
        }
      ]) : {};
      n.$set(p);
    },
    i(u) {
      s || (c0(n.$$.fragment, u), s = !0);
    },
    o(u) {
      I0(n.$$.fragment, u), s = !1;
    },
    d(u) {
      Br(n, u);
    }
  };
}
function $a(a) {
  let n, s;
  return n = new q1({
    props: {
      show_label: (
        /*show_label*/
        a[7]
      ),
      Icon: ac,
      float: !1,
      label: (
        /*label*/
        a[6] || "Chatbot"
      )
    }
  }), {
    c() {
      zr(n.$$.fragment);
    },
    m(i, o) {
      Nr(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*show_label*/
      128 && (u.show_label = /*show_label*/
      i[7]), o[0] & /*label*/
      64 && (u.label = /*label*/
      i[6] || "Chatbot"), n.$set(u);
    },
    i(i) {
      s || (c0(n.$$.fragment, i), s = !0);
    },
    o(i) {
      I0(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Br(n, i);
    }
  };
}
function vd(a) {
  var g;
  let n, s, i, o, u, f = (
    /*loading_status*/
    a[21] && Ja(a)
  ), p = (
    /*show_label*/
    a[7] && $a(a)
  );
  return o = new md({
    props: {
      i18n: (
        /*gradio*/
        a[19].i18n
      ),
      selectable: (
        /*_selectable*/
        a[8]
      ),
      likeable: (
        /*likeable*/
        a[9]
      ),
      show_share_button: (
        /*show_share_button*/
        a[10]
      ),
      value: (
        /*_value*/
        a[24]
      ),
      latex_delimiters: (
        /*latex_delimiters*/
        a[18]
      ),
      render_markdown: (
        /*render_markdown*/
        a[16]
      ),
      pending_message: (
        /*loading_status*/
        ((g = a[21]) == null ? void 0 : g.status) === "pending"
      ),
      rtl: (
        /*rtl*/
        a[11]
      ),
      show_copy_button: (
        /*show_copy_button*/
        a[12]
      ),
      avatar_images: (
        /*avatar_images*/
        a[20]
      ),
      sanitize_html: (
        /*sanitize_html*/
        a[13]
      ),
      bubble_full_width: (
        /*bubble_full_width*/
        a[14]
      ),
      line_breaks: (
        /*line_breaks*/
        a[17]
      ),
      layout: (
        /*layout*/
        a[15]
      ),
      placeholder: (
        /*placeholder*/
        a[23]
      )
    }
  }), o.$on(
    "change",
    /*change_handler*/
    a[27]
  ), o.$on(
    "select",
    /*select_handler*/
    a[28]
  ), o.$on(
    "like",
    /*like_handler*/
    a[29]
  ), o.$on(
    "share",
    /*share_handler*/
    a[30]
  ), o.$on(
    "error",
    /*error_handler*/
    a[31]
  ), {
    c() {
      f && f.c(), n = Qa(), s = _d("div"), p && p.c(), i = Qa(), zr(o.$$.fragment), wd(s, "class", "wrapper svelte-r8zcdo");
    },
    m(_, k) {
      f && f.m(_, k), Ka(_, n, k), Ka(_, s, k), p && p.m(s, null), gd(s, i), Nr(o, s, null), u = !0;
    },
    p(_, k) {
      var B;
      /*loading_status*/
      _[21] ? f ? (f.p(_, k), k[0] & /*loading_status*/
      2097152 && c0(f, 1)) : (f = Ja(_), f.c(), c0(f, 1), f.m(n.parentNode, n)) : f && (Za(), I0(f, 1, 1, () => {
        f = null;
      }), Xa()), /*show_label*/
      _[7] ? p ? (p.p(_, k), k[0] & /*show_label*/
      128 && c0(p, 1)) : (p = $a(_), p.c(), c0(p, 1), p.m(s, i)) : p && (Za(), I0(p, 1, 1, () => {
        p = null;
      }), Xa());
      const T = {};
      k[0] & /*gradio*/
      524288 && (T.i18n = /*gradio*/
      _[19].i18n), k[0] & /*_selectable*/
      256 && (T.selectable = /*_selectable*/
      _[8]), k[0] & /*likeable*/
      512 && (T.likeable = /*likeable*/
      _[9]), k[0] & /*show_share_button*/
      1024 && (T.show_share_button = /*show_share_button*/
      _[10]), k[0] & /*_value*/
      16777216 && (T.value = /*_value*/
      _[24]), k[0] & /*latex_delimiters*/
      262144 && (T.latex_delimiters = /*latex_delimiters*/
      _[18]), k[0] & /*render_markdown*/
      65536 && (T.render_markdown = /*render_markdown*/
      _[16]), k[0] & /*loading_status*/
      2097152 && (T.pending_message = /*loading_status*/
      ((B = _[21]) == null ? void 0 : B.status) === "pending"), k[0] & /*rtl*/
      2048 && (T.rtl = /*rtl*/
      _[11]), k[0] & /*show_copy_button*/
      4096 && (T.show_copy_button = /*show_copy_button*/
      _[12]), k[0] & /*avatar_images*/
      1048576 && (T.avatar_images = /*avatar_images*/
      _[20]), k[0] & /*sanitize_html*/
      8192 && (T.sanitize_html = /*sanitize_html*/
      _[13]), k[0] & /*bubble_full_width*/
      16384 && (T.bubble_full_width = /*bubble_full_width*/
      _[14]), k[0] & /*line_breaks*/
      131072 && (T.line_breaks = /*line_breaks*/
      _[17]), k[0] & /*layout*/
      32768 && (T.layout = /*layout*/
      _[15]), k[0] & /*placeholder*/
      8388608 && (T.placeholder = /*placeholder*/
      _[23]), o.$set(T);
    },
    i(_) {
      u || (c0(f), c0(p), c0(o.$$.fragment, _), u = !0);
    },
    o(_) {
      I0(f), I0(p), I0(o.$$.fragment, _), u = !1;
    },
    d(_) {
      _ && (Ya(n), Ya(s)), f && f.d(_), p && p.d(), Br(o);
    }
  };
}
function Ad(a) {
  let n, s;
  return n = new x1({
    props: {
      elem_id: (
        /*elem_id*/
        a[0]
      ),
      elem_classes: (
        /*elem_classes*/
        a[1]
      ),
      visible: (
        /*visible*/
        a[2]
      ),
      padding: !1,
      scale: (
        /*scale*/
        a[4]
      ),
      min_width: (
        /*min_width*/
        a[5]
      ),
      height: (
        /*height*/
        a[22]
      ),
      allow_overflow: !1,
      $$slots: { default: [vd] },
      $$scope: { ctx: a }
    }
  }), {
    c() {
      zr(n.$$.fragment);
    },
    m(i, o) {
      Nr(n, i, o), s = !0;
    },
    p(i, o) {
      const u = {};
      o[0] & /*elem_id*/
      1 && (u.elem_id = /*elem_id*/
      i[0]), o[0] & /*elem_classes*/
      2 && (u.elem_classes = /*elem_classes*/
      i[1]), o[0] & /*visible*/
      4 && (u.visible = /*visible*/
      i[2]), o[0] & /*scale*/
      16 && (u.scale = /*scale*/
      i[4]), o[0] & /*min_width*/
      32 && (u.min_width = /*min_width*/
      i[5]), o[0] & /*height*/
      4194304 && (u.height = /*height*/
      i[22]), o[0] & /*gradio, _selectable, likeable, show_share_button, _value, latex_delimiters, render_markdown, loading_status, rtl, show_copy_button, avatar_images, sanitize_html, bubble_full_width, line_breaks, layout, placeholder, value, show_label, label*/
      29360072 | o[1] & /*$$scope*/
      4 && (u.$$scope = { dirty: o, ctx: i }), n.$set(u);
    },
    i(i) {
      s || (c0(n.$$.fragment, i), s = !0);
    },
    o(i) {
      I0(n.$$.fragment, i), s = !1;
    },
    d(i) {
      Br(n, i);
    }
  };
}
function Sd(a, n, s) {
  let { elem_id: i = "" } = n, { elem_classes: o = [] } = n, { visible: u = !0 } = n, { value: f = [] } = n, { scale: p = null } = n, { min_width: g = void 0 } = n, { label: _ } = n, { show_label: k = !0 } = n, { root: T } = n, { _selectable: B = !1 } = n, { likeable: P = !1 } = n, { show_share_button: W = !1 } = n, { rtl: j = !1 } = n, { show_copy_button: G = !1 } = n, { sanitize_html: U = !0 } = n, { bubble_full_width: A = !0 } = n, { layout: S = "bubble" } = n, { render_markdown: M = !0 } = n, { line_breaks: I = !0 } = n, { latex_delimiters: O } = n, { gradio: H } = n, { avatar_images: J = [null, null] } = n, K, { loading_status: le = void 0 } = n, { height: ce = 400 } = n, { placeholder: pe = null } = n;
  const ve = () => H.dispatch("clear_status", le), Ie = () => H.dispatch("change", f), ut = ($) => H.dispatch("select", $.detail), st = ($) => H.dispatch("like", $.detail), mt = ($) => H.dispatch("share", $.detail), Oe = ($) => H.dispatch("error", $.detail);
  return a.$$set = ($) => {
    "elem_id" in $ && s(0, i = $.elem_id), "elem_classes" in $ && s(1, o = $.elem_classes), "visible" in $ && s(2, u = $.visible), "value" in $ && s(3, f = $.value), "scale" in $ && s(4, p = $.scale), "min_width" in $ && s(5, g = $.min_width), "label" in $ && s(6, _ = $.label), "show_label" in $ && s(7, k = $.show_label), "root" in $ && s(25, T = $.root), "_selectable" in $ && s(8, B = $._selectable), "likeable" in $ && s(9, P = $.likeable), "show_share_button" in $ && s(10, W = $.show_share_button), "rtl" in $ && s(11, j = $.rtl), "show_copy_button" in $ && s(12, G = $.show_copy_button), "sanitize_html" in $ && s(13, U = $.sanitize_html), "bubble_full_width" in $ && s(14, A = $.bubble_full_width), "layout" in $ && s(15, S = $.layout), "render_markdown" in $ && s(16, M = $.render_markdown), "line_breaks" in $ && s(17, I = $.line_breaks), "latex_delimiters" in $ && s(18, O = $.latex_delimiters), "gradio" in $ && s(19, H = $.gradio), "avatar_images" in $ && s(20, J = $.avatar_images), "loading_status" in $ && s(21, le = $.loading_status), "height" in $ && s(22, ce = $.height), "placeholder" in $ && s(23, pe = $.placeholder);
  }, a.$$.update = () => {
    a.$$.dirty[0] & /*value*/
    8 && s(24, K = f);
  }, [
    i,
    o,
    u,
    f,
    p,
    g,
    _,
    k,
    B,
    P,
    W,
    j,
    G,
    U,
    A,
    S,
    M,
    I,
    O,
    H,
    J,
    le,
    ce,
    pe,
    K,
    T,
    ve,
    Ie,
    ut,
    st,
    mt,
    Oe
  ];
}
class Hd extends pd {
  constructor(n) {
    super(), Dd(
      this,
      n,
      Sd,
      Ad,
      xd,
      {
        elem_id: 0,
        elem_classes: 1,
        visible: 2,
        value: 3,
        scale: 4,
        min_width: 5,
        label: 6,
        show_label: 7,
        root: 25,
        _selectable: 8,
        likeable: 9,
        show_share_button: 10,
        rtl: 11,
        show_copy_button: 12,
        sanitize_html: 13,
        bubble_full_width: 14,
        layout: 15,
        render_markdown: 16,
        line_breaks: 17,
        latex_delimiters: 18,
        gradio: 19,
        avatar_images: 20,
        loading_status: 21,
        height: 22,
        placeholder: 23
      },
      null,
      [-1, -1]
    );
  }
}
export {
  md as BaseChatBot,
  Hd as default
};
