UNPKG

@insightphp/insight

Version:

Laravel package for building control panels.

2,939 lines 112 kB
import { openBlock as m, createElementBlock as h, createElementVNode as p, cloneVNode as un, h as F, Fragment as te, inject as le, provide as se, watchEffect as re, ref as w, computed as A, defineComponent as x, onMounted as H, watch as ce, onUnmounted as ge, Teleport as cn, reactive as It, unref as g, nextTick as fn, createBlock as T, withCtx as C, withModifiers as Z, createVNode as D, normalizeClass as q, createCommentVNode as W, createTextVNode as Ye, toDisplayString as Y, onBeforeUnmount as $r, withDirectives as Bt, renderSlot as X, vShow as dn, Transition as pn, renderList as xe, vModelCheckbox as vn, vModelSelect as yn, mergeProps as ot } from "vue";
import { Portal as Q, registerPages as mn, registerComponents as tr } from "@insightphp/inertia-view";
import { Inertia as gn } from "@inertiajs/inertia";
import { Menu as jt, MenuItem as Vt, Link as Er, Breadcrumbs as hn } from "@insightphp/elements";
import { usePage as Ar } from "@inertiajs/inertia-vue3";
class bn {
}
const wn = new bn();
function Sn(e, t) {
  return m(), h("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    fill: "currentColor",
    "aria-hidden": "true"
  }, [
    p("path", {
      "fill-rule": "evenodd",
      d: "M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z",
      "clip-rule": "evenodd"
    })
  ]);
}
function ee(e, t, ...r) {
  if (e in t) {
    let a = t[e];
    return typeof a == "function" ? a(...r) : a;
  }
  let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((a) => `"${a}"`).join(", ")}.`);
  throw Error.captureStackTrace && Error.captureStackTrace(n, ee), n;
}
var Ze = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ze || {}), ye = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ye || {});
function J({ visible: e = !0, features: t = 0, ourProps: r, theirProps: n, ...a }) {
  var o;
  let l = xn(n, r), i = Object.assign(a, { props: l });
  if (e || t & 2 && l.static)
    return st(i);
  if (t & 1) {
    let s = (o = l.unmount) == null || o ? 0 : 1;
    return ee(s, { [0]() {
      return null;
    }, [1]() {
      return st({ ...a, props: { ...l, hidden: !0, style: { display: "none" } } });
    } });
  }
  return st(i);
}
function st({ props: e, attrs: t, slots: r, slot: n, name: a }) {
  var o;
  let { as: l, ...i } = kr(e, ["unmount", "static"]), s = (o = r.default) == null ? void 0 : o.call(r, n), u = {};
  if (n) {
    let c = !1, d = [];
    for (let [f, y] of Object.entries(n))
      typeof y == "boolean" && (c = !0), y === !0 && d.push(f);
    c && (u["data-headlessui-state"] = d.join(" "));
  }
  if (l === "template") {
    if (s = Pr(s != null ? s : []), Object.keys(i).length > 0 || Object.keys(t).length > 0) {
      let [c, ...d] = s != null ? s : [];
      if (!_n(c) || d.length > 0)
        throw new Error(['Passing props on "template"!', "", `The current component <${a} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(i).concat(Object.keys(t)).sort((f, y) => f.localeCompare(y)).map((f) => `  - ${f}`).join(`
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((f) => `  - ${f}`).join(`
`)].join(`
`));
      return un(c, Object.assign({}, i, u));
    }
    return Array.isArray(s) && s.length === 1 ? s[0] : s;
  }
  return F(l, Object.assign({}, i, u), s);
}
function Pr(e) {
  return e.flatMap((t) => t.type === te ? Pr(t.children) : [t]);
}
function xn(...e) {
  if (e.length === 0)
    return {};
  if (e.length === 1)
    return e[0];
  let t = {}, r = {};
  for (let n of e)
    for (let a in n)
      a.startsWith("on") && typeof n[a] == "function" ? (r[a] != null || (r[a] = []), r[a].push(n[a])) : t[a] = n[a];
  if (t.disabled || t["aria-disabled"])
    return Object.assign(t, Object.fromEntries(Object.keys(r).map((n) => [n, void 0])));
  for (let n in r)
    Object.assign(t, { [n](a, ...o) {
      let l = r[n];
      for (let i of l) {
        if (a instanceof Event && a.defaultPrevented)
          return;
        i(a, ...o);
      }
    } });
  return t;
}
function kr(e, t = []) {
  let r = Object.assign({}, e);
  for (let n of t)
    n in r && delete r[n];
  return r;
}
function _n(e) {
  return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
}
let On = 0;
function $n() {
  return ++On;
}
function Oe() {
  return $n();
}
var Fr = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Fr || {});
function ue(e) {
  var t;
  return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value;
}
let Cr = Symbol("Context");
var _e = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(_e || {});
function En() {
  return Ut() !== null;
}
function Ut() {
  return le(Cr, null);
}
function An(e) {
  se(Cr, e);
}
const at = typeof window > "u" || typeof document > "u";
function De(e) {
  if (at)
    return null;
  if (e instanceof Node)
    return e.ownerDocument;
  if (e != null && e.hasOwnProperty("value")) {
    let t = ue(e);
    if (t)
      return t.ownerDocument;
  }
  return document;
}
let xt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
var Ue = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Ue || {}), Nr = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Nr || {}), Pn = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Pn || {});
function kn(e = document.body) {
  return e == null ? [] : Array.from(e.querySelectorAll(xt));
}
var Dr = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Dr || {});
function Fn(e, t = 0) {
  var r;
  return e === ((r = De(e)) == null ? void 0 : r.body) ? !1 : ee(t, { [0]() {
    return e.matches(xt);
  }, [1]() {
    let n = e;
    for (; n !== null; ) {
      if (n.matches(xt))
        return !0;
      n = n.parentElement;
    }
    return !1;
  } });
}
function Ie(e) {
  e == null || e.focus({ preventScroll: !0 });
}
let Cn = ["textarea", "input"].join(",");
function Nn(e) {
  var t, r;
  return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Cn)) != null ? r : !1;
}
function Dn(e, t = (r) => r) {
  return e.slice().sort((r, n) => {
    let a = t(r), o = t(n);
    if (a === null || o === null)
      return 0;
    let l = a.compareDocumentPosition(o);
    return l & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : l & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
  });
}
function _t(e, t, r = !0, n = null) {
  var a;
  let o = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, l = Array.isArray(e) ? r ? Dn(e) : e : kn(e);
  n = n != null ? n : o.activeElement;
  let i = (() => {
    if (t & 5)
      return 1;
    if (t & 10)
      return -1;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })(), s = (() => {
    if (t & 1)
      return 0;
    if (t & 2)
      return Math.max(0, l.indexOf(n)) - 1;
    if (t & 4)
      return Math.max(0, l.indexOf(n)) + 1;
    if (t & 8)
      return l.length - 1;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })(), u = t & 32 ? { preventScroll: !0 } : {}, c = 0, d = l.length, f;
  do {
    if (c >= d || c + d <= 0)
      return 0;
    let y = s + c;
    if (t & 16)
      y = (y + d) % d;
    else {
      if (y < 0)
        return 3;
      if (y >= d)
        return 1;
    }
    f = l[y], f == null || f.focus(u), c += i;
  } while (f !== o.activeElement);
  return t & 6 && Nn(f) && f.select(), f.hasAttribute("tabindex") || f.setAttribute("tabindex", "0"), 2;
}
function ut(e, t, r) {
  at || re((n) => {
    document.addEventListener(e, t, r), n(() => document.removeEventListener(e, t, r));
  });
}
function Tn(e, t, r = A(() => !0)) {
  function n(o, l) {
    if (!r.value || o.defaultPrevented)
      return;
    let i = l(o);
    if (i === null || !i.ownerDocument.documentElement.contains(i))
      return;
    let s = function u(c) {
      return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
    }(e);
    for (let u of s) {
      if (u === null)
        continue;
      let c = u instanceof HTMLElement ? u : ue(u);
      if (c != null && c.contains(i))
        return;
    }
    return !Fn(i, Dr.Loose) && i.tabIndex !== -1 && o.preventDefault(), t(o, i);
  }
  let a = w(null);
  ut("mousedown", (o) => {
    var l, i;
    r.value && (a.value = ((i = (l = o.composedPath) == null ? void 0 : l.call(o)) == null ? void 0 : i[0]) || o.target);
  }, !0), ut("click", (o) => {
    !a.value || (n(o, () => a.value), a.value = null);
  }, !0), ut("blur", (o) => n(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
}
var Xe = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Xe || {});
let Ot = x({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: r }) {
  return () => {
    let { features: n, ...a } = e, o = { "aria-hidden": (n & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } };
    return J({ ourProps: o, theirProps: a, slot: {}, attrs: r, slots: t, name: "Hidden" });
  };
} });
function Ln(e, t, r) {
  at || re((n) => {
    window.addEventListener(e, t, r), n(() => window.removeEventListener(e, t, r));
  });
}
var $t = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))($t || {});
function Mn() {
  let e = w(0);
  return Ln("keydown", (t) => {
    t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0);
  }), e;
}
function Tr(e, t, r, n) {
  at || re((a) => {
    e = e != null ? e : window, e.addEventListener(t, r, n), a(() => e.removeEventListener(t, r, n));
  });
}
function Rn(e) {
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
    throw t;
  }));
}
var Lr = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(Lr || {});
let Me = Object.assign(x({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: Object, default: w(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) {
  let a = w(null);
  n({ el: a, $el: a });
  let o = A(() => De(a));
  In({ ownerDocument: o }, A(() => Boolean(e.features & 16)));
  let l = Bn({ ownerDocument: o, container: a, initialFocus: A(() => e.initialFocus) }, A(() => Boolean(e.features & 2)));
  jn({ ownerDocument: o, container: a, containers: e.containers, previousActiveElement: l }, A(() => Boolean(e.features & 8)));
  let i = Mn();
  function s() {
    let u = ue(a);
    !u || ee(i.value, { [$t.Forwards]: () => _t(u, Ue.First), [$t.Backwards]: () => _t(u, Ue.Last) });
  }
  return () => {
    let u = {}, c = { ref: a }, { features: d, initialFocus: f, containers: y, ...v } = e;
    return F(te, [Boolean(d & 4) && F(Ot, { as: "button", type: "button", onFocus: s, features: Xe.Focusable }), J({ ourProps: c, theirProps: { ...t, ...v }, slot: u, attrs: t, slots: r, name: "FocusTrap" }), Boolean(d & 4) && F(Ot, { as: "button", type: "button", onFocus: s, features: Xe.Focusable })]);
  };
} }), { features: Lr });
function In({ ownerDocument: e }, t) {
  let r = w(null);
  function n() {
    var o;
    r.value || (r.value = (o = e.value) == null ? void 0 : o.activeElement);
  }
  function a() {
    !r.value || (Ie(r.value), r.value = null);
  }
  H(() => {
    ce(t, (o, l) => {
      o !== l && (o ? n() : a());
    }, { immediate: !0 });
  }), ge(a);
}
function Bn({ ownerDocument: e, container: t, initialFocus: r }, n) {
  let a = w(null), o = w(!1);
  return H(() => o.value = !0), ge(() => o.value = !1), H(() => {
    ce([t, r, n], (l, i) => {
      if (l.every((u, c) => (i == null ? void 0 : i[c]) === u) || !n.value)
        return;
      let s = ue(t);
      !s || Rn(() => {
        var u, c;
        if (!o.value)
          return;
        let d = ue(r), f = (u = e.value) == null ? void 0 : u.activeElement;
        if (d) {
          if (d === f) {
            a.value = f;
            return;
          }
        } else if (s.contains(f)) {
          a.value = f;
          return;
        }
        d ? Ie(d) : _t(s, Ue.First | Ue.NoScroll) === Nr.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), a.value = (c = e.value) == null ? void 0 : c.activeElement;
      });
    }, { immediate: !0, flush: "post" });
  }), a;
}
function jn({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, a) {
  var o;
  Tr((o = e.value) == null ? void 0 : o.defaultView, "focus", (l) => {
    if (!a.value)
      return;
    let i = new Set(r == null ? void 0 : r.value);
    i.add(t);
    let s = n.value;
    if (!s)
      return;
    let u = l.target;
    u && u instanceof HTMLElement ? Vn(i, u) ? (n.value = u, Ie(u)) : (l.preventDefault(), l.stopPropagation(), Ie(s)) : Ie(n.value);
  }, !0);
}
function Vn(e, t) {
  var r;
  for (let n of e)
    if ((r = n.value) != null && r.contains(t))
      return !0;
  return !1;
}
let rr = "body > *", $e = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Map();
function nr(e) {
  e.setAttribute("aria-hidden", "true"), e.inert = !0;
}
function or(e) {
  let t = de.get(e);
  !t || (t["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", t["aria-hidden"]), e.inert = t.inert);
}
function Un(e, t = w(!0)) {
  re((r) => {
    if (!t.value || !e.value)
      return;
    let n = e.value, a = De(n);
    if (a) {
      $e.add(n);
      for (let o of de.keys())
        o.contains(n) && (or(o), de.delete(o));
      a.querySelectorAll(rr).forEach((o) => {
        if (o instanceof HTMLElement) {
          for (let l of $e)
            if (o.contains(l))
              return;
          $e.size === 1 && (de.set(o, { "aria-hidden": o.getAttribute("aria-hidden"), inert: o.inert }), nr(o));
        }
      }), r(() => {
        if ($e.delete(n), $e.size > 0)
          a.querySelectorAll(rr).forEach((o) => {
            if (o instanceof HTMLElement && !de.has(o)) {
              for (let l of $e)
                if (o.contains(l))
                  return;
              de.set(o, { "aria-hidden": o.getAttribute("aria-hidden"), inert: o.inert }), nr(o);
            }
          });
        else
          for (let o of de.keys())
            or(o), de.delete(o);
      });
    }
  });
}
let Mr = Symbol("ForcePortalRootContext");
function Hn() {
  return le(Mr, !1);
}
let Et = x({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: r }) {
  return se(Mr, e.force), () => {
    let { force: n, ...a } = e;
    return J({ theirProps: a, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" });
  };
} });
function zn(e) {
  let t = De(e);
  if (!t) {
    if (e === null)
      return null;
    throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`);
  }
  let r = t.getElementById("headlessui-portal-root");
  if (r)
    return r;
  let n = t.createElement("div");
  return n.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(n);
}
let Rr = x({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) {
  let n = w(null), a = A(() => De(n)), o = Hn(), l = le(Ir, null), i = w(o === !0 || l == null ? zn(n.value) : l.resolveTarget());
  return re(() => {
    o || l != null && (i.value = l.resolveTarget());
  }), ge(() => {
    var s, u;
    let c = (s = a.value) == null ? void 0 : s.getElementById("headlessui-portal-root");
    !c || i.value === c && i.value.children.length <= 0 && ((u = i.value.parentElement) == null || u.removeChild(i.value));
  }), () => {
    if (i.value === null)
      return null;
    let s = { ref: n, "data-headlessui-portal": "" };
    return F(cn, { to: i.value }, J({ ourProps: s, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" }));
  };
} }), Ir = Symbol("PortalGroupContext"), Wn = x({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) {
  let n = It({ resolveTarget() {
    return e.target;
  } });
  return se(Ir, n), () => {
    let { target: a, ...o } = e;
    return J({ theirProps: o, ourProps: {}, slot: {}, attrs: t, slots: r, name: "PortalGroup" });
  };
} }), Br = Symbol("StackContext");
var At = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(At || {});
function Gn() {
  return le(Br, () => {
  });
}
function qn({ type: e, enabled: t, element: r, onUpdate: n }) {
  let a = Gn();
  function o(...l) {
    n == null || n(...l), a(...l);
  }
  H(() => {
    ce(t, (l, i) => {
      l ? o(0, e, r) : i === !0 && o(1, e, r);
    }, { immediate: !0, flush: "sync" });
  }), ge(() => {
    t.value && o(1, e, r);
  }), se(Br, o);
}
let jr = Symbol("DescriptionContext");
function Qn() {
  let e = le(jr, null);
  if (e === null)
    throw new Error("Missing parent");
  return e;
}
function Jn({ slot: e = w({}), name: t = "Description", props: r = {} } = {}) {
  let n = w([]);
  function a(o) {
    return n.value.push(o), () => {
      let l = n.value.indexOf(o);
      l !== -1 && n.value.splice(l, 1);
    };
  }
  return se(jr, { register: a, slot: e, name: t, props: r }), A(() => n.value.length > 0 ? n.value.join(" ") : void 0);
}
let Kn = x({ name: "Description", props: { as: { type: [Object, String], default: "p" } }, setup(e, { attrs: t, slots: r }) {
  let n = Qn(), a = `headlessui-description-${Oe()}`;
  return H(() => ge(n.register(a))), () => {
    let { name: o = "Description", slot: l = w({}), props: i = {} } = n, s = e, u = { ...Object.entries(i).reduce((c, [d, f]) => Object.assign(c, { [d]: g(f) }), {}), id: a };
    return J({ ourProps: u, theirProps: s, slot: l.value, attrs: t, slots: r, name: o });
  };
} });
function Ht() {
  let e = [], t = [], r = { enqueue(n) {
    t.push(n);
  }, addEventListener(n, a, o, l) {
    return n.addEventListener(a, o, l), r.add(() => n.removeEventListener(a, o, l));
  }, requestAnimationFrame(...n) {
    let a = requestAnimationFrame(...n);
    r.add(() => cancelAnimationFrame(a));
  }, nextFrame(...n) {
    r.requestAnimationFrame(() => {
      r.requestAnimationFrame(...n);
    });
  }, setTimeout(...n) {
    let a = setTimeout(...n);
    r.add(() => clearTimeout(a));
  }, add(n) {
    e.push(n);
  }, dispose() {
    for (let n of e.splice(0))
      n();
  }, async workQueue() {
    for (let n of t.splice(0))
      await n();
  } };
  return r;
}
function Yn() {
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
}
var Zn = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Zn || {});
let Pt = Symbol("DialogContext");
function He(e) {
  let t = le(Pt, null);
  if (t === null) {
    let r = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(r, He), r;
  }
  return t;
}
let We = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Xn = x({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: We }, initialFocus: { type: Object, default: null } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: a }) {
  var o;
  let l = w(!1);
  H(() => {
    l.value = !0;
  });
  let i = w(0), s = Ut(), u = A(() => e.open === We && s !== null ? ee(s.value, { [_e.Open]: !0, [_e.Closed]: !1 }) : e.open), c = w(/* @__PURE__ */ new Set()), d = w(null), f = w(null), y = A(() => De(d));
  if (a({ el: d, $el: d }), !(e.open !== We || s !== null))
    throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
  if (typeof u.value != "boolean")
    throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === We ? void 0 : e.open}`);
  let v = A(() => l.value && u.value ? 0 : 1), $ = A(() => v.value === 0), N = A(() => i.value > 1), b = le(Pt, null) !== null, I = A(() => N.value ? "parent" : "leaf");
  Un(d, A(() => N.value ? $.value : !1)), qn({ type: "Dialog", enabled: A(() => v.value === 0), element: d, onUpdate: (_, O, E) => {
    if (O === "Dialog")
      return ee(_, { [At.Add]() {
        c.value.add(E), i.value += 1;
      }, [At.Remove]() {
        c.value.delete(E), i.value -= 1;
      } });
  } });
  let G = Jn({ name: "DialogDescription", slot: A(() => ({ open: u.value })) }), ne = `headlessui-dialog-${Oe()}`, K = w(null), U = { titleId: K, panelRef: w(null), dialogState: v, setTitleId(_) {
    K.value !== _ && (K.value = _);
  }, close() {
    t("close", !1);
  } };
  return se(Pt, U), Tn(() => {
    var _, O, E;
    return [...Array.from((O = (_ = y.value) == null ? void 0 : _.querySelectorAll("body > *, [data-headlessui-portal]")) != null ? O : []).filter((P) => !(!(P instanceof HTMLElement) || P.contains(ue(f)) || U.panelRef.value && P.contains(U.panelRef.value))), (E = U.panelRef.value) != null ? E : d.value];
  }, (_, O) => {
    U.close(), fn(() => O == null ? void 0 : O.focus());
  }, A(() => v.value === 0 && !N.value)), Tr((o = y.value) == null ? void 0 : o.defaultView, "keydown", (_) => {
    _.defaultPrevented || _.key === Fr.Escape && v.value === 0 && (N.value || (_.preventDefault(), _.stopPropagation(), U.close()));
  }), re((_) => {
    var O;
    if (v.value !== 0 || b)
      return;
    let E = y.value;
    if (!E)
      return;
    let P = Ht();
    function k(L, j, fe) {
      let Le = L.style.getPropertyValue(j);
      return Object.assign(L.style, { [j]: fe }), P.add(() => {
        Object.assign(L.style, { [j]: Le });
      });
    }
    let B = E == null ? void 0 : E.documentElement, z = ((O = E.defaultView) != null ? O : window).innerWidth - B.clientWidth;
    if (k(B, "overflow", "hidden"), z > 0) {
      let L = B.clientWidth - B.offsetWidth, j = z - L;
      k(B, "paddingRight", `${j}px`);
    }
    if (Yn()) {
      let L = window.pageYOffset;
      k(B, "position", "fixed"), k(B, "marginTop", `-${L}px`), k(B, "width", "100%"), P.add(() => window.scrollTo(0, L));
    }
    _(P.dispose);
  }), re((_) => {
    if (v.value !== 0)
      return;
    let O = ue(d);
    if (!O)
      return;
    let E = new IntersectionObserver((P) => {
      for (let k of P)
        k.boundingClientRect.x === 0 && k.boundingClientRect.y === 0 && k.boundingClientRect.width === 0 && k.boundingClientRect.height === 0 && U.close();
    });
    E.observe(O), _(() => E.disconnect());
  }), () => {
    let _ = { ...r, ref: d, id: ne, role: "dialog", "aria-modal": v.value === 0 ? !0 : void 0, "aria-labelledby": K.value, "aria-describedby": G.value }, { open: O, initialFocus: E, ...P } = e, k = { open: v.value === 0 };
    return F(Et, { force: !0 }, () => [F(Rr, () => F(Wn, { target: d.value }, () => F(Et, { force: !1 }, () => F(Me, { initialFocus: E, containers: c, features: $.value ? ee(I.value, { parent: Me.features.RestoreFocus, leaf: Me.features.All & ~Me.features.FocusLock }) : Me.features.None }, () => J({ ourProps: _, theirProps: P, slot: k, attrs: r, slots: n, visible: v.value === 0, features: Ze.RenderStrategy | Ze.Static, name: "Dialog" }))))), F(Ot, { features: Xe.Hidden, ref: f })]);
  };
} });
x({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r }) {
  let n = He("DialogOverlay"), a = `headlessui-dialog-overlay-${Oe()}`;
  function o(l) {
    l.target === l.currentTarget && (l.preventDefault(), l.stopPropagation(), n.close());
  }
  return () => J({ ourProps: { id: a, "aria-hidden": !0, onClick: o }, theirProps: e, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogOverlay" });
} });
x({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) {
  let a = He("DialogBackdrop"), o = `headlessui-dialog-backdrop-${Oe()}`, l = w(null);
  return n({ el: l, $el: l }), H(() => {
    if (a.panelRef.value === null)
      throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
  }), () => {
    let i = e, s = { id: o, ref: l, "aria-hidden": !0 };
    return F(Et, { force: !0 }, () => F(Rr, () => J({ ourProps: s, theirProps: { ...t, ...i }, slot: { open: a.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" })));
  };
} });
let eo = x({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r, expose: n }) {
  let a = He("DialogPanel"), o = `headlessui-dialog-panel-${Oe()}`;
  n({ el: a.panelRef, $el: a.panelRef });
  function l(i) {
    i.stopPropagation();
  }
  return () => {
    let i = { id: o, ref: a.panelRef, onClick: l };
    return J({ ourProps: i, theirProps: e, slot: { open: a.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogPanel" });
  };
} }), to = x({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" } }, setup(e, { attrs: t, slots: r }) {
  let n = He("DialogTitle"), a = `headlessui-dialog-title-${Oe()}`;
  return H(() => {
    n.setTitleId(a), ge(() => n.setTitleId(null));
  }), () => J({ ourProps: { id: a }, theirProps: e, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogTitle" });
} }), ro = Kn;
function no(e) {
  let t = { called: !1 };
  return (...r) => {
    if (!t.called)
      return t.called = !0, e(...r);
  };
}
function ct(e, ...t) {
  e && t.length > 0 && e.classList.add(...t);
}
function Ge(e, ...t) {
  e && t.length > 0 && e.classList.remove(...t);
}
var kt = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(kt || {});
function oo(e, t) {
  let r = Ht();
  if (!e)
    return r.dispose;
  let { transitionDuration: n, transitionDelay: a } = getComputedStyle(e), [o, l] = [n, a].map((i) => {
    let [s = 0] = i.split(",").filter(Boolean).map((u) => u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3).sort((u, c) => c - u);
    return s;
  });
  return o !== 0 ? r.setTimeout(() => t("finished"), o + l) : t("finished"), r.add(() => t("cancelled")), r.dispose;
}
function ar(e, t, r, n, a, o) {
  let l = Ht(), i = o !== void 0 ? no(o) : () => {
  };
  return Ge(e, ...a), ct(e, ...t, ...r), l.nextFrame(() => {
    Ge(e, ...r), ct(e, ...n), l.add(oo(e, (s) => (Ge(e, ...n, ...t), ct(e, ...a), i(s))));
  }), l.add(() => Ge(e, ...t, ...r, ...n, ...a)), l.add(() => i("cancelled")), l.dispose;
}
function be(e = "") {
  return e.split(" ").filter((t) => t.trim().length > 1);
}
let zt = Symbol("TransitionContext");
var ao = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(ao || {});
function lo() {
  return le(zt, null) !== null;
}
function io() {
  let e = le(zt, null);
  if (e === null)
    throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
  return e;
}
function so() {
  let e = le(Wt, null);
  if (e === null)
    throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
  return e;
}
let Wt = Symbol("NestingContext");
function lt(e) {
  return "children" in e ? lt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0;
}
function Vr(e) {
  let t = w([]), r = w(!1);
  H(() => r.value = !0), ge(() => r.value = !1);
  function n(o, l = ye.Hidden) {
    let i = t.value.findIndex(({ id: s }) => s === o);
    i !== -1 && (ee(l, { [ye.Unmount]() {
      t.value.splice(i, 1);
    }, [ye.Hidden]() {
      t.value[i].state = "hidden";
    } }), !lt(t) && r.value && (e == null || e()));
  }
  function a(o) {
    let l = t.value.find(({ id: i }) => i === o);
    return l ? l.state !== "visible" && (l.state = "visible") : t.value.push({ id: o, state: "visible" }), () => n(o, ye.Unmount);
  }
  return { children: t, register: a, unregister: n };
}
let Ur = Ze.RenderStrategy, Ft = x({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: a }) {
  if (!lo() && En())
    return () => F(Hr, { ...e, onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave") }, n);
  let o = w(null), l = w("visible"), i = A(() => e.unmount ? ye.Unmount : ye.Hidden);
  a({ el: o, $el: o });
  let { show: s, appear: u } = io(), { register: c, unregister: d } = so(), f = { value: !0 }, y = Oe(), v = { value: !1 }, $ = Vr(() => {
    v.value || (l.value = "hidden", d(y), t("afterLeave"));
  });
  H(() => {
    let O = c(y);
    ge(O);
  }), re(() => {
    if (i.value === ye.Hidden && !!y) {
      if (s && l.value !== "visible") {
        l.value = "visible";
        return;
      }
      ee(l.value, { hidden: () => d(y), visible: () => c(y) });
    }
  });
  let N = be(e.enter), b = be(e.enterFrom), I = be(e.enterTo), G = be(e.entered), ne = be(e.leave), K = be(e.leaveFrom), U = be(e.leaveTo);
  H(() => {
    re(() => {
      if (l.value === "visible") {
        let O = ue(o);
        if (O instanceof Comment && O.data === "")
          throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
      }
    });
  });
  function _(O) {
    let E = f.value && !u.value, P = ue(o);
    !P || !(P instanceof HTMLElement) || E || (v.value = !0, s.value && t("beforeEnter"), s.value || t("beforeLeave"), O(s.value ? ar(P, N, b, I, G, (k) => {
      v.value = !1, k === kt.Finished && t("afterEnter");
    }) : ar(P, ne, K, U, G, (k) => {
      v.value = !1, k === kt.Finished && (lt($) || (l.value = "hidden", d(y), t("afterLeave")));
    })));
  }
  return H(() => {
    ce([s], (O, E, P) => {
      _(P), f.value = !1;
    }, { immediate: !0 });
  }), se(Wt, $), An(A(() => ee(l.value, { visible: _e.Open, hidden: _e.Closed }))), () => {
    let { appear: O, show: E, enter: P, enterFrom: k, enterTo: B, entered: z, leave: L, leaveFrom: j, leaveTo: fe, ...Le } = e;
    return J({ theirProps: Le, ourProps: { ref: o }, slot: {}, slots: n, attrs: r, features: Ur, visible: l.value === "visible", name: "TransitionChild" });
  };
} }), uo = Ft, Hr = x({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n }) {
  let a = Ut(), o = A(() => e.show === null && a !== null ? ee(a.value, { [_e.Open]: !0, [_e.Closed]: !1 }) : e.show);
  re(() => {
    if (![!0, !1].includes(o.value))
      throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
  });
  let l = w(o.value ? "visible" : "hidden"), i = Vr(() => {
    l.value = "hidden";
  }), s = w(!0), u = { show: o, appear: A(() => e.appear || !s.value) };
  return H(() => {
    re(() => {
      s.value = !1, o.value ? l.value = "visible" : lt(i) || (l.value = "hidden");
    });
  }), se(Wt, i), se(zt, u), () => {
    let c = kr(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), d = { unmount: e.unmount };
    return J({ ourProps: { ...d, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [F(uo, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...d, ...c }, n.default)] }, attrs: {}, features: Ur, visible: l.value === "visible", name: "Transition" });
  };
} });
const co = { class: "inline-flex flex-row gap-3" }, fo = {
  key: 0,
  class: "w-10 h-10 flex-shrink-0 flex items-center justify-center"
}, po = { class: "inline-flex flex-col" }, vo = { class: "inline-flex flex-row-reverse self-end gap-3 mt-4" }, yo = /* @__PURE__ */ x({
  __name: "ConfirmableDialog",
  props: {
    title: null,
    message: null,
    icon: null,
    confirmLabel: null,
    cancelLabel: null,
    look: { default: "primary" },
    close: null,
    confirmUsing: null
  },
  setup(e) {
    const t = e, r = () => {
      t.close();
    };
    return (n, a) => (m(), T(g(eo), { class: "flex relative flex-col w-full max-w-lg transform overflow-hidden rounded-xl bg-white p-6 text-left align-middle shadow-xl transition-all" }, {
      default: C(() => [
        p("button", {
          onClick: a[0] || (a[0] = Z(
            (...o) => e.close && e.close(...o),
            ["prevent"]
          )),
          class: "absolute right-4 top-4 text-gray-600 hover:text-gray-700 transition-colors duration-300"
        }, [
          D(g(Sn), { class: "w-4 h-4" })
        ]),
        p("div", co, [
          e.icon ? (m(), h("div", fo, [
            p("div", {
              class: q([[`bg-${e.look}-50`], "w-10 h-10 absolute rounded-full"])
            }, null, 2),
            p("div", {
              class: q([[`bg-${e.look}-100`], "w-6 h-6 absolute rounded-full"])
            }, null, 2),
            D(g(Q), {
              class: q([[`text-${e.look}-600`], "absolute"]),
              component: e.icon
            }, null, 8, ["class", "component"])
          ])) : W("", !0),
          p("div", po, [
            D(g(to), { class: "font-semibold text-gray-900 text-lg" }, {
              default: C(() => [
                Ye(Y(e.title), 1)
              ]),
              _: 1
            }),
            e.message ? (m(), T(g(ro), {
              key: 0,
              class: "text-gray-600 text-sm mt-1"
            }, {
              default: C(() => [
                Ye(Y(e.message), 1)
              ]),
              _: 1
            })) : W("", !0)
          ])
        ]),
        p("div", vo, [
          e.confirmUsing ? (m(), T(g(Q), {
            key: 0,
            component: e.confirmUsing,
            onSuccess: r
          }, null, 8, ["component"])) : (m(), h("button", {
            key: 1,
            onClick: a[1] || (a[1] = Z(
              (...o) => e.close && e.close(...o),
              ["prevent"]
            )),
            class: q(["btn", [e.look]])
          }, Y(e.confirmLabel), 3)),
          p("button", {
            onClick: a[2] || (a[2] = Z(
              (...o) => e.close && e.close(...o),
              ["prevent"]
            )),
            class: "btn"
          }, Y(e.cancelLabel), 1)
        ])
      ]),
      _: 1
    }));
  }
}), mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: yo
}, Symbol.toStringTag, { value: "Module" })), go = /* @__PURE__ */ x({
  __name: "DestroyResourcesDialog",
  setup(e) {
    return (t, r) => (m(), h("p", null, "Are you sure you want to delete user?"));
  }
}), ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: go
}, Symbol.toStringTag, { value: "Module" }));
function bo(e, t) {
  return m(), h("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    fill: "none",
    viewBox: "0 0 24 24",
    "stroke-width": "1.5",
    stroke: "currentColor",
    "aria-hidden": "true"
  }, [
    p("path", {
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      d: "M8.25 4.5l7.5 7.5-7.5 7.5"
    })
  ]);
}
function wo(e, t) {
  return m(), h("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    fill: "none",
    viewBox: "0 0 24 24",
    "stroke-width": "1.5",
    stroke: "currentColor",
    "aria-hidden": "true"
  }, [
    p("path", {
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      d: "M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z"
    })
  ]);
}
function So(e, t) {
  return m(), h("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    fill: "none",
    viewBox: "0 0 24 24",
    "stroke-width": "1.5",
    stroke: "currentColor",
    "aria-hidden": "true"
  }, [
    p("path", {
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      d: "M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"
    })
  ]);
}
function zr(e) {
  const t = (l) => ({
    items: l.items.map((i) => ({
      item: i,
      isActive: w(i.link.isActive),
      childNavigation: i.childNavigation ? t(i.childNavigation) : null,
      isExpanded: w(!1)
    })),
    childActive: w(!1)
  }), r = (l) => l.items.some((i) => i.isActive.value ? !0 : i.childNavigation ? r(i.childNavigation) : !1), n = (l, i = !1) => {
    l.items.forEach((s) => {
      if (s.childNavigation) {
        if (i && s.isExpanded.value) {
          n(s.childNavigation, i);
          return;
        }
        s.isExpanded.value = s.isActive.value || r(s.childNavigation), n(s.childNavigation);
      } else {
        if (i && s.isExpanded.value)
          return;
        s.isExpanded.value = s.isActive.value;
      }
    });
  }, a = (l, i) => {
    l.items.forEach((s) => {
      const u = i.items.find((c) => c.link.location === s.item.link.location);
      u && (s.isActive.value = u.link.isActive, s.childNavigation && u.childNavigation && a(s.childNavigation, u.childNavigation));
    });
  }, o = t(e.value);
  return ce(e, (l) => {
    a(o, l), n(o, !0);
  }), n(o), {
    navigation: o
  };
}
function xo(e, t) {
  H(() => {
    window.addEventListener(e, t);
  }), $r(() => {
    window.removeEventListener(e, t);
  });
}
function _o(e) {
  H(() => {
    window.addEventListener("keydown", e);
  }), $r(() => {
    window.removeEventListener("keydown", e);
  });
}
function Oo(e, t) {
  _o((r) => {
    r.code === e && t(r);
  });
}
function $o(e) {
  Oo("Escape", e);
}
function Eo(e, t) {
  const r = {};
  return e.forEach((n) => {
    r[n.id] = {
      selected: t[n.id].selected,
      value: t[n.id].value
    };
  }), It(r);
}
const Ao = { class: "flex flex-col w-full" }, Po = ["checked", "id"], ko = ["for"], Fo = /* @__PURE__ */ x({
  __name: "CollapsibleFilterable",
  props: {
    isLast: { type: Boolean },
    id: null,
    name: null,
    modelValue: { type: Boolean }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const r = (n) => {
      t("update:modelValue", n.target.checked);
    };
    return (n, a) => (m(), h("div", Ao, [
      p("div", {
        class: q(["inline-flex items-center px-2 py-2", { "border-b": !(e.isLast && !e.modelValue) }])
      }, [
        p("input", {
          onChange: r,
          checked: e.modelValue,
          id: `filter-toggle-${e.id}`,
          type: "checkbox",
          class: "form-check"
        }, null, 40, Po),
        p("label", {
          class: "text-sm ml-2 font-medium",
          for: `filter-toggle-${e.id}`
        }, Y(e.name), 9, ko)
      ], 2),
      Bt(p("div", {
        class: q(["bg-gray-25", { "rounded-b": e.isLast }])
      }, [
        X(n.$slots, "default")
      ], 2), [
        [dn, e.modelValue]
      ])
    ]));
  }
});
function Co(e) {
  var t = e.default;
  if (typeof t == "function") {
    var r = function() {
      return t.apply(this, arguments);
    };
    r.prototype = t.prototype;
  } else
    r = {};
  return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
    var a = Object.getOwnPropertyDescriptor(e, n);
    Object.defineProperty(r, n, a.get ? a : {
      enumerable: !0,
      get: function() {
        return e[n];
      }
    });
  }), r;
}
var No = function() {
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
    return !1;
  if (typeof Symbol.iterator == "symbol")
    return !0;
  var t = {}, r = Symbol("test"), n = Object(r);
  if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
    return !1;
  var a = 42;
  t[r] = a;
  for (r in t)
    return !1;
  if (typeof Object.keys == "function" && Object.keys(t).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(t).length !== 0)
    return !1;
  var o = Object.getOwnPropertySymbols(t);
  if (o.length !== 1 || o[0] !== r || !Object.prototype.propertyIsEnumerable.call(t, r))
    return !1;
  if (typeof Object.getOwnPropertyDescriptor == "function") {
    var l = Object.getOwnPropertyDescriptor(t, r);
    if (l.value !== a || l.enumerable !== !0)
      return !1;
  }
  return !0;
}, lr = typeof Symbol < "u" && Symbol, Do = No, To = function() {
  return typeof lr != "function" || typeof Symbol != "function" || typeof lr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Do();
}, Lo = "Function.prototype.bind called on incompatible ", ft = Array.prototype.slice, Mo = Object.prototype.toString, Ro = "[object Function]", Io = function(t) {
  var r = this;
  if (typeof r != "function" || Mo.call(r) !== Ro)
    throw new TypeError(Lo + r);
  for (var n = ft.call(arguments, 1), a, o = function() {
    if (this instanceof a) {
      var c = r.apply(
        this,
        n.concat(ft.call(arguments))
      );
      return Object(c) === c ? c : this;
    } else
      return r.apply(
        t,
        n.concat(ft.call(arguments))
      );
  }, l = Math.max(0, r.length - n.length), i = [], s = 0; s < l; s++)
    i.push("$" + s);
  if (a = Function("binder", "return function (" + i.join(",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
    var u = function() {
    };
    u.prototype = r.prototype, a.prototype = new u(), u.prototype = null;
  }
  return a;
}, Bo = Io, Gt = Function.prototype.bind || Bo, jo = Gt, Vo = jo.call(Function.call, Object.prototype.hasOwnProperty), S, Fe = SyntaxError, Wr = Function, Pe = TypeError, dt = function(e) {
  try {
    return Wr('"use strict"; return (' + e + ").constructor;")();
  } catch {
  }
}, Se = Object.getOwnPropertyDescriptor;
if (Se)
  try {
    Se({}, "");
  } catch {
    Se = null;
  }
var pt = function() {
  throw new Pe();
}, Uo = Se ? function() {
  try {
    return arguments.callee, pt;
  } catch {
    try {
      return Se(arguments, "callee").get;
    } catch {
      return pt;
    }
  }
}() : pt, Ee = To(), pe = Object.getPrototypeOf || function(e) {
  return e.__proto__;
}, Ae = {}, Ho = typeof Uint8Array > "u" ? S : pe(Uint8Array), ke = {
  "%AggregateError%": typeof AggregateError > "u" ? S : AggregateError,
  "%Array%": Array,
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? S : ArrayBuffer,
  "%ArrayIteratorPrototype%": Ee ? pe([][Symbol.iterator]()) : S,
  "%AsyncFromSyncIteratorPrototype%": S,
  "%AsyncFunction%": Ae,
  "%AsyncGenerator%": Ae,
  "%AsyncGeneratorFunction%": Ae,
  "%AsyncIteratorPrototype%": Ae,
  "%Atomics%": typeof Atomics > "u" ? S : Atomics,
  "%BigInt%": typeof BigInt > "u" ? S : BigInt,
  "%Boolean%": Boolean,
  "%DataView%": typeof DataView > "u" ? S : DataView,
  "%Date%": Date,
  "%decodeURI%": decodeURI,
  "%decodeURIComponent%": decodeURIComponent,
  "%encodeURI%": encodeURI,
  "%encodeURIComponent%": encodeURIComponent,
  "%Error%": Error,
  "%eval%": eval,
  "%EvalError%": EvalError,
  "%Float32Array%": typeof Float32Array > "u" ? S : Float32Array,
  "%Float64Array%": typeof Float64Array > "u" ? S : Float64Array,
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? S : FinalizationRegistry,
  "%Function%": Wr,
  "%GeneratorFunction%": Ae,
  "%Int8Array%": typeof Int8Array > "u" ? S : Int8Array,
  "%Int16Array%": typeof Int16Array > "u" ? S : Int16Array,
  "%Int32Array%": typeof Int32Array > "u" ? S : Int32Array,
  "%isFinite%": isFinite,
  "%isNaN%": isNaN,
  "%IteratorPrototype%": Ee ? pe(pe([][Symbol.iterator]())) : S,
  "%JSON%": typeof JSON == "object" ? JSON : S,
  "%Map%": typeof Map > "u" ? S : Map,
  "%MapIteratorPrototype%": typeof Map > "u" || !Ee ? S : pe((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  "%Math%": Math,
  "%Number%": Number,
  "%Object%": Object,
  "%parseFloat%": parseFloat,
  "%parseInt%": parseInt,
  "%Promise%": typeof Promise > "u" ? S : Promise,
  "%Proxy%": typeof Proxy > "u" ? S : Proxy,
  "%RangeError%": RangeError,
  "%ReferenceError%": ReferenceError,
  "%Reflect%": typeof Reflect > "u" ? S : Reflect,
  "%RegExp%": RegExp,
  "%Set%": typeof Set > "u" ? S : Set,
  "%SetIteratorPrototype%": typeof Set > "u" || !Ee ? S : pe((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? S : SharedArrayBuffer,
  "%String%": String,
  "%StringIteratorPrototype%": Ee ? pe(""[Symbol.iterator]()) : S,
  "%Symbol%": Ee ? Symbol : S,
  "%SyntaxError%": Fe,
  "%ThrowTypeError%": Uo,
  "%TypedArray%": Ho,
  "%TypeError%": Pe,
  "%Uint8Array%": typeof Uint8Array > "u" ? S : Uint8Array,
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? S : Uint8ClampedArray,
  "%Uint16Array%": typeof Uint16Array > "u" ? S : Uint16Array,
  "%Uint32Array%": typeof Uint32Array > "u" ? S : Uint32Array,
  "%URIError%": URIError,
  "%WeakMap%": typeof WeakMap > "u" ? S : WeakMap,
  "%WeakRef%": typeof WeakRef > "u" ? S : WeakRef,
  "%WeakSet%": typeof WeakSet > "u" ? S : WeakSet
}, zo = function e(t) {
  var r;
  if (t === "%AsyncFunction%")
    r = dt("async function () {}");
  else if (t === "%GeneratorFunction%")
    r = dt("function* () {}");
  else if (t === "%AsyncGeneratorFunction%")
    r = dt("async function* () {}");
  else if (t === "%AsyncGenerator%") {
    var n = e("%AsyncGeneratorFunction%");
    n && (r = n.prototype);
  } else if (t === "%AsyncIteratorPrototype%") {
    var a = e("%AsyncGenerator%");
    a && (r = pe(a.prototype));
  }
  return ke[t] = r, r;
}, ir = {
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  "%ArrayPrototype%": ["Array", "prototype"],
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  "%ArrayProto_values%": ["Array", "prototype", "values"],
  "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  "%BooleanPrototype%": ["Boolean", "prototype"],
  "%DataViewPrototype%": ["DataView", "prototype"],
  "%DatePrototype%": ["Date", "prototype"],
  "%ErrorPrototype%": ["Error", "prototype"],
  "%EvalErrorPrototype%": ["EvalError", "prototype"],
  "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  "%FunctionPrototype%": ["Function", "prototype"],
  "%Generator%": ["GeneratorFunction", "prototype"],
  "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  "%JSONParse%": ["JSON", "parse"],
  "%JSONStringify%": ["JSON", "stringify"],
  "%MapPrototype%": ["Map", "prototype"],
  "%NumberPrototype%": ["Number", "prototype"],
  "%ObjectPrototype%": ["Object", "prototype"],
  "%ObjProto_toString%": ["Object", "prototype", "toString"],
  "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  "%PromisePrototype%": ["Promise", "prototype"],
  "%PromiseProto_then%": ["Promise", "prototype", "then"],
  "%Promise_all%": ["Promise", "all"],
  "%Promise_reject%": ["Promise", "reject"],
  "%Promise_resolve%": ["Promise", "resolve"],
  "%RangeErrorPrototype%": ["RangeError", "prototype"],
  "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  "%RegExpPrototype%": ["RegExp", "prototype"],
  "%SetPrototype%": ["Set", "prototype"],
  "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  "%StringPrototype%": ["String", "prototype"],
  "%SymbolPrototype%": ["Symbol", "prototype"],
  "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  "%TypeErrorPrototype%": ["TypeError", "prototype"],
  "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  "%URIErrorPrototype%": ["URIError", "prototype"],
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
}, ze = Gt, et = Vo, Wo = ze.call(Function.call, Array.prototype.concat), Go = ze.call(Function.apply, Array.prototype.splice), sr = ze.call(Function.call, String.prototype.replace), tt = ze.call(Function.call, String.prototype.slice), qo = ze.call(Function.call, RegExp.prototype.exec), Qo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Jo = /\\(\\)?/g, Ko = function(t) {
  var r = tt(t, 0, 1), n = tt(t, -1);
  if (r === "%" && n !== "%")
    throw new Fe("invalid intrinsic syntax, expected closing `%`");
  if (n === "%" && r !== "%")
    throw new Fe("invalid intrinsic syntax, expected opening `%`");
  var a = [];
  return sr(t, Qo, function(o, l, i, s) {
    a[a.length] = i ? sr(s, Jo, "$1") : l || o;
  }), a;
}, Yo = function(t, r) {
  var n = t, a;
  if (et(ir, n) && (a = ir[n], n = "%" + a[0] + "%"), et(ke, n)) {
    var o = ke[n];
    if (o === Ae && (o = zo(n)), typeof o > "u" && !r)
      throw new Pe("intrinsic " + t + " exists, but is not available. Please file an issue!");
    return {
      alias: a,
      name: n,
      value: o
    };
  }
  throw new Fe("intrinsic " + t + " does not exist!");
}, qt = function(t, r) {
  if (typeof t != "string" || t.length === 0)
    throw new Pe("intrinsic name must be a non-empty string");
  if (arguments.length > 1 && typeof r != "boolean")
    throw new Pe('"allowMissing" argument must be a boolean');
  if (qo(/^%?[^%]*%?$/g, t) === null)
    throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  var n = Ko(t), a = n.length > 0 ? n[0] : "", o = Yo("%" + a + "%", r), l = o.name, i = o.value, s = !1, u = o.alias;
  u && (a = u[0], Go(n, Wo([0, 1], u)));
  for (var c = 1, d = !0; c < n.length; c += 1) {
    var f = n[c], y = tt(f, 0, 1), v = tt(f, -1);
    if ((y === '"' || y === "'" || y === "`" || v === '"' || v === "'" || v === "`") && y !== v)
      throw new Fe("property names with quotes must have matching quotes");
    if ((f === "constructor" || !d) && (s = !0), a += "." + f, l = "%" + a + "%", et(ke, l))
      i = ke[l];
    else if (i != null) {
      if (!(f in i)) {
        if (!r)
          throw new Pe("base intrinsic for " + t + " exists, but the property is not available.");
        return;
      }
      if (Se && c + 1 >= n.length) {
        var $ = Se(i, f);
        d = !!$, d && "get" in $ && !("originalValue" in $.get) ? i = $.get : i = i[f];
      } else
        d = et(i, f), i = i[f];
      d && !s && (ke[l] = i);
    }
  }
  return i;
}, Gr = { exports: {} };
(function(e) {
  var t = Gt, r = qt, n = r("%Function.prototype.apply%"), a = r("%Function.prototype.call%"), o = r("%Reflect.apply%", !0) || t.call(a, n), l = r("%Object.getOwnPropertyDescriptor%", !0), i = r("%Object.defineProperty%", !0), s = r("%Math.max%");
  if (i)
    try {
      i({}, "a", { value: 1 });
    } catch {
      i = null;
    }
  e.exports = function(d) {
    var f = o(t, a, arguments);
    if (l && i) {
      var y = l(f, "length");
      y.configurable && i(
        f,
        "length",
        { value: 1 + s(0, d.length - (arguments.length - 1)) }
      );
    }
    return f;
  };
  var u = function() {
    return o(t, n, arguments);
  };
  i ? i(e.exports, "apply", { value: u }) : e.exports.apply = u;
})(Gr);
var qr = qt, Qr = Gr.exports, Zo = Qr(qr("String.prototype.indexOf")), Xo = function(t, r) {
  var n = qr(t, !!r);
  return typeof n == "function" && Zo(t, ".prototype.") > -1 ? Qr(n) : n;
};
const ea = {}, ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: ea
}, Symbol.toStringTag, { value: "Module" })), ra = /* @__PURE__ */ Co(ta);
var Qt = typeof Map == "function" && Map.prototype, vt = Object.getOwnPropertyDescriptor && Qt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, rt = Qt && vt && typeof vt.get == "function" ? vt.get : null, na = Qt && Map.prototype.forEach, Jt = typeof Set == "function" && Set.prototype, yt = Object.getOwnPropertyDescriptor && Jt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, nt = Jt && yt && typeof yt.get == "function" ? yt.get : null, oa = Jt && Set.prototype.forEach, aa = typeof WeakMap == "function" && WeakMap.prototype, Be = aa ? WeakMap.prototype.has : null, la = typeof WeakSet == "function" && WeakSet.prototype, je = la ? WeakSet.prototype.has : null, ia = typeof WeakRef == "function" && WeakRef.prototype, ur = ia ? WeakRef.prototype.deref : null, sa = Boolean.prototype.valueOf, ua = Object.prototype.toString, ca = Function.prototype.toString, fa = String.prototype.match, Kt = String.prototype.slice, me = String.prototype.replace, da = String.prototype.toUpperCase, cr = String.prototype.toLowerCase, Jr = RegExp.prototype.test, fr = Array.prototype.concat, ae = Array.prototype.join, pa = Array.prototype.slice, dr = Math.floor, Ct = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, mt = Object.getOwnPropertySymbols, Nt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Ce = typeof Symbol == "function" && typeof Symbol.iterator == "object", V = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Ce ? "object" : "symbol") ? Symbol.toStringTag : null, Kr = Object.prototype.propertyIsEnumerable, pr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
  return e.__proto__;
} : null);
function vr(e, t) {
  if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 || Jr.call(/e/, t))
    return t;
  var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  if (typeof e == "number") {
    var n = e < 0 ? -dr(-e) : dr(e);
    if (n !== e) {
      var a = String(n), o = Kt.call(t, a.length + 1);
      return me.call(a, r, "$&_") + "." + me.call(me.call(o, /([0-9]{3})/g, "$&_"), /_$/, "");
    }
  }
  return me.call(t, r, "$&_");
}
var Dt = ra, yr = Dt.custom, mr = Zr(yr) ? yr : null, va = function e(t, r, n, a) {
  var o = r || {};
  if (ve(o, "quoteStyle") && o.quoteStyle !== "single" && o.quoteStyle !== "double")
    throw new TypeError('option "quoteStyle" must be "single" or "double"');
  if (ve(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  var l = ve(o, "customInspect") ? o.customInspect : !0;
  if (typeof l != "boolean" && l !== "symbol")
    throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  if (ve(o, "indent") && o.indent !== null && o.indent !== "	" && !(parseInt(o.indent, 10) === o.indent && o.indent > 0))
    throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  if (ve(o, "numericSeparator") && typeof o.numericSeparator != "boolean")
    throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  var i = o.numericSeparator;
  if (typeof t > "u")
    return "undefined";
  if (t === null)
    return "null";
  if (typeof t == "boolean")
    return t ? "true" : "false";
  if (typeof t == "string")
    return en(t, o);
  if (typeof t == "number") {
    if (t === 0)
      return 1 / 0 / t > 0 ? "0" : "-0";
    var s = String(t);
    return i ? vr(t, s) : s;
  }
  if (typeof t == "bigint") {
    var u = String(t) + "n";
    return i ? vr(t, u) : u;
  }
  var c = typeof o.depth > "u" ? 5 : o.depth;
  if (typeof n > "u" && (n = 0), n >= c && c > 0 && typeof t == "object")
    return Tt(t) ? "[Array]" : "[Object]";
  var d = Na(o, n);
  if (typeof a > "u")
    a = [];
  else if (Xr(a, t) >= 0)
    return "[Circular]";
  function f(z, L, j) {
    if (L && (a = pa.call(a), a.push(L)), j) {
      var fe = {
        depth: o.depth
      };
      return ve(o, "quoteStyle") && (fe.quoteStyle = o.quoteStyle), e(z, fe, n + 1, a);
    }
    return e(z, o, n + 1, a);
  }
  if (typeof t == "function" && !gr(t)) {
    var y = _a(t), v = qe(t, f);
    return "[Function" + (y ? ": " + y : " (anonymous)") + "]" + (v.length > 0 ? " { " + ae.call(v, ", ") + " }" : "");
  }
  if (Zr(t)) {
    var $ = Ce ? me.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : Nt.call(t);
    return typeof t == "object" && !Ce ? Re($) : $;
  }
  if (ka(t)) {
    for (var N = "<" + cr.call(String(t.nodeName)), b = t.attributes || [], I = 0; I < b.length; I++)
      N += " " + b[I].name + "=" + Yr(ya(b[I].value), "double", o);
    return N += ">", t.childNodes && t.childNodes.length && (N += "..."), N += "</" + cr.call(String(t.nodeName)) + ">", N;
  }
  if (Tt(t)) {
    if (t.length === 0)
      return "[]";
    var G = qe(t, f);
    return d && !Ca(G) ? "[" + Lt(G, d) + "]" : "[ " + ae.call(G, ", ") + " ]";
  }
  if (ga(t)) {
    var ne = qe(t, f);
    return !("cause" in Error.prototype) && "cause" in t && !Kr.call(t, "cause") ? "{ [" + String(t) + "] " + ae.call(fr.call("[cause]: " + f(t.cause), ne), ", ") + " }" : ne.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ae.call(ne, ", ") + " }";
  }
  if (typeof t == "object" && l) {
    if (mr && typeof t[mr] == "function" && Dt)
      return Dt(t, { depth: c - n });
    if (l !== "symbol" && typeof t.inspect == "function")
      return t.inspect();
  }
  if (Oa(t)) {
    var K = [];
    return na.call(t, function(z, L) {
      K.push(f(L, t, !0) + " => " + f(z, t));
    }), hr("Map", rt.call(t), K, d);
  }
  if (Aa(t)) {
    var U = [];
    return oa.call(t, function(z) {
      U.push(f(z, t));
    }), hr("Set", nt.call(t), U, d);
  }
  if ($a(t))
    return gt("WeakMap");
  if (Pa(t))
    return gt("WeakSet");
  if (Ea(t))
    return gt("WeakRef");
  if (ba(t))
    return Re(f(Number(t)));
  if (Sa(t))
    return Re(f(Ct.call(t)));
  if (wa(t))
    return Re(sa.call(t));
  if (ha(t))
    return Re(f(String(t)));
  if (!ma(t) && !gr(t)) {
    var _ = qe(t, f), O = pr ? pr(t) === Object.prototype : t instanceof Object || t.constructor === Object, E = t instanceof Object ? "" : "null prototype", P = !O && V && Object(t) === t && V in t ? Kt.call(he(t), 8, -1) : E ? "Object" : "", k = O || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", B = k + (P || E ? "[" + ae.call(fr.call([], P || [], E || []), ": ") + "] " : "");
    return _.length === 0 ? B + "{}" : d ? B + "{" + Lt(_, d) + "}" : B + "{ " + ae.call(_, ", ") + " }";
  }
  return String(t);
};
function Yr(e, t, r) {
  var n = (r.quoteStyle || t) === "double" ? '"' : "'";
  return n + e + n;
}
function ya(e) {
  return me.call(String(e), /"/g, "&quot;");
}
function Tt(e) {
  return he(e) === "[object Array]" && (!V || !(typeof e == "object" && V in e));
}
function ma(e) {
  return he(e) === "[object Date]" && (!V || !(typeof e == "object" && V in e));
}
function gr(e) {
  return he(e) === "[object RegExp]" && (!V || !(typeof e == "object" && V in e));
}
function ga(e) {
  return he(e) === "[object Error]" && (!V || !(typeof e == "object" && V in e));
}
function ha(e) {
  return he(e) === "[object String]" && (!V || !(typeof e == "object" && V in e));
}
function ba(e) {
  return he(e) === "[object Number]" && (!V || !(typeof e == "object" && V in e));
}
function wa(e) {
  return he(e) === "[object Boolean]" && (!V || !(typeof e == "object" && V in e));
}
function Zr(e) {
  if (Ce)
    return e && typeof e == "object" && e instanceof Symbol;
  if (typeof e == "symbol")
    return !0;
  if (!e || typeof e != "object" || !Nt)
    return !1;
  try {
    return Nt.call(e), !0;
  } catch {
  }
  return !1;
}
function Sa(e) {
  if (!e || typeof e != "object" || !Ct)
    return !1;
  try {
    return Ct.call(e), !0;
  } catch {
  }
  return !1;
}
var xa = Object.prototype.hasOwnProperty || function(e) {
  return e in this;
};
function ve(e, t) {
  return xa.call(e, t);
}
function he(e) {
  return ua.call(e);
}
function _a(e) {
  if (e.name)
    return e.name;
  var t = fa.call(ca.call(e), /^function\s*([\w$]+)/);
  return t ? t[1] : null;
}
function Xr(e, t) {
  if (e.indexOf)
    return e.indexOf(t);
  for (var r = 0, n = e.length; r < n; r++)
    if (e[r] === t)
      return r;
  return -1;
}
function Oa(e) {
  if (!rt || !e || typeof e != "object")
    return !1;
  try {
    rt.call(e);
    try {
      nt.call(e);
    } catch {
      return !0;
    }
    return e instanceof Map;
  } catch {
  }
  return !1;
}
function $a(e) {
  if (!Be || !e || typeof e != "object")
    return !1;
  try {
    Be.call(e, Be);
    try {
      je.call(e, je);
    } catch {
      return !0;
    }
    return e instanceof WeakMap;
  } catch {
  }
  return !1;
}
function Ea(e) {
  if (!ur || !e || typeof e != "object")
    return !1;
  try {
    return ur.call(e), !0;
  } catch {
  }
  return !1;
}
function Aa(e) {
  if (!nt || !e || typeof e != "object")
    return !1;
  try {
    nt.call(e);
    try {
      rt.call(e);
    } catch {
      return !0;
    }
    return e instanceof Set;
  } catch {
  }
  return !1;
}
function Pa(e) {
  if (!je || !e || typeof e != "object")
    return !1;
  try {
    je.call(e, je);
    try {
      Be.call(e, Be);
    } catch {
      return !0;
    }
    return e instanceof WeakSet;
  } catch {
  }
  return !1;
}
function ka(e) {
  return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
}
function en(e, t) {
  if (e.length > t.maxStringLength) {
    var r = e.length - t.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
    return en(Kt.call(e, 0, t.maxStringLength), t) + n;
  }
  var a = me.call(me.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Fa);
  return Yr(a, "single", t);
}
function Fa(e) {
  var t = e.charCodeAt(0), r = {
    8: "b",
    9: "t",
    10: "n",
    12: "f",
    13: "r"
  }[t];
  return r ? "\\" + r : "\\x" + (t < 16 ? "0" : "") + da.call(t.toString(16));
}
function Re(e) {
  return "Object(" + e + ")";
}
function gt(e) {
  return e + " { ? }";
}
function hr(e, t, r, n) {
  var a = n ? Lt(r, n) : ae.call(r, ", ");
  return e + " (" + t + ") {" + a + "}";
}
function Ca(e) {
  for (var t = 0; t < e.length; t++)
    if (Xr(e[t], `
