import { Z as xe, E as N, g as ie, _ as et, C as ne, $ as _e, q as $, a0 as S, h as p, a1 as I, b as ae, a as j, a2 as fe, H as Le, a3 as O, B as z, a4 as W, a5 as M, a6 as tt, a7 as B, a8 as G, a9 as ve, aa as rt, ab as Pe, ac as ue, ad as Me, ae as pe, af as st, ag as be, ah as it, f as nt, ai as R, s as F, A as at, d as Ce, aj as ge, ak as ft, al as oe, am as ut, an as ot, ao as lt, ap as le, aq as ct, ar as ce, as as J, at as dt, au as ht, av as _t, aw as vt, ax as pt, ay as bt, az as Q, aA as De, aB as gt, aC as x, e as L, aD as yt, aE as Et, aF as At, aG as Tt, t as wt, aH as St, aI as mt, r as Nt, aJ as ye, aK as Ot, aL as It, aM as Rt, aN as de, aO as $e, aP as Lt, aQ as Pt, aR as Mt, aS as Ct, aT as Dt, aU as $t, aV as Bt, aW as Ft, aX as Ut, aY as Yt, aZ as kt, U as Vt, a_ as jt, a$ as Ee, b0 as Ae, b1 as Ht, v as qt, b2 as Be, b3 as Te, m as Fe, b4 as Wt, I as Gt, D as he, b5 as Kt, b6 as zt, b7 as Zt, F as Xt, b8 as we, b9 as Ue, ba as Jt, bb as Qt, bc as Ye, bd as xt, be as er, bf as tr, bg as rr, bh as sr, bi as ir, l as nr, bj as ar } from "./index-DRgrWhNH.js";
function fr(e) {
  let t = 0, r = ie(0), s;
  return () => {
    xe() && (N(r), et(() => (t === 0 && (s = ne(() => e(() => _e(r)))), t += 1, () => {
      $(() => {
        t -= 1, t === 0 && (s?.(), s = void 0, _e(r));
      });
    })));
  };
}
var ur = oe | ut | ot;
function or(e, t, r) {
  new lr(e, t, r);
}
class lr {
  /** @type {Boundary | null} */
  parent;
  is_pending = !1;
  /** @type {TemplateNode} */
  #e;
  /** @type {TemplateNode | null} */
  #t = p ? S : null;
  /** @type {BoundaryProps} */
  #r;
  /** @type {((anchor: Node) => void)} */
  #a;
  /** @type {Effect} */
  #n;
  /** @type {Effect | null} */
  #i = null;
  /** @type {Effect | null} */
  #s = null;
  /** @type {Effect | null} */
  #f = null;
  /** @type {DocumentFragment | null} */
  #u = null;
  /** @type {TemplateNode | null} */
  #c = null;
  #d = 0;
  #o = 0;
  #_ = !1;
  #h = !1;
  /** @type {Set<Effect>} */
  #v = /* @__PURE__ */ new Set();
  /** @type {Set<Effect>} */
  #p = /* @__PURE__ */ new Set();
  /**
   * A source containing the number of pending async deriveds/expressions.
   * Only created if `$effect.pending()` is used inside the boundary,
   * otherwise updating the source results in needless `Batch.ensure()`
   * calls followed by no-op flushes
   * @type {Source<number> | null}
   */
  #l = null;
  #A = fr(() => (this.#l = ie(this.#d), () => {
    this.#l = null;
  }));
  /**
   * @param {TemplateNode} node
   * @param {BoundaryProps} props
   * @param {((anchor: Node) => void)} children
   */
  constructor(t, r, s) {
    this.#e = t, this.#r = r, this.#a = s, this.parent = /** @type {Effect} */
    I.b, this.is_pending = !!this.#r.pending, this.#n = ae(() => {
      if (I.b = this, p) {
        const i = this.#t;
        j(), /** @type {Comment} */
        i.nodeType === fe && /** @type {Comment} */
        i.data === Le ? this.#w() : (this.#T(), this.#o === 0 && (this.is_pending = !1));
      } else {
        var n = this.#y();
        try {
          this.#i = O(() => s(n));
        } catch (i) {
          this.error(i);
        }
        this.#o > 0 ? this.#g() : this.is_pending = !1;
      }
      return () => {
        this.#c?.remove();
      };
    }, ur), p && (this.#e = S);
  }
  #T() {
    try {
      this.#i = O(() => this.#a(this.#e));
    } catch (t) {
      this.error(t);
    }
  }
  #w() {
    const t = this.#r.pending;
    t && (this.#s = O(() => t(this.#e)), $(() => {
      var r = this.#y();
      this.#i = this.#b(() => (z.ensure(), O(() => this.#a(r)))), this.#o > 0 ? this.#g() : (W(
        /** @type {Effect} */
        this.#s,
        () => {
          this.#s = null;
        }
      ), this.is_pending = !1);
    }));
  }
  #y() {
    var t = this.#e;
    return this.is_pending && (this.#c = M(), this.#e.before(this.#c), t = this.#c), t;
  }
  /**
   * Defer an effect inside a pending boundary until the boundary resolves
   * @param {Effect} effect
   */
  defer_effect(t) {
    tt(t, this.#v, this.#p);
  }
  /**
   * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
   * @returns {boolean}
   */
  is_rendered() {
    return !this.is_pending && (!this.parent || this.parent.is_rendered());
  }
  has_pending_snippet() {
    return !!this.#r.pending;
  }
  /**
   * @param {() => Effect | null} fn
   */
  #b(t) {
    var r = I, s = Pe, n = ue;
    B(this.#n), G(this.#n), ve(this.#n.ctx);
    try {
      return t();
    } catch (i) {
      return rt(i), null;
    } finally {
      B(r), G(s), ve(n);
    }
  }
  #g() {
    const t = (
      /** @type {(anchor: Node) => void} */
      this.#r.pending
    );
    this.#i !== null && (this.#u = document.createDocumentFragment(), this.#u.append(
      /** @type {TemplateNode} */
      this.#c
    ), Me(this.#i, this.#u)), this.#s === null && (this.#s = O(() => t(this.#e)));
  }
  /**
   * Updates the pending count associated with the currently visible pending snippet,
   * if any, such that we can replace the snippet with content once work is done
   * @param {1 | -1} d
   */
  #E(t) {
    if (!this.has_pending_snippet()) {
      this.parent && this.parent.#E(t);
      return;
    }
    if (this.#o += t, this.#o === 0) {
      this.is_pending = !1;
      for (const r of this.#v)
        pe(r, st), be(r);
      for (const r of this.#p)
        pe(r, it), be(r);
      this.#v.clear(), this.#p.clear(), this.#s && W(this.#s, () => {
        this.#s = null;
      }), this.#u && (this.#e.before(this.#u), this.#u = null);
    }
  }
  /**
   * Update the source that powers `$effect.pending()` inside this boundary,
   * and controls when the current `pending` snippet (if any) is removed.
   * Do not call from inside the class
   * @param {1 | -1} d
   */
  update_pending_count(t) {
    this.#E(t), this.#d += t, !(!this.#l || this.#_) && (this.#_ = !0, $(() => {
      this.#_ = !1, this.#l && nt(this.#l, this.#d);
    }));
  }
  get_effect_pending() {
    return this.#A(), N(
      /** @type {Source<number>} */
      this.#l
    );
  }
  /** @param {unknown} error */
  error(t) {
    var r = this.#r.onerror;
    let s = this.#r.failed;
    if (this.#h || !r && !s)
      throw t;
    this.#i && (R(this.#i), this.#i = null), this.#s && (R(this.#s), this.#s = null), this.#f && (R(this.#f), this.#f = null), p && (F(
      /** @type {TemplateNode} */
      this.#t
    ), at(), F(Ce()));
    var n = !1, i = !1;
    const a = () => {
      if (n) {
        lt();
        return;
      }
      n = !0, i && ft(), z.ensure(), this.#d = 0, this.#f !== null && W(this.#f, () => {
        this.#f = null;
      }), this.is_pending = this.has_pending_snippet(), this.#i = this.#b(() => (this.#h = !1, O(() => this.#a(this.#e)))), this.#o > 0 ? this.#g() : this.is_pending = !1;
    };
    $(() => {
      try {
        i = !0, r?.(t, a), i = !1;
      } catch (f) {
        ge(f, this.#n && this.#n.parent);
      }
      s && (this.#f = this.#b(() => {
        z.ensure(), this.#h = !0;
        try {
          return O(() => {
            s(
              this.#e,
              () => t,
              () => a
            );
          });
        } catch (f) {
          return ge(
            f,
            /** @type {Effect} */
            this.#n.parent
          ), null;
        } finally {
          this.#h = !1;
        }
      }));
    });
  }
}
function cr(e) {
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
}
const dr = [
  "beforeinput",
  "click",
  "change",
  "dblclick",
  "contextmenu",
  "focusin",
  "focusout",
  "input",
  "keydown",
  "keyup",
  "mousedown",
  "mousemove",
  "mouseout",
  "mouseover",
  "mouseup",
  "pointerdown",
  "pointermove",
  "pointerout",
  "pointerover",
  "pointerup",
  "touchend",
  "touchmove",
  "touchstart"
];
function hr(e) {
  return dr.includes(e);
}
const _r = {
  // no `class: 'className'` because we handle that separately
  formnovalidate: "formNoValidate",
  ismap: "isMap",
  nomodule: "noModule",
  playsinline: "playsInline",
  readonly: "readOnly",
  defaultvalue: "defaultValue",
  defaultchecked: "defaultChecked",
  srcobject: "srcObject",
  novalidate: "noValidate",
  allowfullscreen: "allowFullscreen",
  disablepictureinpicture: "disablePictureInPicture",
  disableremoteplayback: "disableRemotePlayback"
};
function vr(e) {
  return e = e.toLowerCase(), _r[e] ?? e;
}
const pr = ["touchstart", "touchmove"];
function br(e) {
  return pr.includes(e);
}
const ke = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Set();
function Ve(e, t, r, s = {}) {
  function n(i) {
    if (s.capture || V.call(t, i), !i.cancelBubble)
      return ct(() => r?.call(this, i));
  }
  return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? $(() => {
    t.addEventListener(e, n, s);
  }) : t.addEventListener(e, n, s), n;
}
function Ur(e, t, r, s, n) {
  var i = { capture: s, passive: n }, a = Ve(e, t, r, i);
  (t === document.body || // @ts-ignore
  t === window || // @ts-ignore
  t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
  t instanceof HTMLMediaElement) && le(() => {
    t.removeEventListener(e, a, i);
  });
}
function je(e) {
  for (var t = 0; t < e.length; t++)
    ke.add(e[t]);
  for (var r of ee)
    r(e);
}
let Se = null;
function V(e) {
  var t = this, r = (
    /** @type {Node} */
    t.ownerDocument
  ), s = e.type, n = e.composedPath?.() || [], i = (
    /** @type {null | Element} */
    n[0] || e.target
  );
  Se = e;
  var a = 0, f = Se === e && e.__root;
  if (f) {
    var o = n.indexOf(f);
    if (o !== -1 && (t === document || t === /** @type {any} */
    window)) {
      e.__root = t;
      return;
    }
    var l = n.indexOf(t);
    if (l === -1)
      return;
    o <= l && (a = o);
  }
  if (i = /** @type {Element} */
  n[a] || e.target, i !== t) {
    ce(e, "currentTarget", {
      configurable: !0,
      get() {
        return i || r;
      }
    });
    var d = Pe, c = I;
    G(null), B(null);
    try {
      for (var u, h = []; i !== null; ) {
        var _ = i.assignedSlot || i.parentNode || /** @type {any} */
        i.host || null;
        try {
          var A = i["__" + s];
          A != null && (!/** @type {any} */
          i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
          // -> the target could not have been disabled because it emits the event in the first place
          e.target === i) && A.call(i, e);
        } catch (w) {
          u ? h.push(w) : u = w;
        }
        if (e.cancelBubble || _ === t || _ === null)
          break;
        i = _;
      }
      if (u) {
        for (let w of h)
          queueMicrotask(() => {
            throw w;
          });
        throw u;
      }
    } finally {
      e.__root = t, delete e.currentTarget, G(d), B(c);
    }
  }
}
function gr(e) {
  var t = document.createElement("template");
  return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
}
function P(e, t) {
  var r = (
    /** @type {Effect} */
    I
  );
  r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
}
// @__NO_SIDE_EFFECTS__
function Yr(e, t) {
  var r = (t & bt) !== 0, s = (t & ht) !== 0, n, i = !e.startsWith("<!>");
  return () => {
    if (p)
      return P(S, null), S;
    n === void 0 && (n = gr(i ? e : "<!>" + e), r || (n = /** @type {TemplateNode} */
    J(n)));
    var a = (
      /** @type {TemplateNode} */
      s || dt ? document.importNode(n, !0) : n.cloneNode(!0)
    );
    if (r) {
      var f = (
        /** @type {TemplateNode} */
        J(a)
      ), o = (
        /** @type {TemplateNode} */
        a.lastChild
      );
      P(f, o);
    } else
      P(a, a);
    return a;
  };
}
function kr(e = "") {
  if (!p) {
    var t = M(e + "");
    return P(t, t), t;
  }
  var r = S;
  return r.nodeType !== _t ? (r.before(r = M()), F(r)) : vt(
    /** @type {Text} */
    r
  ), P(r, r), r;
}
function Vr() {
  if (p)
    return P(S, null), S;
  var e = document.createDocumentFragment(), t = document.createComment(""), r = M();
  return e.append(t, r), P(t, r), e;
}
function jr(e, t) {
  if (p) {
    var r = (
      /** @type {Effect & { nodes: EffectNodes }} */
      I
    );
    ((r.f & pt) === 0 || r.nodes.end === null) && (r.nodes.end = S), j();
    return;
  }
  e !== null && e.before(
    /** @type {Node} */
    t
  );
}
function Hr(e, t) {
  var r = t == null ? "" : typeof t == "object" ? t + "" : t;
  r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
}
function He(e, t) {
  return qe(e, t);
}
function yr(e, t) {
  Q(), t.intro = t.intro ?? !1;
  const r = t.target, s = p, n = S;
  try {
    for (var i = J(r); i && (i.nodeType !== fe || /** @type {Comment} */
    i.data !== De); )
      i = gt(i);
    if (!i)
      throw x;
    L(!0), F(
      /** @type {Comment} */
      i
    );
    const a = qe(e, { ...t, anchor: i });
    return L(!1), /**  @type {Exports} */
    a;
  } catch (a) {
    if (a instanceof Error && a.message.split(`
`).some((f) => f.startsWith("https://svelte.dev/e/")))
      throw a;
    return a !== x && console.warn("Failed to hydrate: ", a), t.recover === !1 && yt(), Q(), Et(r), L(!1), He(e, t);
  } finally {
    L(s), F(n);
  }
}
const D = /* @__PURE__ */ new Map();
function qe(e, { target: t, anchor: r, props: s = {}, events: n, context: i, intro: a = !0 }) {
  Q();
  var f = /* @__PURE__ */ new Set(), o = (c) => {
    for (var u = 0; u < c.length; u++) {
      var h = c[u];
      if (!f.has(h)) {
        f.add(h);
        var _ = br(h);
        t.addEventListener(h, V, { passive: _ });
        var A = D.get(h);
        A === void 0 ? (document.addEventListener(h, V, { passive: _ }), D.set(h, 1)) : D.set(h, A + 1);
      }
    }
  };
  o(At(ke)), ee.add(o);
  var l = void 0, d = Tt(() => {
    var c = r ?? t.appendChild(M());
    return or(
      /** @type {TemplateNode} */
      c,
      {
        pending: () => {
        }
      },
      (u) => {
        wt({});
        var h = (
          /** @type {ComponentContext} */
          ue
        );
        if (i && (h.c = i), n && (s.$$events = n), p && P(
          /** @type {TemplateNode} */
          u,
          null
        ), l = e(u, s) || {}, p && (I.nodes.end = S, S === null || S.nodeType !== fe || /** @type {Comment} */
        S.data !== St))
          throw mt(), x;
        Nt();
      }
    ), () => {
      for (var u of f) {
        t.removeEventListener(u, V);
        var h = (
          /** @type {number} */
          D.get(u)
        );
        --h === 0 ? (document.removeEventListener(u, V), D.delete(u)) : D.set(u, h);
      }
      ee.delete(o), c !== r && c.parentNode?.removeChild(c);
    };
  });
  return te.set(l, d), l;
}
let te = /* @__PURE__ */ new WeakMap();
function Er(e, t) {
  const r = te.get(e);
  return r ? (te.delete(e), r(t)) : Promise.resolve();
}
class We {
  /** @type {TemplateNode} */
  anchor;
  /** @type {Map<Batch, Key>} */
  #e = /* @__PURE__ */ new Map();
  /**
   * Map of keys to effects that are currently rendered in the DOM.
   * These effects are visible and actively part of the document tree.
   * Example:
   * ```
   * {#if condition}
   * 	foo
   * {:else}
   * 	bar
   * {/if}
   * ```
   * Can result in the entries `true->Effect` and `false->Effect`
   * @type {Map<Key, Effect>}
   */
  #t = /* @__PURE__ */ new Map();
  /**
   * Similar to #onscreen with respect to the keys, but contains branches that are not yet
   * in the DOM, because their insertion is deferred.
   * @type {Map<Key, Branch>}
   */
  #r = /* @__PURE__ */ new Map();
  /**
   * Keys of effects that are currently outroing
   * @type {Set<Key>}
   */
  #a = /* @__PURE__ */ new Set();
  /**
   * Whether to pause (i.e. outro) on change, or destroy immediately.
   * This is necessary for `<svelte:element>`
   */
  #n = !0;
  /**
   * @param {TemplateNode} anchor
   * @param {boolean} transition
   */
  constructor(t, r = !0) {
    this.anchor = t, this.#n = r;
  }
  #i = () => {
    var t = (
      /** @type {Batch} */
      ye
    );
    if (this.#e.has(t)) {
      var r = (
        /** @type {Key} */
        this.#e.get(t)
      ), s = this.#t.get(r);
      if (s)
        Ot(s), this.#a.delete(r);
      else {
        var n = this.#r.get(r);
        n && (this.#t.set(r, n.effect), this.#r.delete(r), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), s = n.effect);
      }
      for (const [i, a] of this.#e) {
        if (this.#e.delete(i), i === t)
          break;
        const f = this.#r.get(a);
        f && (R(f.effect), this.#r.delete(a));
      }
      for (const [i, a] of this.#t) {
        if (i === r || this.#a.has(i)) continue;
        const f = () => {
          if (Array.from(this.#e.values()).includes(i)) {
            var l = document.createDocumentFragment();
            Me(a, l), l.append(M()), this.#r.set(i, { effect: a, fragment: l });
          } else
            R(a);
          this.#a.delete(i), this.#t.delete(i);
        };
        this.#n || !s ? (this.#a.add(i), W(a, f, !1)) : f();
      }
    }
  };
  /**
   * @param {Batch} batch
   */
  #s = (t) => {
    this.#e.delete(t);
    const r = Array.from(this.#e.values());
    for (const [s, n] of this.#r)
      r.includes(s) || (R(n.effect), this.#r.delete(s));
  };
  /**
   *
   * @param {any} key
   * @param {null | ((target: TemplateNode) => void)} fn
   */
  ensure(t, r) {
    var s = (
      /** @type {Batch} */
      ye
    ), n = It();
    if (r && !this.#t.has(t) && !this.#r.has(t))
      if (n) {
        var i = document.createDocumentFragment(), a = M();
        i.append(a), this.#r.set(t, {
          effect: O(() => r(a)),
          fragment: i
        });
      } else
        this.#t.set(
          t,
          O(() => r(this.anchor))
        );
    if (this.#e.set(s, t), n) {
      for (const [f, o] of this.#t)
        f === t ? s.unskip_effect(o) : s.skip_effect(o);
      for (const [f, o] of this.#r)
        f === t ? s.unskip_effect(o.effect) : s.skip_effect(o.effect);
      s.oncommit(this.#i), s.ondiscard(this.#s);
    } else
      p && (this.anchor = S), this.#i();
  }
}
function qr(e, t, r = !1) {
  p && j();
  var s = new We(e), n = r ? oe : 0;
  function i(a, f) {
    if (p) {
      const d = Rt(e);
      var o;
      if (d === De ? o = 0 : d === Le ? o = !1 : o = parseInt(d.substring(1)), a !== o) {
        var l = Ce();
        F(l), s.anchor = l, L(!1), s.ensure(a, f), L(!0);
        return;
      }
    }
    s.ensure(a, f);
  }
  ae(() => {
    var a = !1;
    t((f, o = 0) => {
      a = !0, i(o, f);
    }), a || i(!1, null);
  }, n);
}
function Wr(e, t, r, s, n) {
  p && j();
  var i = t.$$slots?.[r], a = !1;
  i === !0 && (i = t[r === "default" ? "children" : r], a = !0), i === void 0 || i(e, a ? () => s : s);
}
function Gr(e, t, r) {
  p && j();
  var s = new We(e);
  ae(() => {
    var n = t() ?? null;
    s.ensure(n, n && ((i) => r(i, n)));
  }, oe);
}
function Kr(e, t) {
  de(() => {
    var r = e.getRootNode(), s = (
      /** @type {ShadowRoot} */
      r.host ? (
        /** @type {ShadowRoot} */
        r
      ) : (
        /** @type {Document} */
        r.head ?? /** @type {Document} */
        r.ownerDocument.head
      )
    );
    if (!s.querySelector("#" + t.hash)) {
      const n = document.createElement("style");
      n.id = t.hash, n.textContent = t.code, s.appendChild(n);
    }
  });
}
function Ar(e, t) {
  var r = void 0, s;
  $e(() => {
    r !== (r = t()) && (s && (R(s), s = null), r && (s = O(() => {
      de(() => (
        /** @type {(node: Element) => void} */
        r(e)
      ));
    })));
  });
}
function Ge(e) {
  var t, r, s = "";
  if (typeof e == "string" || typeof e == "number") s += e;
  else if (typeof e == "object") if (Array.isArray(e)) {
    var n = e.length;
    for (t = 0; t < n; t++) e[t] && (r = Ge(e[t])) && (s && (s += " "), s += r);
  } else for (r in e) e[r] && (s && (s += " "), s += r);
  return s;
}
function Tr() {
  for (var e, t, r = 0, s = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = Ge(e)) && (s && (s += " "), s += t);
  return s;
}
function wr(e) {
  return typeof e == "object" ? Tr(e) : e ?? "";
}
const me = [...` 	
\r\f \v\uFEFF`];
function Sr(e, t, r) {
  var s = e == null ? "" : "" + e;
  if (t && (s = s ? s + " " + t : t), r) {
    for (var n in r)
      if (r[n])
        s = s ? s + " " + n : n;
      else if (s.length)
        for (var i = n.length, a = 0; (a = s.indexOf(n, a)) >= 0; ) {
          var f = a + i;
          (a === 0 || me.includes(s[a - 1])) && (f === s.length || me.includes(s[f])) ? s = (a === 0 ? "" : s.substring(0, a)) + s.substring(f + 1) : a = f;
        }
  }
  return s === "" ? null : s;
}
function Ne(e, t = !1) {
  var r = t ? " !important;" : ";", s = "";
  for (var n in e) {
    var i = e[n];
    i != null && i !== "" && (s += " " + n + ": " + i + r);
  }
  return s;
}
function Z(e) {
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
}
function mr(e, t) {
  if (t) {
    var r = "", s, n;
    if (Array.isArray(t) ? (s = t[0], n = t[1]) : s = t, e) {
      e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
      var i = !1, a = 0, f = !1, o = [];
      s && o.push(...Object.keys(s).map(Z)), n && o.push(...Object.keys(n).map(Z));
      var l = 0, d = -1;
      const A = e.length;
      for (var c = 0; c < A; c++) {
        var u = e[c];
        if (f ? u === "/" && e[c - 1] === "*" && (f = !1) : i ? i === u && (i = !1) : u === "/" && e[c + 1] === "*" ? f = !0 : u === '"' || u === "'" ? i = u : u === "(" ? a++ : u === ")" && a--, !f && i === !1 && a === 0) {
          if (u === ":" && d === -1)
            d = c;
          else if (u === ";" || c === A - 1) {
            if (d !== -1) {
              var h = Z(e.substring(l, d).trim());
              if (!o.includes(h)) {
                u !== ";" && c++;
                var _ = e.substring(l, c).trim();
                r += " " + _ + ";";
              }
            }
            l = c + 1, d = -1;
          }
        }
      }
    }
    return s && (r += Ne(s)), n && (r += Ne(n, !0)), r = r.trim(), r === "" ? null : r;
  }
  return e == null ? null : String(e);
}
function Nr(e, t, r, s, n, i) {
  var a = e.__className;
  if (p || a !== r || a === void 0) {
    var f = Sr(r, s, i);
    (!p || f !== e.getAttribute("class")) && (f == null ? e.removeAttribute("class") : t ? e.className = f : e.setAttribute("class", f)), e.__className = r;
  } else if (i && n !== i)
    for (var o in i) {
      var l = !!i[o];
      (n == null || l !== !!n[o]) && e.classList.toggle(o, l);
    }
  return i;
}
function X(e, t = {}, r, s) {
  for (var n in r) {
    var i = r[n];
    t[n] !== i && (r[n] == null ? e.style.removeProperty(n) : e.style.setProperty(n, i, s));
  }
}
function Or(e, t, r, s) {
  var n = e.__style;
  if (p || n !== t) {
    var i = mr(t, s);
    (!p || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
  } else s && (Array.isArray(s) ? (X(e, r?.[0], s[0]), X(e, r?.[1], s[1], "important")) : X(e, r, s));
  return s;
}
function re(e, t, r = !1) {
  if (e.multiple) {
    if (t == null)
      return;
    if (!Lt(t))
      return Pt();
    for (var s of e.options)
      s.selected = t.includes(Oe(s));
    return;
  }
  for (s of e.options) {
    var n = Oe(s);
    if (Mt(n, t)) {
      s.selected = !0;
      return;
    }
  }
  (!r || t !== void 0) && (e.selectedIndex = -1);
}
function Ir(e) {
  var t = new MutationObserver(() => {
    re(e, e.__value);
  });
  t.observe(e, {
    // Listen to option element changes
    childList: !0,
    subtree: !0,
    // because of <optgroup>
    // Listen to option element value attribute changes
    // (doesn't get notified of select value changes,
    // because that property is not reflected as an attribute)
    attributes: !0,
    attributeFilter: ["value"]
  }), le(() => {
    t.disconnect();
  });
}
function Oe(e) {
  return "__value" in e ? e.__value : e.value;
}
const Y = /* @__PURE__ */ Symbol("class"), k = /* @__PURE__ */ Symbol("style"), Ke = /* @__PURE__ */ Symbol("is custom element"), ze = /* @__PURE__ */ Symbol("is html");
function Rr(e) {
  if (p) {
    var t = !1, r = () => {
      if (!t) {
        if (t = !0, e.hasAttribute("value")) {
          var s = e.value;
          K(e, "value", null), e.value = s;
        }
        if (e.hasAttribute("checked")) {
          var n = e.checked;
          K(e, "checked", null), e.checked = n;
        }
      }
    };
    e.__on_r = r, $(r), Yt();
  }
}
function Lr(e, t) {
  t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
}
function K(e, t, r, s) {
  var n = Ze(e);
  p && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || n[t] !== (n[t] = r) && (t === "loading" && (e[Bt] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Xe(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
}
function Pr(e, t, r, s, n = !1, i = !1) {
  if (p && n && e.tagName === "INPUT") {
    var a = (
      /** @type {HTMLInputElement} */
      e
    ), f = a.type === "checkbox" ? "defaultChecked" : "defaultValue";
    f in r || Rr(a);
  }
  var o = Ze(e), l = o[Ke], d = !o[ze];
  let c = p && l;
  c && L(!1);
  var u = t || {}, h = e.tagName === "OPTION";
  for (var _ in t)
    _ in r || (r[_] = null);
  r.class ? r.class = wr(r.class) : (s || r[Y]) && (r.class = null), r[k] && (r.style ??= null);
  var A = Xe(e);
  for (const v in r) {
    let b = r[v];
    if (h && v === "value" && b == null) {
      e.value = e.__value = "", u[v] = b;
      continue;
    }
    if (v === "class") {
      var w = e.namespaceURI === "http://www.w3.org/1999/xhtml";
      Nr(e, w, b, s, t?.[Y], r[Y]), u[v] = b, u[Y] = r[Y];
      continue;
    }
    if (v === "style") {
      Or(e, b, t?.[k], r[k]), u[v] = b, u[k] = r[k];
      continue;
    }
    var g = u[v];
    if (!(b === g && !(b === void 0 && e.hasAttribute(v)))) {
      u[v] = b;
      var H = v[0] + v[1];
      if (H !== "$$")
        if (H === "on") {
          const m = {}, C = "$$" + v;
          let T = v.slice(2);
          var y = hr(T);
          if (cr(T) && (T = T.slice(0, -7), m.capture = !0), !y && g) {
            if (b != null) continue;
            e.removeEventListener(T, u[C], m), u[C] = null;
          }
          if (b != null)
            if (y)
              e[`__${T}`] = b, je([T]);
            else {
              let Je = function(Qe) {
                u[v].call(this, Qe);
              };
              u[C] = Ve(T, e, Je, m);
            }
          else y && (e[`__${T}`] = void 0);
        } else if (v === "style")
          K(e, v, b);
        else if (v === "autofocus")
          kt(
            /** @type {HTMLElement} */
            e,
            !!b
          );
        else if (!l && (v === "__value" || v === "value" && b != null))
          e.value = e.__value = b;
        else if (v === "selected" && h)
          Lr(
            /** @type {HTMLOptionElement} */
            e,
            b
          );
        else {
          var E = v;
          d || (E = vr(E));
          var U = E === "defaultValue" || E === "defaultChecked";
          if (b == null && !l && !U)
            if (o[v] = null, E === "value" || E === "checked") {
              let m = (
                /** @type {HTMLInputElement} */
                e
              );
              const C = t === void 0;
              if (E === "value") {
                let T = m.defaultValue;
                m.removeAttribute(E), m.defaultValue = T, m.value = m.__value = C ? T : null;
              } else {
                let T = m.defaultChecked;
                m.removeAttribute(E), m.defaultChecked = T, m.checked = C ? T : !1;
              }
            } else
              e.removeAttribute(v);
          else U || A.includes(E) && (l || typeof b != "string") ? (e[E] = b, E in o && (o[E] = Vt)) : typeof b != "function" && K(e, E, b);
        }
    }
  }
  return c && L(!0), u;
}
function zr(e, t, r = [], s = [], n = [], i, a = !1, f = !1) {
  Ft(n, r, s, (o) => {
    var l = void 0, d = {}, c = e.nodeName === "SELECT", u = !1;
    if ($e(() => {
      var _ = t(...o.map(N)), A = Pr(
        e,
        l,
        _,
        i,
        a,
        f
      );
      u && c && "value" in _ && re(
        /** @type {HTMLSelectElement} */
        e,
        _.value
      );
      for (let g of Object.getOwnPropertySymbols(d))
        _[g] || R(d[g]);
      for (let g of Object.getOwnPropertySymbols(_)) {
        var w = _[g];
        g.description === Ut && (!l || w !== l[g]) && (d[g] && R(d[g]), d[g] = O(() => Ar(e, () => w))), A[g] = w;
      }
      l = A;
    }), c) {
      var h = (
        /** @type {HTMLSelectElement} */
        e
      );
      de(() => {
        re(
          h,
          /** @type {Record<string | symbol, any>} */
          l.value,
          !0
        ), Ir(h);
      });
    }
    u = !0;
  });
}
function Ze(e) {
  return (
    /** @type {Record<string | symbol, unknown>} **/
    // @ts-expect-error
    e.__attributes ??= {
      [Ke]: e.nodeName.includes("-"),
      [ze]: e.namespaceURI === Ct
    }
  );
}
var Ie = /* @__PURE__ */ new Map();
function Xe(e) {
  var t = e.getAttribute("is") || e.nodeName, r = Ie.get(t);
  if (r) return r;
  Ie.set(t, r = []);
  for (var s, n = e, i = Element.prototype; i !== n; ) {
    s = $t(n);
    for (var a in s)
      s[a].set && r.push(a);
    n = Dt(n);
  }
  return r;
}
function Zr(e = !1) {
  const t = (
    /** @type {ComponentContextLegacy} */
    ue
  ), r = t.l.u;
  if (!r) return;
  let s = () => qt(t.s);
  if (e) {
    let n = 0, i = (
      /** @type {Record<string, any>} */
      {}
    );
    const a = Be(() => {
      let f = !1;
      const o = t.s;
      for (const l in o)
        o[l] !== i[l] && (i[l] = o[l], f = !0);
      return f && n++, n;
    });
    s = () => N(a);
  }
  r.b.length && jt(() => {
    Re(t, s), Ae(r.b);
  }), Ee(() => {
    const n = ne(() => r.m.map(Ht));
    return () => {
      for (const i of n)
        typeof i == "function" && i();
    };
  }), r.a.length && Ee(() => {
    Re(t, s), Ae(r.a);
  });
}
function Re(e, t) {
  if (e.l.s)
    for (const r of e.l.s) N(r);
  t();
}
function Xr(e, t, r) {
  e.$$events ||= {}, e.$$events[t] ||= [], e.$$events[t].push(r);
}
function Jr(e) {
  for (var t in e)
    t in this && (this[t] = e[t]);
}
let q = !1, se = /* @__PURE__ */ Symbol();
function Qr(e, t, r) {
  const s = r[t] ??= {
    store: null,
    source: Fe(void 0),
    unsubscribe: Te
  };
  if (s.store !== e && !(se in r))
    if (s.unsubscribe(), s.store = e ?? null, e == null)
      s.source.v = void 0, s.unsubscribe = Te;
    else {
      var n = !0;
      s.unsubscribe = Wt(e, (i) => {
        n ? s.source.v = i : he(s.source, i);
      }), n = !1;
    }
  return e && se in r ? Gt(e) : N(s.source);
}
function xr() {
  const e = {};
  function t() {
    le(() => {
      for (var r in e)
        e[r].unsubscribe();
      ce(e, se, {
        enumerable: !1,
        value: !0
      });
    });
  }
  return [e, t];
}
function es(e, t, r) {
  return e.set(r), t;
}
function Mr(e) {
  var t = q;
  try {
    return q = !1, [e(), q];
  } finally {
    q = t;
  }
}
const Cr = {
  get(e, t) {
    if (!e.exclude.includes(t))
      return N(e.version), t in e.special ? e.special[t]() : e.props[t];
  },
  set(e, t, r) {
    if (!(t in e.special)) {
      var s = I;
      try {
        B(e.parent_effect), e.special[t] = Dr(
          {
            get [t]() {
              return e.props[t];
            }
          },
          /** @type {string} */
          t,
          Ue
        );
      } finally {
        B(s);
      }
    }
    return e.special[t](r), we(e.version), !0;
  },
  getOwnPropertyDescriptor(e, t) {
    if (!e.exclude.includes(t) && t in e.props)
      return {
        enumerable: !0,
        configurable: !0,
        value: e.props[t]
      };
  },
  deleteProperty(e, t) {
    return e.exclude.includes(t) || (e.exclude.push(t), we(e.version)), !0;
  },
  has(e, t) {
    return e.exclude.includes(t) ? !1 : t in e.props;
  },
  ownKeys(e) {
    return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
  }
};
function ts(e, t) {
  return new Proxy(
    {
      props: e,
      exclude: t,
      special: {},
      version: ie(0),
      // TODO this is only necessary because we need to track component
      // destruction inside `prop`, because of `bind:this`, but it
      // seems likely that we can simplify `bind:this` instead
      parent_effect: (
        /** @type {Effect} */
        I
      )
    },
    Cr
  );
}
function Dr(e, t, r, s) {
  var n = !tr || (r & rr) !== 0, i = (r & er) !== 0, a = (r & sr) !== 0, f = (
    /** @type {V} */
    s
  ), o = !0, l = () => (o && (o = !1, f = a ? ne(
    /** @type {() => V} */
    s
  ) : (
    /** @type {V} */
    s
  )), f), d;
  if (i) {
    var c = Qt in e || Ye in e;
    d = Kt(e, t)?.set ?? (c && t in e ? (y) => e[t] = y : void 0);
  }
  var u, h = !1;
  i ? [u, h] = Mr(() => (
    /** @type {V} */
    e[t]
  )) : u = /** @type {V} */
  e[t], u === void 0 && s !== void 0 && (u = l(), d && (n && ir(), d(u)));
  var _;
  if (n ? _ = () => {
    var y = (
      /** @type {V} */
      e[t]
    );
    return y === void 0 ? l() : (o = !0, y);
  } : _ = () => {
    var y = (
      /** @type {V} */
      e[t]
    );
    return y !== void 0 && (f = /** @type {V} */
    void 0), y === void 0 ? f : y;
  }, n && (r & Ue) === 0)
    return _;
  if (d) {
    var A = e.$$legacy;
    return (
      /** @type {() => V} */
      (function(y, E) {
        return arguments.length > 0 ? ((!n || !E || A || h) && d(E ? _() : y), y) : _();
      })
    );
  }
  var w = !1, g = ((r & xt) !== 0 ? Be : Xt)(() => (w = !1, _()));
  i && N(g);
  var H = (
    /** @type {Effect} */
    I
  );
  return (
    /** @type {() => V} */
    (function(y, E) {
      if (arguments.length > 0) {
        const U = E ? N(g) : n && i ? zt(y) : y;
        return he(g, U), w = !0, f !== void 0 && (f = U), y;
      }
      return Jt && w || (H.f & Zt) !== 0 ? g.v : N(g);
    })
  );
}
function rs(e) {
  return new $r(e);
}
class $r {
  /** @type {any} */
  #e;
  /** @type {Record<string, any>} */
  #t;
  /**
   * @param {ComponentConstructorOptions & {
   *  component: any;
   * }} options
   */
  constructor(t) {
    var r = /* @__PURE__ */ new Map(), s = (i, a) => {
      var f = Fe(a, !1, !1);
      return r.set(i, f), f;
    };
    const n = new Proxy(
      { ...t.props || {}, $$events: {} },
      {
        get(i, a) {
          return N(r.get(a) ?? s(a, Reflect.get(i, a)));
        },
        has(i, a) {
          return a === Ye ? !0 : (N(r.get(a) ?? s(a, Reflect.get(i, a))), Reflect.has(i, a));
        },
        set(i, a, f) {
          return he(r.get(a) ?? s(a, f), f), Reflect.set(i, a, f);
        }
      }
    );
    this.#t = (t.hydrate ? yr : He)(t.component, {
      target: t.target,
      anchor: t.anchor,
      props: n,
      context: t.context,
      intro: t.intro ?? !1,
      recover: t.recover
    }), (!t?.props?.$$host || t.sync === !1) && nr(), this.#e = n.$$events;
    for (const i of Object.keys(this.#t))
      i === "$set" || i === "$destroy" || i === "$on" || ce(this, i, {
        get() {
          return this.#t[i];
        },
        /** @param {any} value */
        set(a) {
          this.#t[i] = a;
        },
        enumerable: !0
      });
    this.#t.$set = /** @param {Record<string, any>} next */
    (i) => {
      Object.assign(n, i);
    }, this.#t.$destroy = () => {
      Er(this.#t);
    };
  }
  /** @param {Record<string, any>} props */
  $set(t) {
    this.#t.$set(t);
  }
  /**
   * @param {string} event
   * @param {(...args: any[]) => any} callback
   * @returns {any}
   */
  $on(t, r) {
    this.#e[t] = this.#e[t] || [];
    const s = (...n) => r.call(this, ...n);
    return this.#e[t].push(s), () => {
      this.#e[t] = this.#e[t].filter(
        /** @param {any} fn */
        (n) => n !== s
      );
    };
  }
  $destroy() {
    this.#t.$destroy();
  }
}
const Br = "5";
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Br);
ar();
je(["click", "keydown"]);
export {
  wr as A,
  We as B,
  Y as C,
  es as D,
  Vr as a,
  jr as b,
  rs as c,
  Xr as d,
  Ur as e,
  Yr as f,
  Wr as g,
  Zr as h,
  qr as i,
  Or as j,
  Nr as k,
  ts as l,
  Kr as m,
  xr as n,
  Qr as o,
  Dr as p,
  Gr as q,
  Hr as r,
  K as s,
  kr as t,
  Jr as u,
  Rr as v,
  Lr as w,
  zr as x,
  P as y,
  gr as z
};
//# sourceMappingURL=AssetItem-ufNA-vj9.js.map
