import { getCurrentInstance as k, getCurrentScope as G, hasInjectionContext as le, inject as fe, watch as A, isRef as se, shallowRef as h, toValue as S, onMounted as re, nextTick as de, onScopeDispose as ve, provide as pe, watchEffect as me, computed as P, reactive as te, unref as he } from "vue";
function Q(e, o) {
  return G() ? (ve(e, o), !0) : !1;
}
const z = /* @__PURE__ */ new WeakMap(), be = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
  var o;
  const l = e[0], n = (o = k()) === null || o === void 0 ? void 0 : o.proxy, s = n ?? G();
  if (s == null && !le()) throw new Error("injectLocal must be called in setup");
  return s && z.has(s) && l in z.get(s) ? z.get(s)[l] : fe(...e);
};
function we(e, o) {
  var l;
  const n = (l = k()) === null || l === void 0 ? void 0 : l.proxy, s = n ?? G();
  if (s == null) throw new Error("provideLocal must be called in setup");
  z.has(s) || z.set(s, /* @__PURE__ */ Object.create(null));
  const t = z.get(s);
  return t[e] = o, pe(e, o);
}
const ue = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const ie = (e) => e != null, ye = Object.prototype.toString, ge = (e) => ye.call(e) === "[object Object]", D = () => {
};
function ce(e, o) {
  function l(...n) {
    return new Promise((s, t) => {
      Promise.resolve(e(() => o.apply(this, n), {
        fn: o,
        thisArg: this,
        args: n
      })).then(s).catch(t);
    });
  }
  return l;
}
function Se(e, o = {}) {
  let l, n, s = D;
  const t = (i) => {
    clearTimeout(i), s(), s = D;
  };
  let u;
  return (i) => {
    const v = S(e), r = S(o.maxWait);
    return l && t(l), v <= 0 || r !== void 0 && r <= 0 ? (n && (t(n), n = void 0), Promise.resolve(i())) : new Promise((c, m) => {
      s = o.rejectOnCancel ? m : c, u = i, r && !n && (n = setTimeout(() => {
        l && t(l), n = void 0, c(u());
      }, r)), l = setTimeout(() => {
        n && t(n), n = void 0, c(i());
      }, v);
    });
  };
}
function Ee(...e) {
  let o = 0, l, n = !0, s = D, t, u, d, i, v;
  !se(e[0]) && typeof e[0] == "object" ? { delay: u, trailing: d = !0, leading: i = !0, rejectOnCancel: v = !1 } = e[0] : [u, d = !0, i = !0, v = !1] = e;
  const r = () => {
    l && (clearTimeout(l), l = void 0, s(), s = D);
  };
  return (m) => {
    const f = S(u), b = Date.now() - o, E = () => t = m();
    return r(), f <= 0 ? (o = Date.now(), E()) : (b > f ? (o = Date.now(), (i || !n) && E()) : d && (t = new Promise((w, g) => {
      s = v ? g : w, l = setTimeout(() => {
        o = Date.now(), n = !0, w(E()), r();
      }, Math.max(0, f - b));
    })), !i && !l && (l = setTimeout(() => n = !0, f)), n = !1, t);
  };
}
function oe(e) {
  return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
}
function V(e) {
  return Array.isArray(e) ? e : [e];
}
function Me(e) {
  return k();
}
// @__NO_SIDE_EFFECTS__
function Oe(e, o = 200, l = {}) {
  return ce(Se(o, l), e);
}
// @__NO_SIDE_EFFECTS__
function Te(e, o = 200, l = !1, n = !0, s = !1) {
  return ce(Ee(o, l, n, s), e);
}
function U(e, o = !0, l) {
  Me() ? re(e, l) : o ? e() : de(e);
}
// @__NO_SIDE_EFFECTS__
function Ce(e = !1, o = {}) {
  const { truthyValue: l = !0, falsyValue: n = !1 } = o, s = se(e), t = h(e);
  function u(d) {
    if (arguments.length)
      return t.value = d, t.value;
    {
      const i = S(l);
      return t.value = t.value === i ? S(n) : i, t.value;
    }
  }
  return s ? u : [t, u];
}
function xe(e, o, l) {
  return A(e, o, {
    ...l,
    immediate: !0
  });
}
const X = ue ? window : void 0, De = ue ? window.document : void 0;
function _(e) {
  var o;
  const l = S(e);
  return (o = l == null ? void 0 : l.$el) !== null && o !== void 0 ? o : l;
}
function L(...e) {
  const o = (n, s, t, u) => (n.addEventListener(s, t, u), () => n.removeEventListener(s, t, u)), l = P(() => {
    const n = V(S(e[0])).filter((s) => s != null);
    return n.every((s) => typeof s != "string") ? n : void 0;
  });
  return xe(() => {
    var n, s;
    return [
      (n = (s = l.value) === null || s === void 0 ? void 0 : s.map((t) => _(t))) !== null && n !== void 0 ? n : [X].filter((t) => t != null),
      V(S(l.value ? e[1] : e[0])),
      V(he(l.value ? e[2] : e[1])),
      S(l.value ? e[3] : e[2])
    ];
  }, ([n, s, t, u], d, i) => {
    if (!(n != null && n.length) || !(s != null && s.length) || !(t != null && t.length)) return;
    const v = ge(u) ? { ...u } : u, r = n.flatMap((c) => s.flatMap((m) => t.map((f) => o(c, m, f, v))));
    i(() => {
      r.forEach((c) => c());
    });
  }, { flush: "post" });
}
// @__NO_SIDE_EFFECTS__
function We() {
  const e = h(!1), o = k();
  return o && re(() => {
    e.value = !0;
  }, o), e;
}
// @__NO_SIDE_EFFECTS__
function B(e) {
  const o = /* @__PURE__ */ We();
  return P(() => (o.value, !!e()));
}
function J(e, o, l = {}) {
  const { window: n = X, ...s } = l;
  let t;
  const u = /* @__PURE__ */ B(() => n && "MutationObserver" in n), d = () => {
    t && (t.disconnect(), t = void 0);
  }, i = A(P(() => {
    const c = V(S(e)).map(_).filter(ie);
    return new Set(c);
  }), (c) => {
    d(), u.value && c.size && (t = new MutationObserver(o), c.forEach((m) => t.observe(m, s)));
  }, {
    immediate: !0,
    flush: "post"
  }), v = () => t == null ? void 0 : t.takeRecords(), r = () => {
    i(), d();
  };
  return Q(r), {
    isSupported: u,
    stop: r,
    takeRecords: v
  };
}
const N = Symbol("vueuse-ssr-width");
// @__NO_SIDE_EFFECTS__
function Re() {
  const e = le() ? /* @__PURE__ */ be(N, null) : null;
  return typeof e == "number" ? e : void 0;
}
function Ie(e, o) {
  o !== void 0 ? o.provide(N, e) : we(N, e);
}
function Pe(e, o = {}) {
  const { window: l = X, ssrWidth: n = /* @__PURE__ */ Re() } = o, s = /* @__PURE__ */ B(() => l && "matchMedia" in l && typeof l.matchMedia == "function"), t = h(typeof n == "number"), u = h(), d = h(!1), i = (v) => {
    d.value = v.matches;
  };
  return me(() => {
    if (t.value) {
      t.value = !s.value, d.value = S(e).split(",").some((v) => {
        const r = v.includes("not all"), c = v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), m = v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
        let f = !!(c || m);
        return c && f && (f = n >= oe(c[1])), m && f && (f = n <= oe(m[1])), r ? !f : f;
      });
      return;
    }
    s.value && (u.value = l.matchMedia(S(e)), d.value = u.value.matches);
  }), L(u, "change", i, { passive: !0 }), P(() => d.value);
}
function ae(e, o, l = {}) {
  const { window: n = X, ...s } = l;
  let t;
  const u = /* @__PURE__ */ B(() => n && "ResizeObserver" in n), d = () => {
    t && (t.disconnect(), t = void 0);
  }, i = A(P(() => {
    const r = S(e);
    return Array.isArray(r) ? r.map((c) => _(c)) : [_(r)];
  }), (r) => {
    if (d(), u.value && n) {
      t = new ResizeObserver(o);
      for (const c of r) c && t.observe(c, s);
    }
  }, {
    immediate: !0,
    flush: "post"
  }), v = () => {
    d(), i();
  };
  return Q(v), {
    isSupported: u,
    stop: v
  };
}
function Xe(e, o = {}) {
  const { reset: l = !0, windowResize: n = !0, windowScroll: s = !0, immediate: t = !0, updateTiming: u = "sync" } = o, d = h(0), i = h(0), v = h(0), r = h(0), c = h(0), m = h(0), f = h(0), b = h(0);
  function E() {
    const g = _(e);
    if (!g) {
      l && (d.value = 0, i.value = 0, v.value = 0, r.value = 0, c.value = 0, m.value = 0, f.value = 0, b.value = 0);
      return;
    }
    const y = g.getBoundingClientRect();
    d.value = y.height, i.value = y.bottom, v.value = y.left, r.value = y.right, c.value = y.top, m.value = y.width, f.value = y.x, b.value = y.y;
  }
  function w() {
    u === "sync" ? E() : u === "next-frame" && requestAnimationFrame(() => E());
  }
  return ae(e, w), A(() => _(e), (g) => !g && w()), J(e, w, { attributeFilter: ["style", "class"] }), s && L("scroll", w, {
    capture: !0,
    passive: !0
  }), n && L("resize", w, { passive: !0 }), U(() => {
    t && w();
  }), {
    height: d,
    bottom: i,
    left: v,
    right: r,
    top: c,
    width: m,
    x: f,
    y: b,
    update: w
  };
}
function Fe(e, o, l = {}) {
  const { root: n, rootMargin: s = "0px", threshold: t = 0, window: u = X, immediate: d = !0 } = l, i = /* @__PURE__ */ B(() => u && "IntersectionObserver" in u), v = P(() => V(S(e)).map(_).filter(ie));
  let r = D;
  const c = h(d), m = i.value ? A(() => [
    v.value,
    _(n),
    c.value
  ], ([b, E]) => {
    if (r(), !c.value || !b.length) return;
    const w = new IntersectionObserver(o, {
      root: _(E),
      rootMargin: s,
      threshold: t
    });
    b.forEach((g) => g && w.observe(g)), r = () => {
      w.disconnect(), r = D;
    };
  }, {
    immediate: d,
    flush: "post"
  }) : D, f = () => {
    r(), m(), c.value = !1;
  };
  return Q(f), {
    isSupported: i,
    isActive: c,
    pause() {
      r(), c.value = !1;
    },
    resume() {
      c.value = !0;
    },
    stop: f
  };
}
const ne = 1;
function He(e, o = {}) {
  const { throttle: l = 0, idle: n = 200, onStop: s = D, onScroll: t = D, offset: u = {
    left: 0,
    right: 0,
    top: 0,
    bottom: 0
  }, observe: d = { mutation: !1 }, eventListenerOptions: i = {
    capture: !1,
    passive: !0
  }, behavior: v = "auto", window: r = X, onError: c = (a) => {
    console.error(a);
  } } = o, m = typeof d == "boolean" ? { mutation: d } : d, f = h(0), b = h(0), E = P({
    get() {
      return f.value;
    },
    set(a) {
      g(a, void 0);
    }
  }), w = P({
    get() {
      return b.value;
    },
    set(a) {
      g(void 0, a);
    }
  });
  function g(a, x) {
    var O, C, Y, $;
    if (!r) return;
    const W = S(e);
    if (!W) return;
    (O = W instanceof Document ? r.document.body : W) === null || O === void 0 || O.scrollTo({
      top: (C = S(x)) !== null && C !== void 0 ? C : w.value,
      left: (Y = S(a)) !== null && Y !== void 0 ? Y : E.value,
      behavior: S(v)
    });
    const I = (W == null || ($ = W.document) === null || $ === void 0 ? void 0 : $.documentElement) || (W == null ? void 0 : W.documentElement) || W;
    E != null && (f.value = I.scrollLeft), w != null && (b.value = I.scrollTop);
  }
  const y = h(!1), M = te({
    left: !0,
    right: !1,
    top: !0,
    bottom: !1
  }), T = te({
    left: !1,
    right: !1,
    top: !1,
    bottom: !1
  }), R = (a) => {
    y.value && (y.value = !1, T.left = !1, T.right = !1, T.top = !1, T.bottom = !1, s(a));
  }, F = /* @__PURE__ */ Oe(R, l + n), p = (a) => {
    var x;
    if (!r) return;
    const O = (a == null || (x = a.document) === null || x === void 0 ? void 0 : x.documentElement) || (a == null ? void 0 : a.documentElement) || _(a), { display: C, flexDirection: Y, direction: $ } = r.getComputedStyle(O), W = $ === "rtl" ? -1 : 1, I = O.scrollLeft;
    T.left = I < f.value, T.right = I > f.value;
    const K = Math.abs(I * W) <= (u.left || 0), Z = Math.abs(I * W) + O.clientWidth >= O.scrollWidth - (u.right || 0) - ne;
    C === "flex" && Y === "row-reverse" ? (M.left = Z, M.right = K) : (M.left = K, M.right = Z), f.value = I;
    let H = O.scrollTop;
    a === r.document && !H && (H = r.document.body.scrollTop), T.top = H < b.value, T.bottom = H > b.value;
    const q = Math.abs(H) <= (u.top || 0), ee = Math.abs(H) + O.clientHeight >= O.scrollHeight - (u.bottom || 0) - ne;
    C === "flex" && Y === "column-reverse" ? (M.top = ee, M.bottom = q) : (M.top = q, M.bottom = ee), b.value = H;
  }, j = (a) => {
    var x;
    r && (p((x = a.target.documentElement) !== null && x !== void 0 ? x : a.target), y.value = !0, F(a), t(a));
  };
  return L(e, "scroll", l ? /* @__PURE__ */ Te(j, l, !0, !1) : j, i), U(() => {
    try {
      const a = S(e);
      if (!a) return;
      p(a);
    } catch (a) {
      c(a);
    }
  }), m != null && m.mutation && e != null && e !== r && e !== document && J(e, () => {
    const a = S(e);
    a && p(a);
  }, {
    attributes: !0,
    childList: !0,
    subtree: !0
  }), L(e, "scrollend", R, i), {
    x: E,
    y: w,
    isScrolling: y,
    arrivedState: M,
    directions: T,
    measure() {
      const a = S(e);
      r && a && p(a);
    }
  };
}
const Le = {
  page: (e) => [e.pageX, e.pageY],
  client: (e) => [e.clientX, e.clientY],
  screen: (e) => [e.screenX, e.screenY],
  movement: (e) => e instanceof MouseEvent ? [e.movementX, e.movementY] : null
};
function _e(e = {}) {
  const { type: o = "page", touch: l = !0, resetOnTouchEnds: n = !1, initialValue: s = {
    x: 0,
    y: 0
  }, window: t = X, target: u = t, scroll: d = !0, eventFilter: i } = e;
  let v = null, r = 0, c = 0;
  const m = h(s.x), f = h(s.y), b = h(null), E = typeof o == "function" ? o : Le[o], w = (p) => {
    const j = E(p);
    v = p, j && ([m.value, f.value] = j, b.value = "mouse"), t && (r = t.scrollX, c = t.scrollY);
  }, g = (p) => {
    if (p.touches.length > 0) {
      const j = E(p.touches[0]);
      j && ([m.value, f.value] = j, b.value = "touch");
    }
  }, y = () => {
    if (!v || !t) return;
    const p = E(v);
    v instanceof MouseEvent && p && (m.value = p[0] + t.scrollX - r, f.value = p[1] + t.scrollY - c);
  }, M = () => {
    m.value = s.x, f.value = s.y;
  }, T = i ? (p) => i(() => w(p), {}) : (p) => w(p), R = i ? (p) => i(() => g(p), {}) : (p) => g(p), F = i ? () => i(() => y(), {}) : () => y();
  if (u) {
    const p = { passive: !0 };
    L(u, ["mousemove", "dragover"], T, p), l && o !== "movement" && (L(u, ["touchstart", "touchmove"], R, p), n && L(u, "touchend", M, p)), d && o === "page" && L(t, "scroll", F, p);
  }
  return {
    x: m,
    y: f,
    sourceType: b
  };
}
function Ye(e, o = {}) {
  const { windowResize: l = !0, windowScroll: n = !0, handleOutside: s = !0, window: t = X } = o, u = o.type || "page", { x: d, y: i, sourceType: v } = _e(o), r = h(e ?? (t == null ? void 0 : t.document.body)), c = h(0), m = h(0), f = h(0), b = h(0), E = h(0), w = h(0), g = h(!0);
  function y() {
    if (!t) return;
    const R = _(r);
    if (!(!R || !(R instanceof Element)))
      for (const F of R.getClientRects()) {
        const { left: p, top: j, width: a, height: x } = F;
        f.value = p + (u === "page" ? t.pageXOffset : 0), b.value = j + (u === "page" ? t.pageYOffset : 0), E.value = x, w.value = a;
        const O = d.value - f.value, C = i.value - b.value;
        if (g.value = a === 0 || x === 0 || O < 0 || C < 0 || O > a || C > x, (s || !g.value) && (c.value = O, m.value = C), !g.value) break;
      }
  }
  const M = [];
  function T() {
    M.forEach((R) => R()), M.length = 0;
  }
  if (U(() => {
    y();
  }), t) {
    const { stop: R } = ae(r, y), { stop: F } = J(r, y, { attributeFilter: ["style", "class"] }), p = A([
      r,
      d,
      i
    ], y);
    M.push(R, F, p), L(document, "mouseleave", () => g.value = !0, { passive: !0 }), n && M.push(L("scroll", y, {
      capture: !0,
      passive: !0
    })), l && M.push(L("resize", y, { passive: !0 }));
  }
  return {
    x: d,
    y: i,
    sourceType: v,
    elementX: c,
    elementY: m,
    elementPositionX: f,
    elementPositionY: b,
    elementHeight: E,
    elementWidth: w,
    isOutside: g,
    stop: T
  };
}
export {
  Pe as a,
  Re as b,
  _ as c,
  He as d,
  ae as e,
  Fe as f,
  De as g,
  Q as h,
  Ce as i,
  Xe as j,
  Ie as p,
  U as t,
  Ye as u
};
//# sourceMappingURL=index-CLv1CFWG.js.map
