react-timeline-scheduler
Version:
A highly customizable timeline scheduler for managing production tasks in React applications.
1,633 lines (1,631 loc) • 302 kB
JavaScript
import * as ci from "react";
import Ee, { createContext as Ut, useRef as Te, useId as di, useContext as me, useInsertionEffect as lo, useCallback as fn, useMemo as ae, useEffect as _e, Children as Ru, isValidElement as Vu, useLayoutEffect as Nu, useState as be, forwardRef as ju, Fragment as uo, createElement as Lu, Component as Yu } from "react";
var An = { exports: {} }, Jt = {};
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Pr;
function Fu() {
if (Pr) return Jt;
Pr = 1;
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
function n(s, i, r) {
var a = null;
if (r !== void 0 && (a = "" + r), i.key !== void 0 && (a = "" + i.key), "key" in i) {
r = {};
for (var o in i)
o !== "key" && (r[o] = i[o]);
} else r = i;
return i = r.ref, {
$$typeof: e,
type: s,
key: a,
ref: i !== void 0 ? i : null,
props: r
};
}
return Jt.Fragment = t, Jt.jsx = n, Jt.jsxs = n, Jt;
}
var Qt = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var kr;
function Iu() {
return kr || (kr = 1, process.env.NODE_ENV !== "production" && function() {
function e(h) {
if (h == null) return null;
if (typeof h == "function")
return h.$$typeof === de ? null : h.displayName || h.name || null;
if (typeof h == "string") return h;
switch (h) {
case O:
return "Fragment";
case _:
return "Portal";
case S:
return "Profiler";
case E:
return "StrictMode";
case oe:
return "Suspense";
case xe:
return "SuspenseList";
}
if (typeof h == "object")
switch (typeof h.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), h.$$typeof) {
case L:
return (h.displayName || "Context") + ".Provider";
case V:
return (h._context.displayName || "Context") + ".Consumer";
case ee:
var P = h.render;
return h = h.displayName, h || (h = P.displayName || P.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
case Y:
return P = h.displayName || null, P !== null ? P : e(h.type) || "Memo";
case ce:
P = h._payload, h = h._init;
try {
return e(h(P));
} catch {
}
}
return null;
}
function t(h) {
return "" + h;
}
function n(h) {
try {
t(h);
var P = !1;
} catch {
P = !0;
}
if (P) {
P = console;
var k = P.error, B = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
return k.call(
P,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
B
), t(h);
}
}
function s() {
}
function i() {
if (qt === 0) {
pr = console.log, gr = console.info, yr = console.warn, vr = console.error, wr = console.group, xr = console.groupCollapsed, Sr = console.groupEnd;
var h = {
configurable: !0,
enumerable: !0,
value: s,
writable: !0
};
Object.defineProperties(console, {
info: h,
log: h,
warn: h,
error: h,
group: h,
groupCollapsed: h,
groupEnd: h
});
}
qt++;
}
function r() {
if (qt--, qt === 0) {
var h = { configurable: !0, enumerable: !0, writable: !0 };
Object.defineProperties(console, {
log: te({}, h, { value: pr }),
info: te({}, h, { value: gr }),
warn: te({}, h, { value: yr }),
error: te({}, h, { value: vr }),
group: te({}, h, { value: wr }),
groupCollapsed: te({}, h, { value: xr }),
groupEnd: te({}, h, { value: Sr })
});
}
0 > qt && console.error(
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
);
}
function a(h) {
if (bs === void 0)
try {
throw Error();
} catch (k) {
var P = k.stack.trim().match(/\n( *(at )?)/);
bs = P && P[1] || "", br = -1 < k.stack.indexOf(`
at`) ? " (<anonymous>)" : -1 < k.stack.indexOf("@") ? "@unknown:0:0" : "";
}
return `
` + bs + h + br;
}
function o(h, P) {
if (!h || Ts) return "";
var k = _s.get(h);
if (k !== void 0) return k;
Ts = !0, k = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
var B = null;
B = $.H, $.H = null, i();
try {
var fe = {
DetermineComponentFrameRoot: function() {
try {
if (P) {
var ot = function() {
throw Error();
};
if (Object.defineProperty(ot.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(ot, []);
} catch (Ze) {
var En = Ze;
}
Reflect.construct(h, [], ot);
} else {
try {
ot.call();
} catch (Ze) {
En = Ze;
}
h.call(ot.prototype);
}
} else {
try {
throw Error();
} catch (Ze) {
En = Ze;
}
(ot = h()) && typeof ot.catch == "function" && ot.catch(function() {
});
}
} catch (Ze) {
if (Ze && En && typeof Ze.stack == "string")
return [Ze.stack, En.stack];
}
return [null, null];
}
};
fe.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
var X = Object.getOwnPropertyDescriptor(
fe.DetermineComponentFrameRoot,
"name"
);
X && X.configurable && Object.defineProperty(
fe.DetermineComponentFrameRoot,
"name",
{ value: "DetermineComponentFrameRoot" }
);
var j = fe.DetermineComponentFrameRoot(), Ke = j[0], Pt = j[1];
if (Ke && Pt) {
var ye = Ke.split(`
`), gt = Pt.split(`
`);
for (j = X = 0; X < ye.length && !ye[X].includes(
"DetermineComponentFrameRoot"
); )
X++;
for (; j < gt.length && !gt[j].includes(
"DetermineComponentFrameRoot"
); )
j++;
if (X === ye.length || j === gt.length)
for (X = ye.length - 1, j = gt.length - 1; 1 <= X && 0 <= j && ye[X] !== gt[j]; )
j--;
for (; 1 <= X && 0 <= j; X--, j--)
if (ye[X] !== gt[j]) {
if (X !== 1 || j !== 1)
do
if (X--, j--, 0 > j || ye[X] !== gt[j]) {
var Xt = `
` + ye[X].replace(
" at new ",
" at "
);
return h.displayName && Xt.includes("<anonymous>") && (Xt = Xt.replace("<anonymous>", h.displayName)), typeof h == "function" && _s.set(h, Xt), Xt;
}
while (1 <= X && 0 <= j);
break;
}
}
} finally {
Ts = !1, $.H = B, r(), Error.prepareStackTrace = k;
}
return ye = (ye = h ? h.displayName || h.name : "") ? a(ye) : "", typeof h == "function" && _s.set(h, ye), ye;
}
function l(h) {
if (h == null) return "";
if (typeof h == "function") {
var P = h.prototype;
return o(
h,
!(!P || !P.isReactComponent)
);
}
if (typeof h == "string") return a(h);
switch (h) {
case oe:
return a("Suspense");
case xe:
return a("SuspenseList");
}
if (typeof h == "object")
switch (h.$$typeof) {
case ee:
return h = o(h.render, !1), h;
case Y:
return l(h.type);
case ce:
P = h._payload, h = h._init;
try {
return l(h(P));
} catch {
}
}
return "";
}
function u() {
var h = $.A;
return h === null ? null : h.getOwner();
}
function c(h) {
if (re.call(h, "key")) {
var P = Object.getOwnPropertyDescriptor(h, "key").get;
if (P && P.isReactWarning) return !1;
}
return h.key !== void 0;
}
function d(h, P) {
function k() {
Tr || (Tr = !0, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
P
));
}
k.isReactWarning = !0, Object.defineProperty(h, "key", {
get: k,
configurable: !0
});
}
function f() {
var h = e(this.type);
return _r[h] || (_r[h] = !0, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
)), h = this.props.ref, h !== void 0 ? h : null;
}
function m(h, P, k, B, fe, X) {
return k = X.ref, h = {
$$typeof: R,
type: h,
key: P,
props: X,
_owner: fe
}, (k !== void 0 ? k : null) !== null ? Object.defineProperty(h, "ref", {
enumerable: !1,
get: f
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(h, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
}
function p(h, P, k, B, fe, X) {
if (typeof h == "string" || typeof h == "function" || h === O || h === S || h === E || h === oe || h === xe || h === le || typeof h == "object" && h !== null && (h.$$typeof === ce || h.$$typeof === Y || h.$$typeof === L || h.$$typeof === V || h.$$typeof === ee || h.$$typeof === Ne || h.getModuleId !== void 0)) {
var j = P.children;
if (j !== void 0)
if (B)
if (Zt(j)) {
for (B = 0; B < j.length; B++)
g(j[B], h);
Object.freeze && Object.freeze(j);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else g(j, h);
} else
j = "", (h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), h === null ? B = "null" : Zt(h) ? B = "array" : h !== void 0 && h.$$typeof === R ? (B = "<" + (e(h.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : B = typeof h, console.error(
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
B,
j
);
if (re.call(P, "key")) {
j = e(h);
var Ke = Object.keys(P).filter(function(ye) {
return ye !== "key";
});
B = 0 < Ke.length ? "{key: someKey, " + Ke.join(": ..., ") + ": ...}" : "{key: someKey}", Dr[j + B] || (Ke = 0 < Ke.length ? "{" + Ke.join(": ..., ") + ": ...}" : "{}", console.error(
`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,
B,
j,
Ke,
j
), Dr[j + B] = !0);
}
if (j = null, k !== void 0 && (n(k), j = "" + k), c(P) && (n(P.key), j = "" + P.key), "key" in P) {
k = {};
for (var Pt in P)
Pt !== "key" && (k[Pt] = P[Pt]);
} else k = P;
return j && d(
k,
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
), m(h, j, X, fe, u(), k);
}
function g(h, P) {
if (typeof h == "object" && h && h.$$typeof !== Au) {
if (Zt(h))
for (var k = 0; k < h.length; k++) {
var B = h[k];
x(B) && y(B, P);
}
else if (x(h))
h._store && (h._store.validated = 1);
else if (h === null || typeof h != "object" ? k = null : (k = Z && h[Z] || h["@@iterator"], k = typeof k == "function" ? k : null), typeof k == "function" && k !== h.entries && (k = k.call(h), k !== h))
for (; !(h = k.next()).done; )
x(h.value) && y(h.value, P);
}
}
function x(h) {
return typeof h == "object" && h !== null && h.$$typeof === R;
}
function y(h, P) {
if (h._store && !h._store.validated && h.key == null && (h._store.validated = 1, P = T(P), !Mr[P])) {
Mr[P] = !0;
var k = "";
h && h._owner != null && h._owner !== u() && (k = null, typeof h._owner.tag == "number" ? k = e(h._owner.type) : typeof h._owner.name == "string" && (k = h._owner.name), k = " It was passed a child from " + k + ".");
var B = $.getCurrentStack;
$.getCurrentStack = function() {
var fe = l(h.type);
return B && (fe += B() || ""), fe;
}, console.error(
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
P,
k
), $.getCurrentStack = B;
}
}
function T(h) {
var P = "", k = u();
return k && (k = e(k.type)) && (P = `
Check the render method of \`` + k + "`."), P || (h = e(h)) && (P = `
Check the top-level render call using <` + h + ">."), P;
}
var D = Ee, R = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), L = Symbol.for("react.context"), ee = Symbol.for("react.forward_ref"), oe = Symbol.for("react.suspense"), xe = Symbol.for("react.suspense_list"), Y = Symbol.for("react.memo"), ce = Symbol.for("react.lazy"), le = Symbol.for("react.offscreen"), Z = Symbol.iterator, de = Symbol.for("react.client.reference"), $ = D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, re = Object.prototype.hasOwnProperty, te = Object.assign, Ne = Symbol.for("react.client.reference"), Zt = Array.isArray, qt = 0, pr, gr, yr, vr, wr, xr, Sr;
s.__reactDisabledLog = !0;
var bs, br, Ts = !1, _s = new (typeof WeakMap == "function" ? WeakMap : Map)(), Au = Symbol.for("react.client.reference"), Tr, _r = {}, Dr = {}, Mr = {};
Qt.Fragment = O, Qt.jsx = function(h, P, k, B, fe) {
return p(h, P, k, !1, B, fe);
}, Qt.jsxs = function(h, P, k, B, fe) {
return p(h, P, k, !0, B, fe);
};
}()), Qt;
}
var Or;
function Wu() {
return Or || (Or = 1, process.env.NODE_ENV === "production" ? An.exports = Fu() : An.exports = Iu()), An.exports;
}
var v = Wu();
const fi = Ut({});
function hi(e) {
const t = Te(null);
return t.current === null && (t.current = e()), t.current;
}
const is = Ut(null), mi = Ut({
transformPagePoint: (e) => e,
isStatic: !1,
reducedMotion: "never"
});
class Uu extends ci.Component {
getSnapshotBeforeUpdate(t) {
const n = this.props.childRef.current;
if (n && t.isPresent && !this.props.isPresent) {
const s = n.offsetParent, i = s instanceof HTMLElement && s.offsetWidth || 0, r = this.props.sizeRef.current;
r.height = n.offsetHeight || 0, r.width = n.offsetWidth || 0, r.top = n.offsetTop, r.left = n.offsetLeft, r.right = i - r.width - r.left;
}
return null;
}
/**
* Required with getSnapshotBeforeUpdate to stop React complaining.
*/
componentDidUpdate() {
}
render() {
return this.props.children;
}
}
function Bu({ children: e, isPresent: t, anchorX: n }) {
const s = di(), i = Te(null), r = Te({
width: 0,
height: 0,
top: 0,
left: 0,
right: 0
}), { nonce: a } = me(mi);
return lo(() => {
const { width: o, height: l, top: u, left: c, right: d } = r.current;
if (t || !i.current || !o || !l)
return;
const f = n === "left" ? `left: ${c}` : `right: ${d}`;
i.current.dataset.motionPopId = s;
const m = document.createElement("style");
return a && (m.nonce = a), document.head.appendChild(m), m.sheet && m.sheet.insertRule(`
[data-motion-pop-id="${s}"] {
position: absolute !important;
width: ${o}px !important;
height: ${l}px !important;
${f}px !important;
top: ${u}px !important;
}
`), () => {
document.head.removeChild(m);
};
}, [t]), v.jsx(Uu, { isPresent: t, childRef: i, sizeRef: r, children: ci.cloneElement(e, { ref: i }) });
}
const Hu = ({ children: e, initial: t, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: a, anchorX: o }) => {
const l = hi($u), u = di(), c = fn((f) => {
l.set(f, !0);
for (const m of l.values())
if (!m)
return;
s && s();
}, [l, s]), d = ae(
() => ({
id: u,
initial: t,
isPresent: n,
custom: i,
onExitComplete: c,
register: (f) => (l.set(f, !1), () => l.delete(f))
}),
/**
* If the presence of a child affects the layout of the components around it,
* we want to make a new context value to ensure they get re-rendered
* so they can detect that layout change.
*/
r ? [Math.random(), c] : [n, c]
);
return ae(() => {
l.forEach((f, m) => l.set(m, !1));
}, [n]), ci.useEffect(() => {
!n && !l.size && s && s();
}, [n]), a === "popLayout" && (e = v.jsx(Bu, { isPresent: n, anchorX: o, children: e })), v.jsx(is.Provider, { value: d, children: e });
};
function $u() {
return /* @__PURE__ */ new Map();
}
function co(e = !0) {
const t = me(is);
if (t === null)
return [!0, null];
const { isPresent: n, onExitComplete: s, register: i } = t, r = di();
_e(() => {
e && i(r);
}, [e]);
const a = fn(() => e && s && s(r), [r, s, e]);
return !n && s ? [!1, a] : [!0];
}
const Rn = (e) => e.key || "";
function Cr(e) {
const t = [];
return Ru.forEach(e, (n) => {
Vu(n) && t.push(n);
}), t;
}
const pi = typeof window < "u", fo = pi ? Nu : _e, Gu = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: a = !1, anchorX: o = "left" }) => {
const [l, u] = co(a), c = ae(() => Cr(e), [e]), d = a && !l ? [] : c.map(Rn), f = Te(!0), m = Te(c), p = hi(() => /* @__PURE__ */ new Map()), [g, x] = be(c), [y, T] = be(c);
fo(() => {
f.current = !1, m.current = c;
for (let _ = 0; _ < y.length; _++) {
const O = Rn(y[_]);
d.includes(O) ? p.delete(O) : p.get(O) !== !0 && p.set(O, !1);
}
}, [y, d.length, d.join("-")]);
const D = [];
if (c !== g) {
let _ = [...c];
for (let O = 0; O < y.length; O++) {
const E = y[O], S = Rn(E);
d.includes(S) || (_.splice(O, 0, E), D.push(E));
}
r === "wait" && D.length && (_ = D), T(Cr(_)), x(c);
return;
}
process.env.NODE_ENV !== "production" && r === "wait" && y.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
const { forceRender: R } = me(fi);
return v.jsx(v.Fragment, { children: y.map((_) => {
const O = Rn(_), E = a && !l ? !1 : c === y || d.includes(O), S = () => {
if (p.has(O))
p.set(O, !0);
else
return;
let V = !0;
p.forEach((L) => {
L || (V = !1);
}), V && (R == null || R(), T(m.current), a && (u == null || u()), s && s());
};
return v.jsx(Hu, { isPresent: E, initial: !f.current || n ? void 0 : !1, custom: E ? void 0 : t, presenceAffectsLayout: i, mode: r, onExitComplete: E ? void 0 : S, anchorX: o, children: _ }, O);
}) });
}, De = /* @__NO_SIDE_EFFECTS__ */ (e) => e;
let Bt = De, ft = De;
process.env.NODE_ENV !== "production" && (Bt = (e, t) => {
!e && typeof console < "u" && console.warn(t);
}, ft = (e, t) => {
if (!e)
throw new Error(t);
});
// @__NO_SIDE_EFFECTS__
function gi(e) {
let t;
return () => (t === void 0 && (t = e()), t);
}
const Ft = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
const s = t - e;
return s === 0 ? 1 : (n - e) / s;
}, Ue = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, et = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, zu = {
useManualTiming: !1
};
function Ku(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
const r = /* @__PURE__ */ new WeakSet();
let a = {
delta: 0,
timestamp: 0,
isProcessing: !1
};
function o(u) {
r.has(u) && (l.schedule(u), e()), u(a);
}
const l = {
/**
* Schedule a process to run on the next frame.
*/
schedule: (u, c = !1, d = !1) => {
const m = d && s ? t : n;
return c && r.add(u), m.has(u) || m.add(u), u;
},
/**
* Cancel the provided callback from running on the next frame.
*/
cancel: (u) => {
n.delete(u), r.delete(u);
},
/**
* Execute all schedule callbacks.
*/
process: (u) => {
if (a = u, s) {
i = !0;
return;
}
s = !0, [t, n] = [n, t], t.forEach(o), t.clear(), s = !1, i && (i = !1, l.process(u));
}
};
return l;
}
const Vn = [
"read",
// Read
"resolveKeyframes",
// Write/Read/Write/Read
"update",
// Compute
"preRender",
// Compute
"render",
// Write
"postRender"
// Compute
], Zu = 40;
function ho(e, t) {
let n = !1, s = !0;
const i = {
delta: 0,
timestamp: 0,
isProcessing: !1
}, r = () => n = !0, a = Vn.reduce((y, T) => (y[T] = Ku(r), y), {}), { read: o, resolveKeyframes: l, update: u, preRender: c, render: d, postRender: f } = a, m = () => {
const y = performance.now();
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, Zu), 1), i.timestamp = y, i.isProcessing = !0, o.process(i), l.process(i), u.process(i), c.process(i), d.process(i), f.process(i), i.isProcessing = !1, n && t && (s = !1, e(m));
}, p = () => {
n = !0, s = !0, i.isProcessing || e(m);
};
return { schedule: Vn.reduce((y, T) => {
const D = a[T];
return y[T] = (R, _ = !1, O = !1) => (n || p(), D.schedule(R, _, O)), y;
}, {}), cancel: (y) => {
for (let T = 0; T < Vn.length; T++)
a[Vn[T]].cancel(y);
}, state: i, steps: a };
}
const { schedule: G, cancel: ht, state: ue, steps: Ds } = ho(typeof requestAnimationFrame < "u" ? requestAnimationFrame : De, !0), mo = Ut({ strict: !1 }), Er = {
animation: [
"animate",
"variants",
"whileHover",
"whileTap",
"exit",
"whileInView",
"whileFocus",
"whileDrag"
],
exit: ["exit"],
drag: ["drag", "dragControls"],
focus: ["whileFocus"],
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
layout: ["layout", "layoutId"]
}, It = {};
for (const e in Er)
It[e] = {
isEnabled: (t) => Er[e].some((n) => !!t[n])
};
function qu(e) {
for (const t in e)
It[t] = {
...It[t],
...e[t]
};
}
const Xu = /* @__PURE__ */ new Set([
"animate",
"exit",
"variants",
"initial",
"style",
"values",
"variants",
"transition",
"transformTemplate",
"custom",
"inherit",
"onBeforeLayoutMeasure",
"onAnimationStart",
"onAnimationComplete",
"onUpdate",
"onDragStart",
"onDrag",
"onDragEnd",
"onMeasureDragConstraints",
"onDirectionLock",
"onDragTransitionEnd",
"_dragX",
"_dragY",
"onHoverStart",
"onHoverEnd",
"onViewportEnter",
"onViewportLeave",
"globalTapTarget",
"ignoreStrict",
"viewport"
]);
function $n(e) {
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Xu.has(e);
}
let po = (e) => !$n(e);
function Ju(e) {
e && (po = (t) => t.startsWith("on") ? !$n(t) : e(t));
}
try {
Ju(require("@emotion/is-prop-valid").default);
} catch {
}
function Qu(e, t, n) {
const s = {};
for (const i in e)
i === "values" && typeof e.values == "object" || (po(i) || n === !0 && $n(i) || !t && !$n(i) || // If trying to use native HTML drag events, forward drag listeners
e.draggable && i.startsWith("onDrag")) && (s[i] = e[i]);
return s;
}
const Ar = /* @__PURE__ */ new Set();
function rs(e, t, n) {
e || Ar.has(t) || (console.warn(t), Ar.add(t));
}
function ec(e) {
if (typeof Proxy > "u")
return e;
const t = /* @__PURE__ */ new Map(), n = (...s) => (process.env.NODE_ENV !== "production" && rs(!1, "motion() is deprecated. Use motion.create() instead."), e(...s));
return new Proxy(n, {
/**
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
* The prop name is passed through as `key` and we can use that to generate a `motion`
* DOM component with that name.
*/
get: (s, i) => i === "create" ? e : (t.has(i) || t.set(i, e(i)), t.get(i))
});
}
const as = Ut({});
function hn(e) {
return typeof e == "string" || Array.isArray(e);
}
function os(e) {
return e !== null && typeof e == "object" && typeof e.start == "function";
}
const yi = [
"animate",
"whileInView",
"whileFocus",
"whileHover",
"whileTap",
"whileDrag",
"exit"
], vi = ["initial", ...yi];
function ls(e) {
return os(e.animate) || vi.some((t) => hn(e[t]));
}
function go(e) {
return !!(ls(e) || e.variants);
}
function tc(e, t) {
if (ls(e)) {
const { initial: n, animate: s } = e;
return {
initial: n === !1 || hn(n) ? n : void 0,
animate: hn(s) ? s : void 0
};
}
return e.inherit !== !1 ? t : {};
}
function nc(e) {
const { initial: t, animate: n } = tc(e, me(as));
return ae(() => ({ initial: t, animate: n }), [Rr(t), Rr(n)]);
}
function Rr(e) {
return Array.isArray(e) ? e.join(" ") : e;
}
const sc = Symbol.for("motionComponentSymbol");
function Ct(e) {
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
}
function ic(e, t, n) {
return fn(
(s) => {
s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : Ct(n) && (n.current = s));
},
/**
* Only pass a new ref callback to React if we've received a visual element
* factory. Otherwise we'll be mounting/remounting every time externalRef
* or other dependencies change.
*/
[t]
);
}
const wi = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), rc = "framerAppearId", yo = "data-" + wi(rc), { schedule: xi } = ho(queueMicrotask, !1), vo = Ut({});
function ac(e, t, n, s, i) {
var r, a;
const { visualElement: o } = me(as), l = me(mo), u = me(is), c = me(mi).reducedMotion, d = Te(null);
s = s || l.renderer, !d.current && s && (d.current = s(e, {
visualState: t,
parent: o,
props: n,
presenceContext: u,
blockInitialAnimation: u ? u.initial === !1 : !1,
reducedMotionConfig: c
}));
const f = d.current, m = me(vo);
f && !f.projection && i && (f.type === "html" || f.type === "svg") && oc(d.current, n, i, m);
const p = Te(!1);
lo(() => {
f && p.current && f.update(n, u);
});
const g = n[yo], x = Te(!!g && !(!((r = window.MotionHandoffIsComplete) === null || r === void 0) && r.call(window, g)) && ((a = window.MotionHasOptimisedAnimation) === null || a === void 0 ? void 0 : a.call(window, g)));
return fo(() => {
f && (p.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), xi.render(f.render), x.current && f.animationState && f.animationState.animateChanges());
}), _e(() => {
f && (!x.current && f.animationState && f.animationState.animateChanges(), x.current && (queueMicrotask(() => {
var y;
(y = window.MotionHandoffMarkAsComplete) === null || y === void 0 || y.call(window, g);
}), x.current = !1));
}), f;
}
function oc(e, t, n, s) {
const { layoutId: i, layout: r, drag: a, dragConstraints: o, layoutScroll: l, layoutRoot: u } = t;
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : wo(e.parent)), e.projection.setOptions({
layoutId: i,
layout: r,
alwaysMeasureLayout: !!a || o && Ct(o),
visualElement: e,
/**
* TODO: Update options in an effect. This could be tricky as it'll be too late
* to update by the time layout animations run.
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
* ensuring it gets called if there's no potential layout animations.
*
*/
animationType: typeof r == "string" ? r : "both",
initialPromotionConfig: s,
layoutScroll: l,
layoutRoot: u
});
}
function wo(e) {
if (e)
return e.options.allowProjection !== !1 ? e.projection : wo(e.parent);
}
function lc({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: s, Component: i }) {
var r, a;
e && qu(e);
function o(u, c) {
let d;
const f = {
...me(mi),
...u,
layoutId: uc(u)
}, { isStatic: m } = f, p = nc(u), g = s(u, m);
if (!m && pi) {
cc(f, e);
const x = dc(f);
d = x.MeasureLayout, p.visualElement = ac(i, g, f, t, x.ProjectionNode);
}
return v.jsxs(as.Provider, { value: p, children: [d && p.visualElement ? v.jsx(d, { visualElement: p.visualElement, ...f }) : null, n(i, u, ic(g, p.visualElement, c), g, m, p.visualElement)] });
}
o.displayName = `motion.${typeof i == "string" ? i : `create(${(a = (r = i.displayName) !== null && r !== void 0 ? r : i.name) !== null && a !== void 0 ? a : ""})`}`;
const l = ju(o);
return l[sc] = i, l;
}
function uc({ layoutId: e }) {
const t = me(fi).id;
return t && e !== void 0 ? t + "-" + e : e;
}
function cc(e, t) {
const n = me(mo).strict;
if (process.env.NODE_ENV !== "production" && t && n) {
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
e.ignoreStrict ? Bt(!1, s) : ft(!1, s);
}
}
function dc(e) {
const { drag: t, layout: n } = It;
if (!t && !n)
return {};
const s = { ...t, ...n };
return {
MeasureLayout: t != null && t.isEnabled(e) || n != null && n.isEnabled(e) ? s.MeasureLayout : void 0,
ProjectionNode: s.ProjectionNode
};
}
const fc = [
"animate",
"circle",
"defs",
"desc",
"ellipse",
"g",
"image",
"line",
"filter",
"marker",
"mask",
"metadata",
"path",
"pattern",
"polygon",
"polyline",
"rect",
"stop",
"switch",
"symbol",
"svg",
"text",
"tspan",
"use",
"view"
];
function Si(e) {
return (
/**
* If it's not a string, it's a custom React component. Currently we only support
* HTML custom React components.
*/
typeof e != "string" || /**
* If it contains a dash, the element is a custom HTML webcomponent.
*/
e.includes("-") ? !1 : (
/**
* If it's in our list of lowercase SVG tags, it's an SVG component
*/
!!(fc.indexOf(e) > -1 || /**
* If it contains a capital letter, it's an SVG component
*/
/[A-Z]/u.test(e))
)
);
}
function Vr(e) {
const t = [{}, {}];
return e == null || e.values.forEach((n, s) => {
t[0][s] = n.get(), t[1][s] = n.getVelocity();
}), t;
}
function bi(e, t, n, s) {
if (typeof t == "function") {
const [i, r] = Vr(s);
t = t(n !== void 0 ? n : e.custom, i, r);
}
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
const [i, r] = Vr(s);
t = t(n !== void 0 ? n : e.custom, i, r);
}
return t;
}
const Ws = (e) => Array.isArray(e), hc = (e) => !!(e && typeof e == "object" && e.mix && e.toValue), mc = (e) => Ws(e) ? e[e.length - 1] || 0 : e, pe = (e) => !!(e && e.getVelocity);
function Fn(e) {
const t = pe(e) ? e.get() : e;
return hc(t) ? t.toValue() : t;
}
function pc({ scrapeMotionValuesFromProps: e, createRenderState: t, onUpdate: n }, s, i, r) {
const a = {
latestValues: gc(s, i, r, e),
renderState: t()
};
return n && (a.onMount = (o) => n({ props: s, current: o, ...a }), a.onUpdate = (o) => n(o)), a;
}
const xo = (e) => (t, n) => {
const s = me(as), i = me(is), r = () => pc(e, t, s, i);
return n ? r() : hi(r);
};
function gc(e, t, n, s) {
const i = {}, r = s(e, {});
for (const f in r)
i[f] = Fn(r[f]);
let { initial: a, animate: o } = e;
const l = ls(e), u = go(e);
t && u && !l && e.inherit !== !1 && (a === void 0 && (a = t.initial), o === void 0 && (o = t.animate));
let c = n ? n.initial === !1 : !1;
c = c || a === !1;
const d = c ? o : a;
if (d && typeof d != "boolean" && !os(d)) {
const f = Array.isArray(d) ? d : [d];
for (let m = 0; m < f.length; m++) {
const p = bi(e, f[m]);
if (p) {
const { transitionEnd: g, transition: x, ...y } = p;
for (const T in y) {
let D = y[T];
if (Array.isArray(D)) {
const R = c ? D.length - 1 : 0;
D = D[R];
}
D !== null && (i[T] = D);
}
for (const T in g)
i[T] = g[T];
}
}
}
return i;
}
const Ht = [
"transformPerspective",
"x",
"y",
"z",
"translateX",
"translateY",
"translateZ",
"scale",
"scaleX",
"scaleY",
"rotate",
"rotateX",
"rotateY",
"rotateZ",
"skew",
"skewX",
"skewY"
], Dt = new Set(Ht), So = (e) => (t) => typeof t == "string" && t.startsWith(e), Ti = /* @__PURE__ */ So("--"), yc = /* @__PURE__ */ So("var(--"), _i = (e) => yc(e) ? vc.test(e.split("/*")[0].trim()) : !1, vc = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, bo = (e, t) => t && typeof e == "number" ? t.transform(e) : e, st = (e, t, n) => n > t ? t : n < e ? e : n, $t = {
test: (e) => typeof e == "number",
parse: parseFloat,
transform: (e) => e
}, mn = {
...$t,
transform: (e) => st(0, 1, e)
}, Nn = {
...$t,
default: 1
}, Tn = (e) => ({
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
parse: parseFloat,
transform: (t) => `${t}${e}`
}), lt = /* @__PURE__ */ Tn("deg"), Be = /* @__PURE__ */ Tn("%"), A = /* @__PURE__ */ Tn("px"), wc = /* @__PURE__ */ Tn("vh"), xc = /* @__PURE__ */ Tn("vw"), Nr = {
...Be,
parse: (e) => Be.parse(e) / 100,
transform: (e) => Be.transform(e * 100)
}, Sc = {
// Border props
borderWidth: A,
borderTopWidth: A,
borderRightWidth: A,
borderBottomWidth: A,
borderLeftWidth: A,
borderRadius: A,
radius: A,
borderTopLeftRadius: A,
borderTopRightRadius: A,
borderBottomRightRadius: A,
borderBottomLeftRadius: A,
// Positioning props
width: A,
maxWidth: A,
height: A,
maxHeight: A,
top: A,
right: A,
bottom: A,
left: A,
// Spacing props
padding: A,
paddingTop: A,
paddingRight: A,
paddingBottom: A,
paddingLeft: A,
margin: A,
marginTop: A,
marginRight: A,
marginBottom: A,
marginLeft: A,
// Misc
backgroundPositionX: A,
backgroundPositionY: A
}, bc = {
rotate: lt,
rotateX: lt,
rotateY: lt,
rotateZ: lt,
scale: Nn,
scaleX: Nn,
scaleY: Nn,
scaleZ: Nn,
skew: lt,
skewX: lt,
skewY: lt,
distance: A,
translateX: A,
translateY: A,
translateZ: A,
x: A,
y: A,
z: A,
perspective: A,
transformPerspective: A,
opacity: mn,
originX: Nr,
originY: Nr,
originZ: A
}, jr = {
...$t,
transform: Math.round
}, Di = {
...Sc,
...bc,
zIndex: jr,
size: A,
// SVG
fillOpacity: mn,
strokeOpacity: mn,
numOctaves: jr
}, Tc = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective"
}, _c = Ht.length;
function Dc(e, t, n) {
let s = "", i = !0;
for (let r = 0; r < _c; r++) {
const a = Ht[r], o = e[a];
if (o === void 0)
continue;
let l = !0;
if (typeof o == "number" ? l = o === (a.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || n) {
const u = bo(o, Di[a]);
if (!l) {
i = !1;
const c = Tc[a] || a;
s += `${c}(${u}) `;
}
n && (t[a] = u);
}
}
return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
}
function Mi(e, t, n) {
const { style: s, vars: i, transformOrigin: r } = e;
let a = !1, o = !1;
for (const l in t) {
const u = t[l];
if (Dt.has(l)) {
a = !0;
continue;
} else if (Ti(l)) {
i[l] = u;
continue;
} else {
const c = bo(u, Di[l]);
l.startsWith("origin") ? (o = !0, r[l] = c) : s[l] = c;
}
}
if (t.transform || (a || n ? s.transform = Dc(t, e.transform, n) : s.transform && (s.transform = "none")), o) {
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
s.transformOrigin = `${l} ${u} ${c}`;
}
}
const Mc = {
offset: "stroke-dashoffset",
array: "stroke-dasharray"
}, Pc = {
offset: "strokeDashoffset",
array: "strokeDasharray"
};
function kc(e, t, n = 1, s = 0, i = !0) {
e.pathLength = 1;
const r = i ? Mc : Pc;
e[r.offset] = A.transform(-s);
const a = A.transform(t), o = A.transform(n);
e[r.array] = `${a} ${o}`;
}
function Lr(e, t, n) {
return typeof e == "string" ? e : A.transform(t + n * e);
}
function Oc(e, t, n) {
const s = Lr(t, e.x, e.width), i = Lr(n, e.y, e.height);
return `${s} ${i}`;
}
function Pi(e, {
attrX: t,
attrY: n,
attrScale: s,
originX: i,
originY: r,
pathLength: a,
pathSpacing: o = 1,
pathOffset: l = 0,
// This is object creation, which we try to avoid per-frame.
...u
}, c, d) {
if (Mi(e, u, d), c) {
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
return;
}
e.attrs = e.style, e.style = {};
const { attrs: f, style: m, dimensions: p } = e;
f.transform && (p && (m.transform = f.transform), delete f.transform), p && (i !== void 0 || r !== void 0 || m.transform) && (m.transformOrigin = Oc(p, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), t !== void 0 && (f.x = t), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), a !== void 0 && kc(f, a, o, l, !1);
}
const ki = () => ({
style: {},
transform: {},
transformOrigin: {},
vars: {}
}), To = () => ({
...ki(),
attrs: {}
}), Oi = (e) => typeof e == "string" && e.toLowerCase() === "svg";
function _o(e, { style: t, vars: n }, s, i) {
Object.assign(e.style, t, i && i.getProjectionStyles(s));
for (const r in n)
e.style.setProperty(r, n[r]);
}
const Do = /* @__PURE__ */ new Set([
"baseFrequency",
"diffuseConstant",
"kernelMatrix",
"kernelUnitLength",
"keySplines",
"keyTimes",
"limitingConeAngle",
"markerHeight",
"markerWidth",
"numOctaves",
"targetX",
"targetY",
"surfaceScale",
"specularConstant",
"specularExponent",
"stdDeviation",
"tableValues",
"viewBox",
"gradientTransform",
"pathLength",
"startOffset",
"textLength",
"lengthAdjust"
]);
function Mo(e, t, n, s) {
_o(e, t, void 0, s);
for (const i in t.attrs)
e.setAttribute(Do.has(i) ? i : wi(i), t.attrs[i]);
}
const pn = {};
function Cc(e) {
for (const t in e)
pn[t] = e[t], Ti(t) && (pn[t].isCSSVariable = !0);
}
function Po(e, { layout: t, layoutId: n }) {
return Dt.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!pn[e] || e === "opacity");
}
function Ci(e, t, n) {
var s;
const { style: i } = e, r = {};
for (const a in i)
(pe(i[a]) || t.style && pe(t.style[a]) || Po(a, e) || ((s = n == null ? void 0 : n.getValue(a)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[a] = i[a]);
return r;
}
function ko(e, t, n) {
const s = Ci(e, t, n);
for (const i in e)
if (pe(e[i]) || pe(t[i])) {
const r = Ht.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
s[r] = e[i];
}
return s;
}
function Ec(e, t) {
try {
t.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
} catch {
t.dimensions = {
x: 0,
y: 0,
width: 0,
height: 0
};
}
}
const Yr = ["x", "y", "width", "height", "cx", "cy", "r"], Ac = {
useVisualState: xo({
scrapeMotionValuesFromProps: ko,
createRenderState: To,
onUpdate: ({ props: e, prevProps: t, current: n, renderState: s, latestValues: i }) => {
if (!n)
return;
let r = !!e.drag;
if (!r) {
for (const o in i)
if (Dt.has(o)) {
r = !0;
break;
}
}
if (!r)
return;
let a = !t;
if (t)
for (let o = 0; o < Yr.length; o++) {
const l = Yr[o];
e[l] !== t[l] && (a = !0);
}
a && G.read(() => {
Ec(n, s), G.render(() => {
Pi(s, i, Oi(n.tagName), e.transformTemplate), Mo(n, s);
});
});
}
})
}, Rc = {
useVisualState: xo({
scrapeMotionValuesFromProps: Ci,
createRenderState: ki
})
};
function Oo(e, t, n) {
for (const s in t)
!pe(t[s]) && !Po(s, n) && (e[s] = t[s]);
}
function Vc({ transformTemplate: e }, t) {
return ae(() => {
const n = ki();
return Mi(n, t, e), Object.assign({}, n.vars, n.style);
}, [t]);
}
function Nc(e, t) {
const n = e.style || {}, s = {};
return Oo(s, n, e), Object.assign(s, Vc(e, t)), s;
}
function jc(e, t) {
const n = {}, s = Nc(e, t);
return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
}
function Lc(e, t, n, s) {
const i = ae(() => {
const r = To();
return Pi(r, t, Oi(s), e.transformTemplate), {
...r.attrs,
style: { ...r.style }
};
}, [t]);
if (e.style) {
const r = {};
Oo(r, e.style, e), i.style = { ...r, ...i.style };
}
return i;
}
function Yc(e = !1) {
return (n, s, i, { latestValues: r }, a) => {
const l = (Si(n) ? Lc : jc)(s, r, a, n), u = Qu(s, typeof n == "string", e), c = n !== uo ? { ...u, ...l, ref: i } : {}, { children: d } = s, f = ae(() => pe(d) ? d.get() : d, [d]);
return Lu(n, {
...c,
children: f
});
};
}
function Fc(e, t) {
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
const a = {
...Si(s) ? Ac : Rc,
preloadedFeatures: e,
useRender: Yc(i),
createVisualElement: t,
Component: s
};
return lc(a);
};
}
function Co(e, t) {
if (!Array.isArray(t))
return !1;
const n = t.length;
if (n !== e.length)
return !1;
for (let s = 0; s < n; s++)
if (t[s] !== e[s])
return !1;
return !0;
}
function us(e, t, n) {
const s = e.getProps();
return bi(s, t, n !== void 0 ? n : s.custom, e);
}
const Ic = /* @__PURE__ */ gi(() => window.ScrollTimeline !== void 0);
class Wc {
constructor(t) {
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
}
get finished() {
return Promise.all(this.animations.map((t) => "finished" in t ? t.finished : t));
}
/**
* TODO: Filter out cancelled or stopped animations before returning
*/
getAll(t) {
return this.animations[0][t];
}
setAll(t, n) {
for (let s = 0; s < this.animations.length; s++)
this.animations[s][t] = n;
}
attachTimeline(t, n) {
const s = this.animations.map((i) => {
if (Ic() && i.attachTimeline)
return i.attachTimeline(t);
if (typeof n == "function")
return n(i);
});
return () => {
s.forEach((i, r) => {
i && i(), this.animations[r].stop();
});
};
}
get time() {
return this.getAll("time");
}
set time(t) {
this.setAll("time", t);
}
get speed() {
return this.getAll("speed");
}
set speed(t) {
this.setAll("speed", t);
}
get startTime() {
return this.getAll("startTime");
}
get duration() {
let t = 0;
for (let n = 0; n < this.animations.length; n++)
t = Math.max(t, this.animations[n].duration);
return t;
}
runAll(t) {
this.animations.forEach((n) => n[t]());
}
flatten() {
this.runAll("flatten");
}
play() {
this.runAll("play");
}
pause() {
this.runAll("pause");
}
cancel() {
this.runAll("cancel");
}
complete() {
this.runAll("complete");
}
}
class Uc extends Wc {
then(t, n) {
return Promise.all(this.animations).then(t).catch(n);
}
}
function Ei(e, t) {
return e ? e[t] || e.default || e : void 0;
}
const Us = 2e4;
function Eo(e) {
let t = 0;
const n = 50;
let s = e.next(t);
for (; !s.done && t < Us; )
t += n, s = e.next(t);
return t >= Us ? 1 / 0 : t;
}
function Ai(e) {
return typeof e == "function";
}
function Fr(e, t) {
e.timeline = t, e.onfinish = null;
}
const Ri = (e) => Array.isArray(e) && typeof e[0] == "number", Bc = {
linearEasing: void 0
};
function Hc(e, t) {
const n = /* @__PURE__ */ gi(e);
return () => {
var s;
return (s = Bc[t]) !== null && s !== void 0 ? s : n();
};
}
const Gn = /* @__PURE__ */ Hc(() => {
try {
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
} catch {
return !1;
}
return !0;
}, "linearEasing"), Ao = (e, t, n = 10) => {
let s = "";
const i = Math.max(Math.round(t / n), 2);
for (let r = 0; r < i; r++)
s += e(/* @__PURE__ */ Ft(0, i - 1, r)) + ", ";
return `linear(${s.substring(0, s.length - 2)})`;
};
function Ro(e) {
return !!(typeof e == "function" && Gn() || !e || typeof e == "string" && (e in Bs || Gn()) || Ri(e) || Array.isArray(e) && e.every(Ro));
}
const sn = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Bs = {
linear: "linear",
ease: "ease",
easeIn: "ease-in",
easeOut: "ease-out",
easeInOut: "ease-in-out",
circIn: /* @__PURE__ */ sn([0, 0.65, 0.55, 1]),
circOut: /* @__PURE__ */ sn([0.55, 0, 1, 0.45]),
backIn: /* @__PURE__ */ sn([0.31, 0.01, 0.66, -0.59]),
backOut: /* @__PURE__ */ sn([0.33, 1.53, 0.69, 0.99])
};
function Vo(e, t) {
if (e)
return typeof e == "function" && Gn() ? Ao(e, t) : Ri(e) ? sn(e) : Array.isArray(e) ? e.map((n) => Vo(n, t) || Bs.easeOut) : Bs[e];
}
const je = {
x: !1,
y: !1
};
function No() {
return je.x || je.y;
}
function jo(e, t, n) {
var s;
if (e instanceof Element)
return [e];
if (typeof e == "string") {
let i = document;
const r = (s = void 0) !== null && s !== void 0 ? s : i.querySelectorAll(e);
return r ? Array.from(r) : [];
}
return Array.from(e);
}
function Lo(e, t) {
const n = jo(e), s = new AbortController(), i = {
passive: !0,
...t,
signal: s.signal
};
return [n, i, () => s.abort()];
}
function Ir(e) {
return !(e.pointerType === "touch" || No());
}
function $c(e, t, n = {}) {
const [s, i, r] = Lo(e, n), a = (o) => {
if (!Ir(o))
return;
const { target: l } = o, u = t(l, o);
if (typeof u != "function" || !l)
return;
const c = (d) => {
Ir(d) && (u(d), l.removeEventListener("pointerleave", c));
};
l.addEventListener("pointerleave", c, i);
};
return s.forEach((o) => {
o.addEventListener("pointerenter", a, i);
}), r;
}
const Yo = (e, t) => t ? e === t ? !0 : Yo(e, t.parentElement) : !1, Vi = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, Gc = /* @__PURE__ */ new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A"
]);
function zc(e) {
return Gc.has(e.tagName) || e.tabIndex !== -1;
}
const rn = /* @__PURE__ */ new WeakSet();
function Wr(e) {
return (t) => {
t.key === "Enter" && e(t);
};
}
function Ms(e, t) {
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
}
const Kc = (e, t) => {
const n = e.currentTarget;
if (!n)
return;
const s = Wr(() => {
if (rn.has(n))
return;
Ms(n, "down");
const i = Wr(() => {
Ms(n, "up");
}), r = () => Ms(n, "cancel");
n.addEventListener("keyup", i, t), n.addEventListener("blur", r, t);
});
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
};
function Ur(e) {
return Vi(e) && !No();
}
function Zc(e, t, n = {}) {
const [s, i, r] = Lo(e, n)