`) >= 0)
      return !1;
  return !0;
}
function Na(e, t) {
  var r;
  if (e.indent === "	")
    r = "	";
  else if (typeof e.indent == "number" && e.indent > 0)
    r = ae.call(Array(e.indent + 1), " ");
  else
    return null;
  return {
    base: r,
    prev: ae.call(Array(t + 1), r)
  };
}
function Lt(e, t) {
  if (e.length === 0)
    return "";
  var r = `
` + t.prev + t.base;
  return r + ae.call(e, "," + r) + `
` + t.prev;
}
function qe(e, t) {
  var r = Tt(e), n = [];
  if (r) {
    n.length = e.length;
    for (var a = 0; a < e.length; a++)
      n[a] = ve(e, a) ? t(e[a], e) : "";
  }
  var o = typeof mt == "function" ? mt(e) : [], l;
  if (Ce) {
    l = {};
    for (var i = 0; i < o.length; i++)
      l["$" + o[i]] = o[i];
  }
  for (var s in e)
    !ve(e, s) || r && String(Number(s)) === s && s < e.length || Ce && l["$" + s] instanceof Symbol || (Jr.call(/[^\w$]/, s) ? n.push(t(s, e) + ": " + t(e[s], e)) : n.push(s + ": " + t(e[s], e)));
  if (typeof mt == "function")
    for (var u = 0; u < o.length; u++)
      Kr.call(e, o[u]) && n.push("[" + t(o[u]) + "]: " + t(e[o[u]], e));
  return n;
}
var Yt = qt, Te = Xo, Da = va, Ta = Yt("%TypeError%"), Qe = Yt("%WeakMap%", !0), Je = Yt("%Map%", !0), La = Te("WeakMap.prototype.get", !0), Ma = Te("WeakMap.prototype.set", !0), Ra = Te("WeakMap.prototype.has", !0), Ia = Te("Map.prototype.get", !0), Ba = Te("Map.prototype.set", !0), ja = Te("Map.prototype.has", !0), Zt = function(e, t) {
  for (var r = e, n; (n = r.next) !== null; r = n)
    if (n.key === t)
      return r.next = n.next, n.next = e.next, e.next = n, n;
}, Va = function(e, t) {
  var r = Zt(e, t);
  return r && r.value;
}, Ua = function(e, t, r) {
  var n = Zt(e, t);
  n ? n.value = r : e.next = {
    key: t,
    next: e.next,
    value: r
  };
}, Ha = function(e, t) {
  return !!Zt(e, t);
}, za = function() {
  var t, r, n, a = {
    assert: function(o) {
      if (!a.has(o))
        throw new Ta("Side channel does not contain " + Da(o));
    },
    get: function(o) {
      if (Qe && o && (typeof o == "object" || typeof o == "function")) {
        if (t)
          return La(t, o);
      } else if (Je) {
        if (r)
          return Ia(r, o);
      } else if (n)
        return Va(n, o);
    },
    has: function(o) {
      if (Qe && o && (typeof o == "object" || typeof o == "function")) {
        if (t)
          return Ra(t, o);
      } else if (Je) {
        if (r)
          return ja(r, o);
      } else if (n)
        return Ha(n, o);
      return !1;
    },
    set: function(o, l) {
      Qe && o && (typeof o == "object" || typeof o == "function") ? (t || (t = new Qe()), Ma(t, o, l)) : Je ? (r || (r = new Je()), Ba(r, o, l)) : (n || (n = { key: {}, next: null }), Ua(n, o, l));
    }
  };
  return a;
}, Wa = String.prototype.replace, Ga = /%20/g, ht = {
  RFC1738: "RFC1738",
  RFC3986: "RFC3986"
}, Xt = {
  default: ht.RFC3986,
  formatters: {
    RFC1738: function(e) {
      return Wa.call(e, Ga, "+");
    },
    RFC3986: function(e) {
      return String(e);
    }
  },
  RFC1738: ht.RFC1738,
  RFC3986: ht.RFC3986
}, qa = Xt, bt = Object.prototype.hasOwnProperty, we = Array.isArray, oe = function() {
  for (var e = [], t = 0; t < 256; ++t)
    e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
  return e;
}(), Qa = function(t) {
  for (; t.length > 1; ) {
    var r = t.pop(), n = r.obj[r.prop];
    if (we(n)) {
      for (var a = [], o = 0; o < n.length; ++o)
        typeof n[o] < "u" && a.push(n[o]);
      r.obj[r.prop] = a;
    }
  }
}, tn = function(t, r) {
  for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = 0; a < t.length; ++a)
    typeof t[a] < "u" && (n[a] = t[a]);
  return n;
}, Ja = function e(t, r, n) {
  if (!r)
    return t;
  if (typeof r != "object") {
    if (we(t))
      t.push(r);
    else if (t && typeof t == "object")
      (n && (n.plainObjects || n.allowPrototypes) || !bt.call(Object.prototype, r)) && (t[r] = !0);
    else
      return [t, r];
    return t;
  }
  if (!t || typeof t != "object")
    return [t].concat(r);
  var a = t;
  return we(t) && !we(r) && (a = tn(t, n)), we(t) && we(r) ? (r.forEach(function(o, l) {
    if (bt.call(t, l)) {
      var i = t[l];
      i && typeof i == "object" && o && typeof o == "object" ? t[l] = e(i, o, n) : t.push(o);
    } else
      t[l] = o;
  }), t) : Object.keys(r).reduce(function(o, l) {
    var i = r[l];
    return bt.call(o, l) ? o[l] = e(o[l], i, n) : o[l] = i, o;
  }, a);
}, Ka = function(t, r) {
  return Object.keys(r).reduce(function(n, a) {
    return n[a] = r[a], n;
  }, t);
}, Ya = function(e, t, r) {
  var n = e.replace(/\+/g, " ");
  if (r === "iso-8859-1")
    return n.replace(/%[0-9a-f]{2}/gi, unescape);
  try {
    return decodeURIComponent(n);
  } catch {
    return n;
  }
}, Za = function(t, r, n, a, o) {
  if (t.length === 0)
    return t;
  var l = t;
  if (typeof t == "symbol" ? l = Symbol.prototype.toString.call(t) : typeof t != "string" && (l = String(t)), n === "iso-8859-1")
    return escape(l).replace(/%u[0-9a-f]{4}/gi, function(c) {
      return "%26%23" + parseInt(c.slice(2), 16) + "%3B";
    });
  for (var i = "", s = 0; s < l.length; ++s) {
    var u = l.charCodeAt(s);
    if (u === 45 || u === 46 || u === 95 || u === 126 || u >= 48 && u <= 57 || u >= 65 && u <= 90 || u >= 97 && u <= 122 || o === qa.RFC1738 && (u === 40 || u === 41)) {
      i += l.charAt(s);
      continue;
    }
    if (u < 128) {
      i = i + oe[u];
      continue;
    }
    if (u < 2048) {
      i = i + (oe[192 | u >> 6] + oe[128 | u & 63]);
      continue;
    }
    if (u < 55296 || u >= 57344) {
      i = i + (oe[224 | u >> 12] + oe[128 | u >> 6 & 63] + oe[128 | u & 63]);
      continue;
    }
    s += 1, u = 65536 + ((u & 1023) << 10 | l.charCodeAt(s) & 1023), i += oe[240 | u >> 18] + oe[128 | u >> 12 & 63] + oe[128 | u >> 6 & 63] + oe[128 | u & 63];
  }
  return i;
}, Xa = function(t) {
  for (var r = [{ obj: { o: t }, prop: "o" }], n = [], a = 0; a < r.length; ++a)
    for (var o = r[a], l = o.obj[o.prop], i = Object.keys(l), s = 0; s < i.length; ++s) {
      var u = i[s], c = l[u];
      typeof c == "object" && c !== null && n.indexOf(c) === -1 && (r.push({ obj: l, prop: u }), n.push(c));
    }
  return Qa(r), t;
}, el = function(t) {
  return Object.prototype.toString.call(t) === "[object RegExp]";
}, tl = function(t) {
  return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
}, rl = function(t, r) {
  return [].concat(t, r);
}, nl = function(t, r) {
  if (we(t)) {
    for (var n = [], a = 0; a < t.length; a += 1)
      n.push(r(t[a]));
    return n;
  }
  return r(t);
}, rn = {
  arrayToObject: tn,
  assign: Ka,
  combine: rl,
  compact: Xa,
  decode: Ya,
  encode: Za,
  isBuffer: tl,
  isRegExp: el,
  maybeMap: nl,
  merge: Ja
}, nn = za, Mt = rn, Ve = Xt, ol = Object.prototype.hasOwnProperty, br = {
  brackets: function(t) {
    return t + "[]";
  },
  comma: "comma",
  indices: function(t, r) {
    return t + "[" + r + "]";
  },
  repeat: function(t) {
    return t;
  }
}, ie = Array.isArray, al = String.prototype.split, ll = Array.prototype.push, on = function(e, t) {
  ll.apply(e, ie(t) ? t : [t]);
}, il = Date.prototype.toISOString, wr = Ve.default, R = {
  addQueryPrefix: !1,
  allowDots: !1,
  charset: "utf-8",
  charsetSentinel: !1,
  delimiter: "&",
  encode: !0,
  encoder: Mt.encode,
  encodeValuesOnly: !1,
  format: wr,
  formatter: Ve.formatters[wr],
  indices: !1,
  serializeDate: function(t) {
    return il.call(t);
  },
  skipNulls: !1,
  strictNullHandling: !1
}, sl = function(t) {
  return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
}, wt = {}, ul = function e(t, r, n, a, o, l, i, s, u, c, d, f, y, v, $, N) {
  for (var b = t, I = N, G = 0, ne = !1; (I = I.get(wt)) !== void 0 && !ne; ) {
    var K = I.get(t);
    if (G += 1, typeof K < "u") {
      if (K === G)
        throw new RangeError("Cyclic object value");
      ne = !0;
    }
    typeof I.get(wt) > "u" && (G = 0);
  }
  if (typeof s == "function" ? b = s(r, b) : b instanceof Date ? b = d(b) : n === "comma" && ie(b) && (b = Mt.maybeMap(b, function(it) {
    return it instanceof Date ? d(it) : it;
  })), b === null) {
    if (o)
      return i && !v ? i(r, R.encoder, $, "key", f) : r;
    b = "";
  }
  if (sl(b) || Mt.isBuffer(b)) {
    if (i) {
      var U = v ? r : i(r, R.encoder, $, "key", f);
      if (n === "comma" && v) {
        for (var _ = al.call(String(b), ","), O = "", E = 0; E < _.length; ++E)
          O += (E === 0 ? "" : ",") + y(i(_[E], R.encoder, $, "value", f));
        return [y(U) + (a && ie(b) && _.length === 1 ? "[]" : "") + "=" + O];
      }
      return [y(U) + "=" + y(i(b, R.encoder, $, "value", f))];
    }
    return [y(r) + "=" + y(String(b))];
  }
  var P = [];
  if (typeof b > "u")
    return P;
  var k;
  if (n === "comma" && ie(b))
    k = [{ value: b.length > 0 ? b.join(",") || null : void 0 }];
  else if (ie(s))
    k = s;
  else {
    var B = Object.keys(b);
    k = u ? B.sort(u) : B;
  }
  for (var z = a && ie(b) && b.length === 1 ? r + "[]" : r, L = 0; L < k.length; ++L) {
    var j = k[L], fe = typeof j == "object" && typeof j.value < "u" ? j.value : b[j];
    if (!(l && fe === null)) {
      var Le = ie(b) ? typeof n == "function" ? n(z, j) : z : z + (c ? "." + j : "[" + j + "]");
      N.set(t, G);
      var er = nn();
      er.set(wt, N), on(P, e(
        fe,
        Le,
        n,
        a,
        o,
        l,
        i,
        s,
        u,
        c,
        d,
        f,
        y,
        v,
        $,
        er
      ));
    }
  }
  return P;
}, cl = function(t) {
  if (!t)
    return R;
  if (t.encoder !== null && typeof t.encoder < "u" && typeof t.encoder != "function")
    throw new TypeError("Encoder has to be a function.");
  var r = t.charset || R.charset;
  if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var n = Ve.default;
  if (typeof t.format < "u") {
    if (!ol.call(Ve.formatters, t.format))
      throw new TypeError("Unknown format option provided.");
    n = t.format;
  }
  var a = Ve.formatters[n], o = R.filter;
  return (typeof t.filter == "function" || ie(t.filter)) && (o = t.filter), {
    addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : R.addQueryPrefix,
    allowDots: typeof t.allowDots > "u" ? R.allowDots : !!t.allowDots,
    charset: r,
    charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : R.charsetSentinel,
    delimiter: typeof t.delimiter > "u" ? R.delimiter : t.delimiter,
    encode: typeof t.encode == "boolean" ? t.encode : R.encode,
    encoder: typeof t.encoder == "function" ? t.encoder : R.encoder,
    encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : R.encodeValuesOnly,
    filter: o,
    format: n,
    formatter: a,
    serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : R.serializeDate,
    skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : R.skipNulls,
    sort: typeof t.sort == "function" ? t.sort : null,
    strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : R.strictNullHandling
  };
}, fl = function(e, t) {
  var r = e, n = cl(t), a, o;
  typeof n.filter == "function" ? (o = n.filter, r = o("", r)) : ie(n.filter) && (o = n.filter, a = o);
  var l = [];
  if (typeof r != "object" || r === null)
    return "";
  var i;
  t && t.arrayFormat in br ? i = t.arrayFormat : t && "indices" in t ? i = t.indices ? "indices" : "repeat" : i = "indices";
  var s = br[i];
  if (t && "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
    throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  var u = s === "comma" && t && t.commaRoundTrip;
  a || (a = Object.keys(r)), n.sort && a.sort(n.sort);
  for (var c = nn(), d = 0; d < a.length; ++d) {
    var f = a[d];
    n.skipNulls && r[f] === null || on(l, ul(
      r[f],
      f,
      s,
      u,
      n.strictNullHandling,
      n.skipNulls,
      n.encode ? n.encoder : null,
      n.filter,
      n.sort,
      n.allowDots,
      n.serializeDate,
      n.format,
      n.formatter,
      n.encodeValuesOnly,
      n.charset,
      c
    ));
  }
  var y = l.join(n.delimiter), v = n.addQueryPrefix === !0 ? "?" : "";
  return n.charsetSentinel && (n.charset === "iso-8859-1" ? v += "utf8=%26%2310003%3B&" : v += "utf8=%E2%9C%93&"), y.length > 0 ? v + y : "";
}, Ne = rn, Rt = Object.prototype.hasOwnProperty, dl = Array.isArray, M = {
  allowDots: !1,
  allowPrototypes: !1,
  allowSparse: !1,
  arrayLimit: 20,
  charset: "utf-8",
  charsetSentinel: !1,
  comma: !1,
  decoder: Ne.decode,
  delimiter: "&",
  depth: 5,
  ignoreQueryPrefix: !1,
  interpretNumericEntities: !1,
  parameterLimit: 1e3,
  parseArrays: !0,
  plainObjects: !1,
  strictNullHandling: !1
}, pl = function(e) {
  return e.replace(/&#(\d+);/g, function(t, r) {
    return String.fromCharCode(parseInt(r, 10));
  });
}, an = function(e, t) {
  return e && typeof e == "string" && t.comma && e.indexOf(",") > -1 ? e.split(",") : e;
}, vl = "utf8=%26%2310003%3B", yl = "utf8=%E2%9C%93", ml = function(t, r) {
  var n = {}, a = r.ignoreQueryPrefix ? t.replace(/^\?/, "") : t, o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, l = a.split(r.delimiter, o), i = -1, s, u = r.charset;
  if (r.charsetSentinel)
    for (s = 0; s < l.length; ++s)
      l[s].indexOf("utf8=") === 0 && (l[s] === yl ? u = "utf-8" : l[s] === vl && (u = "iso-8859-1"), i = s, s = l.length);
  for (s = 0; s < l.length; ++s)
    if (s !== i) {
      var c = l[s], d = c.indexOf("]="), f = d === -1 ? c.indexOf("=") : d + 1, y, v;
      f === -1 ? (y = r.decoder(c, M.decoder, u, "key"), v = r.strictNullHandling ? null : "") : (y = r.decoder(c.slice(0, f), M.decoder, u, "key"), v = Ne.maybeMap(
        an(c.slice(f + 1), r),
        function($) {
          return r.decoder($, M.decoder, u, "value");
        }
      )), v && r.interpretNumericEntities && u === "iso-8859-1" && (v = pl(v)), c.indexOf("[]=") > -1 && (v = dl(v) ? [v] : v), Rt.call(n, y) ? n[y] = Ne.combine(n[y], v) : n[y] = v;
    }
  return n;
}, gl = function(e, t, r, n) {
  for (var a = n ? t : an(t, r), o = e.length - 1; o >= 0; --o) {
    var l, i = e[o];
    if (i === "[]" && r.parseArrays)
      l = [].concat(a);
    else {
      l = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      var s = i.charAt(0) === "[" && i.charAt(i.length - 1) === "]" ? i.slice(1, -1) : i, u = parseInt(s, 10);
      !r.parseArrays && s === "" ? l = { 0: a } : !isNaN(u) && i !== s && String(u) === s && u >= 0 && r.parseArrays && u <= r.arrayLimit ? (l = [], l[u] = a) : s !== "__proto__" && (l[s] = a);
    }
    a = l;
  }
  return a;
}, hl = function(t, r, n, a) {
  if (!!t) {
    var o = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, l = /(\[[^[\]]*])/, i = /(\[[^[\]]*])/g, s = n.depth > 0 && l.exec(o), u = s ? o.slice(0, s.index) : o, c = [];
    if (u) {
      if (!n.plainObjects && Rt.call(Object.prototype, u) && !n.allowPrototypes)
        return;
      c.push(u);
    }
    for (var d = 0; n.depth > 0 && (s = i.exec(o)) !== null && d < n.depth; ) {
      if (d += 1, !n.plainObjects && Rt.call(Object.prototype, s[1].slice(1, -1)) && !n.allowPrototypes)
        return;
      c.push(s[1]);
    }
    return s && c.push("[" + o.slice(s.index) + "]"), gl(c, r, n, a);
  }
}, bl = function(t) {
  if (!t)
    return M;
  if (t.decoder !== null && t.decoder !== void 0 && typeof t.decoder != "function")
    throw new TypeError("Decoder has to be a function.");
  if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var r = typeof t.charset > "u" ? M.charset : t.charset;
  return {
    allowDots: typeof t.allowDots > "u" ? M.allowDots : !!t.allowDots,
    allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes : M.allowPrototypes,
    allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse : M.allowSparse,
    arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit : M.arrayLimit,
    charset: r,
    charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : M.charsetSentinel,
    comma: typeof t.comma == "boolean" ? t.comma : M.comma,
    decoder: typeof t.decoder == "function" ? t.decoder : M.decoder,
    delimiter: typeof t.delimiter == "string" || Ne.isRegExp(t.delimiter) ? t.delimiter : M.delimiter,
    depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth : M.depth,
    ignoreQueryPrefix: t.ignoreQueryPrefix === !0,
    interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities : M.interpretNumericEntities,
    parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit : M.parameterLimit,
    parseArrays: t.parseArrays !== !1,
    plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : M.plainObjects,
    strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : M.strictNullHandling
  };
}, wl = function(e, t) {
  var r = bl(t);
  if (e === "" || e === null || typeof e > "u")
    return r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  for (var n = typeof e == "string" ? ml(e, r) : e, a = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = Object.keys(n), l = 0; l < o.length; ++l) {
    var i = o[l], s = hl(i, n[i], r, typeof e == "string");
    a = Ne.merge(a, s, r);
  }
  return r.allowSparse === !0 ? a : Ne.compact(a);
}, Sl = fl, xl = wl, _l = Xt, Sr = {
  formats: _l,
  parse: xl,
  stringify: Sl
};
const Ol = ["onClick"], $l = /* @__PURE__ */ Ye(" Filter "), El = /* @__PURE__ */ p("span", { class: "block h-4 border-r border-gray-400" }, null, -1), Al = { class: "text-primary-700 font-semibold" }, Pl = {
  key: 1,
  class: "-top-1/2 mt-1 right-0 absolute"
}, kl = /* @__PURE__ */ p("div", { class: "relative inline-flex items-center justify-center" }, [
  /* @__PURE__ */ p("div", { class: "absolute block w-4 h-4 bg-primary-100 rounded-full" }),
  /* @__PURE__ */ p("div", { class: "absolute block w-3 h-3 bg-primary-300 rounded-full" }),
  /* @__PURE__ */ p("div", { class: "absolute block w-2 h-2 bg-primary-600 rounded-full" })
], -1), Fl = [
  kl
], Cl = {
  key: 0,
  class: "flex flex-col bg-white w-64 absolute z-10 mt-2 right-0 rounded-md border border-gray-200"
}, Nl = { class: "w-full grid grid-cols-3 bg-gray-50 rounded-t border-b p-2" }, Dl = { class: "flex justify-start items-center" }, Tl = ["onClick"], Ll = /* @__PURE__ */ p("div", { class: "flex justify-center items-center" }, [
  /* @__PURE__ */ p("span", { class: "text-sm font-semibold text-gray-700" }, "Filter")
], -1), Ml = { class: "flex justify-end items-center" }, Rl = ["onClick"], Il = /* @__PURE__ */ x({
  __name: "Filter",
  props: {
    filterables: null,
    initialValue: null
  },
  setup(e) {
    const t = e, r = w(!1), n = w(), a = w([]), o = Eo(t.filterables, t.initialValue), l = () => {
      t.filterables.forEach((f) => {
        o[f.id].selected = t.initialValue[f.id].selected, o[f.id].value = t.initialValue[f.id].value;
      });
    }, i = () => {
      const f = d.value;
      t.filterables.forEach((v) => {
        o[v.id].selected = !1;
      });
      const y = d.value;
      f != y && s();
    }, s = () => {
      const f = Sr.parse(window.location.search.replace("?", ""));
      t.filterables.forEach(($, N) => {
        const b = a.value[N];
        if (!o[$.id].selected) {
          typeof b.removeFilterValueFromQuery == "function" ? b.removeFilterValueFromQuery(f) : delete f[$.id];
          return;
        }
        const I = o[$.id].value;
        typeof b.setFilterValueOnQuery == "function" ? b.setFilterValueOnQuery(f, I) : f[$.id] = I;
      });
      let y = window.location.href.split("?")[0];
      const v = Sr.stringify(f);
      v && v.length > 0 && (y = `${y}?${v}`), r.value = !1, gn.visit(y);
    }, u = () => {
      l(), r.value = !1;
    }, c = () => {
      if (!r.value) {
        r.value = !0;
        return;
      }
      u();
    };
    xo("click", (f) => {
      !n.value.contains(f.target) && r.value && u();
    }), $o(() => {
      r.value && u();
    });
    const d = A(() => t.filterables.filter((f) => o[f.id].selected).length);
    return (f, y) => (m(), h("div", {
      ref_key: "filterEl",
      ref: n,
      class: "relative"
    }, [
      p("button", {
        class: "relative btn gap-2 inline-flex items-center",
        onClick: Z(c, ["prevent"])
      }, [
        D(g(So), { class: "w-4 h-4" }),
        $l,
        g(d) > 0 ? (m(), h(te, { key: 0 }, [
          El,
          p("span", Al, Y(g(d)), 1)
        ], 64)) : W("", !0),
        g(d) > 0 ? (m(), h("span", Pl, Fl)) : W("", !0)
      ], 8, Ol),
      D(pn, {
        "enter-active-class": "transition duration-200 ease-out",
        "enter-from-class": "transform scale-95 opacity-0",
        "enter-to-class": "transform scale-100 opacity-100",
        "leave-active-class": "transition duration-200 ease-out",
        "leave-from-class": "transform scale-100 opacity-100",
        "leave-to-class": "transform scale-95 opacity-0"
      }, {
        default: C(() => [
          r.value ? (m(), h("div", Cl, [
            p("div", Nl, [
              p("div", Dl, [
                p("button", {
                  onClick: Z(i, ["prevent"]),
                  class: "btn bg-white hover:bg-gray-50 text-xs px-2 py-1"
                }, "Clear", 8, Tl)
              ]),
              Ll,
              p("div", Ml, [
                p("button", {
                  onClick: Z(s, ["prevent"]),
                  class: "btn primary small text-xs"
                }, " Apply ", 8, Rl)
              ])
            ]),
            (m(!0), h(te, null, xe(e.filterables, (v, $) => (m(), T(Fo, {
              id: v.id,
              name: v.title,
              modelValue: g(o)[v.id].selected,
              "onUpdate:modelValue": (N) => g(o)[v.id].selected = N,
              "is-last": $ + 1 === e.filterables.length
            }, {
              default: C(() => [
                D(g(Q), {
                  ref_for: !0,
                  ref_key: "filterableComponents",
                  ref: a,
                  component: v,
                  modelValue: g(o)[v.id].value,
                  "onUpdate:modelValue": (N) => g(o)[v.id].value = N
                }, null, 8, ["component", "modelValue", "onUpdate:modelValue"])
              ]),
              _: 2
            }, 1032, ["id", "name", "modelValue", "onUpdate:modelValue", "is-last"]))), 256))
          ])) : W("", !0)
        ]),
        _: 1
      })
    ], 512));
  }
}), Bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Il
}, Symbol.toStringTag, { value: "Module" })), jl = { class: "flex flex-col w-full px-2 py-1" }, Vl = { class: "inline-flex flex-row items-center py-0.5" }, Ul = ["onUpdate:modelValue", "id"], Hl = ["for"], zl = /* @__PURE__ */ x({
  __name: "BooleanFilterable",
  props: {
    id: null,
    options: null,
    modelValue: null
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const r = e, n = It(
      r.options.map((a) => ({ option: a, selected: r.modelValue.includes(a.id) }))
    );
    return ce(n, (a) => {
      t("update:modelValue", a.filter((o) => o.selected).map((o) => o.option.id).sort());
    }), t("update:modelValue", n.filter((a) => a.selected).map((a) => a.option.id).sort()), (a, o) => (m(), h("div", jl, [
      (m(!0), h(te, null, xe(n, (l) => (m(), h("div", Vl, [
        Bt(p("input", {
          "onUpdate:modelValue": (i) => l.selected = i,
          id: `checkbox-option-${e.id}-${l.option.id}`,
          type: "checkbox"
        }, null, 8, Ul), [
          [vn, l.selected]
        ]),
        p("label", {
          class: "text-sm text-gray-700 ml-2",
          for: `checkbox-option-${e.id}-${l.option.id}`
        }, Y(l.option.title), 9, Hl)
      ]))), 256))
    ]));
  }
}), Wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: zl
}, Symbol.toStringTag, { value: "Module" })), Gl = { class: "px-4 py-3" }, ql = ["value"], Ql = /* @__PURE__ */ x({
  __name: "SelectFilterable",
  props: {
    id: null,
    options: null,
    modelValue: null
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const r = e, n = w(r.modelValue === null ? r.options[0].id : r.modelValue);
    r.modelValue === null && t("update:modelValue", n.value);
    const a = () => {
      t("update:modelValue", n.value);
    };
    return ce(r, (o) => {
      r.modelValue !== o.modelValue && (n.value = o.modelValue === null ? o.options[0].id : o.modelValue, t("update:modelValue", n.value));
    }), (o, l) => (m(), h("div", Gl, [
      Bt(p("select", {
        onChange: a,
        "onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
        class: "w-full text-xs px-2 py-1"
      }, [
        (m(!0), h(te, null, xe(e.options, (i) => (m(), h("option", {
          value: i.id
        }, Y(i.title), 9, ql))), 256))
      ], 544), [
        [yn, n.value]
      ])
    ]));
  }
}), Jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Ql
}, Symbol.toStringTag, { value: "Module" })), Kl = { class: "bg-white grid grid-cols-5 h-16 border-b border-gray-200 px-4" }, Yl = { class: "lg:col-span-2 flex flex-row items-center" }, Zl = /* @__PURE__ */ p("div", { class: "hidden lg:inline-flex items-center" }, [
  /* @__PURE__ */ p("svg", {
    class: "w-8 h-8 mr-2 text-primary-500",
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 54.1 54.1",
    "xml:space": "preserve"
  }, [
    /* @__PURE__ */ p("path", {
      fill: "currentColor",
      d: "M27,0C12.1,0,0,12.1,0,27c0,14.9,12.1,27,27,27c14.9,0,27-12.1,27-27C54,12.1,41.9,0,27,0z M43.3,19l-8.1,1.8l-8,1.8l8,1.8v7.3v0V39L27,40.8l-8.1,1.8v-7.3l8.1-1.8l8-1.8l-8-1.8l-8.1-1.8l-8.1-1.8v0v-7.3v0l8.1-1.8l8.1-1.8l8.1-1.8l8.1-1.8V19z"
    })
  ]),
  /* @__PURE__ */ p("span", { class: "text-black font-medium text-lg" }, "Insight")
], -1), Xl = /* @__PURE__ */ p("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  fill: "none",
  viewBox: "0 0 24 24",
  "stroke-width": "1.5",
  stroke: "currentColor",
  class: "w-6 h-6"
}, [
  /* @__PURE__ */ p("path", {
    "stroke-linecap": "round",
    "stroke-linejoin": "round",
    d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"
  })
], -1), ei = [
  Xl
], ti = { class: "hidden lg:block ml-4" }, ri = { class: "col-span-3 lg:col-span-1 flex flex-row items-center justify-center" }, ni = /* @__PURE__ */ p("span", { class: "inline-flex items-center text-gray-500" }, [
  /* @__PURE__ */ p("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    fill: "none",
    viewBox: "0 0 24 24",
    "stroke-width": "1.5",
    stroke: "currentColor",
    class: "w-6 h-6"
  }, [
    /* @__PURE__ */ p("path", {
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      d: "M15.75 15.75l-2.489-2.489m0 0a3.375 3.375 0 10-4.773-4.773 3.375 3.375 0 004.774 4.774zM21 12a9 9 0 11-18 0 9 9 0 0118 0z"
    })
  ]),
  /* @__PURE__ */ p("span", { class: "text-sm ml-2" }, "Search\u2026")
], -1), oi = { class: "inline-flex items-center space-x-2" }, ai = {
  key: 0,
  class: "text-xs font-sans text-gray-400 border rounded px-2"
}, li = {
  key: 1,
  class: "text-xs font-sans text-gray-400 border rounded px-2"
}, ii = { class: "lg:col-span-2 flex flex-row items-center justify-end" }, si = { class: "hidden lg:block mr-2" }, ui = { key: 0 }, ci = { class: "gap-2 inline-flex items-center hover:bg-primary-50 text-sm text-gray-900 hover:text-primary-700 font-medium py-1 px-2 rounded-lg transition-colors duration-300" }, fi = ["src"], di = {
  key: 1,
  class: "w-8 h-8 flex items-center justify-center bg-primary-100 rounded-full text-primary-700"
}, pi = /* @__PURE__ */ p("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  fill: "none",
  viewBox: "0 0 24 24",
  "stroke-width": "1.5",
  stroke: "currentColor",
  class: "w-6 h-6"
}, [
  /* @__PURE__ */ p("path", {
    "stroke-linecap": "round",
    "stroke-linejoin": "round",
    d: "M17.982 18.725A7.488 7.488 0 0012 15.75a7.488 7.488 0 00-5.982 2.975m11.963 0a9 9 0 10-11.963 0m11.963 0A8.966 8.966 0 0112 21a8.966 8.966 0 01-5.982-2.275M15 9.75a3 3 0 11-6 0 3 3 0 016 0z"
  })
], -1), vi = [
  pi
], yi = { key: 2 }, mi = /* @__PURE__ */ x({
  __name: "Header",
  props: {
    mobileOpen: { type: Boolean, default: !1 },
    leftNavigation: null,
    rightNavigation: null,
    userNavigation: null,
    user: null,
    showSearch: { type: Boolean, default: !1 }
  },
  emits: ["toggleDrawer", "toggleSearch"],
  setup(e, { emit: t }) {
    const r = e, n = A(() => !!(r.userNavigation && r.userNavigation.items.length > 0)), a = A(() => navigator.platform.toUpperCase().indexOf("MAC") >= 0);
    return (o, l) => (m(), h("div", Kl, [
      p("div", Yl, [
        Zl,
        p("button", {
          onClick: l[0] || (l[0] = Z((i) => t("toggleDrawer"), ["prevent"])),
          class: q(["lg:hidden rounded-lg p-2 transition-colors duration-300", [e.mobileOpen ? "text-primary-700 bg-primary-100" : "hover:bg-primary-100 hover:text-primary-700"]])
        }, ei, 2),
        p("div", ti, [
          X(o.$slots, "left-navigation", {}, () => [
            e.leftNavigation ? (m(), T(g(Q), {
              key: 0,
              component: e.leftNavigation
            }, null, 8, ["component"])) : W("", !0)
          ])
        ])
      ]),
      p("div", ri, [
        X(o.$slots, "center", {}, () => [
          e.showSearch ? (m(), h("button", {
            key: 0,
            onClick: l[1] || (l[1] = Z((i) => t("toggleSearch"), ["prevent"])),
            class: "w-full max-w-xs flex justify-between items-center border border-gray-300 rounded-lg px-2 py-2"
          }, [
            ni,
            p("div", oi, [
              g(a) ? (m(), h("kbd", ai, "\u2318K")) : (m(), h("kbd", li, "CTRL+K"))
            ])
          ])) : W("", !0)
        ])
      ]),
      p("div", ii, [
        p("div", si, [
          X(o.$slots, "right-navigation", {}, () => [
            e.rightNavigation ? (m(), T(g(Q), {
              key: 0,
              component: e.rightNavigation
            }, null, 8, ["component"])) : W("", !0)
          ])
        ]),
        g(n) ? (m(), h("div", ui, [
          D(g(jt), {
            class: "w-48",
            placement: "bottom-right"
          }, {
            toggle: C(() => {
              var i, s, u;
              return [
                p("button", ci, [
                  (i = e.user) != null && i.profilePhotoUrl ? (m(), h("img", {
                    key: 0,
                    class: "w-8 h-8 rounded-full",
                    src: e.user.profilePhotoUrl
                  }, null, 8, fi)) : (m(), h("div", di, vi)),
                  ((s = e.user) == null ? void 0 : s.name) && ((u = e.user) == null ? void 0 : u.shouldShowName) ? (m(), h("span", yi, Y(e.user.name), 1)) : W("", !0)
                ])
              ];
            }),
            default: C(() => [
              e.userNavigation ? (m(!0), h(te, { key: 0 }, xe(e.userNavigation.items, (i) => (m(), T(g(Vt), { as: "template" }, {
                default: C(({ active: s, close: u }) => [
                  D(g(Er), ot({
                    onClick: u,
                    class: "menu-item flex w-full"
                  }, i.link, {
                    "is-active": i.link.isActive || s
                  }), null, 16, ["onClick", "is-active"])
                ]),
                _: 2
              }, 1024))), 256)) : W("", !0)
            ]),
            _: 1
          })
        ])) : W("", !0)
      ])
    ]));
  }
}), gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: mi
}, Symbol.toStringTag, { value: "Module" })), hi = { class: "flex flex-row" }, bi = /* @__PURE__ */ p("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 20 20",
  fill: "currentColor",
  class: "w-5 h-5 ml-0.5"
}, [
  /* @__PURE__ */ p("path", {
    "fill-rule": "evenodd",
    d: "M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",
    "clip-rule": "evenodd"
  })
], -1), wi = /* @__PURE__ */ x({
  __name: "HeaderNavigation",
  props: {
    navigation: null
  },
  setup(e) {
    const t = e, r = A(() => t.navigation), { navigation: n } = zr(r);
    return (a, o) => (m(), h("ul", hi, [
      (m(!0), h(te, null, xe(g(n).items, (l) => (m(), h("li", null, [
        l.childNavigation ? (m(), T(g(jt), {
          key: 0,
          class: "w-48"
        }, {
          toggle: C(() => [
            p("button", {
              class: q(["inline-flex items-center text-sm font-medium text-gray-700 px-3 py-2 rounded-lg transition-colors duration-150", [l.isActive.value || l.childNavigation.childActive.value ? "bg-primary-50 text-primary-700" : "hover:text-gray-600"]])
            }, [
              Ye(Y(l.item.link.title) + " ", 1),
              bi
            ], 2)
          ]),
          default: C(() => [
            (m(!0), h(te, null, xe(l.childNavigation.items, (i) => (m(), T(g(Vt), { as: "template" }, {
              default: C(() => [
                D(g(Q), {
                  class: q(["menu-item", { "bg-primary-50 text-primary-700": i.isActive.value }]),
                  component: i.item.link
                }, null, 8, ["component", "class"])
              ]),
              _: 2
            }, 1024))), 256))
          ]),
          _: 2
        }, 1024)) : (m(), T(g(Q), {
          key: 1,
          class: q(["text-sm font-medium text-gray-700 px-3 py-2 rounded-lg transition-colors duration-150 flex", { "bg-primary-50 text-primary-700": l.isActive.value }]),
          component: l.item.link
        }, null, 8, ["class", "component"]))
      ]))), 256))
    ]));
  }
}), Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: wi
}, Symbol.toStringTag, { value: "Module" }));
function xr(e, t) {
  const r = t ? t[e] : void 0;
  if (!r)
    throw new Error(`The Heroicon [${e}] could not be rendered. Source is missing.`);
  const n = document.createElement("template");
  n.innerHTML = r;
  const a = n.content.firstChild, o = {};
  return Array.from(a.getAttributeNames()).forEach((l) => {
    l && (o[l] = a.getAttribute(l));
  }), o.innerHTML = a.innerHTML, o;
}
const xi = x({
  props: {
    fullName: { type: String, required: !0 },
    dimensions: { type: String, required: !0 }
  },
  setup(e) {
    const t = Ar(), r = w(xr(e.fullName, t.props.value._heroicons));
    return ce(e, (n) => {
      r.value = xr(n.fullName, t.props.value._heroicons);
    }), () => F("svg", ot(r.value, { class: e.dimensions }));
  }
}), _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: xi
}, Symbol.toStringTag, { value: "Module" })), Oi = /* @__PURE__ */ x({
  __name: "Pressable",
  props: {
    content: null,
    type: { default: "primary" }
  },
  setup(e) {
    return (t, r) => (m(), h("div", {
      class: q(["inline-flex text-gray-600 rounded-md transition-colors duration-300 p-2", [`hover:bg-${e.type}-50`, `hover:text-${e.type}-600`]])
    }, [
      e.content ? (m(), T(g(Q), {
        key: 0,
        component: e.content
      }, null, 8, ["component"])) : X(t.$slots, "default", { key: 1 })
    ], 2));
  }
}), $i = /* @__PURE__ */ x({
  __name: "Menu",
  props: {
    navigation: null,
    toggle: null
  },
  setup(e) {
    return (t, r) => (m(), T(g(jt), {
      class: "w-48",
      placement: "bottom-right"
    }, {
      toggle: C(() => [
        p("button", null, [
          e.toggle ? (m(), T(g(Q), {
            key: 0,
            component: e.toggle
          }, null, 8, ["component"])) : (m(), T(Oi, { key: 1 }, {
            default: C(() => [
              D(g(wo), { class: "w-4 h-4" })
            ]),
            _: 1
          }))
        ])
      ]),
      default: C(() => [
        (m(!0), h(te, null, xe(e.navigation.items, (n) => (m(), T(g(Vt), { as: "template" }, {
          default: C(({ active: a, close: o }) => [
            D(g(Er), ot({
              onClick: o,
              class: "menu-item flex w-full"
            }, n.link, {
              "is-active": n.link.isActive || a
            }), null, 16, ["onClick", "is-active"])
          ]),
          _: 2
        }, 1024))), 256))
      ]),
      _: 1
    }));
  }
}), Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: $i
}, Symbol.toStringTag, { value: "Module" }));
x({
  props: {
    dialog: { type: Object, required: !0 }
  },
  setup(e, { slots: t }) {
    return () => F(ln, {
      visible: e.dialog.visible.value,
      onClose: () => e.dialog.close(!1),
      onClosed: () => e.dialog.hideContent()
    }, e.dialog.visibleContent.value ? t.default : void 0);
  }
});
const _r = w(null), Ke = w(!1), Or = [], St = [];
function Ai() {
  const e = (n, a = !1) => {
    if (!n.id) {
      console.warn("The dialog does not have identifier. Does the dialog extend the Dialog component?");
      return;
    }
    Or.includes(n.id) && !a || (St.push(n), t());
  }, t = () => {
    if (Ke.value || St.length <= 0)
      return;
    const n = St.shift();
    n && (_r.value = n, Or.push(n.id), Ke.value = !0);
  };
  return {
    pushDialogComponent: e,
    showNextDialog: t,
    dialog: _r,
    close: () => {
      Ke.value = !1;
    },
    isVisible: Ke
  };
}
const Pi = /* @__PURE__ */ p("div", { class: "fixed inset-0 bg-black bg-opacity-25" }, null, -1), ki = { class: "fixed inset-0 overflow-y-auto" }, Fi = { class: "flex min-h-full items-center justify-center p-4 text-center" }, ln = /* @__PURE__ */ x({
  __name: "DialogScreen",
  props: {
    visible: { type: Boolean }
  },
  emits: ["close", "closed"],
  setup(e, { emit: t }) {
    return (r, n) => (m(), T(g(Hr), {
      appear: "",
      show: e.visible,
      as: "template",
      onAfterLeave: n[1] || (n[1] = (a) => t("closed"))
    }, {
      default: C(() => [
        D(g(Xn), {
          as: "div",
          onClose: n[0] || (n[0] = (a) => t("close")),
          class: "relative z-50"
        }, {
          default: C(() => [
            D(g(Ft), {
              as: "template",
              enter: "duration-200 ease-out",
              "enter-from": "opacity-0",
              "enter-to": "opacity-100",
              leave: "duration-200 ease-in",
              "leave-from": "opacity-100",
              "leave-to": "opacity-0"
            }, {
              default: C(() => [
                Pi
              ]),
              _: 1
            }),
            p("div", ki, [
              p("div", Fi, [
                D(g(Ft), {
                  as: "template",
                  enter: "duration-200 ease-out",
                  "enter-from": "opacity-0 scale-95",
                  "enter-to": "opacity-100 scale-100",
                  leave: "duration-200 ease-in",
                  "leave-from": "opacity-100 scale-100",
                  "leave-to": "opacity-0 scale-95"
                }, {
                  default: C(() => [
                    X(r.$slots, "default")
                  ]),
                  _: 3
                })
              ])
            ])
          ]),
          _: 3
        })
      ]),
      _: 3
    }, 8, ["show"]));
  }
}), Ci = /* @__PURE__ */ x({
  __name: "DialogPortal",
  setup(e) {
    const t = Ar(), {
      pushDialogComponent: r,
      isVisible: n,
      close: a,
      dialog: o,
      showNextDialog: l
    } = Ai(), i = (s) => {
      s && r(s);
    };
    return ce(t.props, (s) => {
      i(s._dialog || null);
    }), i(t.props.value._dialog || null), (s, u) => (m(), T(ln, {
      visible: g(n),
      onClose: g(a),
      onClosed: g(l)
    }, {
      default: C(() => [
        g(o) ? (m(), T(g(Q), {
          key: 0,
          component: g(o),
          close: g(a)
        }, null, 8, ["component", "close"])) : W("", !0)
      ]),
      _: 1
    }, 8, ["visible", "onClose", "onClosed"]));
  }
});
function Ni(e, t, r) {
  if (r.childNavigation) {
    const n = [];
    return r.item.link.location == "#" ? n.push(
      F("button", {
        onClick: Z(() => {
          r.isExpanded.value = !r.isExpanded.value;
        }, ["prevent"])
      }, r.item.link.title)
    ) : n.push(
      F(Q, {
        component: r.item.link,
        onClick: Z(() => {
          r.isExpanded.value = !0;
        }, ["prevent"])
      })
    ), t && n.push(F(t, {
      toggle: () => {
        r.isExpanded.value = !r.isExpanded.value;
      }
    })), n.push(sn(e, t, r.childNavigation)), F("li", ot({
      class: { expanded: r.isExpanded.value, active: r.isActive.value }
    }), n);
  } else
    return F(e, { item: r.item, active: r.isActive });
}
function sn(e, t, r, n = {}) {
  const a = [];
  return r.items.forEach((o) => {
    a.push(Ni(e, t, o));
  }), F("ul", n, a);
}
const Di = x({
  props: {
    navigation: { type: Object, required: !0 }
  },
  setup(e, { slots: t }) {
    const r = t.item, n = t.caret;
    if (!r)
      throw new Error("The #item slot is missing from NavigationTree component.");
    const a = A(() => e.navigation), o = zr(a);
    return () => sn(r, n, o.navigation, { class: ["side-menu"] });
  }
}), Ti = { class: "px-4 pt-4" }, Li = ["onClick"], Mi = /* @__PURE__ */ p("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  fill: "none",
  viewBox: "0 0 24 24",
  "stroke-width": "1.5",
  stroke: "currentColor",
  class: "w-4 h-4"
}, [
  /* @__PURE__ */ p("path", {
    "stroke-linecap": "round",
    "stroke-linejoin": "round",
    d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
  })
], -1), Ri = [
  Mi
], Ii = /* @__PURE__ */ x({
  __name: "Drawer",
  props: {
    mobileOpen: { type: Boolean, default: !1 },
    navigation: null
  },
  emits: ["mobileClose"],
  setup(e, { emit: t }) {
    return (r, n) => (m(), h("div", {
      class: q(["fixed bg-white border-r border-gray-200 z-10 min-h-full h-full w-full sm:w-56 pt-16 lg:left-0 transition-all duration-300", [e.mobileOpen ? "left-0" : "-left-full sm:-left-56"]])
    }, [
      p("div", Ti, [
        D(Di, { navigation: e.navigation }, {
          item: C(({ item: a, active: o }) => [
            p("li", {
              class: q({ active: o.value })
            }, [
              D(g(Q), {
                component: a.link
              }, null, 8, ["component"])
            ], 2)
          ]),
          caret: C(({ toggle: a }) => [
            p("span", {
              onClick: Z(a, ["prevent"]),
              class: "caret"
            }, Ri, 8, Li)
          ]),
          _: 1
        }, 8, ["navigation"])
      ])
    ], 2));
  }
}), Bi = { class: "bg-white min-h-full" }, ji = { class: "fixed z-20 w-full" }, Vi = { class: "h-full min-w-max-content lg:pl-56 pt-16" }, Ui = /* @__PURE__ */ x({
  __name: "DrawerLayout",
  props: {
    header: null,
    navigation: null
  },
  setup(e) {
    const t = w(!1);
    return (r, n) => (m(), h("div", Bi, [
      X(r.$slots, "header", {}, () => [
        p("div", ji, [
          D(g(Q), {
            component: e.header,
            "mobile-open": t.value,
            onToggleDrawer: n[0] || (n[0] = (a) => t.value = !t.value)
          }, null, 8, ["component", "mobile-open"])
        ])
      ]),
      X(r.$slots, "sidebar", {}, () => [
        D(g(Ii), {
          "mobile-open": t.value,
          navigation: e.navigation
        }, null, 8, ["mobile-open", "navigation"])
      ]),
      p("div", Vi, [
        X(r.$slots, "default")
      ])
    ]));
  }
}), Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Ui
}, Symbol.toStringTag, { value: "Module" })), zi = /* @__PURE__ */ x({
  __name: "InsightLayout",
  setup(e) {
    return (t, r) => (m(), h(te, null, [
      X(t.$slots, "default"),
      D(g(Ci))
    ], 64));
  }
}), Wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: zi
}, Symbol.toStringTag, { value: "Module" })), Gi = { class: "w-full max-w-7xl mx-auto px-4 pt-12 pb-16" }, qi = { class: "inline-flex items-center gap-3 mb-6" }, Qi = { class: "font-semibold text-gray-900 text-xl" }, Ji = {
  key: 0,
  class: "badge danger"
}, Ki = /* @__PURE__ */ x({
  __name: "ResourceDetailLayout",
  props: {
    title: null,
    listResourcesLink: null,
    trashed: { type: Boolean },
    breadcrumbItems: null
  },
  setup(e) {
    return (t, r) => (m(), h("div", Gi, [
      e.breadcrumbItems ? (m(), T(g(hn), {
        key: 0,
        class: "mb-4",
        items: e.breadcrumbItems
      }, {
        separator: C(() => [
          D(g(bo), { class: "w-4 h-4 mx-2 text-gray-300" })
        ]),
        _: 1
      }, 8, ["items"])) : W("", !0),
      p("div", qi, [
        p("h4", Qi, Y(e.title), 1),
        e.trashed ? (m(), h("span", Ji, "Deleted")) : W("", !0)
      ]),
      X(t.$slots, "default")
    ]));
  }
}), Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Ki
}, Symbol.toStringTag, { value: "Module" }));
function ns(e = {}) {
  return mn(/* @__PURE__ */ Object.assign({ "./Pages/HomePage.vue": () => import("./HomePage.b373a727.mjs"), "./Pages/ListResourcesPage.vue": () => import("./ListResourcesPage.70e8645b.mjs"), "./Pages/ResourceFormPage.vue": () => import("./ResourceFormPage.b91ceef8.mjs"), "./Pages/ShowResourcePage.vue": () => import("./ShowResourcePage.f09b91c2.mjs") }), "insight"), tr(/* @__PURE__ */ Object.assign({ "./View/Components/Dialogs/ConfirmableDialog.vue": mo, "./View/Components/Dialogs/DestroyResourcesDialog.vue": ho, "./View/Components/Filter.vue": Bl, "./View/Components/Filterables/BooleanFilterable.vue": Wl, "./View/Components/Filterables/SelectFilterable.vue": Jl, "./View/Components/Header.vue": gi, "./View/Components/HeaderNavigation.vue": Si, "./View/Components/Heroicon.vue": _i, "./View/Components/Menu.vue": Ei }), "insight"), tr(/* @__PURE__ */ Object.assign({ "./View/Layouts/DrawerLayout.vue": Hi, "./View/Layouts/InsightLayout.vue": Wi, "./View/Layouts/ResourceDetailLayout.vue": Yi }), "insight"), wn;
}
export {
  wn as I,
  Il as _,
  bo as a,
  ns as b,
  bn as c,
  mi as d,
  xi as e,
  wi as f,
  xo as g,
  _o as h,
  $o as i,
  Oo as o,
  ra as r,
  zr as u
};